Subversion Repositories SmartDukaan

Rev

Rev 1590 | Rev 1674 | 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
 
1491 vikas 42
    public User getUserByEmail(String email) throws UserContextException, TException;
43
 
553 chandransh 44
    public User createUser(User user) throws UserContextException, TException;
48 ashish 45
 
553 chandransh 46
    public User updateUser(User user) throws UserContextException, TException;
48 ashish 47
 
553 chandransh 48
    public boolean deleteUser(long userId) throws UserContextException, TException;
48 ashish 49
 
553 chandransh 50
    public UserState getUserState(long userId) throws UserContextException, TException;
48 ashish 51
 
553 chandransh 52
    public User authenticateUser(String email, String password) throws AuthenticationException, TException;
48 ashish 53
 
54
    public boolean userExists(String email) throws UserContextException, TException;
55
 
571 rajveer 56
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException;
48 ashish 57
 
58
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
59
 
60
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
61
 
62
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
63
 
506 rajveer 64
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
65
 
593 rajveer 66
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException;
48 ashish 67
 
896 rajveer 68
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException;
582 rajveer 69
 
593 rajveer 70
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
71
 
72
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
73
 
784 rajveer 74
    public String getDefaultPincode(long userId) throws UserContextException, TException;
75
 
1177 varun.gupt 76
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException;
77
 
1590 varun.gupt 78
    public UserCommunication getUserCommunicationById(long id) throws UserCommunicationException, TException;
79
 
80
    public List<UserCommunication> getUserCommunicationByUser(long userId) throws UserCommunicationException, TException;
81
 
82
    public List<UserCommunication> getAllUserCommunications() throws UserCommunicationException, TException;
83
 
553 chandransh 84
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 85
 
553 chandransh 86
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 87
 
553 chandransh 88
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 89
 
553 chandransh 90
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 91
 
553 chandransh 92
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 93
 
553 chandransh 94
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 95
 
553 chandransh 96
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 97
 
553 chandransh 98
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 99
 
553 chandransh 100
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
101
 
102
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
103
 
104
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
105
 
578 chandransh 106
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 107
 
688 chandransh 108
    /**
109
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
110
     * 
111
     * @param cartId
112
     */
113
    public long createOrders(long cartId) throws ShoppingCartException, TException;
553 chandransh 114
 
688 chandransh 115
    /**
116
     * Validates that:
117
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
1466 ankur.sing 118
     * 2. All of the lines in the cart are active items.
688 chandransh 119
     * 3. The estimate for any of the lines in cart doesn't change.
1466 ankur.sing 120
     * If all three are true, returns empty string; else returns appropriate message.
688 chandransh 121
     * 
122
     * @param cartId
123
     */
1466 ankur.sing 124
    public String validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 125
 
688 chandransh 126
    /**
127
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
128
     * 
129
     * @param fromCartId
130
     * @param toCartId
131
     */
553 chandransh 132
    public void mergeCart(long fromCartId, long toCartId) throws TException;
133
 
688 chandransh 134
    /**
135
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
136
     * 
137
     * @param cartId
138
     */
139
    public boolean checkOut(long cartId) throws ShoppingCartException, TException;
140
 
141
    /**
142
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
143
     * This methods removes the specified quantiry of the specified item from the cart.
144
     * 
145
     * @param cartId
146
     * @param items
147
     */
708 rajveer 148
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException;
688 chandransh 149
 
771 rajveer 150
    /**
151
     * Widgets
152
     * 
153
     * @param userId
154
     */
155
    public Widget getMyResearch(long userId) throws WidgetException, TException;
553 chandransh 156
 
771 rajveer 157
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 158
 
771 rajveer 159
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 160
 
771 rajveer 161
    public void updateBrowseHistory(long userId, long itemId) throws TException;
553 chandransh 162
 
771 rajveer 163
    public Widget getBrowseHistory(long userId) throws WidgetException, TException;
553 chandransh 164
 
771 rajveer 165
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException;
553 chandransh 166
 
1598 ankur.sing 167
    /**
168
     * Returns number of registered users.
169
     * If userType = null, then it returns count of all users, including anonymous
170
     * If userType = UserType.ANONYMOUS, then it returns count of anonymous users only
171
     * If userType = UserType.USER, then it returns count of non-anonymous users only
172
     * 
173
     * @param userType
174
     */
175
    public long getUserCount(UserType userType) throws TException;
176
 
48 ashish 177
  }
178
 
179
  public static class Client implements Iface {
180
    public Client(TProtocol prot)
181
    {
182
      this(prot, prot);
183
    }
184
 
185
    public Client(TProtocol iprot, TProtocol oprot)
186
    {
187
      iprot_ = iprot;
188
      oprot_ = oprot;
189
    }
190
 
191
    protected TProtocol iprot_;
192
    protected TProtocol oprot_;
193
 
194
    protected int seqid_;
195
 
196
    public TProtocol getInputProtocol()
197
    {
198
      return this.iprot_;
199
    }
200
 
201
    public TProtocol getOutputProtocol()
202
    {
203
      return this.oprot_;
204
    }
205
 
764 rajveer 206
    public void closeSession() throws TException
207
    {
208
      send_closeSession();
209
      recv_closeSession();
210
    }
211
 
212
    public void send_closeSession() throws TException
213
    {
214
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
215
      closeSession_args args = new closeSession_args();
216
      args.write(oprot_);
217
      oprot_.writeMessageEnd();
218
      oprot_.getTransport().flush();
219
    }
220
 
221
    public void recv_closeSession() throws TException
222
    {
223
      TMessage msg = iprot_.readMessageBegin();
224
      if (msg.type == TMessageType.EXCEPTION) {
225
        TApplicationException x = TApplicationException.read(iprot_);
226
        iprot_.readMessageEnd();
227
        throw x;
228
      }
229
      closeSession_result result = new closeSession_result();
230
      result.read(iprot_);
231
      iprot_.readMessageEnd();
232
      return;
233
    }
234
 
553 chandransh 235
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 236
    {
553 chandransh 237
      send_createAnonymousUser(jsessionId);
238
      return recv_createAnonymousUser();
48 ashish 239
    }
240
 
553 chandransh 241
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 242
    {
553 chandransh 243
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
244
      createAnonymousUser_args args = new createAnonymousUser_args();
245
      args.jsessionId = jsessionId;
48 ashish 246
      args.write(oprot_);
247
      oprot_.writeMessageEnd();
248
      oprot_.getTransport().flush();
249
    }
250
 
553 chandransh 251
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 252
    {
253
      TMessage msg = iprot_.readMessageBegin();
254
      if (msg.type == TMessageType.EXCEPTION) {
255
        TApplicationException x = TApplicationException.read(iprot_);
256
        iprot_.readMessageEnd();
257
        throw x;
258
      }
553 chandransh 259
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 260
      result.read(iprot_);
261
      iprot_.readMessageEnd();
262
      if (result.isSetSuccess()) {
263
        return result.success;
264
      }
553 chandransh 265
      if (result.ucex != null) {
266
        throw result.ucex;
48 ashish 267
      }
553 chandransh 268
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 269
    }
270
 
553 chandransh 271
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 272
    {
553 chandransh 273
      send_getUserById(userId);
274
      return recv_getUserById();
48 ashish 275
    }
276
 
553 chandransh 277
    public void send_getUserById(long userId) throws TException
48 ashish 278
    {
553 chandransh 279
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
280
      getUserById_args args = new getUserById_args();
48 ashish 281
      args.userId = userId;
282
      args.write(oprot_);
283
      oprot_.writeMessageEnd();
284
      oprot_.getTransport().flush();
285
    }
286
 
553 chandransh 287
    public User recv_getUserById() throws UserContextException, TException
48 ashish 288
    {
289
      TMessage msg = iprot_.readMessageBegin();
290
      if (msg.type == TMessageType.EXCEPTION) {
291
        TApplicationException x = TApplicationException.read(iprot_);
292
        iprot_.readMessageEnd();
293
        throw x;
294
      }
553 chandransh 295
      getUserById_result result = new getUserById_result();
48 ashish 296
      result.read(iprot_);
297
      iprot_.readMessageEnd();
298
      if (result.isSetSuccess()) {
299
        return result.success;
300
      }
553 chandransh 301
      if (result.ucex != null) {
302
        throw result.ucex;
48 ashish 303
      }
553 chandransh 304
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 305
    }
306
 
1491 vikas 307
    public User getUserByEmail(String email) throws UserContextException, TException
308
    {
309
      send_getUserByEmail(email);
310
      return recv_getUserByEmail();
311
    }
312
 
313
    public void send_getUserByEmail(String email) throws TException
314
    {
315
      oprot_.writeMessageBegin(new TMessage("getUserByEmail", TMessageType.CALL, seqid_));
316
      getUserByEmail_args args = new getUserByEmail_args();
317
      args.email = email;
318
      args.write(oprot_);
319
      oprot_.writeMessageEnd();
320
      oprot_.getTransport().flush();
321
    }
322
 
323
    public User recv_getUserByEmail() throws UserContextException, TException
324
    {
325
      TMessage msg = iprot_.readMessageBegin();
326
      if (msg.type == TMessageType.EXCEPTION) {
327
        TApplicationException x = TApplicationException.read(iprot_);
328
        iprot_.readMessageEnd();
329
        throw x;
330
      }
331
      getUserByEmail_result result = new getUserByEmail_result();
332
      result.read(iprot_);
333
      iprot_.readMessageEnd();
334
      if (result.isSetSuccess()) {
335
        return result.success;
336
      }
337
      if (result.ucex != null) {
338
        throw result.ucex;
339
      }
340
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserByEmail failed: unknown result");
341
    }
342
 
553 chandransh 343
    public User createUser(User user) throws UserContextException, TException
48 ashish 344
    {
553 chandransh 345
      send_createUser(user);
346
      return recv_createUser();
48 ashish 347
    }
348
 
553 chandransh 349
    public void send_createUser(User user) throws TException
48 ashish 350
    {
553 chandransh 351
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
352
      createUser_args args = new createUser_args();
353
      args.user = user;
48 ashish 354
      args.write(oprot_);
355
      oprot_.writeMessageEnd();
356
      oprot_.getTransport().flush();
357
    }
358
 
553 chandransh 359
    public User recv_createUser() throws UserContextException, TException
48 ashish 360
    {
361
      TMessage msg = iprot_.readMessageBegin();
362
      if (msg.type == TMessageType.EXCEPTION) {
363
        TApplicationException x = TApplicationException.read(iprot_);
364
        iprot_.readMessageEnd();
365
        throw x;
366
      }
553 chandransh 367
      createUser_result result = new createUser_result();
48 ashish 368
      result.read(iprot_);
369
      iprot_.readMessageEnd();
370
      if (result.isSetSuccess()) {
371
        return result.success;
372
      }
553 chandransh 373
      if (result.ucex != null) {
374
        throw result.ucex;
48 ashish 375
      }
553 chandransh 376
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 377
    }
378
 
553 chandransh 379
    public User updateUser(User user) throws UserContextException, TException
48 ashish 380
    {
553 chandransh 381
      send_updateUser(user);
382
      return recv_updateUser();
48 ashish 383
    }
384
 
553 chandransh 385
    public void send_updateUser(User user) throws TException
48 ashish 386
    {
553 chandransh 387
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
388
      updateUser_args args = new updateUser_args();
389
      args.user = user;
48 ashish 390
      args.write(oprot_);
391
      oprot_.writeMessageEnd();
392
      oprot_.getTransport().flush();
393
    }
394
 
553 chandransh 395
    public User recv_updateUser() throws UserContextException, TException
48 ashish 396
    {
397
      TMessage msg = iprot_.readMessageBegin();
398
      if (msg.type == TMessageType.EXCEPTION) {
399
        TApplicationException x = TApplicationException.read(iprot_);
400
        iprot_.readMessageEnd();
401
        throw x;
402
      }
553 chandransh 403
      updateUser_result result = new updateUser_result();
48 ashish 404
      result.read(iprot_);
405
      iprot_.readMessageEnd();
406
      if (result.isSetSuccess()) {
407
        return result.success;
408
      }
553 chandransh 409
      if (result.ucex != null) {
410
        throw result.ucex;
48 ashish 411
      }
553 chandransh 412
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 413
    }
414
 
553 chandransh 415
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 416
    {
553 chandransh 417
      send_deleteUser(userId);
418
      return recv_deleteUser();
48 ashish 419
    }
420
 
553 chandransh 421
    public void send_deleteUser(long userId) throws TException
48 ashish 422
    {
553 chandransh 423
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
424
      deleteUser_args args = new deleteUser_args();
48 ashish 425
      args.userId = userId;
426
      args.write(oprot_);
427
      oprot_.writeMessageEnd();
428
      oprot_.getTransport().flush();
429
    }
430
 
553 chandransh 431
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 432
    {
433
      TMessage msg = iprot_.readMessageBegin();
434
      if (msg.type == TMessageType.EXCEPTION) {
435
        TApplicationException x = TApplicationException.read(iprot_);
436
        iprot_.readMessageEnd();
437
        throw x;
438
      }
553 chandransh 439
      deleteUser_result result = new deleteUser_result();
48 ashish 440
      result.read(iprot_);
441
      iprot_.readMessageEnd();
442
      if (result.isSetSuccess()) {
443
        return result.success;
444
      }
553 chandransh 445
      if (result.ucex != null) {
446
        throw result.ucex;
48 ashish 447
      }
553 chandransh 448
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 449
    }
450
 
553 chandransh 451
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 452
    {
553 chandransh 453
      send_getUserState(userId);
454
      return recv_getUserState();
48 ashish 455
    }
456
 
553 chandransh 457
    public void send_getUserState(long userId) throws TException
48 ashish 458
    {
553 chandransh 459
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
460
      getUserState_args args = new getUserState_args();
48 ashish 461
      args.userId = userId;
462
      args.write(oprot_);
463
      oprot_.writeMessageEnd();
464
      oprot_.getTransport().flush();
465
    }
466
 
553 chandransh 467
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 468
    {
469
      TMessage msg = iprot_.readMessageBegin();
470
      if (msg.type == TMessageType.EXCEPTION) {
471
        TApplicationException x = TApplicationException.read(iprot_);
472
        iprot_.readMessageEnd();
473
        throw x;
474
      }
553 chandransh 475
      getUserState_result result = new getUserState_result();
48 ashish 476
      result.read(iprot_);
477
      iprot_.readMessageEnd();
478
      if (result.isSetSuccess()) {
479
        return result.success;
480
      }
553 chandransh 481
      if (result.ucex != null) {
482
        throw result.ucex;
48 ashish 483
      }
553 chandransh 484
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 485
    }
486
 
553 chandransh 487
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 488
    {
553 chandransh 489
      send_authenticateUser(email, password);
123 ashish 490
      return recv_authenticateUser();
491
    }
492
 
553 chandransh 493
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 494
    {
495
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
496
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 497
      args.email = email;
123 ashish 498
      args.password = password;
499
      args.write(oprot_);
500
      oprot_.writeMessageEnd();
501
      oprot_.getTransport().flush();
502
    }
503
 
553 chandransh 504
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 505
    {
506
      TMessage msg = iprot_.readMessageBegin();
507
      if (msg.type == TMessageType.EXCEPTION) {
508
        TApplicationException x = TApplicationException.read(iprot_);
509
        iprot_.readMessageEnd();
510
        throw x;
511
      }
512
      authenticateUser_result result = new authenticateUser_result();
513
      result.read(iprot_);
514
      iprot_.readMessageEnd();
515
      if (result.isSetSuccess()) {
516
        return result.success;
517
      }
553 chandransh 518
      if (result.auex != null) {
519
        throw result.auex;
123 ashish 520
      }
521
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
522
    }
523
 
48 ashish 524
    public boolean userExists(String email) throws UserContextException, TException
525
    {
526
      send_userExists(email);
527
      return recv_userExists();
528
    }
529
 
530
    public void send_userExists(String email) throws TException
531
    {
532
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
533
      userExists_args args = new userExists_args();
534
      args.email = email;
535
      args.write(oprot_);
536
      oprot_.writeMessageEnd();
537
      oprot_.getTransport().flush();
538
    }
539
 
540
    public boolean recv_userExists() throws UserContextException, TException
541
    {
542
      TMessage msg = iprot_.readMessageBegin();
543
      if (msg.type == TMessageType.EXCEPTION) {
544
        TApplicationException x = TApplicationException.read(iprot_);
545
        iprot_.readMessageEnd();
546
        throw x;
547
      }
548
      userExists_result result = new userExists_result();
549
      result.read(iprot_);
550
      iprot_.readMessageEnd();
551
      if (result.isSetSuccess()) {
552
        return result.success;
553
      }
554
      if (result.ucx != null) {
555
        throw result.ucx;
556
      }
557
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
558
    }
559
 
571 rajveer 560
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 561
    {
571 rajveer 562
      send_addAddressForUser(userId, address, setDefault);
48 ashish 563
      return recv_addAddressForUser();
564
    }
565
 
571 rajveer 566
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 567
    {
568
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
569
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 570
      args.userId = userId;
48 ashish 571
      args.address = address;
513 rajveer 572
      args.setDefault = setDefault;
48 ashish 573
      args.write(oprot_);
574
      oprot_.writeMessageEnd();
575
      oprot_.getTransport().flush();
576
    }
577
 
571 rajveer 578
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 579
    {
580
      TMessage msg = iprot_.readMessageBegin();
581
      if (msg.type == TMessageType.EXCEPTION) {
582
        TApplicationException x = TApplicationException.read(iprot_);
583
        iprot_.readMessageEnd();
584
        throw x;
585
      }
586
      addAddressForUser_result result = new addAddressForUser_result();
587
      result.read(iprot_);
588
      iprot_.readMessageEnd();
589
      if (result.isSetSuccess()) {
590
        return result.success;
591
      }
592
      if (result.ucx != null) {
593
        throw result.ucx;
594
      }
595
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
596
    }
597
 
598
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
599
    {
600
      send_removeAddressForUser(userid, addressId);
601
      return recv_removeAddressForUser();
602
    }
603
 
604
    public void send_removeAddressForUser(long userid, long addressId) throws TException
605
    {
606
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
607
      removeAddressForUser_args args = new removeAddressForUser_args();
608
      args.userid = userid;
609
      args.addressId = addressId;
610
      args.write(oprot_);
611
      oprot_.writeMessageEnd();
612
      oprot_.getTransport().flush();
613
    }
614
 
615
    public boolean recv_removeAddressForUser() throws UserContextException, TException
616
    {
617
      TMessage msg = iprot_.readMessageBegin();
618
      if (msg.type == TMessageType.EXCEPTION) {
619
        TApplicationException x = TApplicationException.read(iprot_);
620
        iprot_.readMessageEnd();
621
        throw x;
622
      }
623
      removeAddressForUser_result result = new removeAddressForUser_result();
624
      result.read(iprot_);
625
      iprot_.readMessageEnd();
626
      if (result.isSetSuccess()) {
627
        return result.success;
628
      }
629
      if (result.ucx != null) {
630
        throw result.ucx;
631
      }
632
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
633
    }
634
 
635
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
636
    {
637
      send_setUserAsLoggedIn(userId, timestamp);
638
      return recv_setUserAsLoggedIn();
639
    }
640
 
641
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
642
    {
643
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
644
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
645
      args.userId = userId;
646
      args.timestamp = timestamp;
647
      args.write(oprot_);
648
      oprot_.writeMessageEnd();
649
      oprot_.getTransport().flush();
650
    }
651
 
652
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
653
    {
654
      TMessage msg = iprot_.readMessageBegin();
655
      if (msg.type == TMessageType.EXCEPTION) {
656
        TApplicationException x = TApplicationException.read(iprot_);
657
        iprot_.readMessageEnd();
658
        throw x;
659
      }
660
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
661
      result.read(iprot_);
662
      iprot_.readMessageEnd();
663
      if (result.isSetSuccess()) {
664
        return result.success;
665
      }
666
      if (result.ucx != null) {
667
        throw result.ucx;
668
      }
669
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
670
    }
671
 
672
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
673
    {
674
      send_setUserAsLoggedOut(userid, timestamp);
675
      return recv_setUserAsLoggedOut();
676
    }
677
 
678
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
679
    {
680
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
681
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
682
      args.userid = userid;
683
      args.timestamp = timestamp;
684
      args.write(oprot_);
685
      oprot_.writeMessageEnd();
686
      oprot_.getTransport().flush();
687
    }
688
 
689
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
690
    {
691
      TMessage msg = iprot_.readMessageBegin();
692
      if (msg.type == TMessageType.EXCEPTION) {
693
        TApplicationException x = TApplicationException.read(iprot_);
694
        iprot_.readMessageEnd();
695
        throw x;
696
      }
697
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
698
      result.read(iprot_);
699
      iprot_.readMessageEnd();
700
      if (result.isSetSuccess()) {
701
        return result.success;
702
      }
703
      if (result.ucx != null) {
704
        throw result.ucx;
705
      }
706
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
707
    }
708
 
506 rajveer 709
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
710
    {
711
      send_setDefaultAddress(userid, addressId);
712
      return recv_setDefaultAddress();
713
    }
714
 
715
    public void send_setDefaultAddress(long userid, long addressId) throws TException
716
    {
717
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
718
      setDefaultAddress_args args = new setDefaultAddress_args();
719
      args.userid = userid;
720
      args.addressId = addressId;
721
      args.write(oprot_);
722
      oprot_.writeMessageEnd();
723
      oprot_.getTransport().flush();
724
    }
725
 
726
    public boolean recv_setDefaultAddress() throws UserContextException, TException
727
    {
728
      TMessage msg = iprot_.readMessageBegin();
729
      if (msg.type == TMessageType.EXCEPTION) {
730
        TApplicationException x = TApplicationException.read(iprot_);
731
        iprot_.readMessageEnd();
732
        throw x;
733
      }
734
      setDefaultAddress_result result = new setDefaultAddress_result();
735
      result.read(iprot_);
736
      iprot_.readMessageEnd();
737
      if (result.isSetSuccess()) {
738
        return result.success;
739
      }
740
      if (result.ucx != null) {
741
        throw result.ucx;
742
      }
743
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
744
    }
745
 
593 rajveer 746
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 747
    {
593 rajveer 748
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 749
      return recv_updatePassword();
750
    }
751
 
593 rajveer 752
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 753
    {
754
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
755
      updatePassword_args args = new updatePassword_args();
756
      args.userid = userid;
593 rajveer 757
      args.oldPassword = oldPassword;
758
      args.newPassword = newPassword;
48 ashish 759
      args.write(oprot_);
760
      oprot_.writeMessageEnd();
761
      oprot_.getTransport().flush();
762
    }
763
 
764
    public boolean recv_updatePassword() throws UserContextException, TException
765
    {
766
      TMessage msg = iprot_.readMessageBegin();
767
      if (msg.type == TMessageType.EXCEPTION) {
768
        TApplicationException x = TApplicationException.read(iprot_);
769
        iprot_.readMessageEnd();
770
        throw x;
771
      }
772
      updatePassword_result result = new updatePassword_result();
773
      result.read(iprot_);
774
      iprot_.readMessageEnd();
775
      if (result.isSetSuccess()) {
776
        return result.success;
777
      }
778
      if (result.ucx != null) {
779
        throw result.ucx;
780
      }
781
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
782
    }
783
 
896 rajveer 784
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException
582 rajveer 785
    {
896 rajveer 786
      send_forgotPassword(email, newPassword);
582 rajveer 787
      return recv_forgotPassword();
788
    }
789
 
896 rajveer 790
    public void send_forgotPassword(String email, String newPassword) throws TException
582 rajveer 791
    {
792
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
793
      forgotPassword_args args = new forgotPassword_args();
794
      args.email = email;
896 rajveer 795
      args.newPassword = newPassword;
582 rajveer 796
      args.write(oprot_);
797
      oprot_.writeMessageEnd();
798
      oprot_.getTransport().flush();
799
    }
800
 
801
    public boolean recv_forgotPassword() throws UserContextException, TException
802
    {
803
      TMessage msg = iprot_.readMessageBegin();
804
      if (msg.type == TMessageType.EXCEPTION) {
805
        TApplicationException x = TApplicationException.read(iprot_);
806
        iprot_.readMessageEnd();
807
        throw x;
808
      }
809
      forgotPassword_result result = new forgotPassword_result();
810
      result.read(iprot_);
811
      iprot_.readMessageEnd();
812
      if (result.isSetSuccess()) {
813
        return result.success;
814
      }
815
      if (result.ucx != null) {
816
        throw result.ucx;
817
      }
818
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
819
    }
820
 
593 rajveer 821
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
822
    {
823
      send_getAllAddressesForUser(userId);
824
      return recv_getAllAddressesForUser();
825
    }
826
 
827
    public void send_getAllAddressesForUser(long userId) throws TException
828
    {
829
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
830
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
831
      args.userId = userId;
832
      args.write(oprot_);
833
      oprot_.writeMessageEnd();
834
      oprot_.getTransport().flush();
835
    }
836
 
837
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
838
    {
839
      TMessage msg = iprot_.readMessageBegin();
840
      if (msg.type == TMessageType.EXCEPTION) {
841
        TApplicationException x = TApplicationException.read(iprot_);
842
        iprot_.readMessageEnd();
843
        throw x;
844
      }
845
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
846
      result.read(iprot_);
847
      iprot_.readMessageEnd();
848
      if (result.isSetSuccess()) {
849
        return result.success;
850
      }
851
      if (result.ucx != null) {
852
        throw result.ucx;
853
      }
854
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
855
    }
856
 
857
    public long getDefaultAddressId(long userId) throws UserContextException, TException
858
    {
859
      send_getDefaultAddressId(userId);
860
      return recv_getDefaultAddressId();
861
    }
862
 
863
    public void send_getDefaultAddressId(long userId) throws TException
864
    {
865
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
866
      getDefaultAddressId_args args = new getDefaultAddressId_args();
867
      args.userId = userId;
868
      args.write(oprot_);
869
      oprot_.writeMessageEnd();
870
      oprot_.getTransport().flush();
871
    }
872
 
873
    public long recv_getDefaultAddressId() throws UserContextException, TException
874
    {
875
      TMessage msg = iprot_.readMessageBegin();
876
      if (msg.type == TMessageType.EXCEPTION) {
877
        TApplicationException x = TApplicationException.read(iprot_);
878
        iprot_.readMessageEnd();
879
        throw x;
880
      }
881
      getDefaultAddressId_result result = new getDefaultAddressId_result();
882
      result.read(iprot_);
883
      iprot_.readMessageEnd();
884
      if (result.isSetSuccess()) {
885
        return result.success;
886
      }
887
      if (result.ucx != null) {
888
        throw result.ucx;
889
      }
890
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
891
    }
892
 
784 rajveer 893
    public String getDefaultPincode(long userId) throws UserContextException, TException
894
    {
895
      send_getDefaultPincode(userId);
896
      return recv_getDefaultPincode();
897
    }
898
 
899
    public void send_getDefaultPincode(long userId) throws TException
900
    {
901
      oprot_.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.CALL, seqid_));
902
      getDefaultPincode_args args = new getDefaultPincode_args();
903
      args.userId = userId;
904
      args.write(oprot_);
905
      oprot_.writeMessageEnd();
906
      oprot_.getTransport().flush();
907
    }
908
 
909
    public String recv_getDefaultPincode() throws UserContextException, TException
910
    {
911
      TMessage msg = iprot_.readMessageBegin();
912
      if (msg.type == TMessageType.EXCEPTION) {
913
        TApplicationException x = TApplicationException.read(iprot_);
914
        iprot_.readMessageEnd();
915
        throw x;
916
      }
917
      getDefaultPincode_result result = new getDefaultPincode_result();
918
      result.read(iprot_);
919
      iprot_.readMessageEnd();
920
      if (result.isSetSuccess()) {
921
        return result.success;
922
      }
923
      if (result.ucx != null) {
924
        throw result.ucx;
925
      }
926
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
927
    }
928
 
1177 varun.gupt 929
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException
930
    {
931
      send_saveUserCommunication(userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message);
932
      return recv_saveUserCommunication();
933
    }
934
 
935
    public void send_saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws TException
936
    {
937
      oprot_.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.CALL, seqid_));
938
      saveUserCommunication_args args = new saveUserCommunication_args();
939
      args.userId = userId;
940
      args.replyTo = replyTo;
941
      args.communicationType = communicationType;
942
      args.orderId = orderId;
943
      args.airwaybillNo = airwaybillNo;
944
      args.productName = productName;
945
      args.subject = subject;
946
      args.message = message;
947
      args.write(oprot_);
948
      oprot_.writeMessageEnd();
949
      oprot_.getTransport().flush();
950
    }
951
 
952
    public boolean recv_saveUserCommunication() throws UserCommunicationException, TException
953
    {
954
      TMessage msg = iprot_.readMessageBegin();
955
      if (msg.type == TMessageType.EXCEPTION) {
956
        TApplicationException x = TApplicationException.read(iprot_);
957
        iprot_.readMessageEnd();
958
        throw x;
959
      }
960
      saveUserCommunication_result result = new saveUserCommunication_result();
961
      result.read(iprot_);
962
      iprot_.readMessageEnd();
963
      if (result.isSetSuccess()) {
964
        return result.success;
965
      }
966
      if (result.ucx != null) {
967
        throw result.ucx;
968
      }
969
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "saveUserCommunication failed: unknown result");
970
    }
971
 
1590 varun.gupt 972
    public UserCommunication getUserCommunicationById(long id) throws UserCommunicationException, TException
973
    {
974
      send_getUserCommunicationById(id);
975
      return recv_getUserCommunicationById();
976
    }
977
 
978
    public void send_getUserCommunicationById(long id) throws TException
979
    {
980
      oprot_.writeMessageBegin(new TMessage("getUserCommunicationById", TMessageType.CALL, seqid_));
981
      getUserCommunicationById_args args = new getUserCommunicationById_args();
982
      args.id = id;
983
      args.write(oprot_);
984
      oprot_.writeMessageEnd();
985
      oprot_.getTransport().flush();
986
    }
987
 
988
    public UserCommunication recv_getUserCommunicationById() throws UserCommunicationException, TException
989
    {
990
      TMessage msg = iprot_.readMessageBegin();
991
      if (msg.type == TMessageType.EXCEPTION) {
992
        TApplicationException x = TApplicationException.read(iprot_);
993
        iprot_.readMessageEnd();
994
        throw x;
995
      }
996
      getUserCommunicationById_result result = new getUserCommunicationById_result();
997
      result.read(iprot_);
998
      iprot_.readMessageEnd();
999
      if (result.isSetSuccess()) {
1000
        return result.success;
1001
      }
1002
      if (result.ucx != null) {
1003
        throw result.ucx;
1004
      }
1005
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserCommunicationById failed: unknown result");
1006
    }
1007
 
1008
    public List<UserCommunication> getUserCommunicationByUser(long userId) throws UserCommunicationException, TException
1009
    {
1010
      send_getUserCommunicationByUser(userId);
1011
      return recv_getUserCommunicationByUser();
1012
    }
1013
 
1014
    public void send_getUserCommunicationByUser(long userId) throws TException
1015
    {
1016
      oprot_.writeMessageBegin(new TMessage("getUserCommunicationByUser", TMessageType.CALL, seqid_));
1017
      getUserCommunicationByUser_args args = new getUserCommunicationByUser_args();
1018
      args.userId = userId;
1019
      args.write(oprot_);
1020
      oprot_.writeMessageEnd();
1021
      oprot_.getTransport().flush();
1022
    }
1023
 
1024
    public List<UserCommunication> recv_getUserCommunicationByUser() throws UserCommunicationException, TException
1025
    {
1026
      TMessage msg = iprot_.readMessageBegin();
1027
      if (msg.type == TMessageType.EXCEPTION) {
1028
        TApplicationException x = TApplicationException.read(iprot_);
1029
        iprot_.readMessageEnd();
1030
        throw x;
1031
      }
1032
      getUserCommunicationByUser_result result = new getUserCommunicationByUser_result();
1033
      result.read(iprot_);
1034
      iprot_.readMessageEnd();
1035
      if (result.isSetSuccess()) {
1036
        return result.success;
1037
      }
1038
      if (result.ucx != null) {
1039
        throw result.ucx;
1040
      }
1041
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserCommunicationByUser failed: unknown result");
1042
    }
1043
 
1044
    public List<UserCommunication> getAllUserCommunications() throws UserCommunicationException, TException
1045
    {
1046
      send_getAllUserCommunications();
1047
      return recv_getAllUserCommunications();
1048
    }
1049
 
1050
    public void send_getAllUserCommunications() throws TException
1051
    {
1052
      oprot_.writeMessageBegin(new TMessage("getAllUserCommunications", TMessageType.CALL, seqid_));
1053
      getAllUserCommunications_args args = new getAllUserCommunications_args();
1054
      args.write(oprot_);
1055
      oprot_.writeMessageEnd();
1056
      oprot_.getTransport().flush();
1057
    }
1058
 
1059
    public List<UserCommunication> recv_getAllUserCommunications() throws UserCommunicationException, TException
1060
    {
1061
      TMessage msg = iprot_.readMessageBegin();
1062
      if (msg.type == TMessageType.EXCEPTION) {
1063
        TApplicationException x = TApplicationException.read(iprot_);
1064
        iprot_.readMessageEnd();
1065
        throw x;
1066
      }
1067
      getAllUserCommunications_result result = new getAllUserCommunications_result();
1068
      result.read(iprot_);
1069
      iprot_.readMessageEnd();
1070
      if (result.isSetSuccess()) {
1071
        return result.success;
1072
      }
1073
      if (result.ucx != null) {
1074
        throw result.ucx;
1075
      }
1076
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllUserCommunications failed: unknown result");
1077
    }
1078
 
553 chandransh 1079
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 1080
    {
553 chandransh 1081
      send_createCart(userId);
1082
      return recv_createCart();
48 ashish 1083
    }
1084
 
553 chandransh 1085
    public void send_createCart(long userId) throws TException
48 ashish 1086
    {
553 chandransh 1087
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
1088
      createCart_args args = new createCart_args();
1089
      args.userId = userId;
48 ashish 1090
      args.write(oprot_);
1091
      oprot_.writeMessageEnd();
1092
      oprot_.getTransport().flush();
1093
    }
1094
 
553 chandransh 1095
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 1096
    {
1097
      TMessage msg = iprot_.readMessageBegin();
1098
      if (msg.type == TMessageType.EXCEPTION) {
1099
        TApplicationException x = TApplicationException.read(iprot_);
1100
        iprot_.readMessageEnd();
1101
        throw x;
1102
      }
553 chandransh 1103
      createCart_result result = new createCart_result();
48 ashish 1104
      result.read(iprot_);
1105
      iprot_.readMessageEnd();
1106
      if (result.isSetSuccess()) {
1107
        return result.success;
1108
      }
553 chandransh 1109
      if (result.scx != null) {
1110
        throw result.scx;
48 ashish 1111
      }
553 chandransh 1112
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 1113
    }
1114
 
553 chandransh 1115
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 1116
    {
553 chandransh 1117
      send_getCurrentCart(userId);
1118
      return recv_getCurrentCart();
48 ashish 1119
    }
1120
 
553 chandransh 1121
    public void send_getCurrentCart(long userId) throws TException
48 ashish 1122
    {
553 chandransh 1123
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
1124
      getCurrentCart_args args = new getCurrentCart_args();
1125
      args.userId = userId;
48 ashish 1126
      args.write(oprot_);
1127
      oprot_.writeMessageEnd();
1128
      oprot_.getTransport().flush();
1129
    }
1130
 
553 chandransh 1131
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 1132
    {
1133
      TMessage msg = iprot_.readMessageBegin();
1134
      if (msg.type == TMessageType.EXCEPTION) {
1135
        TApplicationException x = TApplicationException.read(iprot_);
1136
        iprot_.readMessageEnd();
1137
        throw x;
1138
      }
553 chandransh 1139
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 1140
      result.read(iprot_);
1141
      iprot_.readMessageEnd();
1142
      if (result.isSetSuccess()) {
1143
        return result.success;
1144
      }
553 chandransh 1145
      if (result.scx != null) {
1146
        throw result.scx;
48 ashish 1147
      }
553 chandransh 1148
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 1149
    }
1150
 
553 chandransh 1151
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 1152
    {
553 chandransh 1153
      send_getCart(cartId);
1154
      return recv_getCart();
48 ashish 1155
    }
1156
 
553 chandransh 1157
    public void send_getCart(long cartId) throws TException
48 ashish 1158
    {
553 chandransh 1159
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
1160
      getCart_args args = new getCart_args();
1161
      args.cartId = cartId;
48 ashish 1162
      args.write(oprot_);
1163
      oprot_.writeMessageEnd();
1164
      oprot_.getTransport().flush();
1165
    }
1166
 
553 chandransh 1167
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 1168
    {
1169
      TMessage msg = iprot_.readMessageBegin();
1170
      if (msg.type == TMessageType.EXCEPTION) {
1171
        TApplicationException x = TApplicationException.read(iprot_);
1172
        iprot_.readMessageEnd();
1173
        throw x;
1174
      }
553 chandransh 1175
      getCart_result result = new getCart_result();
48 ashish 1176
      result.read(iprot_);
1177
      iprot_.readMessageEnd();
1178
      if (result.isSetSuccess()) {
1179
        return result.success;
1180
      }
553 chandransh 1181
      if (result.scx != null) {
1182
        throw result.scx;
48 ashish 1183
      }
553 chandransh 1184
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 1185
    }
1186
 
553 chandransh 1187
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 1188
    {
553 chandransh 1189
      send_getCartsForUser(userId, status);
1190
      return recv_getCartsForUser();
48 ashish 1191
    }
1192
 
553 chandransh 1193
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 1194
    {
553 chandransh 1195
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
1196
      getCartsForUser_args args = new getCartsForUser_args();
1197
      args.userId = userId;
1198
      args.status = status;
48 ashish 1199
      args.write(oprot_);
1200
      oprot_.writeMessageEnd();
1201
      oprot_.getTransport().flush();
1202
    }
1203
 
553 chandransh 1204
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 1205
    {
1206
      TMessage msg = iprot_.readMessageBegin();
1207
      if (msg.type == TMessageType.EXCEPTION) {
1208
        TApplicationException x = TApplicationException.read(iprot_);
1209
        iprot_.readMessageEnd();
1210
        throw x;
1211
      }
553 chandransh 1212
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 1213
      result.read(iprot_);
1214
      iprot_.readMessageEnd();
1215
      if (result.isSetSuccess()) {
1216
        return result.success;
1217
      }
553 chandransh 1218
      if (result.scx != null) {
1219
        throw result.scx;
48 ashish 1220
      }
553 chandransh 1221
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 1222
    }
1223
 
553 chandransh 1224
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 1225
    {
553 chandransh 1226
      send_getCartsByStatus(status);
1227
      return recv_getCartsByStatus();
48 ashish 1228
    }
1229
 
553 chandransh 1230
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 1231
    {
553 chandransh 1232
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
1233
      getCartsByStatus_args args = new getCartsByStatus_args();
1234
      args.status = status;
48 ashish 1235
      args.write(oprot_);
1236
      oprot_.writeMessageEnd();
1237
      oprot_.getTransport().flush();
1238
    }
1239
 
553 chandransh 1240
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 1241
    {
1242
      TMessage msg = iprot_.readMessageBegin();
1243
      if (msg.type == TMessageType.EXCEPTION) {
1244
        TApplicationException x = TApplicationException.read(iprot_);
1245
        iprot_.readMessageEnd();
1246
        throw x;
1247
      }
553 chandransh 1248
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 1249
      result.read(iprot_);
1250
      iprot_.readMessageEnd();
1251
      if (result.isSetSuccess()) {
1252
        return result.success;
1253
      }
553 chandransh 1254
      if (result.scx != null) {
1255
        throw result.scx;
48 ashish 1256
      }
553 chandransh 1257
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 1258
    }
1259
 
553 chandransh 1260
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 1261
    {
553 chandransh 1262
      send_getCartsByTime(from_time, to_time, status);
1263
      return recv_getCartsByTime();
48 ashish 1264
    }
1265
 
553 chandransh 1266
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 1267
    {
553 chandransh 1268
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
1269
      getCartsByTime_args args = new getCartsByTime_args();
1270
      args.from_time = from_time;
1271
      args.to_time = to_time;
1272
      args.status = status;
48 ashish 1273
      args.write(oprot_);
1274
      oprot_.writeMessageEnd();
1275
      oprot_.getTransport().flush();
1276
    }
1277
 
553 chandransh 1278
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 1279
    {
1280
      TMessage msg = iprot_.readMessageBegin();
1281
      if (msg.type == TMessageType.EXCEPTION) {
1282
        TApplicationException x = TApplicationException.read(iprot_);
1283
        iprot_.readMessageEnd();
1284
        throw x;
1285
      }
553 chandransh 1286
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 1287
      result.read(iprot_);
1288
      iprot_.readMessageEnd();
1289
      if (result.isSetSuccess()) {
1290
        return result.success;
1291
      }
553 chandransh 1292
      if (result.scx != null) {
1293
        throw result.scx;
48 ashish 1294
      }
553 chandransh 1295
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 1296
    }
1297
 
553 chandransh 1298
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 1299
    {
553 chandransh 1300
      send_changeCartStatus(cartId, status);
1301
      recv_changeCartStatus();
130 ashish 1302
    }
1303
 
553 chandransh 1304
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1305
    {
553 chandransh 1306
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1307
      changeCartStatus_args args = new changeCartStatus_args();
1308
      args.cartId = cartId;
1309
      args.status = status;
130 ashish 1310
      args.write(oprot_);
1311
      oprot_.writeMessageEnd();
1312
      oprot_.getTransport().flush();
1313
    }
1314
 
553 chandransh 1315
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 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
      }
553 chandransh 1323
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1324
      result.read(iprot_);
1325
      iprot_.readMessageEnd();
553 chandransh 1326
      if (result.scx != null) {
1327
        throw result.scx;
1328
      }
1329
      return;
1330
    }
1331
 
1332
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1333
    {
1334
      send_addItemToCart(cartId, itemId, quantity);
1335
      recv_addItemToCart();
1336
    }
1337
 
1338
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1339
    {
1340
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1341
      addItemToCart_args args = new addItemToCart_args();
1342
      args.cartId = cartId;
1343
      args.itemId = itemId;
1344
      args.quantity = quantity;
1345
      args.write(oprot_);
1346
      oprot_.writeMessageEnd();
1347
      oprot_.getTransport().flush();
1348
    }
1349
 
1350
    public void recv_addItemToCart() throws ShoppingCartException, TException
1351
    {
1352
      TMessage msg = iprot_.readMessageBegin();
1353
      if (msg.type == TMessageType.EXCEPTION) {
1354
        TApplicationException x = TApplicationException.read(iprot_);
1355
        iprot_.readMessageEnd();
1356
        throw x;
1357
      }
1358
      addItemToCart_result result = new addItemToCart_result();
1359
      result.read(iprot_);
1360
      iprot_.readMessageEnd();
1361
      if (result.scx != null) {
1362
        throw result.scx;
1363
      }
1364
      return;
1365
    }
1366
 
1367
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1368
    {
1369
      send_deleteItemFromCart(cartId, itemId);
1370
      recv_deleteItemFromCart();
1371
    }
1372
 
1373
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1374
    {
1375
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1376
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1377
      args.cartId = cartId;
1378
      args.itemId = itemId;
1379
      args.write(oprot_);
1380
      oprot_.writeMessageEnd();
1381
      oprot_.getTransport().flush();
1382
    }
1383
 
1384
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1385
    {
1386
      TMessage msg = iprot_.readMessageBegin();
1387
      if (msg.type == TMessageType.EXCEPTION) {
1388
        TApplicationException x = TApplicationException.read(iprot_);
1389
        iprot_.readMessageEnd();
1390
        throw x;
1391
      }
1392
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1393
      result.read(iprot_);
1394
      iprot_.readMessageEnd();
1395
      if (result.scx != null) {
1396
        throw result.scx;
1397
      }
1398
      return;
1399
    }
1400
 
1401
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1402
    {
1403
      send_changeQuantity(cartId, itemId, quantity);
1404
      recv_changeQuantity();
1405
    }
1406
 
1407
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1408
    {
1409
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1410
      changeQuantity_args args = new changeQuantity_args();
1411
      args.cartId = cartId;
1412
      args.itemId = itemId;
1413
      args.quantity = quantity;
1414
      args.write(oprot_);
1415
      oprot_.writeMessageEnd();
1416
      oprot_.getTransport().flush();
1417
    }
1418
 
1419
    public void recv_changeQuantity() throws ShoppingCartException, TException
1420
    {
1421
      TMessage msg = iprot_.readMessageBegin();
1422
      if (msg.type == TMessageType.EXCEPTION) {
1423
        TApplicationException x = TApplicationException.read(iprot_);
1424
        iprot_.readMessageEnd();
1425
        throw x;
1426
      }
1427
      changeQuantity_result result = new changeQuantity_result();
1428
      result.read(iprot_);
1429
      iprot_.readMessageEnd();
1430
      if (result.scx != null) {
1431
        throw result.scx;
1432
      }
1433
      return;
1434
    }
1435
 
1436
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1437
    {
1438
      send_changeItemStatus(cartId, itemId, status);
1439
      recv_changeItemStatus();
1440
    }
1441
 
1442
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1443
    {
1444
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1445
      changeItemStatus_args args = new changeItemStatus_args();
1446
      args.cartId = cartId;
1447
      args.itemId = itemId;
1448
      args.status = status;
1449
      args.write(oprot_);
1450
      oprot_.writeMessageEnd();
1451
      oprot_.getTransport().flush();
1452
    }
1453
 
1454
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1455
    {
1456
      TMessage msg = iprot_.readMessageBegin();
1457
      if (msg.type == TMessageType.EXCEPTION) {
1458
        TApplicationException x = TApplicationException.read(iprot_);
1459
        iprot_.readMessageEnd();
1460
        throw x;
1461
      }
1462
      changeItemStatus_result result = new changeItemStatus_result();
1463
      result.read(iprot_);
1464
      iprot_.readMessageEnd();
1465
      if (result.scx != null) {
1466
        throw result.scx;
1467
      }
1468
      return;
1469
    }
1470
 
578 chandransh 1471
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1472
    {
1473
      send_addAddressToCart(cartId, addressId);
1474
      recv_addAddressToCart();
1475
    }
1476
 
1477
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1478
    {
1479
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1480
      addAddressToCart_args args = new addAddressToCart_args();
1481
      args.cartId = cartId;
1482
      args.addressId = addressId;
1483
      args.write(oprot_);
1484
      oprot_.writeMessageEnd();
1485
      oprot_.getTransport().flush();
1486
    }
1487
 
578 chandransh 1488
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1489
    {
1490
      TMessage msg = iprot_.readMessageBegin();
1491
      if (msg.type == TMessageType.EXCEPTION) {
1492
        TApplicationException x = TApplicationException.read(iprot_);
1493
        iprot_.readMessageEnd();
1494
        throw x;
1495
      }
1496
      addAddressToCart_result result = new addAddressToCart_result();
1497
      result.read(iprot_);
1498
      iprot_.readMessageEnd();
578 chandransh 1499
      if (result.scx != null) {
1500
        throw result.scx;
1501
      }
553 chandransh 1502
      return;
1503
    }
1504
 
688 chandransh 1505
    public long createOrders(long cartId) throws ShoppingCartException, TException
553 chandransh 1506
    {
688 chandransh 1507
      send_createOrders(cartId);
1508
      return recv_createOrders();
553 chandransh 1509
    }
1510
 
688 chandransh 1511
    public void send_createOrders(long cartId) throws TException
553 chandransh 1512
    {
688 chandransh 1513
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1514
      createOrders_args args = new createOrders_args();
553 chandransh 1515
      args.cartId = cartId;
1516
      args.write(oprot_);
1517
      oprot_.writeMessageEnd();
1518
      oprot_.getTransport().flush();
1519
    }
1520
 
688 chandransh 1521
    public long recv_createOrders() throws ShoppingCartException, TException
553 chandransh 1522
    {
1523
      TMessage msg = iprot_.readMessageBegin();
1524
      if (msg.type == TMessageType.EXCEPTION) {
1525
        TApplicationException x = TApplicationException.read(iprot_);
1526
        iprot_.readMessageEnd();
1527
        throw x;
1528
      }
688 chandransh 1529
      createOrders_result result = new createOrders_result();
553 chandransh 1530
      result.read(iprot_);
1531
      iprot_.readMessageEnd();
130 ashish 1532
      if (result.isSetSuccess()) {
1533
        return result.success;
1534
      }
553 chandransh 1535
      if (result.scx != null) {
1536
        throw result.scx;
130 ashish 1537
      }
688 chandransh 1538
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
130 ashish 1539
    }
1540
 
1466 ankur.sing 1541
    public String validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1542
    {
553 chandransh 1543
      send_validateCart(cartId);
1544
      return recv_validateCart();
130 ashish 1545
    }
1546
 
553 chandransh 1547
    public void send_validateCart(long cartId) throws TException
130 ashish 1548
    {
553 chandransh 1549
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1550
      validateCart_args args = new validateCart_args();
1551
      args.cartId = cartId;
130 ashish 1552
      args.write(oprot_);
1553
      oprot_.writeMessageEnd();
1554
      oprot_.getTransport().flush();
1555
    }
1556
 
1466 ankur.sing 1557
    public String recv_validateCart() throws ShoppingCartException, TException
130 ashish 1558
    {
1559
      TMessage msg = iprot_.readMessageBegin();
1560
      if (msg.type == TMessageType.EXCEPTION) {
1561
        TApplicationException x = TApplicationException.read(iprot_);
1562
        iprot_.readMessageEnd();
1563
        throw x;
1564
      }
553 chandransh 1565
      validateCart_result result = new validateCart_result();
130 ashish 1566
      result.read(iprot_);
1567
      iprot_.readMessageEnd();
1568
      if (result.isSetSuccess()) {
1569
        return result.success;
1570
      }
578 chandransh 1571
      if (result.scex != null) {
1572
        throw result.scex;
1573
      }
553 chandransh 1574
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1575
    }
1576
 
688 chandransh 1577
    public void mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1578
    {
688 chandransh 1579
      send_mergeCart(fromCartId, toCartId);
1580
      recv_mergeCart();
578 chandransh 1581
    }
1582
 
688 chandransh 1583
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1584
    {
688 chandransh 1585
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1586
      mergeCart_args args = new mergeCart_args();
1587
      args.fromCartId = fromCartId;
1588
      args.toCartId = toCartId;
1589
      args.write(oprot_);
1590
      oprot_.writeMessageEnd();
1591
      oprot_.getTransport().flush();
1592
    }
1593
 
1594
    public void recv_mergeCart() throws TException
1595
    {
1596
      TMessage msg = iprot_.readMessageBegin();
1597
      if (msg.type == TMessageType.EXCEPTION) {
1598
        TApplicationException x = TApplicationException.read(iprot_);
1599
        iprot_.readMessageEnd();
1600
        throw x;
1601
      }
1602
      mergeCart_result result = new mergeCart_result();
1603
      result.read(iprot_);
1604
      iprot_.readMessageEnd();
1605
      return;
1606
    }
1607
 
1608
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1609
    {
1610
      send_checkOut(cartId);
1611
      return recv_checkOut();
1612
    }
1613
 
1614
    public void send_checkOut(long cartId) throws TException
1615
    {
1616
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1617
      checkOut_args args = new checkOut_args();
578 chandransh 1618
      args.cartId = cartId;
1619
      args.write(oprot_);
1620
      oprot_.writeMessageEnd();
1621
      oprot_.getTransport().flush();
1622
    }
1623
 
688 chandransh 1624
    public boolean recv_checkOut() throws ShoppingCartException, TException
578 chandransh 1625
    {
1626
      TMessage msg = iprot_.readMessageBegin();
1627
      if (msg.type == TMessageType.EXCEPTION) {
1628
        TApplicationException x = TApplicationException.read(iprot_);
1629
        iprot_.readMessageEnd();
1630
        throw x;
1631
      }
688 chandransh 1632
      checkOut_result result = new checkOut_result();
578 chandransh 1633
      result.read(iprot_);
1634
      iprot_.readMessageEnd();
1635
      if (result.isSetSuccess()) {
1636
        return result.success;
1637
      }
1638
      if (result.scex != null) {
1639
        throw result.scex;
1640
      }
688 chandransh 1641
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
578 chandransh 1642
    }
1643
 
708 rajveer 1644
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException
553 chandransh 1645
    {
688 chandransh 1646
      send_resetCart(cartId, items);
1647
      return recv_resetCart();
553 chandransh 1648
    }
1649
 
708 rajveer 1650
    public void send_resetCart(long cartId, Map<Long,Double> items) throws TException
553 chandransh 1651
    {
688 chandransh 1652
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1653
      resetCart_args args = new resetCart_args();
1654
      args.cartId = cartId;
1655
      args.items = items;
553 chandransh 1656
      args.write(oprot_);
1657
      oprot_.writeMessageEnd();
1658
      oprot_.getTransport().flush();
1659
    }
1660
 
688 chandransh 1661
    public boolean recv_resetCart() throws ShoppingCartException, TException
553 chandransh 1662
    {
1663
      TMessage msg = iprot_.readMessageBegin();
1664
      if (msg.type == TMessageType.EXCEPTION) {
1665
        TApplicationException x = TApplicationException.read(iprot_);
1666
        iprot_.readMessageEnd();
1667
        throw x;
130 ashish 1668
      }
688 chandransh 1669
      resetCart_result result = new resetCart_result();
553 chandransh 1670
      result.read(iprot_);
1671
      iprot_.readMessageEnd();
688 chandransh 1672
      if (result.isSetSuccess()) {
1673
        return result.success;
1674
      }
1675
      if (result.scex != null) {
1676
        throw result.scex;
1677
      }
1678
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
130 ashish 1679
    }
1680
 
771 rajveer 1681
    public Widget getMyResearch(long userId) throws WidgetException, TException
553 chandransh 1682
    {
771 rajveer 1683
      send_getMyResearch(userId);
553 chandransh 1684
      return recv_getMyResearch();
1685
    }
1686
 
771 rajveer 1687
    public void send_getMyResearch(long userId) throws TException
553 chandransh 1688
    {
1689
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1690
      getMyResearch_args args = new getMyResearch_args();
771 rajveer 1691
      args.userId = userId;
553 chandransh 1692
      args.write(oprot_);
1693
      oprot_.writeMessageEnd();
1694
      oprot_.getTransport().flush();
1695
    }
1696
 
1697
    public Widget recv_getMyResearch() throws WidgetException, TException
1698
    {
1699
      TMessage msg = iprot_.readMessageBegin();
1700
      if (msg.type == TMessageType.EXCEPTION) {
1701
        TApplicationException x = TApplicationException.read(iprot_);
1702
        iprot_.readMessageEnd();
1703
        throw x;
1704
      }
1705
      getMyResearch_result result = new getMyResearch_result();
1706
      result.read(iprot_);
1707
      iprot_.readMessageEnd();
1708
      if (result.isSetSuccess()) {
1709
        return result.success;
1710
      }
1711
      if (result.scx != null) {
1712
        throw result.scx;
1713
      }
1714
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1715
    }
1716
 
771 rajveer 1717
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1718
    {
771 rajveer 1719
      send_updateMyResearch(userId, itemId);
553 chandransh 1720
      return recv_updateMyResearch();
1721
    }
1722
 
771 rajveer 1723
    public void send_updateMyResearch(long userId, long itemId) throws TException
553 chandransh 1724
    {
1725
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1726
      updateMyResearch_args args = new updateMyResearch_args();
771 rajveer 1727
      args.userId = userId;
1728
      args.itemId = itemId;
553 chandransh 1729
      args.write(oprot_);
1730
      oprot_.writeMessageEnd();
1731
      oprot_.getTransport().flush();
1732
    }
1733
 
1734
    public boolean recv_updateMyResearch() throws WidgetException, TException
1735
    {
1736
      TMessage msg = iprot_.readMessageBegin();
1737
      if (msg.type == TMessageType.EXCEPTION) {
1738
        TApplicationException x = TApplicationException.read(iprot_);
1739
        iprot_.readMessageEnd();
1740
        throw x;
1741
      }
1742
      updateMyResearch_result result = new updateMyResearch_result();
1743
      result.read(iprot_);
1744
      iprot_.readMessageEnd();
1745
      if (result.isSetSuccess()) {
1746
        return result.success;
1747
      }
1748
      if (result.scx != null) {
1749
        throw result.scx;
1750
      }
1751
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1752
    }
1753
 
771 rajveer 1754
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1755
    {
771 rajveer 1756
      send_deleteItemFromMyResearch(userId, itemId);
553 chandransh 1757
      recv_deleteItemFromMyResearch();
1758
    }
1759
 
771 rajveer 1760
    public void send_deleteItemFromMyResearch(long userId, long itemId) throws TException
553 chandransh 1761
    {
1762
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1763
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
771 rajveer 1764
      args.userId = userId;
1765
      args.itemId = itemId;
553 chandransh 1766
      args.write(oprot_);
1767
      oprot_.writeMessageEnd();
1768
      oprot_.getTransport().flush();
1769
    }
1770
 
1771
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1772
    {
1773
      TMessage msg = iprot_.readMessageBegin();
1774
      if (msg.type == TMessageType.EXCEPTION) {
1775
        TApplicationException x = TApplicationException.read(iprot_);
1776
        iprot_.readMessageEnd();
1777
        throw x;
1778
      }
1779
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1780
      result.read(iprot_);
1781
      iprot_.readMessageEnd();
1782
      if (result.scx != null) {
1783
        throw result.scx;
1784
      }
1785
      return;
1786
    }
1787
 
771 rajveer 1788
    public void updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1789
    {
771 rajveer 1790
      send_updateBrowseHistory(userId, itemId);
1791
      recv_updateBrowseHistory();
553 chandransh 1792
    }
1793
 
771 rajveer 1794
    public void send_updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1795
    {
771 rajveer 1796
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1797
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1798
      args.userId = userId;
1799
      args.itemId = itemId;
553 chandransh 1800
      args.write(oprot_);
1801
      oprot_.writeMessageEnd();
1802
      oprot_.getTransport().flush();
1803
    }
1804
 
771 rajveer 1805
    public void recv_updateBrowseHistory() throws TException
553 chandransh 1806
    {
1807
      TMessage msg = iprot_.readMessageBegin();
1808
      if (msg.type == TMessageType.EXCEPTION) {
1809
        TApplicationException x = TApplicationException.read(iprot_);
1810
        iprot_.readMessageEnd();
1811
        throw x;
1812
      }
771 rajveer 1813
      updateBrowseHistory_result result = new updateBrowseHistory_result();
553 chandransh 1814
      result.read(iprot_);
1815
      iprot_.readMessageEnd();
1816
      return;
1817
    }
1818
 
771 rajveer 1819
    public Widget getBrowseHistory(long userId) throws WidgetException, TException
553 chandransh 1820
    {
771 rajveer 1821
      send_getBrowseHistory(userId);
1822
      return recv_getBrowseHistory();
553 chandransh 1823
    }
1824
 
771 rajveer 1825
    public void send_getBrowseHistory(long userId) throws TException
553 chandransh 1826
    {
771 rajveer 1827
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1828
      getBrowseHistory_args args = new getBrowseHistory_args();
1829
      args.userId = userId;
553 chandransh 1830
      args.write(oprot_);
1831
      oprot_.writeMessageEnd();
1832
      oprot_.getTransport().flush();
1833
    }
1834
 
771 rajveer 1835
    public Widget recv_getBrowseHistory() throws WidgetException, TException
553 chandransh 1836
    {
1837
      TMessage msg = iprot_.readMessageBegin();
1838
      if (msg.type == TMessageType.EXCEPTION) {
1839
        TApplicationException x = TApplicationException.read(iprot_);
1840
        iprot_.readMessageEnd();
1841
        throw x;
1842
      }
771 rajveer 1843
      getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 1844
      result.read(iprot_);
1845
      iprot_.readMessageEnd();
1846
      if (result.isSetSuccess()) {
1847
        return result.success;
1848
      }
1849
      if (result.scx != null) {
1850
        throw result.scx;
1851
      }
771 rajveer 1852
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
553 chandransh 1853
    }
1854
 
771 rajveer 1855
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1856
    {
771 rajveer 1857
      send_mergeBrowseHistory(fromUserId, toUserId);
1858
      recv_mergeBrowseHistory();
553 chandransh 1859
    }
1860
 
771 rajveer 1861
    public void send_mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1862
    {
771 rajveer 1863
      oprot_.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.CALL, seqid_));
1864
      mergeBrowseHistory_args args = new mergeBrowseHistory_args();
1865
      args.fromUserId = fromUserId;
1866
      args.toUserId = toUserId;
553 chandransh 1867
      args.write(oprot_);
1868
      oprot_.writeMessageEnd();
1869
      oprot_.getTransport().flush();
1870
    }
1871
 
771 rajveer 1872
    public void recv_mergeBrowseHistory() throws TException
553 chandransh 1873
    {
1874
      TMessage msg = iprot_.readMessageBegin();
1875
      if (msg.type == TMessageType.EXCEPTION) {
1876
        TApplicationException x = TApplicationException.read(iprot_);
1877
        iprot_.readMessageEnd();
1878
        throw x;
1879
      }
771 rajveer 1880
      mergeBrowseHistory_result result = new mergeBrowseHistory_result();
553 chandransh 1881
      result.read(iprot_);
1882
      iprot_.readMessageEnd();
1883
      return;
1884
    }
1885
 
1598 ankur.sing 1886
    public long getUserCount(UserType userType) throws TException
1887
    {
1888
      send_getUserCount(userType);
1889
      return recv_getUserCount();
1890
    }
1891
 
1892
    public void send_getUserCount(UserType userType) throws TException
1893
    {
1894
      oprot_.writeMessageBegin(new TMessage("getUserCount", TMessageType.CALL, seqid_));
1895
      getUserCount_args args = new getUserCount_args();
1896
      args.userType = userType;
1897
      args.write(oprot_);
1898
      oprot_.writeMessageEnd();
1899
      oprot_.getTransport().flush();
1900
    }
1901
 
1902
    public long recv_getUserCount() throws TException
1903
    {
1904
      TMessage msg = iprot_.readMessageBegin();
1905
      if (msg.type == TMessageType.EXCEPTION) {
1906
        TApplicationException x = TApplicationException.read(iprot_);
1907
        iprot_.readMessageEnd();
1908
        throw x;
1909
      }
1910
      getUserCount_result result = new getUserCount_result();
1911
      result.read(iprot_);
1912
      iprot_.readMessageEnd();
1913
      if (result.isSetSuccess()) {
1914
        return result.success;
1915
      }
1916
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserCount failed: unknown result");
1917
    }
1918
 
48 ashish 1919
  }
1920
  public static class Processor implements TProcessor {
1921
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1922
    public Processor(Iface iface)
1923
    {
1924
      iface_ = iface;
764 rajveer 1925
      processMap_.put("closeSession", new closeSession());
553 chandransh 1926
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1927
      processMap_.put("getUserById", new getUserById());
1491 vikas 1928
      processMap_.put("getUserByEmail", new getUserByEmail());
553 chandransh 1929
      processMap_.put("createUser", new createUser());
1930
      processMap_.put("updateUser", new updateUser());
1931
      processMap_.put("deleteUser", new deleteUser());
1932
      processMap_.put("getUserState", new getUserState());
123 ashish 1933
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1934
      processMap_.put("userExists", new userExists());
1935
      processMap_.put("addAddressForUser", new addAddressForUser());
1936
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1937
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1938
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1939
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1940
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1941
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1942
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1943
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
784 rajveer 1944
      processMap_.put("getDefaultPincode", new getDefaultPincode());
1177 varun.gupt 1945
      processMap_.put("saveUserCommunication", new saveUserCommunication());
1590 varun.gupt 1946
      processMap_.put("getUserCommunicationById", new getUserCommunicationById());
1947
      processMap_.put("getUserCommunicationByUser", new getUserCommunicationByUser());
1948
      processMap_.put("getAllUserCommunications", new getAllUserCommunications());
553 chandransh 1949
      processMap_.put("createCart", new createCart());
1950
      processMap_.put("getCurrentCart", new getCurrentCart());
1951
      processMap_.put("getCart", new getCart());
1952
      processMap_.put("getCartsForUser", new getCartsForUser());
1953
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1954
      processMap_.put("getCartsByTime", new getCartsByTime());
1955
      processMap_.put("changeCartStatus", new changeCartStatus());
1956
      processMap_.put("addItemToCart", new addItemToCart());
1957
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1958
      processMap_.put("changeQuantity", new changeQuantity());
1959
      processMap_.put("changeItemStatus", new changeItemStatus());
1960
      processMap_.put("addAddressToCart", new addAddressToCart());
688 chandransh 1961
      processMap_.put("createOrders", new createOrders());
553 chandransh 1962
      processMap_.put("validateCart", new validateCart());
1963
      processMap_.put("mergeCart", new mergeCart());
688 chandransh 1964
      processMap_.put("checkOut", new checkOut());
1965
      processMap_.put("resetCart", new resetCart());
553 chandransh 1966
      processMap_.put("getMyResearch", new getMyResearch());
1967
      processMap_.put("updateMyResearch", new updateMyResearch());
1968
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1969
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1970
      processMap_.put("getBrowseHistory", new getBrowseHistory());
771 rajveer 1971
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
1598 ankur.sing 1972
      processMap_.put("getUserCount", new getUserCount());
48 ashish 1973
    }
1974
 
1975
    protected static interface ProcessFunction {
1976
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1977
    }
1978
 
1979
    private Iface iface_;
1980
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1981
 
1982
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1983
    {
1984
      TMessage msg = iprot.readMessageBegin();
1985
      ProcessFunction fn = processMap_.get(msg.name);
1986
      if (fn == null) {
1987
        TProtocolUtil.skip(iprot, TType.STRUCT);
1988
        iprot.readMessageEnd();
1989
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1990
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1991
        x.write(oprot);
1992
        oprot.writeMessageEnd();
1993
        oprot.getTransport().flush();
1994
        return true;
1995
      }
1996
      fn.process(msg.seqid, iprot, oprot);
1997
      return true;
1998
    }
1999
 
764 rajveer 2000
    private class closeSession implements ProcessFunction {
2001
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2002
      {
2003
        closeSession_args args = new closeSession_args();
2004
        args.read(iprot);
2005
        iprot.readMessageEnd();
2006
        closeSession_result result = new closeSession_result();
2007
        iface_.closeSession();
2008
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
2009
        result.write(oprot);
2010
        oprot.writeMessageEnd();
2011
        oprot.getTransport().flush();
2012
      }
2013
 
2014
    }
2015
 
553 chandransh 2016
    private class createAnonymousUser implements ProcessFunction {
48 ashish 2017
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2018
      {
553 chandransh 2019
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 2020
        args.read(iprot);
2021
        iprot.readMessageEnd();
553 chandransh 2022
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 2023
        try {
553 chandransh 2024
          result.success = iface_.createAnonymousUser(args.jsessionId);
2025
        } catch (UserContextException ucex) {
2026
          result.ucex = ucex;
48 ashish 2027
        } catch (Throwable th) {
553 chandransh 2028
          LOGGER.error("Internal error processing createAnonymousUser", th);
2029
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
2030
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 2031
          x.write(oprot);
2032
          oprot.writeMessageEnd();
2033
          oprot.getTransport().flush();
2034
          return;
2035
        }
553 chandransh 2036
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 2037
        result.write(oprot);
2038
        oprot.writeMessageEnd();
2039
        oprot.getTransport().flush();
2040
      }
2041
 
2042
    }
2043
 
553 chandransh 2044
    private class getUserById implements ProcessFunction {
48 ashish 2045
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2046
      {
553 chandransh 2047
        getUserById_args args = new getUserById_args();
48 ashish 2048
        args.read(iprot);
2049
        iprot.readMessageEnd();
553 chandransh 2050
        getUserById_result result = new getUserById_result();
48 ashish 2051
        try {
553 chandransh 2052
          result.success = iface_.getUserById(args.userId);
2053
        } catch (UserContextException ucex) {
2054
          result.ucex = ucex;
48 ashish 2055
        } catch (Throwable th) {
553 chandransh 2056
          LOGGER.error("Internal error processing getUserById", th);
2057
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
2058
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 2059
          x.write(oprot);
2060
          oprot.writeMessageEnd();
2061
          oprot.getTransport().flush();
2062
          return;
2063
        }
553 chandransh 2064
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 2065
        result.write(oprot);
2066
        oprot.writeMessageEnd();
2067
        oprot.getTransport().flush();
2068
      }
2069
 
2070
    }
2071
 
1491 vikas 2072
    private class getUserByEmail implements ProcessFunction {
2073
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2074
      {
2075
        getUserByEmail_args args = new getUserByEmail_args();
2076
        args.read(iprot);
2077
        iprot.readMessageEnd();
2078
        getUserByEmail_result result = new getUserByEmail_result();
2079
        try {
2080
          result.success = iface_.getUserByEmail(args.email);
2081
        } catch (UserContextException ucex) {
2082
          result.ucex = ucex;
2083
        } catch (Throwable th) {
2084
          LOGGER.error("Internal error processing getUserByEmail", th);
2085
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserByEmail");
2086
          oprot.writeMessageBegin(new TMessage("getUserByEmail", TMessageType.EXCEPTION, seqid));
2087
          x.write(oprot);
2088
          oprot.writeMessageEnd();
2089
          oprot.getTransport().flush();
2090
          return;
2091
        }
2092
        oprot.writeMessageBegin(new TMessage("getUserByEmail", TMessageType.REPLY, seqid));
2093
        result.write(oprot);
2094
        oprot.writeMessageEnd();
2095
        oprot.getTransport().flush();
2096
      }
2097
 
2098
    }
2099
 
553 chandransh 2100
    private class createUser implements ProcessFunction {
48 ashish 2101
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2102
      {
553 chandransh 2103
        createUser_args args = new createUser_args();
48 ashish 2104
        args.read(iprot);
2105
        iprot.readMessageEnd();
553 chandransh 2106
        createUser_result result = new createUser_result();
48 ashish 2107
        try {
553 chandransh 2108
          result.success = iface_.createUser(args.user);
2109
        } catch (UserContextException ucex) {
2110
          result.ucex = ucex;
48 ashish 2111
        } catch (Throwable th) {
553 chandransh 2112
          LOGGER.error("Internal error processing createUser", th);
2113
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
2114
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 2115
          x.write(oprot);
2116
          oprot.writeMessageEnd();
2117
          oprot.getTransport().flush();
2118
          return;
2119
        }
553 chandransh 2120
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 2121
        result.write(oprot);
2122
        oprot.writeMessageEnd();
2123
        oprot.getTransport().flush();
2124
      }
2125
 
2126
    }
2127
 
553 chandransh 2128
    private class updateUser implements ProcessFunction {
48 ashish 2129
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2130
      {
553 chandransh 2131
        updateUser_args args = new updateUser_args();
48 ashish 2132
        args.read(iprot);
2133
        iprot.readMessageEnd();
553 chandransh 2134
        updateUser_result result = new updateUser_result();
48 ashish 2135
        try {
553 chandransh 2136
          result.success = iface_.updateUser(args.user);
2137
        } catch (UserContextException ucex) {
2138
          result.ucex = ucex;
48 ashish 2139
        } catch (Throwable th) {
553 chandransh 2140
          LOGGER.error("Internal error processing updateUser", th);
2141
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
2142
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 2143
          x.write(oprot);
2144
          oprot.writeMessageEnd();
2145
          oprot.getTransport().flush();
2146
          return;
2147
        }
553 chandransh 2148
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 2149
        result.write(oprot);
2150
        oprot.writeMessageEnd();
2151
        oprot.getTransport().flush();
2152
      }
2153
 
2154
    }
2155
 
553 chandransh 2156
    private class deleteUser implements ProcessFunction {
48 ashish 2157
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2158
      {
553 chandransh 2159
        deleteUser_args args = new deleteUser_args();
48 ashish 2160
        args.read(iprot);
2161
        iprot.readMessageEnd();
553 chandransh 2162
        deleteUser_result result = new deleteUser_result();
48 ashish 2163
        try {
553 chandransh 2164
          result.success = iface_.deleteUser(args.userId);
2165
          result.setSuccessIsSet(true);
2166
        } catch (UserContextException ucex) {
2167
          result.ucex = ucex;
48 ashish 2168
        } catch (Throwable th) {
553 chandransh 2169
          LOGGER.error("Internal error processing deleteUser", th);
2170
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
2171
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 2172
          x.write(oprot);
2173
          oprot.writeMessageEnd();
2174
          oprot.getTransport().flush();
2175
          return;
2176
        }
553 chandransh 2177
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 2178
        result.write(oprot);
2179
        oprot.writeMessageEnd();
2180
        oprot.getTransport().flush();
2181
      }
2182
 
2183
    }
2184
 
553 chandransh 2185
    private class getUserState implements ProcessFunction {
48 ashish 2186
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2187
      {
553 chandransh 2188
        getUserState_args args = new getUserState_args();
48 ashish 2189
        args.read(iprot);
2190
        iprot.readMessageEnd();
553 chandransh 2191
        getUserState_result result = new getUserState_result();
48 ashish 2192
        try {
553 chandransh 2193
          result.success = iface_.getUserState(args.userId);
2194
        } catch (UserContextException ucex) {
2195
          result.ucex = ucex;
48 ashish 2196
        } catch (Throwable th) {
553 chandransh 2197
          LOGGER.error("Internal error processing getUserState", th);
2198
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
2199
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 2200
          x.write(oprot);
2201
          oprot.writeMessageEnd();
2202
          oprot.getTransport().flush();
2203
          return;
2204
        }
553 chandransh 2205
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 2206
        result.write(oprot);
2207
        oprot.writeMessageEnd();
2208
        oprot.getTransport().flush();
2209
      }
2210
 
2211
    }
2212
 
123 ashish 2213
    private class authenticateUser implements ProcessFunction {
2214
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2215
      {
2216
        authenticateUser_args args = new authenticateUser_args();
2217
        args.read(iprot);
2218
        iprot.readMessageEnd();
2219
        authenticateUser_result result = new authenticateUser_result();
2220
        try {
553 chandransh 2221
          result.success = iface_.authenticateUser(args.email, args.password);
2222
        } catch (AuthenticationException auex) {
2223
          result.auex = auex;
123 ashish 2224
        } catch (Throwable th) {
2225
          LOGGER.error("Internal error processing authenticateUser", th);
2226
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
2227
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
2228
          x.write(oprot);
2229
          oprot.writeMessageEnd();
2230
          oprot.getTransport().flush();
2231
          return;
2232
        }
2233
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
2234
        result.write(oprot);
2235
        oprot.writeMessageEnd();
2236
        oprot.getTransport().flush();
2237
      }
2238
 
2239
    }
2240
 
48 ashish 2241
    private class userExists implements ProcessFunction {
2242
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2243
      {
2244
        userExists_args args = new userExists_args();
2245
        args.read(iprot);
2246
        iprot.readMessageEnd();
2247
        userExists_result result = new userExists_result();
2248
        try {
2249
          result.success = iface_.userExists(args.email);
2250
          result.setSuccessIsSet(true);
2251
        } catch (UserContextException ucx) {
2252
          result.ucx = ucx;
2253
        } catch (Throwable th) {
2254
          LOGGER.error("Internal error processing userExists", th);
2255
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
2256
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
2257
          x.write(oprot);
2258
          oprot.writeMessageEnd();
2259
          oprot.getTransport().flush();
2260
          return;
2261
        }
2262
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
2263
        result.write(oprot);
2264
        oprot.writeMessageEnd();
2265
        oprot.getTransport().flush();
2266
      }
2267
 
2268
    }
2269
 
2270
    private class addAddressForUser implements ProcessFunction {
2271
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2272
      {
2273
        addAddressForUser_args args = new addAddressForUser_args();
2274
        args.read(iprot);
2275
        iprot.readMessageEnd();
2276
        addAddressForUser_result result = new addAddressForUser_result();
2277
        try {
571 rajveer 2278
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2279
          result.setSuccessIsSet(true);
2280
        } catch (UserContextException ucx) {
2281
          result.ucx = ucx;
2282
        } catch (Throwable th) {
2283
          LOGGER.error("Internal error processing addAddressForUser", th);
2284
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2285
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2286
          x.write(oprot);
2287
          oprot.writeMessageEnd();
2288
          oprot.getTransport().flush();
2289
          return;
2290
        }
2291
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2292
        result.write(oprot);
2293
        oprot.writeMessageEnd();
2294
        oprot.getTransport().flush();
2295
      }
2296
 
2297
    }
2298
 
2299
    private class removeAddressForUser implements ProcessFunction {
2300
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2301
      {
2302
        removeAddressForUser_args args = new removeAddressForUser_args();
2303
        args.read(iprot);
2304
        iprot.readMessageEnd();
2305
        removeAddressForUser_result result = new removeAddressForUser_result();
2306
        try {
2307
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2308
          result.setSuccessIsSet(true);
2309
        } catch (UserContextException ucx) {
2310
          result.ucx = ucx;
2311
        } catch (Throwable th) {
2312
          LOGGER.error("Internal error processing removeAddressForUser", th);
2313
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2314
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2315
          x.write(oprot);
2316
          oprot.writeMessageEnd();
2317
          oprot.getTransport().flush();
2318
          return;
2319
        }
2320
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2321
        result.write(oprot);
2322
        oprot.writeMessageEnd();
2323
        oprot.getTransport().flush();
2324
      }
2325
 
2326
    }
2327
 
2328
    private class setUserAsLoggedIn implements ProcessFunction {
2329
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2330
      {
2331
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2332
        args.read(iprot);
2333
        iprot.readMessageEnd();
2334
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2335
        try {
2336
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2337
          result.setSuccessIsSet(true);
2338
        } catch (UserContextException ucx) {
2339
          result.ucx = ucx;
2340
        } catch (Throwable th) {
2341
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2342
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2343
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2344
          x.write(oprot);
2345
          oprot.writeMessageEnd();
2346
          oprot.getTransport().flush();
2347
          return;
2348
        }
2349
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2350
        result.write(oprot);
2351
        oprot.writeMessageEnd();
2352
        oprot.getTransport().flush();
2353
      }
2354
 
2355
    }
2356
 
2357
    private class setUserAsLoggedOut implements ProcessFunction {
2358
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2359
      {
2360
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2361
        args.read(iprot);
2362
        iprot.readMessageEnd();
2363
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2364
        try {
2365
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2366
          result.setSuccessIsSet(true);
2367
        } catch (UserContextException ucx) {
2368
          result.ucx = ucx;
2369
        } catch (Throwable th) {
2370
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2371
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2372
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2373
          x.write(oprot);
2374
          oprot.writeMessageEnd();
2375
          oprot.getTransport().flush();
2376
          return;
2377
        }
2378
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2379
        result.write(oprot);
2380
        oprot.writeMessageEnd();
2381
        oprot.getTransport().flush();
2382
      }
2383
 
2384
    }
2385
 
506 rajveer 2386
    private class setDefaultAddress implements ProcessFunction {
2387
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2388
      {
2389
        setDefaultAddress_args args = new setDefaultAddress_args();
2390
        args.read(iprot);
2391
        iprot.readMessageEnd();
2392
        setDefaultAddress_result result = new setDefaultAddress_result();
2393
        try {
2394
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2395
          result.setSuccessIsSet(true);
2396
        } catch (UserContextException ucx) {
2397
          result.ucx = ucx;
2398
        } catch (Throwable th) {
2399
          LOGGER.error("Internal error processing setDefaultAddress", th);
2400
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2401
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2402
          x.write(oprot);
2403
          oprot.writeMessageEnd();
2404
          oprot.getTransport().flush();
2405
          return;
2406
        }
2407
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2408
        result.write(oprot);
2409
        oprot.writeMessageEnd();
2410
        oprot.getTransport().flush();
2411
      }
2412
 
2413
    }
2414
 
48 ashish 2415
    private class updatePassword implements ProcessFunction {
2416
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2417
      {
2418
        updatePassword_args args = new updatePassword_args();
2419
        args.read(iprot);
2420
        iprot.readMessageEnd();
2421
        updatePassword_result result = new updatePassword_result();
2422
        try {
593 rajveer 2423
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2424
          result.setSuccessIsSet(true);
2425
        } catch (UserContextException ucx) {
2426
          result.ucx = ucx;
2427
        } catch (Throwable th) {
2428
          LOGGER.error("Internal error processing updatePassword", th);
2429
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2430
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2431
          x.write(oprot);
2432
          oprot.writeMessageEnd();
2433
          oprot.getTransport().flush();
2434
          return;
2435
        }
2436
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2437
        result.write(oprot);
2438
        oprot.writeMessageEnd();
2439
        oprot.getTransport().flush();
2440
      }
2441
 
2442
    }
2443
 
582 rajveer 2444
    private class forgotPassword implements ProcessFunction {
2445
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2446
      {
2447
        forgotPassword_args args = new forgotPassword_args();
2448
        args.read(iprot);
2449
        iprot.readMessageEnd();
2450
        forgotPassword_result result = new forgotPassword_result();
2451
        try {
896 rajveer 2452
          result.success = iface_.forgotPassword(args.email, args.newPassword);
582 rajveer 2453
          result.setSuccessIsSet(true);
2454
        } catch (UserContextException ucx) {
2455
          result.ucx = ucx;
2456
        } catch (Throwable th) {
2457
          LOGGER.error("Internal error processing forgotPassword", th);
2458
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2459
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2460
          x.write(oprot);
2461
          oprot.writeMessageEnd();
2462
          oprot.getTransport().flush();
2463
          return;
2464
        }
2465
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2466
        result.write(oprot);
2467
        oprot.writeMessageEnd();
2468
        oprot.getTransport().flush();
2469
      }
2470
 
2471
    }
2472
 
593 rajveer 2473
    private class getAllAddressesForUser implements ProcessFunction {
2474
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2475
      {
2476
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2477
        args.read(iprot);
2478
        iprot.readMessageEnd();
2479
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2480
        try {
2481
          result.success = iface_.getAllAddressesForUser(args.userId);
2482
        } catch (UserContextException ucx) {
2483
          result.ucx = ucx;
2484
        } catch (Throwable th) {
2485
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2486
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2487
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2488
          x.write(oprot);
2489
          oprot.writeMessageEnd();
2490
          oprot.getTransport().flush();
2491
          return;
2492
        }
2493
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2494
        result.write(oprot);
2495
        oprot.writeMessageEnd();
2496
        oprot.getTransport().flush();
2497
      }
2498
 
2499
    }
2500
 
2501
    private class getDefaultAddressId implements ProcessFunction {
2502
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2503
      {
2504
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2505
        args.read(iprot);
2506
        iprot.readMessageEnd();
2507
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2508
        try {
2509
          result.success = iface_.getDefaultAddressId(args.userId);
2510
          result.setSuccessIsSet(true);
2511
        } catch (UserContextException ucx) {
2512
          result.ucx = ucx;
2513
        } catch (Throwable th) {
2514
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2515
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2516
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2517
          x.write(oprot);
2518
          oprot.writeMessageEnd();
2519
          oprot.getTransport().flush();
2520
          return;
2521
        }
2522
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2523
        result.write(oprot);
2524
        oprot.writeMessageEnd();
2525
        oprot.getTransport().flush();
2526
      }
2527
 
2528
    }
2529
 
784 rajveer 2530
    private class getDefaultPincode implements ProcessFunction {
2531
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2532
      {
2533
        getDefaultPincode_args args = new getDefaultPincode_args();
2534
        args.read(iprot);
2535
        iprot.readMessageEnd();
2536
        getDefaultPincode_result result = new getDefaultPincode_result();
2537
        try {
2538
          result.success = iface_.getDefaultPincode(args.userId);
2539
        } catch (UserContextException ucx) {
2540
          result.ucx = ucx;
2541
        } catch (Throwable th) {
2542
          LOGGER.error("Internal error processing getDefaultPincode", th);
2543
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultPincode");
2544
          oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.EXCEPTION, seqid));
2545
          x.write(oprot);
2546
          oprot.writeMessageEnd();
2547
          oprot.getTransport().flush();
2548
          return;
2549
        }
2550
        oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.REPLY, seqid));
2551
        result.write(oprot);
2552
        oprot.writeMessageEnd();
2553
        oprot.getTransport().flush();
2554
      }
2555
 
2556
    }
2557
 
1177 varun.gupt 2558
    private class saveUserCommunication implements ProcessFunction {
2559
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2560
      {
2561
        saveUserCommunication_args args = new saveUserCommunication_args();
2562
        args.read(iprot);
2563
        iprot.readMessageEnd();
2564
        saveUserCommunication_result result = new saveUserCommunication_result();
2565
        try {
2566
          result.success = iface_.saveUserCommunication(args.userId, args.replyTo, args.communicationType, args.orderId, args.airwaybillNo, args.productName, args.subject, args.message);
2567
          result.setSuccessIsSet(true);
2568
        } catch (UserCommunicationException ucx) {
2569
          result.ucx = ucx;
2570
        } catch (Throwable th) {
2571
          LOGGER.error("Internal error processing saveUserCommunication", th);
2572
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing saveUserCommunication");
2573
          oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.EXCEPTION, seqid));
2574
          x.write(oprot);
2575
          oprot.writeMessageEnd();
2576
          oprot.getTransport().flush();
2577
          return;
2578
        }
2579
        oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.REPLY, seqid));
2580
        result.write(oprot);
2581
        oprot.writeMessageEnd();
2582
        oprot.getTransport().flush();
2583
      }
2584
 
2585
    }
2586
 
1590 varun.gupt 2587
    private class getUserCommunicationById implements ProcessFunction {
2588
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2589
      {
2590
        getUserCommunicationById_args args = new getUserCommunicationById_args();
2591
        args.read(iprot);
2592
        iprot.readMessageEnd();
2593
        getUserCommunicationById_result result = new getUserCommunicationById_result();
2594
        try {
2595
          result.success = iface_.getUserCommunicationById(args.id);
2596
        } catch (UserCommunicationException ucx) {
2597
          result.ucx = ucx;
2598
        } catch (Throwable th) {
2599
          LOGGER.error("Internal error processing getUserCommunicationById", th);
2600
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserCommunicationById");
2601
          oprot.writeMessageBegin(new TMessage("getUserCommunicationById", TMessageType.EXCEPTION, seqid));
2602
          x.write(oprot);
2603
          oprot.writeMessageEnd();
2604
          oprot.getTransport().flush();
2605
          return;
2606
        }
2607
        oprot.writeMessageBegin(new TMessage("getUserCommunicationById", TMessageType.REPLY, seqid));
2608
        result.write(oprot);
2609
        oprot.writeMessageEnd();
2610
        oprot.getTransport().flush();
2611
      }
2612
 
2613
    }
2614
 
2615
    private class getUserCommunicationByUser implements ProcessFunction {
2616
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2617
      {
2618
        getUserCommunicationByUser_args args = new getUserCommunicationByUser_args();
2619
        args.read(iprot);
2620
        iprot.readMessageEnd();
2621
        getUserCommunicationByUser_result result = new getUserCommunicationByUser_result();
2622
        try {
2623
          result.success = iface_.getUserCommunicationByUser(args.userId);
2624
        } catch (UserCommunicationException ucx) {
2625
          result.ucx = ucx;
2626
        } catch (Throwable th) {
2627
          LOGGER.error("Internal error processing getUserCommunicationByUser", th);
2628
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserCommunicationByUser");
2629
          oprot.writeMessageBegin(new TMessage("getUserCommunicationByUser", TMessageType.EXCEPTION, seqid));
2630
          x.write(oprot);
2631
          oprot.writeMessageEnd();
2632
          oprot.getTransport().flush();
2633
          return;
2634
        }
2635
        oprot.writeMessageBegin(new TMessage("getUserCommunicationByUser", TMessageType.REPLY, seqid));
2636
        result.write(oprot);
2637
        oprot.writeMessageEnd();
2638
        oprot.getTransport().flush();
2639
      }
2640
 
2641
    }
2642
 
2643
    private class getAllUserCommunications implements ProcessFunction {
2644
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2645
      {
2646
        getAllUserCommunications_args args = new getAllUserCommunications_args();
2647
        args.read(iprot);
2648
        iprot.readMessageEnd();
2649
        getAllUserCommunications_result result = new getAllUserCommunications_result();
2650
        try {
2651
          result.success = iface_.getAllUserCommunications();
2652
        } catch (UserCommunicationException ucx) {
2653
          result.ucx = ucx;
2654
        } catch (Throwable th) {
2655
          LOGGER.error("Internal error processing getAllUserCommunications", th);
2656
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllUserCommunications");
2657
          oprot.writeMessageBegin(new TMessage("getAllUserCommunications", TMessageType.EXCEPTION, seqid));
2658
          x.write(oprot);
2659
          oprot.writeMessageEnd();
2660
          oprot.getTransport().flush();
2661
          return;
2662
        }
2663
        oprot.writeMessageBegin(new TMessage("getAllUserCommunications", TMessageType.REPLY, seqid));
2664
        result.write(oprot);
2665
        oprot.writeMessageEnd();
2666
        oprot.getTransport().flush();
2667
      }
2668
 
2669
    }
2670
 
553 chandransh 2671
    private class createCart implements ProcessFunction {
48 ashish 2672
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2673
      {
553 chandransh 2674
        createCart_args args = new createCart_args();
48 ashish 2675
        args.read(iprot);
2676
        iprot.readMessageEnd();
553 chandransh 2677
        createCart_result result = new createCart_result();
48 ashish 2678
        try {
553 chandransh 2679
          result.success = iface_.createCart(args.userId);
48 ashish 2680
          result.setSuccessIsSet(true);
553 chandransh 2681
        } catch (ShoppingCartException scx) {
2682
          result.scx = scx;
48 ashish 2683
        } catch (Throwable th) {
553 chandransh 2684
          LOGGER.error("Internal error processing createCart", th);
2685
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2686
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2687
          x.write(oprot);
2688
          oprot.writeMessageEnd();
2689
          oprot.getTransport().flush();
2690
          return;
2691
        }
553 chandransh 2692
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2693
        result.write(oprot);
2694
        oprot.writeMessageEnd();
2695
        oprot.getTransport().flush();
2696
      }
2697
 
2698
    }
2699
 
553 chandransh 2700
    private class getCurrentCart implements ProcessFunction {
48 ashish 2701
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2702
      {
553 chandransh 2703
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2704
        args.read(iprot);
2705
        iprot.readMessageEnd();
553 chandransh 2706
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2707
        try {
553 chandransh 2708
          result.success = iface_.getCurrentCart(args.userId);
2709
        } catch (ShoppingCartException scx) {
2710
          result.scx = scx;
48 ashish 2711
        } catch (Throwable th) {
553 chandransh 2712
          LOGGER.error("Internal error processing getCurrentCart", th);
2713
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2714
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2715
          x.write(oprot);
2716
          oprot.writeMessageEnd();
2717
          oprot.getTransport().flush();
2718
          return;
2719
        }
553 chandransh 2720
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2721
        result.write(oprot);
2722
        oprot.writeMessageEnd();
2723
        oprot.getTransport().flush();
2724
      }
2725
 
2726
    }
2727
 
553 chandransh 2728
    private class getCart implements ProcessFunction {
48 ashish 2729
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2730
      {
553 chandransh 2731
        getCart_args args = new getCart_args();
48 ashish 2732
        args.read(iprot);
2733
        iprot.readMessageEnd();
553 chandransh 2734
        getCart_result result = new getCart_result();
48 ashish 2735
        try {
553 chandransh 2736
          result.success = iface_.getCart(args.cartId);
2737
        } catch (ShoppingCartException scx) {
2738
          result.scx = scx;
48 ashish 2739
        } catch (Throwable th) {
553 chandransh 2740
          LOGGER.error("Internal error processing getCart", th);
2741
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2742
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2743
          x.write(oprot);
2744
          oprot.writeMessageEnd();
2745
          oprot.getTransport().flush();
2746
          return;
2747
        }
553 chandransh 2748
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2749
        result.write(oprot);
2750
        oprot.writeMessageEnd();
2751
        oprot.getTransport().flush();
2752
      }
2753
 
2754
    }
2755
 
553 chandransh 2756
    private class getCartsForUser implements ProcessFunction {
48 ashish 2757
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2758
      {
553 chandransh 2759
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2760
        args.read(iprot);
2761
        iprot.readMessageEnd();
553 chandransh 2762
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2763
        try {
553 chandransh 2764
          result.success = iface_.getCartsForUser(args.userId, args.status);
2765
        } catch (ShoppingCartException scx) {
2766
          result.scx = scx;
48 ashish 2767
        } catch (Throwable th) {
553 chandransh 2768
          LOGGER.error("Internal error processing getCartsForUser", th);
2769
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2770
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2771
          x.write(oprot);
2772
          oprot.writeMessageEnd();
2773
          oprot.getTransport().flush();
2774
          return;
2775
        }
553 chandransh 2776
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2777
        result.write(oprot);
2778
        oprot.writeMessageEnd();
2779
        oprot.getTransport().flush();
2780
      }
2781
 
2782
    }
2783
 
553 chandransh 2784
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2785
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2786
      {
553 chandransh 2787
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2788
        args.read(iprot);
2789
        iprot.readMessageEnd();
553 chandransh 2790
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2791
        try {
553 chandransh 2792
          result.success = iface_.getCartsByStatus(args.status);
2793
        } catch (ShoppingCartException scx) {
2794
          result.scx = scx;
48 ashish 2795
        } catch (Throwable th) {
553 chandransh 2796
          LOGGER.error("Internal error processing getCartsByStatus", th);
2797
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2798
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2799
          x.write(oprot);
2800
          oprot.writeMessageEnd();
2801
          oprot.getTransport().flush();
2802
          return;
2803
        }
553 chandransh 2804
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2805
        result.write(oprot);
2806
        oprot.writeMessageEnd();
2807
        oprot.getTransport().flush();
2808
      }
2809
 
2810
    }
2811
 
553 chandransh 2812
    private class getCartsByTime implements ProcessFunction {
48 ashish 2813
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2814
      {
553 chandransh 2815
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2816
        args.read(iprot);
2817
        iprot.readMessageEnd();
553 chandransh 2818
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2819
        try {
553 chandransh 2820
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2821
        } catch (ShoppingCartException scx) {
2822
          result.scx = scx;
48 ashish 2823
        } catch (Throwable th) {
553 chandransh 2824
          LOGGER.error("Internal error processing getCartsByTime", th);
2825
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2826
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2827
          x.write(oprot);
2828
          oprot.writeMessageEnd();
2829
          oprot.getTransport().flush();
2830
          return;
2831
        }
553 chandransh 2832
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2833
        result.write(oprot);
2834
        oprot.writeMessageEnd();
2835
        oprot.getTransport().flush();
2836
      }
2837
 
2838
    }
2839
 
553 chandransh 2840
    private class changeCartStatus implements ProcessFunction {
130 ashish 2841
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2842
      {
553 chandransh 2843
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2844
        args.read(iprot);
2845
        iprot.readMessageEnd();
553 chandransh 2846
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2847
        try {
553 chandransh 2848
          iface_.changeCartStatus(args.cartId, args.status);
2849
        } catch (ShoppingCartException scx) {
2850
          result.scx = scx;
2851
        } catch (Throwable th) {
2852
          LOGGER.error("Internal error processing changeCartStatus", th);
2853
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2854
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2855
          x.write(oprot);
2856
          oprot.writeMessageEnd();
2857
          oprot.getTransport().flush();
2858
          return;
2859
        }
2860
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2861
        result.write(oprot);
2862
        oprot.writeMessageEnd();
2863
        oprot.getTransport().flush();
2864
      }
2865
 
2866
    }
2867
 
2868
    private class addItemToCart implements ProcessFunction {
2869
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2870
      {
2871
        addItemToCart_args args = new addItemToCart_args();
2872
        args.read(iprot);
2873
        iprot.readMessageEnd();
2874
        addItemToCart_result result = new addItemToCart_result();
2875
        try {
2876
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2877
        } catch (ShoppingCartException scx) {
2878
          result.scx = scx;
2879
        } catch (Throwable th) {
2880
          LOGGER.error("Internal error processing addItemToCart", th);
2881
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2882
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2883
          x.write(oprot);
2884
          oprot.writeMessageEnd();
2885
          oprot.getTransport().flush();
2886
          return;
2887
        }
2888
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2889
        result.write(oprot);
2890
        oprot.writeMessageEnd();
2891
        oprot.getTransport().flush();
2892
      }
2893
 
2894
    }
2895
 
2896
    private class deleteItemFromCart implements ProcessFunction {
2897
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2898
      {
2899
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2900
        args.read(iprot);
2901
        iprot.readMessageEnd();
2902
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2903
        try {
2904
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2905
        } catch (ShoppingCartException scx) {
2906
          result.scx = scx;
2907
        } catch (Throwable th) {
2908
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2909
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2910
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2911
          x.write(oprot);
2912
          oprot.writeMessageEnd();
2913
          oprot.getTransport().flush();
2914
          return;
2915
        }
2916
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2917
        result.write(oprot);
2918
        oprot.writeMessageEnd();
2919
        oprot.getTransport().flush();
2920
      }
2921
 
2922
    }
2923
 
2924
    private class changeQuantity implements ProcessFunction {
2925
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2926
      {
2927
        changeQuantity_args args = new changeQuantity_args();
2928
        args.read(iprot);
2929
        iprot.readMessageEnd();
2930
        changeQuantity_result result = new changeQuantity_result();
2931
        try {
2932
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2933
        } catch (ShoppingCartException scx) {
2934
          result.scx = scx;
2935
        } catch (Throwable th) {
2936
          LOGGER.error("Internal error processing changeQuantity", th);
2937
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2938
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2939
          x.write(oprot);
2940
          oprot.writeMessageEnd();
2941
          oprot.getTransport().flush();
2942
          return;
2943
        }
2944
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2945
        result.write(oprot);
2946
        oprot.writeMessageEnd();
2947
        oprot.getTransport().flush();
2948
      }
2949
 
2950
    }
2951
 
2952
    private class changeItemStatus implements ProcessFunction {
2953
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2954
      {
2955
        changeItemStatus_args args = new changeItemStatus_args();
2956
        args.read(iprot);
2957
        iprot.readMessageEnd();
2958
        changeItemStatus_result result = new changeItemStatus_result();
2959
        try {
2960
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2961
        } catch (ShoppingCartException scx) {
2962
          result.scx = scx;
2963
        } catch (Throwable th) {
2964
          LOGGER.error("Internal error processing changeItemStatus", th);
2965
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2966
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2967
          x.write(oprot);
2968
          oprot.writeMessageEnd();
2969
          oprot.getTransport().flush();
2970
          return;
2971
        }
2972
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2973
        result.write(oprot);
2974
        oprot.writeMessageEnd();
2975
        oprot.getTransport().flush();
2976
      }
2977
 
2978
    }
2979
 
2980
    private class addAddressToCart implements ProcessFunction {
2981
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2982
      {
2983
        addAddressToCart_args args = new addAddressToCart_args();
2984
        args.read(iprot);
2985
        iprot.readMessageEnd();
2986
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2987
        try {
2988
          iface_.addAddressToCart(args.cartId, args.addressId);
2989
        } catch (ShoppingCartException scx) {
2990
          result.scx = scx;
2991
        } catch (Throwable th) {
2992
          LOGGER.error("Internal error processing addAddressToCart", th);
2993
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2994
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2995
          x.write(oprot);
2996
          oprot.writeMessageEnd();
2997
          oprot.getTransport().flush();
2998
          return;
2999
        }
553 chandransh 3000
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
3001
        result.write(oprot);
3002
        oprot.writeMessageEnd();
3003
        oprot.getTransport().flush();
3004
      }
3005
 
3006
    }
3007
 
688 chandransh 3008
    private class createOrders implements ProcessFunction {
553 chandransh 3009
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3010
      {
688 chandransh 3011
        createOrders_args args = new createOrders_args();
553 chandransh 3012
        args.read(iprot);
3013
        iprot.readMessageEnd();
688 chandransh 3014
        createOrders_result result = new createOrders_result();
553 chandransh 3015
        try {
688 chandransh 3016
          result.success = iface_.createOrders(args.cartId);
130 ashish 3017
          result.setSuccessIsSet(true);
553 chandransh 3018
        } catch (ShoppingCartException scx) {
3019
          result.scx = scx;
130 ashish 3020
        } catch (Throwable th) {
688 chandransh 3021
          LOGGER.error("Internal error processing createOrders", th);
3022
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
3023
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
130 ashish 3024
          x.write(oprot);
3025
          oprot.writeMessageEnd();
3026
          oprot.getTransport().flush();
3027
          return;
3028
        }
688 chandransh 3029
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
130 ashish 3030
        result.write(oprot);
3031
        oprot.writeMessageEnd();
3032
        oprot.getTransport().flush();
3033
      }
3034
 
3035
    }
3036
 
553 chandransh 3037
    private class validateCart implements ProcessFunction {
130 ashish 3038
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3039
      {
553 chandransh 3040
        validateCart_args args = new validateCart_args();
130 ashish 3041
        args.read(iprot);
3042
        iprot.readMessageEnd();
553 chandransh 3043
        validateCart_result result = new validateCart_result();
578 chandransh 3044
        try {
3045
          result.success = iface_.validateCart(args.cartId);
3046
        } catch (ShoppingCartException scex) {
3047
          result.scex = scex;
3048
        } catch (Throwable th) {
3049
          LOGGER.error("Internal error processing validateCart", th);
3050
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
3051
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
3052
          x.write(oprot);
3053
          oprot.writeMessageEnd();
3054
          oprot.getTransport().flush();
3055
          return;
3056
        }
553 chandransh 3057
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
3058
        result.write(oprot);
3059
        oprot.writeMessageEnd();
3060
        oprot.getTransport().flush();
3061
      }
3062
 
3063
    }
3064
 
688 chandransh 3065
    private class mergeCart implements ProcessFunction {
578 chandransh 3066
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3067
      {
688 chandransh 3068
        mergeCart_args args = new mergeCart_args();
578 chandransh 3069
        args.read(iprot);
3070
        iprot.readMessageEnd();
688 chandransh 3071
        mergeCart_result result = new mergeCart_result();
3072
        iface_.mergeCart(args.fromCartId, args.toCartId);
3073
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
3074
        result.write(oprot);
3075
        oprot.writeMessageEnd();
3076
        oprot.getTransport().flush();
3077
      }
3078
 
3079
    }
3080
 
3081
    private class checkOut implements ProcessFunction {
3082
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3083
      {
3084
        checkOut_args args = new checkOut_args();
3085
        args.read(iprot);
3086
        iprot.readMessageEnd();
3087
        checkOut_result result = new checkOut_result();
578 chandransh 3088
        try {
688 chandransh 3089
          result.success = iface_.checkOut(args.cartId);
578 chandransh 3090
          result.setSuccessIsSet(true);
3091
        } catch (ShoppingCartException scex) {
3092
          result.scex = scex;
3093
        } catch (Throwable th) {
688 chandransh 3094
          LOGGER.error("Internal error processing checkOut", th);
3095
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
3096
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 3097
          x.write(oprot);
3098
          oprot.writeMessageEnd();
3099
          oprot.getTransport().flush();
3100
          return;
3101
        }
688 chandransh 3102
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 3103
        result.write(oprot);
3104
        oprot.writeMessageEnd();
3105
        oprot.getTransport().flush();
3106
      }
3107
 
3108
    }
3109
 
688 chandransh 3110
    private class resetCart implements ProcessFunction {
553 chandransh 3111
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3112
      {
688 chandransh 3113
        resetCart_args args = new resetCart_args();
553 chandransh 3114
        args.read(iprot);
3115
        iprot.readMessageEnd();
688 chandransh 3116
        resetCart_result result = new resetCart_result();
3117
        try {
3118
          result.success = iface_.resetCart(args.cartId, args.items);
3119
          result.setSuccessIsSet(true);
3120
        } catch (ShoppingCartException scex) {
3121
          result.scex = scex;
3122
        } catch (Throwable th) {
3123
          LOGGER.error("Internal error processing resetCart", th);
3124
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
3125
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
3126
          x.write(oprot);
3127
          oprot.writeMessageEnd();
3128
          oprot.getTransport().flush();
3129
          return;
3130
        }
3131
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 3132
        result.write(oprot);
3133
        oprot.writeMessageEnd();
3134
        oprot.getTransport().flush();
3135
      }
3136
 
3137
    }
3138
 
3139
    private class getMyResearch implements ProcessFunction {
3140
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3141
      {
3142
        getMyResearch_args args = new getMyResearch_args();
3143
        args.read(iprot);
3144
        iprot.readMessageEnd();
3145
        getMyResearch_result result = new getMyResearch_result();
3146
        try {
771 rajveer 3147
          result.success = iface_.getMyResearch(args.userId);
553 chandransh 3148
        } catch (WidgetException scx) {
3149
          result.scx = scx;
3150
        } catch (Throwable th) {
3151
          LOGGER.error("Internal error processing getMyResearch", th);
3152
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
3153
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
3154
          x.write(oprot);
3155
          oprot.writeMessageEnd();
3156
          oprot.getTransport().flush();
3157
          return;
3158
        }
3159
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
3160
        result.write(oprot);
3161
        oprot.writeMessageEnd();
3162
        oprot.getTransport().flush();
3163
      }
3164
 
3165
    }
3166
 
3167
    private class updateMyResearch implements ProcessFunction {
3168
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3169
      {
3170
        updateMyResearch_args args = new updateMyResearch_args();
3171
        args.read(iprot);
3172
        iprot.readMessageEnd();
3173
        updateMyResearch_result result = new updateMyResearch_result();
3174
        try {
771 rajveer 3175
          result.success = iface_.updateMyResearch(args.userId, args.itemId);
130 ashish 3176
          result.setSuccessIsSet(true);
553 chandransh 3177
        } catch (WidgetException scx) {
3178
          result.scx = scx;
130 ashish 3179
        } catch (Throwable th) {
553 chandransh 3180
          LOGGER.error("Internal error processing updateMyResearch", th);
3181
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
3182
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 3183
          x.write(oprot);
3184
          oprot.writeMessageEnd();
3185
          oprot.getTransport().flush();
3186
          return;
3187
        }
553 chandransh 3188
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 3189
        result.write(oprot);
3190
        oprot.writeMessageEnd();
3191
        oprot.getTransport().flush();
3192
      }
3193
 
3194
    }
3195
 
553 chandransh 3196
    private class deleteItemFromMyResearch implements ProcessFunction {
3197
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3198
      {
3199
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
3200
        args.read(iprot);
3201
        iprot.readMessageEnd();
3202
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
3203
        try {
771 rajveer 3204
          iface_.deleteItemFromMyResearch(args.userId, args.itemId);
553 chandransh 3205
        } catch (WidgetException scx) {
3206
          result.scx = scx;
3207
        } catch (Throwable th) {
3208
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
3209
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
3210
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
3211
          x.write(oprot);
3212
          oprot.writeMessageEnd();
3213
          oprot.getTransport().flush();
3214
          return;
3215
        }
3216
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
3217
        result.write(oprot);
3218
        oprot.writeMessageEnd();
3219
        oprot.getTransport().flush();
3220
      }
3221
 
3222
    }
3223
 
771 rajveer 3224
    private class updateBrowseHistory implements ProcessFunction {
553 chandransh 3225
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3226
      {
771 rajveer 3227
        updateBrowseHistory_args args = new updateBrowseHistory_args();
553 chandransh 3228
        args.read(iprot);
3229
        iprot.readMessageEnd();
771 rajveer 3230
        updateBrowseHistory_result result = new updateBrowseHistory_result();
3231
        iface_.updateBrowseHistory(args.userId, args.itemId);
3232
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 3233
        result.write(oprot);
3234
        oprot.writeMessageEnd();
3235
        oprot.getTransport().flush();
3236
      }
3237
 
3238
    }
3239
 
771 rajveer 3240
    private class getBrowseHistory implements ProcessFunction {
553 chandransh 3241
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3242
      {
771 rajveer 3243
        getBrowseHistory_args args = new getBrowseHistory_args();
553 chandransh 3244
        args.read(iprot);
3245
        iprot.readMessageEnd();
771 rajveer 3246
        getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 3247
        try {
771 rajveer 3248
          result.success = iface_.getBrowseHistory(args.userId);
553 chandransh 3249
        } catch (WidgetException scx) {
3250
          result.scx = scx;
3251
        } catch (Throwable th) {
771 rajveer 3252
          LOGGER.error("Internal error processing getBrowseHistory", th);
3253
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
3254
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
553 chandransh 3255
          x.write(oprot);
3256
          oprot.writeMessageEnd();
3257
          oprot.getTransport().flush();
3258
          return;
3259
        }
771 rajveer 3260
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 3261
        result.write(oprot);
3262
        oprot.writeMessageEnd();
3263
        oprot.getTransport().flush();
3264
      }
3265
 
3266
    }
3267
 
771 rajveer 3268
    private class mergeBrowseHistory implements ProcessFunction {
553 chandransh 3269
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3270
      {
771 rajveer 3271
        mergeBrowseHistory_args args = new mergeBrowseHistory_args();
553 chandransh 3272
        args.read(iprot);
3273
        iprot.readMessageEnd();
771 rajveer 3274
        mergeBrowseHistory_result result = new mergeBrowseHistory_result();
3275
        iface_.mergeBrowseHistory(args.fromUserId, args.toUserId);
3276
        oprot.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 3277
        result.write(oprot);
3278
        oprot.writeMessageEnd();
3279
        oprot.getTransport().flush();
3280
      }
3281
 
3282
    }
3283
 
1598 ankur.sing 3284
    private class getUserCount implements ProcessFunction {
3285
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3286
      {
3287
        getUserCount_args args = new getUserCount_args();
3288
        args.read(iprot);
3289
        iprot.readMessageEnd();
3290
        getUserCount_result result = new getUserCount_result();
3291
        result.success = iface_.getUserCount(args.userType);
3292
        result.setSuccessIsSet(true);
3293
        oprot.writeMessageBegin(new TMessage("getUserCount", TMessageType.REPLY, seqid));
3294
        result.write(oprot);
3295
        oprot.writeMessageEnd();
3296
        oprot.getTransport().flush();
3297
      }
3298
 
3299
    }
3300
 
48 ashish 3301
  }
3302
 
764 rajveer 3303
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3304
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3305
 
3306
 
3307
 
3308
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3309
    public enum _Fields implements TFieldIdEnum {
3310
;
3311
 
3312
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3313
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3314
 
3315
      static {
3316
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3317
          byId.put((int)field._thriftId, field);
3318
          byName.put(field.getFieldName(), field);
3319
        }
3320
      }
3321
 
3322
      /**
3323
       * Find the _Fields constant that matches fieldId, or null if its not found.
3324
       */
3325
      public static _Fields findByThriftId(int fieldId) {
3326
        return byId.get(fieldId);
3327
      }
3328
 
3329
      /**
3330
       * Find the _Fields constant that matches fieldId, throwing an exception
3331
       * if it is not found.
3332
       */
3333
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3334
        _Fields fields = findByThriftId(fieldId);
3335
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3336
        return fields;
3337
      }
3338
 
3339
      /**
3340
       * Find the _Fields constant that matches name, or null if its not found.
3341
       */
3342
      public static _Fields findByName(String name) {
3343
        return byName.get(name);
3344
      }
3345
 
3346
      private final short _thriftId;
3347
      private final String _fieldName;
3348
 
3349
      _Fields(short thriftId, String fieldName) {
3350
        _thriftId = thriftId;
3351
        _fieldName = fieldName;
3352
      }
3353
 
3354
      public short getThriftFieldId() {
3355
        return _thriftId;
3356
      }
3357
 
3358
      public String getFieldName() {
3359
        return _fieldName;
3360
      }
3361
    }
3362
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3363
    }});
3364
 
3365
    static {
3366
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3367
    }
3368
 
3369
    public closeSession_args() {
3370
    }
3371
 
3372
    /**
3373
     * Performs a deep copy on <i>other</i>.
3374
     */
3375
    public closeSession_args(closeSession_args other) {
3376
    }
3377
 
3378
    public closeSession_args deepCopy() {
3379
      return new closeSession_args(this);
3380
    }
3381
 
3382
    @Deprecated
3383
    public closeSession_args clone() {
3384
      return new closeSession_args(this);
3385
    }
3386
 
3387
    public void setFieldValue(_Fields field, Object value) {
3388
      switch (field) {
3389
      }
3390
    }
3391
 
3392
    public void setFieldValue(int fieldID, Object value) {
3393
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3394
    }
3395
 
3396
    public Object getFieldValue(_Fields field) {
3397
      switch (field) {
3398
      }
3399
      throw new IllegalStateException();
3400
    }
3401
 
3402
    public Object getFieldValue(int fieldId) {
3403
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3404
    }
3405
 
3406
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3407
    public boolean isSet(_Fields field) {
3408
      switch (field) {
3409
      }
3410
      throw new IllegalStateException();
3411
    }
3412
 
3413
    public boolean isSet(int fieldID) {
3414
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3415
    }
3416
 
3417
    @Override
3418
    public boolean equals(Object that) {
3419
      if (that == null)
3420
        return false;
3421
      if (that instanceof closeSession_args)
3422
        return this.equals((closeSession_args)that);
3423
      return false;
3424
    }
3425
 
3426
    public boolean equals(closeSession_args that) {
3427
      if (that == null)
3428
        return false;
3429
 
3430
      return true;
3431
    }
3432
 
3433
    @Override
3434
    public int hashCode() {
3435
      return 0;
3436
    }
3437
 
3438
    public int compareTo(closeSession_args other) {
3439
      if (!getClass().equals(other.getClass())) {
3440
        return getClass().getName().compareTo(other.getClass().getName());
3441
      }
3442
 
3443
      int lastComparison = 0;
3444
      closeSession_args typedOther = (closeSession_args)other;
3445
 
3446
      return 0;
3447
    }
3448
 
3449
    public void read(TProtocol iprot) throws TException {
3450
      TField field;
3451
      iprot.readStructBegin();
3452
      while (true)
3453
      {
3454
        field = iprot.readFieldBegin();
3455
        if (field.type == TType.STOP) { 
3456
          break;
3457
        }
3458
        _Fields fieldId = _Fields.findByThriftId(field.id);
3459
        if (fieldId == null) {
3460
          TProtocolUtil.skip(iprot, field.type);
3461
        } else {
3462
          switch (fieldId) {
3463
          }
3464
          iprot.readFieldEnd();
3465
        }
3466
      }
3467
      iprot.readStructEnd();
3468
      validate();
3469
    }
3470
 
3471
    public void write(TProtocol oprot) throws TException {
3472
      validate();
3473
 
3474
      oprot.writeStructBegin(STRUCT_DESC);
3475
      oprot.writeFieldStop();
3476
      oprot.writeStructEnd();
3477
    }
3478
 
3479
    @Override
3480
    public String toString() {
3481
      StringBuilder sb = new StringBuilder("closeSession_args(");
3482
      boolean first = true;
3483
 
3484
      sb.append(")");
3485
      return sb.toString();
3486
    }
3487
 
3488
    public void validate() throws TException {
3489
      // check for required fields
3490
    }
3491
 
3492
  }
3493
 
3494
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3495
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3496
 
3497
 
3498
 
3499
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3500
    public enum _Fields implements TFieldIdEnum {
3501
;
3502
 
3503
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3504
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3505
 
3506
      static {
3507
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3508
          byId.put((int)field._thriftId, field);
3509
          byName.put(field.getFieldName(), field);
3510
        }
3511
      }
3512
 
3513
      /**
3514
       * Find the _Fields constant that matches fieldId, or null if its not found.
3515
       */
3516
      public static _Fields findByThriftId(int fieldId) {
3517
        return byId.get(fieldId);
3518
      }
3519
 
3520
      /**
3521
       * Find the _Fields constant that matches fieldId, throwing an exception
3522
       * if it is not found.
3523
       */
3524
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3525
        _Fields fields = findByThriftId(fieldId);
3526
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3527
        return fields;
3528
      }
3529
 
3530
      /**
3531
       * Find the _Fields constant that matches name, or null if its not found.
3532
       */
3533
      public static _Fields findByName(String name) {
3534
        return byName.get(name);
3535
      }
3536
 
3537
      private final short _thriftId;
3538
      private final String _fieldName;
3539
 
3540
      _Fields(short thriftId, String fieldName) {
3541
        _thriftId = thriftId;
3542
        _fieldName = fieldName;
3543
      }
3544
 
3545
      public short getThriftFieldId() {
3546
        return _thriftId;
3547
      }
3548
 
3549
      public String getFieldName() {
3550
        return _fieldName;
3551
      }
3552
    }
3553
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3554
    }});
3555
 
3556
    static {
3557
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3558
    }
3559
 
3560
    public closeSession_result() {
3561
    }
3562
 
3563
    /**
3564
     * Performs a deep copy on <i>other</i>.
3565
     */
3566
    public closeSession_result(closeSession_result other) {
3567
    }
3568
 
3569
    public closeSession_result deepCopy() {
3570
      return new closeSession_result(this);
3571
    }
3572
 
3573
    @Deprecated
3574
    public closeSession_result clone() {
3575
      return new closeSession_result(this);
3576
    }
3577
 
3578
    public void setFieldValue(_Fields field, Object value) {
3579
      switch (field) {
3580
      }
3581
    }
3582
 
3583
    public void setFieldValue(int fieldID, Object value) {
3584
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3585
    }
3586
 
3587
    public Object getFieldValue(_Fields field) {
3588
      switch (field) {
3589
      }
3590
      throw new IllegalStateException();
3591
    }
3592
 
3593
    public Object getFieldValue(int fieldId) {
3594
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3595
    }
3596
 
3597
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3598
    public boolean isSet(_Fields field) {
3599
      switch (field) {
3600
      }
3601
      throw new IllegalStateException();
3602
    }
3603
 
3604
    public boolean isSet(int fieldID) {
3605
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3606
    }
3607
 
3608
    @Override
3609
    public boolean equals(Object that) {
3610
      if (that == null)
3611
        return false;
3612
      if (that instanceof closeSession_result)
3613
        return this.equals((closeSession_result)that);
3614
      return false;
3615
    }
3616
 
3617
    public boolean equals(closeSession_result that) {
3618
      if (that == null)
3619
        return false;
3620
 
3621
      return true;
3622
    }
3623
 
3624
    @Override
3625
    public int hashCode() {
3626
      return 0;
3627
    }
3628
 
3629
    public int compareTo(closeSession_result other) {
3630
      if (!getClass().equals(other.getClass())) {
3631
        return getClass().getName().compareTo(other.getClass().getName());
3632
      }
3633
 
3634
      int lastComparison = 0;
3635
      closeSession_result typedOther = (closeSession_result)other;
3636
 
3637
      return 0;
3638
    }
3639
 
3640
    public void read(TProtocol iprot) throws TException {
3641
      TField field;
3642
      iprot.readStructBegin();
3643
      while (true)
3644
      {
3645
        field = iprot.readFieldBegin();
3646
        if (field.type == TType.STOP) { 
3647
          break;
3648
        }
3649
        _Fields fieldId = _Fields.findByThriftId(field.id);
3650
        if (fieldId == null) {
3651
          TProtocolUtil.skip(iprot, field.type);
3652
        } else {
3653
          switch (fieldId) {
3654
          }
3655
          iprot.readFieldEnd();
3656
        }
3657
      }
3658
      iprot.readStructEnd();
3659
      validate();
3660
    }
3661
 
3662
    public void write(TProtocol oprot) throws TException {
3663
      oprot.writeStructBegin(STRUCT_DESC);
3664
 
3665
      oprot.writeFieldStop();
3666
      oprot.writeStructEnd();
3667
    }
3668
 
3669
    @Override
3670
    public String toString() {
3671
      StringBuilder sb = new StringBuilder("closeSession_result(");
3672
      boolean first = true;
3673
 
3674
      sb.append(")");
3675
      return sb.toString();
3676
    }
3677
 
3678
    public void validate() throws TException {
3679
      // check for required fields
3680
    }
3681
 
3682
  }
3683
 
553 chandransh 3684
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3685
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3686
 
553 chandransh 3687
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3688
 
553 chandransh 3689
    private String jsessionId;
48 ashish 3690
 
3691
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3692
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3693
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3694
 
3695
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3696
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3697
 
3698
      static {
3699
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3700
          byId.put((int)field._thriftId, field);
3701
          byName.put(field.getFieldName(), field);
3702
        }
3703
      }
3704
 
3705
      /**
3706
       * Find the _Fields constant that matches fieldId, or null if its not found.
3707
       */
3708
      public static _Fields findByThriftId(int fieldId) {
3709
        return byId.get(fieldId);
3710
      }
3711
 
3712
      /**
3713
       * Find the _Fields constant that matches fieldId, throwing an exception
3714
       * if it is not found.
3715
       */
3716
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3717
        _Fields fields = findByThriftId(fieldId);
3718
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3719
        return fields;
3720
      }
3721
 
3722
      /**
3723
       * Find the _Fields constant that matches name, or null if its not found.
3724
       */
3725
      public static _Fields findByName(String name) {
3726
        return byName.get(name);
3727
      }
3728
 
3729
      private final short _thriftId;
3730
      private final String _fieldName;
3731
 
3732
      _Fields(short thriftId, String fieldName) {
3733
        _thriftId = thriftId;
3734
        _fieldName = fieldName;
3735
      }
3736
 
3737
      public short getThriftFieldId() {
3738
        return _thriftId;
3739
      }
3740
 
3741
      public String getFieldName() {
3742
        return _fieldName;
3743
      }
3744
    }
3745
 
3746
    // isset id assignments
3747
 
3748
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3749
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3750
          new FieldValueMetaData(TType.STRING)));
48 ashish 3751
    }});
3752
 
3753
    static {
553 chandransh 3754
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3755
    }
3756
 
553 chandransh 3757
    public createAnonymousUser_args() {
48 ashish 3758
    }
3759
 
553 chandransh 3760
    public createAnonymousUser_args(
3761
      String jsessionId)
48 ashish 3762
    {
3763
      this();
553 chandransh 3764
      this.jsessionId = jsessionId;
48 ashish 3765
    }
3766
 
3767
    /**
3768
     * Performs a deep copy on <i>other</i>.
3769
     */
553 chandransh 3770
    public createAnonymousUser_args(createAnonymousUser_args other) {
3771
      if (other.isSetJsessionId()) {
3772
        this.jsessionId = other.jsessionId;
48 ashish 3773
      }
3774
    }
3775
 
553 chandransh 3776
    public createAnonymousUser_args deepCopy() {
3777
      return new createAnonymousUser_args(this);
48 ashish 3778
    }
3779
 
3780
    @Deprecated
553 chandransh 3781
    public createAnonymousUser_args clone() {
3782
      return new createAnonymousUser_args(this);
48 ashish 3783
    }
3784
 
553 chandransh 3785
    public String getJsessionId() {
3786
      return this.jsessionId;
48 ashish 3787
    }
3788
 
553 chandransh 3789
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3790
      this.jsessionId = jsessionId;
48 ashish 3791
      return this;
3792
    }
3793
 
553 chandransh 3794
    public void unsetJsessionId() {
3795
      this.jsessionId = null;
48 ashish 3796
    }
3797
 
553 chandransh 3798
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3799
    public boolean isSetJsessionId() {
3800
      return this.jsessionId != null;
48 ashish 3801
    }
3802
 
553 chandransh 3803
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3804
      if (!value) {
553 chandransh 3805
        this.jsessionId = null;
48 ashish 3806
      }
3807
    }
3808
 
3809
    public void setFieldValue(_Fields field, Object value) {
3810
      switch (field) {
553 chandransh 3811
      case JSESSION_ID:
48 ashish 3812
        if (value == null) {
553 chandransh 3813
          unsetJsessionId();
48 ashish 3814
        } else {
553 chandransh 3815
          setJsessionId((String)value);
48 ashish 3816
        }
3817
        break;
3818
 
3819
      }
3820
    }
3821
 
3822
    public void setFieldValue(int fieldID, Object value) {
3823
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3824
    }
3825
 
3826
    public Object getFieldValue(_Fields field) {
3827
      switch (field) {
553 chandransh 3828
      case JSESSION_ID:
3829
        return getJsessionId();
48 ashish 3830
 
3831
      }
3832
      throw new IllegalStateException();
3833
    }
3834
 
3835
    public Object getFieldValue(int fieldId) {
3836
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3837
    }
3838
 
3839
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3840
    public boolean isSet(_Fields field) {
3841
      switch (field) {
553 chandransh 3842
      case JSESSION_ID:
3843
        return isSetJsessionId();
48 ashish 3844
      }
3845
      throw new IllegalStateException();
3846
    }
3847
 
3848
    public boolean isSet(int fieldID) {
3849
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3850
    }
3851
 
3852
    @Override
3853
    public boolean equals(Object that) {
3854
      if (that == null)
3855
        return false;
553 chandransh 3856
      if (that instanceof createAnonymousUser_args)
3857
        return this.equals((createAnonymousUser_args)that);
48 ashish 3858
      return false;
3859
    }
3860
 
553 chandransh 3861
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3862
      if (that == null)
3863
        return false;
3864
 
553 chandransh 3865
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3866
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3867
      if (this_present_jsessionId || that_present_jsessionId) {
3868
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3869
          return false;
553 chandransh 3870
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3871
          return false;
3872
      }
3873
 
3874
      return true;
3875
    }
3876
 
3877
    @Override
3878
    public int hashCode() {
3879
      return 0;
3880
    }
3881
 
553 chandransh 3882
    public int compareTo(createAnonymousUser_args other) {
3883
      if (!getClass().equals(other.getClass())) {
3884
        return getClass().getName().compareTo(other.getClass().getName());
3885
      }
3886
 
3887
      int lastComparison = 0;
3888
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3889
 
3890
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3891
      if (lastComparison != 0) {
3892
        return lastComparison;
3893
      }
3894
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3895
      if (lastComparison != 0) {
3896
        return lastComparison;
3897
      }
3898
      return 0;
3899
    }
3900
 
48 ashish 3901
    public void read(TProtocol iprot) throws TException {
3902
      TField field;
3903
      iprot.readStructBegin();
3904
      while (true)
3905
      {
3906
        field = iprot.readFieldBegin();
3907
        if (field.type == TType.STOP) { 
3908
          break;
3909
        }
3910
        _Fields fieldId = _Fields.findByThriftId(field.id);
3911
        if (fieldId == null) {
3912
          TProtocolUtil.skip(iprot, field.type);
3913
        } else {
3914
          switch (fieldId) {
553 chandransh 3915
            case JSESSION_ID:
3916
              if (field.type == TType.STRING) {
3917
                this.jsessionId = iprot.readString();
48 ashish 3918
              } else { 
3919
                TProtocolUtil.skip(iprot, field.type);
3920
              }
3921
              break;
3922
          }
3923
          iprot.readFieldEnd();
3924
        }
3925
      }
3926
      iprot.readStructEnd();
3927
      validate();
3928
    }
3929
 
3930
    public void write(TProtocol oprot) throws TException {
3931
      validate();
3932
 
3933
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3934
      if (this.jsessionId != null) {
3935
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3936
        oprot.writeString(this.jsessionId);
48 ashish 3937
        oprot.writeFieldEnd();
3938
      }
3939
      oprot.writeFieldStop();
3940
      oprot.writeStructEnd();
3941
    }
3942
 
3943
    @Override
3944
    public String toString() {
553 chandransh 3945
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3946
      boolean first = true;
3947
 
553 chandransh 3948
      sb.append("jsessionId:");
3949
      if (this.jsessionId == null) {
48 ashish 3950
        sb.append("null");
3951
      } else {
553 chandransh 3952
        sb.append(this.jsessionId);
48 ashish 3953
      }
3954
      first = false;
3955
      sb.append(")");
3956
      return sb.toString();
3957
    }
3958
 
3959
    public void validate() throws TException {
3960
      // check for required fields
3961
    }
3962
 
3963
  }
3964
 
571 rajveer 3965
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3966
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3967
 
3968
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3969
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3970
 
553 chandransh 3971
    private User success;
3972
    private UserContextException ucex;
48 ashish 3973
 
3974
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3975
    public enum _Fields implements TFieldIdEnum {
3976
      SUCCESS((short)0, "success"),
553 chandransh 3977
      UCEX((short)1, "ucex");
48 ashish 3978
 
3979
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3980
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3981
 
3982
      static {
3983
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3984
          byId.put((int)field._thriftId, field);
3985
          byName.put(field.getFieldName(), field);
3986
        }
3987
      }
3988
 
3989
      /**
3990
       * Find the _Fields constant that matches fieldId, or null if its not found.
3991
       */
3992
      public static _Fields findByThriftId(int fieldId) {
3993
        return byId.get(fieldId);
3994
      }
3995
 
3996
      /**
3997
       * Find the _Fields constant that matches fieldId, throwing an exception
3998
       * if it is not found.
3999
       */
4000
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4001
        _Fields fields = findByThriftId(fieldId);
4002
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4003
        return fields;
4004
      }
4005
 
4006
      /**
4007
       * Find the _Fields constant that matches name, or null if its not found.
4008
       */
4009
      public static _Fields findByName(String name) {
4010
        return byName.get(name);
4011
      }
4012
 
4013
      private final short _thriftId;
4014
      private final String _fieldName;
4015
 
4016
      _Fields(short thriftId, String fieldName) {
4017
        _thriftId = thriftId;
4018
        _fieldName = fieldName;
4019
      }
4020
 
4021
      public short getThriftFieldId() {
4022
        return _thriftId;
4023
      }
4024
 
4025
      public String getFieldName() {
4026
        return _fieldName;
4027
      }
4028
    }
4029
 
4030
    // isset id assignments
4031
 
4032
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4033
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4034
          new StructMetaData(TType.STRUCT, User.class)));
4035
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4036
          new FieldValueMetaData(TType.STRUCT)));
4037
    }});
4038
 
4039
    static {
553 chandransh 4040
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 4041
    }
4042
 
553 chandransh 4043
    public createAnonymousUser_result() {
48 ashish 4044
    }
4045
 
553 chandransh 4046
    public createAnonymousUser_result(
4047
      User success,
4048
      UserContextException ucex)
48 ashish 4049
    {
4050
      this();
4051
      this.success = success;
553 chandransh 4052
      this.ucex = ucex;
48 ashish 4053
    }
4054
 
4055
    /**
4056
     * Performs a deep copy on <i>other</i>.
4057
     */
553 chandransh 4058
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 4059
      if (other.isSetSuccess()) {
553 chandransh 4060
        this.success = new User(other.success);
48 ashish 4061
      }
553 chandransh 4062
      if (other.isSetUcex()) {
4063
        this.ucex = new UserContextException(other.ucex);
48 ashish 4064
      }
4065
    }
4066
 
553 chandransh 4067
    public createAnonymousUser_result deepCopy() {
4068
      return new createAnonymousUser_result(this);
48 ashish 4069
    }
4070
 
4071
    @Deprecated
553 chandransh 4072
    public createAnonymousUser_result clone() {
4073
      return new createAnonymousUser_result(this);
48 ashish 4074
    }
4075
 
553 chandransh 4076
    public User getSuccess() {
48 ashish 4077
      return this.success;
4078
    }
4079
 
553 chandransh 4080
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 4081
      this.success = success;
4082
      return this;
4083
    }
4084
 
4085
    public void unsetSuccess() {
4086
      this.success = null;
4087
    }
4088
 
4089
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4090
    public boolean isSetSuccess() {
4091
      return this.success != null;
4092
    }
4093
 
4094
    public void setSuccessIsSet(boolean value) {
4095
      if (!value) {
4096
        this.success = null;
4097
      }
4098
    }
4099
 
553 chandransh 4100
    public UserContextException getUcex() {
4101
      return this.ucex;
48 ashish 4102
    }
4103
 
553 chandransh 4104
    public createAnonymousUser_result setUcex(UserContextException ucex) {
4105
      this.ucex = ucex;
48 ashish 4106
      return this;
4107
    }
4108
 
553 chandransh 4109
    public void unsetUcex() {
4110
      this.ucex = null;
48 ashish 4111
    }
4112
 
553 chandransh 4113
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4114
    public boolean isSetUcex() {
4115
      return this.ucex != null;
48 ashish 4116
    }
4117
 
553 chandransh 4118
    public void setUcexIsSet(boolean value) {
48 ashish 4119
      if (!value) {
553 chandransh 4120
        this.ucex = null;
48 ashish 4121
      }
4122
    }
4123
 
4124
    public void setFieldValue(_Fields field, Object value) {
4125
      switch (field) {
4126
      case SUCCESS:
4127
        if (value == null) {
4128
          unsetSuccess();
4129
        } else {
553 chandransh 4130
          setSuccess((User)value);
48 ashish 4131
        }
4132
        break;
4133
 
553 chandransh 4134
      case UCEX:
48 ashish 4135
        if (value == null) {
553 chandransh 4136
          unsetUcex();
48 ashish 4137
        } else {
553 chandransh 4138
          setUcex((UserContextException)value);
48 ashish 4139
        }
4140
        break;
4141
 
4142
      }
4143
    }
4144
 
4145
    public void setFieldValue(int fieldID, Object value) {
4146
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4147
    }
4148
 
4149
    public Object getFieldValue(_Fields field) {
4150
      switch (field) {
4151
      case SUCCESS:
4152
        return getSuccess();
4153
 
553 chandransh 4154
      case UCEX:
4155
        return getUcex();
48 ashish 4156
 
4157
      }
4158
      throw new IllegalStateException();
4159
    }
4160
 
4161
    public Object getFieldValue(int fieldId) {
4162
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4163
    }
4164
 
4165
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4166
    public boolean isSet(_Fields field) {
4167
      switch (field) {
4168
      case SUCCESS:
4169
        return isSetSuccess();
553 chandransh 4170
      case UCEX:
4171
        return isSetUcex();
48 ashish 4172
      }
4173
      throw new IllegalStateException();
4174
    }
4175
 
4176
    public boolean isSet(int fieldID) {
4177
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4178
    }
4179
 
4180
    @Override
4181
    public boolean equals(Object that) {
4182
      if (that == null)
4183
        return false;
553 chandransh 4184
      if (that instanceof createAnonymousUser_result)
4185
        return this.equals((createAnonymousUser_result)that);
48 ashish 4186
      return false;
4187
    }
4188
 
553 chandransh 4189
    public boolean equals(createAnonymousUser_result that) {
48 ashish 4190
      if (that == null)
4191
        return false;
4192
 
4193
      boolean this_present_success = true && this.isSetSuccess();
4194
      boolean that_present_success = true && that.isSetSuccess();
4195
      if (this_present_success || that_present_success) {
4196
        if (!(this_present_success && that_present_success))
4197
          return false;
4198
        if (!this.success.equals(that.success))
4199
          return false;
4200
      }
4201
 
553 chandransh 4202
      boolean this_present_ucex = true && this.isSetUcex();
4203
      boolean that_present_ucex = true && that.isSetUcex();
4204
      if (this_present_ucex || that_present_ucex) {
4205
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4206
          return false;
553 chandransh 4207
        if (!this.ucex.equals(that.ucex))
48 ashish 4208
          return false;
4209
      }
4210
 
4211
      return true;
4212
    }
4213
 
4214
    @Override
4215
    public int hashCode() {
4216
      return 0;
4217
    }
4218
 
571 rajveer 4219
    public int compareTo(createAnonymousUser_result other) {
4220
      if (!getClass().equals(other.getClass())) {
4221
        return getClass().getName().compareTo(other.getClass().getName());
4222
      }
4223
 
4224
      int lastComparison = 0;
4225
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
4226
 
4227
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4228
      if (lastComparison != 0) {
4229
        return lastComparison;
4230
      }
4231
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4232
      if (lastComparison != 0) {
4233
        return lastComparison;
4234
      }
4235
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4236
      if (lastComparison != 0) {
4237
        return lastComparison;
4238
      }
4239
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4240
      if (lastComparison != 0) {
4241
        return lastComparison;
4242
      }
4243
      return 0;
4244
    }
4245
 
48 ashish 4246
    public void read(TProtocol iprot) throws TException {
4247
      TField field;
4248
      iprot.readStructBegin();
4249
      while (true)
4250
      {
4251
        field = iprot.readFieldBegin();
4252
        if (field.type == TType.STOP) { 
4253
          break;
4254
        }
4255
        _Fields fieldId = _Fields.findByThriftId(field.id);
4256
        if (fieldId == null) {
4257
          TProtocolUtil.skip(iprot, field.type);
4258
        } else {
4259
          switch (fieldId) {
4260
            case SUCCESS:
4261
              if (field.type == TType.STRUCT) {
553 chandransh 4262
                this.success = new User();
48 ashish 4263
                this.success.read(iprot);
4264
              } else { 
4265
                TProtocolUtil.skip(iprot, field.type);
4266
              }
4267
              break;
553 chandransh 4268
            case UCEX:
48 ashish 4269
              if (field.type == TType.STRUCT) {
553 chandransh 4270
                this.ucex = new UserContextException();
4271
                this.ucex.read(iprot);
48 ashish 4272
              } else { 
4273
                TProtocolUtil.skip(iprot, field.type);
4274
              }
4275
              break;
4276
          }
4277
          iprot.readFieldEnd();
4278
        }
4279
      }
4280
      iprot.readStructEnd();
4281
      validate();
4282
    }
4283
 
4284
    public void write(TProtocol oprot) throws TException {
4285
      oprot.writeStructBegin(STRUCT_DESC);
4286
 
4287
      if (this.isSetSuccess()) {
4288
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4289
        this.success.write(oprot);
4290
        oprot.writeFieldEnd();
553 chandransh 4291
      } else if (this.isSetUcex()) {
4292
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4293
        this.ucex.write(oprot);
48 ashish 4294
        oprot.writeFieldEnd();
4295
      }
4296
      oprot.writeFieldStop();
4297
      oprot.writeStructEnd();
4298
    }
4299
 
4300
    @Override
4301
    public String toString() {
553 chandransh 4302
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 4303
      boolean first = true;
4304
 
4305
      sb.append("success:");
4306
      if (this.success == null) {
4307
        sb.append("null");
4308
      } else {
4309
        sb.append(this.success);
4310
      }
4311
      first = false;
4312
      if (!first) sb.append(", ");
553 chandransh 4313
      sb.append("ucex:");
4314
      if (this.ucex == null) {
48 ashish 4315
        sb.append("null");
4316
      } else {
553 chandransh 4317
        sb.append(this.ucex);
48 ashish 4318
      }
4319
      first = false;
4320
      sb.append(")");
4321
      return sb.toString();
4322
    }
4323
 
4324
    public void validate() throws TException {
4325
      // check for required fields
4326
    }
4327
 
4328
  }
4329
 
553 chandransh 4330
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
4331
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 4332
 
4333
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
4334
 
4335
    private long userId;
4336
 
4337
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4338
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4339
      USER_ID((short)1, "userId");
48 ashish 4340
 
4341
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4342
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4343
 
4344
      static {
4345
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4346
          byId.put((int)field._thriftId, field);
4347
          byName.put(field.getFieldName(), field);
4348
        }
4349
      }
4350
 
4351
      /**
4352
       * Find the _Fields constant that matches fieldId, or null if its not found.
4353
       */
4354
      public static _Fields findByThriftId(int fieldId) {
4355
        return byId.get(fieldId);
4356
      }
4357
 
4358
      /**
4359
       * Find the _Fields constant that matches fieldId, throwing an exception
4360
       * if it is not found.
4361
       */
4362
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4363
        _Fields fields = findByThriftId(fieldId);
4364
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4365
        return fields;
4366
      }
4367
 
4368
      /**
4369
       * Find the _Fields constant that matches name, or null if its not found.
4370
       */
4371
      public static _Fields findByName(String name) {
4372
        return byName.get(name);
4373
      }
4374
 
4375
      private final short _thriftId;
4376
      private final String _fieldName;
4377
 
4378
      _Fields(short thriftId, String fieldName) {
4379
        _thriftId = thriftId;
4380
        _fieldName = fieldName;
4381
      }
4382
 
4383
      public short getThriftFieldId() {
4384
        return _thriftId;
4385
      }
4386
 
4387
      public String getFieldName() {
4388
        return _fieldName;
4389
      }
4390
    }
4391
 
4392
    // isset id assignments
4393
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 4394
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 4395
 
4396
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4397
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4398
          new FieldValueMetaData(TType.I64)));
4399
    }});
4400
 
4401
    static {
553 chandransh 4402
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 4403
    }
4404
 
553 chandransh 4405
    public getUserById_args() {
48 ashish 4406
    }
4407
 
553 chandransh 4408
    public getUserById_args(
4409
      long userId)
48 ashish 4410
    {
4411
      this();
4412
      this.userId = userId;
4413
      setUserIdIsSet(true);
4414
    }
4415
 
4416
    /**
4417
     * Performs a deep copy on <i>other</i>.
4418
     */
553 chandransh 4419
    public getUserById_args(getUserById_args other) {
48 ashish 4420
      __isset_bit_vector.clear();
4421
      __isset_bit_vector.or(other.__isset_bit_vector);
4422
      this.userId = other.userId;
4423
    }
4424
 
553 chandransh 4425
    public getUserById_args deepCopy() {
4426
      return new getUserById_args(this);
48 ashish 4427
    }
4428
 
4429
    @Deprecated
553 chandransh 4430
    public getUserById_args clone() {
4431
      return new getUserById_args(this);
48 ashish 4432
    }
4433
 
4434
    public long getUserId() {
4435
      return this.userId;
4436
    }
4437
 
553 chandransh 4438
    public getUserById_args setUserId(long userId) {
48 ashish 4439
      this.userId = userId;
4440
      setUserIdIsSet(true);
4441
      return this;
4442
    }
4443
 
4444
    public void unsetUserId() {
4445
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4446
    }
4447
 
4448
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4449
    public boolean isSetUserId() {
4450
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4451
    }
4452
 
4453
    public void setUserIdIsSet(boolean value) {
4454
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4455
    }
4456
 
4457
    public void setFieldValue(_Fields field, Object value) {
4458
      switch (field) {
4459
      case USER_ID:
4460
        if (value == null) {
4461
          unsetUserId();
4462
        } else {
4463
          setUserId((Long)value);
4464
        }
4465
        break;
4466
 
4467
      }
4468
    }
4469
 
4470
    public void setFieldValue(int fieldID, Object value) {
4471
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4472
    }
4473
 
4474
    public Object getFieldValue(_Fields field) {
4475
      switch (field) {
4476
      case USER_ID:
4477
        return new Long(getUserId());
4478
 
4479
      }
4480
      throw new IllegalStateException();
4481
    }
4482
 
4483
    public Object getFieldValue(int fieldId) {
4484
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4485
    }
4486
 
4487
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4488
    public boolean isSet(_Fields field) {
4489
      switch (field) {
4490
      case USER_ID:
4491
        return isSetUserId();
4492
      }
4493
      throw new IllegalStateException();
4494
    }
4495
 
4496
    public boolean isSet(int fieldID) {
4497
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4498
    }
4499
 
4500
    @Override
4501
    public boolean equals(Object that) {
4502
      if (that == null)
4503
        return false;
553 chandransh 4504
      if (that instanceof getUserById_args)
4505
        return this.equals((getUserById_args)that);
48 ashish 4506
      return false;
4507
    }
4508
 
553 chandransh 4509
    public boolean equals(getUserById_args that) {
48 ashish 4510
      if (that == null)
4511
        return false;
4512
 
4513
      boolean this_present_userId = true;
4514
      boolean that_present_userId = true;
4515
      if (this_present_userId || that_present_userId) {
4516
        if (!(this_present_userId && that_present_userId))
4517
          return false;
4518
        if (this.userId != that.userId)
4519
          return false;
4520
      }
4521
 
4522
      return true;
4523
    }
4524
 
4525
    @Override
4526
    public int hashCode() {
4527
      return 0;
4528
    }
4529
 
553 chandransh 4530
    public int compareTo(getUserById_args other) {
48 ashish 4531
      if (!getClass().equals(other.getClass())) {
4532
        return getClass().getName().compareTo(other.getClass().getName());
4533
      }
4534
 
4535
      int lastComparison = 0;
553 chandransh 4536
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4537
 
4538
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4539
      if (lastComparison != 0) {
4540
        return lastComparison;
4541
      }
4542
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4543
      if (lastComparison != 0) {
4544
        return lastComparison;
4545
      }
4546
      return 0;
4547
    }
4548
 
4549
    public void read(TProtocol iprot) throws TException {
4550
      TField field;
4551
      iprot.readStructBegin();
4552
      while (true)
4553
      {
4554
        field = iprot.readFieldBegin();
4555
        if (field.type == TType.STOP) { 
4556
          break;
4557
        }
4558
        _Fields fieldId = _Fields.findByThriftId(field.id);
4559
        if (fieldId == null) {
4560
          TProtocolUtil.skip(iprot, field.type);
4561
        } else {
4562
          switch (fieldId) {
4563
            case USER_ID:
4564
              if (field.type == TType.I64) {
4565
                this.userId = iprot.readI64();
4566
                setUserIdIsSet(true);
4567
              } else { 
4568
                TProtocolUtil.skip(iprot, field.type);
4569
              }
4570
              break;
4571
          }
4572
          iprot.readFieldEnd();
4573
        }
4574
      }
4575
      iprot.readStructEnd();
4576
      validate();
4577
    }
4578
 
4579
    public void write(TProtocol oprot) throws TException {
4580
      validate();
4581
 
4582
      oprot.writeStructBegin(STRUCT_DESC);
4583
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4584
      oprot.writeI64(this.userId);
4585
      oprot.writeFieldEnd();
4586
      oprot.writeFieldStop();
4587
      oprot.writeStructEnd();
4588
    }
4589
 
4590
    @Override
4591
    public String toString() {
553 chandransh 4592
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4593
      boolean first = true;
4594
 
4595
      sb.append("userId:");
4596
      sb.append(this.userId);
4597
      first = false;
4598
      sb.append(")");
4599
      return sb.toString();
4600
    }
4601
 
4602
    public void validate() throws TException {
4603
      // check for required fields
4604
    }
4605
 
4606
  }
4607
 
571 rajveer 4608
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4609
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4610
 
4611
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4612
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4613
 
553 chandransh 4614
    private User success;
4615
    private UserContextException ucex;
48 ashish 4616
 
4617
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4618
    public enum _Fields implements TFieldIdEnum {
4619
      SUCCESS((short)0, "success"),
553 chandransh 4620
      UCEX((short)1, "ucex");
48 ashish 4621
 
4622
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4623
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4624
 
4625
      static {
4626
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4627
          byId.put((int)field._thriftId, field);
4628
          byName.put(field.getFieldName(), field);
4629
        }
4630
      }
4631
 
4632
      /**
4633
       * Find the _Fields constant that matches fieldId, or null if its not found.
4634
       */
4635
      public static _Fields findByThriftId(int fieldId) {
4636
        return byId.get(fieldId);
4637
      }
4638
 
4639
      /**
4640
       * Find the _Fields constant that matches fieldId, throwing an exception
4641
       * if it is not found.
4642
       */
4643
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4644
        _Fields fields = findByThriftId(fieldId);
4645
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4646
        return fields;
4647
      }
4648
 
4649
      /**
4650
       * Find the _Fields constant that matches name, or null if its not found.
4651
       */
4652
      public static _Fields findByName(String name) {
4653
        return byName.get(name);
4654
      }
4655
 
4656
      private final short _thriftId;
4657
      private final String _fieldName;
4658
 
4659
      _Fields(short thriftId, String fieldName) {
4660
        _thriftId = thriftId;
4661
        _fieldName = fieldName;
4662
      }
4663
 
4664
      public short getThriftFieldId() {
4665
        return _thriftId;
4666
      }
4667
 
4668
      public String getFieldName() {
4669
        return _fieldName;
4670
      }
4671
    }
4672
 
4673
    // isset id assignments
4674
 
4675
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4676
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4677
          new StructMetaData(TType.STRUCT, User.class)));
4678
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4679
          new FieldValueMetaData(TType.STRUCT)));
4680
    }});
4681
 
4682
    static {
553 chandransh 4683
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4684
    }
4685
 
553 chandransh 4686
    public getUserById_result() {
48 ashish 4687
    }
4688
 
553 chandransh 4689
    public getUserById_result(
4690
      User success,
4691
      UserContextException ucex)
48 ashish 4692
    {
4693
      this();
4694
      this.success = success;
553 chandransh 4695
      this.ucex = ucex;
48 ashish 4696
    }
4697
 
4698
    /**
4699
     * Performs a deep copy on <i>other</i>.
4700
     */
553 chandransh 4701
    public getUserById_result(getUserById_result other) {
48 ashish 4702
      if (other.isSetSuccess()) {
553 chandransh 4703
        this.success = new User(other.success);
48 ashish 4704
      }
553 chandransh 4705
      if (other.isSetUcex()) {
4706
        this.ucex = new UserContextException(other.ucex);
48 ashish 4707
      }
4708
    }
4709
 
553 chandransh 4710
    public getUserById_result deepCopy() {
4711
      return new getUserById_result(this);
48 ashish 4712
    }
4713
 
4714
    @Deprecated
553 chandransh 4715
    public getUserById_result clone() {
4716
      return new getUserById_result(this);
48 ashish 4717
    }
4718
 
553 chandransh 4719
    public User getSuccess() {
48 ashish 4720
      return this.success;
4721
    }
4722
 
553 chandransh 4723
    public getUserById_result setSuccess(User success) {
48 ashish 4724
      this.success = success;
4725
      return this;
4726
    }
4727
 
4728
    public void unsetSuccess() {
4729
      this.success = null;
4730
    }
4731
 
4732
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4733
    public boolean isSetSuccess() {
4734
      return this.success != null;
4735
    }
4736
 
4737
    public void setSuccessIsSet(boolean value) {
4738
      if (!value) {
4739
        this.success = null;
4740
      }
4741
    }
4742
 
553 chandransh 4743
    public UserContextException getUcex() {
4744
      return this.ucex;
48 ashish 4745
    }
4746
 
553 chandransh 4747
    public getUserById_result setUcex(UserContextException ucex) {
4748
      this.ucex = ucex;
48 ashish 4749
      return this;
4750
    }
4751
 
553 chandransh 4752
    public void unsetUcex() {
4753
      this.ucex = null;
48 ashish 4754
    }
4755
 
553 chandransh 4756
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4757
    public boolean isSetUcex() {
4758
      return this.ucex != null;
48 ashish 4759
    }
4760
 
553 chandransh 4761
    public void setUcexIsSet(boolean value) {
48 ashish 4762
      if (!value) {
553 chandransh 4763
        this.ucex = null;
48 ashish 4764
      }
4765
    }
4766
 
4767
    public void setFieldValue(_Fields field, Object value) {
4768
      switch (field) {
4769
      case SUCCESS:
4770
        if (value == null) {
4771
          unsetSuccess();
4772
        } else {
553 chandransh 4773
          setSuccess((User)value);
48 ashish 4774
        }
4775
        break;
4776
 
553 chandransh 4777
      case UCEX:
48 ashish 4778
        if (value == null) {
553 chandransh 4779
          unsetUcex();
48 ashish 4780
        } else {
553 chandransh 4781
          setUcex((UserContextException)value);
48 ashish 4782
        }
4783
        break;
4784
 
4785
      }
4786
    }
4787
 
4788
    public void setFieldValue(int fieldID, Object value) {
4789
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4790
    }
4791
 
4792
    public Object getFieldValue(_Fields field) {
4793
      switch (field) {
4794
      case SUCCESS:
4795
        return getSuccess();
4796
 
553 chandransh 4797
      case UCEX:
4798
        return getUcex();
48 ashish 4799
 
4800
      }
4801
      throw new IllegalStateException();
4802
    }
4803
 
4804
    public Object getFieldValue(int fieldId) {
4805
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4806
    }
4807
 
4808
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4809
    public boolean isSet(_Fields field) {
4810
      switch (field) {
4811
      case SUCCESS:
4812
        return isSetSuccess();
553 chandransh 4813
      case UCEX:
4814
        return isSetUcex();
48 ashish 4815
      }
4816
      throw new IllegalStateException();
4817
    }
4818
 
4819
    public boolean isSet(int fieldID) {
4820
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4821
    }
4822
 
4823
    @Override
4824
    public boolean equals(Object that) {
4825
      if (that == null)
4826
        return false;
553 chandransh 4827
      if (that instanceof getUserById_result)
4828
        return this.equals((getUserById_result)that);
48 ashish 4829
      return false;
4830
    }
4831
 
553 chandransh 4832
    public boolean equals(getUserById_result that) {
48 ashish 4833
      if (that == null)
4834
        return false;
4835
 
4836
      boolean this_present_success = true && this.isSetSuccess();
4837
      boolean that_present_success = true && that.isSetSuccess();
4838
      if (this_present_success || that_present_success) {
4839
        if (!(this_present_success && that_present_success))
4840
          return false;
4841
        if (!this.success.equals(that.success))
4842
          return false;
4843
      }
4844
 
553 chandransh 4845
      boolean this_present_ucex = true && this.isSetUcex();
4846
      boolean that_present_ucex = true && that.isSetUcex();
4847
      if (this_present_ucex || that_present_ucex) {
4848
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4849
          return false;
553 chandransh 4850
        if (!this.ucex.equals(that.ucex))
48 ashish 4851
          return false;
4852
      }
4853
 
4854
      return true;
4855
    }
4856
 
4857
    @Override
4858
    public int hashCode() {
4859
      return 0;
4860
    }
4861
 
571 rajveer 4862
    public int compareTo(getUserById_result other) {
4863
      if (!getClass().equals(other.getClass())) {
4864
        return getClass().getName().compareTo(other.getClass().getName());
4865
      }
4866
 
4867
      int lastComparison = 0;
4868
      getUserById_result typedOther = (getUserById_result)other;
4869
 
4870
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4871
      if (lastComparison != 0) {
4872
        return lastComparison;
4873
      }
4874
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4875
      if (lastComparison != 0) {
4876
        return lastComparison;
4877
      }
4878
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4879
      if (lastComparison != 0) {
4880
        return lastComparison;
4881
      }
4882
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4883
      if (lastComparison != 0) {
4884
        return lastComparison;
4885
      }
4886
      return 0;
4887
    }
4888
 
48 ashish 4889
    public void read(TProtocol iprot) throws TException {
4890
      TField field;
4891
      iprot.readStructBegin();
4892
      while (true)
4893
      {
4894
        field = iprot.readFieldBegin();
4895
        if (field.type == TType.STOP) { 
4896
          break;
4897
        }
4898
        _Fields fieldId = _Fields.findByThriftId(field.id);
4899
        if (fieldId == null) {
4900
          TProtocolUtil.skip(iprot, field.type);
4901
        } else {
4902
          switch (fieldId) {
4903
            case SUCCESS:
4904
              if (field.type == TType.STRUCT) {
553 chandransh 4905
                this.success = new User();
48 ashish 4906
                this.success.read(iprot);
4907
              } else { 
4908
                TProtocolUtil.skip(iprot, field.type);
4909
              }
4910
              break;
553 chandransh 4911
            case UCEX:
48 ashish 4912
              if (field.type == TType.STRUCT) {
553 chandransh 4913
                this.ucex = new UserContextException();
4914
                this.ucex.read(iprot);
48 ashish 4915
              } else { 
4916
                TProtocolUtil.skip(iprot, field.type);
4917
              }
4918
              break;
4919
          }
4920
          iprot.readFieldEnd();
4921
        }
4922
      }
4923
      iprot.readStructEnd();
4924
      validate();
4925
    }
4926
 
4927
    public void write(TProtocol oprot) throws TException {
4928
      oprot.writeStructBegin(STRUCT_DESC);
4929
 
4930
      if (this.isSetSuccess()) {
4931
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4932
        this.success.write(oprot);
4933
        oprot.writeFieldEnd();
553 chandransh 4934
      } else if (this.isSetUcex()) {
4935
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4936
        this.ucex.write(oprot);
48 ashish 4937
        oprot.writeFieldEnd();
4938
      }
4939
      oprot.writeFieldStop();
4940
      oprot.writeStructEnd();
4941
    }
4942
 
4943
    @Override
4944
    public String toString() {
553 chandransh 4945
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4946
      boolean first = true;
4947
 
4948
      sb.append("success:");
4949
      if (this.success == null) {
4950
        sb.append("null");
4951
      } else {
4952
        sb.append(this.success);
4953
      }
4954
      first = false;
4955
      if (!first) sb.append(", ");
553 chandransh 4956
      sb.append("ucex:");
4957
      if (this.ucex == null) {
48 ashish 4958
        sb.append("null");
4959
      } else {
553 chandransh 4960
        sb.append(this.ucex);
48 ashish 4961
      }
4962
      first = false;
4963
      sb.append(")");
4964
      return sb.toString();
4965
    }
4966
 
4967
    public void validate() throws TException {
4968
      // check for required fields
4969
    }
4970
 
4971
  }
4972
 
1491 vikas 4973
  public static class getUserByEmail_args implements TBase<getUserByEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserByEmail_args>   {
4974
    private static final TStruct STRUCT_DESC = new TStruct("getUserByEmail_args");
4975
 
4976
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
4977
 
4978
    private String email;
4979
 
4980
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4981
    public enum _Fields implements TFieldIdEnum {
4982
      EMAIL((short)1, "email");
4983
 
4984
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4985
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4986
 
4987
      static {
4988
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4989
          byId.put((int)field._thriftId, field);
4990
          byName.put(field.getFieldName(), field);
4991
        }
4992
      }
4993
 
4994
      /**
4995
       * Find the _Fields constant that matches fieldId, or null if its not found.
4996
       */
4997
      public static _Fields findByThriftId(int fieldId) {
4998
        return byId.get(fieldId);
4999
      }
5000
 
5001
      /**
5002
       * Find the _Fields constant that matches fieldId, throwing an exception
5003
       * if it is not found.
5004
       */
5005
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5006
        _Fields fields = findByThriftId(fieldId);
5007
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5008
        return fields;
5009
      }
5010
 
5011
      /**
5012
       * Find the _Fields constant that matches name, or null if its not found.
5013
       */
5014
      public static _Fields findByName(String name) {
5015
        return byName.get(name);
5016
      }
5017
 
5018
      private final short _thriftId;
5019
      private final String _fieldName;
5020
 
5021
      _Fields(short thriftId, String fieldName) {
5022
        _thriftId = thriftId;
5023
        _fieldName = fieldName;
5024
      }
5025
 
5026
      public short getThriftFieldId() {
5027
        return _thriftId;
5028
      }
5029
 
5030
      public String getFieldName() {
5031
        return _fieldName;
5032
      }
5033
    }
5034
 
5035
    // isset id assignments
5036
 
5037
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5038
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
5039
          new FieldValueMetaData(TType.STRING)));
5040
    }});
5041
 
5042
    static {
5043
      FieldMetaData.addStructMetaDataMap(getUserByEmail_args.class, metaDataMap);
5044
    }
5045
 
5046
    public getUserByEmail_args() {
5047
    }
5048
 
5049
    public getUserByEmail_args(
5050
      String email)
5051
    {
5052
      this();
5053
      this.email = email;
5054
    }
5055
 
5056
    /**
5057
     * Performs a deep copy on <i>other</i>.
5058
     */
5059
    public getUserByEmail_args(getUserByEmail_args other) {
5060
      if (other.isSetEmail()) {
5061
        this.email = other.email;
5062
      }
5063
    }
5064
 
5065
    public getUserByEmail_args deepCopy() {
5066
      return new getUserByEmail_args(this);
5067
    }
5068
 
5069
    @Deprecated
5070
    public getUserByEmail_args clone() {
5071
      return new getUserByEmail_args(this);
5072
    }
5073
 
5074
    public String getEmail() {
5075
      return this.email;
5076
    }
5077
 
5078
    public getUserByEmail_args setEmail(String email) {
5079
      this.email = email;
5080
      return this;
5081
    }
5082
 
5083
    public void unsetEmail() {
5084
      this.email = null;
5085
    }
5086
 
5087
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
5088
    public boolean isSetEmail() {
5089
      return this.email != null;
5090
    }
5091
 
5092
    public void setEmailIsSet(boolean value) {
5093
      if (!value) {
5094
        this.email = null;
5095
      }
5096
    }
5097
 
5098
    public void setFieldValue(_Fields field, Object value) {
5099
      switch (field) {
5100
      case EMAIL:
5101
        if (value == null) {
5102
          unsetEmail();
5103
        } else {
5104
          setEmail((String)value);
5105
        }
5106
        break;
5107
 
5108
      }
5109
    }
5110
 
5111
    public void setFieldValue(int fieldID, Object value) {
5112
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5113
    }
5114
 
5115
    public Object getFieldValue(_Fields field) {
5116
      switch (field) {
5117
      case EMAIL:
5118
        return getEmail();
5119
 
5120
      }
5121
      throw new IllegalStateException();
5122
    }
5123
 
5124
    public Object getFieldValue(int fieldId) {
5125
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5126
    }
5127
 
5128
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5129
    public boolean isSet(_Fields field) {
5130
      switch (field) {
5131
      case EMAIL:
5132
        return isSetEmail();
5133
      }
5134
      throw new IllegalStateException();
5135
    }
5136
 
5137
    public boolean isSet(int fieldID) {
5138
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5139
    }
5140
 
5141
    @Override
5142
    public boolean equals(Object that) {
5143
      if (that == null)
5144
        return false;
5145
      if (that instanceof getUserByEmail_args)
5146
        return this.equals((getUserByEmail_args)that);
5147
      return false;
5148
    }
5149
 
5150
    public boolean equals(getUserByEmail_args that) {
5151
      if (that == null)
5152
        return false;
5153
 
5154
      boolean this_present_email = true && this.isSetEmail();
5155
      boolean that_present_email = true && that.isSetEmail();
5156
      if (this_present_email || that_present_email) {
5157
        if (!(this_present_email && that_present_email))
5158
          return false;
5159
        if (!this.email.equals(that.email))
5160
          return false;
5161
      }
5162
 
5163
      return true;
5164
    }
5165
 
5166
    @Override
5167
    public int hashCode() {
5168
      return 0;
5169
    }
5170
 
5171
    public int compareTo(getUserByEmail_args other) {
5172
      if (!getClass().equals(other.getClass())) {
5173
        return getClass().getName().compareTo(other.getClass().getName());
5174
      }
5175
 
5176
      int lastComparison = 0;
5177
      getUserByEmail_args typedOther = (getUserByEmail_args)other;
5178
 
5179
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
5180
      if (lastComparison != 0) {
5181
        return lastComparison;
5182
      }
5183
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
5184
      if (lastComparison != 0) {
5185
        return lastComparison;
5186
      }
5187
      return 0;
5188
    }
5189
 
5190
    public void read(TProtocol iprot) throws TException {
5191
      TField field;
5192
      iprot.readStructBegin();
5193
      while (true)
5194
      {
5195
        field = iprot.readFieldBegin();
5196
        if (field.type == TType.STOP) { 
5197
          break;
5198
        }
5199
        _Fields fieldId = _Fields.findByThriftId(field.id);
5200
        if (fieldId == null) {
5201
          TProtocolUtil.skip(iprot, field.type);
5202
        } else {
5203
          switch (fieldId) {
5204
            case EMAIL:
5205
              if (field.type == TType.STRING) {
5206
                this.email = iprot.readString();
5207
              } else { 
5208
                TProtocolUtil.skip(iprot, field.type);
5209
              }
5210
              break;
5211
          }
5212
          iprot.readFieldEnd();
5213
        }
5214
      }
5215
      iprot.readStructEnd();
5216
      validate();
5217
    }
5218
 
5219
    public void write(TProtocol oprot) throws TException {
5220
      validate();
5221
 
5222
      oprot.writeStructBegin(STRUCT_DESC);
5223
      if (this.email != null) {
5224
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
5225
        oprot.writeString(this.email);
5226
        oprot.writeFieldEnd();
5227
      }
5228
      oprot.writeFieldStop();
5229
      oprot.writeStructEnd();
5230
    }
5231
 
5232
    @Override
5233
    public String toString() {
5234
      StringBuilder sb = new StringBuilder("getUserByEmail_args(");
5235
      boolean first = true;
5236
 
5237
      sb.append("email:");
5238
      if (this.email == null) {
5239
        sb.append("null");
5240
      } else {
5241
        sb.append(this.email);
5242
      }
5243
      first = false;
5244
      sb.append(")");
5245
      return sb.toString();
5246
    }
5247
 
5248
    public void validate() throws TException {
5249
      // check for required fields
5250
    }
5251
 
5252
  }
5253
 
5254
  public static class getUserByEmail_result implements TBase<getUserByEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserByEmail_result>   {
5255
    private static final TStruct STRUCT_DESC = new TStruct("getUserByEmail_result");
5256
 
5257
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
5258
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
5259
 
5260
    private User success;
5261
    private UserContextException ucex;
5262
 
5263
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5264
    public enum _Fields implements TFieldIdEnum {
5265
      SUCCESS((short)0, "success"),
5266
      UCEX((short)1, "ucex");
5267
 
5268
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5270
 
5271
      static {
5272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5273
          byId.put((int)field._thriftId, field);
5274
          byName.put(field.getFieldName(), field);
5275
        }
5276
      }
5277
 
5278
      /**
5279
       * Find the _Fields constant that matches fieldId, or null if its not found.
5280
       */
5281
      public static _Fields findByThriftId(int fieldId) {
5282
        return byId.get(fieldId);
5283
      }
5284
 
5285
      /**
5286
       * Find the _Fields constant that matches fieldId, throwing an exception
5287
       * if it is not found.
5288
       */
5289
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5290
        _Fields fields = findByThriftId(fieldId);
5291
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5292
        return fields;
5293
      }
5294
 
5295
      /**
5296
       * Find the _Fields constant that matches name, or null if its not found.
5297
       */
5298
      public static _Fields findByName(String name) {
5299
        return byName.get(name);
5300
      }
5301
 
5302
      private final short _thriftId;
5303
      private final String _fieldName;
5304
 
5305
      _Fields(short thriftId, String fieldName) {
5306
        _thriftId = thriftId;
5307
        _fieldName = fieldName;
5308
      }
5309
 
5310
      public short getThriftFieldId() {
5311
        return _thriftId;
5312
      }
5313
 
5314
      public String getFieldName() {
5315
        return _fieldName;
5316
      }
5317
    }
5318
 
5319
    // isset id assignments
5320
 
5321
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5322
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5323
          new StructMetaData(TType.STRUCT, User.class)));
5324
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
5325
          new FieldValueMetaData(TType.STRUCT)));
5326
    }});
5327
 
5328
    static {
5329
      FieldMetaData.addStructMetaDataMap(getUserByEmail_result.class, metaDataMap);
5330
    }
5331
 
5332
    public getUserByEmail_result() {
5333
    }
5334
 
5335
    public getUserByEmail_result(
5336
      User success,
5337
      UserContextException ucex)
5338
    {
5339
      this();
5340
      this.success = success;
5341
      this.ucex = ucex;
5342
    }
5343
 
5344
    /**
5345
     * Performs a deep copy on <i>other</i>.
5346
     */
5347
    public getUserByEmail_result(getUserByEmail_result other) {
5348
      if (other.isSetSuccess()) {
5349
        this.success = new User(other.success);
5350
      }
5351
      if (other.isSetUcex()) {
5352
        this.ucex = new UserContextException(other.ucex);
5353
      }
5354
    }
5355
 
5356
    public getUserByEmail_result deepCopy() {
5357
      return new getUserByEmail_result(this);
5358
    }
5359
 
5360
    @Deprecated
5361
    public getUserByEmail_result clone() {
5362
      return new getUserByEmail_result(this);
5363
    }
5364
 
5365
    public User getSuccess() {
5366
      return this.success;
5367
    }
5368
 
5369
    public getUserByEmail_result setSuccess(User success) {
5370
      this.success = success;
5371
      return this;
5372
    }
5373
 
5374
    public void unsetSuccess() {
5375
      this.success = null;
5376
    }
5377
 
5378
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5379
    public boolean isSetSuccess() {
5380
      return this.success != null;
5381
    }
5382
 
5383
    public void setSuccessIsSet(boolean value) {
5384
      if (!value) {
5385
        this.success = null;
5386
      }
5387
    }
5388
 
5389
    public UserContextException getUcex() {
5390
      return this.ucex;
5391
    }
5392
 
5393
    public getUserByEmail_result setUcex(UserContextException ucex) {
5394
      this.ucex = ucex;
5395
      return this;
5396
    }
5397
 
5398
    public void unsetUcex() {
5399
      this.ucex = null;
5400
    }
5401
 
5402
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5403
    public boolean isSetUcex() {
5404
      return this.ucex != null;
5405
    }
5406
 
5407
    public void setUcexIsSet(boolean value) {
5408
      if (!value) {
5409
        this.ucex = null;
5410
      }
5411
    }
5412
 
5413
    public void setFieldValue(_Fields field, Object value) {
5414
      switch (field) {
5415
      case SUCCESS:
5416
        if (value == null) {
5417
          unsetSuccess();
5418
        } else {
5419
          setSuccess((User)value);
5420
        }
5421
        break;
5422
 
5423
      case UCEX:
5424
        if (value == null) {
5425
          unsetUcex();
5426
        } else {
5427
          setUcex((UserContextException)value);
5428
        }
5429
        break;
5430
 
5431
      }
5432
    }
5433
 
5434
    public void setFieldValue(int fieldID, Object value) {
5435
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5436
    }
5437
 
5438
    public Object getFieldValue(_Fields field) {
5439
      switch (field) {
5440
      case SUCCESS:
5441
        return getSuccess();
5442
 
5443
      case UCEX:
5444
        return getUcex();
5445
 
5446
      }
5447
      throw new IllegalStateException();
5448
    }
5449
 
5450
    public Object getFieldValue(int fieldId) {
5451
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5452
    }
5453
 
5454
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5455
    public boolean isSet(_Fields field) {
5456
      switch (field) {
5457
      case SUCCESS:
5458
        return isSetSuccess();
5459
      case UCEX:
5460
        return isSetUcex();
5461
      }
5462
      throw new IllegalStateException();
5463
    }
5464
 
5465
    public boolean isSet(int fieldID) {
5466
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5467
    }
5468
 
5469
    @Override
5470
    public boolean equals(Object that) {
5471
      if (that == null)
5472
        return false;
5473
      if (that instanceof getUserByEmail_result)
5474
        return this.equals((getUserByEmail_result)that);
5475
      return false;
5476
    }
5477
 
5478
    public boolean equals(getUserByEmail_result that) {
5479
      if (that == null)
5480
        return false;
5481
 
5482
      boolean this_present_success = true && this.isSetSuccess();
5483
      boolean that_present_success = true && that.isSetSuccess();
5484
      if (this_present_success || that_present_success) {
5485
        if (!(this_present_success && that_present_success))
5486
          return false;
5487
        if (!this.success.equals(that.success))
5488
          return false;
5489
      }
5490
 
5491
      boolean this_present_ucex = true && this.isSetUcex();
5492
      boolean that_present_ucex = true && that.isSetUcex();
5493
      if (this_present_ucex || that_present_ucex) {
5494
        if (!(this_present_ucex && that_present_ucex))
5495
          return false;
5496
        if (!this.ucex.equals(that.ucex))
5497
          return false;
5498
      }
5499
 
5500
      return true;
5501
    }
5502
 
5503
    @Override
5504
    public int hashCode() {
5505
      return 0;
5506
    }
5507
 
5508
    public int compareTo(getUserByEmail_result other) {
5509
      if (!getClass().equals(other.getClass())) {
5510
        return getClass().getName().compareTo(other.getClass().getName());
5511
      }
5512
 
5513
      int lastComparison = 0;
5514
      getUserByEmail_result typedOther = (getUserByEmail_result)other;
5515
 
5516
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5517
      if (lastComparison != 0) {
5518
        return lastComparison;
5519
      }
5520
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5521
      if (lastComparison != 0) {
5522
        return lastComparison;
5523
      }
5524
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5525
      if (lastComparison != 0) {
5526
        return lastComparison;
5527
      }
5528
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5529
      if (lastComparison != 0) {
5530
        return lastComparison;
5531
      }
5532
      return 0;
5533
    }
5534
 
5535
    public void read(TProtocol iprot) throws TException {
5536
      TField field;
5537
      iprot.readStructBegin();
5538
      while (true)
5539
      {
5540
        field = iprot.readFieldBegin();
5541
        if (field.type == TType.STOP) { 
5542
          break;
5543
        }
5544
        _Fields fieldId = _Fields.findByThriftId(field.id);
5545
        if (fieldId == null) {
5546
          TProtocolUtil.skip(iprot, field.type);
5547
        } else {
5548
          switch (fieldId) {
5549
            case SUCCESS:
5550
              if (field.type == TType.STRUCT) {
5551
                this.success = new User();
5552
                this.success.read(iprot);
5553
              } else { 
5554
                TProtocolUtil.skip(iprot, field.type);
5555
              }
5556
              break;
5557
            case UCEX:
5558
              if (field.type == TType.STRUCT) {
5559
                this.ucex = new UserContextException();
5560
                this.ucex.read(iprot);
5561
              } else { 
5562
                TProtocolUtil.skip(iprot, field.type);
5563
              }
5564
              break;
5565
          }
5566
          iprot.readFieldEnd();
5567
        }
5568
      }
5569
      iprot.readStructEnd();
5570
      validate();
5571
    }
5572
 
5573
    public void write(TProtocol oprot) throws TException {
5574
      oprot.writeStructBegin(STRUCT_DESC);
5575
 
5576
      if (this.isSetSuccess()) {
5577
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5578
        this.success.write(oprot);
5579
        oprot.writeFieldEnd();
5580
      } else if (this.isSetUcex()) {
5581
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5582
        this.ucex.write(oprot);
5583
        oprot.writeFieldEnd();
5584
      }
5585
      oprot.writeFieldStop();
5586
      oprot.writeStructEnd();
5587
    }
5588
 
5589
    @Override
5590
    public String toString() {
5591
      StringBuilder sb = new StringBuilder("getUserByEmail_result(");
5592
      boolean first = true;
5593
 
5594
      sb.append("success:");
5595
      if (this.success == null) {
5596
        sb.append("null");
5597
      } else {
5598
        sb.append(this.success);
5599
      }
5600
      first = false;
5601
      if (!first) sb.append(", ");
5602
      sb.append("ucex:");
5603
      if (this.ucex == null) {
5604
        sb.append("null");
5605
      } else {
5606
        sb.append(this.ucex);
5607
      }
5608
      first = false;
5609
      sb.append(")");
5610
      return sb.toString();
5611
    }
5612
 
5613
    public void validate() throws TException {
5614
      // check for required fields
5615
    }
5616
 
5617
  }
5618
 
571 rajveer 5619
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 5620
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 5621
 
553 chandransh 5622
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5623
 
553 chandransh 5624
    private User user;
48 ashish 5625
 
5626
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5627
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5628
      USER((short)1, "user");
48 ashish 5629
 
5630
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5631
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5632
 
5633
      static {
5634
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5635
          byId.put((int)field._thriftId, field);
5636
          byName.put(field.getFieldName(), field);
5637
        }
5638
      }
5639
 
5640
      /**
5641
       * Find the _Fields constant that matches fieldId, or null if its not found.
5642
       */
5643
      public static _Fields findByThriftId(int fieldId) {
5644
        return byId.get(fieldId);
5645
      }
5646
 
5647
      /**
5648
       * Find the _Fields constant that matches fieldId, throwing an exception
5649
       * if it is not found.
5650
       */
5651
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5652
        _Fields fields = findByThriftId(fieldId);
5653
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5654
        return fields;
5655
      }
5656
 
5657
      /**
5658
       * Find the _Fields constant that matches name, or null if its not found.
5659
       */
5660
      public static _Fields findByName(String name) {
5661
        return byName.get(name);
5662
      }
5663
 
5664
      private final short _thriftId;
5665
      private final String _fieldName;
5666
 
5667
      _Fields(short thriftId, String fieldName) {
5668
        _thriftId = thriftId;
5669
        _fieldName = fieldName;
5670
      }
5671
 
5672
      public short getThriftFieldId() {
5673
        return _thriftId;
5674
      }
5675
 
5676
      public String getFieldName() {
5677
        return _fieldName;
5678
      }
5679
    }
5680
 
5681
    // isset id assignments
5682
 
5683
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5684
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5685
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5686
    }});
5687
 
5688
    static {
553 chandransh 5689
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 5690
    }
5691
 
553 chandransh 5692
    public createUser_args() {
48 ashish 5693
    }
5694
 
553 chandransh 5695
    public createUser_args(
5696
      User user)
48 ashish 5697
    {
5698
      this();
553 chandransh 5699
      this.user = user;
48 ashish 5700
    }
5701
 
5702
    /**
5703
     * Performs a deep copy on <i>other</i>.
5704
     */
553 chandransh 5705
    public createUser_args(createUser_args other) {
5706
      if (other.isSetUser()) {
5707
        this.user = new User(other.user);
48 ashish 5708
      }
5709
    }
5710
 
553 chandransh 5711
    public createUser_args deepCopy() {
5712
      return new createUser_args(this);
48 ashish 5713
    }
5714
 
5715
    @Deprecated
553 chandransh 5716
    public createUser_args clone() {
5717
      return new createUser_args(this);
48 ashish 5718
    }
5719
 
553 chandransh 5720
    public User getUser() {
5721
      return this.user;
48 ashish 5722
    }
5723
 
553 chandransh 5724
    public createUser_args setUser(User user) {
5725
      this.user = user;
48 ashish 5726
      return this;
5727
    }
5728
 
553 chandransh 5729
    public void unsetUser() {
5730
      this.user = null;
48 ashish 5731
    }
5732
 
553 chandransh 5733
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5734
    public boolean isSetUser() {
5735
      return this.user != null;
48 ashish 5736
    }
5737
 
553 chandransh 5738
    public void setUserIsSet(boolean value) {
48 ashish 5739
      if (!value) {
553 chandransh 5740
        this.user = null;
48 ashish 5741
      }
5742
    }
5743
 
5744
    public void setFieldValue(_Fields field, Object value) {
5745
      switch (field) {
553 chandransh 5746
      case USER:
48 ashish 5747
        if (value == null) {
553 chandransh 5748
          unsetUser();
48 ashish 5749
        } else {
553 chandransh 5750
          setUser((User)value);
48 ashish 5751
        }
5752
        break;
5753
 
5754
      }
5755
    }
5756
 
5757
    public void setFieldValue(int fieldID, Object value) {
5758
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5759
    }
5760
 
5761
    public Object getFieldValue(_Fields field) {
5762
      switch (field) {
553 chandransh 5763
      case USER:
5764
        return getUser();
48 ashish 5765
 
5766
      }
5767
      throw new IllegalStateException();
5768
    }
5769
 
5770
    public Object getFieldValue(int fieldId) {
5771
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5772
    }
5773
 
5774
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5775
    public boolean isSet(_Fields field) {
5776
      switch (field) {
553 chandransh 5777
      case USER:
5778
        return isSetUser();
48 ashish 5779
      }
5780
      throw new IllegalStateException();
5781
    }
5782
 
5783
    public boolean isSet(int fieldID) {
5784
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5785
    }
5786
 
5787
    @Override
5788
    public boolean equals(Object that) {
5789
      if (that == null)
5790
        return false;
553 chandransh 5791
      if (that instanceof createUser_args)
5792
        return this.equals((createUser_args)that);
48 ashish 5793
      return false;
5794
    }
5795
 
553 chandransh 5796
    public boolean equals(createUser_args that) {
48 ashish 5797
      if (that == null)
5798
        return false;
5799
 
553 chandransh 5800
      boolean this_present_user = true && this.isSetUser();
5801
      boolean that_present_user = true && that.isSetUser();
5802
      if (this_present_user || that_present_user) {
5803
        if (!(this_present_user && that_present_user))
48 ashish 5804
          return false;
553 chandransh 5805
        if (!this.user.equals(that.user))
48 ashish 5806
          return false;
5807
      }
5808
 
5809
      return true;
5810
    }
5811
 
5812
    @Override
5813
    public int hashCode() {
5814
      return 0;
5815
    }
5816
 
571 rajveer 5817
    public int compareTo(createUser_args other) {
5818
      if (!getClass().equals(other.getClass())) {
5819
        return getClass().getName().compareTo(other.getClass().getName());
5820
      }
5821
 
5822
      int lastComparison = 0;
5823
      createUser_args typedOther = (createUser_args)other;
5824
 
5825
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5826
      if (lastComparison != 0) {
5827
        return lastComparison;
5828
      }
5829
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5830
      if (lastComparison != 0) {
5831
        return lastComparison;
5832
      }
5833
      return 0;
5834
    }
5835
 
48 ashish 5836
    public void read(TProtocol iprot) throws TException {
5837
      TField field;
5838
      iprot.readStructBegin();
5839
      while (true)
5840
      {
5841
        field = iprot.readFieldBegin();
5842
        if (field.type == TType.STOP) { 
5843
          break;
5844
        }
5845
        _Fields fieldId = _Fields.findByThriftId(field.id);
5846
        if (fieldId == null) {
5847
          TProtocolUtil.skip(iprot, field.type);
5848
        } else {
5849
          switch (fieldId) {
553 chandransh 5850
            case USER:
5851
              if (field.type == TType.STRUCT) {
5852
                this.user = new User();
5853
                this.user.read(iprot);
48 ashish 5854
              } else { 
5855
                TProtocolUtil.skip(iprot, field.type);
5856
              }
5857
              break;
5858
          }
5859
          iprot.readFieldEnd();
5860
        }
5861
      }
5862
      iprot.readStructEnd();
5863
      validate();
5864
    }
5865
 
5866
    public void write(TProtocol oprot) throws TException {
5867
      validate();
5868
 
5869
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5870
      if (this.user != null) {
5871
        oprot.writeFieldBegin(USER_FIELD_DESC);
5872
        this.user.write(oprot);
48 ashish 5873
        oprot.writeFieldEnd();
5874
      }
5875
      oprot.writeFieldStop();
5876
      oprot.writeStructEnd();
5877
    }
5878
 
5879
    @Override
5880
    public String toString() {
553 chandransh 5881
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 5882
      boolean first = true;
5883
 
553 chandransh 5884
      sb.append("user:");
5885
      if (this.user == null) {
48 ashish 5886
        sb.append("null");
5887
      } else {
553 chandransh 5888
        sb.append(this.user);
48 ashish 5889
      }
5890
      first = false;
5891
      sb.append(")");
5892
      return sb.toString();
5893
    }
5894
 
5895
    public void validate() throws TException {
5896
      // check for required fields
5897
    }
5898
 
5899
  }
5900
 
571 rajveer 5901
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 5902
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 5903
 
5904
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5905
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5906
 
553 chandransh 5907
    private User success;
5908
    private UserContextException ucex;
48 ashish 5909
 
5910
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5911
    public enum _Fields implements TFieldIdEnum {
5912
      SUCCESS((short)0, "success"),
553 chandransh 5913
      UCEX((short)1, "ucex");
48 ashish 5914
 
5915
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5916
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5917
 
5918
      static {
5919
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5920
          byId.put((int)field._thriftId, field);
5921
          byName.put(field.getFieldName(), field);
5922
        }
5923
      }
5924
 
5925
      /**
5926
       * Find the _Fields constant that matches fieldId, or null if its not found.
5927
       */
5928
      public static _Fields findByThriftId(int fieldId) {
5929
        return byId.get(fieldId);
5930
      }
5931
 
5932
      /**
5933
       * Find the _Fields constant that matches fieldId, throwing an exception
5934
       * if it is not found.
5935
       */
5936
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5937
        _Fields fields = findByThriftId(fieldId);
5938
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5939
        return fields;
5940
      }
5941
 
5942
      /**
5943
       * Find the _Fields constant that matches name, or null if its not found.
5944
       */
5945
      public static _Fields findByName(String name) {
5946
        return byName.get(name);
5947
      }
5948
 
5949
      private final short _thriftId;
5950
      private final String _fieldName;
5951
 
5952
      _Fields(short thriftId, String fieldName) {
5953
        _thriftId = thriftId;
5954
        _fieldName = fieldName;
5955
      }
5956
 
5957
      public short getThriftFieldId() {
5958
        return _thriftId;
5959
      }
5960
 
5961
      public String getFieldName() {
5962
        return _fieldName;
5963
      }
5964
    }
5965
 
5966
    // isset id assignments
5967
 
5968
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5969
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5970
          new StructMetaData(TType.STRUCT, User.class)));
5971
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5972
          new FieldValueMetaData(TType.STRUCT)));
5973
    }});
5974
 
5975
    static {
553 chandransh 5976
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 5977
    }
5978
 
553 chandransh 5979
    public createUser_result() {
48 ashish 5980
    }
5981
 
553 chandransh 5982
    public createUser_result(
5983
      User success,
5984
      UserContextException ucex)
48 ashish 5985
    {
5986
      this();
5987
      this.success = success;
553 chandransh 5988
      this.ucex = ucex;
48 ashish 5989
    }
5990
 
5991
    /**
5992
     * Performs a deep copy on <i>other</i>.
5993
     */
553 chandransh 5994
    public createUser_result(createUser_result other) {
48 ashish 5995
      if (other.isSetSuccess()) {
553 chandransh 5996
        this.success = new User(other.success);
48 ashish 5997
      }
553 chandransh 5998
      if (other.isSetUcex()) {
5999
        this.ucex = new UserContextException(other.ucex);
48 ashish 6000
      }
6001
    }
6002
 
553 chandransh 6003
    public createUser_result deepCopy() {
6004
      return new createUser_result(this);
48 ashish 6005
    }
6006
 
6007
    @Deprecated
553 chandransh 6008
    public createUser_result clone() {
6009
      return new createUser_result(this);
48 ashish 6010
    }
6011
 
553 chandransh 6012
    public User getSuccess() {
48 ashish 6013
      return this.success;
6014
    }
6015
 
553 chandransh 6016
    public createUser_result setSuccess(User success) {
48 ashish 6017
      this.success = success;
6018
      return this;
6019
    }
6020
 
6021
    public void unsetSuccess() {
6022
      this.success = null;
6023
    }
6024
 
6025
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6026
    public boolean isSetSuccess() {
6027
      return this.success != null;
6028
    }
6029
 
6030
    public void setSuccessIsSet(boolean value) {
6031
      if (!value) {
6032
        this.success = null;
6033
      }
6034
    }
6035
 
553 chandransh 6036
    public UserContextException getUcex() {
6037
      return this.ucex;
48 ashish 6038
    }
6039
 
553 chandransh 6040
    public createUser_result setUcex(UserContextException ucex) {
6041
      this.ucex = ucex;
48 ashish 6042
      return this;
6043
    }
6044
 
553 chandransh 6045
    public void unsetUcex() {
6046
      this.ucex = null;
48 ashish 6047
    }
6048
 
553 chandransh 6049
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6050
    public boolean isSetUcex() {
6051
      return this.ucex != null;
48 ashish 6052
    }
6053
 
553 chandransh 6054
    public void setUcexIsSet(boolean value) {
48 ashish 6055
      if (!value) {
553 chandransh 6056
        this.ucex = null;
48 ashish 6057
      }
6058
    }
6059
 
6060
    public void setFieldValue(_Fields field, Object value) {
6061
      switch (field) {
6062
      case SUCCESS:
6063
        if (value == null) {
6064
          unsetSuccess();
6065
        } else {
553 chandransh 6066
          setSuccess((User)value);
48 ashish 6067
        }
6068
        break;
6069
 
553 chandransh 6070
      case UCEX:
48 ashish 6071
        if (value == null) {
553 chandransh 6072
          unsetUcex();
48 ashish 6073
        } else {
553 chandransh 6074
          setUcex((UserContextException)value);
48 ashish 6075
        }
6076
        break;
6077
 
6078
      }
6079
    }
6080
 
6081
    public void setFieldValue(int fieldID, Object value) {
6082
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6083
    }
6084
 
6085
    public Object getFieldValue(_Fields field) {
6086
      switch (field) {
6087
      case SUCCESS:
6088
        return getSuccess();
6089
 
553 chandransh 6090
      case UCEX:
6091
        return getUcex();
48 ashish 6092
 
6093
      }
6094
      throw new IllegalStateException();
6095
    }
6096
 
6097
    public Object getFieldValue(int fieldId) {
6098
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6099
    }
6100
 
6101
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6102
    public boolean isSet(_Fields field) {
6103
      switch (field) {
6104
      case SUCCESS:
6105
        return isSetSuccess();
553 chandransh 6106
      case UCEX:
6107
        return isSetUcex();
48 ashish 6108
      }
6109
      throw new IllegalStateException();
6110
    }
6111
 
6112
    public boolean isSet(int fieldID) {
6113
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6114
    }
6115
 
6116
    @Override
6117
    public boolean equals(Object that) {
6118
      if (that == null)
6119
        return false;
553 chandransh 6120
      if (that instanceof createUser_result)
6121
        return this.equals((createUser_result)that);
48 ashish 6122
      return false;
6123
    }
6124
 
553 chandransh 6125
    public boolean equals(createUser_result that) {
48 ashish 6126
      if (that == null)
6127
        return false;
6128
 
6129
      boolean this_present_success = true && this.isSetSuccess();
6130
      boolean that_present_success = true && that.isSetSuccess();
6131
      if (this_present_success || that_present_success) {
6132
        if (!(this_present_success && that_present_success))
6133
          return false;
6134
        if (!this.success.equals(that.success))
6135
          return false;
6136
      }
6137
 
553 chandransh 6138
      boolean this_present_ucex = true && this.isSetUcex();
6139
      boolean that_present_ucex = true && that.isSetUcex();
6140
      if (this_present_ucex || that_present_ucex) {
6141
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6142
          return false;
553 chandransh 6143
        if (!this.ucex.equals(that.ucex))
48 ashish 6144
          return false;
6145
      }
6146
 
6147
      return true;
6148
    }
6149
 
6150
    @Override
6151
    public int hashCode() {
6152
      return 0;
6153
    }
6154
 
571 rajveer 6155
    public int compareTo(createUser_result other) {
6156
      if (!getClass().equals(other.getClass())) {
6157
        return getClass().getName().compareTo(other.getClass().getName());
6158
      }
6159
 
6160
      int lastComparison = 0;
6161
      createUser_result typedOther = (createUser_result)other;
6162
 
6163
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6164
      if (lastComparison != 0) {
6165
        return lastComparison;
6166
      }
6167
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6168
      if (lastComparison != 0) {
6169
        return lastComparison;
6170
      }
6171
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6172
      if (lastComparison != 0) {
6173
        return lastComparison;
6174
      }
6175
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6176
      if (lastComparison != 0) {
6177
        return lastComparison;
6178
      }
6179
      return 0;
6180
    }
6181
 
48 ashish 6182
    public void read(TProtocol iprot) throws TException {
6183
      TField field;
6184
      iprot.readStructBegin();
6185
      while (true)
6186
      {
6187
        field = iprot.readFieldBegin();
6188
        if (field.type == TType.STOP) { 
6189
          break;
6190
        }
6191
        _Fields fieldId = _Fields.findByThriftId(field.id);
6192
        if (fieldId == null) {
6193
          TProtocolUtil.skip(iprot, field.type);
6194
        } else {
6195
          switch (fieldId) {
6196
            case SUCCESS:
6197
              if (field.type == TType.STRUCT) {
553 chandransh 6198
                this.success = new User();
48 ashish 6199
                this.success.read(iprot);
6200
              } else { 
6201
                TProtocolUtil.skip(iprot, field.type);
6202
              }
6203
              break;
553 chandransh 6204
            case UCEX:
48 ashish 6205
              if (field.type == TType.STRUCT) {
553 chandransh 6206
                this.ucex = new UserContextException();
6207
                this.ucex.read(iprot);
48 ashish 6208
              } else { 
6209
                TProtocolUtil.skip(iprot, field.type);
6210
              }
6211
              break;
6212
          }
6213
          iprot.readFieldEnd();
6214
        }
6215
      }
6216
      iprot.readStructEnd();
6217
      validate();
6218
    }
6219
 
6220
    public void write(TProtocol oprot) throws TException {
6221
      oprot.writeStructBegin(STRUCT_DESC);
6222
 
6223
      if (this.isSetSuccess()) {
6224
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6225
        this.success.write(oprot);
6226
        oprot.writeFieldEnd();
553 chandransh 6227
      } else if (this.isSetUcex()) {
6228
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6229
        this.ucex.write(oprot);
48 ashish 6230
        oprot.writeFieldEnd();
6231
      }
6232
      oprot.writeFieldStop();
6233
      oprot.writeStructEnd();
6234
    }
6235
 
6236
    @Override
6237
    public String toString() {
553 chandransh 6238
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 6239
      boolean first = true;
6240
 
6241
      sb.append("success:");
6242
      if (this.success == null) {
6243
        sb.append("null");
6244
      } else {
6245
        sb.append(this.success);
6246
      }
6247
      first = false;
6248
      if (!first) sb.append(", ");
553 chandransh 6249
      sb.append("ucex:");
6250
      if (this.ucex == null) {
48 ashish 6251
        sb.append("null");
6252
      } else {
553 chandransh 6253
        sb.append(this.ucex);
48 ashish 6254
      }
6255
      first = false;
6256
      sb.append(")");
6257
      return sb.toString();
6258
    }
6259
 
6260
    public void validate() throws TException {
6261
      // check for required fields
6262
    }
6263
 
6264
  }
6265
 
571 rajveer 6266
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 6267
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 6268
 
553 chandransh 6269
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 6270
 
553 chandransh 6271
    private User user;
48 ashish 6272
 
6273
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6274
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6275
      USER((short)1, "user");
48 ashish 6276
 
6277
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6278
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6279
 
6280
      static {
6281
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6282
          byId.put((int)field._thriftId, field);
6283
          byName.put(field.getFieldName(), field);
6284
        }
6285
      }
6286
 
6287
      /**
6288
       * Find the _Fields constant that matches fieldId, or null if its not found.
6289
       */
6290
      public static _Fields findByThriftId(int fieldId) {
6291
        return byId.get(fieldId);
6292
      }
6293
 
6294
      /**
6295
       * Find the _Fields constant that matches fieldId, throwing an exception
6296
       * if it is not found.
6297
       */
6298
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6299
        _Fields fields = findByThriftId(fieldId);
6300
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6301
        return fields;
6302
      }
6303
 
6304
      /**
6305
       * Find the _Fields constant that matches name, or null if its not found.
6306
       */
6307
      public static _Fields findByName(String name) {
6308
        return byName.get(name);
6309
      }
6310
 
6311
      private final short _thriftId;
6312
      private final String _fieldName;
6313
 
6314
      _Fields(short thriftId, String fieldName) {
6315
        _thriftId = thriftId;
6316
        _fieldName = fieldName;
6317
      }
6318
 
6319
      public short getThriftFieldId() {
6320
        return _thriftId;
6321
      }
6322
 
6323
      public String getFieldName() {
6324
        return _fieldName;
6325
      }
6326
    }
6327
 
6328
    // isset id assignments
6329
 
6330
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 6331
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
6332
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 6333
    }});
6334
 
6335
    static {
553 chandransh 6336
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 6337
    }
6338
 
553 chandransh 6339
    public updateUser_args() {
48 ashish 6340
    }
6341
 
553 chandransh 6342
    public updateUser_args(
6343
      User user)
48 ashish 6344
    {
6345
      this();
553 chandransh 6346
      this.user = user;
48 ashish 6347
    }
6348
 
6349
    /**
6350
     * Performs a deep copy on <i>other</i>.
6351
     */
553 chandransh 6352
    public updateUser_args(updateUser_args other) {
6353
      if (other.isSetUser()) {
6354
        this.user = new User(other.user);
6355
      }
48 ashish 6356
    }
6357
 
553 chandransh 6358
    public updateUser_args deepCopy() {
6359
      return new updateUser_args(this);
48 ashish 6360
    }
6361
 
6362
    @Deprecated
553 chandransh 6363
    public updateUser_args clone() {
6364
      return new updateUser_args(this);
48 ashish 6365
    }
6366
 
553 chandransh 6367
    public User getUser() {
6368
      return this.user;
48 ashish 6369
    }
6370
 
553 chandransh 6371
    public updateUser_args setUser(User user) {
6372
      this.user = user;
48 ashish 6373
      return this;
6374
    }
6375
 
553 chandransh 6376
    public void unsetUser() {
6377
      this.user = null;
48 ashish 6378
    }
6379
 
553 chandransh 6380
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
6381
    public boolean isSetUser() {
6382
      return this.user != null;
48 ashish 6383
    }
6384
 
553 chandransh 6385
    public void setUserIsSet(boolean value) {
6386
      if (!value) {
6387
        this.user = null;
6388
      }
48 ashish 6389
    }
6390
 
6391
    public void setFieldValue(_Fields field, Object value) {
6392
      switch (field) {
553 chandransh 6393
      case USER:
48 ashish 6394
        if (value == null) {
553 chandransh 6395
          unsetUser();
48 ashish 6396
        } else {
553 chandransh 6397
          setUser((User)value);
48 ashish 6398
        }
6399
        break;
6400
 
6401
      }
6402
    }
6403
 
6404
    public void setFieldValue(int fieldID, Object value) {
6405
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6406
    }
6407
 
6408
    public Object getFieldValue(_Fields field) {
6409
      switch (field) {
553 chandransh 6410
      case USER:
6411
        return getUser();
48 ashish 6412
 
6413
      }
6414
      throw new IllegalStateException();
6415
    }
6416
 
6417
    public Object getFieldValue(int fieldId) {
6418
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6419
    }
6420
 
6421
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6422
    public boolean isSet(_Fields field) {
6423
      switch (field) {
553 chandransh 6424
      case USER:
6425
        return isSetUser();
48 ashish 6426
      }
6427
      throw new IllegalStateException();
6428
    }
6429
 
6430
    public boolean isSet(int fieldID) {
6431
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6432
    }
6433
 
6434
    @Override
6435
    public boolean equals(Object that) {
6436
      if (that == null)
6437
        return false;
553 chandransh 6438
      if (that instanceof updateUser_args)
6439
        return this.equals((updateUser_args)that);
48 ashish 6440
      return false;
6441
    }
6442
 
553 chandransh 6443
    public boolean equals(updateUser_args that) {
48 ashish 6444
      if (that == null)
6445
        return false;
6446
 
553 chandransh 6447
      boolean this_present_user = true && this.isSetUser();
6448
      boolean that_present_user = true && that.isSetUser();
6449
      if (this_present_user || that_present_user) {
6450
        if (!(this_present_user && that_present_user))
48 ashish 6451
          return false;
553 chandransh 6452
        if (!this.user.equals(that.user))
48 ashish 6453
          return false;
6454
      }
6455
 
6456
      return true;
6457
    }
6458
 
6459
    @Override
6460
    public int hashCode() {
6461
      return 0;
6462
    }
6463
 
571 rajveer 6464
    public int compareTo(updateUser_args other) {
6465
      if (!getClass().equals(other.getClass())) {
6466
        return getClass().getName().compareTo(other.getClass().getName());
6467
      }
6468
 
6469
      int lastComparison = 0;
6470
      updateUser_args typedOther = (updateUser_args)other;
6471
 
6472
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
6473
      if (lastComparison != 0) {
6474
        return lastComparison;
6475
      }
6476
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
6477
      if (lastComparison != 0) {
6478
        return lastComparison;
6479
      }
6480
      return 0;
6481
    }
6482
 
48 ashish 6483
    public void read(TProtocol iprot) throws TException {
6484
      TField field;
6485
      iprot.readStructBegin();
6486
      while (true)
6487
      {
6488
        field = iprot.readFieldBegin();
6489
        if (field.type == TType.STOP) { 
6490
          break;
6491
        }
6492
        _Fields fieldId = _Fields.findByThriftId(field.id);
6493
        if (fieldId == null) {
6494
          TProtocolUtil.skip(iprot, field.type);
6495
        } else {
6496
          switch (fieldId) {
553 chandransh 6497
            case USER:
6498
              if (field.type == TType.STRUCT) {
6499
                this.user = new User();
6500
                this.user.read(iprot);
48 ashish 6501
              } else { 
6502
                TProtocolUtil.skip(iprot, field.type);
6503
              }
6504
              break;
6505
          }
6506
          iprot.readFieldEnd();
6507
        }
6508
      }
6509
      iprot.readStructEnd();
6510
      validate();
6511
    }
6512
 
6513
    public void write(TProtocol oprot) throws TException {
6514
      validate();
6515
 
6516
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 6517
      if (this.user != null) {
6518
        oprot.writeFieldBegin(USER_FIELD_DESC);
6519
        this.user.write(oprot);
6520
        oprot.writeFieldEnd();
6521
      }
48 ashish 6522
      oprot.writeFieldStop();
6523
      oprot.writeStructEnd();
6524
    }
6525
 
6526
    @Override
6527
    public String toString() {
553 chandransh 6528
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 6529
      boolean first = true;
6530
 
553 chandransh 6531
      sb.append("user:");
6532
      if (this.user == null) {
6533
        sb.append("null");
6534
      } else {
6535
        sb.append(this.user);
6536
      }
48 ashish 6537
      first = false;
6538
      sb.append(")");
6539
      return sb.toString();
6540
    }
6541
 
6542
    public void validate() throws TException {
6543
      // check for required fields
6544
    }
6545
 
6546
  }
6547
 
571 rajveer 6548
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 6549
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 6550
 
6551
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6552
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6553
 
553 chandransh 6554
    private User success;
6555
    private UserContextException ucex;
48 ashish 6556
 
6557
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6558
    public enum _Fields implements TFieldIdEnum {
6559
      SUCCESS((short)0, "success"),
553 chandransh 6560
      UCEX((short)1, "ucex");
48 ashish 6561
 
6562
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6563
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6564
 
6565
      static {
6566
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6567
          byId.put((int)field._thriftId, field);
6568
          byName.put(field.getFieldName(), field);
6569
        }
6570
      }
6571
 
6572
      /**
6573
       * Find the _Fields constant that matches fieldId, or null if its not found.
6574
       */
6575
      public static _Fields findByThriftId(int fieldId) {
6576
        return byId.get(fieldId);
6577
      }
6578
 
6579
      /**
6580
       * Find the _Fields constant that matches fieldId, throwing an exception
6581
       * if it is not found.
6582
       */
6583
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6584
        _Fields fields = findByThriftId(fieldId);
6585
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6586
        return fields;
6587
      }
6588
 
6589
      /**
6590
       * Find the _Fields constant that matches name, or null if its not found.
6591
       */
6592
      public static _Fields findByName(String name) {
6593
        return byName.get(name);
6594
      }
6595
 
6596
      private final short _thriftId;
6597
      private final String _fieldName;
6598
 
6599
      _Fields(short thriftId, String fieldName) {
6600
        _thriftId = thriftId;
6601
        _fieldName = fieldName;
6602
      }
6603
 
6604
      public short getThriftFieldId() {
6605
        return _thriftId;
6606
      }
6607
 
6608
      public String getFieldName() {
6609
        return _fieldName;
6610
      }
6611
    }
6612
 
6613
    // isset id assignments
6614
 
6615
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6616
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6617
          new StructMetaData(TType.STRUCT, User.class)));
6618
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6619
          new FieldValueMetaData(TType.STRUCT)));
6620
    }});
6621
 
6622
    static {
553 chandransh 6623
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 6624
    }
6625
 
553 chandransh 6626
    public updateUser_result() {
48 ashish 6627
    }
6628
 
553 chandransh 6629
    public updateUser_result(
6630
      User success,
6631
      UserContextException ucex)
48 ashish 6632
    {
6633
      this();
6634
      this.success = success;
553 chandransh 6635
      this.ucex = ucex;
48 ashish 6636
    }
6637
 
6638
    /**
6639
     * Performs a deep copy on <i>other</i>.
6640
     */
553 chandransh 6641
    public updateUser_result(updateUser_result other) {
48 ashish 6642
      if (other.isSetSuccess()) {
553 chandransh 6643
        this.success = new User(other.success);
48 ashish 6644
      }
553 chandransh 6645
      if (other.isSetUcex()) {
6646
        this.ucex = new UserContextException(other.ucex);
48 ashish 6647
      }
6648
    }
6649
 
553 chandransh 6650
    public updateUser_result deepCopy() {
6651
      return new updateUser_result(this);
48 ashish 6652
    }
6653
 
6654
    @Deprecated
553 chandransh 6655
    public updateUser_result clone() {
6656
      return new updateUser_result(this);
48 ashish 6657
    }
6658
 
553 chandransh 6659
    public User getSuccess() {
48 ashish 6660
      return this.success;
6661
    }
6662
 
553 chandransh 6663
    public updateUser_result setSuccess(User success) {
48 ashish 6664
      this.success = success;
6665
      return this;
6666
    }
6667
 
6668
    public void unsetSuccess() {
6669
      this.success = null;
6670
    }
6671
 
6672
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6673
    public boolean isSetSuccess() {
6674
      return this.success != null;
6675
    }
6676
 
6677
    public void setSuccessIsSet(boolean value) {
6678
      if (!value) {
6679
        this.success = null;
6680
      }
6681
    }
6682
 
553 chandransh 6683
    public UserContextException getUcex() {
6684
      return this.ucex;
48 ashish 6685
    }
6686
 
553 chandransh 6687
    public updateUser_result setUcex(UserContextException ucex) {
6688
      this.ucex = ucex;
48 ashish 6689
      return this;
6690
    }
6691
 
553 chandransh 6692
    public void unsetUcex() {
6693
      this.ucex = null;
48 ashish 6694
    }
6695
 
553 chandransh 6696
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6697
    public boolean isSetUcex() {
6698
      return this.ucex != null;
48 ashish 6699
    }
6700
 
553 chandransh 6701
    public void setUcexIsSet(boolean value) {
48 ashish 6702
      if (!value) {
553 chandransh 6703
        this.ucex = null;
48 ashish 6704
      }
6705
    }
6706
 
6707
    public void setFieldValue(_Fields field, Object value) {
6708
      switch (field) {
6709
      case SUCCESS:
6710
        if (value == null) {
6711
          unsetSuccess();
6712
        } else {
553 chandransh 6713
          setSuccess((User)value);
48 ashish 6714
        }
6715
        break;
6716
 
553 chandransh 6717
      case UCEX:
48 ashish 6718
        if (value == null) {
553 chandransh 6719
          unsetUcex();
48 ashish 6720
        } else {
553 chandransh 6721
          setUcex((UserContextException)value);
48 ashish 6722
        }
6723
        break;
6724
 
6725
      }
6726
    }
6727
 
6728
    public void setFieldValue(int fieldID, Object value) {
6729
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6730
    }
6731
 
6732
    public Object getFieldValue(_Fields field) {
6733
      switch (field) {
6734
      case SUCCESS:
6735
        return getSuccess();
6736
 
553 chandransh 6737
      case UCEX:
6738
        return getUcex();
48 ashish 6739
 
6740
      }
6741
      throw new IllegalStateException();
6742
    }
6743
 
6744
    public Object getFieldValue(int fieldId) {
6745
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6746
    }
6747
 
6748
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6749
    public boolean isSet(_Fields field) {
6750
      switch (field) {
6751
      case SUCCESS:
6752
        return isSetSuccess();
553 chandransh 6753
      case UCEX:
6754
        return isSetUcex();
48 ashish 6755
      }
6756
      throw new IllegalStateException();
6757
    }
6758
 
6759
    public boolean isSet(int fieldID) {
6760
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6761
    }
6762
 
6763
    @Override
6764
    public boolean equals(Object that) {
6765
      if (that == null)
6766
        return false;
553 chandransh 6767
      if (that instanceof updateUser_result)
6768
        return this.equals((updateUser_result)that);
48 ashish 6769
      return false;
6770
    }
6771
 
553 chandransh 6772
    public boolean equals(updateUser_result that) {
48 ashish 6773
      if (that == null)
6774
        return false;
6775
 
6776
      boolean this_present_success = true && this.isSetSuccess();
6777
      boolean that_present_success = true && that.isSetSuccess();
6778
      if (this_present_success || that_present_success) {
6779
        if (!(this_present_success && that_present_success))
6780
          return false;
6781
        if (!this.success.equals(that.success))
6782
          return false;
6783
      }
6784
 
553 chandransh 6785
      boolean this_present_ucex = true && this.isSetUcex();
6786
      boolean that_present_ucex = true && that.isSetUcex();
6787
      if (this_present_ucex || that_present_ucex) {
6788
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6789
          return false;
553 chandransh 6790
        if (!this.ucex.equals(that.ucex))
48 ashish 6791
          return false;
6792
      }
6793
 
6794
      return true;
6795
    }
6796
 
6797
    @Override
6798
    public int hashCode() {
6799
      return 0;
6800
    }
6801
 
571 rajveer 6802
    public int compareTo(updateUser_result other) {
6803
      if (!getClass().equals(other.getClass())) {
6804
        return getClass().getName().compareTo(other.getClass().getName());
6805
      }
6806
 
6807
      int lastComparison = 0;
6808
      updateUser_result typedOther = (updateUser_result)other;
6809
 
6810
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6811
      if (lastComparison != 0) {
6812
        return lastComparison;
6813
      }
6814
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6815
      if (lastComparison != 0) {
6816
        return lastComparison;
6817
      }
6818
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6819
      if (lastComparison != 0) {
6820
        return lastComparison;
6821
      }
6822
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6823
      if (lastComparison != 0) {
6824
        return lastComparison;
6825
      }
6826
      return 0;
6827
    }
6828
 
48 ashish 6829
    public void read(TProtocol iprot) throws TException {
6830
      TField field;
6831
      iprot.readStructBegin();
6832
      while (true)
6833
      {
6834
        field = iprot.readFieldBegin();
6835
        if (field.type == TType.STOP) { 
6836
          break;
6837
        }
6838
        _Fields fieldId = _Fields.findByThriftId(field.id);
6839
        if (fieldId == null) {
6840
          TProtocolUtil.skip(iprot, field.type);
6841
        } else {
6842
          switch (fieldId) {
6843
            case SUCCESS:
6844
              if (field.type == TType.STRUCT) {
553 chandransh 6845
                this.success = new User();
48 ashish 6846
                this.success.read(iprot);
6847
              } else { 
6848
                TProtocolUtil.skip(iprot, field.type);
6849
              }
6850
              break;
553 chandransh 6851
            case UCEX:
48 ashish 6852
              if (field.type == TType.STRUCT) {
553 chandransh 6853
                this.ucex = new UserContextException();
6854
                this.ucex.read(iprot);
48 ashish 6855
              } else { 
6856
                TProtocolUtil.skip(iprot, field.type);
6857
              }
6858
              break;
6859
          }
6860
          iprot.readFieldEnd();
6861
        }
6862
      }
6863
      iprot.readStructEnd();
6864
      validate();
6865
    }
6866
 
6867
    public void write(TProtocol oprot) throws TException {
6868
      oprot.writeStructBegin(STRUCT_DESC);
6869
 
6870
      if (this.isSetSuccess()) {
6871
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6872
        this.success.write(oprot);
6873
        oprot.writeFieldEnd();
553 chandransh 6874
      } else if (this.isSetUcex()) {
6875
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6876
        this.ucex.write(oprot);
48 ashish 6877
        oprot.writeFieldEnd();
6878
      }
6879
      oprot.writeFieldStop();
6880
      oprot.writeStructEnd();
6881
    }
6882
 
6883
    @Override
6884
    public String toString() {
553 chandransh 6885
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 6886
      boolean first = true;
6887
 
6888
      sb.append("success:");
6889
      if (this.success == null) {
6890
        sb.append("null");
6891
      } else {
6892
        sb.append(this.success);
6893
      }
6894
      first = false;
6895
      if (!first) sb.append(", ");
553 chandransh 6896
      sb.append("ucex:");
6897
      if (this.ucex == null) {
48 ashish 6898
        sb.append("null");
6899
      } else {
553 chandransh 6900
        sb.append(this.ucex);
48 ashish 6901
      }
6902
      first = false;
6903
      sb.append(")");
6904
      return sb.toString();
6905
    }
6906
 
6907
    public void validate() throws TException {
6908
      // check for required fields
6909
    }
6910
 
6911
  }
6912
 
553 chandransh 6913
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
6914
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 6915
 
6916
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6917
 
6918
    private long userId;
6919
 
6920
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6921
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6922
      USER_ID((short)1, "userId");
48 ashish 6923
 
6924
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6925
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6926
 
6927
      static {
6928
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6929
          byId.put((int)field._thriftId, field);
6930
          byName.put(field.getFieldName(), field);
6931
        }
6932
      }
6933
 
6934
      /**
6935
       * Find the _Fields constant that matches fieldId, or null if its not found.
6936
       */
6937
      public static _Fields findByThriftId(int fieldId) {
6938
        return byId.get(fieldId);
6939
      }
6940
 
6941
      /**
6942
       * Find the _Fields constant that matches fieldId, throwing an exception
6943
       * if it is not found.
6944
       */
6945
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6946
        _Fields fields = findByThriftId(fieldId);
6947
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6948
        return fields;
6949
      }
6950
 
6951
      /**
6952
       * Find the _Fields constant that matches name, or null if its not found.
6953
       */
6954
      public static _Fields findByName(String name) {
6955
        return byName.get(name);
6956
      }
6957
 
6958
      private final short _thriftId;
6959
      private final String _fieldName;
6960
 
6961
      _Fields(short thriftId, String fieldName) {
6962
        _thriftId = thriftId;
6963
        _fieldName = fieldName;
6964
      }
6965
 
6966
      public short getThriftFieldId() {
6967
        return _thriftId;
6968
      }
6969
 
6970
      public String getFieldName() {
6971
        return _fieldName;
6972
      }
6973
    }
6974
 
6975
    // isset id assignments
6976
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6977
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6978
 
6979
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6980
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6981
          new FieldValueMetaData(TType.I64)));
6982
    }});
6983
 
6984
    static {
553 chandransh 6985
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 6986
    }
6987
 
553 chandransh 6988
    public deleteUser_args() {
48 ashish 6989
    }
6990
 
553 chandransh 6991
    public deleteUser_args(
6992
      long userId)
48 ashish 6993
    {
6994
      this();
6995
      this.userId = userId;
6996
      setUserIdIsSet(true);
6997
    }
6998
 
6999
    /**
7000
     * Performs a deep copy on <i>other</i>.
7001
     */
553 chandransh 7002
    public deleteUser_args(deleteUser_args other) {
48 ashish 7003
      __isset_bit_vector.clear();
7004
      __isset_bit_vector.or(other.__isset_bit_vector);
7005
      this.userId = other.userId;
7006
    }
7007
 
553 chandransh 7008
    public deleteUser_args deepCopy() {
7009
      return new deleteUser_args(this);
48 ashish 7010
    }
7011
 
7012
    @Deprecated
553 chandransh 7013
    public deleteUser_args clone() {
7014
      return new deleteUser_args(this);
48 ashish 7015
    }
7016
 
7017
    public long getUserId() {
7018
      return this.userId;
7019
    }
7020
 
553 chandransh 7021
    public deleteUser_args setUserId(long userId) {
48 ashish 7022
      this.userId = userId;
7023
      setUserIdIsSet(true);
7024
      return this;
7025
    }
7026
 
7027
    public void unsetUserId() {
7028
      __isset_bit_vector.clear(__USERID_ISSET_ID);
7029
    }
7030
 
7031
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
7032
    public boolean isSetUserId() {
7033
      return __isset_bit_vector.get(__USERID_ISSET_ID);
7034
    }
7035
 
7036
    public void setUserIdIsSet(boolean value) {
7037
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
7038
    }
7039
 
7040
    public void setFieldValue(_Fields field, Object value) {
7041
      switch (field) {
7042
      case USER_ID:
7043
        if (value == null) {
7044
          unsetUserId();
7045
        } else {
7046
          setUserId((Long)value);
7047
        }
7048
        break;
7049
 
7050
      }
7051
    }
7052
 
7053
    public void setFieldValue(int fieldID, Object value) {
7054
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7055
    }
7056
 
7057
    public Object getFieldValue(_Fields field) {
7058
      switch (field) {
7059
      case USER_ID:
7060
        return new Long(getUserId());
7061
 
7062
      }
7063
      throw new IllegalStateException();
7064
    }
7065
 
7066
    public Object getFieldValue(int fieldId) {
7067
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7068
    }
7069
 
7070
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7071
    public boolean isSet(_Fields field) {
7072
      switch (field) {
7073
      case USER_ID:
7074
        return isSetUserId();
7075
      }
7076
      throw new IllegalStateException();
7077
    }
7078
 
7079
    public boolean isSet(int fieldID) {
7080
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7081
    }
7082
 
7083
    @Override
7084
    public boolean equals(Object that) {
7085
      if (that == null)
7086
        return false;
553 chandransh 7087
      if (that instanceof deleteUser_args)
7088
        return this.equals((deleteUser_args)that);
48 ashish 7089
      return false;
7090
    }
7091
 
553 chandransh 7092
    public boolean equals(deleteUser_args that) {
48 ashish 7093
      if (that == null)
7094
        return false;
7095
 
7096
      boolean this_present_userId = true;
7097
      boolean that_present_userId = true;
7098
      if (this_present_userId || that_present_userId) {
7099
        if (!(this_present_userId && that_present_userId))
7100
          return false;
7101
        if (this.userId != that.userId)
7102
          return false;
7103
      }
7104
 
7105
      return true;
7106
    }
7107
 
7108
    @Override
7109
    public int hashCode() {
7110
      return 0;
7111
    }
7112
 
553 chandransh 7113
    public int compareTo(deleteUser_args other) {
48 ashish 7114
      if (!getClass().equals(other.getClass())) {
7115
        return getClass().getName().compareTo(other.getClass().getName());
7116
      }
7117
 
7118
      int lastComparison = 0;
553 chandransh 7119
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 7120
 
7121
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
7122
      if (lastComparison != 0) {
7123
        return lastComparison;
7124
      }
7125
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
7126
      if (lastComparison != 0) {
7127
        return lastComparison;
7128
      }
7129
      return 0;
7130
    }
7131
 
7132
    public void read(TProtocol iprot) throws TException {
7133
      TField field;
7134
      iprot.readStructBegin();
7135
      while (true)
7136
      {
7137
        field = iprot.readFieldBegin();
7138
        if (field.type == TType.STOP) { 
7139
          break;
7140
        }
7141
        _Fields fieldId = _Fields.findByThriftId(field.id);
7142
        if (fieldId == null) {
7143
          TProtocolUtil.skip(iprot, field.type);
7144
        } else {
7145
          switch (fieldId) {
7146
            case USER_ID:
7147
              if (field.type == TType.I64) {
7148
                this.userId = iprot.readI64();
7149
                setUserIdIsSet(true);
7150
              } else { 
7151
                TProtocolUtil.skip(iprot, field.type);
7152
              }
7153
              break;
7154
          }
7155
          iprot.readFieldEnd();
7156
        }
7157
      }
7158
      iprot.readStructEnd();
7159
      validate();
7160
    }
7161
 
7162
    public void write(TProtocol oprot) throws TException {
7163
      validate();
7164
 
7165
      oprot.writeStructBegin(STRUCT_DESC);
7166
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
7167
      oprot.writeI64(this.userId);
7168
      oprot.writeFieldEnd();
7169
      oprot.writeFieldStop();
7170
      oprot.writeStructEnd();
7171
    }
7172
 
7173
    @Override
7174
    public String toString() {
553 chandransh 7175
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 7176
      boolean first = true;
7177
 
7178
      sb.append("userId:");
7179
      sb.append(this.userId);
7180
      first = false;
7181
      sb.append(")");
7182
      return sb.toString();
7183
    }
7184
 
7185
    public void validate() throws TException {
7186
      // check for required fields
7187
    }
7188
 
7189
  }
7190
 
553 chandransh 7191
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
7192
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 7193
 
553 chandransh 7194
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7195
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 7196
 
553 chandransh 7197
    private boolean success;
7198
    private UserContextException ucex;
48 ashish 7199
 
7200
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7201
    public enum _Fields implements TFieldIdEnum {
7202
      SUCCESS((short)0, "success"),
553 chandransh 7203
      UCEX((short)1, "ucex");
48 ashish 7204
 
7205
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7206
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7207
 
7208
      static {
7209
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7210
          byId.put((int)field._thriftId, field);
7211
          byName.put(field.getFieldName(), field);
7212
        }
7213
      }
7214
 
7215
      /**
7216
       * Find the _Fields constant that matches fieldId, or null if its not found.
7217
       */
7218
      public static _Fields findByThriftId(int fieldId) {
7219
        return byId.get(fieldId);
7220
      }
7221
 
7222
      /**
7223
       * Find the _Fields constant that matches fieldId, throwing an exception
7224
       * if it is not found.
7225
       */
7226
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7227
        _Fields fields = findByThriftId(fieldId);
7228
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7229
        return fields;
7230
      }
7231
 
7232
      /**
7233
       * Find the _Fields constant that matches name, or null if its not found.
7234
       */
7235
      public static _Fields findByName(String name) {
7236
        return byName.get(name);
7237
      }
7238
 
7239
      private final short _thriftId;
7240
      private final String _fieldName;
7241
 
7242
      _Fields(short thriftId, String fieldName) {
7243
        _thriftId = thriftId;
7244
        _fieldName = fieldName;
7245
      }
7246
 
7247
      public short getThriftFieldId() {
7248
        return _thriftId;
7249
      }
7250
 
7251
      public String getFieldName() {
7252
        return _fieldName;
7253
      }
7254
    }
7255
 
7256
    // isset id assignments
553 chandransh 7257
    private static final int __SUCCESS_ISSET_ID = 0;
7258
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 7259
 
7260
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7261
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7262
          new FieldValueMetaData(TType.BOOL)));
7263
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 7264
          new FieldValueMetaData(TType.STRUCT)));
7265
    }});
7266
 
7267
    static {
553 chandransh 7268
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 7269
    }
7270
 
553 chandransh 7271
    public deleteUser_result() {
48 ashish 7272
    }
7273
 
553 chandransh 7274
    public deleteUser_result(
7275
      boolean success,
7276
      UserContextException ucex)
48 ashish 7277
    {
7278
      this();
7279
      this.success = success;
553 chandransh 7280
      setSuccessIsSet(true);
7281
      this.ucex = ucex;
48 ashish 7282
    }
7283
 
7284
    /**
7285
     * Performs a deep copy on <i>other</i>.
7286
     */
553 chandransh 7287
    public deleteUser_result(deleteUser_result other) {
7288
      __isset_bit_vector.clear();
7289
      __isset_bit_vector.or(other.__isset_bit_vector);
7290
      this.success = other.success;
7291
      if (other.isSetUcex()) {
7292
        this.ucex = new UserContextException(other.ucex);
48 ashish 7293
      }
7294
    }
7295
 
553 chandransh 7296
    public deleteUser_result deepCopy() {
7297
      return new deleteUser_result(this);
48 ashish 7298
    }
7299
 
7300
    @Deprecated
553 chandransh 7301
    public deleteUser_result clone() {
7302
      return new deleteUser_result(this);
48 ashish 7303
    }
7304
 
553 chandransh 7305
    public boolean isSuccess() {
48 ashish 7306
      return this.success;
7307
    }
7308
 
553 chandransh 7309
    public deleteUser_result setSuccess(boolean success) {
48 ashish 7310
      this.success = success;
553 chandransh 7311
      setSuccessIsSet(true);
48 ashish 7312
      return this;
7313
    }
7314
 
7315
    public void unsetSuccess() {
553 chandransh 7316
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 7317
    }
7318
 
7319
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7320
    public boolean isSetSuccess() {
553 chandransh 7321
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 7322
    }
7323
 
7324
    public void setSuccessIsSet(boolean value) {
553 chandransh 7325
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 7326
    }
7327
 
553 chandransh 7328
    public UserContextException getUcex() {
7329
      return this.ucex;
48 ashish 7330
    }
7331
 
553 chandransh 7332
    public deleteUser_result setUcex(UserContextException ucex) {
7333
      this.ucex = ucex;
48 ashish 7334
      return this;
7335
    }
7336
 
553 chandransh 7337
    public void unsetUcex() {
7338
      this.ucex = null;
48 ashish 7339
    }
7340
 
553 chandransh 7341
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
7342
    public boolean isSetUcex() {
7343
      return this.ucex != null;
48 ashish 7344
    }
7345
 
553 chandransh 7346
    public void setUcexIsSet(boolean value) {
48 ashish 7347
      if (!value) {
553 chandransh 7348
        this.ucex = null;
48 ashish 7349
      }
7350
    }
7351
 
7352
    public void setFieldValue(_Fields field, Object value) {
7353
      switch (field) {
7354
      case SUCCESS:
7355
        if (value == null) {
7356
          unsetSuccess();
7357
        } else {
553 chandransh 7358
          setSuccess((Boolean)value);
48 ashish 7359
        }
7360
        break;
7361
 
553 chandransh 7362
      case UCEX:
48 ashish 7363
        if (value == null) {
553 chandransh 7364
          unsetUcex();
48 ashish 7365
        } else {
553 chandransh 7366
          setUcex((UserContextException)value);
48 ashish 7367
        }
7368
        break;
7369
 
7370
      }
7371
    }
7372
 
7373
    public void setFieldValue(int fieldID, Object value) {
7374
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7375
    }
7376
 
7377
    public Object getFieldValue(_Fields field) {
7378
      switch (field) {
7379
      case SUCCESS:
553 chandransh 7380
        return new Boolean(isSuccess());
48 ashish 7381
 
553 chandransh 7382
      case UCEX:
7383
        return getUcex();
48 ashish 7384
 
7385
      }
7386
      throw new IllegalStateException();
7387
    }
7388
 
7389
    public Object getFieldValue(int fieldId) {
7390
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7391
    }
7392
 
7393
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7394
    public boolean isSet(_Fields field) {
7395
      switch (field) {
7396
      case SUCCESS:
7397
        return isSetSuccess();
553 chandransh 7398
      case UCEX:
7399
        return isSetUcex();
48 ashish 7400
      }
7401
      throw new IllegalStateException();
7402
    }
7403
 
7404
    public boolean isSet(int fieldID) {
7405
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7406
    }
7407
 
7408
    @Override
7409
    public boolean equals(Object that) {
7410
      if (that == null)
7411
        return false;
553 chandransh 7412
      if (that instanceof deleteUser_result)
7413
        return this.equals((deleteUser_result)that);
48 ashish 7414
      return false;
7415
    }
7416
 
553 chandransh 7417
    public boolean equals(deleteUser_result that) {
48 ashish 7418
      if (that == null)
7419
        return false;
7420
 
553 chandransh 7421
      boolean this_present_success = true;
7422
      boolean that_present_success = true;
48 ashish 7423
      if (this_present_success || that_present_success) {
7424
        if (!(this_present_success && that_present_success))
7425
          return false;
553 chandransh 7426
        if (this.success != that.success)
48 ashish 7427
          return false;
7428
      }
7429
 
553 chandransh 7430
      boolean this_present_ucex = true && this.isSetUcex();
7431
      boolean that_present_ucex = true && that.isSetUcex();
7432
      if (this_present_ucex || that_present_ucex) {
7433
        if (!(this_present_ucex && that_present_ucex))
48 ashish 7434
          return false;
553 chandransh 7435
        if (!this.ucex.equals(that.ucex))
48 ashish 7436
          return false;
7437
      }
7438
 
7439
      return true;
7440
    }
7441
 
7442
    @Override
7443
    public int hashCode() {
7444
      return 0;
7445
    }
7446
 
553 chandransh 7447
    public int compareTo(deleteUser_result other) {
7448
      if (!getClass().equals(other.getClass())) {
7449
        return getClass().getName().compareTo(other.getClass().getName());
7450
      }
7451
 
7452
      int lastComparison = 0;
7453
      deleteUser_result typedOther = (deleteUser_result)other;
7454
 
7455
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7456
      if (lastComparison != 0) {
7457
        return lastComparison;
7458
      }
7459
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7460
      if (lastComparison != 0) {
7461
        return lastComparison;
7462
      }
7463
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
7464
      if (lastComparison != 0) {
7465
        return lastComparison;
7466
      }
7467
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
7468
      if (lastComparison != 0) {
7469
        return lastComparison;
7470
      }
7471
      return 0;
7472
    }
7473
 
48 ashish 7474
    public void read(TProtocol iprot) throws TException {
7475
      TField field;
7476
      iprot.readStructBegin();
7477
      while (true)
7478
      {
7479
        field = iprot.readFieldBegin();
7480
        if (field.type == TType.STOP) { 
7481
          break;
7482
        }
7483
        _Fields fieldId = _Fields.findByThriftId(field.id);
7484
        if (fieldId == null) {
7485
          TProtocolUtil.skip(iprot, field.type);
7486
        } else {
7487
          switch (fieldId) {
7488
            case SUCCESS:
553 chandransh 7489
              if (field.type == TType.BOOL) {
7490
                this.success = iprot.readBool();
7491
                setSuccessIsSet(true);
48 ashish 7492
              } else { 
7493
                TProtocolUtil.skip(iprot, field.type);
7494
              }
7495
              break;
553 chandransh 7496
            case UCEX:
48 ashish 7497
              if (field.type == TType.STRUCT) {
553 chandransh 7498
                this.ucex = new UserContextException();
7499
                this.ucex.read(iprot);
48 ashish 7500
              } else { 
7501
                TProtocolUtil.skip(iprot, field.type);
7502
              }
7503
              break;
7504
          }
7505
          iprot.readFieldEnd();
7506
        }
7507
      }
7508
      iprot.readStructEnd();
7509
      validate();
7510
    }
7511
 
7512
    public void write(TProtocol oprot) throws TException {
7513
      oprot.writeStructBegin(STRUCT_DESC);
7514
 
7515
      if (this.isSetSuccess()) {
7516
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 7517
        oprot.writeBool(this.success);
48 ashish 7518
        oprot.writeFieldEnd();
553 chandransh 7519
      } else if (this.isSetUcex()) {
7520
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7521
        this.ucex.write(oprot);
48 ashish 7522
        oprot.writeFieldEnd();
7523
      }
7524
      oprot.writeFieldStop();
7525
      oprot.writeStructEnd();
7526
    }
7527
 
7528
    @Override
7529
    public String toString() {
553 chandransh 7530
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 7531
      boolean first = true;
7532
 
7533
      sb.append("success:");
553 chandransh 7534
      sb.append(this.success);
48 ashish 7535
      first = false;
7536
      if (!first) sb.append(", ");
553 chandransh 7537
      sb.append("ucex:");
7538
      if (this.ucex == null) {
48 ashish 7539
        sb.append("null");
7540
      } else {
553 chandransh 7541
        sb.append(this.ucex);
48 ashish 7542
      }
7543
      first = false;
7544
      sb.append(")");
7545
      return sb.toString();
7546
    }
7547
 
7548
    public void validate() throws TException {
7549
      // check for required fields
7550
    }
7551
 
7552
  }
7553
 
553 chandransh 7554
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
7555
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 7556
 
7557
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
7558
 
7559
    private long userId;
7560
 
7561
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7562
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7563
      USER_ID((short)1, "userId");
48 ashish 7564
 
7565
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7566
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7567
 
7568
      static {
7569
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7570
          byId.put((int)field._thriftId, field);
7571
          byName.put(field.getFieldName(), field);
7572
        }
7573
      }
7574
 
7575
      /**
7576
       * Find the _Fields constant that matches fieldId, or null if its not found.
7577
       */
7578
      public static _Fields findByThriftId(int fieldId) {
7579
        return byId.get(fieldId);
7580
      }
7581
 
7582
      /**
7583
       * Find the _Fields constant that matches fieldId, throwing an exception
7584
       * if it is not found.
7585
       */
7586
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7587
        _Fields fields = findByThriftId(fieldId);
7588
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7589
        return fields;
7590
      }
7591
 
7592
      /**
7593
       * Find the _Fields constant that matches name, or null if its not found.
7594
       */
7595
      public static _Fields findByName(String name) {
7596
        return byName.get(name);
7597
      }
7598
 
7599
      private final short _thriftId;
7600
      private final String _fieldName;
7601
 
7602
      _Fields(short thriftId, String fieldName) {
7603
        _thriftId = thriftId;
7604
        _fieldName = fieldName;
7605
      }
7606
 
7607
      public short getThriftFieldId() {
7608
        return _thriftId;
7609
      }
7610
 
7611
      public String getFieldName() {
7612
        return _fieldName;
7613
      }
7614
    }
7615
 
7616
    // isset id assignments
7617
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 7618
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 7619
 
7620
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7621
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
7622
          new FieldValueMetaData(TType.I64)));
7623
    }});
7624
 
7625
    static {
553 chandransh 7626
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 7627
    }
7628
 
553 chandransh 7629
    public getUserState_args() {
48 ashish 7630
    }
7631
 
553 chandransh 7632
    public getUserState_args(
7633
      long userId)
48 ashish 7634
    {
7635
      this();
7636
      this.userId = userId;
7637
      setUserIdIsSet(true);
7638
    }
7639
 
7640
    /**
7641
     * Performs a deep copy on <i>other</i>.
7642
     */
553 chandransh 7643
    public getUserState_args(getUserState_args other) {
48 ashish 7644
      __isset_bit_vector.clear();
7645
      __isset_bit_vector.or(other.__isset_bit_vector);
7646
      this.userId = other.userId;
7647
    }
7648
 
553 chandransh 7649
    public getUserState_args deepCopy() {
7650
      return new getUserState_args(this);
48 ashish 7651
    }
7652
 
7653
    @Deprecated
553 chandransh 7654
    public getUserState_args clone() {
7655
      return new getUserState_args(this);
48 ashish 7656
    }
7657
 
7658
    public long getUserId() {
7659
      return this.userId;
7660
    }
7661
 
553 chandransh 7662
    public getUserState_args setUserId(long userId) {
48 ashish 7663
      this.userId = userId;
7664
      setUserIdIsSet(true);
7665
      return this;
7666
    }
7667
 
7668
    public void unsetUserId() {
7669
      __isset_bit_vector.clear(__USERID_ISSET_ID);
7670
    }
7671
 
7672
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
7673
    public boolean isSetUserId() {
7674
      return __isset_bit_vector.get(__USERID_ISSET_ID);
7675
    }
7676
 
7677
    public void setUserIdIsSet(boolean value) {
7678
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
7679
    }
7680
 
7681
    public void setFieldValue(_Fields field, Object value) {
7682
      switch (field) {
7683
      case USER_ID:
7684
        if (value == null) {
7685
          unsetUserId();
7686
        } else {
7687
          setUserId((Long)value);
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 USER_ID:
7701
        return new Long(getUserId());
7702
 
7703
      }
7704
      throw new IllegalStateException();
7705
    }
7706
 
7707
    public Object getFieldValue(int fieldId) {
7708
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7709
    }
7710
 
7711
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7712
    public boolean isSet(_Fields field) {
7713
      switch (field) {
7714
      case USER_ID:
7715
        return isSetUserId();
7716
      }
7717
      throw new IllegalStateException();
7718
    }
7719
 
7720
    public boolean isSet(int fieldID) {
7721
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7722
    }
7723
 
7724
    @Override
7725
    public boolean equals(Object that) {
7726
      if (that == null)
7727
        return false;
553 chandransh 7728
      if (that instanceof getUserState_args)
7729
        return this.equals((getUserState_args)that);
48 ashish 7730
      return false;
7731
    }
7732
 
553 chandransh 7733
    public boolean equals(getUserState_args that) {
48 ashish 7734
      if (that == null)
7735
        return false;
7736
 
7737
      boolean this_present_userId = true;
7738
      boolean that_present_userId = true;
7739
      if (this_present_userId || that_present_userId) {
7740
        if (!(this_present_userId && that_present_userId))
7741
          return false;
7742
        if (this.userId != that.userId)
7743
          return false;
7744
      }
7745
 
7746
      return true;
7747
    }
7748
 
7749
    @Override
7750
    public int hashCode() {
7751
      return 0;
7752
    }
7753
 
553 chandransh 7754
    public int compareTo(getUserState_args other) {
48 ashish 7755
      if (!getClass().equals(other.getClass())) {
7756
        return getClass().getName().compareTo(other.getClass().getName());
7757
      }
7758
 
7759
      int lastComparison = 0;
553 chandransh 7760
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 7761
 
7762
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
7763
      if (lastComparison != 0) {
7764
        return lastComparison;
7765
      }
7766
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
7767
      if (lastComparison != 0) {
7768
        return lastComparison;
7769
      }
7770
      return 0;
7771
    }
7772
 
7773
    public void read(TProtocol iprot) throws TException {
7774
      TField field;
7775
      iprot.readStructBegin();
7776
      while (true)
7777
      {
7778
        field = iprot.readFieldBegin();
7779
        if (field.type == TType.STOP) { 
7780
          break;
7781
        }
7782
        _Fields fieldId = _Fields.findByThriftId(field.id);
7783
        if (fieldId == null) {
7784
          TProtocolUtil.skip(iprot, field.type);
7785
        } else {
7786
          switch (fieldId) {
7787
            case USER_ID:
7788
              if (field.type == TType.I64) {
7789
                this.userId = iprot.readI64();
7790
                setUserIdIsSet(true);
7791
              } else { 
7792
                TProtocolUtil.skip(iprot, field.type);
7793
              }
7794
              break;
7795
          }
7796
          iprot.readFieldEnd();
7797
        }
7798
      }
7799
      iprot.readStructEnd();
7800
      validate();
7801
    }
7802
 
7803
    public void write(TProtocol oprot) throws TException {
7804
      validate();
7805
 
7806
      oprot.writeStructBegin(STRUCT_DESC);
7807
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
7808
      oprot.writeI64(this.userId);
7809
      oprot.writeFieldEnd();
7810
      oprot.writeFieldStop();
7811
      oprot.writeStructEnd();
7812
    }
7813
 
7814
    @Override
7815
    public String toString() {
553 chandransh 7816
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 7817
      boolean first = true;
7818
 
7819
      sb.append("userId:");
7820
      sb.append(this.userId);
7821
      first = false;
7822
      sb.append(")");
7823
      return sb.toString();
7824
    }
7825
 
7826
    public void validate() throws TException {
7827
      // check for required fields
7828
    }
7829
 
7830
  }
7831
 
553 chandransh 7832
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
7833
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 7834
 
7835
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7836
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 7837
 
553 chandransh 7838
    private UserState success;
7839
    private UserContextException ucex;
48 ashish 7840
 
7841
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7842
    public enum _Fields implements TFieldIdEnum {
7843
      SUCCESS((short)0, "success"),
553 chandransh 7844
      UCEX((short)1, "ucex");
48 ashish 7845
 
7846
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7847
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7848
 
7849
      static {
7850
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7851
          byId.put((int)field._thriftId, field);
7852
          byName.put(field.getFieldName(), field);
7853
        }
7854
      }
7855
 
7856
      /**
7857
       * Find the _Fields constant that matches fieldId, or null if its not found.
7858
       */
7859
      public static _Fields findByThriftId(int fieldId) {
7860
        return byId.get(fieldId);
7861
      }
7862
 
7863
      /**
7864
       * Find the _Fields constant that matches fieldId, throwing an exception
7865
       * if it is not found.
7866
       */
7867
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7868
        _Fields fields = findByThriftId(fieldId);
7869
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7870
        return fields;
7871
      }
7872
 
7873
      /**
7874
       * Find the _Fields constant that matches name, or null if its not found.
7875
       */
7876
      public static _Fields findByName(String name) {
7877
        return byName.get(name);
7878
      }
7879
 
7880
      private final short _thriftId;
7881
      private final String _fieldName;
7882
 
7883
      _Fields(short thriftId, String fieldName) {
7884
        _thriftId = thriftId;
7885
        _fieldName = fieldName;
7886
      }
7887
 
7888
      public short getThriftFieldId() {
7889
        return _thriftId;
7890
      }
7891
 
7892
      public String getFieldName() {
7893
        return _fieldName;
7894
      }
7895
    }
7896
 
7897
    // isset id assignments
7898
 
7899
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7900
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7901
          new StructMetaData(TType.STRUCT, UserState.class)));
7902
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 7903
          new FieldValueMetaData(TType.STRUCT)));
7904
    }});
7905
 
7906
    static {
553 chandransh 7907
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 7908
    }
7909
 
553 chandransh 7910
    public getUserState_result() {
48 ashish 7911
    }
7912
 
553 chandransh 7913
    public getUserState_result(
7914
      UserState success,
7915
      UserContextException ucex)
48 ashish 7916
    {
7917
      this();
7918
      this.success = success;
553 chandransh 7919
      this.ucex = ucex;
48 ashish 7920
    }
7921
 
7922
    /**
7923
     * Performs a deep copy on <i>other</i>.
7924
     */
553 chandransh 7925
    public getUserState_result(getUserState_result other) {
48 ashish 7926
      if (other.isSetSuccess()) {
553 chandransh 7927
        this.success = new UserState(other.success);
48 ashish 7928
      }
553 chandransh 7929
      if (other.isSetUcex()) {
7930
        this.ucex = new UserContextException(other.ucex);
48 ashish 7931
      }
7932
    }
7933
 
553 chandransh 7934
    public getUserState_result deepCopy() {
7935
      return new getUserState_result(this);
48 ashish 7936
    }
7937
 
7938
    @Deprecated
553 chandransh 7939
    public getUserState_result clone() {
7940
      return new getUserState_result(this);
48 ashish 7941
    }
7942
 
553 chandransh 7943
    public UserState getSuccess() {
48 ashish 7944
      return this.success;
7945
    }
7946
 
553 chandransh 7947
    public getUserState_result setSuccess(UserState success) {
48 ashish 7948
      this.success = success;
7949
      return this;
7950
    }
7951
 
7952
    public void unsetSuccess() {
7953
      this.success = null;
7954
    }
7955
 
7956
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7957
    public boolean isSetSuccess() {
7958
      return this.success != null;
7959
    }
7960
 
7961
    public void setSuccessIsSet(boolean value) {
7962
      if (!value) {
7963
        this.success = null;
7964
      }
7965
    }
7966
 
553 chandransh 7967
    public UserContextException getUcex() {
7968
      return this.ucex;
48 ashish 7969
    }
7970
 
553 chandransh 7971
    public getUserState_result setUcex(UserContextException ucex) {
7972
      this.ucex = ucex;
48 ashish 7973
      return this;
7974
    }
7975
 
553 chandransh 7976
    public void unsetUcex() {
7977
      this.ucex = null;
48 ashish 7978
    }
7979
 
553 chandransh 7980
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
7981
    public boolean isSetUcex() {
7982
      return this.ucex != null;
48 ashish 7983
    }
7984
 
553 chandransh 7985
    public void setUcexIsSet(boolean value) {
48 ashish 7986
      if (!value) {
553 chandransh 7987
        this.ucex = null;
48 ashish 7988
      }
7989
    }
7990
 
7991
    public void setFieldValue(_Fields field, Object value) {
7992
      switch (field) {
7993
      case SUCCESS:
7994
        if (value == null) {
7995
          unsetSuccess();
7996
        } else {
553 chandransh 7997
          setSuccess((UserState)value);
48 ashish 7998
        }
7999
        break;
8000
 
553 chandransh 8001
      case UCEX:
48 ashish 8002
        if (value == null) {
553 chandransh 8003
          unsetUcex();
48 ashish 8004
        } else {
553 chandransh 8005
          setUcex((UserContextException)value);
48 ashish 8006
        }
8007
        break;
8008
 
8009
      }
8010
    }
8011
 
8012
    public void setFieldValue(int fieldID, Object value) {
8013
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8014
    }
8015
 
8016
    public Object getFieldValue(_Fields field) {
8017
      switch (field) {
8018
      case SUCCESS:
8019
        return getSuccess();
8020
 
553 chandransh 8021
      case UCEX:
8022
        return getUcex();
48 ashish 8023
 
8024
      }
8025
      throw new IllegalStateException();
8026
    }
8027
 
8028
    public Object getFieldValue(int fieldId) {
8029
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8030
    }
8031
 
8032
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8033
    public boolean isSet(_Fields field) {
8034
      switch (field) {
8035
      case SUCCESS:
8036
        return isSetSuccess();
553 chandransh 8037
      case UCEX:
8038
        return isSetUcex();
48 ashish 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;
553 chandransh 8051
      if (that instanceof getUserState_result)
8052
        return this.equals((getUserState_result)that);
48 ashish 8053
      return false;
8054
    }
8055
 
553 chandransh 8056
    public boolean equals(getUserState_result that) {
48 ashish 8057
      if (that == null)
8058
        return false;
8059
 
8060
      boolean this_present_success = true && this.isSetSuccess();
8061
      boolean that_present_success = true && that.isSetSuccess();
8062
      if (this_present_success || that_present_success) {
8063
        if (!(this_present_success && that_present_success))
8064
          return false;
8065
        if (!this.success.equals(that.success))
8066
          return false;
8067
      }
8068
 
553 chandransh 8069
      boolean this_present_ucex = true && this.isSetUcex();
8070
      boolean that_present_ucex = true && that.isSetUcex();
8071
      if (this_present_ucex || that_present_ucex) {
8072
        if (!(this_present_ucex && that_present_ucex))
48 ashish 8073
          return false;
553 chandransh 8074
        if (!this.ucex.equals(that.ucex))
48 ashish 8075
          return false;
8076
      }
8077
 
8078
      return true;
8079
    }
8080
 
8081
    @Override
8082
    public int hashCode() {
8083
      return 0;
8084
    }
8085
 
553 chandransh 8086
    public int compareTo(getUserState_result other) {
48 ashish 8087
      if (!getClass().equals(other.getClass())) {
8088
        return getClass().getName().compareTo(other.getClass().getName());
8089
      }
8090
 
8091
      int lastComparison = 0;
553 chandransh 8092
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 8093
 
8094
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8095
      if (lastComparison != 0) {
8096
        return lastComparison;
8097
      }
8098
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8099
      if (lastComparison != 0) {
8100
        return lastComparison;
8101
      }
553 chandransh 8102
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 8103
      if (lastComparison != 0) {
8104
        return lastComparison;
8105
      }
553 chandransh 8106
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 8107
      if (lastComparison != 0) {
8108
        return lastComparison;
8109
      }
8110
      return 0;
8111
    }
8112
 
8113
    public void read(TProtocol iprot) throws TException {
8114
      TField field;
8115
      iprot.readStructBegin();
8116
      while (true)
8117
      {
8118
        field = iprot.readFieldBegin();
8119
        if (field.type == TType.STOP) { 
8120
          break;
8121
        }
8122
        _Fields fieldId = _Fields.findByThriftId(field.id);
8123
        if (fieldId == null) {
8124
          TProtocolUtil.skip(iprot, field.type);
8125
        } else {
8126
          switch (fieldId) {
8127
            case SUCCESS:
8128
              if (field.type == TType.STRUCT) {
553 chandransh 8129
                this.success = new UserState();
48 ashish 8130
                this.success.read(iprot);
8131
              } else { 
8132
                TProtocolUtil.skip(iprot, field.type);
8133
              }
8134
              break;
553 chandransh 8135
            case UCEX:
48 ashish 8136
              if (field.type == TType.STRUCT) {
553 chandransh 8137
                this.ucex = new UserContextException();
8138
                this.ucex.read(iprot);
48 ashish 8139
              } else { 
8140
                TProtocolUtil.skip(iprot, field.type);
8141
              }
8142
              break;
8143
          }
8144
          iprot.readFieldEnd();
8145
        }
8146
      }
8147
      iprot.readStructEnd();
8148
      validate();
8149
    }
8150
 
8151
    public void write(TProtocol oprot) throws TException {
8152
      oprot.writeStructBegin(STRUCT_DESC);
8153
 
8154
      if (this.isSetSuccess()) {
8155
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8156
        this.success.write(oprot);
8157
        oprot.writeFieldEnd();
553 chandransh 8158
      } else if (this.isSetUcex()) {
8159
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
8160
        this.ucex.write(oprot);
48 ashish 8161
        oprot.writeFieldEnd();
8162
      }
8163
      oprot.writeFieldStop();
8164
      oprot.writeStructEnd();
8165
    }
8166
 
8167
    @Override
8168
    public String toString() {
553 chandransh 8169
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 8170
      boolean first = true;
8171
 
8172
      sb.append("success:");
8173
      if (this.success == null) {
8174
        sb.append("null");
8175
      } else {
8176
        sb.append(this.success);
8177
      }
8178
      first = false;
8179
      if (!first) sb.append(", ");
553 chandransh 8180
      sb.append("ucex:");
8181
      if (this.ucex == null) {
48 ashish 8182
        sb.append("null");
8183
      } else {
553 chandransh 8184
        sb.append(this.ucex);
48 ashish 8185
      }
8186
      first = false;
8187
      sb.append(")");
8188
      return sb.toString();
8189
    }
8190
 
8191
    public void validate() throws TException {
8192
      // check for required fields
8193
    }
8194
 
8195
  }
8196
 
553 chandransh 8197
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
8198
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 8199
 
8200
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
8201
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
8202
 
8203
    private String email;
8204
    private String password;
8205
 
8206
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8207
    public enum _Fields implements TFieldIdEnum {
8208
      EMAIL((short)1, "email"),
8209
      PASSWORD((short)2, "password");
8210
 
8211
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8212
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8213
 
8214
      static {
8215
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8216
          byId.put((int)field._thriftId, field);
8217
          byName.put(field.getFieldName(), field);
8218
        }
8219
      }
8220
 
8221
      /**
8222
       * Find the _Fields constant that matches fieldId, or null if its not found.
8223
       */
8224
      public static _Fields findByThriftId(int fieldId) {
8225
        return byId.get(fieldId);
8226
      }
8227
 
8228
      /**
8229
       * Find the _Fields constant that matches fieldId, throwing an exception
8230
       * if it is not found.
8231
       */
8232
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8233
        _Fields fields = findByThriftId(fieldId);
8234
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8235
        return fields;
8236
      }
8237
 
8238
      /**
8239
       * Find the _Fields constant that matches name, or null if its not found.
8240
       */
8241
      public static _Fields findByName(String name) {
8242
        return byName.get(name);
8243
      }
8244
 
8245
      private final short _thriftId;
8246
      private final String _fieldName;
8247
 
8248
      _Fields(short thriftId, String fieldName) {
8249
        _thriftId = thriftId;
8250
        _fieldName = fieldName;
8251
      }
8252
 
8253
      public short getThriftFieldId() {
8254
        return _thriftId;
8255
      }
8256
 
8257
      public String getFieldName() {
8258
        return _fieldName;
8259
      }
8260
    }
8261
 
8262
    // isset id assignments
8263
 
8264
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8265
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
8266
          new FieldValueMetaData(TType.STRING)));
8267
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
8268
          new FieldValueMetaData(TType.STRING)));
8269
    }});
8270
 
8271
    static {
553 chandransh 8272
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 8273
    }
8274
 
553 chandransh 8275
    public authenticateUser_args() {
48 ashish 8276
    }
8277
 
553 chandransh 8278
    public authenticateUser_args(
48 ashish 8279
      String email,
8280
      String password)
8281
    {
8282
      this();
8283
      this.email = email;
8284
      this.password = password;
8285
    }
8286
 
8287
    /**
8288
     * Performs a deep copy on <i>other</i>.
8289
     */
553 chandransh 8290
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 8291
      if (other.isSetEmail()) {
8292
        this.email = other.email;
8293
      }
8294
      if (other.isSetPassword()) {
8295
        this.password = other.password;
8296
      }
8297
    }
8298
 
553 chandransh 8299
    public authenticateUser_args deepCopy() {
8300
      return new authenticateUser_args(this);
48 ashish 8301
    }
8302
 
8303
    @Deprecated
553 chandransh 8304
    public authenticateUser_args clone() {
8305
      return new authenticateUser_args(this);
48 ashish 8306
    }
8307
 
8308
    public String getEmail() {
8309
      return this.email;
8310
    }
8311
 
553 chandransh 8312
    public authenticateUser_args setEmail(String email) {
48 ashish 8313
      this.email = email;
8314
      return this;
8315
    }
8316
 
8317
    public void unsetEmail() {
8318
      this.email = null;
8319
    }
8320
 
8321
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
8322
    public boolean isSetEmail() {
8323
      return this.email != null;
8324
    }
8325
 
8326
    public void setEmailIsSet(boolean value) {
8327
      if (!value) {
8328
        this.email = null;
8329
      }
8330
    }
8331
 
8332
    public String getPassword() {
8333
      return this.password;
8334
    }
8335
 
553 chandransh 8336
    public authenticateUser_args setPassword(String password) {
48 ashish 8337
      this.password = password;
8338
      return this;
8339
    }
8340
 
8341
    public void unsetPassword() {
8342
      this.password = null;
8343
    }
8344
 
8345
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
8346
    public boolean isSetPassword() {
8347
      return this.password != null;
8348
    }
8349
 
8350
    public void setPasswordIsSet(boolean value) {
8351
      if (!value) {
8352
        this.password = null;
8353
      }
8354
    }
8355
 
8356
    public void setFieldValue(_Fields field, Object value) {
8357
      switch (field) {
8358
      case EMAIL:
8359
        if (value == null) {
8360
          unsetEmail();
8361
        } else {
8362
          setEmail((String)value);
8363
        }
8364
        break;
8365
 
8366
      case PASSWORD:
8367
        if (value == null) {
8368
          unsetPassword();
8369
        } else {
8370
          setPassword((String)value);
8371
        }
8372
        break;
8373
 
8374
      }
8375
    }
8376
 
8377
    public void setFieldValue(int fieldID, Object value) {
8378
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8379
    }
8380
 
8381
    public Object getFieldValue(_Fields field) {
8382
      switch (field) {
8383
      case EMAIL:
8384
        return getEmail();
8385
 
8386
      case PASSWORD:
8387
        return getPassword();
8388
 
8389
      }
8390
      throw new IllegalStateException();
8391
    }
8392
 
8393
    public Object getFieldValue(int fieldId) {
8394
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8395
    }
8396
 
8397
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8398
    public boolean isSet(_Fields field) {
8399
      switch (field) {
8400
      case EMAIL:
8401
        return isSetEmail();
8402
      case PASSWORD:
8403
        return isSetPassword();
8404
      }
8405
      throw new IllegalStateException();
8406
    }
8407
 
8408
    public boolean isSet(int fieldID) {
8409
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8410
    }
8411
 
8412
    @Override
8413
    public boolean equals(Object that) {
8414
      if (that == null)
8415
        return false;
553 chandransh 8416
      if (that instanceof authenticateUser_args)
8417
        return this.equals((authenticateUser_args)that);
48 ashish 8418
      return false;
8419
    }
8420
 
553 chandransh 8421
    public boolean equals(authenticateUser_args that) {
48 ashish 8422
      if (that == null)
8423
        return false;
8424
 
8425
      boolean this_present_email = true && this.isSetEmail();
8426
      boolean that_present_email = true && that.isSetEmail();
8427
      if (this_present_email || that_present_email) {
8428
        if (!(this_present_email && that_present_email))
8429
          return false;
8430
        if (!this.email.equals(that.email))
8431
          return false;
8432
      }
8433
 
8434
      boolean this_present_password = true && this.isSetPassword();
8435
      boolean that_present_password = true && that.isSetPassword();
8436
      if (this_present_password || that_present_password) {
8437
        if (!(this_present_password && that_present_password))
8438
          return false;
8439
        if (!this.password.equals(that.password))
8440
          return false;
8441
      }
8442
 
8443
      return true;
8444
    }
8445
 
8446
    @Override
8447
    public int hashCode() {
8448
      return 0;
8449
    }
8450
 
553 chandransh 8451
    public int compareTo(authenticateUser_args other) {
48 ashish 8452
      if (!getClass().equals(other.getClass())) {
8453
        return getClass().getName().compareTo(other.getClass().getName());
8454
      }
8455
 
8456
      int lastComparison = 0;
553 chandransh 8457
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 8458
 
8459
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8460
      if (lastComparison != 0) {
8461
        return lastComparison;
8462
      }
8463
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8464
      if (lastComparison != 0) {
8465
        return lastComparison;
8466
      }
8467
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
8468
      if (lastComparison != 0) {
8469
        return lastComparison;
8470
      }
8471
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
8472
      if (lastComparison != 0) {
8473
        return lastComparison;
8474
      }
8475
      return 0;
8476
    }
8477
 
8478
    public void read(TProtocol iprot) throws TException {
8479
      TField field;
8480
      iprot.readStructBegin();
8481
      while (true)
8482
      {
8483
        field = iprot.readFieldBegin();
8484
        if (field.type == TType.STOP) { 
8485
          break;
8486
        }
8487
        _Fields fieldId = _Fields.findByThriftId(field.id);
8488
        if (fieldId == null) {
8489
          TProtocolUtil.skip(iprot, field.type);
8490
        } else {
8491
          switch (fieldId) {
8492
            case EMAIL:
8493
              if (field.type == TType.STRING) {
8494
                this.email = iprot.readString();
8495
              } else { 
8496
                TProtocolUtil.skip(iprot, field.type);
8497
              }
8498
              break;
8499
            case PASSWORD:
8500
              if (field.type == TType.STRING) {
8501
                this.password = iprot.readString();
8502
              } else { 
8503
                TProtocolUtil.skip(iprot, field.type);
8504
              }
8505
              break;
8506
          }
8507
          iprot.readFieldEnd();
8508
        }
8509
      }
8510
      iprot.readStructEnd();
8511
      validate();
8512
    }
8513
 
8514
    public void write(TProtocol oprot) throws TException {
8515
      validate();
8516
 
8517
      oprot.writeStructBegin(STRUCT_DESC);
8518
      if (this.email != null) {
8519
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8520
        oprot.writeString(this.email);
8521
        oprot.writeFieldEnd();
8522
      }
8523
      if (this.password != null) {
8524
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
8525
        oprot.writeString(this.password);
8526
        oprot.writeFieldEnd();
8527
      }
8528
      oprot.writeFieldStop();
8529
      oprot.writeStructEnd();
8530
    }
8531
 
8532
    @Override
8533
    public String toString() {
553 chandransh 8534
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 8535
      boolean first = true;
8536
 
8537
      sb.append("email:");
8538
      if (this.email == null) {
8539
        sb.append("null");
8540
      } else {
8541
        sb.append(this.email);
8542
      }
8543
      first = false;
8544
      if (!first) sb.append(", ");
8545
      sb.append("password:");
8546
      if (this.password == null) {
8547
        sb.append("null");
8548
      } else {
8549
        sb.append(this.password);
8550
      }
8551
      first = false;
8552
      sb.append(")");
8553
      return sb.toString();
8554
    }
8555
 
8556
    public void validate() throws TException {
8557
      // check for required fields
8558
    }
8559
 
8560
  }
8561
 
571 rajveer 8562
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 8563
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 8564
 
8565
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 8566
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 8567
 
553 chandransh 8568
    private User success;
8569
    private AuthenticationException auex;
48 ashish 8570
 
8571
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8572
    public enum _Fields implements TFieldIdEnum {
8573
      SUCCESS((short)0, "success"),
553 chandransh 8574
      AUEX((short)1, "auex");
48 ashish 8575
 
8576
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8577
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8578
 
8579
      static {
8580
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8581
          byId.put((int)field._thriftId, field);
8582
          byName.put(field.getFieldName(), field);
8583
        }
8584
      }
8585
 
8586
      /**
8587
       * Find the _Fields constant that matches fieldId, or null if its not found.
8588
       */
8589
      public static _Fields findByThriftId(int fieldId) {
8590
        return byId.get(fieldId);
8591
      }
8592
 
8593
      /**
8594
       * Find the _Fields constant that matches fieldId, throwing an exception
8595
       * if it is not found.
8596
       */
8597
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8598
        _Fields fields = findByThriftId(fieldId);
8599
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8600
        return fields;
8601
      }
8602
 
8603
      /**
8604
       * Find the _Fields constant that matches name, or null if its not found.
8605
       */
8606
      public static _Fields findByName(String name) {
8607
        return byName.get(name);
8608
      }
8609
 
8610
      private final short _thriftId;
8611
      private final String _fieldName;
8612
 
8613
      _Fields(short thriftId, String fieldName) {
8614
        _thriftId = thriftId;
8615
        _fieldName = fieldName;
8616
      }
8617
 
8618
      public short getThriftFieldId() {
8619
        return _thriftId;
8620
      }
8621
 
8622
      public String getFieldName() {
8623
        return _fieldName;
8624
      }
8625
    }
8626
 
8627
    // isset id assignments
8628
 
8629
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8630
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 8631
          new StructMetaData(TType.STRUCT, User.class)));
8632
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 8633
          new FieldValueMetaData(TType.STRUCT)));
8634
    }});
8635
 
8636
    static {
553 chandransh 8637
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 8638
    }
8639
 
553 chandransh 8640
    public authenticateUser_result() {
48 ashish 8641
    }
8642
 
553 chandransh 8643
    public authenticateUser_result(
8644
      User success,
8645
      AuthenticationException auex)
48 ashish 8646
    {
8647
      this();
8648
      this.success = success;
553 chandransh 8649
      this.auex = auex;
48 ashish 8650
    }
8651
 
8652
    /**
8653
     * Performs a deep copy on <i>other</i>.
8654
     */
553 chandransh 8655
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 8656
      if (other.isSetSuccess()) {
553 chandransh 8657
        this.success = new User(other.success);
48 ashish 8658
      }
553 chandransh 8659
      if (other.isSetAuex()) {
8660
        this.auex = new AuthenticationException(other.auex);
48 ashish 8661
      }
8662
    }
8663
 
553 chandransh 8664
    public authenticateUser_result deepCopy() {
8665
      return new authenticateUser_result(this);
48 ashish 8666
    }
8667
 
8668
    @Deprecated
553 chandransh 8669
    public authenticateUser_result clone() {
8670
      return new authenticateUser_result(this);
48 ashish 8671
    }
8672
 
553 chandransh 8673
    public User getSuccess() {
48 ashish 8674
      return this.success;
8675
    }
8676
 
553 chandransh 8677
    public authenticateUser_result setSuccess(User success) {
48 ashish 8678
      this.success = success;
8679
      return this;
8680
    }
8681
 
8682
    public void unsetSuccess() {
8683
      this.success = null;
8684
    }
8685
 
8686
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8687
    public boolean isSetSuccess() {
8688
      return this.success != null;
8689
    }
8690
 
8691
    public void setSuccessIsSet(boolean value) {
8692
      if (!value) {
8693
        this.success = null;
8694
      }
8695
    }
8696
 
553 chandransh 8697
    public AuthenticationException getAuex() {
8698
      return this.auex;
48 ashish 8699
    }
8700
 
553 chandransh 8701
    public authenticateUser_result setAuex(AuthenticationException auex) {
8702
      this.auex = auex;
48 ashish 8703
      return this;
8704
    }
8705
 
553 chandransh 8706
    public void unsetAuex() {
8707
      this.auex = null;
48 ashish 8708
    }
8709
 
553 chandransh 8710
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
8711
    public boolean isSetAuex() {
8712
      return this.auex != null;
48 ashish 8713
    }
8714
 
553 chandransh 8715
    public void setAuexIsSet(boolean value) {
48 ashish 8716
      if (!value) {
553 chandransh 8717
        this.auex = null;
48 ashish 8718
      }
8719
    }
8720
 
8721
    public void setFieldValue(_Fields field, Object value) {
8722
      switch (field) {
8723
      case SUCCESS:
8724
        if (value == null) {
8725
          unsetSuccess();
8726
        } else {
553 chandransh 8727
          setSuccess((User)value);
48 ashish 8728
        }
8729
        break;
8730
 
553 chandransh 8731
      case AUEX:
48 ashish 8732
        if (value == null) {
553 chandransh 8733
          unsetAuex();
48 ashish 8734
        } else {
553 chandransh 8735
          setAuex((AuthenticationException)value);
48 ashish 8736
        }
8737
        break;
8738
 
8739
      }
8740
    }
8741
 
8742
    public void setFieldValue(int fieldID, Object value) {
8743
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8744
    }
8745
 
8746
    public Object getFieldValue(_Fields field) {
8747
      switch (field) {
8748
      case SUCCESS:
8749
        return getSuccess();
8750
 
553 chandransh 8751
      case AUEX:
8752
        return getAuex();
48 ashish 8753
 
8754
      }
8755
      throw new IllegalStateException();
8756
    }
8757
 
8758
    public Object getFieldValue(int fieldId) {
8759
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8760
    }
8761
 
8762
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8763
    public boolean isSet(_Fields field) {
8764
      switch (field) {
8765
      case SUCCESS:
8766
        return isSetSuccess();
553 chandransh 8767
      case AUEX:
8768
        return isSetAuex();
48 ashish 8769
      }
8770
      throw new IllegalStateException();
8771
    }
8772
 
8773
    public boolean isSet(int fieldID) {
8774
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8775
    }
8776
 
8777
    @Override
8778
    public boolean equals(Object that) {
8779
      if (that == null)
8780
        return false;
553 chandransh 8781
      if (that instanceof authenticateUser_result)
8782
        return this.equals((authenticateUser_result)that);
48 ashish 8783
      return false;
8784
    }
8785
 
553 chandransh 8786
    public boolean equals(authenticateUser_result that) {
48 ashish 8787
      if (that == null)
8788
        return false;
8789
 
8790
      boolean this_present_success = true && this.isSetSuccess();
8791
      boolean that_present_success = true && that.isSetSuccess();
8792
      if (this_present_success || that_present_success) {
8793
        if (!(this_present_success && that_present_success))
8794
          return false;
8795
        if (!this.success.equals(that.success))
8796
          return false;
8797
      }
8798
 
553 chandransh 8799
      boolean this_present_auex = true && this.isSetAuex();
8800
      boolean that_present_auex = true && that.isSetAuex();
8801
      if (this_present_auex || that_present_auex) {
8802
        if (!(this_present_auex && that_present_auex))
48 ashish 8803
          return false;
553 chandransh 8804
        if (!this.auex.equals(that.auex))
48 ashish 8805
          return false;
8806
      }
8807
 
8808
      return true;
8809
    }
8810
 
8811
    @Override
8812
    public int hashCode() {
8813
      return 0;
8814
    }
8815
 
571 rajveer 8816
    public int compareTo(authenticateUser_result other) {
8817
      if (!getClass().equals(other.getClass())) {
8818
        return getClass().getName().compareTo(other.getClass().getName());
8819
      }
8820
 
8821
      int lastComparison = 0;
8822
      authenticateUser_result typedOther = (authenticateUser_result)other;
8823
 
8824
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8825
      if (lastComparison != 0) {
8826
        return lastComparison;
8827
      }
8828
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8829
      if (lastComparison != 0) {
8830
        return lastComparison;
8831
      }
8832
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
8833
      if (lastComparison != 0) {
8834
        return lastComparison;
8835
      }
8836
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
8837
      if (lastComparison != 0) {
8838
        return lastComparison;
8839
      }
8840
      return 0;
8841
    }
8842
 
48 ashish 8843
    public void read(TProtocol iprot) throws TException {
8844
      TField field;
8845
      iprot.readStructBegin();
8846
      while (true)
8847
      {
8848
        field = iprot.readFieldBegin();
8849
        if (field.type == TType.STOP) { 
8850
          break;
8851
        }
8852
        _Fields fieldId = _Fields.findByThriftId(field.id);
8853
        if (fieldId == null) {
8854
          TProtocolUtil.skip(iprot, field.type);
8855
        } else {
8856
          switch (fieldId) {
8857
            case SUCCESS:
8858
              if (field.type == TType.STRUCT) {
553 chandransh 8859
                this.success = new User();
48 ashish 8860
                this.success.read(iprot);
8861
              } else { 
8862
                TProtocolUtil.skip(iprot, field.type);
8863
              }
8864
              break;
553 chandransh 8865
            case AUEX:
48 ashish 8866
              if (field.type == TType.STRUCT) {
553 chandransh 8867
                this.auex = new AuthenticationException();
8868
                this.auex.read(iprot);
48 ashish 8869
              } else { 
8870
                TProtocolUtil.skip(iprot, field.type);
8871
              }
8872
              break;
8873
          }
8874
          iprot.readFieldEnd();
8875
        }
8876
      }
8877
      iprot.readStructEnd();
8878
      validate();
8879
    }
8880
 
8881
    public void write(TProtocol oprot) throws TException {
8882
      oprot.writeStructBegin(STRUCT_DESC);
8883
 
8884
      if (this.isSetSuccess()) {
8885
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8886
        this.success.write(oprot);
8887
        oprot.writeFieldEnd();
553 chandransh 8888
      } else if (this.isSetAuex()) {
8889
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
8890
        this.auex.write(oprot);
48 ashish 8891
        oprot.writeFieldEnd();
8892
      }
8893
      oprot.writeFieldStop();
8894
      oprot.writeStructEnd();
8895
    }
8896
 
8897
    @Override
8898
    public String toString() {
553 chandransh 8899
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 8900
      boolean first = true;
8901
 
8902
      sb.append("success:");
8903
      if (this.success == null) {
8904
        sb.append("null");
8905
      } else {
8906
        sb.append(this.success);
8907
      }
8908
      first = false;
8909
      if (!first) sb.append(", ");
553 chandransh 8910
      sb.append("auex:");
8911
      if (this.auex == null) {
48 ashish 8912
        sb.append("null");
8913
      } else {
553 chandransh 8914
        sb.append(this.auex);
48 ashish 8915
      }
8916
      first = false;
8917
      sb.append(")");
8918
      return sb.toString();
8919
    }
8920
 
8921
    public void validate() throws TException {
8922
      // check for required fields
8923
    }
8924
 
8925
  }
8926
 
553 chandransh 8927
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
8928
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 8929
 
553 chandransh 8930
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 8931
 
553 chandransh 8932
    private String email;
123 ashish 8933
 
8934
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8935
    public enum _Fields implements TFieldIdEnum {
553 chandransh 8936
      EMAIL((short)1, "email");
123 ashish 8937
 
8938
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8940
 
8941
      static {
8942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8943
          byId.put((int)field._thriftId, field);
8944
          byName.put(field.getFieldName(), field);
8945
        }
8946
      }
8947
 
8948
      /**
8949
       * Find the _Fields constant that matches fieldId, or null if its not found.
8950
       */
8951
      public static _Fields findByThriftId(int fieldId) {
8952
        return byId.get(fieldId);
8953
      }
8954
 
8955
      /**
8956
       * Find the _Fields constant that matches fieldId, throwing an exception
8957
       * if it is not found.
8958
       */
8959
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8960
        _Fields fields = findByThriftId(fieldId);
8961
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8962
        return fields;
8963
      }
8964
 
8965
      /**
8966
       * Find the _Fields constant that matches name, or null if its not found.
8967
       */
8968
      public static _Fields findByName(String name) {
8969
        return byName.get(name);
8970
      }
8971
 
8972
      private final short _thriftId;
8973
      private final String _fieldName;
8974
 
8975
      _Fields(short thriftId, String fieldName) {
8976
        _thriftId = thriftId;
8977
        _fieldName = fieldName;
8978
      }
8979
 
8980
      public short getThriftFieldId() {
8981
        return _thriftId;
8982
      }
8983
 
8984
      public String getFieldName() {
8985
        return _fieldName;
8986
      }
8987
    }
8988
 
8989
    // isset id assignments
553 chandransh 8990
 
8991
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8992
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
8993
          new FieldValueMetaData(TType.STRING)));
8994
    }});
8995
 
8996
    static {
8997
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
8998
    }
8999
 
9000
    public userExists_args() {
9001
    }
9002
 
9003
    public userExists_args(
9004
      String email)
9005
    {
9006
      this();
9007
      this.email = email;
9008
    }
9009
 
9010
    /**
9011
     * Performs a deep copy on <i>other</i>.
9012
     */
9013
    public userExists_args(userExists_args other) {
9014
      if (other.isSetEmail()) {
9015
        this.email = other.email;
9016
      }
9017
    }
9018
 
9019
    public userExists_args deepCopy() {
9020
      return new userExists_args(this);
9021
    }
9022
 
9023
    @Deprecated
9024
    public userExists_args clone() {
9025
      return new userExists_args(this);
9026
    }
9027
 
9028
    public String getEmail() {
9029
      return this.email;
9030
    }
9031
 
9032
    public userExists_args setEmail(String email) {
9033
      this.email = email;
9034
      return this;
9035
    }
9036
 
9037
    public void unsetEmail() {
9038
      this.email = null;
9039
    }
9040
 
9041
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
9042
    public boolean isSetEmail() {
9043
      return this.email != null;
9044
    }
9045
 
9046
    public void setEmailIsSet(boolean value) {
9047
      if (!value) {
9048
        this.email = null;
9049
      }
9050
    }
9051
 
9052
    public void setFieldValue(_Fields field, Object value) {
9053
      switch (field) {
9054
      case EMAIL:
9055
        if (value == null) {
9056
          unsetEmail();
9057
        } else {
9058
          setEmail((String)value);
9059
        }
9060
        break;
9061
 
9062
      }
9063
    }
9064
 
9065
    public void setFieldValue(int fieldID, Object value) {
9066
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9067
    }
9068
 
9069
    public Object getFieldValue(_Fields field) {
9070
      switch (field) {
9071
      case EMAIL:
9072
        return getEmail();
9073
 
9074
      }
9075
      throw new IllegalStateException();
9076
    }
9077
 
9078
    public Object getFieldValue(int fieldId) {
9079
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9080
    }
9081
 
9082
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9083
    public boolean isSet(_Fields field) {
9084
      switch (field) {
9085
      case EMAIL:
9086
        return isSetEmail();
9087
      }
9088
      throw new IllegalStateException();
9089
    }
9090
 
9091
    public boolean isSet(int fieldID) {
9092
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9093
    }
9094
 
9095
    @Override
9096
    public boolean equals(Object that) {
9097
      if (that == null)
9098
        return false;
9099
      if (that instanceof userExists_args)
9100
        return this.equals((userExists_args)that);
9101
      return false;
9102
    }
9103
 
9104
    public boolean equals(userExists_args that) {
9105
      if (that == null)
9106
        return false;
9107
 
9108
      boolean this_present_email = true && this.isSetEmail();
9109
      boolean that_present_email = true && that.isSetEmail();
9110
      if (this_present_email || that_present_email) {
9111
        if (!(this_present_email && that_present_email))
9112
          return false;
9113
        if (!this.email.equals(that.email))
9114
          return false;
9115
      }
9116
 
9117
      return true;
9118
    }
9119
 
9120
    @Override
9121
    public int hashCode() {
9122
      return 0;
9123
    }
9124
 
9125
    public int compareTo(userExists_args other) {
9126
      if (!getClass().equals(other.getClass())) {
9127
        return getClass().getName().compareTo(other.getClass().getName());
9128
      }
9129
 
9130
      int lastComparison = 0;
9131
      userExists_args typedOther = (userExists_args)other;
9132
 
9133
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
9134
      if (lastComparison != 0) {
9135
        return lastComparison;
9136
      }
9137
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
9138
      if (lastComparison != 0) {
9139
        return lastComparison;
9140
      }
9141
      return 0;
9142
    }
9143
 
9144
    public void read(TProtocol iprot) throws TException {
9145
      TField field;
9146
      iprot.readStructBegin();
9147
      while (true)
9148
      {
9149
        field = iprot.readFieldBegin();
9150
        if (field.type == TType.STOP) { 
9151
          break;
9152
        }
9153
        _Fields fieldId = _Fields.findByThriftId(field.id);
9154
        if (fieldId == null) {
9155
          TProtocolUtil.skip(iprot, field.type);
9156
        } else {
9157
          switch (fieldId) {
9158
            case EMAIL:
9159
              if (field.type == TType.STRING) {
9160
                this.email = iprot.readString();
9161
              } else { 
9162
                TProtocolUtil.skip(iprot, field.type);
9163
              }
9164
              break;
9165
          }
9166
          iprot.readFieldEnd();
9167
        }
9168
      }
9169
      iprot.readStructEnd();
9170
      validate();
9171
    }
9172
 
9173
    public void write(TProtocol oprot) throws TException {
9174
      validate();
9175
 
9176
      oprot.writeStructBegin(STRUCT_DESC);
9177
      if (this.email != null) {
9178
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
9179
        oprot.writeString(this.email);
9180
        oprot.writeFieldEnd();
9181
      }
9182
      oprot.writeFieldStop();
9183
      oprot.writeStructEnd();
9184
    }
9185
 
9186
    @Override
9187
    public String toString() {
9188
      StringBuilder sb = new StringBuilder("userExists_args(");
9189
      boolean first = true;
9190
 
9191
      sb.append("email:");
9192
      if (this.email == null) {
9193
        sb.append("null");
9194
      } else {
9195
        sb.append(this.email);
9196
      }
9197
      first = false;
9198
      sb.append(")");
9199
      return sb.toString();
9200
    }
9201
 
9202
    public void validate() throws TException {
9203
      // check for required fields
9204
    }
9205
 
9206
  }
9207
 
9208
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
9209
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
9210
 
9211
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9212
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9213
 
9214
    private boolean success;
9215
    private UserContextException ucx;
9216
 
9217
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9218
    public enum _Fields implements TFieldIdEnum {
9219
      SUCCESS((short)0, "success"),
9220
      UCX((short)1, "ucx");
9221
 
9222
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9223
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9224
 
9225
      static {
9226
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9227
          byId.put((int)field._thriftId, field);
9228
          byName.put(field.getFieldName(), field);
9229
        }
9230
      }
9231
 
9232
      /**
9233
       * Find the _Fields constant that matches fieldId, or null if its not found.
9234
       */
9235
      public static _Fields findByThriftId(int fieldId) {
9236
        return byId.get(fieldId);
9237
      }
9238
 
9239
      /**
9240
       * Find the _Fields constant that matches fieldId, throwing an exception
9241
       * if it is not found.
9242
       */
9243
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9244
        _Fields fields = findByThriftId(fieldId);
9245
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9246
        return fields;
9247
      }
9248
 
9249
      /**
9250
       * Find the _Fields constant that matches name, or null if its not found.
9251
       */
9252
      public static _Fields findByName(String name) {
9253
        return byName.get(name);
9254
      }
9255
 
9256
      private final short _thriftId;
9257
      private final String _fieldName;
9258
 
9259
      _Fields(short thriftId, String fieldName) {
9260
        _thriftId = thriftId;
9261
        _fieldName = fieldName;
9262
      }
9263
 
9264
      public short getThriftFieldId() {
9265
        return _thriftId;
9266
      }
9267
 
9268
      public String getFieldName() {
9269
        return _fieldName;
9270
      }
9271
    }
9272
 
9273
    // isset id assignments
9274
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 9275
    private BitSet __isset_bit_vector = new BitSet(1);
9276
 
9277
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9278
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 9279
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 9280
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9281
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 9282
    }});
9283
 
9284
    static {
553 chandransh 9285
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 9286
    }
9287
 
553 chandransh 9288
    public userExists_result() {
123 ashish 9289
    }
9290
 
553 chandransh 9291
    public userExists_result(
9292
      boolean success,
9293
      UserContextException ucx)
123 ashish 9294
    {
9295
      this();
553 chandransh 9296
      this.success = success;
9297
      setSuccessIsSet(true);
9298
      this.ucx = ucx;
123 ashish 9299
    }
9300
 
9301
    /**
9302
     * Performs a deep copy on <i>other</i>.
9303
     */
553 chandransh 9304
    public userExists_result(userExists_result other) {
123 ashish 9305
      __isset_bit_vector.clear();
9306
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 9307
      this.success = other.success;
9308
      if (other.isSetUcx()) {
9309
        this.ucx = new UserContextException(other.ucx);
123 ashish 9310
      }
9311
    }
9312
 
553 chandransh 9313
    public userExists_result deepCopy() {
9314
      return new userExists_result(this);
123 ashish 9315
    }
9316
 
9317
    @Deprecated
553 chandransh 9318
    public userExists_result clone() {
9319
      return new userExists_result(this);
123 ashish 9320
    }
9321
 
553 chandransh 9322
    public boolean isSuccess() {
9323
      return this.success;
123 ashish 9324
    }
9325
 
553 chandransh 9326
    public userExists_result setSuccess(boolean success) {
9327
      this.success = success;
9328
      setSuccessIsSet(true);
123 ashish 9329
      return this;
9330
    }
9331
 
553 chandransh 9332
    public void unsetSuccess() {
9333
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 9334
    }
9335
 
553 chandransh 9336
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9337
    public boolean isSetSuccess() {
9338
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 9339
    }
9340
 
553 chandransh 9341
    public void setSuccessIsSet(boolean value) {
9342
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9343
    }
9344
 
9345
    public UserContextException getUcx() {
9346
      return this.ucx;
9347
    }
9348
 
9349
    public userExists_result setUcx(UserContextException ucx) {
9350
      this.ucx = ucx;
9351
      return this;
9352
    }
9353
 
9354
    public void unsetUcx() {
9355
      this.ucx = null;
9356
    }
9357
 
9358
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9359
    public boolean isSetUcx() {
9360
      return this.ucx != null;
9361
    }
9362
 
9363
    public void setUcxIsSet(boolean value) {
123 ashish 9364
      if (!value) {
553 chandransh 9365
        this.ucx = null;
123 ashish 9366
      }
9367
    }
9368
 
553 chandransh 9369
    public void setFieldValue(_Fields field, Object value) {
9370
      switch (field) {
9371
      case SUCCESS:
9372
        if (value == null) {
9373
          unsetSuccess();
9374
        } else {
9375
          setSuccess((Boolean)value);
9376
        }
9377
        break;
9378
 
9379
      case UCX:
9380
        if (value == null) {
9381
          unsetUcx();
9382
        } else {
9383
          setUcx((UserContextException)value);
9384
        }
9385
        break;
9386
 
9387
      }
123 ashish 9388
    }
9389
 
553 chandransh 9390
    public void setFieldValue(int fieldID, Object value) {
9391
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9392
    }
9393
 
9394
    public Object getFieldValue(_Fields field) {
9395
      switch (field) {
9396
      case SUCCESS:
9397
        return new Boolean(isSuccess());
9398
 
9399
      case UCX:
9400
        return getUcx();
9401
 
9402
      }
9403
      throw new IllegalStateException();
9404
    }
9405
 
9406
    public Object getFieldValue(int fieldId) {
9407
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9408
    }
9409
 
9410
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9411
    public boolean isSet(_Fields field) {
9412
      switch (field) {
9413
      case SUCCESS:
9414
        return isSetSuccess();
9415
      case UCX:
9416
        return isSetUcx();
9417
      }
9418
      throw new IllegalStateException();
9419
    }
9420
 
9421
    public boolean isSet(int fieldID) {
9422
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9423
    }
9424
 
9425
    @Override
9426
    public boolean equals(Object that) {
9427
      if (that == null)
9428
        return false;
9429
      if (that instanceof userExists_result)
9430
        return this.equals((userExists_result)that);
9431
      return false;
9432
    }
9433
 
9434
    public boolean equals(userExists_result that) {
9435
      if (that == null)
9436
        return false;
9437
 
9438
      boolean this_present_success = true;
9439
      boolean that_present_success = true;
9440
      if (this_present_success || that_present_success) {
9441
        if (!(this_present_success && that_present_success))
9442
          return false;
9443
        if (this.success != that.success)
9444
          return false;
9445
      }
9446
 
9447
      boolean this_present_ucx = true && this.isSetUcx();
9448
      boolean that_present_ucx = true && that.isSetUcx();
9449
      if (this_present_ucx || that_present_ucx) {
9450
        if (!(this_present_ucx && that_present_ucx))
9451
          return false;
9452
        if (!this.ucx.equals(that.ucx))
9453
          return false;
9454
      }
9455
 
9456
      return true;
9457
    }
9458
 
9459
    @Override
9460
    public int hashCode() {
9461
      return 0;
9462
    }
9463
 
9464
    public int compareTo(userExists_result other) {
9465
      if (!getClass().equals(other.getClass())) {
9466
        return getClass().getName().compareTo(other.getClass().getName());
9467
      }
9468
 
9469
      int lastComparison = 0;
9470
      userExists_result typedOther = (userExists_result)other;
9471
 
9472
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9473
      if (lastComparison != 0) {
9474
        return lastComparison;
9475
      }
9476
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9477
      if (lastComparison != 0) {
9478
        return lastComparison;
9479
      }
9480
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9481
      if (lastComparison != 0) {
9482
        return lastComparison;
9483
      }
9484
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9485
      if (lastComparison != 0) {
9486
        return lastComparison;
9487
      }
9488
      return 0;
9489
    }
9490
 
9491
    public void read(TProtocol iprot) throws TException {
9492
      TField field;
9493
      iprot.readStructBegin();
9494
      while (true)
9495
      {
9496
        field = iprot.readFieldBegin();
9497
        if (field.type == TType.STOP) { 
9498
          break;
9499
        }
9500
        _Fields fieldId = _Fields.findByThriftId(field.id);
9501
        if (fieldId == null) {
9502
          TProtocolUtil.skip(iprot, field.type);
9503
        } else {
9504
          switch (fieldId) {
9505
            case SUCCESS:
9506
              if (field.type == TType.BOOL) {
9507
                this.success = iprot.readBool();
9508
                setSuccessIsSet(true);
9509
              } else { 
9510
                TProtocolUtil.skip(iprot, field.type);
9511
              }
9512
              break;
9513
            case UCX:
9514
              if (field.type == TType.STRUCT) {
9515
                this.ucx = new UserContextException();
9516
                this.ucx.read(iprot);
9517
              } else { 
9518
                TProtocolUtil.skip(iprot, field.type);
9519
              }
9520
              break;
9521
          }
9522
          iprot.readFieldEnd();
9523
        }
9524
      }
9525
      iprot.readStructEnd();
9526
      validate();
9527
    }
9528
 
9529
    public void write(TProtocol oprot) throws TException {
9530
      oprot.writeStructBegin(STRUCT_DESC);
9531
 
9532
      if (this.isSetSuccess()) {
9533
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9534
        oprot.writeBool(this.success);
9535
        oprot.writeFieldEnd();
9536
      } else if (this.isSetUcx()) {
9537
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9538
        this.ucx.write(oprot);
9539
        oprot.writeFieldEnd();
9540
      }
9541
      oprot.writeFieldStop();
9542
      oprot.writeStructEnd();
9543
    }
9544
 
9545
    @Override
9546
    public String toString() {
9547
      StringBuilder sb = new StringBuilder("userExists_result(");
9548
      boolean first = true;
9549
 
9550
      sb.append("success:");
9551
      sb.append(this.success);
9552
      first = false;
9553
      if (!first) sb.append(", ");
9554
      sb.append("ucx:");
9555
      if (this.ucx == null) {
9556
        sb.append("null");
9557
      } else {
9558
        sb.append(this.ucx);
9559
      }
9560
      first = false;
9561
      sb.append(")");
9562
      return sb.toString();
9563
    }
9564
 
9565
    public void validate() throws TException {
9566
      // check for required fields
9567
    }
9568
 
9569
  }
9570
 
9571
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
9572
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
9573
 
9574
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
9575
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 9576
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 9577
 
9578
    private long userId;
9579
    private Address address;
9580
    private boolean setDefault;
9581
 
9582
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9583
    public enum _Fields implements TFieldIdEnum {
9584
      USER_ID((short)1, "userId"),
9585
      ADDRESS((short)2, "address"),
571 rajveer 9586
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 9587
 
9588
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9589
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9590
 
9591
      static {
9592
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9593
          byId.put((int)field._thriftId, field);
9594
          byName.put(field.getFieldName(), field);
9595
        }
9596
      }
9597
 
9598
      /**
9599
       * Find the _Fields constant that matches fieldId, or null if its not found.
9600
       */
9601
      public static _Fields findByThriftId(int fieldId) {
9602
        return byId.get(fieldId);
9603
      }
9604
 
9605
      /**
9606
       * Find the _Fields constant that matches fieldId, throwing an exception
9607
       * if it is not found.
9608
       */
9609
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9610
        _Fields fields = findByThriftId(fieldId);
9611
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9612
        return fields;
9613
      }
9614
 
9615
      /**
9616
       * Find the _Fields constant that matches name, or null if its not found.
9617
       */
9618
      public static _Fields findByName(String name) {
9619
        return byName.get(name);
9620
      }
9621
 
9622
      private final short _thriftId;
9623
      private final String _fieldName;
9624
 
9625
      _Fields(short thriftId, String fieldName) {
9626
        _thriftId = thriftId;
9627
        _fieldName = fieldName;
9628
      }
9629
 
9630
      public short getThriftFieldId() {
9631
        return _thriftId;
9632
      }
9633
 
9634
      public String getFieldName() {
9635
        return _fieldName;
9636
      }
9637
    }
9638
 
9639
    // isset id assignments
9640
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 9641
    private static final int __SETDEFAULT_ISSET_ID = 1;
9642
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 9643
 
9644
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9645
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
9646
          new FieldValueMetaData(TType.I64)));
9647
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
9648
          new StructMetaData(TType.STRUCT, Address.class)));
9649
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
9650
          new FieldValueMetaData(TType.BOOL)));
9651
    }});
9652
 
9653
    static {
9654
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
9655
    }
9656
 
9657
    public addAddressForUser_args() {
9658
    }
9659
 
9660
    public addAddressForUser_args(
9661
      long userId,
9662
      Address address,
9663
      boolean setDefault)
9664
    {
9665
      this();
9666
      this.userId = userId;
9667
      setUserIdIsSet(true);
9668
      this.address = address;
9669
      this.setDefault = setDefault;
9670
      setSetDefaultIsSet(true);
9671
    }
9672
 
9673
    /**
9674
     * Performs a deep copy on <i>other</i>.
9675
     */
9676
    public addAddressForUser_args(addAddressForUser_args other) {
9677
      __isset_bit_vector.clear();
9678
      __isset_bit_vector.or(other.__isset_bit_vector);
9679
      this.userId = other.userId;
9680
      if (other.isSetAddress()) {
9681
        this.address = new Address(other.address);
9682
      }
9683
      this.setDefault = other.setDefault;
9684
    }
9685
 
9686
    public addAddressForUser_args deepCopy() {
9687
      return new addAddressForUser_args(this);
9688
    }
9689
 
9690
    @Deprecated
9691
    public addAddressForUser_args clone() {
9692
      return new addAddressForUser_args(this);
9693
    }
9694
 
9695
    public long getUserId() {
9696
      return this.userId;
9697
    }
9698
 
9699
    public addAddressForUser_args setUserId(long userId) {
9700
      this.userId = userId;
9701
      setUserIdIsSet(true);
123 ashish 9702
      return this;
9703
    }
9704
 
553 chandransh 9705
    public void unsetUserId() {
9706
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 9707
    }
9708
 
553 chandransh 9709
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
9710
    public boolean isSetUserId() {
9711
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 9712
    }
9713
 
553 chandransh 9714
    public void setUserIdIsSet(boolean value) {
9715
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9716
    }
9717
 
9718
    public Address getAddress() {
9719
      return this.address;
9720
    }
9721
 
9722
    public addAddressForUser_args setAddress(Address address) {
9723
      this.address = address;
9724
      return this;
9725
    }
9726
 
9727
    public void unsetAddress() {
9728
      this.address = null;
9729
    }
9730
 
9731
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
9732
    public boolean isSetAddress() {
9733
      return this.address != null;
9734
    }
9735
 
9736
    public void setAddressIsSet(boolean value) {
123 ashish 9737
      if (!value) {
553 chandransh 9738
        this.address = null;
123 ashish 9739
      }
9740
    }
9741
 
553 chandransh 9742
    public boolean isSetDefault() {
9743
      return this.setDefault;
9744
    }
9745
 
9746
    public addAddressForUser_args setSetDefault(boolean setDefault) {
9747
      this.setDefault = setDefault;
9748
      setSetDefaultIsSet(true);
9749
      return this;
9750
    }
9751
 
9752
    public void unsetSetDefault() {
9753
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
9754
    }
9755
 
9756
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
9757
    public boolean isSetSetDefault() {
9758
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
9759
    }
9760
 
9761
    public void setSetDefaultIsSet(boolean value) {
9762
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
9763
    }
9764
 
123 ashish 9765
    public void setFieldValue(_Fields field, Object value) {
9766
      switch (field) {
553 chandransh 9767
      case USER_ID:
123 ashish 9768
        if (value == null) {
553 chandransh 9769
          unsetUserId();
123 ashish 9770
        } else {
553 chandransh 9771
          setUserId((Long)value);
123 ashish 9772
        }
9773
        break;
9774
 
553 chandransh 9775
      case ADDRESS:
123 ashish 9776
        if (value == null) {
553 chandransh 9777
          unsetAddress();
123 ashish 9778
        } else {
553 chandransh 9779
          setAddress((Address)value);
123 ashish 9780
        }
9781
        break;
9782
 
553 chandransh 9783
      case SET_DEFAULT:
9784
        if (value == null) {
9785
          unsetSetDefault();
9786
        } else {
9787
          setSetDefault((Boolean)value);
9788
        }
9789
        break;
9790
 
123 ashish 9791
      }
9792
    }
9793
 
9794
    public void setFieldValue(int fieldID, Object value) {
9795
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9796
    }
9797
 
9798
    public Object getFieldValue(_Fields field) {
9799
      switch (field) {
553 chandransh 9800
      case USER_ID:
9801
        return new Long(getUserId());
123 ashish 9802
 
553 chandransh 9803
      case ADDRESS:
9804
        return getAddress();
123 ashish 9805
 
553 chandransh 9806
      case SET_DEFAULT:
9807
        return new Boolean(isSetDefault());
9808
 
123 ashish 9809
      }
9810
      throw new IllegalStateException();
9811
    }
9812
 
9813
    public Object getFieldValue(int fieldId) {
9814
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9815
    }
9816
 
9817
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9818
    public boolean isSet(_Fields field) {
9819
      switch (field) {
553 chandransh 9820
      case USER_ID:
9821
        return isSetUserId();
9822
      case ADDRESS:
9823
        return isSetAddress();
9824
      case SET_DEFAULT:
9825
        return isSetSetDefault();
123 ashish 9826
      }
9827
      throw new IllegalStateException();
9828
    }
9829
 
9830
    public boolean isSet(int fieldID) {
9831
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9832
    }
9833
 
9834
    @Override
9835
    public boolean equals(Object that) {
9836
      if (that == null)
9837
        return false;
553 chandransh 9838
      if (that instanceof addAddressForUser_args)
9839
        return this.equals((addAddressForUser_args)that);
123 ashish 9840
      return false;
9841
    }
9842
 
553 chandransh 9843
    public boolean equals(addAddressForUser_args that) {
123 ashish 9844
      if (that == null)
9845
        return false;
9846
 
553 chandransh 9847
      boolean this_present_userId = true;
9848
      boolean that_present_userId = true;
9849
      if (this_present_userId || that_present_userId) {
9850
        if (!(this_present_userId && that_present_userId))
123 ashish 9851
          return false;
553 chandransh 9852
        if (this.userId != that.userId)
123 ashish 9853
          return false;
9854
      }
9855
 
553 chandransh 9856
      boolean this_present_address = true && this.isSetAddress();
9857
      boolean that_present_address = true && that.isSetAddress();
9858
      if (this_present_address || that_present_address) {
9859
        if (!(this_present_address && that_present_address))
123 ashish 9860
          return false;
553 chandransh 9861
        if (!this.address.equals(that.address))
123 ashish 9862
          return false;
9863
      }
9864
 
553 chandransh 9865
      boolean this_present_setDefault = true;
9866
      boolean that_present_setDefault = true;
9867
      if (this_present_setDefault || that_present_setDefault) {
9868
        if (!(this_present_setDefault && that_present_setDefault))
9869
          return false;
9870
        if (this.setDefault != that.setDefault)
9871
          return false;
9872
      }
9873
 
123 ashish 9874
      return true;
9875
    }
9876
 
9877
    @Override
9878
    public int hashCode() {
9879
      return 0;
9880
    }
9881
 
553 chandransh 9882
    public int compareTo(addAddressForUser_args other) {
123 ashish 9883
      if (!getClass().equals(other.getClass())) {
9884
        return getClass().getName().compareTo(other.getClass().getName());
9885
      }
9886
 
9887
      int lastComparison = 0;
553 chandransh 9888
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 9889
 
553 chandransh 9890
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 9891
      if (lastComparison != 0) {
9892
        return lastComparison;
9893
      }
553 chandransh 9894
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 9895
      if (lastComparison != 0) {
9896
        return lastComparison;
9897
      }
553 chandransh 9898
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 9899
      if (lastComparison != 0) {
9900
        return lastComparison;
9901
      }
553 chandransh 9902
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 9903
      if (lastComparison != 0) {
9904
        return lastComparison;
9905
      }
553 chandransh 9906
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
9907
      if (lastComparison != 0) {
9908
        return lastComparison;
9909
      }
9910
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
9911
      if (lastComparison != 0) {
9912
        return lastComparison;
9913
      }
123 ashish 9914
      return 0;
9915
    }
9916
 
9917
    public void read(TProtocol iprot) throws TException {
9918
      TField field;
9919
      iprot.readStructBegin();
9920
      while (true)
9921
      {
9922
        field = iprot.readFieldBegin();
9923
        if (field.type == TType.STOP) { 
9924
          break;
9925
        }
9926
        _Fields fieldId = _Fields.findByThriftId(field.id);
9927
        if (fieldId == null) {
9928
          TProtocolUtil.skip(iprot, field.type);
9929
        } else {
9930
          switch (fieldId) {
553 chandransh 9931
            case USER_ID:
9932
              if (field.type == TType.I64) {
9933
                this.userId = iprot.readI64();
9934
                setUserIdIsSet(true);
123 ashish 9935
              } else { 
9936
                TProtocolUtil.skip(iprot, field.type);
9937
              }
9938
              break;
553 chandransh 9939
            case ADDRESS:
9940
              if (field.type == TType.STRUCT) {
9941
                this.address = new Address();
9942
                this.address.read(iprot);
123 ashish 9943
              } else { 
9944
                TProtocolUtil.skip(iprot, field.type);
9945
              }
9946
              break;
553 chandransh 9947
            case SET_DEFAULT:
123 ashish 9948
              if (field.type == TType.BOOL) {
553 chandransh 9949
                this.setDefault = iprot.readBool();
9950
                setSetDefaultIsSet(true);
123 ashish 9951
              } else { 
9952
                TProtocolUtil.skip(iprot, field.type);
9953
              }
9954
              break;
9955
          }
9956
          iprot.readFieldEnd();
9957
        }
9958
      }
9959
      iprot.readStructEnd();
9960
      validate();
9961
    }
9962
 
9963
    public void write(TProtocol oprot) throws TException {
9964
      validate();
9965
 
9966
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9967
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
9968
      oprot.writeI64(this.userId);
9969
      oprot.writeFieldEnd();
9970
      if (this.address != null) {
9971
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
9972
        this.address.write(oprot);
123 ashish 9973
        oprot.writeFieldEnd();
9974
      }
553 chandransh 9975
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
9976
      oprot.writeBool(this.setDefault);
9977
      oprot.writeFieldEnd();
123 ashish 9978
      oprot.writeFieldStop();
9979
      oprot.writeStructEnd();
9980
    }
9981
 
9982
    @Override
9983
    public String toString() {
553 chandransh 9984
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 9985
      boolean first = true;
9986
 
553 chandransh 9987
      sb.append("userId:");
9988
      sb.append(this.userId);
123 ashish 9989
      first = false;
9990
      if (!first) sb.append(", ");
553 chandransh 9991
      sb.append("address:");
9992
      if (this.address == null) {
123 ashish 9993
        sb.append("null");
9994
      } else {
553 chandransh 9995
        sb.append(this.address);
123 ashish 9996
      }
9997
      first = false;
9998
      if (!first) sb.append(", ");
553 chandransh 9999
      sb.append("setDefault:");
10000
      sb.append(this.setDefault);
10001
      first = false;
123 ashish 10002
      sb.append(")");
10003
      return sb.toString();
10004
    }
10005
 
10006
    public void validate() throws TException {
10007
      // check for required fields
10008
    }
10009
 
10010
  }
10011
 
553 chandransh 10012
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
10013
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 10014
 
571 rajveer 10015
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 10016
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 10017
 
571 rajveer 10018
    private long success;
553 chandransh 10019
    private UserContextException ucx;
123 ashish 10020
 
10021
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10022
    public enum _Fields implements TFieldIdEnum {
10023
      SUCCESS((short)0, "success"),
553 chandransh 10024
      UCX((short)1, "ucx");
123 ashish 10025
 
10026
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10027
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10028
 
10029
      static {
10030
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10031
          byId.put((int)field._thriftId, field);
10032
          byName.put(field.getFieldName(), field);
10033
        }
10034
      }
10035
 
10036
      /**
10037
       * Find the _Fields constant that matches fieldId, or null if its not found.
10038
       */
10039
      public static _Fields findByThriftId(int fieldId) {
10040
        return byId.get(fieldId);
10041
      }
10042
 
10043
      /**
10044
       * Find the _Fields constant that matches fieldId, throwing an exception
10045
       * if it is not found.
10046
       */
10047
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10048
        _Fields fields = findByThriftId(fieldId);
10049
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10050
        return fields;
10051
      }
10052
 
10053
      /**
10054
       * Find the _Fields constant that matches name, or null if its not found.
10055
       */
10056
      public static _Fields findByName(String name) {
10057
        return byName.get(name);
10058
      }
10059
 
10060
      private final short _thriftId;
10061
      private final String _fieldName;
10062
 
10063
      _Fields(short thriftId, String fieldName) {
10064
        _thriftId = thriftId;
10065
        _fieldName = fieldName;
10066
      }
10067
 
10068
      public short getThriftFieldId() {
10069
        return _thriftId;
10070
      }
10071
 
10072
      public String getFieldName() {
10073
        return _fieldName;
10074
      }
10075
    }
10076
 
10077
    // isset id assignments
10078
    private static final int __SUCCESS_ISSET_ID = 0;
10079
    private BitSet __isset_bit_vector = new BitSet(1);
10080
 
10081
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10082
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 10083
          new FieldValueMetaData(TType.I64)));
553 chandransh 10084
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 10085
          new FieldValueMetaData(TType.STRUCT)));
10086
    }});
10087
 
10088
    static {
553 chandransh 10089
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 10090
    }
10091
 
553 chandransh 10092
    public addAddressForUser_result() {
123 ashish 10093
    }
10094
 
553 chandransh 10095
    public addAddressForUser_result(
571 rajveer 10096
      long success,
553 chandransh 10097
      UserContextException ucx)
123 ashish 10098
    {
10099
      this();
10100
      this.success = success;
10101
      setSuccessIsSet(true);
553 chandransh 10102
      this.ucx = ucx;
123 ashish 10103
    }
10104
 
10105
    /**
10106
     * Performs a deep copy on <i>other</i>.
10107
     */
553 chandransh 10108
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 10109
      __isset_bit_vector.clear();
10110
      __isset_bit_vector.or(other.__isset_bit_vector);
10111
      this.success = other.success;
553 chandransh 10112
      if (other.isSetUcx()) {
10113
        this.ucx = new UserContextException(other.ucx);
123 ashish 10114
      }
10115
    }
10116
 
553 chandransh 10117
    public addAddressForUser_result deepCopy() {
10118
      return new addAddressForUser_result(this);
123 ashish 10119
    }
10120
 
10121
    @Deprecated
553 chandransh 10122
    public addAddressForUser_result clone() {
10123
      return new addAddressForUser_result(this);
123 ashish 10124
    }
10125
 
571 rajveer 10126
    public long getSuccess() {
123 ashish 10127
      return this.success;
10128
    }
10129
 
571 rajveer 10130
    public addAddressForUser_result setSuccess(long success) {
123 ashish 10131
      this.success = success;
10132
      setSuccessIsSet(true);
10133
      return this;
10134
    }
10135
 
10136
    public void unsetSuccess() {
10137
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10138
    }
10139
 
10140
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10141
    public boolean isSetSuccess() {
10142
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10143
    }
10144
 
10145
    public void setSuccessIsSet(boolean value) {
10146
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10147
    }
10148
 
553 chandransh 10149
    public UserContextException getUcx() {
10150
      return this.ucx;
123 ashish 10151
    }
10152
 
553 chandransh 10153
    public addAddressForUser_result setUcx(UserContextException ucx) {
10154
      this.ucx = ucx;
123 ashish 10155
      return this;
10156
    }
10157
 
553 chandransh 10158
    public void unsetUcx() {
10159
      this.ucx = null;
123 ashish 10160
    }
10161
 
553 chandransh 10162
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10163
    public boolean isSetUcx() {
10164
      return this.ucx != null;
123 ashish 10165
    }
10166
 
553 chandransh 10167
    public void setUcxIsSet(boolean value) {
123 ashish 10168
      if (!value) {
553 chandransh 10169
        this.ucx = null;
123 ashish 10170
      }
10171
    }
10172
 
10173
    public void setFieldValue(_Fields field, Object value) {
10174
      switch (field) {
10175
      case SUCCESS:
10176
        if (value == null) {
10177
          unsetSuccess();
10178
        } else {
571 rajveer 10179
          setSuccess((Long)value);
123 ashish 10180
        }
10181
        break;
10182
 
553 chandransh 10183
      case UCX:
123 ashish 10184
        if (value == null) {
553 chandransh 10185
          unsetUcx();
123 ashish 10186
        } else {
553 chandransh 10187
          setUcx((UserContextException)value);
123 ashish 10188
        }
10189
        break;
10190
 
10191
      }
10192
    }
10193
 
10194
    public void setFieldValue(int fieldID, Object value) {
10195
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10196
    }
10197
 
10198
    public Object getFieldValue(_Fields field) {
10199
      switch (field) {
10200
      case SUCCESS:
571 rajveer 10201
        return new Long(getSuccess());
123 ashish 10202
 
553 chandransh 10203
      case UCX:
10204
        return getUcx();
123 ashish 10205
 
10206
      }
10207
      throw new IllegalStateException();
10208
    }
10209
 
10210
    public Object getFieldValue(int fieldId) {
10211
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10212
    }
10213
 
10214
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10215
    public boolean isSet(_Fields field) {
10216
      switch (field) {
10217
      case SUCCESS:
10218
        return isSetSuccess();
553 chandransh 10219
      case UCX:
10220
        return isSetUcx();
123 ashish 10221
      }
10222
      throw new IllegalStateException();
10223
    }
10224
 
10225
    public boolean isSet(int fieldID) {
10226
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10227
    }
10228
 
10229
    @Override
10230
    public boolean equals(Object that) {
10231
      if (that == null)
10232
        return false;
553 chandransh 10233
      if (that instanceof addAddressForUser_result)
10234
        return this.equals((addAddressForUser_result)that);
123 ashish 10235
      return false;
10236
    }
10237
 
553 chandransh 10238
    public boolean equals(addAddressForUser_result that) {
123 ashish 10239
      if (that == null)
10240
        return false;
10241
 
10242
      boolean this_present_success = true;
10243
      boolean that_present_success = true;
10244
      if (this_present_success || that_present_success) {
10245
        if (!(this_present_success && that_present_success))
10246
          return false;
10247
        if (this.success != that.success)
10248
          return false;
10249
      }
10250
 
553 chandransh 10251
      boolean this_present_ucx = true && this.isSetUcx();
10252
      boolean that_present_ucx = true && that.isSetUcx();
10253
      if (this_present_ucx || that_present_ucx) {
10254
        if (!(this_present_ucx && that_present_ucx))
123 ashish 10255
          return false;
553 chandransh 10256
        if (!this.ucx.equals(that.ucx))
123 ashish 10257
          return false;
10258
      }
10259
 
10260
      return true;
10261
    }
10262
 
10263
    @Override
10264
    public int hashCode() {
10265
      return 0;
10266
    }
10267
 
553 chandransh 10268
    public int compareTo(addAddressForUser_result other) {
123 ashish 10269
      if (!getClass().equals(other.getClass())) {
10270
        return getClass().getName().compareTo(other.getClass().getName());
10271
      }
10272
 
10273
      int lastComparison = 0;
553 chandransh 10274
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 10275
 
10276
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10277
      if (lastComparison != 0) {
10278
        return lastComparison;
10279
      }
10280
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10281
      if (lastComparison != 0) {
10282
        return lastComparison;
10283
      }
553 chandransh 10284
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 10285
      if (lastComparison != 0) {
10286
        return lastComparison;
10287
      }
553 chandransh 10288
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 10289
      if (lastComparison != 0) {
10290
        return lastComparison;
10291
      }
10292
      return 0;
10293
    }
10294
 
10295
    public void read(TProtocol iprot) throws TException {
10296
      TField field;
10297
      iprot.readStructBegin();
10298
      while (true)
10299
      {
10300
        field = iprot.readFieldBegin();
10301
        if (field.type == TType.STOP) { 
10302
          break;
10303
        }
10304
        _Fields fieldId = _Fields.findByThriftId(field.id);
10305
        if (fieldId == null) {
10306
          TProtocolUtil.skip(iprot, field.type);
10307
        } else {
10308
          switch (fieldId) {
10309
            case SUCCESS:
571 rajveer 10310
              if (field.type == TType.I64) {
10311
                this.success = iprot.readI64();
123 ashish 10312
                setSuccessIsSet(true);
10313
              } else { 
10314
                TProtocolUtil.skip(iprot, field.type);
10315
              }
10316
              break;
553 chandransh 10317
            case UCX:
123 ashish 10318
              if (field.type == TType.STRUCT) {
553 chandransh 10319
                this.ucx = new UserContextException();
10320
                this.ucx.read(iprot);
123 ashish 10321
              } else { 
10322
                TProtocolUtil.skip(iprot, field.type);
10323
              }
10324
              break;
10325
          }
10326
          iprot.readFieldEnd();
10327
        }
10328
      }
10329
      iprot.readStructEnd();
10330
      validate();
10331
    }
10332
 
10333
    public void write(TProtocol oprot) throws TException {
10334
      oprot.writeStructBegin(STRUCT_DESC);
10335
 
10336
      if (this.isSetSuccess()) {
10337
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 10338
        oprot.writeI64(this.success);
123 ashish 10339
        oprot.writeFieldEnd();
553 chandransh 10340
      } else if (this.isSetUcx()) {
10341
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10342
        this.ucx.write(oprot);
123 ashish 10343
        oprot.writeFieldEnd();
10344
      }
10345
      oprot.writeFieldStop();
10346
      oprot.writeStructEnd();
10347
    }
10348
 
10349
    @Override
10350
    public String toString() {
553 chandransh 10351
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 10352
      boolean first = true;
10353
 
10354
      sb.append("success:");
10355
      sb.append(this.success);
10356
      first = false;
10357
      if (!first) sb.append(", ");
553 chandransh 10358
      sb.append("ucx:");
10359
      if (this.ucx == null) {
123 ashish 10360
        sb.append("null");
10361
      } else {
553 chandransh 10362
        sb.append(this.ucx);
123 ashish 10363
      }
10364
      first = false;
10365
      sb.append(")");
10366
      return sb.toString();
10367
    }
10368
 
10369
    public void validate() throws TException {
10370
      // check for required fields
10371
    }
10372
 
10373
  }
10374
 
553 chandransh 10375
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
10376
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 10377
 
553 chandransh 10378
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10379
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 10380
 
553 chandransh 10381
    private long userid;
10382
    private long addressId;
48 ashish 10383
 
10384
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10385
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10386
      USERID((short)1, "userid"),
10387
      ADDRESS_ID((short)2, "addressId");
48 ashish 10388
 
10389
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10390
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10391
 
10392
      static {
10393
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10394
          byId.put((int)field._thriftId, field);
10395
          byName.put(field.getFieldName(), field);
10396
        }
10397
      }
10398
 
10399
      /**
10400
       * Find the _Fields constant that matches fieldId, or null if its not found.
10401
       */
10402
      public static _Fields findByThriftId(int fieldId) {
10403
        return byId.get(fieldId);
10404
      }
10405
 
10406
      /**
10407
       * Find the _Fields constant that matches fieldId, throwing an exception
10408
       * if it is not found.
10409
       */
10410
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10411
        _Fields fields = findByThriftId(fieldId);
10412
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10413
        return fields;
10414
      }
10415
 
10416
      /**
10417
       * Find the _Fields constant that matches name, or null if its not found.
10418
       */
10419
      public static _Fields findByName(String name) {
10420
        return byName.get(name);
10421
      }
10422
 
10423
      private final short _thriftId;
10424
      private final String _fieldName;
10425
 
10426
      _Fields(short thriftId, String fieldName) {
10427
        _thriftId = thriftId;
10428
        _fieldName = fieldName;
10429
      }
10430
 
10431
      public short getThriftFieldId() {
10432
        return _thriftId;
10433
      }
10434
 
10435
      public String getFieldName() {
10436
        return _fieldName;
10437
      }
10438
    }
10439
 
10440
    // isset id assignments
553 chandransh 10441
    private static final int __USERID_ISSET_ID = 0;
10442
    private static final int __ADDRESSID_ISSET_ID = 1;
10443
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10444
 
10445
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10446
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10447
          new FieldValueMetaData(TType.I64)));
10448
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
10449
          new FieldValueMetaData(TType.I64)));
48 ashish 10450
    }});
10451
 
10452
    static {
553 chandransh 10453
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 10454
    }
10455
 
553 chandransh 10456
    public removeAddressForUser_args() {
48 ashish 10457
    }
10458
 
553 chandransh 10459
    public removeAddressForUser_args(
10460
      long userid,
10461
      long addressId)
48 ashish 10462
    {
10463
      this();
553 chandransh 10464
      this.userid = userid;
10465
      setUseridIsSet(true);
10466
      this.addressId = addressId;
10467
      setAddressIdIsSet(true);
48 ashish 10468
    }
10469
 
10470
    /**
10471
     * Performs a deep copy on <i>other</i>.
10472
     */
553 chandransh 10473
    public removeAddressForUser_args(removeAddressForUser_args other) {
10474
      __isset_bit_vector.clear();
10475
      __isset_bit_vector.or(other.__isset_bit_vector);
10476
      this.userid = other.userid;
10477
      this.addressId = other.addressId;
48 ashish 10478
    }
10479
 
553 chandransh 10480
    public removeAddressForUser_args deepCopy() {
10481
      return new removeAddressForUser_args(this);
48 ashish 10482
    }
10483
 
10484
    @Deprecated
553 chandransh 10485
    public removeAddressForUser_args clone() {
10486
      return new removeAddressForUser_args(this);
48 ashish 10487
    }
10488
 
553 chandransh 10489
    public long getUserid() {
10490
      return this.userid;
48 ashish 10491
    }
10492
 
553 chandransh 10493
    public removeAddressForUser_args setUserid(long userid) {
10494
      this.userid = userid;
10495
      setUseridIsSet(true);
48 ashish 10496
      return this;
10497
    }
10498
 
553 chandransh 10499
    public void unsetUserid() {
10500
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10501
    }
10502
 
553 chandransh 10503
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10504
    public boolean isSetUserid() {
10505
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10506
    }
10507
 
553 chandransh 10508
    public void setUseridIsSet(boolean value) {
10509
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10510
    }
10511
 
553 chandransh 10512
    public long getAddressId() {
10513
      return this.addressId;
10514
    }
10515
 
10516
    public removeAddressForUser_args setAddressId(long addressId) {
10517
      this.addressId = addressId;
10518
      setAddressIdIsSet(true);
10519
      return this;
10520
    }
10521
 
10522
    public void unsetAddressId() {
10523
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
10524
    }
10525
 
10526
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
10527
    public boolean isSetAddressId() {
10528
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
10529
    }
10530
 
10531
    public void setAddressIdIsSet(boolean value) {
10532
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
10533
    }
10534
 
48 ashish 10535
    public void setFieldValue(_Fields field, Object value) {
10536
      switch (field) {
553 chandransh 10537
      case USERID:
48 ashish 10538
        if (value == null) {
553 chandransh 10539
          unsetUserid();
48 ashish 10540
        } else {
553 chandransh 10541
          setUserid((Long)value);
48 ashish 10542
        }
10543
        break;
10544
 
553 chandransh 10545
      case ADDRESS_ID:
10546
        if (value == null) {
10547
          unsetAddressId();
10548
        } else {
10549
          setAddressId((Long)value);
10550
        }
10551
        break;
10552
 
48 ashish 10553
      }
10554
    }
10555
 
10556
    public void setFieldValue(int fieldID, Object value) {
10557
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10558
    }
10559
 
10560
    public Object getFieldValue(_Fields field) {
10561
      switch (field) {
553 chandransh 10562
      case USERID:
10563
        return new Long(getUserid());
48 ashish 10564
 
553 chandransh 10565
      case ADDRESS_ID:
10566
        return new Long(getAddressId());
10567
 
48 ashish 10568
      }
10569
      throw new IllegalStateException();
10570
    }
10571
 
10572
    public Object getFieldValue(int fieldId) {
10573
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10574
    }
10575
 
10576
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10577
    public boolean isSet(_Fields field) {
10578
      switch (field) {
553 chandransh 10579
      case USERID:
10580
        return isSetUserid();
10581
      case ADDRESS_ID:
10582
        return isSetAddressId();
48 ashish 10583
      }
10584
      throw new IllegalStateException();
10585
    }
10586
 
10587
    public boolean isSet(int fieldID) {
10588
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10589
    }
10590
 
10591
    @Override
10592
    public boolean equals(Object that) {
10593
      if (that == null)
10594
        return false;
553 chandransh 10595
      if (that instanceof removeAddressForUser_args)
10596
        return this.equals((removeAddressForUser_args)that);
48 ashish 10597
      return false;
10598
    }
10599
 
553 chandransh 10600
    public boolean equals(removeAddressForUser_args that) {
48 ashish 10601
      if (that == null)
10602
        return false;
10603
 
553 chandransh 10604
      boolean this_present_userid = true;
10605
      boolean that_present_userid = true;
10606
      if (this_present_userid || that_present_userid) {
10607
        if (!(this_present_userid && that_present_userid))
48 ashish 10608
          return false;
553 chandransh 10609
        if (this.userid != that.userid)
48 ashish 10610
          return false;
10611
      }
10612
 
553 chandransh 10613
      boolean this_present_addressId = true;
10614
      boolean that_present_addressId = true;
10615
      if (this_present_addressId || that_present_addressId) {
10616
        if (!(this_present_addressId && that_present_addressId))
10617
          return false;
10618
        if (this.addressId != that.addressId)
10619
          return false;
10620
      }
10621
 
48 ashish 10622
      return true;
10623
    }
10624
 
10625
    @Override
10626
    public int hashCode() {
10627
      return 0;
10628
    }
10629
 
553 chandransh 10630
    public int compareTo(removeAddressForUser_args other) {
48 ashish 10631
      if (!getClass().equals(other.getClass())) {
10632
        return getClass().getName().compareTo(other.getClass().getName());
10633
      }
10634
 
10635
      int lastComparison = 0;
553 chandransh 10636
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 10637
 
553 chandransh 10638
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 10639
      if (lastComparison != 0) {
10640
        return lastComparison;
10641
      }
553 chandransh 10642
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 10643
      if (lastComparison != 0) {
10644
        return lastComparison;
10645
      }
553 chandransh 10646
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
10647
      if (lastComparison != 0) {
10648
        return lastComparison;
10649
      }
10650
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
10651
      if (lastComparison != 0) {
10652
        return lastComparison;
10653
      }
48 ashish 10654
      return 0;
10655
    }
10656
 
10657
    public void read(TProtocol iprot) throws TException {
10658
      TField field;
10659
      iprot.readStructBegin();
10660
      while (true)
10661
      {
10662
        field = iprot.readFieldBegin();
10663
        if (field.type == TType.STOP) { 
10664
          break;
10665
        }
10666
        _Fields fieldId = _Fields.findByThriftId(field.id);
10667
        if (fieldId == null) {
10668
          TProtocolUtil.skip(iprot, field.type);
10669
        } else {
10670
          switch (fieldId) {
553 chandransh 10671
            case USERID:
10672
              if (field.type == TType.I64) {
10673
                this.userid = iprot.readI64();
10674
                setUseridIsSet(true);
48 ashish 10675
              } else { 
10676
                TProtocolUtil.skip(iprot, field.type);
10677
              }
10678
              break;
553 chandransh 10679
            case ADDRESS_ID:
10680
              if (field.type == TType.I64) {
10681
                this.addressId = iprot.readI64();
10682
                setAddressIdIsSet(true);
10683
              } else { 
10684
                TProtocolUtil.skip(iprot, field.type);
10685
              }
10686
              break;
48 ashish 10687
          }
10688
          iprot.readFieldEnd();
10689
        }
10690
      }
10691
      iprot.readStructEnd();
10692
      validate();
10693
    }
10694
 
10695
    public void write(TProtocol oprot) throws TException {
10696
      validate();
10697
 
10698
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10699
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10700
      oprot.writeI64(this.userid);
10701
      oprot.writeFieldEnd();
10702
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
10703
      oprot.writeI64(this.addressId);
10704
      oprot.writeFieldEnd();
48 ashish 10705
      oprot.writeFieldStop();
10706
      oprot.writeStructEnd();
10707
    }
10708
 
10709
    @Override
10710
    public String toString() {
553 chandransh 10711
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 10712
      boolean first = true;
10713
 
553 chandransh 10714
      sb.append("userid:");
10715
      sb.append(this.userid);
48 ashish 10716
      first = false;
553 chandransh 10717
      if (!first) sb.append(", ");
10718
      sb.append("addressId:");
10719
      sb.append(this.addressId);
10720
      first = false;
48 ashish 10721
      sb.append(")");
10722
      return sb.toString();
10723
    }
10724
 
10725
    public void validate() throws TException {
10726
      // check for required fields
10727
    }
10728
 
10729
  }
10730
 
553 chandransh 10731
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
10732
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 10733
 
10734
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10735
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10736
 
10737
    private boolean success;
10738
    private UserContextException ucx;
10739
 
10740
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10741
    public enum _Fields implements TFieldIdEnum {
10742
      SUCCESS((short)0, "success"),
10743
      UCX((short)1, "ucx");
10744
 
10745
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10746
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10747
 
10748
      static {
10749
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10750
          byId.put((int)field._thriftId, field);
10751
          byName.put(field.getFieldName(), field);
10752
        }
10753
      }
10754
 
10755
      /**
10756
       * Find the _Fields constant that matches fieldId, or null if its not found.
10757
       */
10758
      public static _Fields findByThriftId(int fieldId) {
10759
        return byId.get(fieldId);
10760
      }
10761
 
10762
      /**
10763
       * Find the _Fields constant that matches fieldId, throwing an exception
10764
       * if it is not found.
10765
       */
10766
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10767
        _Fields fields = findByThriftId(fieldId);
10768
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10769
        return fields;
10770
      }
10771
 
10772
      /**
10773
       * Find the _Fields constant that matches name, or null if its not found.
10774
       */
10775
      public static _Fields findByName(String name) {
10776
        return byName.get(name);
10777
      }
10778
 
10779
      private final short _thriftId;
10780
      private final String _fieldName;
10781
 
10782
      _Fields(short thriftId, String fieldName) {
10783
        _thriftId = thriftId;
10784
        _fieldName = fieldName;
10785
      }
10786
 
10787
      public short getThriftFieldId() {
10788
        return _thriftId;
10789
      }
10790
 
10791
      public String getFieldName() {
10792
        return _fieldName;
10793
      }
10794
    }
10795
 
10796
    // isset id assignments
10797
    private static final int __SUCCESS_ISSET_ID = 0;
10798
    private BitSet __isset_bit_vector = new BitSet(1);
10799
 
10800
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10801
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10802
          new FieldValueMetaData(TType.BOOL)));
10803
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10804
          new FieldValueMetaData(TType.STRUCT)));
10805
    }});
10806
 
10807
    static {
553 chandransh 10808
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 10809
    }
10810
 
553 chandransh 10811
    public removeAddressForUser_result() {
48 ashish 10812
    }
10813
 
553 chandransh 10814
    public removeAddressForUser_result(
48 ashish 10815
      boolean success,
10816
      UserContextException ucx)
10817
    {
10818
      this();
10819
      this.success = success;
10820
      setSuccessIsSet(true);
10821
      this.ucx = ucx;
10822
    }
10823
 
10824
    /**
10825
     * Performs a deep copy on <i>other</i>.
10826
     */
553 chandransh 10827
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 10828
      __isset_bit_vector.clear();
10829
      __isset_bit_vector.or(other.__isset_bit_vector);
10830
      this.success = other.success;
10831
      if (other.isSetUcx()) {
10832
        this.ucx = new UserContextException(other.ucx);
10833
      }
10834
    }
10835
 
553 chandransh 10836
    public removeAddressForUser_result deepCopy() {
10837
      return new removeAddressForUser_result(this);
48 ashish 10838
    }
10839
 
10840
    @Deprecated
553 chandransh 10841
    public removeAddressForUser_result clone() {
10842
      return new removeAddressForUser_result(this);
48 ashish 10843
    }
10844
 
10845
    public boolean isSuccess() {
10846
      return this.success;
10847
    }
10848
 
553 chandransh 10849
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 10850
      this.success = success;
10851
      setSuccessIsSet(true);
10852
      return this;
10853
    }
10854
 
10855
    public void unsetSuccess() {
10856
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10857
    }
10858
 
10859
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10860
    public boolean isSetSuccess() {
10861
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10862
    }
10863
 
10864
    public void setSuccessIsSet(boolean value) {
10865
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10866
    }
10867
 
10868
    public UserContextException getUcx() {
10869
      return this.ucx;
10870
    }
10871
 
553 chandransh 10872
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 10873
      this.ucx = ucx;
10874
      return this;
10875
    }
10876
 
10877
    public void unsetUcx() {
10878
      this.ucx = null;
10879
    }
10880
 
10881
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10882
    public boolean isSetUcx() {
10883
      return this.ucx != null;
10884
    }
10885
 
10886
    public void setUcxIsSet(boolean value) {
10887
      if (!value) {
10888
        this.ucx = null;
10889
      }
10890
    }
10891
 
10892
    public void setFieldValue(_Fields field, Object value) {
10893
      switch (field) {
10894
      case SUCCESS:
10895
        if (value == null) {
10896
          unsetSuccess();
10897
        } else {
10898
          setSuccess((Boolean)value);
10899
        }
10900
        break;
10901
 
10902
      case UCX:
10903
        if (value == null) {
10904
          unsetUcx();
10905
        } else {
10906
          setUcx((UserContextException)value);
10907
        }
10908
        break;
10909
 
10910
      }
10911
    }
10912
 
10913
    public void setFieldValue(int fieldID, Object value) {
10914
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10915
    }
10916
 
10917
    public Object getFieldValue(_Fields field) {
10918
      switch (field) {
10919
      case SUCCESS:
10920
        return new Boolean(isSuccess());
10921
 
10922
      case UCX:
10923
        return getUcx();
10924
 
10925
      }
10926
      throw new IllegalStateException();
10927
    }
10928
 
10929
    public Object getFieldValue(int fieldId) {
10930
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10931
    }
10932
 
10933
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10934
    public boolean isSet(_Fields field) {
10935
      switch (field) {
10936
      case SUCCESS:
10937
        return isSetSuccess();
10938
      case UCX:
10939
        return isSetUcx();
10940
      }
10941
      throw new IllegalStateException();
10942
    }
10943
 
10944
    public boolean isSet(int fieldID) {
10945
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10946
    }
10947
 
10948
    @Override
10949
    public boolean equals(Object that) {
10950
      if (that == null)
10951
        return false;
553 chandransh 10952
      if (that instanceof removeAddressForUser_result)
10953
        return this.equals((removeAddressForUser_result)that);
48 ashish 10954
      return false;
10955
    }
10956
 
553 chandransh 10957
    public boolean equals(removeAddressForUser_result that) {
48 ashish 10958
      if (that == null)
10959
        return false;
10960
 
10961
      boolean this_present_success = true;
10962
      boolean that_present_success = true;
10963
      if (this_present_success || that_present_success) {
10964
        if (!(this_present_success && that_present_success))
10965
          return false;
10966
        if (this.success != that.success)
10967
          return false;
10968
      }
10969
 
10970
      boolean this_present_ucx = true && this.isSetUcx();
10971
      boolean that_present_ucx = true && that.isSetUcx();
10972
      if (this_present_ucx || that_present_ucx) {
10973
        if (!(this_present_ucx && that_present_ucx))
10974
          return false;
10975
        if (!this.ucx.equals(that.ucx))
10976
          return false;
10977
      }
10978
 
10979
      return true;
10980
    }
10981
 
10982
    @Override
10983
    public int hashCode() {
10984
      return 0;
10985
    }
10986
 
553 chandransh 10987
    public int compareTo(removeAddressForUser_result other) {
48 ashish 10988
      if (!getClass().equals(other.getClass())) {
10989
        return getClass().getName().compareTo(other.getClass().getName());
10990
      }
10991
 
10992
      int lastComparison = 0;
553 chandransh 10993
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 10994
 
10995
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10996
      if (lastComparison != 0) {
10997
        return lastComparison;
10998
      }
10999
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11000
      if (lastComparison != 0) {
11001
        return lastComparison;
11002
      }
11003
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11004
      if (lastComparison != 0) {
11005
        return lastComparison;
11006
      }
11007
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11008
      if (lastComparison != 0) {
11009
        return lastComparison;
11010
      }
11011
      return 0;
11012
    }
11013
 
11014
    public void read(TProtocol iprot) throws TException {
11015
      TField field;
11016
      iprot.readStructBegin();
11017
      while (true)
11018
      {
11019
        field = iprot.readFieldBegin();
11020
        if (field.type == TType.STOP) { 
11021
          break;
11022
        }
11023
        _Fields fieldId = _Fields.findByThriftId(field.id);
11024
        if (fieldId == null) {
11025
          TProtocolUtil.skip(iprot, field.type);
11026
        } else {
11027
          switch (fieldId) {
11028
            case SUCCESS:
11029
              if (field.type == TType.BOOL) {
11030
                this.success = iprot.readBool();
11031
                setSuccessIsSet(true);
11032
              } else { 
11033
                TProtocolUtil.skip(iprot, field.type);
11034
              }
11035
              break;
11036
            case UCX:
11037
              if (field.type == TType.STRUCT) {
11038
                this.ucx = new UserContextException();
11039
                this.ucx.read(iprot);
11040
              } else { 
11041
                TProtocolUtil.skip(iprot, field.type);
11042
              }
11043
              break;
11044
          }
11045
          iprot.readFieldEnd();
11046
        }
11047
      }
11048
      iprot.readStructEnd();
11049
      validate();
11050
    }
11051
 
11052
    public void write(TProtocol oprot) throws TException {
11053
      oprot.writeStructBegin(STRUCT_DESC);
11054
 
11055
      if (this.isSetSuccess()) {
11056
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11057
        oprot.writeBool(this.success);
11058
        oprot.writeFieldEnd();
11059
      } else if (this.isSetUcx()) {
11060
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11061
        this.ucx.write(oprot);
11062
        oprot.writeFieldEnd();
11063
      }
11064
      oprot.writeFieldStop();
11065
      oprot.writeStructEnd();
11066
    }
11067
 
11068
    @Override
11069
    public String toString() {
553 chandransh 11070
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 11071
      boolean first = true;
11072
 
11073
      sb.append("success:");
11074
      sb.append(this.success);
11075
      first = false;
11076
      if (!first) sb.append(", ");
11077
      sb.append("ucx:");
11078
      if (this.ucx == null) {
11079
        sb.append("null");
11080
      } else {
11081
        sb.append(this.ucx);
11082
      }
11083
      first = false;
11084
      sb.append(")");
11085
      return sb.toString();
11086
    }
11087
 
11088
    public void validate() throws TException {
11089
      // check for required fields
11090
    }
11091
 
11092
  }
11093
 
553 chandransh 11094
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
11095
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 11096
 
553 chandransh 11097
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 11098
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
11099
 
553 chandransh 11100
    private long userId;
48 ashish 11101
    private long timestamp;
11102
 
11103
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11104
    public enum _Fields implements TFieldIdEnum {
553 chandransh 11105
      USER_ID((short)1, "userId"),
11106
      TIMESTAMP((short)2, "timestamp");
48 ashish 11107
 
11108
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11109
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11110
 
11111
      static {
11112
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11113
          byId.put((int)field._thriftId, field);
11114
          byName.put(field.getFieldName(), field);
11115
        }
11116
      }
11117
 
11118
      /**
11119
       * Find the _Fields constant that matches fieldId, or null if its not found.
11120
       */
11121
      public static _Fields findByThriftId(int fieldId) {
11122
        return byId.get(fieldId);
11123
      }
11124
 
11125
      /**
11126
       * Find the _Fields constant that matches fieldId, throwing an exception
11127
       * if it is not found.
11128
       */
11129
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11130
        _Fields fields = findByThriftId(fieldId);
11131
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11132
        return fields;
11133
      }
11134
 
11135
      /**
11136
       * Find the _Fields constant that matches name, or null if its not found.
11137
       */
11138
      public static _Fields findByName(String name) {
11139
        return byName.get(name);
11140
      }
11141
 
11142
      private final short _thriftId;
11143
      private final String _fieldName;
11144
 
11145
      _Fields(short thriftId, String fieldName) {
11146
        _thriftId = thriftId;
11147
        _fieldName = fieldName;
11148
      }
11149
 
11150
      public short getThriftFieldId() {
11151
        return _thriftId;
11152
      }
11153
 
11154
      public String getFieldName() {
11155
        return _fieldName;
11156
      }
11157
    }
11158
 
11159
    // isset id assignments
553 chandransh 11160
    private static final int __USERID_ISSET_ID = 0;
11161
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 11162
    private BitSet __isset_bit_vector = new BitSet(2);
11163
 
11164
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 11165
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
11166
          new FieldValueMetaData(TType.I64)));
48 ashish 11167
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11168
          new FieldValueMetaData(TType.I64)));
11169
    }});
11170
 
11171
    static {
553 chandransh 11172
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 11173
    }
11174
 
553 chandransh 11175
    public setUserAsLoggedIn_args() {
48 ashish 11176
    }
11177
 
553 chandransh 11178
    public setUserAsLoggedIn_args(
11179
      long userId,
11180
      long timestamp)
48 ashish 11181
    {
11182
      this();
553 chandransh 11183
      this.userId = userId;
11184
      setUserIdIsSet(true);
48 ashish 11185
      this.timestamp = timestamp;
11186
      setTimestampIsSet(true);
11187
    }
11188
 
11189
    /**
11190
     * Performs a deep copy on <i>other</i>.
11191
     */
553 chandransh 11192
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 11193
      __isset_bit_vector.clear();
11194
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 11195
      this.userId = other.userId;
48 ashish 11196
      this.timestamp = other.timestamp;
11197
    }
11198
 
553 chandransh 11199
    public setUserAsLoggedIn_args deepCopy() {
11200
      return new setUserAsLoggedIn_args(this);
48 ashish 11201
    }
11202
 
11203
    @Deprecated
553 chandransh 11204
    public setUserAsLoggedIn_args clone() {
11205
      return new setUserAsLoggedIn_args(this);
48 ashish 11206
    }
11207
 
553 chandransh 11208
    public long getUserId() {
11209
      return this.userId;
48 ashish 11210
    }
11211
 
553 chandransh 11212
    public setUserAsLoggedIn_args setUserId(long userId) {
11213
      this.userId = userId;
11214
      setUserIdIsSet(true);
48 ashish 11215
      return this;
11216
    }
11217
 
553 chandransh 11218
    public void unsetUserId() {
11219
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 11220
    }
11221
 
553 chandransh 11222
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
11223
    public boolean isSetUserId() {
11224
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 11225
    }
11226
 
553 chandransh 11227
    public void setUserIdIsSet(boolean value) {
11228
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 11229
    }
11230
 
11231
    public long getTimestamp() {
11232
      return this.timestamp;
11233
    }
11234
 
553 chandransh 11235
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 11236
      this.timestamp = timestamp;
11237
      setTimestampIsSet(true);
11238
      return this;
11239
    }
11240
 
11241
    public void unsetTimestamp() {
11242
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11243
    }
11244
 
11245
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11246
    public boolean isSetTimestamp() {
11247
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11248
    }
11249
 
11250
    public void setTimestampIsSet(boolean value) {
11251
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11252
    }
11253
 
11254
    public void setFieldValue(_Fields field, Object value) {
11255
      switch (field) {
553 chandransh 11256
      case USER_ID:
48 ashish 11257
        if (value == null) {
553 chandransh 11258
          unsetUserId();
48 ashish 11259
        } else {
553 chandransh 11260
          setUserId((Long)value);
48 ashish 11261
        }
11262
        break;
11263
 
11264
      case TIMESTAMP:
11265
        if (value == null) {
11266
          unsetTimestamp();
11267
        } else {
11268
          setTimestamp((Long)value);
11269
        }
11270
        break;
11271
 
11272
      }
11273
    }
11274
 
11275
    public void setFieldValue(int fieldID, Object value) {
11276
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11277
    }
11278
 
11279
    public Object getFieldValue(_Fields field) {
11280
      switch (field) {
553 chandransh 11281
      case USER_ID:
11282
        return new Long(getUserId());
48 ashish 11283
 
11284
      case TIMESTAMP:
11285
        return new Long(getTimestamp());
11286
 
11287
      }
11288
      throw new IllegalStateException();
11289
    }
11290
 
11291
    public Object getFieldValue(int fieldId) {
11292
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11293
    }
11294
 
11295
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11296
    public boolean isSet(_Fields field) {
11297
      switch (field) {
553 chandransh 11298
      case USER_ID:
11299
        return isSetUserId();
48 ashish 11300
      case TIMESTAMP:
11301
        return isSetTimestamp();
11302
      }
11303
      throw new IllegalStateException();
11304
    }
11305
 
11306
    public boolean isSet(int fieldID) {
11307
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11308
    }
11309
 
11310
    @Override
11311
    public boolean equals(Object that) {
11312
      if (that == null)
11313
        return false;
553 chandransh 11314
      if (that instanceof setUserAsLoggedIn_args)
11315
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 11316
      return false;
11317
    }
11318
 
553 chandransh 11319
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 11320
      if (that == null)
11321
        return false;
11322
 
553 chandransh 11323
      boolean this_present_userId = true;
11324
      boolean that_present_userId = true;
11325
      if (this_present_userId || that_present_userId) {
11326
        if (!(this_present_userId && that_present_userId))
48 ashish 11327
          return false;
553 chandransh 11328
        if (this.userId != that.userId)
48 ashish 11329
          return false;
11330
      }
11331
 
11332
      boolean this_present_timestamp = true;
11333
      boolean that_present_timestamp = true;
11334
      if (this_present_timestamp || that_present_timestamp) {
11335
        if (!(this_present_timestamp && that_present_timestamp))
11336
          return false;
11337
        if (this.timestamp != that.timestamp)
11338
          return false;
11339
      }
11340
 
11341
      return true;
11342
    }
11343
 
11344
    @Override
11345
    public int hashCode() {
11346
      return 0;
11347
    }
11348
 
553 chandransh 11349
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 11350
      if (!getClass().equals(other.getClass())) {
11351
        return getClass().getName().compareTo(other.getClass().getName());
11352
      }
11353
 
11354
      int lastComparison = 0;
553 chandransh 11355
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 11356
 
553 chandransh 11357
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 11358
      if (lastComparison != 0) {
11359
        return lastComparison;
11360
      }
553 chandransh 11361
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 11362
      if (lastComparison != 0) {
11363
        return lastComparison;
11364
      }
11365
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11366
      if (lastComparison != 0) {
11367
        return lastComparison;
11368
      }
11369
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11370
      if (lastComparison != 0) {
11371
        return lastComparison;
11372
      }
11373
      return 0;
11374
    }
11375
 
11376
    public void read(TProtocol iprot) throws TException {
11377
      TField field;
11378
      iprot.readStructBegin();
11379
      while (true)
11380
      {
11381
        field = iprot.readFieldBegin();
11382
        if (field.type == TType.STOP) { 
11383
          break;
11384
        }
11385
        _Fields fieldId = _Fields.findByThriftId(field.id);
11386
        if (fieldId == null) {
11387
          TProtocolUtil.skip(iprot, field.type);
11388
        } else {
11389
          switch (fieldId) {
553 chandransh 11390
            case USER_ID:
11391
              if (field.type == TType.I64) {
11392
                this.userId = iprot.readI64();
11393
                setUserIdIsSet(true);
48 ashish 11394
              } else { 
11395
                TProtocolUtil.skip(iprot, field.type);
11396
              }
11397
              break;
11398
            case TIMESTAMP:
11399
              if (field.type == TType.I64) {
11400
                this.timestamp = iprot.readI64();
11401
                setTimestampIsSet(true);
11402
              } else { 
11403
                TProtocolUtil.skip(iprot, field.type);
11404
              }
11405
              break;
11406
          }
11407
          iprot.readFieldEnd();
11408
        }
11409
      }
11410
      iprot.readStructEnd();
11411
      validate();
11412
    }
11413
 
11414
    public void write(TProtocol oprot) throws TException {
11415
      validate();
11416
 
11417
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 11418
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
11419
      oprot.writeI64(this.userId);
11420
      oprot.writeFieldEnd();
48 ashish 11421
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11422
      oprot.writeI64(this.timestamp);
11423
      oprot.writeFieldEnd();
11424
      oprot.writeFieldStop();
11425
      oprot.writeStructEnd();
11426
    }
11427
 
11428
    @Override
11429
    public String toString() {
553 chandransh 11430
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 11431
      boolean first = true;
11432
 
553 chandransh 11433
      sb.append("userId:");
11434
      sb.append(this.userId);
48 ashish 11435
      first = false;
11436
      if (!first) sb.append(", ");
11437
      sb.append("timestamp:");
11438
      sb.append(this.timestamp);
11439
      first = false;
11440
      sb.append(")");
11441
      return sb.toString();
11442
    }
11443
 
11444
    public void validate() throws TException {
11445
      // check for required fields
11446
    }
11447
 
11448
  }
11449
 
553 chandransh 11450
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
11451
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 11452
 
11453
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11454
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11455
 
11456
    private boolean success;
11457
    private UserContextException ucx;
11458
 
11459
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11460
    public enum _Fields implements TFieldIdEnum {
11461
      SUCCESS((short)0, "success"),
11462
      UCX((short)1, "ucx");
11463
 
11464
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11465
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11466
 
11467
      static {
11468
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11469
          byId.put((int)field._thriftId, field);
11470
          byName.put(field.getFieldName(), field);
11471
        }
11472
      }
11473
 
11474
      /**
11475
       * Find the _Fields constant that matches fieldId, or null if its not found.
11476
       */
11477
      public static _Fields findByThriftId(int fieldId) {
11478
        return byId.get(fieldId);
11479
      }
11480
 
11481
      /**
11482
       * Find the _Fields constant that matches fieldId, throwing an exception
11483
       * if it is not found.
11484
       */
11485
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11486
        _Fields fields = findByThriftId(fieldId);
11487
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11488
        return fields;
11489
      }
11490
 
11491
      /**
11492
       * Find the _Fields constant that matches name, or null if its not found.
11493
       */
11494
      public static _Fields findByName(String name) {
11495
        return byName.get(name);
11496
      }
11497
 
11498
      private final short _thriftId;
11499
      private final String _fieldName;
11500
 
11501
      _Fields(short thriftId, String fieldName) {
11502
        _thriftId = thriftId;
11503
        _fieldName = fieldName;
11504
      }
11505
 
11506
      public short getThriftFieldId() {
11507
        return _thriftId;
11508
      }
11509
 
11510
      public String getFieldName() {
11511
        return _fieldName;
11512
      }
11513
    }
11514
 
11515
    // isset id assignments
11516
    private static final int __SUCCESS_ISSET_ID = 0;
11517
    private BitSet __isset_bit_vector = new BitSet(1);
11518
 
11519
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11520
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11521
          new FieldValueMetaData(TType.BOOL)));
11522
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11523
          new FieldValueMetaData(TType.STRUCT)));
11524
    }});
11525
 
11526
    static {
553 chandransh 11527
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 11528
    }
11529
 
553 chandransh 11530
    public setUserAsLoggedIn_result() {
48 ashish 11531
    }
11532
 
553 chandransh 11533
    public setUserAsLoggedIn_result(
48 ashish 11534
      boolean success,
11535
      UserContextException ucx)
11536
    {
11537
      this();
11538
      this.success = success;
11539
      setSuccessIsSet(true);
11540
      this.ucx = ucx;
11541
    }
11542
 
11543
    /**
11544
     * Performs a deep copy on <i>other</i>.
11545
     */
553 chandransh 11546
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 11547
      __isset_bit_vector.clear();
11548
      __isset_bit_vector.or(other.__isset_bit_vector);
11549
      this.success = other.success;
11550
      if (other.isSetUcx()) {
11551
        this.ucx = new UserContextException(other.ucx);
11552
      }
11553
    }
11554
 
553 chandransh 11555
    public setUserAsLoggedIn_result deepCopy() {
11556
      return new setUserAsLoggedIn_result(this);
48 ashish 11557
    }
11558
 
11559
    @Deprecated
553 chandransh 11560
    public setUserAsLoggedIn_result clone() {
11561
      return new setUserAsLoggedIn_result(this);
48 ashish 11562
    }
11563
 
11564
    public boolean isSuccess() {
11565
      return this.success;
11566
    }
11567
 
553 chandransh 11568
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 11569
      this.success = success;
11570
      setSuccessIsSet(true);
11571
      return this;
11572
    }
11573
 
11574
    public void unsetSuccess() {
11575
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11576
    }
11577
 
11578
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11579
    public boolean isSetSuccess() {
11580
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11581
    }
11582
 
11583
    public void setSuccessIsSet(boolean value) {
11584
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11585
    }
11586
 
11587
    public UserContextException getUcx() {
11588
      return this.ucx;
11589
    }
11590
 
553 chandransh 11591
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 11592
      this.ucx = ucx;
11593
      return this;
11594
    }
11595
 
11596
    public void unsetUcx() {
11597
      this.ucx = null;
11598
    }
11599
 
11600
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11601
    public boolean isSetUcx() {
11602
      return this.ucx != null;
11603
    }
11604
 
11605
    public void setUcxIsSet(boolean value) {
11606
      if (!value) {
11607
        this.ucx = null;
11608
      }
11609
    }
11610
 
11611
    public void setFieldValue(_Fields field, Object value) {
11612
      switch (field) {
11613
      case SUCCESS:
11614
        if (value == null) {
11615
          unsetSuccess();
11616
        } else {
11617
          setSuccess((Boolean)value);
11618
        }
11619
        break;
11620
 
11621
      case UCX:
11622
        if (value == null) {
11623
          unsetUcx();
11624
        } else {
11625
          setUcx((UserContextException)value);
11626
        }
11627
        break;
11628
 
11629
      }
11630
    }
11631
 
11632
    public void setFieldValue(int fieldID, Object value) {
11633
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11634
    }
11635
 
11636
    public Object getFieldValue(_Fields field) {
11637
      switch (field) {
11638
      case SUCCESS:
11639
        return new Boolean(isSuccess());
11640
 
11641
      case UCX:
11642
        return getUcx();
11643
 
11644
      }
11645
      throw new IllegalStateException();
11646
    }
11647
 
11648
    public Object getFieldValue(int fieldId) {
11649
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11650
    }
11651
 
11652
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11653
    public boolean isSet(_Fields field) {
11654
      switch (field) {
11655
      case SUCCESS:
11656
        return isSetSuccess();
11657
      case UCX:
11658
        return isSetUcx();
11659
      }
11660
      throw new IllegalStateException();
11661
    }
11662
 
11663
    public boolean isSet(int fieldID) {
11664
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11665
    }
11666
 
11667
    @Override
11668
    public boolean equals(Object that) {
11669
      if (that == null)
11670
        return false;
553 chandransh 11671
      if (that instanceof setUserAsLoggedIn_result)
11672
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 11673
      return false;
11674
    }
11675
 
553 chandransh 11676
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 11677
      if (that == null)
11678
        return false;
11679
 
11680
      boolean this_present_success = true;
11681
      boolean that_present_success = true;
11682
      if (this_present_success || that_present_success) {
11683
        if (!(this_present_success && that_present_success))
11684
          return false;
11685
        if (this.success != that.success)
11686
          return false;
11687
      }
11688
 
11689
      boolean this_present_ucx = true && this.isSetUcx();
11690
      boolean that_present_ucx = true && that.isSetUcx();
11691
      if (this_present_ucx || that_present_ucx) {
11692
        if (!(this_present_ucx && that_present_ucx))
11693
          return false;
11694
        if (!this.ucx.equals(that.ucx))
11695
          return false;
11696
      }
11697
 
11698
      return true;
11699
    }
11700
 
11701
    @Override
11702
    public int hashCode() {
11703
      return 0;
11704
    }
11705
 
553 chandransh 11706
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 11707
      if (!getClass().equals(other.getClass())) {
11708
        return getClass().getName().compareTo(other.getClass().getName());
11709
      }
11710
 
11711
      int lastComparison = 0;
553 chandransh 11712
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 11713
 
11714
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11715
      if (lastComparison != 0) {
11716
        return lastComparison;
11717
      }
11718
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11719
      if (lastComparison != 0) {
11720
        return lastComparison;
11721
      }
11722
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11723
      if (lastComparison != 0) {
11724
        return lastComparison;
11725
      }
11726
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11727
      if (lastComparison != 0) {
11728
        return lastComparison;
11729
      }
11730
      return 0;
11731
    }
11732
 
11733
    public void read(TProtocol iprot) throws TException {
11734
      TField field;
11735
      iprot.readStructBegin();
11736
      while (true)
11737
      {
11738
        field = iprot.readFieldBegin();
11739
        if (field.type == TType.STOP) { 
11740
          break;
11741
        }
11742
        _Fields fieldId = _Fields.findByThriftId(field.id);
11743
        if (fieldId == null) {
11744
          TProtocolUtil.skip(iprot, field.type);
11745
        } else {
11746
          switch (fieldId) {
11747
            case SUCCESS:
11748
              if (field.type == TType.BOOL) {
11749
                this.success = iprot.readBool();
11750
                setSuccessIsSet(true);
11751
              } else { 
11752
                TProtocolUtil.skip(iprot, field.type);
11753
              }
11754
              break;
11755
            case UCX:
11756
              if (field.type == TType.STRUCT) {
11757
                this.ucx = new UserContextException();
11758
                this.ucx.read(iprot);
11759
              } else { 
11760
                TProtocolUtil.skip(iprot, field.type);
11761
              }
11762
              break;
11763
          }
11764
          iprot.readFieldEnd();
11765
        }
11766
      }
11767
      iprot.readStructEnd();
11768
      validate();
11769
    }
11770
 
11771
    public void write(TProtocol oprot) throws TException {
11772
      oprot.writeStructBegin(STRUCT_DESC);
11773
 
11774
      if (this.isSetSuccess()) {
11775
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11776
        oprot.writeBool(this.success);
11777
        oprot.writeFieldEnd();
11778
      } else if (this.isSetUcx()) {
11779
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11780
        this.ucx.write(oprot);
11781
        oprot.writeFieldEnd();
11782
      }
11783
      oprot.writeFieldStop();
11784
      oprot.writeStructEnd();
11785
    }
11786
 
11787
    @Override
11788
    public String toString() {
553 chandransh 11789
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 11790
      boolean first = true;
11791
 
11792
      sb.append("success:");
11793
      sb.append(this.success);
11794
      first = false;
11795
      if (!first) sb.append(", ");
11796
      sb.append("ucx:");
11797
      if (this.ucx == null) {
11798
        sb.append("null");
11799
      } else {
11800
        sb.append(this.ucx);
11801
      }
11802
      first = false;
11803
      sb.append(")");
11804
      return sb.toString();
11805
    }
11806
 
11807
    public void validate() throws TException {
11808
      // check for required fields
11809
    }
11810
 
11811
  }
11812
 
553 chandransh 11813
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
11814
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 11815
 
553 chandransh 11816
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11817
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 11818
 
11819
    private long userid;
11820
    private long timestamp;
11821
 
11822
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11823
    public enum _Fields implements TFieldIdEnum {
553 chandransh 11824
      USERID((short)1, "userid"),
11825
      TIMESTAMP((short)2, "timestamp");
48 ashish 11826
 
11827
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11828
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11829
 
11830
      static {
11831
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11832
          byId.put((int)field._thriftId, field);
11833
          byName.put(field.getFieldName(), field);
11834
        }
11835
      }
11836
 
11837
      /**
11838
       * Find the _Fields constant that matches fieldId, or null if its not found.
11839
       */
11840
      public static _Fields findByThriftId(int fieldId) {
11841
        return byId.get(fieldId);
11842
      }
11843
 
11844
      /**
11845
       * Find the _Fields constant that matches fieldId, throwing an exception
11846
       * if it is not found.
11847
       */
11848
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11849
        _Fields fields = findByThriftId(fieldId);
11850
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11851
        return fields;
11852
      }
11853
 
11854
      /**
11855
       * Find the _Fields constant that matches name, or null if its not found.
11856
       */
11857
      public static _Fields findByName(String name) {
11858
        return byName.get(name);
11859
      }
11860
 
11861
      private final short _thriftId;
11862
      private final String _fieldName;
11863
 
11864
      _Fields(short thriftId, String fieldName) {
11865
        _thriftId = thriftId;
11866
        _fieldName = fieldName;
11867
      }
11868
 
11869
      public short getThriftFieldId() {
11870
        return _thriftId;
11871
      }
11872
 
11873
      public String getFieldName() {
11874
        return _fieldName;
11875
      }
11876
    }
11877
 
11878
    // isset id assignments
11879
    private static final int __USERID_ISSET_ID = 0;
11880
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 11881
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 11882
 
11883
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11884
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11885
          new FieldValueMetaData(TType.I64)));
11886
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11887
          new FieldValueMetaData(TType.I64)));
11888
    }});
11889
 
11890
    static {
553 chandransh 11891
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 11892
    }
11893
 
553 chandransh 11894
    public setUserAsLoggedOut_args() {
48 ashish 11895
    }
11896
 
553 chandransh 11897
    public setUserAsLoggedOut_args(
48 ashish 11898
      long userid,
553 chandransh 11899
      long timestamp)
48 ashish 11900
    {
11901
      this();
11902
      this.userid = userid;
11903
      setUseridIsSet(true);
11904
      this.timestamp = timestamp;
11905
      setTimestampIsSet(true);
11906
    }
11907
 
11908
    /**
11909
     * Performs a deep copy on <i>other</i>.
11910
     */
553 chandransh 11911
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 11912
      __isset_bit_vector.clear();
11913
      __isset_bit_vector.or(other.__isset_bit_vector);
11914
      this.userid = other.userid;
11915
      this.timestamp = other.timestamp;
11916
    }
11917
 
553 chandransh 11918
    public setUserAsLoggedOut_args deepCopy() {
11919
      return new setUserAsLoggedOut_args(this);
48 ashish 11920
    }
11921
 
11922
    @Deprecated
553 chandransh 11923
    public setUserAsLoggedOut_args clone() {
11924
      return new setUserAsLoggedOut_args(this);
48 ashish 11925
    }
11926
 
11927
    public long getUserid() {
11928
      return this.userid;
11929
    }
11930
 
553 chandransh 11931
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 11932
      this.userid = userid;
11933
      setUseridIsSet(true);
11934
      return this;
11935
    }
11936
 
11937
    public void unsetUserid() {
11938
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11939
    }
11940
 
11941
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11942
    public boolean isSetUserid() {
11943
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11944
    }
11945
 
11946
    public void setUseridIsSet(boolean value) {
11947
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11948
    }
11949
 
11950
    public long getTimestamp() {
11951
      return this.timestamp;
11952
    }
11953
 
553 chandransh 11954
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 11955
      this.timestamp = timestamp;
11956
      setTimestampIsSet(true);
11957
      return this;
11958
    }
11959
 
11960
    public void unsetTimestamp() {
11961
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11962
    }
11963
 
11964
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11965
    public boolean isSetTimestamp() {
11966
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11967
    }
11968
 
11969
    public void setTimestampIsSet(boolean value) {
11970
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11971
    }
11972
 
11973
    public void setFieldValue(_Fields field, Object value) {
11974
      switch (field) {
11975
      case USERID:
11976
        if (value == null) {
11977
          unsetUserid();
11978
        } else {
11979
          setUserid((Long)value);
11980
        }
11981
        break;
11982
 
11983
      case TIMESTAMP:
11984
        if (value == null) {
11985
          unsetTimestamp();
11986
        } else {
11987
          setTimestamp((Long)value);
11988
        }
11989
        break;
11990
 
11991
      }
11992
    }
11993
 
11994
    public void setFieldValue(int fieldID, Object value) {
11995
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11996
    }
11997
 
11998
    public Object getFieldValue(_Fields field) {
11999
      switch (field) {
12000
      case USERID:
12001
        return new Long(getUserid());
12002
 
12003
      case TIMESTAMP:
12004
        return new Long(getTimestamp());
12005
 
12006
      }
12007
      throw new IllegalStateException();
12008
    }
12009
 
12010
    public Object getFieldValue(int fieldId) {
12011
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12012
    }
12013
 
12014
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12015
    public boolean isSet(_Fields field) {
12016
      switch (field) {
12017
      case USERID:
12018
        return isSetUserid();
12019
      case TIMESTAMP:
12020
        return isSetTimestamp();
12021
      }
12022
      throw new IllegalStateException();
12023
    }
12024
 
12025
    public boolean isSet(int fieldID) {
12026
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12027
    }
12028
 
12029
    @Override
12030
    public boolean equals(Object that) {
12031
      if (that == null)
12032
        return false;
553 chandransh 12033
      if (that instanceof setUserAsLoggedOut_args)
12034
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 12035
      return false;
12036
    }
12037
 
553 chandransh 12038
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 12039
      if (that == null)
12040
        return false;
12041
 
12042
      boolean this_present_userid = true;
12043
      boolean that_present_userid = true;
12044
      if (this_present_userid || that_present_userid) {
12045
        if (!(this_present_userid && that_present_userid))
12046
          return false;
12047
        if (this.userid != that.userid)
12048
          return false;
12049
      }
12050
 
12051
      boolean this_present_timestamp = true;
12052
      boolean that_present_timestamp = true;
12053
      if (this_present_timestamp || that_present_timestamp) {
12054
        if (!(this_present_timestamp && that_present_timestamp))
12055
          return false;
12056
        if (this.timestamp != that.timestamp)
12057
          return false;
12058
      }
12059
 
12060
      return true;
12061
    }
12062
 
12063
    @Override
12064
    public int hashCode() {
12065
      return 0;
12066
    }
12067
 
553 chandransh 12068
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 12069
      if (!getClass().equals(other.getClass())) {
12070
        return getClass().getName().compareTo(other.getClass().getName());
12071
      }
12072
 
12073
      int lastComparison = 0;
553 chandransh 12074
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 12075
 
12076
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12077
      if (lastComparison != 0) {
12078
        return lastComparison;
12079
      }
12080
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12081
      if (lastComparison != 0) {
12082
        return lastComparison;
12083
      }
12084
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
12085
      if (lastComparison != 0) {
12086
        return lastComparison;
12087
      }
12088
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
12089
      if (lastComparison != 0) {
12090
        return lastComparison;
12091
      }
12092
      return 0;
12093
    }
12094
 
12095
    public void read(TProtocol iprot) throws TException {
12096
      TField field;
12097
      iprot.readStructBegin();
12098
      while (true)
12099
      {
12100
        field = iprot.readFieldBegin();
12101
        if (field.type == TType.STOP) { 
12102
          break;
12103
        }
12104
        _Fields fieldId = _Fields.findByThriftId(field.id);
12105
        if (fieldId == null) {
12106
          TProtocolUtil.skip(iprot, field.type);
12107
        } else {
12108
          switch (fieldId) {
12109
            case USERID:
12110
              if (field.type == TType.I64) {
12111
                this.userid = iprot.readI64();
12112
                setUseridIsSet(true);
12113
              } else { 
12114
                TProtocolUtil.skip(iprot, field.type);
12115
              }
12116
              break;
12117
            case TIMESTAMP:
12118
              if (field.type == TType.I64) {
12119
                this.timestamp = iprot.readI64();
12120
                setTimestampIsSet(true);
12121
              } else { 
12122
                TProtocolUtil.skip(iprot, field.type);
12123
              }
12124
              break;
12125
          }
12126
          iprot.readFieldEnd();
12127
        }
12128
      }
12129
      iprot.readStructEnd();
12130
      validate();
12131
    }
12132
 
12133
    public void write(TProtocol oprot) throws TException {
12134
      validate();
12135
 
12136
      oprot.writeStructBegin(STRUCT_DESC);
12137
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12138
      oprot.writeI64(this.userid);
12139
      oprot.writeFieldEnd();
12140
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
12141
      oprot.writeI64(this.timestamp);
12142
      oprot.writeFieldEnd();
12143
      oprot.writeFieldStop();
12144
      oprot.writeStructEnd();
12145
    }
12146
 
12147
    @Override
12148
    public String toString() {
553 chandransh 12149
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 12150
      boolean first = true;
12151
 
12152
      sb.append("userid:");
12153
      sb.append(this.userid);
12154
      first = false;
12155
      if (!first) sb.append(", ");
12156
      sb.append("timestamp:");
12157
      sb.append(this.timestamp);
12158
      first = false;
12159
      sb.append(")");
12160
      return sb.toString();
12161
    }
12162
 
12163
    public void validate() throws TException {
12164
      // check for required fields
12165
    }
12166
 
12167
  }
12168
 
553 chandransh 12169
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
12170
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 12171
 
12172
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12173
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12174
 
12175
    private boolean success;
12176
    private UserContextException ucx;
12177
 
12178
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12179
    public enum _Fields implements TFieldIdEnum {
12180
      SUCCESS((short)0, "success"),
12181
      UCX((short)1, "ucx");
12182
 
12183
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12184
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12185
 
12186
      static {
12187
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12188
          byId.put((int)field._thriftId, field);
12189
          byName.put(field.getFieldName(), field);
12190
        }
12191
      }
12192
 
12193
      /**
12194
       * Find the _Fields constant that matches fieldId, or null if its not found.
12195
       */
12196
      public static _Fields findByThriftId(int fieldId) {
12197
        return byId.get(fieldId);
12198
      }
12199
 
12200
      /**
12201
       * Find the _Fields constant that matches fieldId, throwing an exception
12202
       * if it is not found.
12203
       */
12204
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12205
        _Fields fields = findByThriftId(fieldId);
12206
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12207
        return fields;
12208
      }
12209
 
12210
      /**
12211
       * Find the _Fields constant that matches name, or null if its not found.
12212
       */
12213
      public static _Fields findByName(String name) {
12214
        return byName.get(name);
12215
      }
12216
 
12217
      private final short _thriftId;
12218
      private final String _fieldName;
12219
 
12220
      _Fields(short thriftId, String fieldName) {
12221
        _thriftId = thriftId;
12222
        _fieldName = fieldName;
12223
      }
12224
 
12225
      public short getThriftFieldId() {
12226
        return _thriftId;
12227
      }
12228
 
12229
      public String getFieldName() {
12230
        return _fieldName;
12231
      }
12232
    }
12233
 
12234
    // isset id assignments
12235
    private static final int __SUCCESS_ISSET_ID = 0;
12236
    private BitSet __isset_bit_vector = new BitSet(1);
12237
 
12238
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12239
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12240
          new FieldValueMetaData(TType.BOOL)));
12241
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12242
          new FieldValueMetaData(TType.STRUCT)));
12243
    }});
12244
 
12245
    static {
553 chandransh 12246
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 12247
    }
12248
 
553 chandransh 12249
    public setUserAsLoggedOut_result() {
48 ashish 12250
    }
12251
 
553 chandransh 12252
    public setUserAsLoggedOut_result(
48 ashish 12253
      boolean success,
12254
      UserContextException ucx)
12255
    {
12256
      this();
12257
      this.success = success;
12258
      setSuccessIsSet(true);
12259
      this.ucx = ucx;
12260
    }
12261
 
12262
    /**
12263
     * Performs a deep copy on <i>other</i>.
12264
     */
553 chandransh 12265
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 12266
      __isset_bit_vector.clear();
12267
      __isset_bit_vector.or(other.__isset_bit_vector);
12268
      this.success = other.success;
12269
      if (other.isSetUcx()) {
12270
        this.ucx = new UserContextException(other.ucx);
12271
      }
12272
    }
12273
 
553 chandransh 12274
    public setUserAsLoggedOut_result deepCopy() {
12275
      return new setUserAsLoggedOut_result(this);
48 ashish 12276
    }
12277
 
12278
    @Deprecated
553 chandransh 12279
    public setUserAsLoggedOut_result clone() {
12280
      return new setUserAsLoggedOut_result(this);
48 ashish 12281
    }
12282
 
12283
    public boolean isSuccess() {
12284
      return this.success;
12285
    }
12286
 
553 chandransh 12287
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 12288
      this.success = success;
12289
      setSuccessIsSet(true);
12290
      return this;
12291
    }
12292
 
12293
    public void unsetSuccess() {
12294
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12295
    }
12296
 
12297
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12298
    public boolean isSetSuccess() {
12299
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12300
    }
12301
 
12302
    public void setSuccessIsSet(boolean value) {
12303
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12304
    }
12305
 
12306
    public UserContextException getUcx() {
12307
      return this.ucx;
12308
    }
12309
 
553 chandransh 12310
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 12311
      this.ucx = ucx;
12312
      return this;
12313
    }
12314
 
12315
    public void unsetUcx() {
12316
      this.ucx = null;
12317
    }
12318
 
12319
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12320
    public boolean isSetUcx() {
12321
      return this.ucx != null;
12322
    }
12323
 
12324
    public void setUcxIsSet(boolean value) {
12325
      if (!value) {
12326
        this.ucx = null;
12327
      }
12328
    }
12329
 
12330
    public void setFieldValue(_Fields field, Object value) {
12331
      switch (field) {
12332
      case SUCCESS:
12333
        if (value == null) {
12334
          unsetSuccess();
12335
        } else {
12336
          setSuccess((Boolean)value);
12337
        }
12338
        break;
12339
 
12340
      case UCX:
12341
        if (value == null) {
12342
          unsetUcx();
12343
        } else {
12344
          setUcx((UserContextException)value);
12345
        }
12346
        break;
12347
 
12348
      }
12349
    }
12350
 
12351
    public void setFieldValue(int fieldID, Object value) {
12352
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12353
    }
12354
 
12355
    public Object getFieldValue(_Fields field) {
12356
      switch (field) {
12357
      case SUCCESS:
12358
        return new Boolean(isSuccess());
12359
 
12360
      case UCX:
12361
        return getUcx();
12362
 
12363
      }
12364
      throw new IllegalStateException();
12365
    }
12366
 
12367
    public Object getFieldValue(int fieldId) {
12368
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12369
    }
12370
 
12371
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12372
    public boolean isSet(_Fields field) {
12373
      switch (field) {
12374
      case SUCCESS:
12375
        return isSetSuccess();
12376
      case UCX:
12377
        return isSetUcx();
12378
      }
12379
      throw new IllegalStateException();
12380
    }
12381
 
12382
    public boolean isSet(int fieldID) {
12383
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12384
    }
12385
 
12386
    @Override
12387
    public boolean equals(Object that) {
12388
      if (that == null)
12389
        return false;
553 chandransh 12390
      if (that instanceof setUserAsLoggedOut_result)
12391
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 12392
      return false;
12393
    }
12394
 
553 chandransh 12395
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 12396
      if (that == null)
12397
        return false;
12398
 
12399
      boolean this_present_success = true;
12400
      boolean that_present_success = true;
12401
      if (this_present_success || that_present_success) {
12402
        if (!(this_present_success && that_present_success))
12403
          return false;
12404
        if (this.success != that.success)
12405
          return false;
12406
      }
12407
 
12408
      boolean this_present_ucx = true && this.isSetUcx();
12409
      boolean that_present_ucx = true && that.isSetUcx();
12410
      if (this_present_ucx || that_present_ucx) {
12411
        if (!(this_present_ucx && that_present_ucx))
12412
          return false;
12413
        if (!this.ucx.equals(that.ucx))
12414
          return false;
12415
      }
12416
 
12417
      return true;
12418
    }
12419
 
12420
    @Override
12421
    public int hashCode() {
12422
      return 0;
12423
    }
12424
 
553 chandransh 12425
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 12426
      if (!getClass().equals(other.getClass())) {
12427
        return getClass().getName().compareTo(other.getClass().getName());
12428
      }
12429
 
12430
      int lastComparison = 0;
553 chandransh 12431
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 12432
 
12433
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12434
      if (lastComparison != 0) {
12435
        return lastComparison;
12436
      }
12437
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12438
      if (lastComparison != 0) {
12439
        return lastComparison;
12440
      }
12441
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12442
      if (lastComparison != 0) {
12443
        return lastComparison;
12444
      }
12445
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12446
      if (lastComparison != 0) {
12447
        return lastComparison;
12448
      }
12449
      return 0;
12450
    }
12451
 
12452
    public void read(TProtocol iprot) throws TException {
12453
      TField field;
12454
      iprot.readStructBegin();
12455
      while (true)
12456
      {
12457
        field = iprot.readFieldBegin();
12458
        if (field.type == TType.STOP) { 
12459
          break;
12460
        }
12461
        _Fields fieldId = _Fields.findByThriftId(field.id);
12462
        if (fieldId == null) {
12463
          TProtocolUtil.skip(iprot, field.type);
12464
        } else {
12465
          switch (fieldId) {
12466
            case SUCCESS:
12467
              if (field.type == TType.BOOL) {
12468
                this.success = iprot.readBool();
12469
                setSuccessIsSet(true);
12470
              } else { 
12471
                TProtocolUtil.skip(iprot, field.type);
12472
              }
12473
              break;
12474
            case UCX:
12475
              if (field.type == TType.STRUCT) {
12476
                this.ucx = new UserContextException();
12477
                this.ucx.read(iprot);
12478
              } else { 
12479
                TProtocolUtil.skip(iprot, field.type);
12480
              }
12481
              break;
12482
          }
12483
          iprot.readFieldEnd();
12484
        }
12485
      }
12486
      iprot.readStructEnd();
12487
      validate();
12488
    }
12489
 
12490
    public void write(TProtocol oprot) throws TException {
12491
      oprot.writeStructBegin(STRUCT_DESC);
12492
 
12493
      if (this.isSetSuccess()) {
12494
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12495
        oprot.writeBool(this.success);
12496
        oprot.writeFieldEnd();
12497
      } else if (this.isSetUcx()) {
12498
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12499
        this.ucx.write(oprot);
12500
        oprot.writeFieldEnd();
12501
      }
12502
      oprot.writeFieldStop();
12503
      oprot.writeStructEnd();
12504
    }
12505
 
12506
    @Override
12507
    public String toString() {
553 chandransh 12508
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 12509
      boolean first = true;
12510
 
12511
      sb.append("success:");
12512
      sb.append(this.success);
12513
      first = false;
12514
      if (!first) sb.append(", ");
12515
      sb.append("ucx:");
12516
      if (this.ucx == null) {
12517
        sb.append("null");
12518
      } else {
12519
        sb.append(this.ucx);
12520
      }
12521
      first = false;
12522
      sb.append(")");
12523
      return sb.toString();
12524
    }
12525
 
12526
    public void validate() throws TException {
12527
      // check for required fields
12528
    }
12529
 
12530
  }
12531
 
553 chandransh 12532
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
12533
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 12534
 
12535
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
12536
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
12537
 
12538
    private long userid;
12539
    private long addressId;
12540
 
12541
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12542
    public enum _Fields implements TFieldIdEnum {
12543
      USERID((short)1, "userid"),
12544
      ADDRESS_ID((short)2, "addressId");
12545
 
12546
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12547
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12548
 
12549
      static {
12550
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12551
          byId.put((int)field._thriftId, field);
12552
          byName.put(field.getFieldName(), field);
12553
        }
12554
      }
12555
 
12556
      /**
12557
       * Find the _Fields constant that matches fieldId, or null if its not found.
12558
       */
12559
      public static _Fields findByThriftId(int fieldId) {
12560
        return byId.get(fieldId);
12561
      }
12562
 
12563
      /**
12564
       * Find the _Fields constant that matches fieldId, throwing an exception
12565
       * if it is not found.
12566
       */
12567
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12568
        _Fields fields = findByThriftId(fieldId);
12569
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12570
        return fields;
12571
      }
12572
 
12573
      /**
12574
       * Find the _Fields constant that matches name, or null if its not found.
12575
       */
12576
      public static _Fields findByName(String name) {
12577
        return byName.get(name);
12578
      }
12579
 
12580
      private final short _thriftId;
12581
      private final String _fieldName;
12582
 
12583
      _Fields(short thriftId, String fieldName) {
12584
        _thriftId = thriftId;
12585
        _fieldName = fieldName;
12586
      }
12587
 
12588
      public short getThriftFieldId() {
12589
        return _thriftId;
12590
      }
12591
 
12592
      public String getFieldName() {
12593
        return _fieldName;
12594
      }
12595
    }
12596
 
12597
    // isset id assignments
12598
    private static final int __USERID_ISSET_ID = 0;
12599
    private static final int __ADDRESSID_ISSET_ID = 1;
12600
    private BitSet __isset_bit_vector = new BitSet(2);
12601
 
12602
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12603
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
12604
          new FieldValueMetaData(TType.I64)));
12605
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
12606
          new FieldValueMetaData(TType.I64)));
12607
    }});
12608
 
12609
    static {
553 chandransh 12610
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 12611
    }
12612
 
553 chandransh 12613
    public setDefaultAddress_args() {
48 ashish 12614
    }
12615
 
553 chandransh 12616
    public setDefaultAddress_args(
48 ashish 12617
      long userid,
12618
      long addressId)
12619
    {
12620
      this();
12621
      this.userid = userid;
12622
      setUseridIsSet(true);
12623
      this.addressId = addressId;
12624
      setAddressIdIsSet(true);
12625
    }
12626
 
12627
    /**
12628
     * Performs a deep copy on <i>other</i>.
12629
     */
553 chandransh 12630
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 12631
      __isset_bit_vector.clear();
12632
      __isset_bit_vector.or(other.__isset_bit_vector);
12633
      this.userid = other.userid;
12634
      this.addressId = other.addressId;
12635
    }
12636
 
553 chandransh 12637
    public setDefaultAddress_args deepCopy() {
12638
      return new setDefaultAddress_args(this);
48 ashish 12639
    }
12640
 
12641
    @Deprecated
553 chandransh 12642
    public setDefaultAddress_args clone() {
12643
      return new setDefaultAddress_args(this);
48 ashish 12644
    }
12645
 
12646
    public long getUserid() {
12647
      return this.userid;
12648
    }
12649
 
553 chandransh 12650
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 12651
      this.userid = userid;
12652
      setUseridIsSet(true);
12653
      return this;
12654
    }
12655
 
12656
    public void unsetUserid() {
12657
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12658
    }
12659
 
12660
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12661
    public boolean isSetUserid() {
12662
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12663
    }
12664
 
12665
    public void setUseridIsSet(boolean value) {
12666
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12667
    }
12668
 
12669
    public long getAddressId() {
12670
      return this.addressId;
12671
    }
12672
 
553 chandransh 12673
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 12674
      this.addressId = addressId;
12675
      setAddressIdIsSet(true);
12676
      return this;
12677
    }
12678
 
12679
    public void unsetAddressId() {
12680
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
12681
    }
12682
 
12683
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
12684
    public boolean isSetAddressId() {
12685
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
12686
    }
12687
 
12688
    public void setAddressIdIsSet(boolean value) {
12689
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
12690
    }
12691
 
12692
    public void setFieldValue(_Fields field, Object value) {
12693
      switch (field) {
12694
      case USERID:
12695
        if (value == null) {
12696
          unsetUserid();
12697
        } else {
12698
          setUserid((Long)value);
12699
        }
12700
        break;
12701
 
12702
      case ADDRESS_ID:
12703
        if (value == null) {
12704
          unsetAddressId();
12705
        } else {
12706
          setAddressId((Long)value);
12707
        }
12708
        break;
12709
 
12710
      }
12711
    }
12712
 
12713
    public void setFieldValue(int fieldID, Object value) {
12714
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12715
    }
12716
 
12717
    public Object getFieldValue(_Fields field) {
12718
      switch (field) {
12719
      case USERID:
12720
        return new Long(getUserid());
12721
 
12722
      case ADDRESS_ID:
12723
        return new Long(getAddressId());
12724
 
12725
      }
12726
      throw new IllegalStateException();
12727
    }
12728
 
12729
    public Object getFieldValue(int fieldId) {
12730
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12731
    }
12732
 
12733
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12734
    public boolean isSet(_Fields field) {
12735
      switch (field) {
12736
      case USERID:
12737
        return isSetUserid();
12738
      case ADDRESS_ID:
12739
        return isSetAddressId();
12740
      }
12741
      throw new IllegalStateException();
12742
    }
12743
 
12744
    public boolean isSet(int fieldID) {
12745
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12746
    }
12747
 
12748
    @Override
12749
    public boolean equals(Object that) {
12750
      if (that == null)
12751
        return false;
553 chandransh 12752
      if (that instanceof setDefaultAddress_args)
12753
        return this.equals((setDefaultAddress_args)that);
48 ashish 12754
      return false;
12755
    }
12756
 
553 chandransh 12757
    public boolean equals(setDefaultAddress_args that) {
48 ashish 12758
      if (that == null)
12759
        return false;
12760
 
12761
      boolean this_present_userid = true;
12762
      boolean that_present_userid = true;
12763
      if (this_present_userid || that_present_userid) {
12764
        if (!(this_present_userid && that_present_userid))
12765
          return false;
12766
        if (this.userid != that.userid)
12767
          return false;
12768
      }
12769
 
12770
      boolean this_present_addressId = true;
12771
      boolean that_present_addressId = true;
12772
      if (this_present_addressId || that_present_addressId) {
12773
        if (!(this_present_addressId && that_present_addressId))
12774
          return false;
12775
        if (this.addressId != that.addressId)
12776
          return false;
12777
      }
12778
 
12779
      return true;
12780
    }
12781
 
12782
    @Override
12783
    public int hashCode() {
12784
      return 0;
12785
    }
12786
 
553 chandransh 12787
    public int compareTo(setDefaultAddress_args other) {
48 ashish 12788
      if (!getClass().equals(other.getClass())) {
12789
        return getClass().getName().compareTo(other.getClass().getName());
12790
      }
12791
 
12792
      int lastComparison = 0;
553 chandransh 12793
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 12794
 
12795
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12796
      if (lastComparison != 0) {
12797
        return lastComparison;
12798
      }
12799
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12800
      if (lastComparison != 0) {
12801
        return lastComparison;
12802
      }
12803
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
12804
      if (lastComparison != 0) {
12805
        return lastComparison;
12806
      }
12807
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
12808
      if (lastComparison != 0) {
12809
        return lastComparison;
12810
      }
12811
      return 0;
12812
    }
12813
 
12814
    public void read(TProtocol iprot) throws TException {
12815
      TField field;
12816
      iprot.readStructBegin();
12817
      while (true)
12818
      {
12819
        field = iprot.readFieldBegin();
12820
        if (field.type == TType.STOP) { 
12821
          break;
12822
        }
12823
        _Fields fieldId = _Fields.findByThriftId(field.id);
12824
        if (fieldId == null) {
12825
          TProtocolUtil.skip(iprot, field.type);
12826
        } else {
12827
          switch (fieldId) {
12828
            case USERID:
12829
              if (field.type == TType.I64) {
12830
                this.userid = iprot.readI64();
12831
                setUseridIsSet(true);
12832
              } else { 
12833
                TProtocolUtil.skip(iprot, field.type);
12834
              }
12835
              break;
12836
            case ADDRESS_ID:
12837
              if (field.type == TType.I64) {
12838
                this.addressId = iprot.readI64();
12839
                setAddressIdIsSet(true);
12840
              } else { 
12841
                TProtocolUtil.skip(iprot, field.type);
12842
              }
12843
              break;
12844
          }
12845
          iprot.readFieldEnd();
12846
        }
12847
      }
12848
      iprot.readStructEnd();
12849
      validate();
12850
    }
12851
 
12852
    public void write(TProtocol oprot) throws TException {
12853
      validate();
12854
 
12855
      oprot.writeStructBegin(STRUCT_DESC);
12856
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12857
      oprot.writeI64(this.userid);
12858
      oprot.writeFieldEnd();
12859
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
12860
      oprot.writeI64(this.addressId);
12861
      oprot.writeFieldEnd();
12862
      oprot.writeFieldStop();
12863
      oprot.writeStructEnd();
12864
    }
12865
 
12866
    @Override
12867
    public String toString() {
553 chandransh 12868
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 12869
      boolean first = true;
12870
 
12871
      sb.append("userid:");
12872
      sb.append(this.userid);
12873
      first = false;
12874
      if (!first) sb.append(", ");
12875
      sb.append("addressId:");
12876
      sb.append(this.addressId);
12877
      first = false;
12878
      sb.append(")");
12879
      return sb.toString();
12880
    }
12881
 
12882
    public void validate() throws TException {
12883
      // check for required fields
12884
    }
12885
 
12886
  }
12887
 
553 chandransh 12888
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
12889
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 12890
 
12891
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12892
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12893
 
12894
    private boolean success;
12895
    private UserContextException ucx;
12896
 
12897
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12898
    public enum _Fields implements TFieldIdEnum {
12899
      SUCCESS((short)0, "success"),
12900
      UCX((short)1, "ucx");
12901
 
12902
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12903
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12904
 
12905
      static {
12906
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12907
          byId.put((int)field._thriftId, field);
12908
          byName.put(field.getFieldName(), field);
12909
        }
12910
      }
12911
 
12912
      /**
12913
       * Find the _Fields constant that matches fieldId, or null if its not found.
12914
       */
12915
      public static _Fields findByThriftId(int fieldId) {
12916
        return byId.get(fieldId);
12917
      }
12918
 
12919
      /**
12920
       * Find the _Fields constant that matches fieldId, throwing an exception
12921
       * if it is not found.
12922
       */
12923
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12924
        _Fields fields = findByThriftId(fieldId);
12925
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12926
        return fields;
12927
      }
12928
 
12929
      /**
12930
       * Find the _Fields constant that matches name, or null if its not found.
12931
       */
12932
      public static _Fields findByName(String name) {
12933
        return byName.get(name);
12934
      }
12935
 
12936
      private final short _thriftId;
12937
      private final String _fieldName;
12938
 
12939
      _Fields(short thriftId, String fieldName) {
12940
        _thriftId = thriftId;
12941
        _fieldName = fieldName;
12942
      }
12943
 
12944
      public short getThriftFieldId() {
12945
        return _thriftId;
12946
      }
12947
 
12948
      public String getFieldName() {
12949
        return _fieldName;
12950
      }
12951
    }
12952
 
12953
    // isset id assignments
12954
    private static final int __SUCCESS_ISSET_ID = 0;
12955
    private BitSet __isset_bit_vector = new BitSet(1);
12956
 
12957
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12958
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12959
          new FieldValueMetaData(TType.BOOL)));
12960
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12961
          new FieldValueMetaData(TType.STRUCT)));
12962
    }});
12963
 
12964
    static {
553 chandransh 12965
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 12966
    }
12967
 
553 chandransh 12968
    public setDefaultAddress_result() {
48 ashish 12969
    }
12970
 
553 chandransh 12971
    public setDefaultAddress_result(
48 ashish 12972
      boolean success,
12973
      UserContextException ucx)
12974
    {
12975
      this();
12976
      this.success = success;
12977
      setSuccessIsSet(true);
12978
      this.ucx = ucx;
12979
    }
12980
 
12981
    /**
12982
     * Performs a deep copy on <i>other</i>.
12983
     */
553 chandransh 12984
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 12985
      __isset_bit_vector.clear();
12986
      __isset_bit_vector.or(other.__isset_bit_vector);
12987
      this.success = other.success;
12988
      if (other.isSetUcx()) {
12989
        this.ucx = new UserContextException(other.ucx);
12990
      }
12991
    }
12992
 
553 chandransh 12993
    public setDefaultAddress_result deepCopy() {
12994
      return new setDefaultAddress_result(this);
48 ashish 12995
    }
12996
 
12997
    @Deprecated
553 chandransh 12998
    public setDefaultAddress_result clone() {
12999
      return new setDefaultAddress_result(this);
48 ashish 13000
    }
13001
 
13002
    public boolean isSuccess() {
13003
      return this.success;
13004
    }
13005
 
553 chandransh 13006
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 13007
      this.success = success;
13008
      setSuccessIsSet(true);
13009
      return this;
13010
    }
13011
 
13012
    public void unsetSuccess() {
13013
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13014
    }
13015
 
13016
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13017
    public boolean isSetSuccess() {
13018
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13019
    }
13020
 
13021
    public void setSuccessIsSet(boolean value) {
13022
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13023
    }
13024
 
13025
    public UserContextException getUcx() {
13026
      return this.ucx;
13027
    }
13028
 
553 chandransh 13029
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 13030
      this.ucx = ucx;
13031
      return this;
13032
    }
13033
 
13034
    public void unsetUcx() {
13035
      this.ucx = null;
13036
    }
13037
 
13038
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13039
    public boolean isSetUcx() {
13040
      return this.ucx != null;
13041
    }
13042
 
13043
    public void setUcxIsSet(boolean value) {
13044
      if (!value) {
13045
        this.ucx = null;
13046
      }
13047
    }
13048
 
13049
    public void setFieldValue(_Fields field, Object value) {
13050
      switch (field) {
13051
      case SUCCESS:
13052
        if (value == null) {
13053
          unsetSuccess();
13054
        } else {
13055
          setSuccess((Boolean)value);
13056
        }
13057
        break;
13058
 
13059
      case UCX:
13060
        if (value == null) {
13061
          unsetUcx();
13062
        } else {
13063
          setUcx((UserContextException)value);
13064
        }
13065
        break;
13066
 
13067
      }
13068
    }
13069
 
13070
    public void setFieldValue(int fieldID, Object value) {
13071
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13072
    }
13073
 
13074
    public Object getFieldValue(_Fields field) {
13075
      switch (field) {
13076
      case SUCCESS:
13077
        return new Boolean(isSuccess());
13078
 
13079
      case UCX:
13080
        return getUcx();
13081
 
13082
      }
13083
      throw new IllegalStateException();
13084
    }
13085
 
13086
    public Object getFieldValue(int fieldId) {
13087
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13088
    }
13089
 
13090
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13091
    public boolean isSet(_Fields field) {
13092
      switch (field) {
13093
      case SUCCESS:
13094
        return isSetSuccess();
13095
      case UCX:
13096
        return isSetUcx();
13097
      }
13098
      throw new IllegalStateException();
13099
    }
13100
 
13101
    public boolean isSet(int fieldID) {
13102
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13103
    }
13104
 
13105
    @Override
13106
    public boolean equals(Object that) {
13107
      if (that == null)
13108
        return false;
553 chandransh 13109
      if (that instanceof setDefaultAddress_result)
13110
        return this.equals((setDefaultAddress_result)that);
48 ashish 13111
      return false;
13112
    }
13113
 
553 chandransh 13114
    public boolean equals(setDefaultAddress_result that) {
48 ashish 13115
      if (that == null)
13116
        return false;
13117
 
13118
      boolean this_present_success = true;
13119
      boolean that_present_success = true;
13120
      if (this_present_success || that_present_success) {
13121
        if (!(this_present_success && that_present_success))
13122
          return false;
13123
        if (this.success != that.success)
13124
          return false;
13125
      }
13126
 
13127
      boolean this_present_ucx = true && this.isSetUcx();
13128
      boolean that_present_ucx = true && that.isSetUcx();
13129
      if (this_present_ucx || that_present_ucx) {
13130
        if (!(this_present_ucx && that_present_ucx))
13131
          return false;
13132
        if (!this.ucx.equals(that.ucx))
13133
          return false;
13134
      }
13135
 
13136
      return true;
13137
    }
13138
 
13139
    @Override
13140
    public int hashCode() {
13141
      return 0;
13142
    }
13143
 
553 chandransh 13144
    public int compareTo(setDefaultAddress_result other) {
48 ashish 13145
      if (!getClass().equals(other.getClass())) {
13146
        return getClass().getName().compareTo(other.getClass().getName());
13147
      }
13148
 
13149
      int lastComparison = 0;
553 chandransh 13150
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 13151
 
13152
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13153
      if (lastComparison != 0) {
13154
        return lastComparison;
13155
      }
13156
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13157
      if (lastComparison != 0) {
13158
        return lastComparison;
13159
      }
13160
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13161
      if (lastComparison != 0) {
13162
        return lastComparison;
13163
      }
13164
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13165
      if (lastComparison != 0) {
13166
        return lastComparison;
13167
      }
13168
      return 0;
13169
    }
13170
 
13171
    public void read(TProtocol iprot) throws TException {
13172
      TField field;
13173
      iprot.readStructBegin();
13174
      while (true)
13175
      {
13176
        field = iprot.readFieldBegin();
13177
        if (field.type == TType.STOP) { 
13178
          break;
13179
        }
13180
        _Fields fieldId = _Fields.findByThriftId(field.id);
13181
        if (fieldId == null) {
13182
          TProtocolUtil.skip(iprot, field.type);
13183
        } else {
13184
          switch (fieldId) {
13185
            case SUCCESS:
13186
              if (field.type == TType.BOOL) {
13187
                this.success = iprot.readBool();
13188
                setSuccessIsSet(true);
13189
              } else { 
13190
                TProtocolUtil.skip(iprot, field.type);
13191
              }
13192
              break;
13193
            case UCX:
13194
              if (field.type == TType.STRUCT) {
13195
                this.ucx = new UserContextException();
13196
                this.ucx.read(iprot);
13197
              } else { 
13198
                TProtocolUtil.skip(iprot, field.type);
13199
              }
13200
              break;
13201
          }
13202
          iprot.readFieldEnd();
13203
        }
13204
      }
13205
      iprot.readStructEnd();
13206
      validate();
13207
    }
13208
 
13209
    public void write(TProtocol oprot) throws TException {
13210
      oprot.writeStructBegin(STRUCT_DESC);
13211
 
13212
      if (this.isSetSuccess()) {
13213
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13214
        oprot.writeBool(this.success);
13215
        oprot.writeFieldEnd();
13216
      } else if (this.isSetUcx()) {
13217
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13218
        this.ucx.write(oprot);
13219
        oprot.writeFieldEnd();
13220
      }
13221
      oprot.writeFieldStop();
13222
      oprot.writeStructEnd();
13223
    }
13224
 
13225
    @Override
13226
    public String toString() {
553 chandransh 13227
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 13228
      boolean first = true;
13229
 
13230
      sb.append("success:");
13231
      sb.append(this.success);
13232
      first = false;
13233
      if (!first) sb.append(", ");
13234
      sb.append("ucx:");
13235
      if (this.ucx == null) {
13236
        sb.append("null");
13237
      } else {
13238
        sb.append(this.ucx);
13239
      }
13240
      first = false;
13241
      sb.append(")");
13242
      return sb.toString();
13243
    }
13244
 
13245
    public void validate() throws TException {
13246
      // check for required fields
13247
    }
13248
 
13249
  }
13250
 
553 chandransh 13251
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
13252
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 13253
 
553 chandransh 13254
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 13255
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
13256
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 13257
 
553 chandransh 13258
    private long userid;
593 rajveer 13259
    private String oldPassword;
13260
    private String newPassword;
48 ashish 13261
 
13262
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13263
    public enum _Fields implements TFieldIdEnum {
553 chandransh 13264
      USERID((short)1, "userid"),
593 rajveer 13265
      OLD_PASSWORD((short)2, "oldPassword"),
13266
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 13267
 
13268
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13270
 
13271
      static {
13272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13273
          byId.put((int)field._thriftId, field);
13274
          byName.put(field.getFieldName(), field);
13275
        }
13276
      }
13277
 
13278
      /**
13279
       * Find the _Fields constant that matches fieldId, or null if its not found.
13280
       */
13281
      public static _Fields findByThriftId(int fieldId) {
13282
        return byId.get(fieldId);
13283
      }
13284
 
13285
      /**
13286
       * Find the _Fields constant that matches fieldId, throwing an exception
13287
       * if it is not found.
13288
       */
13289
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13290
        _Fields fields = findByThriftId(fieldId);
13291
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13292
        return fields;
13293
      }
13294
 
13295
      /**
13296
       * Find the _Fields constant that matches name, or null if its not found.
13297
       */
13298
      public static _Fields findByName(String name) {
13299
        return byName.get(name);
13300
      }
13301
 
13302
      private final short _thriftId;
13303
      private final String _fieldName;
13304
 
13305
      _Fields(short thriftId, String fieldName) {
13306
        _thriftId = thriftId;
13307
        _fieldName = fieldName;
13308
      }
13309
 
13310
      public short getThriftFieldId() {
13311
        return _thriftId;
13312
      }
13313
 
13314
      public String getFieldName() {
13315
        return _fieldName;
13316
      }
13317
    }
13318
 
13319
    // isset id assignments
13320
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 13321
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 13322
 
13323
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 13324
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 13325
          new FieldValueMetaData(TType.I64)));
593 rajveer 13326
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 13327
          new FieldValueMetaData(TType.STRING)));
593 rajveer 13328
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
13329
          new FieldValueMetaData(TType.STRING)));
48 ashish 13330
    }});
13331
 
13332
    static {
553 chandransh 13333
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 13334
    }
13335
 
553 chandransh 13336
    public updatePassword_args() {
48 ashish 13337
    }
13338
 
553 chandransh 13339
    public updatePassword_args(
13340
      long userid,
593 rajveer 13341
      String oldPassword,
13342
      String newPassword)
48 ashish 13343
    {
13344
      this();
553 chandransh 13345
      this.userid = userid;
13346
      setUseridIsSet(true);
593 rajveer 13347
      this.oldPassword = oldPassword;
13348
      this.newPassword = newPassword;
48 ashish 13349
    }
13350
 
13351
    /**
13352
     * Performs a deep copy on <i>other</i>.
13353
     */
553 chandransh 13354
    public updatePassword_args(updatePassword_args other) {
48 ashish 13355
      __isset_bit_vector.clear();
13356
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 13357
      this.userid = other.userid;
593 rajveer 13358
      if (other.isSetOldPassword()) {
13359
        this.oldPassword = other.oldPassword;
553 chandransh 13360
      }
593 rajveer 13361
      if (other.isSetNewPassword()) {
13362
        this.newPassword = other.newPassword;
13363
      }
48 ashish 13364
    }
13365
 
553 chandransh 13366
    public updatePassword_args deepCopy() {
13367
      return new updatePassword_args(this);
48 ashish 13368
    }
13369
 
13370
    @Deprecated
553 chandransh 13371
    public updatePassword_args clone() {
13372
      return new updatePassword_args(this);
48 ashish 13373
    }
13374
 
553 chandransh 13375
    public long getUserid() {
13376
      return this.userid;
48 ashish 13377
    }
13378
 
553 chandransh 13379
    public updatePassword_args setUserid(long userid) {
13380
      this.userid = userid;
13381
      setUseridIsSet(true);
48 ashish 13382
      return this;
13383
    }
13384
 
553 chandransh 13385
    public void unsetUserid() {
48 ashish 13386
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13387
    }
13388
 
553 chandransh 13389
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13390
    public boolean isSetUserid() {
48 ashish 13391
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13392
    }
13393
 
553 chandransh 13394
    public void setUseridIsSet(boolean value) {
48 ashish 13395
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13396
    }
13397
 
593 rajveer 13398
    public String getOldPassword() {
13399
      return this.oldPassword;
48 ashish 13400
    }
13401
 
593 rajveer 13402
    public updatePassword_args setOldPassword(String oldPassword) {
13403
      this.oldPassword = oldPassword;
48 ashish 13404
      return this;
13405
    }
13406
 
593 rajveer 13407
    public void unsetOldPassword() {
13408
      this.oldPassword = null;
48 ashish 13409
    }
13410
 
593 rajveer 13411
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
13412
    public boolean isSetOldPassword() {
13413
      return this.oldPassword != null;
48 ashish 13414
    }
13415
 
593 rajveer 13416
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 13417
      if (!value) {
593 rajveer 13418
        this.oldPassword = null;
553 chandransh 13419
      }
48 ashish 13420
    }
13421
 
593 rajveer 13422
    public String getNewPassword() {
13423
      return this.newPassword;
13424
    }
13425
 
13426
    public updatePassword_args setNewPassword(String newPassword) {
13427
      this.newPassword = newPassword;
13428
      return this;
13429
    }
13430
 
13431
    public void unsetNewPassword() {
13432
      this.newPassword = null;
13433
    }
13434
 
13435
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
13436
    public boolean isSetNewPassword() {
13437
      return this.newPassword != null;
13438
    }
13439
 
13440
    public void setNewPasswordIsSet(boolean value) {
13441
      if (!value) {
13442
        this.newPassword = null;
13443
      }
13444
    }
13445
 
48 ashish 13446
    public void setFieldValue(_Fields field, Object value) {
13447
      switch (field) {
553 chandransh 13448
      case USERID:
48 ashish 13449
        if (value == null) {
553 chandransh 13450
          unsetUserid();
48 ashish 13451
        } else {
553 chandransh 13452
          setUserid((Long)value);
48 ashish 13453
        }
13454
        break;
13455
 
593 rajveer 13456
      case OLD_PASSWORD:
48 ashish 13457
        if (value == null) {
593 rajveer 13458
          unsetOldPassword();
48 ashish 13459
        } else {
593 rajveer 13460
          setOldPassword((String)value);
48 ashish 13461
        }
13462
        break;
13463
 
593 rajveer 13464
      case NEW_PASSWORD:
13465
        if (value == null) {
13466
          unsetNewPassword();
13467
        } else {
13468
          setNewPassword((String)value);
13469
        }
13470
        break;
13471
 
48 ashish 13472
      }
13473
    }
13474
 
13475
    public void setFieldValue(int fieldID, Object value) {
13476
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13477
    }
13478
 
13479
    public Object getFieldValue(_Fields field) {
13480
      switch (field) {
553 chandransh 13481
      case USERID:
13482
        return new Long(getUserid());
48 ashish 13483
 
593 rajveer 13484
      case OLD_PASSWORD:
13485
        return getOldPassword();
48 ashish 13486
 
593 rajveer 13487
      case NEW_PASSWORD:
13488
        return getNewPassword();
13489
 
48 ashish 13490
      }
13491
      throw new IllegalStateException();
13492
    }
13493
 
13494
    public Object getFieldValue(int fieldId) {
13495
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13496
    }
13497
 
13498
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13499
    public boolean isSet(_Fields field) {
13500
      switch (field) {
553 chandransh 13501
      case USERID:
13502
        return isSetUserid();
593 rajveer 13503
      case OLD_PASSWORD:
13504
        return isSetOldPassword();
13505
      case NEW_PASSWORD:
13506
        return isSetNewPassword();
48 ashish 13507
      }
13508
      throw new IllegalStateException();
13509
    }
13510
 
13511
    public boolean isSet(int fieldID) {
13512
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13513
    }
13514
 
13515
    @Override
13516
    public boolean equals(Object that) {
13517
      if (that == null)
13518
        return false;
553 chandransh 13519
      if (that instanceof updatePassword_args)
13520
        return this.equals((updatePassword_args)that);
48 ashish 13521
      return false;
13522
    }
13523
 
553 chandransh 13524
    public boolean equals(updatePassword_args that) {
48 ashish 13525
      if (that == null)
13526
        return false;
13527
 
553 chandransh 13528
      boolean this_present_userid = true;
13529
      boolean that_present_userid = true;
13530
      if (this_present_userid || that_present_userid) {
13531
        if (!(this_present_userid && that_present_userid))
48 ashish 13532
          return false;
553 chandransh 13533
        if (this.userid != that.userid)
48 ashish 13534
          return false;
13535
      }
13536
 
593 rajveer 13537
      boolean this_present_oldPassword = true && this.isSetOldPassword();
13538
      boolean that_present_oldPassword = true && that.isSetOldPassword();
13539
      if (this_present_oldPassword || that_present_oldPassword) {
13540
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 13541
          return false;
593 rajveer 13542
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 13543
          return false;
13544
      }
13545
 
593 rajveer 13546
      boolean this_present_newPassword = true && this.isSetNewPassword();
13547
      boolean that_present_newPassword = true && that.isSetNewPassword();
13548
      if (this_present_newPassword || that_present_newPassword) {
13549
        if (!(this_present_newPassword && that_present_newPassword))
13550
          return false;
13551
        if (!this.newPassword.equals(that.newPassword))
13552
          return false;
13553
      }
13554
 
48 ashish 13555
      return true;
13556
    }
13557
 
13558
    @Override
13559
    public int hashCode() {
13560
      return 0;
13561
    }
13562
 
553 chandransh 13563
    public int compareTo(updatePassword_args other) {
48 ashish 13564
      if (!getClass().equals(other.getClass())) {
13565
        return getClass().getName().compareTo(other.getClass().getName());
13566
      }
13567
 
13568
      int lastComparison = 0;
553 chandransh 13569
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 13570
 
553 chandransh 13571
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 13572
      if (lastComparison != 0) {
13573
        return lastComparison;
13574
      }
553 chandransh 13575
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 13576
      if (lastComparison != 0) {
13577
        return lastComparison;
13578
      }
593 rajveer 13579
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 13580
      if (lastComparison != 0) {
13581
        return lastComparison;
13582
      }
593 rajveer 13583
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 13584
      if (lastComparison != 0) {
13585
        return lastComparison;
13586
      }
593 rajveer 13587
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
13588
      if (lastComparison != 0) {
13589
        return lastComparison;
13590
      }
13591
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
13592
      if (lastComparison != 0) {
13593
        return lastComparison;
13594
      }
48 ashish 13595
      return 0;
13596
    }
13597
 
13598
    public void read(TProtocol iprot) throws TException {
13599
      TField field;
13600
      iprot.readStructBegin();
13601
      while (true)
13602
      {
13603
        field = iprot.readFieldBegin();
13604
        if (field.type == TType.STOP) { 
13605
          break;
13606
        }
13607
        _Fields fieldId = _Fields.findByThriftId(field.id);
13608
        if (fieldId == null) {
13609
          TProtocolUtil.skip(iprot, field.type);
13610
        } else {
13611
          switch (fieldId) {
553 chandransh 13612
            case USERID:
48 ashish 13613
              if (field.type == TType.I64) {
553 chandransh 13614
                this.userid = iprot.readI64();
13615
                setUseridIsSet(true);
48 ashish 13616
              } else { 
13617
                TProtocolUtil.skip(iprot, field.type);
13618
              }
13619
              break;
593 rajveer 13620
            case OLD_PASSWORD:
553 chandransh 13621
              if (field.type == TType.STRING) {
593 rajveer 13622
                this.oldPassword = iprot.readString();
48 ashish 13623
              } else { 
13624
                TProtocolUtil.skip(iprot, field.type);
13625
              }
13626
              break;
593 rajveer 13627
            case NEW_PASSWORD:
13628
              if (field.type == TType.STRING) {
13629
                this.newPassword = iprot.readString();
13630
              } else { 
13631
                TProtocolUtil.skip(iprot, field.type);
13632
              }
13633
              break;
48 ashish 13634
          }
13635
          iprot.readFieldEnd();
13636
        }
13637
      }
13638
      iprot.readStructEnd();
13639
      validate();
13640
    }
13641
 
13642
    public void write(TProtocol oprot) throws TException {
13643
      validate();
13644
 
13645
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 13646
      oprot.writeFieldBegin(USERID_FIELD_DESC);
13647
      oprot.writeI64(this.userid);
48 ashish 13648
      oprot.writeFieldEnd();
593 rajveer 13649
      if (this.oldPassword != null) {
13650
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
13651
        oprot.writeString(this.oldPassword);
553 chandransh 13652
        oprot.writeFieldEnd();
13653
      }
593 rajveer 13654
      if (this.newPassword != null) {
13655
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
13656
        oprot.writeString(this.newPassword);
13657
        oprot.writeFieldEnd();
13658
      }
48 ashish 13659
      oprot.writeFieldStop();
13660
      oprot.writeStructEnd();
13661
    }
13662
 
13663
    @Override
13664
    public String toString() {
553 chandransh 13665
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 13666
      boolean first = true;
13667
 
553 chandransh 13668
      sb.append("userid:");
13669
      sb.append(this.userid);
48 ashish 13670
      first = false;
13671
      if (!first) sb.append(", ");
593 rajveer 13672
      sb.append("oldPassword:");
13673
      if (this.oldPassword == null) {
553 chandransh 13674
        sb.append("null");
13675
      } else {
593 rajveer 13676
        sb.append(this.oldPassword);
553 chandransh 13677
      }
48 ashish 13678
      first = false;
593 rajveer 13679
      if (!first) sb.append(", ");
13680
      sb.append("newPassword:");
13681
      if (this.newPassword == null) {
13682
        sb.append("null");
13683
      } else {
13684
        sb.append(this.newPassword);
13685
      }
13686
      first = false;
48 ashish 13687
      sb.append(")");
13688
      return sb.toString();
13689
    }
13690
 
13691
    public void validate() throws TException {
13692
      // check for required fields
13693
    }
13694
 
13695
  }
13696
 
553 chandransh 13697
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
13698
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 13699
 
13700
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13701
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13702
 
13703
    private boolean success;
13704
    private UserContextException ucx;
13705
 
13706
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13707
    public enum _Fields implements TFieldIdEnum {
13708
      SUCCESS((short)0, "success"),
13709
      UCX((short)1, "ucx");
13710
 
13711
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13713
 
13714
      static {
13715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13716
          byId.put((int)field._thriftId, field);
13717
          byName.put(field.getFieldName(), field);
13718
        }
13719
      }
13720
 
13721
      /**
13722
       * Find the _Fields constant that matches fieldId, or null if its not found.
13723
       */
13724
      public static _Fields findByThriftId(int fieldId) {
13725
        return byId.get(fieldId);
13726
      }
13727
 
13728
      /**
13729
       * Find the _Fields constant that matches fieldId, throwing an exception
13730
       * if it is not found.
13731
       */
13732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13733
        _Fields fields = findByThriftId(fieldId);
13734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13735
        return fields;
13736
      }
13737
 
13738
      /**
13739
       * Find the _Fields constant that matches name, or null if its not found.
13740
       */
13741
      public static _Fields findByName(String name) {
13742
        return byName.get(name);
13743
      }
13744
 
13745
      private final short _thriftId;
13746
      private final String _fieldName;
13747
 
13748
      _Fields(short thriftId, String fieldName) {
13749
        _thriftId = thriftId;
13750
        _fieldName = fieldName;
13751
      }
13752
 
13753
      public short getThriftFieldId() {
13754
        return _thriftId;
13755
      }
13756
 
13757
      public String getFieldName() {
13758
        return _fieldName;
13759
      }
13760
    }
13761
 
13762
    // isset id assignments
13763
    private static final int __SUCCESS_ISSET_ID = 0;
13764
    private BitSet __isset_bit_vector = new BitSet(1);
13765
 
13766
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13767
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13768
          new FieldValueMetaData(TType.BOOL)));
13769
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13770
          new FieldValueMetaData(TType.STRUCT)));
13771
    }});
13772
 
13773
    static {
553 chandransh 13774
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 13775
    }
13776
 
553 chandransh 13777
    public updatePassword_result() {
48 ashish 13778
    }
13779
 
553 chandransh 13780
    public updatePassword_result(
48 ashish 13781
      boolean success,
13782
      UserContextException ucx)
13783
    {
13784
      this();
13785
      this.success = success;
13786
      setSuccessIsSet(true);
13787
      this.ucx = ucx;
13788
    }
13789
 
13790
    /**
13791
     * Performs a deep copy on <i>other</i>.
13792
     */
553 chandransh 13793
    public updatePassword_result(updatePassword_result other) {
48 ashish 13794
      __isset_bit_vector.clear();
13795
      __isset_bit_vector.or(other.__isset_bit_vector);
13796
      this.success = other.success;
13797
      if (other.isSetUcx()) {
13798
        this.ucx = new UserContextException(other.ucx);
13799
      }
13800
    }
13801
 
553 chandransh 13802
    public updatePassword_result deepCopy() {
13803
      return new updatePassword_result(this);
48 ashish 13804
    }
13805
 
13806
    @Deprecated
553 chandransh 13807
    public updatePassword_result clone() {
13808
      return new updatePassword_result(this);
48 ashish 13809
    }
13810
 
13811
    public boolean isSuccess() {
13812
      return this.success;
13813
    }
13814
 
553 chandransh 13815
    public updatePassword_result setSuccess(boolean success) {
48 ashish 13816
      this.success = success;
13817
      setSuccessIsSet(true);
13818
      return this;
13819
    }
13820
 
13821
    public void unsetSuccess() {
13822
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13823
    }
13824
 
13825
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13826
    public boolean isSetSuccess() {
13827
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13828
    }
13829
 
13830
    public void setSuccessIsSet(boolean value) {
13831
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13832
    }
13833
 
13834
    public UserContextException getUcx() {
13835
      return this.ucx;
13836
    }
13837
 
553 chandransh 13838
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 13839
      this.ucx = ucx;
13840
      return this;
13841
    }
13842
 
13843
    public void unsetUcx() {
13844
      this.ucx = null;
13845
    }
13846
 
13847
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13848
    public boolean isSetUcx() {
13849
      return this.ucx != null;
13850
    }
13851
 
13852
    public void setUcxIsSet(boolean value) {
13853
      if (!value) {
13854
        this.ucx = null;
13855
      }
13856
    }
13857
 
13858
    public void setFieldValue(_Fields field, Object value) {
13859
      switch (field) {
13860
      case SUCCESS:
13861
        if (value == null) {
13862
          unsetSuccess();
13863
        } else {
13864
          setSuccess((Boolean)value);
13865
        }
13866
        break;
13867
 
13868
      case UCX:
13869
        if (value == null) {
13870
          unsetUcx();
13871
        } else {
13872
          setUcx((UserContextException)value);
13873
        }
13874
        break;
13875
 
13876
      }
13877
    }
13878
 
13879
    public void setFieldValue(int fieldID, Object value) {
13880
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13881
    }
13882
 
13883
    public Object getFieldValue(_Fields field) {
13884
      switch (field) {
13885
      case SUCCESS:
13886
        return new Boolean(isSuccess());
13887
 
13888
      case UCX:
13889
        return getUcx();
13890
 
13891
      }
13892
      throw new IllegalStateException();
13893
    }
13894
 
13895
    public Object getFieldValue(int fieldId) {
13896
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13897
    }
13898
 
13899
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13900
    public boolean isSet(_Fields field) {
13901
      switch (field) {
13902
      case SUCCESS:
13903
        return isSetSuccess();
13904
      case UCX:
13905
        return isSetUcx();
13906
      }
13907
      throw new IllegalStateException();
13908
    }
13909
 
13910
    public boolean isSet(int fieldID) {
13911
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13912
    }
13913
 
13914
    @Override
13915
    public boolean equals(Object that) {
13916
      if (that == null)
13917
        return false;
553 chandransh 13918
      if (that instanceof updatePassword_result)
13919
        return this.equals((updatePassword_result)that);
48 ashish 13920
      return false;
13921
    }
13922
 
553 chandransh 13923
    public boolean equals(updatePassword_result that) {
48 ashish 13924
      if (that == null)
13925
        return false;
13926
 
13927
      boolean this_present_success = true;
13928
      boolean that_present_success = true;
13929
      if (this_present_success || that_present_success) {
13930
        if (!(this_present_success && that_present_success))
13931
          return false;
13932
        if (this.success != that.success)
13933
          return false;
13934
      }
13935
 
13936
      boolean this_present_ucx = true && this.isSetUcx();
13937
      boolean that_present_ucx = true && that.isSetUcx();
13938
      if (this_present_ucx || that_present_ucx) {
13939
        if (!(this_present_ucx && that_present_ucx))
13940
          return false;
13941
        if (!this.ucx.equals(that.ucx))
13942
          return false;
13943
      }
13944
 
13945
      return true;
13946
    }
13947
 
13948
    @Override
13949
    public int hashCode() {
13950
      return 0;
13951
    }
13952
 
553 chandransh 13953
    public int compareTo(updatePassword_result other) {
48 ashish 13954
      if (!getClass().equals(other.getClass())) {
13955
        return getClass().getName().compareTo(other.getClass().getName());
13956
      }
13957
 
13958
      int lastComparison = 0;
553 chandransh 13959
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 13960
 
13961
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13962
      if (lastComparison != 0) {
13963
        return lastComparison;
13964
      }
13965
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13966
      if (lastComparison != 0) {
13967
        return lastComparison;
13968
      }
13969
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13970
      if (lastComparison != 0) {
13971
        return lastComparison;
13972
      }
13973
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13974
      if (lastComparison != 0) {
13975
        return lastComparison;
13976
      }
13977
      return 0;
13978
    }
13979
 
13980
    public void read(TProtocol iprot) throws TException {
13981
      TField field;
13982
      iprot.readStructBegin();
13983
      while (true)
13984
      {
13985
        field = iprot.readFieldBegin();
13986
        if (field.type == TType.STOP) { 
13987
          break;
13988
        }
13989
        _Fields fieldId = _Fields.findByThriftId(field.id);
13990
        if (fieldId == null) {
13991
          TProtocolUtil.skip(iprot, field.type);
13992
        } else {
13993
          switch (fieldId) {
13994
            case SUCCESS:
13995
              if (field.type == TType.BOOL) {
13996
                this.success = iprot.readBool();
13997
                setSuccessIsSet(true);
13998
              } else { 
13999
                TProtocolUtil.skip(iprot, field.type);
14000
              }
14001
              break;
14002
            case UCX:
14003
              if (field.type == TType.STRUCT) {
14004
                this.ucx = new UserContextException();
14005
                this.ucx.read(iprot);
14006
              } else { 
14007
                TProtocolUtil.skip(iprot, field.type);
14008
              }
14009
              break;
14010
          }
14011
          iprot.readFieldEnd();
14012
        }
14013
      }
14014
      iprot.readStructEnd();
14015
      validate();
14016
    }
14017
 
14018
    public void write(TProtocol oprot) throws TException {
14019
      oprot.writeStructBegin(STRUCT_DESC);
14020
 
14021
      if (this.isSetSuccess()) {
14022
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14023
        oprot.writeBool(this.success);
14024
        oprot.writeFieldEnd();
14025
      } else if (this.isSetUcx()) {
14026
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14027
        this.ucx.write(oprot);
14028
        oprot.writeFieldEnd();
14029
      }
14030
      oprot.writeFieldStop();
14031
      oprot.writeStructEnd();
14032
    }
14033
 
14034
    @Override
14035
    public String toString() {
553 chandransh 14036
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 14037
      boolean first = true;
14038
 
14039
      sb.append("success:");
14040
      sb.append(this.success);
14041
      first = false;
14042
      if (!first) sb.append(", ");
14043
      sb.append("ucx:");
14044
      if (this.ucx == null) {
14045
        sb.append("null");
14046
      } else {
14047
        sb.append(this.ucx);
14048
      }
14049
      first = false;
14050
      sb.append(")");
14051
      return sb.toString();
14052
    }
14053
 
14054
    public void validate() throws TException {
14055
      // check for required fields
14056
    }
14057
 
14058
  }
14059
 
582 rajveer 14060
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
14061
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
14062
 
14063
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
896 rajveer 14064
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)2);
582 rajveer 14065
 
14066
    private String email;
896 rajveer 14067
    private String newPassword;
582 rajveer 14068
 
14069
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14070
    public enum _Fields implements TFieldIdEnum {
896 rajveer 14071
      EMAIL((short)1, "email"),
14072
      NEW_PASSWORD((short)2, "newPassword");
582 rajveer 14073
 
14074
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14075
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14076
 
14077
      static {
14078
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14079
          byId.put((int)field._thriftId, field);
14080
          byName.put(field.getFieldName(), field);
14081
        }
14082
      }
14083
 
14084
      /**
14085
       * Find the _Fields constant that matches fieldId, or null if its not found.
14086
       */
14087
      public static _Fields findByThriftId(int fieldId) {
14088
        return byId.get(fieldId);
14089
      }
14090
 
14091
      /**
14092
       * Find the _Fields constant that matches fieldId, throwing an exception
14093
       * if it is not found.
14094
       */
14095
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14096
        _Fields fields = findByThriftId(fieldId);
14097
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14098
        return fields;
14099
      }
14100
 
14101
      /**
14102
       * Find the _Fields constant that matches name, or null if its not found.
14103
       */
14104
      public static _Fields findByName(String name) {
14105
        return byName.get(name);
14106
      }
14107
 
14108
      private final short _thriftId;
14109
      private final String _fieldName;
14110
 
14111
      _Fields(short thriftId, String fieldName) {
14112
        _thriftId = thriftId;
14113
        _fieldName = fieldName;
14114
      }
14115
 
14116
      public short getThriftFieldId() {
14117
        return _thriftId;
14118
      }
14119
 
14120
      public String getFieldName() {
14121
        return _fieldName;
14122
      }
14123
    }
14124
 
14125
    // isset id assignments
14126
 
14127
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14128
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
14129
          new FieldValueMetaData(TType.STRING)));
896 rajveer 14130
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
14131
          new FieldValueMetaData(TType.STRING)));
582 rajveer 14132
    }});
14133
 
14134
    static {
14135
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
14136
    }
14137
 
14138
    public forgotPassword_args() {
14139
    }
14140
 
14141
    public forgotPassword_args(
896 rajveer 14142
      String email,
14143
      String newPassword)
582 rajveer 14144
    {
14145
      this();
14146
      this.email = email;
896 rajveer 14147
      this.newPassword = newPassword;
582 rajveer 14148
    }
14149
 
14150
    /**
14151
     * Performs a deep copy on <i>other</i>.
14152
     */
14153
    public forgotPassword_args(forgotPassword_args other) {
14154
      if (other.isSetEmail()) {
14155
        this.email = other.email;
14156
      }
896 rajveer 14157
      if (other.isSetNewPassword()) {
14158
        this.newPassword = other.newPassword;
14159
      }
582 rajveer 14160
    }
14161
 
14162
    public forgotPassword_args deepCopy() {
14163
      return new forgotPassword_args(this);
14164
    }
14165
 
14166
    @Deprecated
14167
    public forgotPassword_args clone() {
14168
      return new forgotPassword_args(this);
14169
    }
14170
 
14171
    public String getEmail() {
14172
      return this.email;
14173
    }
14174
 
14175
    public forgotPassword_args setEmail(String email) {
14176
      this.email = email;
14177
      return this;
14178
    }
14179
 
14180
    public void unsetEmail() {
14181
      this.email = null;
14182
    }
14183
 
14184
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
14185
    public boolean isSetEmail() {
14186
      return this.email != null;
14187
    }
14188
 
14189
    public void setEmailIsSet(boolean value) {
14190
      if (!value) {
14191
        this.email = null;
14192
      }
14193
    }
14194
 
896 rajveer 14195
    public String getNewPassword() {
14196
      return this.newPassword;
14197
    }
14198
 
14199
    public forgotPassword_args setNewPassword(String newPassword) {
14200
      this.newPassword = newPassword;
14201
      return this;
14202
    }
14203
 
14204
    public void unsetNewPassword() {
14205
      this.newPassword = null;
14206
    }
14207
 
14208
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
14209
    public boolean isSetNewPassword() {
14210
      return this.newPassword != null;
14211
    }
14212
 
14213
    public void setNewPasswordIsSet(boolean value) {
14214
      if (!value) {
14215
        this.newPassword = null;
14216
      }
14217
    }
14218
 
582 rajveer 14219
    public void setFieldValue(_Fields field, Object value) {
14220
      switch (field) {
14221
      case EMAIL:
14222
        if (value == null) {
14223
          unsetEmail();
14224
        } else {
14225
          setEmail((String)value);
14226
        }
14227
        break;
14228
 
896 rajveer 14229
      case NEW_PASSWORD:
14230
        if (value == null) {
14231
          unsetNewPassword();
14232
        } else {
14233
          setNewPassword((String)value);
14234
        }
14235
        break;
14236
 
582 rajveer 14237
      }
14238
    }
14239
 
14240
    public void setFieldValue(int fieldID, Object value) {
14241
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14242
    }
14243
 
14244
    public Object getFieldValue(_Fields field) {
14245
      switch (field) {
14246
      case EMAIL:
14247
        return getEmail();
14248
 
896 rajveer 14249
      case NEW_PASSWORD:
14250
        return getNewPassword();
14251
 
582 rajveer 14252
      }
14253
      throw new IllegalStateException();
14254
    }
14255
 
14256
    public Object getFieldValue(int fieldId) {
14257
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14258
    }
14259
 
14260
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14261
    public boolean isSet(_Fields field) {
14262
      switch (field) {
14263
      case EMAIL:
14264
        return isSetEmail();
896 rajveer 14265
      case NEW_PASSWORD:
14266
        return isSetNewPassword();
582 rajveer 14267
      }
14268
      throw new IllegalStateException();
14269
    }
14270
 
14271
    public boolean isSet(int fieldID) {
14272
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14273
    }
14274
 
14275
    @Override
14276
    public boolean equals(Object that) {
14277
      if (that == null)
14278
        return false;
14279
      if (that instanceof forgotPassword_args)
14280
        return this.equals((forgotPassword_args)that);
14281
      return false;
14282
    }
14283
 
14284
    public boolean equals(forgotPassword_args that) {
14285
      if (that == null)
14286
        return false;
14287
 
14288
      boolean this_present_email = true && this.isSetEmail();
14289
      boolean that_present_email = true && that.isSetEmail();
14290
      if (this_present_email || that_present_email) {
14291
        if (!(this_present_email && that_present_email))
14292
          return false;
14293
        if (!this.email.equals(that.email))
14294
          return false;
14295
      }
14296
 
896 rajveer 14297
      boolean this_present_newPassword = true && this.isSetNewPassword();
14298
      boolean that_present_newPassword = true && that.isSetNewPassword();
14299
      if (this_present_newPassword || that_present_newPassword) {
14300
        if (!(this_present_newPassword && that_present_newPassword))
14301
          return false;
14302
        if (!this.newPassword.equals(that.newPassword))
14303
          return false;
14304
      }
14305
 
582 rajveer 14306
      return true;
14307
    }
14308
 
14309
    @Override
14310
    public int hashCode() {
14311
      return 0;
14312
    }
14313
 
14314
    public int compareTo(forgotPassword_args other) {
14315
      if (!getClass().equals(other.getClass())) {
14316
        return getClass().getName().compareTo(other.getClass().getName());
14317
      }
14318
 
14319
      int lastComparison = 0;
14320
      forgotPassword_args typedOther = (forgotPassword_args)other;
14321
 
14322
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
14323
      if (lastComparison != 0) {
14324
        return lastComparison;
14325
      }
14326
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
14327
      if (lastComparison != 0) {
14328
        return lastComparison;
14329
      }
896 rajveer 14330
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
14331
      if (lastComparison != 0) {
14332
        return lastComparison;
14333
      }
14334
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
14335
      if (lastComparison != 0) {
14336
        return lastComparison;
14337
      }
582 rajveer 14338
      return 0;
14339
    }
14340
 
14341
    public void read(TProtocol iprot) throws TException {
14342
      TField field;
14343
      iprot.readStructBegin();
14344
      while (true)
14345
      {
14346
        field = iprot.readFieldBegin();
14347
        if (field.type == TType.STOP) { 
14348
          break;
14349
        }
14350
        _Fields fieldId = _Fields.findByThriftId(field.id);
14351
        if (fieldId == null) {
14352
          TProtocolUtil.skip(iprot, field.type);
14353
        } else {
14354
          switch (fieldId) {
14355
            case EMAIL:
14356
              if (field.type == TType.STRING) {
14357
                this.email = iprot.readString();
14358
              } else { 
14359
                TProtocolUtil.skip(iprot, field.type);
14360
              }
14361
              break;
896 rajveer 14362
            case NEW_PASSWORD:
14363
              if (field.type == TType.STRING) {
14364
                this.newPassword = iprot.readString();
14365
              } else { 
14366
                TProtocolUtil.skip(iprot, field.type);
14367
              }
14368
              break;
582 rajveer 14369
          }
14370
          iprot.readFieldEnd();
14371
        }
14372
      }
14373
      iprot.readStructEnd();
14374
      validate();
14375
    }
14376
 
14377
    public void write(TProtocol oprot) throws TException {
14378
      validate();
14379
 
14380
      oprot.writeStructBegin(STRUCT_DESC);
14381
      if (this.email != null) {
14382
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
14383
        oprot.writeString(this.email);
14384
        oprot.writeFieldEnd();
14385
      }
896 rajveer 14386
      if (this.newPassword != null) {
14387
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
14388
        oprot.writeString(this.newPassword);
14389
        oprot.writeFieldEnd();
14390
      }
582 rajveer 14391
      oprot.writeFieldStop();
14392
      oprot.writeStructEnd();
14393
    }
14394
 
14395
    @Override
14396
    public String toString() {
14397
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
14398
      boolean first = true;
14399
 
14400
      sb.append("email:");
14401
      if (this.email == null) {
14402
        sb.append("null");
14403
      } else {
14404
        sb.append(this.email);
14405
      }
14406
      first = false;
896 rajveer 14407
      if (!first) sb.append(", ");
14408
      sb.append("newPassword:");
14409
      if (this.newPassword == null) {
14410
        sb.append("null");
14411
      } else {
14412
        sb.append(this.newPassword);
14413
      }
14414
      first = false;
582 rajveer 14415
      sb.append(")");
14416
      return sb.toString();
14417
    }
14418
 
14419
    public void validate() throws TException {
14420
      // check for required fields
14421
    }
14422
 
14423
  }
14424
 
14425
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
14426
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
14427
 
14428
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14429
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14430
 
14431
    private boolean success;
14432
    private UserContextException ucx;
14433
 
14434
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14435
    public enum _Fields implements TFieldIdEnum {
14436
      SUCCESS((short)0, "success"),
14437
      UCX((short)1, "ucx");
14438
 
14439
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14440
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14441
 
14442
      static {
14443
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14444
          byId.put((int)field._thriftId, field);
14445
          byName.put(field.getFieldName(), field);
14446
        }
14447
      }
14448
 
14449
      /**
14450
       * Find the _Fields constant that matches fieldId, or null if its not found.
14451
       */
14452
      public static _Fields findByThriftId(int fieldId) {
14453
        return byId.get(fieldId);
14454
      }
14455
 
14456
      /**
14457
       * Find the _Fields constant that matches fieldId, throwing an exception
14458
       * if it is not found.
14459
       */
14460
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14461
        _Fields fields = findByThriftId(fieldId);
14462
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14463
        return fields;
14464
      }
14465
 
14466
      /**
14467
       * Find the _Fields constant that matches name, or null if its not found.
14468
       */
14469
      public static _Fields findByName(String name) {
14470
        return byName.get(name);
14471
      }
14472
 
14473
      private final short _thriftId;
14474
      private final String _fieldName;
14475
 
14476
      _Fields(short thriftId, String fieldName) {
14477
        _thriftId = thriftId;
14478
        _fieldName = fieldName;
14479
      }
14480
 
14481
      public short getThriftFieldId() {
14482
        return _thriftId;
14483
      }
14484
 
14485
      public String getFieldName() {
14486
        return _fieldName;
14487
      }
14488
    }
14489
 
14490
    // isset id assignments
14491
    private static final int __SUCCESS_ISSET_ID = 0;
14492
    private BitSet __isset_bit_vector = new BitSet(1);
14493
 
14494
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14495
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14496
          new FieldValueMetaData(TType.BOOL)));
14497
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14498
          new FieldValueMetaData(TType.STRUCT)));
14499
    }});
14500
 
14501
    static {
14502
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
14503
    }
14504
 
14505
    public forgotPassword_result() {
14506
    }
14507
 
14508
    public forgotPassword_result(
14509
      boolean success,
14510
      UserContextException ucx)
14511
    {
14512
      this();
14513
      this.success = success;
14514
      setSuccessIsSet(true);
14515
      this.ucx = ucx;
14516
    }
14517
 
14518
    /**
14519
     * Performs a deep copy on <i>other</i>.
14520
     */
14521
    public forgotPassword_result(forgotPassword_result other) {
14522
      __isset_bit_vector.clear();
14523
      __isset_bit_vector.or(other.__isset_bit_vector);
14524
      this.success = other.success;
14525
      if (other.isSetUcx()) {
14526
        this.ucx = new UserContextException(other.ucx);
14527
      }
14528
    }
14529
 
14530
    public forgotPassword_result deepCopy() {
14531
      return new forgotPassword_result(this);
14532
    }
14533
 
14534
    @Deprecated
14535
    public forgotPassword_result clone() {
14536
      return new forgotPassword_result(this);
14537
    }
14538
 
14539
    public boolean isSuccess() {
14540
      return this.success;
14541
    }
14542
 
14543
    public forgotPassword_result setSuccess(boolean success) {
14544
      this.success = success;
14545
      setSuccessIsSet(true);
14546
      return this;
14547
    }
14548
 
14549
    public void unsetSuccess() {
14550
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14551
    }
14552
 
14553
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14554
    public boolean isSetSuccess() {
14555
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14556
    }
14557
 
14558
    public void setSuccessIsSet(boolean value) {
14559
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14560
    }
14561
 
14562
    public UserContextException getUcx() {
14563
      return this.ucx;
14564
    }
14565
 
14566
    public forgotPassword_result setUcx(UserContextException ucx) {
14567
      this.ucx = ucx;
14568
      return this;
14569
    }
14570
 
14571
    public void unsetUcx() {
14572
      this.ucx = null;
14573
    }
14574
 
14575
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14576
    public boolean isSetUcx() {
14577
      return this.ucx != null;
14578
    }
14579
 
14580
    public void setUcxIsSet(boolean value) {
14581
      if (!value) {
14582
        this.ucx = null;
14583
      }
14584
    }
14585
 
14586
    public void setFieldValue(_Fields field, Object value) {
14587
      switch (field) {
14588
      case SUCCESS:
14589
        if (value == null) {
14590
          unsetSuccess();
14591
        } else {
14592
          setSuccess((Boolean)value);
14593
        }
14594
        break;
14595
 
14596
      case UCX:
14597
        if (value == null) {
14598
          unsetUcx();
14599
        } else {
14600
          setUcx((UserContextException)value);
14601
        }
14602
        break;
14603
 
14604
      }
14605
    }
14606
 
14607
    public void setFieldValue(int fieldID, Object value) {
14608
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14609
    }
14610
 
14611
    public Object getFieldValue(_Fields field) {
14612
      switch (field) {
14613
      case SUCCESS:
14614
        return new Boolean(isSuccess());
14615
 
14616
      case UCX:
14617
        return getUcx();
14618
 
14619
      }
14620
      throw new IllegalStateException();
14621
    }
14622
 
14623
    public Object getFieldValue(int fieldId) {
14624
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14625
    }
14626
 
14627
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14628
    public boolean isSet(_Fields field) {
14629
      switch (field) {
14630
      case SUCCESS:
14631
        return isSetSuccess();
14632
      case UCX:
14633
        return isSetUcx();
14634
      }
14635
      throw new IllegalStateException();
14636
    }
14637
 
14638
    public boolean isSet(int fieldID) {
14639
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14640
    }
14641
 
14642
    @Override
14643
    public boolean equals(Object that) {
14644
      if (that == null)
14645
        return false;
14646
      if (that instanceof forgotPassword_result)
14647
        return this.equals((forgotPassword_result)that);
14648
      return false;
14649
    }
14650
 
14651
    public boolean equals(forgotPassword_result that) {
14652
      if (that == null)
14653
        return false;
14654
 
14655
      boolean this_present_success = true;
14656
      boolean that_present_success = true;
14657
      if (this_present_success || that_present_success) {
14658
        if (!(this_present_success && that_present_success))
14659
          return false;
14660
        if (this.success != that.success)
14661
          return false;
14662
      }
14663
 
14664
      boolean this_present_ucx = true && this.isSetUcx();
14665
      boolean that_present_ucx = true && that.isSetUcx();
14666
      if (this_present_ucx || that_present_ucx) {
14667
        if (!(this_present_ucx && that_present_ucx))
14668
          return false;
14669
        if (!this.ucx.equals(that.ucx))
14670
          return false;
14671
      }
14672
 
14673
      return true;
14674
    }
14675
 
14676
    @Override
14677
    public int hashCode() {
14678
      return 0;
14679
    }
14680
 
14681
    public int compareTo(forgotPassword_result other) {
14682
      if (!getClass().equals(other.getClass())) {
14683
        return getClass().getName().compareTo(other.getClass().getName());
14684
      }
14685
 
14686
      int lastComparison = 0;
14687
      forgotPassword_result typedOther = (forgotPassword_result)other;
14688
 
14689
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14690
      if (lastComparison != 0) {
14691
        return lastComparison;
14692
      }
14693
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14694
      if (lastComparison != 0) {
14695
        return lastComparison;
14696
      }
14697
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14698
      if (lastComparison != 0) {
14699
        return lastComparison;
14700
      }
14701
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14702
      if (lastComparison != 0) {
14703
        return lastComparison;
14704
      }
14705
      return 0;
14706
    }
14707
 
14708
    public void read(TProtocol iprot) throws TException {
14709
      TField field;
14710
      iprot.readStructBegin();
14711
      while (true)
14712
      {
14713
        field = iprot.readFieldBegin();
14714
        if (field.type == TType.STOP) { 
14715
          break;
14716
        }
14717
        _Fields fieldId = _Fields.findByThriftId(field.id);
14718
        if (fieldId == null) {
14719
          TProtocolUtil.skip(iprot, field.type);
14720
        } else {
14721
          switch (fieldId) {
14722
            case SUCCESS:
14723
              if (field.type == TType.BOOL) {
14724
                this.success = iprot.readBool();
14725
                setSuccessIsSet(true);
14726
              } else { 
14727
                TProtocolUtil.skip(iprot, field.type);
14728
              }
14729
              break;
14730
            case UCX:
14731
              if (field.type == TType.STRUCT) {
14732
                this.ucx = new UserContextException();
14733
                this.ucx.read(iprot);
14734
              } else { 
14735
                TProtocolUtil.skip(iprot, field.type);
14736
              }
14737
              break;
14738
          }
14739
          iprot.readFieldEnd();
14740
        }
14741
      }
14742
      iprot.readStructEnd();
14743
      validate();
14744
    }
14745
 
14746
    public void write(TProtocol oprot) throws TException {
14747
      oprot.writeStructBegin(STRUCT_DESC);
14748
 
14749
      if (this.isSetSuccess()) {
14750
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14751
        oprot.writeBool(this.success);
14752
        oprot.writeFieldEnd();
14753
      } else if (this.isSetUcx()) {
14754
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14755
        this.ucx.write(oprot);
14756
        oprot.writeFieldEnd();
14757
      }
14758
      oprot.writeFieldStop();
14759
      oprot.writeStructEnd();
14760
    }
14761
 
14762
    @Override
14763
    public String toString() {
14764
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
14765
      boolean first = true;
14766
 
14767
      sb.append("success:");
14768
      sb.append(this.success);
14769
      first = false;
14770
      if (!first) sb.append(", ");
14771
      sb.append("ucx:");
14772
      if (this.ucx == null) {
14773
        sb.append("null");
14774
      } else {
14775
        sb.append(this.ucx);
14776
      }
14777
      first = false;
14778
      sb.append(")");
14779
      return sb.toString();
14780
    }
14781
 
14782
    public void validate() throws TException {
14783
      // check for required fields
14784
    }
14785
 
14786
  }
14787
 
593 rajveer 14788
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
14789
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
14790
 
14791
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14792
 
14793
    private long userId;
14794
 
14795
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14796
    public enum _Fields implements TFieldIdEnum {
14797
      USER_ID((short)1, "userId");
14798
 
14799
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14800
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14801
 
14802
      static {
14803
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14804
          byId.put((int)field._thriftId, field);
14805
          byName.put(field.getFieldName(), field);
14806
        }
14807
      }
14808
 
14809
      /**
14810
       * Find the _Fields constant that matches fieldId, or null if its not found.
14811
       */
14812
      public static _Fields findByThriftId(int fieldId) {
14813
        return byId.get(fieldId);
14814
      }
14815
 
14816
      /**
14817
       * Find the _Fields constant that matches fieldId, throwing an exception
14818
       * if it is not found.
14819
       */
14820
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14821
        _Fields fields = findByThriftId(fieldId);
14822
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14823
        return fields;
14824
      }
14825
 
14826
      /**
14827
       * Find the _Fields constant that matches name, or null if its not found.
14828
       */
14829
      public static _Fields findByName(String name) {
14830
        return byName.get(name);
14831
      }
14832
 
14833
      private final short _thriftId;
14834
      private final String _fieldName;
14835
 
14836
      _Fields(short thriftId, String fieldName) {
14837
        _thriftId = thriftId;
14838
        _fieldName = fieldName;
14839
      }
14840
 
14841
      public short getThriftFieldId() {
14842
        return _thriftId;
14843
      }
14844
 
14845
      public String getFieldName() {
14846
        return _fieldName;
14847
      }
14848
    }
14849
 
14850
    // isset id assignments
14851
    private static final int __USERID_ISSET_ID = 0;
14852
    private BitSet __isset_bit_vector = new BitSet(1);
14853
 
14854
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14855
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14856
          new FieldValueMetaData(TType.I64)));
14857
    }});
14858
 
14859
    static {
14860
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
14861
    }
14862
 
14863
    public getAllAddressesForUser_args() {
14864
    }
14865
 
14866
    public getAllAddressesForUser_args(
14867
      long userId)
14868
    {
14869
      this();
14870
      this.userId = userId;
14871
      setUserIdIsSet(true);
14872
    }
14873
 
14874
    /**
14875
     * Performs a deep copy on <i>other</i>.
14876
     */
14877
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
14878
      __isset_bit_vector.clear();
14879
      __isset_bit_vector.or(other.__isset_bit_vector);
14880
      this.userId = other.userId;
14881
    }
14882
 
14883
    public getAllAddressesForUser_args deepCopy() {
14884
      return new getAllAddressesForUser_args(this);
14885
    }
14886
 
14887
    @Deprecated
14888
    public getAllAddressesForUser_args clone() {
14889
      return new getAllAddressesForUser_args(this);
14890
    }
14891
 
14892
    public long getUserId() {
14893
      return this.userId;
14894
    }
14895
 
14896
    public getAllAddressesForUser_args setUserId(long userId) {
14897
      this.userId = userId;
14898
      setUserIdIsSet(true);
14899
      return this;
14900
    }
14901
 
14902
    public void unsetUserId() {
14903
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14904
    }
14905
 
14906
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14907
    public boolean isSetUserId() {
14908
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14909
    }
14910
 
14911
    public void setUserIdIsSet(boolean value) {
14912
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14913
    }
14914
 
14915
    public void setFieldValue(_Fields field, Object value) {
14916
      switch (field) {
14917
      case USER_ID:
14918
        if (value == null) {
14919
          unsetUserId();
14920
        } else {
14921
          setUserId((Long)value);
14922
        }
14923
        break;
14924
 
14925
      }
14926
    }
14927
 
14928
    public void setFieldValue(int fieldID, Object value) {
14929
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14930
    }
14931
 
14932
    public Object getFieldValue(_Fields field) {
14933
      switch (field) {
14934
      case USER_ID:
14935
        return new Long(getUserId());
14936
 
14937
      }
14938
      throw new IllegalStateException();
14939
    }
14940
 
14941
    public Object getFieldValue(int fieldId) {
14942
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14943
    }
14944
 
14945
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14946
    public boolean isSet(_Fields field) {
14947
      switch (field) {
14948
      case USER_ID:
14949
        return isSetUserId();
14950
      }
14951
      throw new IllegalStateException();
14952
    }
14953
 
14954
    public boolean isSet(int fieldID) {
14955
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14956
    }
14957
 
14958
    @Override
14959
    public boolean equals(Object that) {
14960
      if (that == null)
14961
        return false;
14962
      if (that instanceof getAllAddressesForUser_args)
14963
        return this.equals((getAllAddressesForUser_args)that);
14964
      return false;
14965
    }
14966
 
14967
    public boolean equals(getAllAddressesForUser_args that) {
14968
      if (that == null)
14969
        return false;
14970
 
14971
      boolean this_present_userId = true;
14972
      boolean that_present_userId = true;
14973
      if (this_present_userId || that_present_userId) {
14974
        if (!(this_present_userId && that_present_userId))
14975
          return false;
14976
        if (this.userId != that.userId)
14977
          return false;
14978
      }
14979
 
14980
      return true;
14981
    }
14982
 
14983
    @Override
14984
    public int hashCode() {
14985
      return 0;
14986
    }
14987
 
14988
    public int compareTo(getAllAddressesForUser_args other) {
14989
      if (!getClass().equals(other.getClass())) {
14990
        return getClass().getName().compareTo(other.getClass().getName());
14991
      }
14992
 
14993
      int lastComparison = 0;
14994
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
14995
 
14996
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14997
      if (lastComparison != 0) {
14998
        return lastComparison;
14999
      }
15000
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15001
      if (lastComparison != 0) {
15002
        return lastComparison;
15003
      }
15004
      return 0;
15005
    }
15006
 
15007
    public void read(TProtocol iprot) throws TException {
15008
      TField field;
15009
      iprot.readStructBegin();
15010
      while (true)
15011
      {
15012
        field = iprot.readFieldBegin();
15013
        if (field.type == TType.STOP) { 
15014
          break;
15015
        }
15016
        _Fields fieldId = _Fields.findByThriftId(field.id);
15017
        if (fieldId == null) {
15018
          TProtocolUtil.skip(iprot, field.type);
15019
        } else {
15020
          switch (fieldId) {
15021
            case USER_ID:
15022
              if (field.type == TType.I64) {
15023
                this.userId = iprot.readI64();
15024
                setUserIdIsSet(true);
15025
              } else { 
15026
                TProtocolUtil.skip(iprot, field.type);
15027
              }
15028
              break;
15029
          }
15030
          iprot.readFieldEnd();
15031
        }
15032
      }
15033
      iprot.readStructEnd();
15034
      validate();
15035
    }
15036
 
15037
    public void write(TProtocol oprot) throws TException {
15038
      validate();
15039
 
15040
      oprot.writeStructBegin(STRUCT_DESC);
15041
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15042
      oprot.writeI64(this.userId);
15043
      oprot.writeFieldEnd();
15044
      oprot.writeFieldStop();
15045
      oprot.writeStructEnd();
15046
    }
15047
 
15048
    @Override
15049
    public String toString() {
15050
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
15051
      boolean first = true;
15052
 
15053
      sb.append("userId:");
15054
      sb.append(this.userId);
15055
      first = false;
15056
      sb.append(")");
15057
      return sb.toString();
15058
    }
15059
 
15060
    public void validate() throws TException {
15061
      // check for required fields
15062
    }
15063
 
15064
  }
15065
 
15066
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
15067
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
15068
 
15069
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
15070
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15071
 
15072
    private List<Address> success;
15073
    private UserContextException ucx;
15074
 
15075
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15076
    public enum _Fields implements TFieldIdEnum {
15077
      SUCCESS((short)0, "success"),
15078
      UCX((short)1, "ucx");
15079
 
15080
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15081
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15082
 
15083
      static {
15084
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15085
          byId.put((int)field._thriftId, field);
15086
          byName.put(field.getFieldName(), field);
15087
        }
15088
      }
15089
 
15090
      /**
15091
       * Find the _Fields constant that matches fieldId, or null if its not found.
15092
       */
15093
      public static _Fields findByThriftId(int fieldId) {
15094
        return byId.get(fieldId);
15095
      }
15096
 
15097
      /**
15098
       * Find the _Fields constant that matches fieldId, throwing an exception
15099
       * if it is not found.
15100
       */
15101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15102
        _Fields fields = findByThriftId(fieldId);
15103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15104
        return fields;
15105
      }
15106
 
15107
      /**
15108
       * Find the _Fields constant that matches name, or null if its not found.
15109
       */
15110
      public static _Fields findByName(String name) {
15111
        return byName.get(name);
15112
      }
15113
 
15114
      private final short _thriftId;
15115
      private final String _fieldName;
15116
 
15117
      _Fields(short thriftId, String fieldName) {
15118
        _thriftId = thriftId;
15119
        _fieldName = fieldName;
15120
      }
15121
 
15122
      public short getThriftFieldId() {
15123
        return _thriftId;
15124
      }
15125
 
15126
      public String getFieldName() {
15127
        return _fieldName;
15128
      }
15129
    }
15130
 
15131
    // isset id assignments
15132
 
15133
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15134
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15135
          new ListMetaData(TType.LIST, 
15136
              new StructMetaData(TType.STRUCT, Address.class))));
15137
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15138
          new FieldValueMetaData(TType.STRUCT)));
15139
    }});
15140
 
15141
    static {
15142
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
15143
    }
15144
 
15145
    public getAllAddressesForUser_result() {
15146
    }
15147
 
15148
    public getAllAddressesForUser_result(
15149
      List<Address> success,
15150
      UserContextException ucx)
15151
    {
15152
      this();
15153
      this.success = success;
15154
      this.ucx = ucx;
15155
    }
15156
 
15157
    /**
15158
     * Performs a deep copy on <i>other</i>.
15159
     */
15160
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
15161
      if (other.isSetSuccess()) {
15162
        List<Address> __this__success = new ArrayList<Address>();
15163
        for (Address other_element : other.success) {
15164
          __this__success.add(new Address(other_element));
15165
        }
15166
        this.success = __this__success;
15167
      }
15168
      if (other.isSetUcx()) {
15169
        this.ucx = new UserContextException(other.ucx);
15170
      }
15171
    }
15172
 
15173
    public getAllAddressesForUser_result deepCopy() {
15174
      return new getAllAddressesForUser_result(this);
15175
    }
15176
 
15177
    @Deprecated
15178
    public getAllAddressesForUser_result clone() {
15179
      return new getAllAddressesForUser_result(this);
15180
    }
15181
 
15182
    public int getSuccessSize() {
15183
      return (this.success == null) ? 0 : this.success.size();
15184
    }
15185
 
15186
    public java.util.Iterator<Address> getSuccessIterator() {
15187
      return (this.success == null) ? null : this.success.iterator();
15188
    }
15189
 
15190
    public void addToSuccess(Address elem) {
15191
      if (this.success == null) {
15192
        this.success = new ArrayList<Address>();
15193
      }
15194
      this.success.add(elem);
15195
    }
15196
 
15197
    public List<Address> getSuccess() {
15198
      return this.success;
15199
    }
15200
 
15201
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
15202
      this.success = success;
15203
      return this;
15204
    }
15205
 
15206
    public void unsetSuccess() {
15207
      this.success = null;
15208
    }
15209
 
15210
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15211
    public boolean isSetSuccess() {
15212
      return this.success != null;
15213
    }
15214
 
15215
    public void setSuccessIsSet(boolean value) {
15216
      if (!value) {
15217
        this.success = null;
15218
      }
15219
    }
15220
 
15221
    public UserContextException getUcx() {
15222
      return this.ucx;
15223
    }
15224
 
15225
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
15226
      this.ucx = ucx;
15227
      return this;
15228
    }
15229
 
15230
    public void unsetUcx() {
15231
      this.ucx = null;
15232
    }
15233
 
15234
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15235
    public boolean isSetUcx() {
15236
      return this.ucx != null;
15237
    }
15238
 
15239
    public void setUcxIsSet(boolean value) {
15240
      if (!value) {
15241
        this.ucx = null;
15242
      }
15243
    }
15244
 
15245
    public void setFieldValue(_Fields field, Object value) {
15246
      switch (field) {
15247
      case SUCCESS:
15248
        if (value == null) {
15249
          unsetSuccess();
15250
        } else {
15251
          setSuccess((List<Address>)value);
15252
        }
15253
        break;
15254
 
15255
      case UCX:
15256
        if (value == null) {
15257
          unsetUcx();
15258
        } else {
15259
          setUcx((UserContextException)value);
15260
        }
15261
        break;
15262
 
15263
      }
15264
    }
15265
 
15266
    public void setFieldValue(int fieldID, Object value) {
15267
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15268
    }
15269
 
15270
    public Object getFieldValue(_Fields field) {
15271
      switch (field) {
15272
      case SUCCESS:
15273
        return getSuccess();
15274
 
15275
      case UCX:
15276
        return getUcx();
15277
 
15278
      }
15279
      throw new IllegalStateException();
15280
    }
15281
 
15282
    public Object getFieldValue(int fieldId) {
15283
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15284
    }
15285
 
15286
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15287
    public boolean isSet(_Fields field) {
15288
      switch (field) {
15289
      case SUCCESS:
15290
        return isSetSuccess();
15291
      case UCX:
15292
        return isSetUcx();
15293
      }
15294
      throw new IllegalStateException();
15295
    }
15296
 
15297
    public boolean isSet(int fieldID) {
15298
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15299
    }
15300
 
15301
    @Override
15302
    public boolean equals(Object that) {
15303
      if (that == null)
15304
        return false;
15305
      if (that instanceof getAllAddressesForUser_result)
15306
        return this.equals((getAllAddressesForUser_result)that);
15307
      return false;
15308
    }
15309
 
15310
    public boolean equals(getAllAddressesForUser_result that) {
15311
      if (that == null)
15312
        return false;
15313
 
15314
      boolean this_present_success = true && this.isSetSuccess();
15315
      boolean that_present_success = true && that.isSetSuccess();
15316
      if (this_present_success || that_present_success) {
15317
        if (!(this_present_success && that_present_success))
15318
          return false;
15319
        if (!this.success.equals(that.success))
15320
          return false;
15321
      }
15322
 
15323
      boolean this_present_ucx = true && this.isSetUcx();
15324
      boolean that_present_ucx = true && that.isSetUcx();
15325
      if (this_present_ucx || that_present_ucx) {
15326
        if (!(this_present_ucx && that_present_ucx))
15327
          return false;
15328
        if (!this.ucx.equals(that.ucx))
15329
          return false;
15330
      }
15331
 
15332
      return true;
15333
    }
15334
 
15335
    @Override
15336
    public int hashCode() {
15337
      return 0;
15338
    }
15339
 
15340
    public int compareTo(getAllAddressesForUser_result other) {
15341
      if (!getClass().equals(other.getClass())) {
15342
        return getClass().getName().compareTo(other.getClass().getName());
15343
      }
15344
 
15345
      int lastComparison = 0;
15346
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
15347
 
15348
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15349
      if (lastComparison != 0) {
15350
        return lastComparison;
15351
      }
15352
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15353
      if (lastComparison != 0) {
15354
        return lastComparison;
15355
      }
15356
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15357
      if (lastComparison != 0) {
15358
        return lastComparison;
15359
      }
15360
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15361
      if (lastComparison != 0) {
15362
        return lastComparison;
15363
      }
15364
      return 0;
15365
    }
15366
 
15367
    public void read(TProtocol iprot) throws TException {
15368
      TField field;
15369
      iprot.readStructBegin();
15370
      while (true)
15371
      {
15372
        field = iprot.readFieldBegin();
15373
        if (field.type == TType.STOP) { 
15374
          break;
15375
        }
15376
        _Fields fieldId = _Fields.findByThriftId(field.id);
15377
        if (fieldId == null) {
15378
          TProtocolUtil.skip(iprot, field.type);
15379
        } else {
15380
          switch (fieldId) {
15381
            case SUCCESS:
15382
              if (field.type == TType.LIST) {
15383
                {
771 rajveer 15384
                  TList _list16 = iprot.readListBegin();
15385
                  this.success = new ArrayList<Address>(_list16.size);
15386
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
593 rajveer 15387
                  {
771 rajveer 15388
                    Address _elem18;
15389
                    _elem18 = new Address();
15390
                    _elem18.read(iprot);
15391
                    this.success.add(_elem18);
593 rajveer 15392
                  }
15393
                  iprot.readListEnd();
15394
                }
15395
              } else { 
15396
                TProtocolUtil.skip(iprot, field.type);
15397
              }
15398
              break;
15399
            case UCX:
15400
              if (field.type == TType.STRUCT) {
15401
                this.ucx = new UserContextException();
15402
                this.ucx.read(iprot);
15403
              } else { 
15404
                TProtocolUtil.skip(iprot, field.type);
15405
              }
15406
              break;
15407
          }
15408
          iprot.readFieldEnd();
15409
        }
15410
      }
15411
      iprot.readStructEnd();
15412
      validate();
15413
    }
15414
 
15415
    public void write(TProtocol oprot) throws TException {
15416
      oprot.writeStructBegin(STRUCT_DESC);
15417
 
15418
      if (this.isSetSuccess()) {
15419
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15420
        {
15421
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 15422
          for (Address _iter19 : this.success)
593 rajveer 15423
          {
771 rajveer 15424
            _iter19.write(oprot);
593 rajveer 15425
          }
15426
          oprot.writeListEnd();
15427
        }
15428
        oprot.writeFieldEnd();
15429
      } else if (this.isSetUcx()) {
15430
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15431
        this.ucx.write(oprot);
15432
        oprot.writeFieldEnd();
15433
      }
15434
      oprot.writeFieldStop();
15435
      oprot.writeStructEnd();
15436
    }
15437
 
15438
    @Override
15439
    public String toString() {
15440
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
15441
      boolean first = true;
15442
 
15443
      sb.append("success:");
15444
      if (this.success == null) {
15445
        sb.append("null");
15446
      } else {
15447
        sb.append(this.success);
15448
      }
15449
      first = false;
15450
      if (!first) sb.append(", ");
15451
      sb.append("ucx:");
15452
      if (this.ucx == null) {
15453
        sb.append("null");
15454
      } else {
15455
        sb.append(this.ucx);
15456
      }
15457
      first = false;
15458
      sb.append(")");
15459
      return sb.toString();
15460
    }
15461
 
15462
    public void validate() throws TException {
15463
      // check for required fields
15464
    }
15465
 
15466
  }
15467
 
15468
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
15469
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
15470
 
15471
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15472
 
15473
    private long userId;
15474
 
15475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15476
    public enum _Fields implements TFieldIdEnum {
15477
      USER_ID((short)1, "userId");
15478
 
15479
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15480
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15481
 
15482
      static {
15483
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15484
          byId.put((int)field._thriftId, field);
15485
          byName.put(field.getFieldName(), field);
15486
        }
15487
      }
15488
 
15489
      /**
15490
       * Find the _Fields constant that matches fieldId, or null if its not found.
15491
       */
15492
      public static _Fields findByThriftId(int fieldId) {
15493
        return byId.get(fieldId);
15494
      }
15495
 
15496
      /**
15497
       * Find the _Fields constant that matches fieldId, throwing an exception
15498
       * if it is not found.
15499
       */
15500
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15501
        _Fields fields = findByThriftId(fieldId);
15502
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15503
        return fields;
15504
      }
15505
 
15506
      /**
15507
       * Find the _Fields constant that matches name, or null if its not found.
15508
       */
15509
      public static _Fields findByName(String name) {
15510
        return byName.get(name);
15511
      }
15512
 
15513
      private final short _thriftId;
15514
      private final String _fieldName;
15515
 
15516
      _Fields(short thriftId, String fieldName) {
15517
        _thriftId = thriftId;
15518
        _fieldName = fieldName;
15519
      }
15520
 
15521
      public short getThriftFieldId() {
15522
        return _thriftId;
15523
      }
15524
 
15525
      public String getFieldName() {
15526
        return _fieldName;
15527
      }
15528
    }
15529
 
15530
    // isset id assignments
15531
    private static final int __USERID_ISSET_ID = 0;
15532
    private BitSet __isset_bit_vector = new BitSet(1);
15533
 
15534
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15535
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15536
          new FieldValueMetaData(TType.I64)));
15537
    }});
15538
 
15539
    static {
15540
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
15541
    }
15542
 
15543
    public getDefaultAddressId_args() {
15544
    }
15545
 
15546
    public getDefaultAddressId_args(
15547
      long userId)
15548
    {
15549
      this();
15550
      this.userId = userId;
15551
      setUserIdIsSet(true);
15552
    }
15553
 
15554
    /**
15555
     * Performs a deep copy on <i>other</i>.
15556
     */
15557
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
15558
      __isset_bit_vector.clear();
15559
      __isset_bit_vector.or(other.__isset_bit_vector);
15560
      this.userId = other.userId;
15561
    }
15562
 
15563
    public getDefaultAddressId_args deepCopy() {
15564
      return new getDefaultAddressId_args(this);
15565
    }
15566
 
15567
    @Deprecated
15568
    public getDefaultAddressId_args clone() {
15569
      return new getDefaultAddressId_args(this);
15570
    }
15571
 
15572
    public long getUserId() {
15573
      return this.userId;
15574
    }
15575
 
15576
    public getDefaultAddressId_args setUserId(long userId) {
15577
      this.userId = userId;
15578
      setUserIdIsSet(true);
15579
      return this;
15580
    }
15581
 
15582
    public void unsetUserId() {
15583
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15584
    }
15585
 
15586
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15587
    public boolean isSetUserId() {
15588
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15589
    }
15590
 
15591
    public void setUserIdIsSet(boolean value) {
15592
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15593
    }
15594
 
15595
    public void setFieldValue(_Fields field, Object value) {
15596
      switch (field) {
15597
      case USER_ID:
15598
        if (value == null) {
15599
          unsetUserId();
15600
        } else {
15601
          setUserId((Long)value);
15602
        }
15603
        break;
15604
 
15605
      }
15606
    }
15607
 
15608
    public void setFieldValue(int fieldID, Object value) {
15609
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15610
    }
15611
 
15612
    public Object getFieldValue(_Fields field) {
15613
      switch (field) {
15614
      case USER_ID:
15615
        return new Long(getUserId());
15616
 
15617
      }
15618
      throw new IllegalStateException();
15619
    }
15620
 
15621
    public Object getFieldValue(int fieldId) {
15622
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15623
    }
15624
 
15625
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15626
    public boolean isSet(_Fields field) {
15627
      switch (field) {
15628
      case USER_ID:
15629
        return isSetUserId();
15630
      }
15631
      throw new IllegalStateException();
15632
    }
15633
 
15634
    public boolean isSet(int fieldID) {
15635
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15636
    }
15637
 
15638
    @Override
15639
    public boolean equals(Object that) {
15640
      if (that == null)
15641
        return false;
15642
      if (that instanceof getDefaultAddressId_args)
15643
        return this.equals((getDefaultAddressId_args)that);
15644
      return false;
15645
    }
15646
 
15647
    public boolean equals(getDefaultAddressId_args that) {
15648
      if (that == null)
15649
        return false;
15650
 
15651
      boolean this_present_userId = true;
15652
      boolean that_present_userId = true;
15653
      if (this_present_userId || that_present_userId) {
15654
        if (!(this_present_userId && that_present_userId))
15655
          return false;
15656
        if (this.userId != that.userId)
15657
          return false;
15658
      }
15659
 
15660
      return true;
15661
    }
15662
 
15663
    @Override
15664
    public int hashCode() {
15665
      return 0;
15666
    }
15667
 
15668
    public int compareTo(getDefaultAddressId_args other) {
15669
      if (!getClass().equals(other.getClass())) {
15670
        return getClass().getName().compareTo(other.getClass().getName());
15671
      }
15672
 
15673
      int lastComparison = 0;
15674
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
15675
 
15676
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15677
      if (lastComparison != 0) {
15678
        return lastComparison;
15679
      }
15680
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15681
      if (lastComparison != 0) {
15682
        return lastComparison;
15683
      }
15684
      return 0;
15685
    }
15686
 
15687
    public void read(TProtocol iprot) throws TException {
15688
      TField field;
15689
      iprot.readStructBegin();
15690
      while (true)
15691
      {
15692
        field = iprot.readFieldBegin();
15693
        if (field.type == TType.STOP) { 
15694
          break;
15695
        }
15696
        _Fields fieldId = _Fields.findByThriftId(field.id);
15697
        if (fieldId == null) {
15698
          TProtocolUtil.skip(iprot, field.type);
15699
        } else {
15700
          switch (fieldId) {
15701
            case USER_ID:
15702
              if (field.type == TType.I64) {
15703
                this.userId = iprot.readI64();
15704
                setUserIdIsSet(true);
15705
              } else { 
15706
                TProtocolUtil.skip(iprot, field.type);
15707
              }
15708
              break;
15709
          }
15710
          iprot.readFieldEnd();
15711
        }
15712
      }
15713
      iprot.readStructEnd();
15714
      validate();
15715
    }
15716
 
15717
    public void write(TProtocol oprot) throws TException {
15718
      validate();
15719
 
15720
      oprot.writeStructBegin(STRUCT_DESC);
15721
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15722
      oprot.writeI64(this.userId);
15723
      oprot.writeFieldEnd();
15724
      oprot.writeFieldStop();
15725
      oprot.writeStructEnd();
15726
    }
15727
 
15728
    @Override
15729
    public String toString() {
15730
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
15731
      boolean first = true;
15732
 
15733
      sb.append("userId:");
15734
      sb.append(this.userId);
15735
      first = false;
15736
      sb.append(")");
15737
      return sb.toString();
15738
    }
15739
 
15740
    public void validate() throws TException {
15741
      // check for required fields
15742
    }
15743
 
15744
  }
15745
 
15746
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
15747
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
15748
 
15749
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15750
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15751
 
15752
    private long success;
15753
    private UserContextException ucx;
15754
 
15755
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15756
    public enum _Fields implements TFieldIdEnum {
15757
      SUCCESS((short)0, "success"),
15758
      UCX((short)1, "ucx");
15759
 
15760
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15761
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15762
 
15763
      static {
15764
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15765
          byId.put((int)field._thriftId, field);
15766
          byName.put(field.getFieldName(), field);
15767
        }
15768
      }
15769
 
15770
      /**
15771
       * Find the _Fields constant that matches fieldId, or null if its not found.
15772
       */
15773
      public static _Fields findByThriftId(int fieldId) {
15774
        return byId.get(fieldId);
15775
      }
15776
 
15777
      /**
15778
       * Find the _Fields constant that matches fieldId, throwing an exception
15779
       * if it is not found.
15780
       */
15781
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15782
        _Fields fields = findByThriftId(fieldId);
15783
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15784
        return fields;
15785
      }
15786
 
15787
      /**
15788
       * Find the _Fields constant that matches name, or null if its not found.
15789
       */
15790
      public static _Fields findByName(String name) {
15791
        return byName.get(name);
15792
      }
15793
 
15794
      private final short _thriftId;
15795
      private final String _fieldName;
15796
 
15797
      _Fields(short thriftId, String fieldName) {
15798
        _thriftId = thriftId;
15799
        _fieldName = fieldName;
15800
      }
15801
 
15802
      public short getThriftFieldId() {
15803
        return _thriftId;
15804
      }
15805
 
15806
      public String getFieldName() {
15807
        return _fieldName;
15808
      }
15809
    }
15810
 
15811
    // isset id assignments
15812
    private static final int __SUCCESS_ISSET_ID = 0;
15813
    private BitSet __isset_bit_vector = new BitSet(1);
15814
 
15815
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15816
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15817
          new FieldValueMetaData(TType.I64)));
15818
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15819
          new FieldValueMetaData(TType.STRUCT)));
15820
    }});
15821
 
15822
    static {
15823
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
15824
    }
15825
 
15826
    public getDefaultAddressId_result() {
15827
    }
15828
 
15829
    public getDefaultAddressId_result(
15830
      long success,
15831
      UserContextException ucx)
15832
    {
15833
      this();
15834
      this.success = success;
15835
      setSuccessIsSet(true);
15836
      this.ucx = ucx;
15837
    }
15838
 
15839
    /**
15840
     * Performs a deep copy on <i>other</i>.
15841
     */
15842
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
15843
      __isset_bit_vector.clear();
15844
      __isset_bit_vector.or(other.__isset_bit_vector);
15845
      this.success = other.success;
15846
      if (other.isSetUcx()) {
15847
        this.ucx = new UserContextException(other.ucx);
15848
      }
15849
    }
15850
 
15851
    public getDefaultAddressId_result deepCopy() {
15852
      return new getDefaultAddressId_result(this);
15853
    }
15854
 
15855
    @Deprecated
15856
    public getDefaultAddressId_result clone() {
15857
      return new getDefaultAddressId_result(this);
15858
    }
15859
 
15860
    public long getSuccess() {
15861
      return this.success;
15862
    }
15863
 
15864
    public getDefaultAddressId_result setSuccess(long success) {
15865
      this.success = success;
15866
      setSuccessIsSet(true);
15867
      return this;
15868
    }
15869
 
15870
    public void unsetSuccess() {
15871
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15872
    }
15873
 
15874
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15875
    public boolean isSetSuccess() {
15876
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15877
    }
15878
 
15879
    public void setSuccessIsSet(boolean value) {
15880
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15881
    }
15882
 
15883
    public UserContextException getUcx() {
15884
      return this.ucx;
15885
    }
15886
 
15887
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
15888
      this.ucx = ucx;
15889
      return this;
15890
    }
15891
 
15892
    public void unsetUcx() {
15893
      this.ucx = null;
15894
    }
15895
 
15896
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15897
    public boolean isSetUcx() {
15898
      return this.ucx != null;
15899
    }
15900
 
15901
    public void setUcxIsSet(boolean value) {
15902
      if (!value) {
15903
        this.ucx = null;
15904
      }
15905
    }
15906
 
15907
    public void setFieldValue(_Fields field, Object value) {
15908
      switch (field) {
15909
      case SUCCESS:
15910
        if (value == null) {
15911
          unsetSuccess();
15912
        } else {
15913
          setSuccess((Long)value);
15914
        }
15915
        break;
15916
 
15917
      case UCX:
15918
        if (value == null) {
15919
          unsetUcx();
15920
        } else {
15921
          setUcx((UserContextException)value);
15922
        }
15923
        break;
15924
 
15925
      }
15926
    }
15927
 
15928
    public void setFieldValue(int fieldID, Object value) {
15929
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15930
    }
15931
 
15932
    public Object getFieldValue(_Fields field) {
15933
      switch (field) {
15934
      case SUCCESS:
15935
        return new Long(getSuccess());
15936
 
15937
      case UCX:
15938
        return getUcx();
15939
 
15940
      }
15941
      throw new IllegalStateException();
15942
    }
15943
 
15944
    public Object getFieldValue(int fieldId) {
15945
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15946
    }
15947
 
15948
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15949
    public boolean isSet(_Fields field) {
15950
      switch (field) {
15951
      case SUCCESS:
15952
        return isSetSuccess();
15953
      case UCX:
15954
        return isSetUcx();
15955
      }
15956
      throw new IllegalStateException();
15957
    }
15958
 
15959
    public boolean isSet(int fieldID) {
15960
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15961
    }
15962
 
15963
    @Override
15964
    public boolean equals(Object that) {
15965
      if (that == null)
15966
        return false;
15967
      if (that instanceof getDefaultAddressId_result)
15968
        return this.equals((getDefaultAddressId_result)that);
15969
      return false;
15970
    }
15971
 
15972
    public boolean equals(getDefaultAddressId_result that) {
15973
      if (that == null)
15974
        return false;
15975
 
15976
      boolean this_present_success = true;
15977
      boolean that_present_success = true;
15978
      if (this_present_success || that_present_success) {
15979
        if (!(this_present_success && that_present_success))
15980
          return false;
15981
        if (this.success != that.success)
15982
          return false;
15983
      }
15984
 
15985
      boolean this_present_ucx = true && this.isSetUcx();
15986
      boolean that_present_ucx = true && that.isSetUcx();
15987
      if (this_present_ucx || that_present_ucx) {
15988
        if (!(this_present_ucx && that_present_ucx))
15989
          return false;
15990
        if (!this.ucx.equals(that.ucx))
15991
          return false;
15992
      }
15993
 
15994
      return true;
15995
    }
15996
 
15997
    @Override
15998
    public int hashCode() {
15999
      return 0;
16000
    }
16001
 
16002
    public int compareTo(getDefaultAddressId_result other) {
16003
      if (!getClass().equals(other.getClass())) {
16004
        return getClass().getName().compareTo(other.getClass().getName());
16005
      }
16006
 
16007
      int lastComparison = 0;
16008
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
16009
 
16010
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16011
      if (lastComparison != 0) {
16012
        return lastComparison;
16013
      }
16014
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16015
      if (lastComparison != 0) {
16016
        return lastComparison;
16017
      }
16018
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16019
      if (lastComparison != 0) {
16020
        return lastComparison;
16021
      }
16022
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16023
      if (lastComparison != 0) {
16024
        return lastComparison;
16025
      }
16026
      return 0;
16027
    }
16028
 
16029
    public void read(TProtocol iprot) throws TException {
16030
      TField field;
16031
      iprot.readStructBegin();
16032
      while (true)
16033
      {
16034
        field = iprot.readFieldBegin();
16035
        if (field.type == TType.STOP) { 
16036
          break;
16037
        }
16038
        _Fields fieldId = _Fields.findByThriftId(field.id);
16039
        if (fieldId == null) {
16040
          TProtocolUtil.skip(iprot, field.type);
16041
        } else {
16042
          switch (fieldId) {
16043
            case SUCCESS:
16044
              if (field.type == TType.I64) {
16045
                this.success = iprot.readI64();
16046
                setSuccessIsSet(true);
16047
              } else { 
16048
                TProtocolUtil.skip(iprot, field.type);
16049
              }
16050
              break;
16051
            case UCX:
16052
              if (field.type == TType.STRUCT) {
16053
                this.ucx = new UserContextException();
16054
                this.ucx.read(iprot);
16055
              } else { 
16056
                TProtocolUtil.skip(iprot, field.type);
16057
              }
16058
              break;
16059
          }
16060
          iprot.readFieldEnd();
16061
        }
16062
      }
16063
      iprot.readStructEnd();
16064
      validate();
16065
    }
16066
 
16067
    public void write(TProtocol oprot) throws TException {
16068
      oprot.writeStructBegin(STRUCT_DESC);
16069
 
16070
      if (this.isSetSuccess()) {
16071
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16072
        oprot.writeI64(this.success);
16073
        oprot.writeFieldEnd();
16074
      } else if (this.isSetUcx()) {
16075
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16076
        this.ucx.write(oprot);
16077
        oprot.writeFieldEnd();
16078
      }
16079
      oprot.writeFieldStop();
16080
      oprot.writeStructEnd();
16081
    }
16082
 
16083
    @Override
16084
    public String toString() {
16085
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
16086
      boolean first = true;
16087
 
16088
      sb.append("success:");
16089
      sb.append(this.success);
16090
      first = false;
16091
      if (!first) sb.append(", ");
16092
      sb.append("ucx:");
16093
      if (this.ucx == null) {
16094
        sb.append("null");
16095
      } else {
16096
        sb.append(this.ucx);
16097
      }
16098
      first = false;
16099
      sb.append(")");
16100
      return sb.toString();
16101
    }
16102
 
16103
    public void validate() throws TException {
16104
      // check for required fields
16105
    }
16106
 
16107
  }
16108
 
784 rajveer 16109
  public static class getDefaultPincode_args implements TBase<getDefaultPincode_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_args>   {
16110
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_args");
16111
 
16112
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
16113
 
16114
    private long userId;
16115
 
16116
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16117
    public enum _Fields implements TFieldIdEnum {
16118
      USER_ID((short)1, "userId");
16119
 
16120
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16121
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16122
 
16123
      static {
16124
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16125
          byId.put((int)field._thriftId, field);
16126
          byName.put(field.getFieldName(), field);
16127
        }
16128
      }
16129
 
16130
      /**
16131
       * Find the _Fields constant that matches fieldId, or null if its not found.
16132
       */
16133
      public static _Fields findByThriftId(int fieldId) {
16134
        return byId.get(fieldId);
16135
      }
16136
 
16137
      /**
16138
       * Find the _Fields constant that matches fieldId, throwing an exception
16139
       * if it is not found.
16140
       */
16141
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16142
        _Fields fields = findByThriftId(fieldId);
16143
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16144
        return fields;
16145
      }
16146
 
16147
      /**
16148
       * Find the _Fields constant that matches name, or null if its not found.
16149
       */
16150
      public static _Fields findByName(String name) {
16151
        return byName.get(name);
16152
      }
16153
 
16154
      private final short _thriftId;
16155
      private final String _fieldName;
16156
 
16157
      _Fields(short thriftId, String fieldName) {
16158
        _thriftId = thriftId;
16159
        _fieldName = fieldName;
16160
      }
16161
 
16162
      public short getThriftFieldId() {
16163
        return _thriftId;
16164
      }
16165
 
16166
      public String getFieldName() {
16167
        return _fieldName;
16168
      }
16169
    }
16170
 
16171
    // isset id assignments
16172
    private static final int __USERID_ISSET_ID = 0;
16173
    private BitSet __isset_bit_vector = new BitSet(1);
16174
 
16175
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16176
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
16177
          new FieldValueMetaData(TType.I64)));
16178
    }});
16179
 
16180
    static {
16181
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_args.class, metaDataMap);
16182
    }
16183
 
16184
    public getDefaultPincode_args() {
16185
    }
16186
 
16187
    public getDefaultPincode_args(
16188
      long userId)
16189
    {
16190
      this();
16191
      this.userId = userId;
16192
      setUserIdIsSet(true);
16193
    }
16194
 
16195
    /**
16196
     * Performs a deep copy on <i>other</i>.
16197
     */
16198
    public getDefaultPincode_args(getDefaultPincode_args other) {
16199
      __isset_bit_vector.clear();
16200
      __isset_bit_vector.or(other.__isset_bit_vector);
16201
      this.userId = other.userId;
16202
    }
16203
 
16204
    public getDefaultPincode_args deepCopy() {
16205
      return new getDefaultPincode_args(this);
16206
    }
16207
 
16208
    @Deprecated
16209
    public getDefaultPincode_args clone() {
16210
      return new getDefaultPincode_args(this);
16211
    }
16212
 
16213
    public long getUserId() {
16214
      return this.userId;
16215
    }
16216
 
16217
    public getDefaultPincode_args setUserId(long userId) {
16218
      this.userId = userId;
16219
      setUserIdIsSet(true);
16220
      return this;
16221
    }
16222
 
16223
    public void unsetUserId() {
16224
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16225
    }
16226
 
16227
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16228
    public boolean isSetUserId() {
16229
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16230
    }
16231
 
16232
    public void setUserIdIsSet(boolean value) {
16233
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16234
    }
16235
 
16236
    public void setFieldValue(_Fields field, Object value) {
16237
      switch (field) {
16238
      case USER_ID:
16239
        if (value == null) {
16240
          unsetUserId();
16241
        } else {
16242
          setUserId((Long)value);
16243
        }
16244
        break;
16245
 
16246
      }
16247
    }
16248
 
16249
    public void setFieldValue(int fieldID, Object value) {
16250
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16251
    }
16252
 
16253
    public Object getFieldValue(_Fields field) {
16254
      switch (field) {
16255
      case USER_ID:
16256
        return new Long(getUserId());
16257
 
16258
      }
16259
      throw new IllegalStateException();
16260
    }
16261
 
16262
    public Object getFieldValue(int fieldId) {
16263
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16264
    }
16265
 
16266
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16267
    public boolean isSet(_Fields field) {
16268
      switch (field) {
16269
      case USER_ID:
16270
        return isSetUserId();
16271
      }
16272
      throw new IllegalStateException();
16273
    }
16274
 
16275
    public boolean isSet(int fieldID) {
16276
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16277
    }
16278
 
16279
    @Override
16280
    public boolean equals(Object that) {
16281
      if (that == null)
16282
        return false;
16283
      if (that instanceof getDefaultPincode_args)
16284
        return this.equals((getDefaultPincode_args)that);
16285
      return false;
16286
    }
16287
 
16288
    public boolean equals(getDefaultPincode_args that) {
16289
      if (that == null)
16290
        return false;
16291
 
16292
      boolean this_present_userId = true;
16293
      boolean that_present_userId = true;
16294
      if (this_present_userId || that_present_userId) {
16295
        if (!(this_present_userId && that_present_userId))
16296
          return false;
16297
        if (this.userId != that.userId)
16298
          return false;
16299
      }
16300
 
16301
      return true;
16302
    }
16303
 
16304
    @Override
16305
    public int hashCode() {
16306
      return 0;
16307
    }
16308
 
16309
    public int compareTo(getDefaultPincode_args other) {
16310
      if (!getClass().equals(other.getClass())) {
16311
        return getClass().getName().compareTo(other.getClass().getName());
16312
      }
16313
 
16314
      int lastComparison = 0;
16315
      getDefaultPincode_args typedOther = (getDefaultPincode_args)other;
16316
 
16317
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
16318
      if (lastComparison != 0) {
16319
        return lastComparison;
16320
      }
16321
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
16322
      if (lastComparison != 0) {
16323
        return lastComparison;
16324
      }
16325
      return 0;
16326
    }
16327
 
16328
    public void read(TProtocol iprot) throws TException {
16329
      TField field;
16330
      iprot.readStructBegin();
16331
      while (true)
16332
      {
16333
        field = iprot.readFieldBegin();
16334
        if (field.type == TType.STOP) { 
16335
          break;
16336
        }
16337
        _Fields fieldId = _Fields.findByThriftId(field.id);
16338
        if (fieldId == null) {
16339
          TProtocolUtil.skip(iprot, field.type);
16340
        } else {
16341
          switch (fieldId) {
16342
            case USER_ID:
16343
              if (field.type == TType.I64) {
16344
                this.userId = iprot.readI64();
16345
                setUserIdIsSet(true);
16346
              } else { 
16347
                TProtocolUtil.skip(iprot, field.type);
16348
              }
16349
              break;
16350
          }
16351
          iprot.readFieldEnd();
16352
        }
16353
      }
16354
      iprot.readStructEnd();
16355
      validate();
16356
    }
16357
 
16358
    public void write(TProtocol oprot) throws TException {
16359
      validate();
16360
 
16361
      oprot.writeStructBegin(STRUCT_DESC);
16362
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
16363
      oprot.writeI64(this.userId);
16364
      oprot.writeFieldEnd();
16365
      oprot.writeFieldStop();
16366
      oprot.writeStructEnd();
16367
    }
16368
 
16369
    @Override
16370
    public String toString() {
16371
      StringBuilder sb = new StringBuilder("getDefaultPincode_args(");
16372
      boolean first = true;
16373
 
16374
      sb.append("userId:");
16375
      sb.append(this.userId);
16376
      first = false;
16377
      sb.append(")");
16378
      return sb.toString();
16379
    }
16380
 
16381
    public void validate() throws TException {
16382
      // check for required fields
16383
    }
16384
 
16385
  }
16386
 
16387
  public static class getDefaultPincode_result implements TBase<getDefaultPincode_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_result>   {
16388
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_result");
16389
 
16390
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
16391
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16392
 
16393
    private String success;
16394
    private UserContextException ucx;
16395
 
16396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16397
    public enum _Fields implements TFieldIdEnum {
16398
      SUCCESS((short)0, "success"),
16399
      UCX((short)1, "ucx");
16400
 
16401
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16402
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16403
 
16404
      static {
16405
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16406
          byId.put((int)field._thriftId, field);
16407
          byName.put(field.getFieldName(), field);
16408
        }
16409
      }
16410
 
16411
      /**
16412
       * Find the _Fields constant that matches fieldId, or null if its not found.
16413
       */
16414
      public static _Fields findByThriftId(int fieldId) {
16415
        return byId.get(fieldId);
16416
      }
16417
 
16418
      /**
16419
       * Find the _Fields constant that matches fieldId, throwing an exception
16420
       * if it is not found.
16421
       */
16422
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16423
        _Fields fields = findByThriftId(fieldId);
16424
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16425
        return fields;
16426
      }
16427
 
16428
      /**
16429
       * Find the _Fields constant that matches name, or null if its not found.
16430
       */
16431
      public static _Fields findByName(String name) {
16432
        return byName.get(name);
16433
      }
16434
 
16435
      private final short _thriftId;
16436
      private final String _fieldName;
16437
 
16438
      _Fields(short thriftId, String fieldName) {
16439
        _thriftId = thriftId;
16440
        _fieldName = fieldName;
16441
      }
16442
 
16443
      public short getThriftFieldId() {
16444
        return _thriftId;
16445
      }
16446
 
16447
      public String getFieldName() {
16448
        return _fieldName;
16449
      }
16450
    }
16451
 
16452
    // isset id assignments
16453
 
16454
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16455
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16456
          new FieldValueMetaData(TType.STRING)));
16457
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16458
          new FieldValueMetaData(TType.STRUCT)));
16459
    }});
16460
 
16461
    static {
16462
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_result.class, metaDataMap);
16463
    }
16464
 
16465
    public getDefaultPincode_result() {
16466
    }
16467
 
16468
    public getDefaultPincode_result(
16469
      String success,
16470
      UserContextException ucx)
16471
    {
16472
      this();
16473
      this.success = success;
16474
      this.ucx = ucx;
16475
    }
16476
 
16477
    /**
16478
     * Performs a deep copy on <i>other</i>.
16479
     */
16480
    public getDefaultPincode_result(getDefaultPincode_result other) {
16481
      if (other.isSetSuccess()) {
16482
        this.success = other.success;
16483
      }
16484
      if (other.isSetUcx()) {
16485
        this.ucx = new UserContextException(other.ucx);
16486
      }
16487
    }
16488
 
16489
    public getDefaultPincode_result deepCopy() {
16490
      return new getDefaultPincode_result(this);
16491
    }
16492
 
16493
    @Deprecated
16494
    public getDefaultPincode_result clone() {
16495
      return new getDefaultPincode_result(this);
16496
    }
16497
 
16498
    public String getSuccess() {
16499
      return this.success;
16500
    }
16501
 
16502
    public getDefaultPincode_result setSuccess(String success) {
16503
      this.success = success;
16504
      return this;
16505
    }
16506
 
16507
    public void unsetSuccess() {
16508
      this.success = null;
16509
    }
16510
 
16511
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16512
    public boolean isSetSuccess() {
16513
      return this.success != null;
16514
    }
16515
 
16516
    public void setSuccessIsSet(boolean value) {
16517
      if (!value) {
16518
        this.success = null;
16519
      }
16520
    }
16521
 
16522
    public UserContextException getUcx() {
16523
      return this.ucx;
16524
    }
16525
 
16526
    public getDefaultPincode_result setUcx(UserContextException ucx) {
16527
      this.ucx = ucx;
16528
      return this;
16529
    }
16530
 
16531
    public void unsetUcx() {
16532
      this.ucx = null;
16533
    }
16534
 
16535
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
16536
    public boolean isSetUcx() {
16537
      return this.ucx != null;
16538
    }
16539
 
16540
    public void setUcxIsSet(boolean value) {
16541
      if (!value) {
16542
        this.ucx = null;
16543
      }
16544
    }
16545
 
16546
    public void setFieldValue(_Fields field, Object value) {
16547
      switch (field) {
16548
      case SUCCESS:
16549
        if (value == null) {
16550
          unsetSuccess();
16551
        } else {
16552
          setSuccess((String)value);
16553
        }
16554
        break;
16555
 
16556
      case UCX:
16557
        if (value == null) {
16558
          unsetUcx();
16559
        } else {
16560
          setUcx((UserContextException)value);
16561
        }
16562
        break;
16563
 
16564
      }
16565
    }
16566
 
16567
    public void setFieldValue(int fieldID, Object value) {
16568
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16569
    }
16570
 
16571
    public Object getFieldValue(_Fields field) {
16572
      switch (field) {
16573
      case SUCCESS:
16574
        return getSuccess();
16575
 
16576
      case UCX:
16577
        return getUcx();
16578
 
16579
      }
16580
      throw new IllegalStateException();
16581
    }
16582
 
16583
    public Object getFieldValue(int fieldId) {
16584
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16585
    }
16586
 
16587
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16588
    public boolean isSet(_Fields field) {
16589
      switch (field) {
16590
      case SUCCESS:
16591
        return isSetSuccess();
16592
      case UCX:
16593
        return isSetUcx();
16594
      }
16595
      throw new IllegalStateException();
16596
    }
16597
 
16598
    public boolean isSet(int fieldID) {
16599
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16600
    }
16601
 
16602
    @Override
16603
    public boolean equals(Object that) {
16604
      if (that == null)
16605
        return false;
16606
      if (that instanceof getDefaultPincode_result)
16607
        return this.equals((getDefaultPincode_result)that);
16608
      return false;
16609
    }
16610
 
16611
    public boolean equals(getDefaultPincode_result that) {
16612
      if (that == null)
16613
        return false;
16614
 
16615
      boolean this_present_success = true && this.isSetSuccess();
16616
      boolean that_present_success = true && that.isSetSuccess();
16617
      if (this_present_success || that_present_success) {
16618
        if (!(this_present_success && that_present_success))
16619
          return false;
16620
        if (!this.success.equals(that.success))
16621
          return false;
16622
      }
16623
 
16624
      boolean this_present_ucx = true && this.isSetUcx();
16625
      boolean that_present_ucx = true && that.isSetUcx();
16626
      if (this_present_ucx || that_present_ucx) {
16627
        if (!(this_present_ucx && that_present_ucx))
16628
          return false;
16629
        if (!this.ucx.equals(that.ucx))
16630
          return false;
16631
      }
16632
 
16633
      return true;
16634
    }
16635
 
16636
    @Override
16637
    public int hashCode() {
16638
      return 0;
16639
    }
16640
 
16641
    public int compareTo(getDefaultPincode_result other) {
16642
      if (!getClass().equals(other.getClass())) {
16643
        return getClass().getName().compareTo(other.getClass().getName());
16644
      }
16645
 
16646
      int lastComparison = 0;
16647
      getDefaultPincode_result typedOther = (getDefaultPincode_result)other;
16648
 
16649
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16650
      if (lastComparison != 0) {
16651
        return lastComparison;
16652
      }
16653
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16654
      if (lastComparison != 0) {
16655
        return lastComparison;
16656
      }
16657
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16658
      if (lastComparison != 0) {
16659
        return lastComparison;
16660
      }
16661
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16662
      if (lastComparison != 0) {
16663
        return lastComparison;
16664
      }
16665
      return 0;
16666
    }
16667
 
16668
    public void read(TProtocol iprot) throws TException {
16669
      TField field;
16670
      iprot.readStructBegin();
16671
      while (true)
16672
      {
16673
        field = iprot.readFieldBegin();
16674
        if (field.type == TType.STOP) { 
16675
          break;
16676
        }
16677
        _Fields fieldId = _Fields.findByThriftId(field.id);
16678
        if (fieldId == null) {
16679
          TProtocolUtil.skip(iprot, field.type);
16680
        } else {
16681
          switch (fieldId) {
16682
            case SUCCESS:
16683
              if (field.type == TType.STRING) {
16684
                this.success = iprot.readString();
16685
              } else { 
16686
                TProtocolUtil.skip(iprot, field.type);
16687
              }
16688
              break;
16689
            case UCX:
16690
              if (field.type == TType.STRUCT) {
16691
                this.ucx = new UserContextException();
16692
                this.ucx.read(iprot);
16693
              } else { 
16694
                TProtocolUtil.skip(iprot, field.type);
16695
              }
16696
              break;
16697
          }
16698
          iprot.readFieldEnd();
16699
        }
16700
      }
16701
      iprot.readStructEnd();
16702
      validate();
16703
    }
16704
 
16705
    public void write(TProtocol oprot) throws TException {
16706
      oprot.writeStructBegin(STRUCT_DESC);
16707
 
16708
      if (this.isSetSuccess()) {
16709
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16710
        oprot.writeString(this.success);
16711
        oprot.writeFieldEnd();
16712
      } else if (this.isSetUcx()) {
16713
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16714
        this.ucx.write(oprot);
16715
        oprot.writeFieldEnd();
16716
      }
16717
      oprot.writeFieldStop();
16718
      oprot.writeStructEnd();
16719
    }
16720
 
16721
    @Override
16722
    public String toString() {
16723
      StringBuilder sb = new StringBuilder("getDefaultPincode_result(");
16724
      boolean first = true;
16725
 
16726
      sb.append("success:");
16727
      if (this.success == null) {
16728
        sb.append("null");
16729
      } else {
16730
        sb.append(this.success);
16731
      }
16732
      first = false;
16733
      if (!first) sb.append(", ");
16734
      sb.append("ucx:");
16735
      if (this.ucx == null) {
16736
        sb.append("null");
16737
      } else {
16738
        sb.append(this.ucx);
16739
      }
16740
      first = false;
16741
      sb.append(")");
16742
      return sb.toString();
16743
    }
16744
 
16745
    public void validate() throws TException {
16746
      // check for required fields
16747
    }
16748
 
16749
  }
16750
 
1177 varun.gupt 16751
  public static class saveUserCommunication_args implements TBase<saveUserCommunication_args._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_args>   {
16752
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_args");
16753
 
16754
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
16755
    private static final TField REPLY_TO_FIELD_DESC = new TField("replyTo", TType.STRING, (short)2);
16756
    private static final TField COMMUNICATION_TYPE_FIELD_DESC = new TField("communicationType", TType.I64, (short)3);
16757
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)4);
16758
    private static final TField AIRWAYBILL_NO_FIELD_DESC = new TField("airwaybillNo", TType.STRING, (short)5);
16759
    private static final TField PRODUCT_NAME_FIELD_DESC = new TField("productName", TType.STRING, (short)6);
16760
    private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)7);
16761
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)8);
16762
 
16763
    private long userId;
16764
    private String replyTo;
16765
    private long communicationType;
16766
    private long orderId;
16767
    private String airwaybillNo;
16768
    private String productName;
16769
    private String subject;
16770
    private String message;
16771
 
16772
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16773
    public enum _Fields implements TFieldIdEnum {
16774
      USER_ID((short)1, "userId"),
16775
      REPLY_TO((short)2, "replyTo"),
16776
      COMMUNICATION_TYPE((short)3, "communicationType"),
16777
      ORDER_ID((short)4, "orderId"),
16778
      AIRWAYBILL_NO((short)5, "airwaybillNo"),
16779
      PRODUCT_NAME((short)6, "productName"),
16780
      SUBJECT((short)7, "subject"),
16781
      MESSAGE((short)8, "message");
16782
 
16783
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16784
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16785
 
16786
      static {
16787
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16788
          byId.put((int)field._thriftId, field);
16789
          byName.put(field.getFieldName(), field);
16790
        }
16791
      }
16792
 
16793
      /**
16794
       * Find the _Fields constant that matches fieldId, or null if its not found.
16795
       */
16796
      public static _Fields findByThriftId(int fieldId) {
16797
        return byId.get(fieldId);
16798
      }
16799
 
16800
      /**
16801
       * Find the _Fields constant that matches fieldId, throwing an exception
16802
       * if it is not found.
16803
       */
16804
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16805
        _Fields fields = findByThriftId(fieldId);
16806
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16807
        return fields;
16808
      }
16809
 
16810
      /**
16811
       * Find the _Fields constant that matches name, or null if its not found.
16812
       */
16813
      public static _Fields findByName(String name) {
16814
        return byName.get(name);
16815
      }
16816
 
16817
      private final short _thriftId;
16818
      private final String _fieldName;
16819
 
16820
      _Fields(short thriftId, String fieldName) {
16821
        _thriftId = thriftId;
16822
        _fieldName = fieldName;
16823
      }
16824
 
16825
      public short getThriftFieldId() {
16826
        return _thriftId;
16827
      }
16828
 
16829
      public String getFieldName() {
16830
        return _fieldName;
16831
      }
16832
    }
16833
 
16834
    // isset id assignments
16835
    private static final int __USERID_ISSET_ID = 0;
16836
    private static final int __COMMUNICATIONTYPE_ISSET_ID = 1;
16837
    private static final int __ORDERID_ISSET_ID = 2;
16838
    private BitSet __isset_bit_vector = new BitSet(3);
16839
 
16840
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16841
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
16842
          new FieldValueMetaData(TType.I64)));
16843
      put(_Fields.REPLY_TO, new FieldMetaData("replyTo", TFieldRequirementType.DEFAULT, 
16844
          new FieldValueMetaData(TType.STRING)));
16845
      put(_Fields.COMMUNICATION_TYPE, new FieldMetaData("communicationType", TFieldRequirementType.DEFAULT, 
16846
          new FieldValueMetaData(TType.I64)));
16847
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
16848
          new FieldValueMetaData(TType.I64)));
16849
      put(_Fields.AIRWAYBILL_NO, new FieldMetaData("airwaybillNo", TFieldRequirementType.DEFAULT, 
16850
          new FieldValueMetaData(TType.STRING)));
16851
      put(_Fields.PRODUCT_NAME, new FieldMetaData("productName", TFieldRequirementType.DEFAULT, 
16852
          new FieldValueMetaData(TType.STRING)));
16853
      put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
16854
          new FieldValueMetaData(TType.STRING)));
16855
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
16856
          new FieldValueMetaData(TType.STRING)));
16857
    }});
16858
 
16859
    static {
16860
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_args.class, metaDataMap);
16861
    }
16862
 
16863
    public saveUserCommunication_args() {
16864
    }
16865
 
16866
    public saveUserCommunication_args(
16867
      long userId,
16868
      String replyTo,
16869
      long communicationType,
16870
      long orderId,
16871
      String airwaybillNo,
16872
      String productName,
16873
      String subject,
16874
      String message)
16875
    {
16876
      this();
16877
      this.userId = userId;
16878
      setUserIdIsSet(true);
16879
      this.replyTo = replyTo;
16880
      this.communicationType = communicationType;
16881
      setCommunicationTypeIsSet(true);
16882
      this.orderId = orderId;
16883
      setOrderIdIsSet(true);
16884
      this.airwaybillNo = airwaybillNo;
16885
      this.productName = productName;
16886
      this.subject = subject;
16887
      this.message = message;
16888
    }
16889
 
16890
    /**
16891
     * Performs a deep copy on <i>other</i>.
16892
     */
16893
    public saveUserCommunication_args(saveUserCommunication_args other) {
16894
      __isset_bit_vector.clear();
16895
      __isset_bit_vector.or(other.__isset_bit_vector);
16896
      this.userId = other.userId;
16897
      if (other.isSetReplyTo()) {
16898
        this.replyTo = other.replyTo;
16899
      }
16900
      this.communicationType = other.communicationType;
16901
      this.orderId = other.orderId;
16902
      if (other.isSetAirwaybillNo()) {
16903
        this.airwaybillNo = other.airwaybillNo;
16904
      }
16905
      if (other.isSetProductName()) {
16906
        this.productName = other.productName;
16907
      }
16908
      if (other.isSetSubject()) {
16909
        this.subject = other.subject;
16910
      }
16911
      if (other.isSetMessage()) {
16912
        this.message = other.message;
16913
      }
16914
    }
16915
 
16916
    public saveUserCommunication_args deepCopy() {
16917
      return new saveUserCommunication_args(this);
16918
    }
16919
 
16920
    @Deprecated
16921
    public saveUserCommunication_args clone() {
16922
      return new saveUserCommunication_args(this);
16923
    }
16924
 
16925
    public long getUserId() {
16926
      return this.userId;
16927
    }
16928
 
16929
    public saveUserCommunication_args setUserId(long userId) {
16930
      this.userId = userId;
16931
      setUserIdIsSet(true);
16932
      return this;
16933
    }
16934
 
16935
    public void unsetUserId() {
16936
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16937
    }
16938
 
16939
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16940
    public boolean isSetUserId() {
16941
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16942
    }
16943
 
16944
    public void setUserIdIsSet(boolean value) {
16945
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16946
    }
16947
 
16948
    public String getReplyTo() {
16949
      return this.replyTo;
16950
    }
16951
 
16952
    public saveUserCommunication_args setReplyTo(String replyTo) {
16953
      this.replyTo = replyTo;
16954
      return this;
16955
    }
16956
 
16957
    public void unsetReplyTo() {
16958
      this.replyTo = null;
16959
    }
16960
 
16961
    /** Returns true if field replyTo is set (has been asigned a value) and false otherwise */
16962
    public boolean isSetReplyTo() {
16963
      return this.replyTo != null;
16964
    }
16965
 
16966
    public void setReplyToIsSet(boolean value) {
16967
      if (!value) {
16968
        this.replyTo = null;
16969
      }
16970
    }
16971
 
16972
    public long getCommunicationType() {
16973
      return this.communicationType;
16974
    }
16975
 
16976
    public saveUserCommunication_args setCommunicationType(long communicationType) {
16977
      this.communicationType = communicationType;
16978
      setCommunicationTypeIsSet(true);
16979
      return this;
16980
    }
16981
 
16982
    public void unsetCommunicationType() {
16983
      __isset_bit_vector.clear(__COMMUNICATIONTYPE_ISSET_ID);
16984
    }
16985
 
16986
    /** Returns true if field communicationType is set (has been asigned a value) and false otherwise */
16987
    public boolean isSetCommunicationType() {
16988
      return __isset_bit_vector.get(__COMMUNICATIONTYPE_ISSET_ID);
16989
    }
16990
 
16991
    public void setCommunicationTypeIsSet(boolean value) {
16992
      __isset_bit_vector.set(__COMMUNICATIONTYPE_ISSET_ID, value);
16993
    }
16994
 
16995
    public long getOrderId() {
16996
      return this.orderId;
16997
    }
16998
 
16999
    public saveUserCommunication_args setOrderId(long orderId) {
17000
      this.orderId = orderId;
17001
      setOrderIdIsSet(true);
17002
      return this;
17003
    }
17004
 
17005
    public void unsetOrderId() {
17006
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
17007
    }
17008
 
17009
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
17010
    public boolean isSetOrderId() {
17011
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
17012
    }
17013
 
17014
    public void setOrderIdIsSet(boolean value) {
17015
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
17016
    }
17017
 
17018
    public String getAirwaybillNo() {
17019
      return this.airwaybillNo;
17020
    }
17021
 
17022
    public saveUserCommunication_args setAirwaybillNo(String airwaybillNo) {
17023
      this.airwaybillNo = airwaybillNo;
17024
      return this;
17025
    }
17026
 
17027
    public void unsetAirwaybillNo() {
17028
      this.airwaybillNo = null;
17029
    }
17030
 
17031
    /** Returns true if field airwaybillNo is set (has been asigned a value) and false otherwise */
17032
    public boolean isSetAirwaybillNo() {
17033
      return this.airwaybillNo != null;
17034
    }
17035
 
17036
    public void setAirwaybillNoIsSet(boolean value) {
17037
      if (!value) {
17038
        this.airwaybillNo = null;
17039
      }
17040
    }
17041
 
17042
    public String getProductName() {
17043
      return this.productName;
17044
    }
17045
 
17046
    public saveUserCommunication_args setProductName(String productName) {
17047
      this.productName = productName;
17048
      return this;
17049
    }
17050
 
17051
    public void unsetProductName() {
17052
      this.productName = null;
17053
    }
17054
 
17055
    /** Returns true if field productName is set (has been asigned a value) and false otherwise */
17056
    public boolean isSetProductName() {
17057
      return this.productName != null;
17058
    }
17059
 
17060
    public void setProductNameIsSet(boolean value) {
17061
      if (!value) {
17062
        this.productName = null;
17063
      }
17064
    }
17065
 
17066
    public String getSubject() {
17067
      return this.subject;
17068
    }
17069
 
17070
    public saveUserCommunication_args setSubject(String subject) {
17071
      this.subject = subject;
17072
      return this;
17073
    }
17074
 
17075
    public void unsetSubject() {
17076
      this.subject = null;
17077
    }
17078
 
17079
    /** Returns true if field subject is set (has been asigned a value) and false otherwise */
17080
    public boolean isSetSubject() {
17081
      return this.subject != null;
17082
    }
17083
 
17084
    public void setSubjectIsSet(boolean value) {
17085
      if (!value) {
17086
        this.subject = null;
17087
      }
17088
    }
17089
 
17090
    public String getMessage() {
17091
      return this.message;
17092
    }
17093
 
17094
    public saveUserCommunication_args setMessage(String message) {
17095
      this.message = message;
17096
      return this;
17097
    }
17098
 
17099
    public void unsetMessage() {
17100
      this.message = null;
17101
    }
17102
 
17103
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
17104
    public boolean isSetMessage() {
17105
      return this.message != null;
17106
    }
17107
 
17108
    public void setMessageIsSet(boolean value) {
17109
      if (!value) {
17110
        this.message = null;
17111
      }
17112
    }
17113
 
17114
    public void setFieldValue(_Fields field, Object value) {
17115
      switch (field) {
17116
      case USER_ID:
17117
        if (value == null) {
17118
          unsetUserId();
17119
        } else {
17120
          setUserId((Long)value);
17121
        }
17122
        break;
17123
 
17124
      case REPLY_TO:
17125
        if (value == null) {
17126
          unsetReplyTo();
17127
        } else {
17128
          setReplyTo((String)value);
17129
        }
17130
        break;
17131
 
17132
      case COMMUNICATION_TYPE:
17133
        if (value == null) {
17134
          unsetCommunicationType();
17135
        } else {
17136
          setCommunicationType((Long)value);
17137
        }
17138
        break;
17139
 
17140
      case ORDER_ID:
17141
        if (value == null) {
17142
          unsetOrderId();
17143
        } else {
17144
          setOrderId((Long)value);
17145
        }
17146
        break;
17147
 
17148
      case AIRWAYBILL_NO:
17149
        if (value == null) {
17150
          unsetAirwaybillNo();
17151
        } else {
17152
          setAirwaybillNo((String)value);
17153
        }
17154
        break;
17155
 
17156
      case PRODUCT_NAME:
17157
        if (value == null) {
17158
          unsetProductName();
17159
        } else {
17160
          setProductName((String)value);
17161
        }
17162
        break;
17163
 
17164
      case SUBJECT:
17165
        if (value == null) {
17166
          unsetSubject();
17167
        } else {
17168
          setSubject((String)value);
17169
        }
17170
        break;
17171
 
17172
      case MESSAGE:
17173
        if (value == null) {
17174
          unsetMessage();
17175
        } else {
17176
          setMessage((String)value);
17177
        }
17178
        break;
17179
 
17180
      }
17181
    }
17182
 
17183
    public void setFieldValue(int fieldID, Object value) {
17184
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17185
    }
17186
 
17187
    public Object getFieldValue(_Fields field) {
17188
      switch (field) {
17189
      case USER_ID:
17190
        return new Long(getUserId());
17191
 
17192
      case REPLY_TO:
17193
        return getReplyTo();
17194
 
17195
      case COMMUNICATION_TYPE:
17196
        return new Long(getCommunicationType());
17197
 
17198
      case ORDER_ID:
17199
        return new Long(getOrderId());
17200
 
17201
      case AIRWAYBILL_NO:
17202
        return getAirwaybillNo();
17203
 
17204
      case PRODUCT_NAME:
17205
        return getProductName();
17206
 
17207
      case SUBJECT:
17208
        return getSubject();
17209
 
17210
      case MESSAGE:
17211
        return getMessage();
17212
 
17213
      }
17214
      throw new IllegalStateException();
17215
    }
17216
 
17217
    public Object getFieldValue(int fieldId) {
17218
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17219
    }
17220
 
17221
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17222
    public boolean isSet(_Fields field) {
17223
      switch (field) {
17224
      case USER_ID:
17225
        return isSetUserId();
17226
      case REPLY_TO:
17227
        return isSetReplyTo();
17228
      case COMMUNICATION_TYPE:
17229
        return isSetCommunicationType();
17230
      case ORDER_ID:
17231
        return isSetOrderId();
17232
      case AIRWAYBILL_NO:
17233
        return isSetAirwaybillNo();
17234
      case PRODUCT_NAME:
17235
        return isSetProductName();
17236
      case SUBJECT:
17237
        return isSetSubject();
17238
      case MESSAGE:
17239
        return isSetMessage();
17240
      }
17241
      throw new IllegalStateException();
17242
    }
17243
 
17244
    public boolean isSet(int fieldID) {
17245
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17246
    }
17247
 
17248
    @Override
17249
    public boolean equals(Object that) {
17250
      if (that == null)
17251
        return false;
17252
      if (that instanceof saveUserCommunication_args)
17253
        return this.equals((saveUserCommunication_args)that);
17254
      return false;
17255
    }
17256
 
17257
    public boolean equals(saveUserCommunication_args that) {
17258
      if (that == null)
17259
        return false;
17260
 
17261
      boolean this_present_userId = true;
17262
      boolean that_present_userId = true;
17263
      if (this_present_userId || that_present_userId) {
17264
        if (!(this_present_userId && that_present_userId))
17265
          return false;
17266
        if (this.userId != that.userId)
17267
          return false;
17268
      }
17269
 
17270
      boolean this_present_replyTo = true && this.isSetReplyTo();
17271
      boolean that_present_replyTo = true && that.isSetReplyTo();
17272
      if (this_present_replyTo || that_present_replyTo) {
17273
        if (!(this_present_replyTo && that_present_replyTo))
17274
          return false;
17275
        if (!this.replyTo.equals(that.replyTo))
17276
          return false;
17277
      }
17278
 
17279
      boolean this_present_communicationType = true;
17280
      boolean that_present_communicationType = true;
17281
      if (this_present_communicationType || that_present_communicationType) {
17282
        if (!(this_present_communicationType && that_present_communicationType))
17283
          return false;
17284
        if (this.communicationType != that.communicationType)
17285
          return false;
17286
      }
17287
 
17288
      boolean this_present_orderId = true;
17289
      boolean that_present_orderId = true;
17290
      if (this_present_orderId || that_present_orderId) {
17291
        if (!(this_present_orderId && that_present_orderId))
17292
          return false;
17293
        if (this.orderId != that.orderId)
17294
          return false;
17295
      }
17296
 
17297
      boolean this_present_airwaybillNo = true && this.isSetAirwaybillNo();
17298
      boolean that_present_airwaybillNo = true && that.isSetAirwaybillNo();
17299
      if (this_present_airwaybillNo || that_present_airwaybillNo) {
17300
        if (!(this_present_airwaybillNo && that_present_airwaybillNo))
17301
          return false;
17302
        if (!this.airwaybillNo.equals(that.airwaybillNo))
17303
          return false;
17304
      }
17305
 
17306
      boolean this_present_productName = true && this.isSetProductName();
17307
      boolean that_present_productName = true && that.isSetProductName();
17308
      if (this_present_productName || that_present_productName) {
17309
        if (!(this_present_productName && that_present_productName))
17310
          return false;
17311
        if (!this.productName.equals(that.productName))
17312
          return false;
17313
      }
17314
 
17315
      boolean this_present_subject = true && this.isSetSubject();
17316
      boolean that_present_subject = true && that.isSetSubject();
17317
      if (this_present_subject || that_present_subject) {
17318
        if (!(this_present_subject && that_present_subject))
17319
          return false;
17320
        if (!this.subject.equals(that.subject))
17321
          return false;
17322
      }
17323
 
17324
      boolean this_present_message = true && this.isSetMessage();
17325
      boolean that_present_message = true && that.isSetMessage();
17326
      if (this_present_message || that_present_message) {
17327
        if (!(this_present_message && that_present_message))
17328
          return false;
17329
        if (!this.message.equals(that.message))
17330
          return false;
17331
      }
17332
 
17333
      return true;
17334
    }
17335
 
17336
    @Override
17337
    public int hashCode() {
17338
      return 0;
17339
    }
17340
 
17341
    public int compareTo(saveUserCommunication_args other) {
17342
      if (!getClass().equals(other.getClass())) {
17343
        return getClass().getName().compareTo(other.getClass().getName());
17344
      }
17345
 
17346
      int lastComparison = 0;
17347
      saveUserCommunication_args typedOther = (saveUserCommunication_args)other;
17348
 
17349
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
17350
      if (lastComparison != 0) {
17351
        return lastComparison;
17352
      }
17353
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
17354
      if (lastComparison != 0) {
17355
        return lastComparison;
17356
      }
17357
      lastComparison = Boolean.valueOf(isSetReplyTo()).compareTo(isSetReplyTo());
17358
      if (lastComparison != 0) {
17359
        return lastComparison;
17360
      }
17361
      lastComparison = TBaseHelper.compareTo(replyTo, typedOther.replyTo);
17362
      if (lastComparison != 0) {
17363
        return lastComparison;
17364
      }
17365
      lastComparison = Boolean.valueOf(isSetCommunicationType()).compareTo(isSetCommunicationType());
17366
      if (lastComparison != 0) {
17367
        return lastComparison;
17368
      }
17369
      lastComparison = TBaseHelper.compareTo(communicationType, typedOther.communicationType);
17370
      if (lastComparison != 0) {
17371
        return lastComparison;
17372
      }
17373
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
17374
      if (lastComparison != 0) {
17375
        return lastComparison;
17376
      }
17377
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
17378
      if (lastComparison != 0) {
17379
        return lastComparison;
17380
      }
17381
      lastComparison = Boolean.valueOf(isSetAirwaybillNo()).compareTo(isSetAirwaybillNo());
17382
      if (lastComparison != 0) {
17383
        return lastComparison;
17384
      }
17385
      lastComparison = TBaseHelper.compareTo(airwaybillNo, typedOther.airwaybillNo);
17386
      if (lastComparison != 0) {
17387
        return lastComparison;
17388
      }
17389
      lastComparison = Boolean.valueOf(isSetProductName()).compareTo(isSetProductName());
17390
      if (lastComparison != 0) {
17391
        return lastComparison;
17392
      }
17393
      lastComparison = TBaseHelper.compareTo(productName, typedOther.productName);
17394
      if (lastComparison != 0) {
17395
        return lastComparison;
17396
      }
17397
      lastComparison = Boolean.valueOf(isSetSubject()).compareTo(isSetSubject());
17398
      if (lastComparison != 0) {
17399
        return lastComparison;
17400
      }
17401
      lastComparison = TBaseHelper.compareTo(subject, typedOther.subject);
17402
      if (lastComparison != 0) {
17403
        return lastComparison;
17404
      }
17405
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
17406
      if (lastComparison != 0) {
17407
        return lastComparison;
17408
      }
17409
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
17410
      if (lastComparison != 0) {
17411
        return lastComparison;
17412
      }
17413
      return 0;
17414
    }
17415
 
17416
    public void read(TProtocol iprot) throws TException {
17417
      TField field;
17418
      iprot.readStructBegin();
17419
      while (true)
17420
      {
17421
        field = iprot.readFieldBegin();
17422
        if (field.type == TType.STOP) { 
17423
          break;
17424
        }
17425
        _Fields fieldId = _Fields.findByThriftId(field.id);
17426
        if (fieldId == null) {
17427
          TProtocolUtil.skip(iprot, field.type);
17428
        } else {
17429
          switch (fieldId) {
17430
            case USER_ID:
17431
              if (field.type == TType.I64) {
17432
                this.userId = iprot.readI64();
17433
                setUserIdIsSet(true);
17434
              } else { 
17435
                TProtocolUtil.skip(iprot, field.type);
17436
              }
17437
              break;
17438
            case REPLY_TO:
17439
              if (field.type == TType.STRING) {
17440
                this.replyTo = iprot.readString();
17441
              } else { 
17442
                TProtocolUtil.skip(iprot, field.type);
17443
              }
17444
              break;
17445
            case COMMUNICATION_TYPE:
17446
              if (field.type == TType.I64) {
17447
                this.communicationType = iprot.readI64();
17448
                setCommunicationTypeIsSet(true);
17449
              } else { 
17450
                TProtocolUtil.skip(iprot, field.type);
17451
              }
17452
              break;
17453
            case ORDER_ID:
17454
              if (field.type == TType.I64) {
17455
                this.orderId = iprot.readI64();
17456
                setOrderIdIsSet(true);
17457
              } else { 
17458
                TProtocolUtil.skip(iprot, field.type);
17459
              }
17460
              break;
17461
            case AIRWAYBILL_NO:
17462
              if (field.type == TType.STRING) {
17463
                this.airwaybillNo = iprot.readString();
17464
              } else { 
17465
                TProtocolUtil.skip(iprot, field.type);
17466
              }
17467
              break;
17468
            case PRODUCT_NAME:
17469
              if (field.type == TType.STRING) {
17470
                this.productName = iprot.readString();
17471
              } else { 
17472
                TProtocolUtil.skip(iprot, field.type);
17473
              }
17474
              break;
17475
            case SUBJECT:
17476
              if (field.type == TType.STRING) {
17477
                this.subject = iprot.readString();
17478
              } else { 
17479
                TProtocolUtil.skip(iprot, field.type);
17480
              }
17481
              break;
17482
            case MESSAGE:
17483
              if (field.type == TType.STRING) {
17484
                this.message = iprot.readString();
17485
              } else { 
17486
                TProtocolUtil.skip(iprot, field.type);
17487
              }
17488
              break;
17489
          }
17490
          iprot.readFieldEnd();
17491
        }
17492
      }
17493
      iprot.readStructEnd();
17494
      validate();
17495
    }
17496
 
17497
    public void write(TProtocol oprot) throws TException {
17498
      validate();
17499
 
17500
      oprot.writeStructBegin(STRUCT_DESC);
17501
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17502
      oprot.writeI64(this.userId);
17503
      oprot.writeFieldEnd();
17504
      if (this.replyTo != null) {
17505
        oprot.writeFieldBegin(REPLY_TO_FIELD_DESC);
17506
        oprot.writeString(this.replyTo);
17507
        oprot.writeFieldEnd();
17508
      }
17509
      oprot.writeFieldBegin(COMMUNICATION_TYPE_FIELD_DESC);
17510
      oprot.writeI64(this.communicationType);
17511
      oprot.writeFieldEnd();
17512
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
17513
      oprot.writeI64(this.orderId);
17514
      oprot.writeFieldEnd();
17515
      if (this.airwaybillNo != null) {
17516
        oprot.writeFieldBegin(AIRWAYBILL_NO_FIELD_DESC);
17517
        oprot.writeString(this.airwaybillNo);
17518
        oprot.writeFieldEnd();
17519
      }
17520
      if (this.productName != null) {
17521
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
17522
        oprot.writeString(this.productName);
17523
        oprot.writeFieldEnd();
17524
      }
17525
      if (this.subject != null) {
17526
        oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
17527
        oprot.writeString(this.subject);
17528
        oprot.writeFieldEnd();
17529
      }
17530
      if (this.message != null) {
17531
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
17532
        oprot.writeString(this.message);
17533
        oprot.writeFieldEnd();
17534
      }
17535
      oprot.writeFieldStop();
17536
      oprot.writeStructEnd();
17537
    }
17538
 
17539
    @Override
17540
    public String toString() {
17541
      StringBuilder sb = new StringBuilder("saveUserCommunication_args(");
17542
      boolean first = true;
17543
 
17544
      sb.append("userId:");
17545
      sb.append(this.userId);
17546
      first = false;
17547
      if (!first) sb.append(", ");
17548
      sb.append("replyTo:");
17549
      if (this.replyTo == null) {
17550
        sb.append("null");
17551
      } else {
17552
        sb.append(this.replyTo);
17553
      }
17554
      first = false;
17555
      if (!first) sb.append(", ");
17556
      sb.append("communicationType:");
17557
      sb.append(this.communicationType);
17558
      first = false;
17559
      if (!first) sb.append(", ");
17560
      sb.append("orderId:");
17561
      sb.append(this.orderId);
17562
      first = false;
17563
      if (!first) sb.append(", ");
17564
      sb.append("airwaybillNo:");
17565
      if (this.airwaybillNo == null) {
17566
        sb.append("null");
17567
      } else {
17568
        sb.append(this.airwaybillNo);
17569
      }
17570
      first = false;
17571
      if (!first) sb.append(", ");
17572
      sb.append("productName:");
17573
      if (this.productName == null) {
17574
        sb.append("null");
17575
      } else {
17576
        sb.append(this.productName);
17577
      }
17578
      first = false;
17579
      if (!first) sb.append(", ");
17580
      sb.append("subject:");
17581
      if (this.subject == null) {
17582
        sb.append("null");
17583
      } else {
17584
        sb.append(this.subject);
17585
      }
17586
      first = false;
17587
      if (!first) sb.append(", ");
17588
      sb.append("message:");
17589
      if (this.message == null) {
17590
        sb.append("null");
17591
      } else {
17592
        sb.append(this.message);
17593
      }
17594
      first = false;
17595
      sb.append(")");
17596
      return sb.toString();
17597
    }
17598
 
17599
    public void validate() throws TException {
17600
      // check for required fields
17601
    }
17602
 
17603
  }
17604
 
17605
  public static class saveUserCommunication_result implements TBase<saveUserCommunication_result._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_result>   {
17606
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_result");
17607
 
17608
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17609
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
17610
 
17611
    private boolean success;
17612
    private UserCommunicationException ucx;
17613
 
17614
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17615
    public enum _Fields implements TFieldIdEnum {
17616
      SUCCESS((short)0, "success"),
17617
      UCX((short)1, "ucx");
17618
 
17619
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17620
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17621
 
17622
      static {
17623
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17624
          byId.put((int)field._thriftId, field);
17625
          byName.put(field.getFieldName(), field);
17626
        }
17627
      }
17628
 
17629
      /**
17630
       * Find the _Fields constant that matches fieldId, or null if its not found.
17631
       */
17632
      public static _Fields findByThriftId(int fieldId) {
17633
        return byId.get(fieldId);
17634
      }
17635
 
17636
      /**
17637
       * Find the _Fields constant that matches fieldId, throwing an exception
17638
       * if it is not found.
17639
       */
17640
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17641
        _Fields fields = findByThriftId(fieldId);
17642
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17643
        return fields;
17644
      }
17645
 
17646
      /**
17647
       * Find the _Fields constant that matches name, or null if its not found.
17648
       */
17649
      public static _Fields findByName(String name) {
17650
        return byName.get(name);
17651
      }
17652
 
17653
      private final short _thriftId;
17654
      private final String _fieldName;
17655
 
17656
      _Fields(short thriftId, String fieldName) {
17657
        _thriftId = thriftId;
17658
        _fieldName = fieldName;
17659
      }
17660
 
17661
      public short getThriftFieldId() {
17662
        return _thriftId;
17663
      }
17664
 
17665
      public String getFieldName() {
17666
        return _fieldName;
17667
      }
17668
    }
17669
 
17670
    // isset id assignments
17671
    private static final int __SUCCESS_ISSET_ID = 0;
17672
    private BitSet __isset_bit_vector = new BitSet(1);
17673
 
17674
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17675
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17676
          new FieldValueMetaData(TType.BOOL)));
17677
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
17678
          new FieldValueMetaData(TType.STRUCT)));
17679
    }});
17680
 
17681
    static {
17682
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_result.class, metaDataMap);
17683
    }
17684
 
17685
    public saveUserCommunication_result() {
17686
    }
17687
 
17688
    public saveUserCommunication_result(
17689
      boolean success,
17690
      UserCommunicationException ucx)
17691
    {
17692
      this();
17693
      this.success = success;
17694
      setSuccessIsSet(true);
17695
      this.ucx = ucx;
17696
    }
17697
 
17698
    /**
17699
     * Performs a deep copy on <i>other</i>.
17700
     */
17701
    public saveUserCommunication_result(saveUserCommunication_result other) {
17702
      __isset_bit_vector.clear();
17703
      __isset_bit_vector.or(other.__isset_bit_vector);
17704
      this.success = other.success;
17705
      if (other.isSetUcx()) {
17706
        this.ucx = new UserCommunicationException(other.ucx);
17707
      }
17708
    }
17709
 
17710
    public saveUserCommunication_result deepCopy() {
17711
      return new saveUserCommunication_result(this);
17712
    }
17713
 
17714
    @Deprecated
17715
    public saveUserCommunication_result clone() {
17716
      return new saveUserCommunication_result(this);
17717
    }
17718
 
17719
    public boolean isSuccess() {
17720
      return this.success;
17721
    }
17722
 
17723
    public saveUserCommunication_result setSuccess(boolean success) {
17724
      this.success = success;
17725
      setSuccessIsSet(true);
17726
      return this;
17727
    }
17728
 
17729
    public void unsetSuccess() {
17730
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17731
    }
17732
 
17733
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17734
    public boolean isSetSuccess() {
17735
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17736
    }
17737
 
17738
    public void setSuccessIsSet(boolean value) {
17739
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17740
    }
17741
 
17742
    public UserCommunicationException getUcx() {
17743
      return this.ucx;
17744
    }
17745
 
17746
    public saveUserCommunication_result setUcx(UserCommunicationException ucx) {
17747
      this.ucx = ucx;
17748
      return this;
17749
    }
17750
 
17751
    public void unsetUcx() {
17752
      this.ucx = null;
17753
    }
17754
 
17755
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
17756
    public boolean isSetUcx() {
17757
      return this.ucx != null;
17758
    }
17759
 
17760
    public void setUcxIsSet(boolean value) {
17761
      if (!value) {
17762
        this.ucx = null;
17763
      }
17764
    }
17765
 
17766
    public void setFieldValue(_Fields field, Object value) {
17767
      switch (field) {
17768
      case SUCCESS:
17769
        if (value == null) {
17770
          unsetSuccess();
17771
        } else {
17772
          setSuccess((Boolean)value);
17773
        }
17774
        break;
17775
 
17776
      case UCX:
17777
        if (value == null) {
17778
          unsetUcx();
17779
        } else {
17780
          setUcx((UserCommunicationException)value);
17781
        }
17782
        break;
17783
 
17784
      }
17785
    }
17786
 
17787
    public void setFieldValue(int fieldID, Object value) {
17788
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17789
    }
17790
 
17791
    public Object getFieldValue(_Fields field) {
17792
      switch (field) {
17793
      case SUCCESS:
17794
        return new Boolean(isSuccess());
17795
 
17796
      case UCX:
17797
        return getUcx();
17798
 
17799
      }
17800
      throw new IllegalStateException();
17801
    }
17802
 
17803
    public Object getFieldValue(int fieldId) {
17804
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17805
    }
17806
 
17807
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17808
    public boolean isSet(_Fields field) {
17809
      switch (field) {
17810
      case SUCCESS:
17811
        return isSetSuccess();
17812
      case UCX:
17813
        return isSetUcx();
17814
      }
17815
      throw new IllegalStateException();
17816
    }
17817
 
17818
    public boolean isSet(int fieldID) {
17819
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17820
    }
17821
 
17822
    @Override
17823
    public boolean equals(Object that) {
17824
      if (that == null)
17825
        return false;
17826
      if (that instanceof saveUserCommunication_result)
17827
        return this.equals((saveUserCommunication_result)that);
17828
      return false;
17829
    }
17830
 
17831
    public boolean equals(saveUserCommunication_result that) {
17832
      if (that == null)
17833
        return false;
17834
 
17835
      boolean this_present_success = true;
17836
      boolean that_present_success = true;
17837
      if (this_present_success || that_present_success) {
17838
        if (!(this_present_success && that_present_success))
17839
          return false;
17840
        if (this.success != that.success)
17841
          return false;
17842
      }
17843
 
17844
      boolean this_present_ucx = true && this.isSetUcx();
17845
      boolean that_present_ucx = true && that.isSetUcx();
17846
      if (this_present_ucx || that_present_ucx) {
17847
        if (!(this_present_ucx && that_present_ucx))
17848
          return false;
17849
        if (!this.ucx.equals(that.ucx))
17850
          return false;
17851
      }
17852
 
17853
      return true;
17854
    }
17855
 
17856
    @Override
17857
    public int hashCode() {
17858
      return 0;
17859
    }
17860
 
17861
    public int compareTo(saveUserCommunication_result other) {
17862
      if (!getClass().equals(other.getClass())) {
17863
        return getClass().getName().compareTo(other.getClass().getName());
17864
      }
17865
 
17866
      int lastComparison = 0;
17867
      saveUserCommunication_result typedOther = (saveUserCommunication_result)other;
17868
 
17869
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17870
      if (lastComparison != 0) {
17871
        return lastComparison;
17872
      }
17873
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17874
      if (lastComparison != 0) {
17875
        return lastComparison;
17876
      }
17877
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
17878
      if (lastComparison != 0) {
17879
        return lastComparison;
17880
      }
17881
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
17882
      if (lastComparison != 0) {
17883
        return lastComparison;
17884
      }
17885
      return 0;
17886
    }
17887
 
17888
    public void read(TProtocol iprot) throws TException {
17889
      TField field;
17890
      iprot.readStructBegin();
17891
      while (true)
17892
      {
17893
        field = iprot.readFieldBegin();
17894
        if (field.type == TType.STOP) { 
17895
          break;
17896
        }
17897
        _Fields fieldId = _Fields.findByThriftId(field.id);
17898
        if (fieldId == null) {
17899
          TProtocolUtil.skip(iprot, field.type);
17900
        } else {
17901
          switch (fieldId) {
17902
            case SUCCESS:
17903
              if (field.type == TType.BOOL) {
17904
                this.success = iprot.readBool();
17905
                setSuccessIsSet(true);
17906
              } else { 
17907
                TProtocolUtil.skip(iprot, field.type);
17908
              }
17909
              break;
17910
            case UCX:
17911
              if (field.type == TType.STRUCT) {
17912
                this.ucx = new UserCommunicationException();
17913
                this.ucx.read(iprot);
17914
              } else { 
17915
                TProtocolUtil.skip(iprot, field.type);
17916
              }
17917
              break;
17918
          }
17919
          iprot.readFieldEnd();
17920
        }
17921
      }
17922
      iprot.readStructEnd();
17923
      validate();
17924
    }
17925
 
17926
    public void write(TProtocol oprot) throws TException {
17927
      oprot.writeStructBegin(STRUCT_DESC);
17928
 
17929
      if (this.isSetSuccess()) {
17930
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17931
        oprot.writeBool(this.success);
17932
        oprot.writeFieldEnd();
17933
      } else if (this.isSetUcx()) {
17934
        oprot.writeFieldBegin(UCX_FIELD_DESC);
17935
        this.ucx.write(oprot);
17936
        oprot.writeFieldEnd();
17937
      }
17938
      oprot.writeFieldStop();
17939
      oprot.writeStructEnd();
17940
    }
17941
 
17942
    @Override
17943
    public String toString() {
17944
      StringBuilder sb = new StringBuilder("saveUserCommunication_result(");
17945
      boolean first = true;
17946
 
17947
      sb.append("success:");
17948
      sb.append(this.success);
17949
      first = false;
17950
      if (!first) sb.append(", ");
17951
      sb.append("ucx:");
17952
      if (this.ucx == null) {
17953
        sb.append("null");
17954
      } else {
17955
        sb.append(this.ucx);
17956
      }
17957
      first = false;
17958
      sb.append(")");
17959
      return sb.toString();
17960
    }
17961
 
17962
    public void validate() throws TException {
17963
      // check for required fields
17964
    }
17965
 
17966
  }
17967
 
1590 varun.gupt 17968
  public static class getUserCommunicationById_args implements TBase<getUserCommunicationById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCommunicationById_args>   {
17969
    private static final TStruct STRUCT_DESC = new TStruct("getUserCommunicationById_args");
17970
 
17971
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
17972
 
17973
    private long id;
17974
 
17975
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17976
    public enum _Fields implements TFieldIdEnum {
17977
      ID((short)1, "id");
17978
 
17979
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17980
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17981
 
17982
      static {
17983
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17984
          byId.put((int)field._thriftId, field);
17985
          byName.put(field.getFieldName(), field);
17986
        }
17987
      }
17988
 
17989
      /**
17990
       * Find the _Fields constant that matches fieldId, or null if its not found.
17991
       */
17992
      public static _Fields findByThriftId(int fieldId) {
17993
        return byId.get(fieldId);
17994
      }
17995
 
17996
      /**
17997
       * Find the _Fields constant that matches fieldId, throwing an exception
17998
       * if it is not found.
17999
       */
18000
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18001
        _Fields fields = findByThriftId(fieldId);
18002
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18003
        return fields;
18004
      }
18005
 
18006
      /**
18007
       * Find the _Fields constant that matches name, or null if its not found.
18008
       */
18009
      public static _Fields findByName(String name) {
18010
        return byName.get(name);
18011
      }
18012
 
18013
      private final short _thriftId;
18014
      private final String _fieldName;
18015
 
18016
      _Fields(short thriftId, String fieldName) {
18017
        _thriftId = thriftId;
18018
        _fieldName = fieldName;
18019
      }
18020
 
18021
      public short getThriftFieldId() {
18022
        return _thriftId;
18023
      }
18024
 
18025
      public String getFieldName() {
18026
        return _fieldName;
18027
      }
18028
    }
18029
 
18030
    // isset id assignments
18031
    private static final int __ID_ISSET_ID = 0;
18032
    private BitSet __isset_bit_vector = new BitSet(1);
18033
 
18034
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18035
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
18036
          new FieldValueMetaData(TType.I64)));
18037
    }});
18038
 
18039
    static {
18040
      FieldMetaData.addStructMetaDataMap(getUserCommunicationById_args.class, metaDataMap);
18041
    }
18042
 
18043
    public getUserCommunicationById_args() {
18044
    }
18045
 
18046
    public getUserCommunicationById_args(
18047
      long id)
18048
    {
18049
      this();
18050
      this.id = id;
18051
      setIdIsSet(true);
18052
    }
18053
 
18054
    /**
18055
     * Performs a deep copy on <i>other</i>.
18056
     */
18057
    public getUserCommunicationById_args(getUserCommunicationById_args other) {
18058
      __isset_bit_vector.clear();
18059
      __isset_bit_vector.or(other.__isset_bit_vector);
18060
      this.id = other.id;
18061
    }
18062
 
18063
    public getUserCommunicationById_args deepCopy() {
18064
      return new getUserCommunicationById_args(this);
18065
    }
18066
 
18067
    @Deprecated
18068
    public getUserCommunicationById_args clone() {
18069
      return new getUserCommunicationById_args(this);
18070
    }
18071
 
18072
    public long getId() {
18073
      return this.id;
18074
    }
18075
 
18076
    public getUserCommunicationById_args setId(long id) {
18077
      this.id = id;
18078
      setIdIsSet(true);
18079
      return this;
18080
    }
18081
 
18082
    public void unsetId() {
18083
      __isset_bit_vector.clear(__ID_ISSET_ID);
18084
    }
18085
 
18086
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
18087
    public boolean isSetId() {
18088
      return __isset_bit_vector.get(__ID_ISSET_ID);
18089
    }
18090
 
18091
    public void setIdIsSet(boolean value) {
18092
      __isset_bit_vector.set(__ID_ISSET_ID, value);
18093
    }
18094
 
18095
    public void setFieldValue(_Fields field, Object value) {
18096
      switch (field) {
18097
      case ID:
18098
        if (value == null) {
18099
          unsetId();
18100
        } else {
18101
          setId((Long)value);
18102
        }
18103
        break;
18104
 
18105
      }
18106
    }
18107
 
18108
    public void setFieldValue(int fieldID, Object value) {
18109
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18110
    }
18111
 
18112
    public Object getFieldValue(_Fields field) {
18113
      switch (field) {
18114
      case ID:
18115
        return new Long(getId());
18116
 
18117
      }
18118
      throw new IllegalStateException();
18119
    }
18120
 
18121
    public Object getFieldValue(int fieldId) {
18122
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18123
    }
18124
 
18125
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18126
    public boolean isSet(_Fields field) {
18127
      switch (field) {
18128
      case ID:
18129
        return isSetId();
18130
      }
18131
      throw new IllegalStateException();
18132
    }
18133
 
18134
    public boolean isSet(int fieldID) {
18135
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18136
    }
18137
 
18138
    @Override
18139
    public boolean equals(Object that) {
18140
      if (that == null)
18141
        return false;
18142
      if (that instanceof getUserCommunicationById_args)
18143
        return this.equals((getUserCommunicationById_args)that);
18144
      return false;
18145
    }
18146
 
18147
    public boolean equals(getUserCommunicationById_args that) {
18148
      if (that == null)
18149
        return false;
18150
 
18151
      boolean this_present_id = true;
18152
      boolean that_present_id = true;
18153
      if (this_present_id || that_present_id) {
18154
        if (!(this_present_id && that_present_id))
18155
          return false;
18156
        if (this.id != that.id)
18157
          return false;
18158
      }
18159
 
18160
      return true;
18161
    }
18162
 
18163
    @Override
18164
    public int hashCode() {
18165
      return 0;
18166
    }
18167
 
18168
    public int compareTo(getUserCommunicationById_args other) {
18169
      if (!getClass().equals(other.getClass())) {
18170
        return getClass().getName().compareTo(other.getClass().getName());
18171
      }
18172
 
18173
      int lastComparison = 0;
18174
      getUserCommunicationById_args typedOther = (getUserCommunicationById_args)other;
18175
 
18176
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
18177
      if (lastComparison != 0) {
18178
        return lastComparison;
18179
      }
18180
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
18181
      if (lastComparison != 0) {
18182
        return lastComparison;
18183
      }
18184
      return 0;
18185
    }
18186
 
18187
    public void read(TProtocol iprot) throws TException {
18188
      TField field;
18189
      iprot.readStructBegin();
18190
      while (true)
18191
      {
18192
        field = iprot.readFieldBegin();
18193
        if (field.type == TType.STOP) { 
18194
          break;
18195
        }
18196
        _Fields fieldId = _Fields.findByThriftId(field.id);
18197
        if (fieldId == null) {
18198
          TProtocolUtil.skip(iprot, field.type);
18199
        } else {
18200
          switch (fieldId) {
18201
            case ID:
18202
              if (field.type == TType.I64) {
18203
                this.id = iprot.readI64();
18204
                setIdIsSet(true);
18205
              } else { 
18206
                TProtocolUtil.skip(iprot, field.type);
18207
              }
18208
              break;
18209
          }
18210
          iprot.readFieldEnd();
18211
        }
18212
      }
18213
      iprot.readStructEnd();
18214
      validate();
18215
    }
18216
 
18217
    public void write(TProtocol oprot) throws TException {
18218
      validate();
18219
 
18220
      oprot.writeStructBegin(STRUCT_DESC);
18221
      oprot.writeFieldBegin(ID_FIELD_DESC);
18222
      oprot.writeI64(this.id);
18223
      oprot.writeFieldEnd();
18224
      oprot.writeFieldStop();
18225
      oprot.writeStructEnd();
18226
    }
18227
 
18228
    @Override
18229
    public String toString() {
18230
      StringBuilder sb = new StringBuilder("getUserCommunicationById_args(");
18231
      boolean first = true;
18232
 
18233
      sb.append("id:");
18234
      sb.append(this.id);
18235
      first = false;
18236
      sb.append(")");
18237
      return sb.toString();
18238
    }
18239
 
18240
    public void validate() throws TException {
18241
      // check for required fields
18242
    }
18243
 
18244
  }
18245
 
18246
  public static class getUserCommunicationById_result implements TBase<getUserCommunicationById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCommunicationById_result>   {
18247
    private static final TStruct STRUCT_DESC = new TStruct("getUserCommunicationById_result");
18248
 
18249
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
18250
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
18251
 
18252
    private UserCommunication success;
18253
    private UserCommunicationException ucx;
18254
 
18255
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18256
    public enum _Fields implements TFieldIdEnum {
18257
      SUCCESS((short)0, "success"),
18258
      UCX((short)1, "ucx");
18259
 
18260
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18261
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18262
 
18263
      static {
18264
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18265
          byId.put((int)field._thriftId, field);
18266
          byName.put(field.getFieldName(), field);
18267
        }
18268
      }
18269
 
18270
      /**
18271
       * Find the _Fields constant that matches fieldId, or null if its not found.
18272
       */
18273
      public static _Fields findByThriftId(int fieldId) {
18274
        return byId.get(fieldId);
18275
      }
18276
 
18277
      /**
18278
       * Find the _Fields constant that matches fieldId, throwing an exception
18279
       * if it is not found.
18280
       */
18281
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18282
        _Fields fields = findByThriftId(fieldId);
18283
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18284
        return fields;
18285
      }
18286
 
18287
      /**
18288
       * Find the _Fields constant that matches name, or null if its not found.
18289
       */
18290
      public static _Fields findByName(String name) {
18291
        return byName.get(name);
18292
      }
18293
 
18294
      private final short _thriftId;
18295
      private final String _fieldName;
18296
 
18297
      _Fields(short thriftId, String fieldName) {
18298
        _thriftId = thriftId;
18299
        _fieldName = fieldName;
18300
      }
18301
 
18302
      public short getThriftFieldId() {
18303
        return _thriftId;
18304
      }
18305
 
18306
      public String getFieldName() {
18307
        return _fieldName;
18308
      }
18309
    }
18310
 
18311
    // isset id assignments
18312
 
18313
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18314
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18315
          new StructMetaData(TType.STRUCT, UserCommunication.class)));
18316
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
18317
          new FieldValueMetaData(TType.STRUCT)));
18318
    }});
18319
 
18320
    static {
18321
      FieldMetaData.addStructMetaDataMap(getUserCommunicationById_result.class, metaDataMap);
18322
    }
18323
 
18324
    public getUserCommunicationById_result() {
18325
    }
18326
 
18327
    public getUserCommunicationById_result(
18328
      UserCommunication success,
18329
      UserCommunicationException ucx)
18330
    {
18331
      this();
18332
      this.success = success;
18333
      this.ucx = ucx;
18334
    }
18335
 
18336
    /**
18337
     * Performs a deep copy on <i>other</i>.
18338
     */
18339
    public getUserCommunicationById_result(getUserCommunicationById_result other) {
18340
      if (other.isSetSuccess()) {
18341
        this.success = new UserCommunication(other.success);
18342
      }
18343
      if (other.isSetUcx()) {
18344
        this.ucx = new UserCommunicationException(other.ucx);
18345
      }
18346
    }
18347
 
18348
    public getUserCommunicationById_result deepCopy() {
18349
      return new getUserCommunicationById_result(this);
18350
    }
18351
 
18352
    @Deprecated
18353
    public getUserCommunicationById_result clone() {
18354
      return new getUserCommunicationById_result(this);
18355
    }
18356
 
18357
    public UserCommunication getSuccess() {
18358
      return this.success;
18359
    }
18360
 
18361
    public getUserCommunicationById_result setSuccess(UserCommunication success) {
18362
      this.success = success;
18363
      return this;
18364
    }
18365
 
18366
    public void unsetSuccess() {
18367
      this.success = null;
18368
    }
18369
 
18370
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18371
    public boolean isSetSuccess() {
18372
      return this.success != null;
18373
    }
18374
 
18375
    public void setSuccessIsSet(boolean value) {
18376
      if (!value) {
18377
        this.success = null;
18378
      }
18379
    }
18380
 
18381
    public UserCommunicationException getUcx() {
18382
      return this.ucx;
18383
    }
18384
 
18385
    public getUserCommunicationById_result setUcx(UserCommunicationException ucx) {
18386
      this.ucx = ucx;
18387
      return this;
18388
    }
18389
 
18390
    public void unsetUcx() {
18391
      this.ucx = null;
18392
    }
18393
 
18394
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
18395
    public boolean isSetUcx() {
18396
      return this.ucx != null;
18397
    }
18398
 
18399
    public void setUcxIsSet(boolean value) {
18400
      if (!value) {
18401
        this.ucx = null;
18402
      }
18403
    }
18404
 
18405
    public void setFieldValue(_Fields field, Object value) {
18406
      switch (field) {
18407
      case SUCCESS:
18408
        if (value == null) {
18409
          unsetSuccess();
18410
        } else {
18411
          setSuccess((UserCommunication)value);
18412
        }
18413
        break;
18414
 
18415
      case UCX:
18416
        if (value == null) {
18417
          unsetUcx();
18418
        } else {
18419
          setUcx((UserCommunicationException)value);
18420
        }
18421
        break;
18422
 
18423
      }
18424
    }
18425
 
18426
    public void setFieldValue(int fieldID, Object value) {
18427
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18428
    }
18429
 
18430
    public Object getFieldValue(_Fields field) {
18431
      switch (field) {
18432
      case SUCCESS:
18433
        return getSuccess();
18434
 
18435
      case UCX:
18436
        return getUcx();
18437
 
18438
      }
18439
      throw new IllegalStateException();
18440
    }
18441
 
18442
    public Object getFieldValue(int fieldId) {
18443
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18444
    }
18445
 
18446
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18447
    public boolean isSet(_Fields field) {
18448
      switch (field) {
18449
      case SUCCESS:
18450
        return isSetSuccess();
18451
      case UCX:
18452
        return isSetUcx();
18453
      }
18454
      throw new IllegalStateException();
18455
    }
18456
 
18457
    public boolean isSet(int fieldID) {
18458
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18459
    }
18460
 
18461
    @Override
18462
    public boolean equals(Object that) {
18463
      if (that == null)
18464
        return false;
18465
      if (that instanceof getUserCommunicationById_result)
18466
        return this.equals((getUserCommunicationById_result)that);
18467
      return false;
18468
    }
18469
 
18470
    public boolean equals(getUserCommunicationById_result that) {
18471
      if (that == null)
18472
        return false;
18473
 
18474
      boolean this_present_success = true && this.isSetSuccess();
18475
      boolean that_present_success = true && that.isSetSuccess();
18476
      if (this_present_success || that_present_success) {
18477
        if (!(this_present_success && that_present_success))
18478
          return false;
18479
        if (!this.success.equals(that.success))
18480
          return false;
18481
      }
18482
 
18483
      boolean this_present_ucx = true && this.isSetUcx();
18484
      boolean that_present_ucx = true && that.isSetUcx();
18485
      if (this_present_ucx || that_present_ucx) {
18486
        if (!(this_present_ucx && that_present_ucx))
18487
          return false;
18488
        if (!this.ucx.equals(that.ucx))
18489
          return false;
18490
      }
18491
 
18492
      return true;
18493
    }
18494
 
18495
    @Override
18496
    public int hashCode() {
18497
      return 0;
18498
    }
18499
 
18500
    public int compareTo(getUserCommunicationById_result other) {
18501
      if (!getClass().equals(other.getClass())) {
18502
        return getClass().getName().compareTo(other.getClass().getName());
18503
      }
18504
 
18505
      int lastComparison = 0;
18506
      getUserCommunicationById_result typedOther = (getUserCommunicationById_result)other;
18507
 
18508
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18509
      if (lastComparison != 0) {
18510
        return lastComparison;
18511
      }
18512
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18513
      if (lastComparison != 0) {
18514
        return lastComparison;
18515
      }
18516
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
18517
      if (lastComparison != 0) {
18518
        return lastComparison;
18519
      }
18520
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
18521
      if (lastComparison != 0) {
18522
        return lastComparison;
18523
      }
18524
      return 0;
18525
    }
18526
 
18527
    public void read(TProtocol iprot) throws TException {
18528
      TField field;
18529
      iprot.readStructBegin();
18530
      while (true)
18531
      {
18532
        field = iprot.readFieldBegin();
18533
        if (field.type == TType.STOP) { 
18534
          break;
18535
        }
18536
        _Fields fieldId = _Fields.findByThriftId(field.id);
18537
        if (fieldId == null) {
18538
          TProtocolUtil.skip(iprot, field.type);
18539
        } else {
18540
          switch (fieldId) {
18541
            case SUCCESS:
18542
              if (field.type == TType.STRUCT) {
18543
                this.success = new UserCommunication();
18544
                this.success.read(iprot);
18545
              } else { 
18546
                TProtocolUtil.skip(iprot, field.type);
18547
              }
18548
              break;
18549
            case UCX:
18550
              if (field.type == TType.STRUCT) {
18551
                this.ucx = new UserCommunicationException();
18552
                this.ucx.read(iprot);
18553
              } else { 
18554
                TProtocolUtil.skip(iprot, field.type);
18555
              }
18556
              break;
18557
          }
18558
          iprot.readFieldEnd();
18559
        }
18560
      }
18561
      iprot.readStructEnd();
18562
      validate();
18563
    }
18564
 
18565
    public void write(TProtocol oprot) throws TException {
18566
      oprot.writeStructBegin(STRUCT_DESC);
18567
 
18568
      if (this.isSetSuccess()) {
18569
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18570
        this.success.write(oprot);
18571
        oprot.writeFieldEnd();
18572
      } else if (this.isSetUcx()) {
18573
        oprot.writeFieldBegin(UCX_FIELD_DESC);
18574
        this.ucx.write(oprot);
18575
        oprot.writeFieldEnd();
18576
      }
18577
      oprot.writeFieldStop();
18578
      oprot.writeStructEnd();
18579
    }
18580
 
18581
    @Override
18582
    public String toString() {
18583
      StringBuilder sb = new StringBuilder("getUserCommunicationById_result(");
18584
      boolean first = true;
18585
 
18586
      sb.append("success:");
18587
      if (this.success == null) {
18588
        sb.append("null");
18589
      } else {
18590
        sb.append(this.success);
18591
      }
18592
      first = false;
18593
      if (!first) sb.append(", ");
18594
      sb.append("ucx:");
18595
      if (this.ucx == null) {
18596
        sb.append("null");
18597
      } else {
18598
        sb.append(this.ucx);
18599
      }
18600
      first = false;
18601
      sb.append(")");
18602
      return sb.toString();
18603
    }
18604
 
18605
    public void validate() throws TException {
18606
      // check for required fields
18607
    }
18608
 
18609
  }
18610
 
18611
  public static class getUserCommunicationByUser_args implements TBase<getUserCommunicationByUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCommunicationByUser_args>   {
18612
    private static final TStruct STRUCT_DESC = new TStruct("getUserCommunicationByUser_args");
18613
 
18614
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
18615
 
18616
    private long userId;
18617
 
18618
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18619
    public enum _Fields implements TFieldIdEnum {
18620
      USER_ID((short)1, "userId");
18621
 
18622
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18623
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18624
 
18625
      static {
18626
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18627
          byId.put((int)field._thriftId, field);
18628
          byName.put(field.getFieldName(), field);
18629
        }
18630
      }
18631
 
18632
      /**
18633
       * Find the _Fields constant that matches fieldId, or null if its not found.
18634
       */
18635
      public static _Fields findByThriftId(int fieldId) {
18636
        return byId.get(fieldId);
18637
      }
18638
 
18639
      /**
18640
       * Find the _Fields constant that matches fieldId, throwing an exception
18641
       * if it is not found.
18642
       */
18643
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18644
        _Fields fields = findByThriftId(fieldId);
18645
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18646
        return fields;
18647
      }
18648
 
18649
      /**
18650
       * Find the _Fields constant that matches name, or null if its not found.
18651
       */
18652
      public static _Fields findByName(String name) {
18653
        return byName.get(name);
18654
      }
18655
 
18656
      private final short _thriftId;
18657
      private final String _fieldName;
18658
 
18659
      _Fields(short thriftId, String fieldName) {
18660
        _thriftId = thriftId;
18661
        _fieldName = fieldName;
18662
      }
18663
 
18664
      public short getThriftFieldId() {
18665
        return _thriftId;
18666
      }
18667
 
18668
      public String getFieldName() {
18669
        return _fieldName;
18670
      }
18671
    }
18672
 
18673
    // isset id assignments
18674
    private static final int __USERID_ISSET_ID = 0;
18675
    private BitSet __isset_bit_vector = new BitSet(1);
18676
 
18677
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18678
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
18679
          new FieldValueMetaData(TType.I64)));
18680
    }});
18681
 
18682
    static {
18683
      FieldMetaData.addStructMetaDataMap(getUserCommunicationByUser_args.class, metaDataMap);
18684
    }
18685
 
18686
    public getUserCommunicationByUser_args() {
18687
    }
18688
 
18689
    public getUserCommunicationByUser_args(
18690
      long userId)
18691
    {
18692
      this();
18693
      this.userId = userId;
18694
      setUserIdIsSet(true);
18695
    }
18696
 
18697
    /**
18698
     * Performs a deep copy on <i>other</i>.
18699
     */
18700
    public getUserCommunicationByUser_args(getUserCommunicationByUser_args other) {
18701
      __isset_bit_vector.clear();
18702
      __isset_bit_vector.or(other.__isset_bit_vector);
18703
      this.userId = other.userId;
18704
    }
18705
 
18706
    public getUserCommunicationByUser_args deepCopy() {
18707
      return new getUserCommunicationByUser_args(this);
18708
    }
18709
 
18710
    @Deprecated
18711
    public getUserCommunicationByUser_args clone() {
18712
      return new getUserCommunicationByUser_args(this);
18713
    }
18714
 
18715
    public long getUserId() {
18716
      return this.userId;
18717
    }
18718
 
18719
    public getUserCommunicationByUser_args setUserId(long userId) {
18720
      this.userId = userId;
18721
      setUserIdIsSet(true);
18722
      return this;
18723
    }
18724
 
18725
    public void unsetUserId() {
18726
      __isset_bit_vector.clear(__USERID_ISSET_ID);
18727
    }
18728
 
18729
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
18730
    public boolean isSetUserId() {
18731
      return __isset_bit_vector.get(__USERID_ISSET_ID);
18732
    }
18733
 
18734
    public void setUserIdIsSet(boolean value) {
18735
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
18736
    }
18737
 
18738
    public void setFieldValue(_Fields field, Object value) {
18739
      switch (field) {
18740
      case USER_ID:
18741
        if (value == null) {
18742
          unsetUserId();
18743
        } else {
18744
          setUserId((Long)value);
18745
        }
18746
        break;
18747
 
18748
      }
18749
    }
18750
 
18751
    public void setFieldValue(int fieldID, Object value) {
18752
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18753
    }
18754
 
18755
    public Object getFieldValue(_Fields field) {
18756
      switch (field) {
18757
      case USER_ID:
18758
        return new Long(getUserId());
18759
 
18760
      }
18761
      throw new IllegalStateException();
18762
    }
18763
 
18764
    public Object getFieldValue(int fieldId) {
18765
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18766
    }
18767
 
18768
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18769
    public boolean isSet(_Fields field) {
18770
      switch (field) {
18771
      case USER_ID:
18772
        return isSetUserId();
18773
      }
18774
      throw new IllegalStateException();
18775
    }
18776
 
18777
    public boolean isSet(int fieldID) {
18778
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18779
    }
18780
 
18781
    @Override
18782
    public boolean equals(Object that) {
18783
      if (that == null)
18784
        return false;
18785
      if (that instanceof getUserCommunicationByUser_args)
18786
        return this.equals((getUserCommunicationByUser_args)that);
18787
      return false;
18788
    }
18789
 
18790
    public boolean equals(getUserCommunicationByUser_args that) {
18791
      if (that == null)
18792
        return false;
18793
 
18794
      boolean this_present_userId = true;
18795
      boolean that_present_userId = true;
18796
      if (this_present_userId || that_present_userId) {
18797
        if (!(this_present_userId && that_present_userId))
18798
          return false;
18799
        if (this.userId != that.userId)
18800
          return false;
18801
      }
18802
 
18803
      return true;
18804
    }
18805
 
18806
    @Override
18807
    public int hashCode() {
18808
      return 0;
18809
    }
18810
 
18811
    public int compareTo(getUserCommunicationByUser_args other) {
18812
      if (!getClass().equals(other.getClass())) {
18813
        return getClass().getName().compareTo(other.getClass().getName());
18814
      }
18815
 
18816
      int lastComparison = 0;
18817
      getUserCommunicationByUser_args typedOther = (getUserCommunicationByUser_args)other;
18818
 
18819
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
18820
      if (lastComparison != 0) {
18821
        return lastComparison;
18822
      }
18823
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
18824
      if (lastComparison != 0) {
18825
        return lastComparison;
18826
      }
18827
      return 0;
18828
    }
18829
 
18830
    public void read(TProtocol iprot) throws TException {
18831
      TField field;
18832
      iprot.readStructBegin();
18833
      while (true)
18834
      {
18835
        field = iprot.readFieldBegin();
18836
        if (field.type == TType.STOP) { 
18837
          break;
18838
        }
18839
        _Fields fieldId = _Fields.findByThriftId(field.id);
18840
        if (fieldId == null) {
18841
          TProtocolUtil.skip(iprot, field.type);
18842
        } else {
18843
          switch (fieldId) {
18844
            case USER_ID:
18845
              if (field.type == TType.I64) {
18846
                this.userId = iprot.readI64();
18847
                setUserIdIsSet(true);
18848
              } else { 
18849
                TProtocolUtil.skip(iprot, field.type);
18850
              }
18851
              break;
18852
          }
18853
          iprot.readFieldEnd();
18854
        }
18855
      }
18856
      iprot.readStructEnd();
18857
      validate();
18858
    }
18859
 
18860
    public void write(TProtocol oprot) throws TException {
18861
      validate();
18862
 
18863
      oprot.writeStructBegin(STRUCT_DESC);
18864
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
18865
      oprot.writeI64(this.userId);
18866
      oprot.writeFieldEnd();
18867
      oprot.writeFieldStop();
18868
      oprot.writeStructEnd();
18869
    }
18870
 
18871
    @Override
18872
    public String toString() {
18873
      StringBuilder sb = new StringBuilder("getUserCommunicationByUser_args(");
18874
      boolean first = true;
18875
 
18876
      sb.append("userId:");
18877
      sb.append(this.userId);
18878
      first = false;
18879
      sb.append(")");
18880
      return sb.toString();
18881
    }
18882
 
18883
    public void validate() throws TException {
18884
      // check for required fields
18885
    }
18886
 
18887
  }
18888
 
18889
  public static class getUserCommunicationByUser_result implements TBase<getUserCommunicationByUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCommunicationByUser_result>   {
18890
    private static final TStruct STRUCT_DESC = new TStruct("getUserCommunicationByUser_result");
18891
 
18892
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18893
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
18894
 
18895
    private List<UserCommunication> success;
18896
    private UserCommunicationException ucx;
18897
 
18898
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18899
    public enum _Fields implements TFieldIdEnum {
18900
      SUCCESS((short)0, "success"),
18901
      UCX((short)1, "ucx");
18902
 
18903
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18904
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18905
 
18906
      static {
18907
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18908
          byId.put((int)field._thriftId, field);
18909
          byName.put(field.getFieldName(), field);
18910
        }
18911
      }
18912
 
18913
      /**
18914
       * Find the _Fields constant that matches fieldId, or null if its not found.
18915
       */
18916
      public static _Fields findByThriftId(int fieldId) {
18917
        return byId.get(fieldId);
18918
      }
18919
 
18920
      /**
18921
       * Find the _Fields constant that matches fieldId, throwing an exception
18922
       * if it is not found.
18923
       */
18924
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18925
        _Fields fields = findByThriftId(fieldId);
18926
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18927
        return fields;
18928
      }
18929
 
18930
      /**
18931
       * Find the _Fields constant that matches name, or null if its not found.
18932
       */
18933
      public static _Fields findByName(String name) {
18934
        return byName.get(name);
18935
      }
18936
 
18937
      private final short _thriftId;
18938
      private final String _fieldName;
18939
 
18940
      _Fields(short thriftId, String fieldName) {
18941
        _thriftId = thriftId;
18942
        _fieldName = fieldName;
18943
      }
18944
 
18945
      public short getThriftFieldId() {
18946
        return _thriftId;
18947
      }
18948
 
18949
      public String getFieldName() {
18950
        return _fieldName;
18951
      }
18952
    }
18953
 
18954
    // isset id assignments
18955
 
18956
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18957
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18958
          new ListMetaData(TType.LIST, 
18959
              new StructMetaData(TType.STRUCT, UserCommunication.class))));
18960
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
18961
          new FieldValueMetaData(TType.STRUCT)));
18962
    }});
18963
 
18964
    static {
18965
      FieldMetaData.addStructMetaDataMap(getUserCommunicationByUser_result.class, metaDataMap);
18966
    }
18967
 
18968
    public getUserCommunicationByUser_result() {
18969
    }
18970
 
18971
    public getUserCommunicationByUser_result(
18972
      List<UserCommunication> success,
18973
      UserCommunicationException ucx)
18974
    {
18975
      this();
18976
      this.success = success;
18977
      this.ucx = ucx;
18978
    }
18979
 
18980
    /**
18981
     * Performs a deep copy on <i>other</i>.
18982
     */
18983
    public getUserCommunicationByUser_result(getUserCommunicationByUser_result other) {
18984
      if (other.isSetSuccess()) {
18985
        List<UserCommunication> __this__success = new ArrayList<UserCommunication>();
18986
        for (UserCommunication other_element : other.success) {
18987
          __this__success.add(new UserCommunication(other_element));
18988
        }
18989
        this.success = __this__success;
18990
      }
18991
      if (other.isSetUcx()) {
18992
        this.ucx = new UserCommunicationException(other.ucx);
18993
      }
18994
    }
18995
 
18996
    public getUserCommunicationByUser_result deepCopy() {
18997
      return new getUserCommunicationByUser_result(this);
18998
    }
18999
 
19000
    @Deprecated
19001
    public getUserCommunicationByUser_result clone() {
19002
      return new getUserCommunicationByUser_result(this);
19003
    }
19004
 
19005
    public int getSuccessSize() {
19006
      return (this.success == null) ? 0 : this.success.size();
19007
    }
19008
 
19009
    public java.util.Iterator<UserCommunication> getSuccessIterator() {
19010
      return (this.success == null) ? null : this.success.iterator();
19011
    }
19012
 
19013
    public void addToSuccess(UserCommunication elem) {
19014
      if (this.success == null) {
19015
        this.success = new ArrayList<UserCommunication>();
19016
      }
19017
      this.success.add(elem);
19018
    }
19019
 
19020
    public List<UserCommunication> getSuccess() {
19021
      return this.success;
19022
    }
19023
 
19024
    public getUserCommunicationByUser_result setSuccess(List<UserCommunication> success) {
19025
      this.success = success;
19026
      return this;
19027
    }
19028
 
19029
    public void unsetSuccess() {
19030
      this.success = null;
19031
    }
19032
 
19033
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19034
    public boolean isSetSuccess() {
19035
      return this.success != null;
19036
    }
19037
 
19038
    public void setSuccessIsSet(boolean value) {
19039
      if (!value) {
19040
        this.success = null;
19041
      }
19042
    }
19043
 
19044
    public UserCommunicationException getUcx() {
19045
      return this.ucx;
19046
    }
19047
 
19048
    public getUserCommunicationByUser_result setUcx(UserCommunicationException ucx) {
19049
      this.ucx = ucx;
19050
      return this;
19051
    }
19052
 
19053
    public void unsetUcx() {
19054
      this.ucx = null;
19055
    }
19056
 
19057
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
19058
    public boolean isSetUcx() {
19059
      return this.ucx != null;
19060
    }
19061
 
19062
    public void setUcxIsSet(boolean value) {
19063
      if (!value) {
19064
        this.ucx = null;
19065
      }
19066
    }
19067
 
19068
    public void setFieldValue(_Fields field, Object value) {
19069
      switch (field) {
19070
      case SUCCESS:
19071
        if (value == null) {
19072
          unsetSuccess();
19073
        } else {
19074
          setSuccess((List<UserCommunication>)value);
19075
        }
19076
        break;
19077
 
19078
      case UCX:
19079
        if (value == null) {
19080
          unsetUcx();
19081
        } else {
19082
          setUcx((UserCommunicationException)value);
19083
        }
19084
        break;
19085
 
19086
      }
19087
    }
19088
 
19089
    public void setFieldValue(int fieldID, Object value) {
19090
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19091
    }
19092
 
19093
    public Object getFieldValue(_Fields field) {
19094
      switch (field) {
19095
      case SUCCESS:
19096
        return getSuccess();
19097
 
19098
      case UCX:
19099
        return getUcx();
19100
 
19101
      }
19102
      throw new IllegalStateException();
19103
    }
19104
 
19105
    public Object getFieldValue(int fieldId) {
19106
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19107
    }
19108
 
19109
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19110
    public boolean isSet(_Fields field) {
19111
      switch (field) {
19112
      case SUCCESS:
19113
        return isSetSuccess();
19114
      case UCX:
19115
        return isSetUcx();
19116
      }
19117
      throw new IllegalStateException();
19118
    }
19119
 
19120
    public boolean isSet(int fieldID) {
19121
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19122
    }
19123
 
19124
    @Override
19125
    public boolean equals(Object that) {
19126
      if (that == null)
19127
        return false;
19128
      if (that instanceof getUserCommunicationByUser_result)
19129
        return this.equals((getUserCommunicationByUser_result)that);
19130
      return false;
19131
    }
19132
 
19133
    public boolean equals(getUserCommunicationByUser_result that) {
19134
      if (that == null)
19135
        return false;
19136
 
19137
      boolean this_present_success = true && this.isSetSuccess();
19138
      boolean that_present_success = true && that.isSetSuccess();
19139
      if (this_present_success || that_present_success) {
19140
        if (!(this_present_success && that_present_success))
19141
          return false;
19142
        if (!this.success.equals(that.success))
19143
          return false;
19144
      }
19145
 
19146
      boolean this_present_ucx = true && this.isSetUcx();
19147
      boolean that_present_ucx = true && that.isSetUcx();
19148
      if (this_present_ucx || that_present_ucx) {
19149
        if (!(this_present_ucx && that_present_ucx))
19150
          return false;
19151
        if (!this.ucx.equals(that.ucx))
19152
          return false;
19153
      }
19154
 
19155
      return true;
19156
    }
19157
 
19158
    @Override
19159
    public int hashCode() {
19160
      return 0;
19161
    }
19162
 
19163
    public int compareTo(getUserCommunicationByUser_result other) {
19164
      if (!getClass().equals(other.getClass())) {
19165
        return getClass().getName().compareTo(other.getClass().getName());
19166
      }
19167
 
19168
      int lastComparison = 0;
19169
      getUserCommunicationByUser_result typedOther = (getUserCommunicationByUser_result)other;
19170
 
19171
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19172
      if (lastComparison != 0) {
19173
        return lastComparison;
19174
      }
19175
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19176
      if (lastComparison != 0) {
19177
        return lastComparison;
19178
      }
19179
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
19180
      if (lastComparison != 0) {
19181
        return lastComparison;
19182
      }
19183
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
19184
      if (lastComparison != 0) {
19185
        return lastComparison;
19186
      }
19187
      return 0;
19188
    }
19189
 
19190
    public void read(TProtocol iprot) throws TException {
19191
      TField field;
19192
      iprot.readStructBegin();
19193
      while (true)
19194
      {
19195
        field = iprot.readFieldBegin();
19196
        if (field.type == TType.STOP) { 
19197
          break;
19198
        }
19199
        _Fields fieldId = _Fields.findByThriftId(field.id);
19200
        if (fieldId == null) {
19201
          TProtocolUtil.skip(iprot, field.type);
19202
        } else {
19203
          switch (fieldId) {
19204
            case SUCCESS:
19205
              if (field.type == TType.LIST) {
19206
                {
19207
                  TList _list20 = iprot.readListBegin();
19208
                  this.success = new ArrayList<UserCommunication>(_list20.size);
19209
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
19210
                  {
19211
                    UserCommunication _elem22;
19212
                    _elem22 = new UserCommunication();
19213
                    _elem22.read(iprot);
19214
                    this.success.add(_elem22);
19215
                  }
19216
                  iprot.readListEnd();
19217
                }
19218
              } else { 
19219
                TProtocolUtil.skip(iprot, field.type);
19220
              }
19221
              break;
19222
            case UCX:
19223
              if (field.type == TType.STRUCT) {
19224
                this.ucx = new UserCommunicationException();
19225
                this.ucx.read(iprot);
19226
              } else { 
19227
                TProtocolUtil.skip(iprot, field.type);
19228
              }
19229
              break;
19230
          }
19231
          iprot.readFieldEnd();
19232
        }
19233
      }
19234
      iprot.readStructEnd();
19235
      validate();
19236
    }
19237
 
19238
    public void write(TProtocol oprot) throws TException {
19239
      oprot.writeStructBegin(STRUCT_DESC);
19240
 
19241
      if (this.isSetSuccess()) {
19242
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19243
        {
19244
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
19245
          for (UserCommunication _iter23 : this.success)
19246
          {
19247
            _iter23.write(oprot);
19248
          }
19249
          oprot.writeListEnd();
19250
        }
19251
        oprot.writeFieldEnd();
19252
      } else if (this.isSetUcx()) {
19253
        oprot.writeFieldBegin(UCX_FIELD_DESC);
19254
        this.ucx.write(oprot);
19255
        oprot.writeFieldEnd();
19256
      }
19257
      oprot.writeFieldStop();
19258
      oprot.writeStructEnd();
19259
    }
19260
 
19261
    @Override
19262
    public String toString() {
19263
      StringBuilder sb = new StringBuilder("getUserCommunicationByUser_result(");
19264
      boolean first = true;
19265
 
19266
      sb.append("success:");
19267
      if (this.success == null) {
19268
        sb.append("null");
19269
      } else {
19270
        sb.append(this.success);
19271
      }
19272
      first = false;
19273
      if (!first) sb.append(", ");
19274
      sb.append("ucx:");
19275
      if (this.ucx == null) {
19276
        sb.append("null");
19277
      } else {
19278
        sb.append(this.ucx);
19279
      }
19280
      first = false;
19281
      sb.append(")");
19282
      return sb.toString();
19283
    }
19284
 
19285
    public void validate() throws TException {
19286
      // check for required fields
19287
    }
19288
 
19289
  }
19290
 
19291
  public static class getAllUserCommunications_args implements TBase<getAllUserCommunications_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUserCommunications_args>   {
19292
    private static final TStruct STRUCT_DESC = new TStruct("getAllUserCommunications_args");
19293
 
19294
 
19295
 
19296
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19297
    public enum _Fields implements TFieldIdEnum {
19298
;
19299
 
19300
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19301
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19302
 
19303
      static {
19304
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19305
          byId.put((int)field._thriftId, field);
19306
          byName.put(field.getFieldName(), field);
19307
        }
19308
      }
19309
 
19310
      /**
19311
       * Find the _Fields constant that matches fieldId, or null if its not found.
19312
       */
19313
      public static _Fields findByThriftId(int fieldId) {
19314
        return byId.get(fieldId);
19315
      }
19316
 
19317
      /**
19318
       * Find the _Fields constant that matches fieldId, throwing an exception
19319
       * if it is not found.
19320
       */
19321
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19322
        _Fields fields = findByThriftId(fieldId);
19323
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19324
        return fields;
19325
      }
19326
 
19327
      /**
19328
       * Find the _Fields constant that matches name, or null if its not found.
19329
       */
19330
      public static _Fields findByName(String name) {
19331
        return byName.get(name);
19332
      }
19333
 
19334
      private final short _thriftId;
19335
      private final String _fieldName;
19336
 
19337
      _Fields(short thriftId, String fieldName) {
19338
        _thriftId = thriftId;
19339
        _fieldName = fieldName;
19340
      }
19341
 
19342
      public short getThriftFieldId() {
19343
        return _thriftId;
19344
      }
19345
 
19346
      public String getFieldName() {
19347
        return _fieldName;
19348
      }
19349
    }
19350
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19351
    }});
19352
 
19353
    static {
19354
      FieldMetaData.addStructMetaDataMap(getAllUserCommunications_args.class, metaDataMap);
19355
    }
19356
 
19357
    public getAllUserCommunications_args() {
19358
    }
19359
 
19360
    /**
19361
     * Performs a deep copy on <i>other</i>.
19362
     */
19363
    public getAllUserCommunications_args(getAllUserCommunications_args other) {
19364
    }
19365
 
19366
    public getAllUserCommunications_args deepCopy() {
19367
      return new getAllUserCommunications_args(this);
19368
    }
19369
 
19370
    @Deprecated
19371
    public getAllUserCommunications_args clone() {
19372
      return new getAllUserCommunications_args(this);
19373
    }
19374
 
19375
    public void setFieldValue(_Fields field, Object value) {
19376
      switch (field) {
19377
      }
19378
    }
19379
 
19380
    public void setFieldValue(int fieldID, Object value) {
19381
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19382
    }
19383
 
19384
    public Object getFieldValue(_Fields field) {
19385
      switch (field) {
19386
      }
19387
      throw new IllegalStateException();
19388
    }
19389
 
19390
    public Object getFieldValue(int fieldId) {
19391
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19392
    }
19393
 
19394
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19395
    public boolean isSet(_Fields field) {
19396
      switch (field) {
19397
      }
19398
      throw new IllegalStateException();
19399
    }
19400
 
19401
    public boolean isSet(int fieldID) {
19402
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19403
    }
19404
 
19405
    @Override
19406
    public boolean equals(Object that) {
19407
      if (that == null)
19408
        return false;
19409
      if (that instanceof getAllUserCommunications_args)
19410
        return this.equals((getAllUserCommunications_args)that);
19411
      return false;
19412
    }
19413
 
19414
    public boolean equals(getAllUserCommunications_args that) {
19415
      if (that == null)
19416
        return false;
19417
 
19418
      return true;
19419
    }
19420
 
19421
    @Override
19422
    public int hashCode() {
19423
      return 0;
19424
    }
19425
 
19426
    public int compareTo(getAllUserCommunications_args other) {
19427
      if (!getClass().equals(other.getClass())) {
19428
        return getClass().getName().compareTo(other.getClass().getName());
19429
      }
19430
 
19431
      int lastComparison = 0;
19432
      getAllUserCommunications_args typedOther = (getAllUserCommunications_args)other;
19433
 
19434
      return 0;
19435
    }
19436
 
19437
    public void read(TProtocol iprot) throws TException {
19438
      TField field;
19439
      iprot.readStructBegin();
19440
      while (true)
19441
      {
19442
        field = iprot.readFieldBegin();
19443
        if (field.type == TType.STOP) { 
19444
          break;
19445
        }
19446
        _Fields fieldId = _Fields.findByThriftId(field.id);
19447
        if (fieldId == null) {
19448
          TProtocolUtil.skip(iprot, field.type);
19449
        } else {
19450
          switch (fieldId) {
19451
          }
19452
          iprot.readFieldEnd();
19453
        }
19454
      }
19455
      iprot.readStructEnd();
19456
      validate();
19457
    }
19458
 
19459
    public void write(TProtocol oprot) throws TException {
19460
      validate();
19461
 
19462
      oprot.writeStructBegin(STRUCT_DESC);
19463
      oprot.writeFieldStop();
19464
      oprot.writeStructEnd();
19465
    }
19466
 
19467
    @Override
19468
    public String toString() {
19469
      StringBuilder sb = new StringBuilder("getAllUserCommunications_args(");
19470
      boolean first = true;
19471
 
19472
      sb.append(")");
19473
      return sb.toString();
19474
    }
19475
 
19476
    public void validate() throws TException {
19477
      // check for required fields
19478
    }
19479
 
19480
  }
19481
 
19482
  public static class getAllUserCommunications_result implements TBase<getAllUserCommunications_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUserCommunications_result>   {
19483
    private static final TStruct STRUCT_DESC = new TStruct("getAllUserCommunications_result");
19484
 
19485
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19486
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
19487
 
19488
    private List<UserCommunication> success;
19489
    private UserCommunicationException ucx;
19490
 
19491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19492
    public enum _Fields implements TFieldIdEnum {
19493
      SUCCESS((short)0, "success"),
19494
      UCX((short)1, "ucx");
19495
 
19496
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19498
 
19499
      static {
19500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19501
          byId.put((int)field._thriftId, field);
19502
          byName.put(field.getFieldName(), field);
19503
        }
19504
      }
19505
 
19506
      /**
19507
       * Find the _Fields constant that matches fieldId, or null if its not found.
19508
       */
19509
      public static _Fields findByThriftId(int fieldId) {
19510
        return byId.get(fieldId);
19511
      }
19512
 
19513
      /**
19514
       * Find the _Fields constant that matches fieldId, throwing an exception
19515
       * if it is not found.
19516
       */
19517
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19518
        _Fields fields = findByThriftId(fieldId);
19519
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19520
        return fields;
19521
      }
19522
 
19523
      /**
19524
       * Find the _Fields constant that matches name, or null if its not found.
19525
       */
19526
      public static _Fields findByName(String name) {
19527
        return byName.get(name);
19528
      }
19529
 
19530
      private final short _thriftId;
19531
      private final String _fieldName;
19532
 
19533
      _Fields(short thriftId, String fieldName) {
19534
        _thriftId = thriftId;
19535
        _fieldName = fieldName;
19536
      }
19537
 
19538
      public short getThriftFieldId() {
19539
        return _thriftId;
19540
      }
19541
 
19542
      public String getFieldName() {
19543
        return _fieldName;
19544
      }
19545
    }
19546
 
19547
    // isset id assignments
19548
 
19549
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19550
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19551
          new ListMetaData(TType.LIST, 
19552
              new StructMetaData(TType.STRUCT, UserCommunication.class))));
19553
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
19554
          new FieldValueMetaData(TType.STRUCT)));
19555
    }});
19556
 
19557
    static {
19558
      FieldMetaData.addStructMetaDataMap(getAllUserCommunications_result.class, metaDataMap);
19559
    }
19560
 
19561
    public getAllUserCommunications_result() {
19562
    }
19563
 
19564
    public getAllUserCommunications_result(
19565
      List<UserCommunication> success,
19566
      UserCommunicationException ucx)
19567
    {
19568
      this();
19569
      this.success = success;
19570
      this.ucx = ucx;
19571
    }
19572
 
19573
    /**
19574
     * Performs a deep copy on <i>other</i>.
19575
     */
19576
    public getAllUserCommunications_result(getAllUserCommunications_result other) {
19577
      if (other.isSetSuccess()) {
19578
        List<UserCommunication> __this__success = new ArrayList<UserCommunication>();
19579
        for (UserCommunication other_element : other.success) {
19580
          __this__success.add(new UserCommunication(other_element));
19581
        }
19582
        this.success = __this__success;
19583
      }
19584
      if (other.isSetUcx()) {
19585
        this.ucx = new UserCommunicationException(other.ucx);
19586
      }
19587
    }
19588
 
19589
    public getAllUserCommunications_result deepCopy() {
19590
      return new getAllUserCommunications_result(this);
19591
    }
19592
 
19593
    @Deprecated
19594
    public getAllUserCommunications_result clone() {
19595
      return new getAllUserCommunications_result(this);
19596
    }
19597
 
19598
    public int getSuccessSize() {
19599
      return (this.success == null) ? 0 : this.success.size();
19600
    }
19601
 
19602
    public java.util.Iterator<UserCommunication> getSuccessIterator() {
19603
      return (this.success == null) ? null : this.success.iterator();
19604
    }
19605
 
19606
    public void addToSuccess(UserCommunication elem) {
19607
      if (this.success == null) {
19608
        this.success = new ArrayList<UserCommunication>();
19609
      }
19610
      this.success.add(elem);
19611
    }
19612
 
19613
    public List<UserCommunication> getSuccess() {
19614
      return this.success;
19615
    }
19616
 
19617
    public getAllUserCommunications_result setSuccess(List<UserCommunication> success) {
19618
      this.success = success;
19619
      return this;
19620
    }
19621
 
19622
    public void unsetSuccess() {
19623
      this.success = null;
19624
    }
19625
 
19626
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19627
    public boolean isSetSuccess() {
19628
      return this.success != null;
19629
    }
19630
 
19631
    public void setSuccessIsSet(boolean value) {
19632
      if (!value) {
19633
        this.success = null;
19634
      }
19635
    }
19636
 
19637
    public UserCommunicationException getUcx() {
19638
      return this.ucx;
19639
    }
19640
 
19641
    public getAllUserCommunications_result setUcx(UserCommunicationException ucx) {
19642
      this.ucx = ucx;
19643
      return this;
19644
    }
19645
 
19646
    public void unsetUcx() {
19647
      this.ucx = null;
19648
    }
19649
 
19650
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
19651
    public boolean isSetUcx() {
19652
      return this.ucx != null;
19653
    }
19654
 
19655
    public void setUcxIsSet(boolean value) {
19656
      if (!value) {
19657
        this.ucx = null;
19658
      }
19659
    }
19660
 
19661
    public void setFieldValue(_Fields field, Object value) {
19662
      switch (field) {
19663
      case SUCCESS:
19664
        if (value == null) {
19665
          unsetSuccess();
19666
        } else {
19667
          setSuccess((List<UserCommunication>)value);
19668
        }
19669
        break;
19670
 
19671
      case UCX:
19672
        if (value == null) {
19673
          unsetUcx();
19674
        } else {
19675
          setUcx((UserCommunicationException)value);
19676
        }
19677
        break;
19678
 
19679
      }
19680
    }
19681
 
19682
    public void setFieldValue(int fieldID, Object value) {
19683
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19684
    }
19685
 
19686
    public Object getFieldValue(_Fields field) {
19687
      switch (field) {
19688
      case SUCCESS:
19689
        return getSuccess();
19690
 
19691
      case UCX:
19692
        return getUcx();
19693
 
19694
      }
19695
      throw new IllegalStateException();
19696
    }
19697
 
19698
    public Object getFieldValue(int fieldId) {
19699
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19700
    }
19701
 
19702
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19703
    public boolean isSet(_Fields field) {
19704
      switch (field) {
19705
      case SUCCESS:
19706
        return isSetSuccess();
19707
      case UCX:
19708
        return isSetUcx();
19709
      }
19710
      throw new IllegalStateException();
19711
    }
19712
 
19713
    public boolean isSet(int fieldID) {
19714
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19715
    }
19716
 
19717
    @Override
19718
    public boolean equals(Object that) {
19719
      if (that == null)
19720
        return false;
19721
      if (that instanceof getAllUserCommunications_result)
19722
        return this.equals((getAllUserCommunications_result)that);
19723
      return false;
19724
    }
19725
 
19726
    public boolean equals(getAllUserCommunications_result that) {
19727
      if (that == null)
19728
        return false;
19729
 
19730
      boolean this_present_success = true && this.isSetSuccess();
19731
      boolean that_present_success = true && that.isSetSuccess();
19732
      if (this_present_success || that_present_success) {
19733
        if (!(this_present_success && that_present_success))
19734
          return false;
19735
        if (!this.success.equals(that.success))
19736
          return false;
19737
      }
19738
 
19739
      boolean this_present_ucx = true && this.isSetUcx();
19740
      boolean that_present_ucx = true && that.isSetUcx();
19741
      if (this_present_ucx || that_present_ucx) {
19742
        if (!(this_present_ucx && that_present_ucx))
19743
          return false;
19744
        if (!this.ucx.equals(that.ucx))
19745
          return false;
19746
      }
19747
 
19748
      return true;
19749
    }
19750
 
19751
    @Override
19752
    public int hashCode() {
19753
      return 0;
19754
    }
19755
 
19756
    public int compareTo(getAllUserCommunications_result other) {
19757
      if (!getClass().equals(other.getClass())) {
19758
        return getClass().getName().compareTo(other.getClass().getName());
19759
      }
19760
 
19761
      int lastComparison = 0;
19762
      getAllUserCommunications_result typedOther = (getAllUserCommunications_result)other;
19763
 
19764
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19765
      if (lastComparison != 0) {
19766
        return lastComparison;
19767
      }
19768
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19769
      if (lastComparison != 0) {
19770
        return lastComparison;
19771
      }
19772
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
19773
      if (lastComparison != 0) {
19774
        return lastComparison;
19775
      }
19776
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
19777
      if (lastComparison != 0) {
19778
        return lastComparison;
19779
      }
19780
      return 0;
19781
    }
19782
 
19783
    public void read(TProtocol iprot) throws TException {
19784
      TField field;
19785
      iprot.readStructBegin();
19786
      while (true)
19787
      {
19788
        field = iprot.readFieldBegin();
19789
        if (field.type == TType.STOP) { 
19790
          break;
19791
        }
19792
        _Fields fieldId = _Fields.findByThriftId(field.id);
19793
        if (fieldId == null) {
19794
          TProtocolUtil.skip(iprot, field.type);
19795
        } else {
19796
          switch (fieldId) {
19797
            case SUCCESS:
19798
              if (field.type == TType.LIST) {
19799
                {
19800
                  TList _list24 = iprot.readListBegin();
19801
                  this.success = new ArrayList<UserCommunication>(_list24.size);
19802
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
19803
                  {
19804
                    UserCommunication _elem26;
19805
                    _elem26 = new UserCommunication();
19806
                    _elem26.read(iprot);
19807
                    this.success.add(_elem26);
19808
                  }
19809
                  iprot.readListEnd();
19810
                }
19811
              } else { 
19812
                TProtocolUtil.skip(iprot, field.type);
19813
              }
19814
              break;
19815
            case UCX:
19816
              if (field.type == TType.STRUCT) {
19817
                this.ucx = new UserCommunicationException();
19818
                this.ucx.read(iprot);
19819
              } else { 
19820
                TProtocolUtil.skip(iprot, field.type);
19821
              }
19822
              break;
19823
          }
19824
          iprot.readFieldEnd();
19825
        }
19826
      }
19827
      iprot.readStructEnd();
19828
      validate();
19829
    }
19830
 
19831
    public void write(TProtocol oprot) throws TException {
19832
      oprot.writeStructBegin(STRUCT_DESC);
19833
 
19834
      if (this.isSetSuccess()) {
19835
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19836
        {
19837
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
19838
          for (UserCommunication _iter27 : this.success)
19839
          {
19840
            _iter27.write(oprot);
19841
          }
19842
          oprot.writeListEnd();
19843
        }
19844
        oprot.writeFieldEnd();
19845
      } else if (this.isSetUcx()) {
19846
        oprot.writeFieldBegin(UCX_FIELD_DESC);
19847
        this.ucx.write(oprot);
19848
        oprot.writeFieldEnd();
19849
      }
19850
      oprot.writeFieldStop();
19851
      oprot.writeStructEnd();
19852
    }
19853
 
19854
    @Override
19855
    public String toString() {
19856
      StringBuilder sb = new StringBuilder("getAllUserCommunications_result(");
19857
      boolean first = true;
19858
 
19859
      sb.append("success:");
19860
      if (this.success == null) {
19861
        sb.append("null");
19862
      } else {
19863
        sb.append(this.success);
19864
      }
19865
      first = false;
19866
      if (!first) sb.append(", ");
19867
      sb.append("ucx:");
19868
      if (this.ucx == null) {
19869
        sb.append("null");
19870
      } else {
19871
        sb.append(this.ucx);
19872
      }
19873
      first = false;
19874
      sb.append(")");
19875
      return sb.toString();
19876
    }
19877
 
19878
    public void validate() throws TException {
19879
      // check for required fields
19880
    }
19881
 
19882
  }
19883
 
553 chandransh 19884
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
19885
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 19886
 
553 chandransh 19887
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 19888
 
553 chandransh 19889
    private long userId;
48 ashish 19890
 
19891
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19892
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19893
      USER_ID((short)1, "userId");
48 ashish 19894
 
19895
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19896
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19897
 
19898
      static {
19899
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19900
          byId.put((int)field._thriftId, field);
19901
          byName.put(field.getFieldName(), field);
19902
        }
19903
      }
19904
 
19905
      /**
19906
       * Find the _Fields constant that matches fieldId, or null if its not found.
19907
       */
19908
      public static _Fields findByThriftId(int fieldId) {
19909
        return byId.get(fieldId);
19910
      }
19911
 
19912
      /**
19913
       * Find the _Fields constant that matches fieldId, throwing an exception
19914
       * if it is not found.
19915
       */
19916
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19917
        _Fields fields = findByThriftId(fieldId);
19918
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19919
        return fields;
19920
      }
19921
 
19922
      /**
19923
       * Find the _Fields constant that matches name, or null if its not found.
19924
       */
19925
      public static _Fields findByName(String name) {
19926
        return byName.get(name);
19927
      }
19928
 
19929
      private final short _thriftId;
19930
      private final String _fieldName;
19931
 
19932
      _Fields(short thriftId, String fieldName) {
19933
        _thriftId = thriftId;
19934
        _fieldName = fieldName;
19935
      }
19936
 
19937
      public short getThriftFieldId() {
19938
        return _thriftId;
19939
      }
19940
 
19941
      public String getFieldName() {
19942
        return _fieldName;
19943
      }
19944
    }
19945
 
19946
    // isset id assignments
19947
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 19948
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 19949
 
19950
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19951
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 19952
          new FieldValueMetaData(TType.I64)));
19953
    }});
19954
 
19955
    static {
553 chandransh 19956
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 19957
    }
19958
 
553 chandransh 19959
    public createCart_args() {
48 ashish 19960
    }
19961
 
553 chandransh 19962
    public createCart_args(
19963
      long userId)
48 ashish 19964
    {
19965
      this();
553 chandransh 19966
      this.userId = userId;
19967
      setUserIdIsSet(true);
48 ashish 19968
    }
19969
 
19970
    /**
19971
     * Performs a deep copy on <i>other</i>.
19972
     */
553 chandransh 19973
    public createCart_args(createCart_args other) {
48 ashish 19974
      __isset_bit_vector.clear();
19975
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19976
      this.userId = other.userId;
48 ashish 19977
    }
19978
 
553 chandransh 19979
    public createCart_args deepCopy() {
19980
      return new createCart_args(this);
48 ashish 19981
    }
19982
 
19983
    @Deprecated
553 chandransh 19984
    public createCart_args clone() {
19985
      return new createCart_args(this);
48 ashish 19986
    }
19987
 
553 chandransh 19988
    public long getUserId() {
19989
      return this.userId;
48 ashish 19990
    }
19991
 
553 chandransh 19992
    public createCart_args setUserId(long userId) {
19993
      this.userId = userId;
19994
      setUserIdIsSet(true);
48 ashish 19995
      return this;
19996
    }
19997
 
553 chandransh 19998
    public void unsetUserId() {
48 ashish 19999
      __isset_bit_vector.clear(__USERID_ISSET_ID);
20000
    }
20001
 
553 chandransh 20002
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
20003
    public boolean isSetUserId() {
48 ashish 20004
      return __isset_bit_vector.get(__USERID_ISSET_ID);
20005
    }
20006
 
553 chandransh 20007
    public void setUserIdIsSet(boolean value) {
48 ashish 20008
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
20009
    }
20010
 
20011
    public void setFieldValue(_Fields field, Object value) {
20012
      switch (field) {
553 chandransh 20013
      case USER_ID:
48 ashish 20014
        if (value == null) {
553 chandransh 20015
          unsetUserId();
48 ashish 20016
        } else {
553 chandransh 20017
          setUserId((Long)value);
48 ashish 20018
        }
20019
        break;
20020
 
20021
      }
20022
    }
20023
 
20024
    public void setFieldValue(int fieldID, Object value) {
20025
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20026
    }
20027
 
20028
    public Object getFieldValue(_Fields field) {
20029
      switch (field) {
553 chandransh 20030
      case USER_ID:
20031
        return new Long(getUserId());
48 ashish 20032
 
20033
      }
20034
      throw new IllegalStateException();
20035
    }
20036
 
20037
    public Object getFieldValue(int fieldId) {
20038
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20039
    }
20040
 
20041
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20042
    public boolean isSet(_Fields field) {
20043
      switch (field) {
553 chandransh 20044
      case USER_ID:
20045
        return isSetUserId();
48 ashish 20046
      }
20047
      throw new IllegalStateException();
20048
    }
20049
 
20050
    public boolean isSet(int fieldID) {
20051
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20052
    }
20053
 
20054
    @Override
20055
    public boolean equals(Object that) {
20056
      if (that == null)
20057
        return false;
553 chandransh 20058
      if (that instanceof createCart_args)
20059
        return this.equals((createCart_args)that);
48 ashish 20060
      return false;
20061
    }
20062
 
553 chandransh 20063
    public boolean equals(createCart_args that) {
48 ashish 20064
      if (that == null)
20065
        return false;
20066
 
553 chandransh 20067
      boolean this_present_userId = true;
20068
      boolean that_present_userId = true;
20069
      if (this_present_userId || that_present_userId) {
20070
        if (!(this_present_userId && that_present_userId))
48 ashish 20071
          return false;
553 chandransh 20072
        if (this.userId != that.userId)
48 ashish 20073
          return false;
20074
      }
20075
 
20076
      return true;
20077
    }
20078
 
20079
    @Override
20080
    public int hashCode() {
20081
      return 0;
20082
    }
20083
 
553 chandransh 20084
    public int compareTo(createCart_args other) {
48 ashish 20085
      if (!getClass().equals(other.getClass())) {
20086
        return getClass().getName().compareTo(other.getClass().getName());
20087
      }
20088
 
20089
      int lastComparison = 0;
553 chandransh 20090
      createCart_args typedOther = (createCart_args)other;
48 ashish 20091
 
553 chandransh 20092
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 20093
      if (lastComparison != 0) {
20094
        return lastComparison;
20095
      }
553 chandransh 20096
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 20097
      if (lastComparison != 0) {
20098
        return lastComparison;
20099
      }
20100
      return 0;
20101
    }
20102
 
20103
    public void read(TProtocol iprot) throws TException {
20104
      TField field;
20105
      iprot.readStructBegin();
20106
      while (true)
20107
      {
20108
        field = iprot.readFieldBegin();
20109
        if (field.type == TType.STOP) { 
20110
          break;
20111
        }
20112
        _Fields fieldId = _Fields.findByThriftId(field.id);
20113
        if (fieldId == null) {
20114
          TProtocolUtil.skip(iprot, field.type);
20115
        } else {
20116
          switch (fieldId) {
553 chandransh 20117
            case USER_ID:
48 ashish 20118
              if (field.type == TType.I64) {
553 chandransh 20119
                this.userId = iprot.readI64();
20120
                setUserIdIsSet(true);
48 ashish 20121
              } else { 
20122
                TProtocolUtil.skip(iprot, field.type);
20123
              }
20124
              break;
20125
          }
20126
          iprot.readFieldEnd();
20127
        }
20128
      }
20129
      iprot.readStructEnd();
20130
      validate();
20131
    }
20132
 
20133
    public void write(TProtocol oprot) throws TException {
20134
      validate();
20135
 
20136
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 20137
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
20138
      oprot.writeI64(this.userId);
48 ashish 20139
      oprot.writeFieldEnd();
20140
      oprot.writeFieldStop();
20141
      oprot.writeStructEnd();
20142
    }
20143
 
20144
    @Override
20145
    public String toString() {
553 chandransh 20146
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 20147
      boolean first = true;
20148
 
553 chandransh 20149
      sb.append("userId:");
20150
      sb.append(this.userId);
48 ashish 20151
      first = false;
20152
      sb.append(")");
20153
      return sb.toString();
20154
    }
20155
 
20156
    public void validate() throws TException {
20157
      // check for required fields
20158
    }
20159
 
20160
  }
20161
 
553 chandransh 20162
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
20163
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 20164
 
553 chandransh 20165
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
20166
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20167
 
553 chandransh 20168
    private long success;
20169
    private ShoppingCartException scx;
48 ashish 20170
 
20171
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20172
    public enum _Fields implements TFieldIdEnum {
20173
      SUCCESS((short)0, "success"),
553 chandransh 20174
      SCX((short)1, "scx");
48 ashish 20175
 
20176
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20177
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20178
 
20179
      static {
20180
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20181
          byId.put((int)field._thriftId, field);
20182
          byName.put(field.getFieldName(), field);
20183
        }
20184
      }
20185
 
20186
      /**
20187
       * Find the _Fields constant that matches fieldId, or null if its not found.
20188
       */
20189
      public static _Fields findByThriftId(int fieldId) {
20190
        return byId.get(fieldId);
20191
      }
20192
 
20193
      /**
20194
       * Find the _Fields constant that matches fieldId, throwing an exception
20195
       * if it is not found.
20196
       */
20197
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20198
        _Fields fields = findByThriftId(fieldId);
20199
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20200
        return fields;
20201
      }
20202
 
20203
      /**
20204
       * Find the _Fields constant that matches name, or null if its not found.
20205
       */
20206
      public static _Fields findByName(String name) {
20207
        return byName.get(name);
20208
      }
20209
 
20210
      private final short _thriftId;
20211
      private final String _fieldName;
20212
 
20213
      _Fields(short thriftId, String fieldName) {
20214
        _thriftId = thriftId;
20215
        _fieldName = fieldName;
20216
      }
20217
 
20218
      public short getThriftFieldId() {
20219
        return _thriftId;
20220
      }
20221
 
20222
      public String getFieldName() {
20223
        return _fieldName;
20224
      }
20225
    }
20226
 
20227
    // isset id assignments
20228
    private static final int __SUCCESS_ISSET_ID = 0;
20229
    private BitSet __isset_bit_vector = new BitSet(1);
20230
 
20231
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20232
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 20233
          new FieldValueMetaData(TType.I64)));
20234
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 20235
          new FieldValueMetaData(TType.STRUCT)));
20236
    }});
20237
 
20238
    static {
553 chandransh 20239
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 20240
    }
20241
 
553 chandransh 20242
    public createCart_result() {
48 ashish 20243
    }
20244
 
553 chandransh 20245
    public createCart_result(
20246
      long success,
20247
      ShoppingCartException scx)
48 ashish 20248
    {
20249
      this();
20250
      this.success = success;
20251
      setSuccessIsSet(true);
553 chandransh 20252
      this.scx = scx;
48 ashish 20253
    }
20254
 
20255
    /**
20256
     * Performs a deep copy on <i>other</i>.
20257
     */
553 chandransh 20258
    public createCart_result(createCart_result other) {
48 ashish 20259
      __isset_bit_vector.clear();
20260
      __isset_bit_vector.or(other.__isset_bit_vector);
20261
      this.success = other.success;
553 chandransh 20262
      if (other.isSetScx()) {
20263
        this.scx = new ShoppingCartException(other.scx);
48 ashish 20264
      }
20265
    }
20266
 
553 chandransh 20267
    public createCart_result deepCopy() {
20268
      return new createCart_result(this);
48 ashish 20269
    }
20270
 
20271
    @Deprecated
553 chandransh 20272
    public createCart_result clone() {
20273
      return new createCart_result(this);
48 ashish 20274
    }
20275
 
553 chandransh 20276
    public long getSuccess() {
48 ashish 20277
      return this.success;
20278
    }
20279
 
553 chandransh 20280
    public createCart_result setSuccess(long success) {
48 ashish 20281
      this.success = success;
20282
      setSuccessIsSet(true);
20283
      return this;
20284
    }
20285
 
20286
    public void unsetSuccess() {
20287
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20288
    }
20289
 
20290
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20291
    public boolean isSetSuccess() {
20292
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20293
    }
20294
 
20295
    public void setSuccessIsSet(boolean value) {
20296
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20297
    }
20298
 
553 chandransh 20299
    public ShoppingCartException getScx() {
20300
      return this.scx;
48 ashish 20301
    }
20302
 
553 chandransh 20303
    public createCart_result setScx(ShoppingCartException scx) {
20304
      this.scx = scx;
48 ashish 20305
      return this;
20306
    }
20307
 
553 chandransh 20308
    public void unsetScx() {
20309
      this.scx = null;
48 ashish 20310
    }
20311
 
553 chandransh 20312
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20313
    public boolean isSetScx() {
20314
      return this.scx != null;
48 ashish 20315
    }
20316
 
553 chandransh 20317
    public void setScxIsSet(boolean value) {
48 ashish 20318
      if (!value) {
553 chandransh 20319
        this.scx = null;
48 ashish 20320
      }
20321
    }
20322
 
20323
    public void setFieldValue(_Fields field, Object value) {
20324
      switch (field) {
20325
      case SUCCESS:
20326
        if (value == null) {
20327
          unsetSuccess();
20328
        } else {
553 chandransh 20329
          setSuccess((Long)value);
48 ashish 20330
        }
20331
        break;
20332
 
553 chandransh 20333
      case SCX:
48 ashish 20334
        if (value == null) {
553 chandransh 20335
          unsetScx();
48 ashish 20336
        } else {
553 chandransh 20337
          setScx((ShoppingCartException)value);
48 ashish 20338
        }
20339
        break;
20340
 
20341
      }
20342
    }
20343
 
20344
    public void setFieldValue(int fieldID, Object value) {
20345
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20346
    }
20347
 
20348
    public Object getFieldValue(_Fields field) {
20349
      switch (field) {
20350
      case SUCCESS:
553 chandransh 20351
        return new Long(getSuccess());
48 ashish 20352
 
553 chandransh 20353
      case SCX:
20354
        return getScx();
48 ashish 20355
 
20356
      }
20357
      throw new IllegalStateException();
20358
    }
20359
 
20360
    public Object getFieldValue(int fieldId) {
20361
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20362
    }
20363
 
20364
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20365
    public boolean isSet(_Fields field) {
20366
      switch (field) {
20367
      case SUCCESS:
20368
        return isSetSuccess();
553 chandransh 20369
      case SCX:
20370
        return isSetScx();
48 ashish 20371
      }
20372
      throw new IllegalStateException();
20373
    }
20374
 
20375
    public boolean isSet(int fieldID) {
20376
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20377
    }
20378
 
20379
    @Override
20380
    public boolean equals(Object that) {
20381
      if (that == null)
20382
        return false;
553 chandransh 20383
      if (that instanceof createCart_result)
20384
        return this.equals((createCart_result)that);
48 ashish 20385
      return false;
20386
    }
20387
 
553 chandransh 20388
    public boolean equals(createCart_result that) {
48 ashish 20389
      if (that == null)
20390
        return false;
20391
 
20392
      boolean this_present_success = true;
20393
      boolean that_present_success = true;
20394
      if (this_present_success || that_present_success) {
20395
        if (!(this_present_success && that_present_success))
20396
          return false;
20397
        if (this.success != that.success)
20398
          return false;
20399
      }
20400
 
553 chandransh 20401
      boolean this_present_scx = true && this.isSetScx();
20402
      boolean that_present_scx = true && that.isSetScx();
20403
      if (this_present_scx || that_present_scx) {
20404
        if (!(this_present_scx && that_present_scx))
48 ashish 20405
          return false;
553 chandransh 20406
        if (!this.scx.equals(that.scx))
48 ashish 20407
          return false;
20408
      }
20409
 
20410
      return true;
20411
    }
20412
 
20413
    @Override
20414
    public int hashCode() {
20415
      return 0;
20416
    }
20417
 
553 chandransh 20418
    public int compareTo(createCart_result other) {
48 ashish 20419
      if (!getClass().equals(other.getClass())) {
20420
        return getClass().getName().compareTo(other.getClass().getName());
20421
      }
20422
 
20423
      int lastComparison = 0;
553 chandransh 20424
      createCart_result typedOther = (createCart_result)other;
48 ashish 20425
 
20426
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20427
      if (lastComparison != 0) {
20428
        return lastComparison;
20429
      }
20430
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20431
      if (lastComparison != 0) {
20432
        return lastComparison;
20433
      }
553 chandransh 20434
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 20435
      if (lastComparison != 0) {
20436
        return lastComparison;
20437
      }
553 chandransh 20438
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 20439
      if (lastComparison != 0) {
20440
        return lastComparison;
20441
      }
20442
      return 0;
20443
    }
20444
 
20445
    public void read(TProtocol iprot) throws TException {
20446
      TField field;
20447
      iprot.readStructBegin();
20448
      while (true)
20449
      {
20450
        field = iprot.readFieldBegin();
20451
        if (field.type == TType.STOP) { 
20452
          break;
20453
        }
20454
        _Fields fieldId = _Fields.findByThriftId(field.id);
20455
        if (fieldId == null) {
20456
          TProtocolUtil.skip(iprot, field.type);
20457
        } else {
20458
          switch (fieldId) {
20459
            case SUCCESS:
553 chandransh 20460
              if (field.type == TType.I64) {
20461
                this.success = iprot.readI64();
48 ashish 20462
                setSuccessIsSet(true);
20463
              } else { 
20464
                TProtocolUtil.skip(iprot, field.type);
20465
              }
20466
              break;
553 chandransh 20467
            case SCX:
48 ashish 20468
              if (field.type == TType.STRUCT) {
553 chandransh 20469
                this.scx = new ShoppingCartException();
20470
                this.scx.read(iprot);
48 ashish 20471
              } else { 
20472
                TProtocolUtil.skip(iprot, field.type);
20473
              }
20474
              break;
20475
          }
20476
          iprot.readFieldEnd();
20477
        }
20478
      }
20479
      iprot.readStructEnd();
20480
      validate();
20481
    }
20482
 
20483
    public void write(TProtocol oprot) throws TException {
20484
      oprot.writeStructBegin(STRUCT_DESC);
20485
 
20486
      if (this.isSetSuccess()) {
20487
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 20488
        oprot.writeI64(this.success);
48 ashish 20489
        oprot.writeFieldEnd();
553 chandransh 20490
      } else if (this.isSetScx()) {
20491
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20492
        this.scx.write(oprot);
48 ashish 20493
        oprot.writeFieldEnd();
20494
      }
20495
      oprot.writeFieldStop();
20496
      oprot.writeStructEnd();
20497
    }
20498
 
20499
    @Override
20500
    public String toString() {
553 chandransh 20501
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 20502
      boolean first = true;
20503
 
20504
      sb.append("success:");
20505
      sb.append(this.success);
20506
      first = false;
20507
      if (!first) sb.append(", ");
553 chandransh 20508
      sb.append("scx:");
20509
      if (this.scx == null) {
48 ashish 20510
        sb.append("null");
20511
      } else {
553 chandransh 20512
        sb.append(this.scx);
48 ashish 20513
      }
20514
      first = false;
20515
      sb.append(")");
20516
      return sb.toString();
20517
    }
20518
 
20519
    public void validate() throws TException {
20520
      // check for required fields
20521
    }
20522
 
20523
  }
20524
 
553 chandransh 20525
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
20526
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 20527
 
553 chandransh 20528
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 20529
 
553 chandransh 20530
    private long userId;
506 rajveer 20531
 
20532
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20533
    public enum _Fields implements TFieldIdEnum {
553 chandransh 20534
      USER_ID((short)1, "userId");
506 rajveer 20535
 
20536
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20537
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20538
 
20539
      static {
20540
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20541
          byId.put((int)field._thriftId, field);
20542
          byName.put(field.getFieldName(), field);
20543
        }
20544
      }
20545
 
20546
      /**
20547
       * Find the _Fields constant that matches fieldId, or null if its not found.
20548
       */
20549
      public static _Fields findByThriftId(int fieldId) {
20550
        return byId.get(fieldId);
20551
      }
20552
 
20553
      /**
20554
       * Find the _Fields constant that matches fieldId, throwing an exception
20555
       * if it is not found.
20556
       */
20557
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20558
        _Fields fields = findByThriftId(fieldId);
20559
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20560
        return fields;
20561
      }
20562
 
20563
      /**
20564
       * Find the _Fields constant that matches name, or null if its not found.
20565
       */
20566
      public static _Fields findByName(String name) {
20567
        return byName.get(name);
20568
      }
20569
 
20570
      private final short _thriftId;
20571
      private final String _fieldName;
20572
 
20573
      _Fields(short thriftId, String fieldName) {
20574
        _thriftId = thriftId;
20575
        _fieldName = fieldName;
20576
      }
20577
 
20578
      public short getThriftFieldId() {
20579
        return _thriftId;
20580
      }
20581
 
20582
      public String getFieldName() {
20583
        return _fieldName;
20584
      }
20585
    }
20586
 
20587
    // isset id assignments
20588
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 20589
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 20590
 
20591
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20592
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 20593
          new FieldValueMetaData(TType.I64)));
20594
    }});
20595
 
20596
    static {
553 chandransh 20597
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 20598
    }
20599
 
553 chandransh 20600
    public getCurrentCart_args() {
506 rajveer 20601
    }
20602
 
553 chandransh 20603
    public getCurrentCart_args(
20604
      long userId)
506 rajveer 20605
    {
20606
      this();
553 chandransh 20607
      this.userId = userId;
20608
      setUserIdIsSet(true);
506 rajveer 20609
    }
20610
 
20611
    /**
20612
     * Performs a deep copy on <i>other</i>.
20613
     */
553 chandransh 20614
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 20615
      __isset_bit_vector.clear();
20616
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20617
      this.userId = other.userId;
506 rajveer 20618
    }
20619
 
553 chandransh 20620
    public getCurrentCart_args deepCopy() {
20621
      return new getCurrentCart_args(this);
506 rajveer 20622
    }
20623
 
20624
    @Deprecated
553 chandransh 20625
    public getCurrentCart_args clone() {
20626
      return new getCurrentCart_args(this);
506 rajveer 20627
    }
20628
 
553 chandransh 20629
    public long getUserId() {
20630
      return this.userId;
506 rajveer 20631
    }
20632
 
553 chandransh 20633
    public getCurrentCart_args setUserId(long userId) {
20634
      this.userId = userId;
20635
      setUserIdIsSet(true);
506 rajveer 20636
      return this;
20637
    }
20638
 
553 chandransh 20639
    public void unsetUserId() {
506 rajveer 20640
      __isset_bit_vector.clear(__USERID_ISSET_ID);
20641
    }
20642
 
553 chandransh 20643
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
20644
    public boolean isSetUserId() {
506 rajveer 20645
      return __isset_bit_vector.get(__USERID_ISSET_ID);
20646
    }
20647
 
553 chandransh 20648
    public void setUserIdIsSet(boolean value) {
506 rajveer 20649
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
20650
    }
20651
 
553 chandransh 20652
    public void setFieldValue(_Fields field, Object value) {
20653
      switch (field) {
20654
      case USER_ID:
20655
        if (value == null) {
20656
          unsetUserId();
20657
        } else {
20658
          setUserId((Long)value);
20659
        }
20660
        break;
20661
 
20662
      }
506 rajveer 20663
    }
20664
 
553 chandransh 20665
    public void setFieldValue(int fieldID, Object value) {
20666
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20667
    }
20668
 
20669
    public Object getFieldValue(_Fields field) {
20670
      switch (field) {
20671
      case USER_ID:
20672
        return new Long(getUserId());
20673
 
20674
      }
20675
      throw new IllegalStateException();
20676
    }
20677
 
20678
    public Object getFieldValue(int fieldId) {
20679
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20680
    }
20681
 
20682
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20683
    public boolean isSet(_Fields field) {
20684
      switch (field) {
20685
      case USER_ID:
20686
        return isSetUserId();
20687
      }
20688
      throw new IllegalStateException();
20689
    }
20690
 
20691
    public boolean isSet(int fieldID) {
20692
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20693
    }
20694
 
20695
    @Override
20696
    public boolean equals(Object that) {
20697
      if (that == null)
20698
        return false;
20699
      if (that instanceof getCurrentCart_args)
20700
        return this.equals((getCurrentCart_args)that);
20701
      return false;
20702
    }
20703
 
20704
    public boolean equals(getCurrentCart_args that) {
20705
      if (that == null)
20706
        return false;
20707
 
20708
      boolean this_present_userId = true;
20709
      boolean that_present_userId = true;
20710
      if (this_present_userId || that_present_userId) {
20711
        if (!(this_present_userId && that_present_userId))
20712
          return false;
20713
        if (this.userId != that.userId)
20714
          return false;
20715
      }
20716
 
20717
      return true;
20718
    }
20719
 
20720
    @Override
20721
    public int hashCode() {
20722
      return 0;
20723
    }
20724
 
20725
    public int compareTo(getCurrentCart_args other) {
20726
      if (!getClass().equals(other.getClass())) {
20727
        return getClass().getName().compareTo(other.getClass().getName());
20728
      }
20729
 
20730
      int lastComparison = 0;
20731
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
20732
 
20733
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
20734
      if (lastComparison != 0) {
20735
        return lastComparison;
20736
      }
20737
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
20738
      if (lastComparison != 0) {
20739
        return lastComparison;
20740
      }
20741
      return 0;
20742
    }
20743
 
20744
    public void read(TProtocol iprot) throws TException {
20745
      TField field;
20746
      iprot.readStructBegin();
20747
      while (true)
20748
      {
20749
        field = iprot.readFieldBegin();
20750
        if (field.type == TType.STOP) { 
20751
          break;
20752
        }
20753
        _Fields fieldId = _Fields.findByThriftId(field.id);
20754
        if (fieldId == null) {
20755
          TProtocolUtil.skip(iprot, field.type);
20756
        } else {
20757
          switch (fieldId) {
20758
            case USER_ID:
20759
              if (field.type == TType.I64) {
20760
                this.userId = iprot.readI64();
20761
                setUserIdIsSet(true);
20762
              } else { 
20763
                TProtocolUtil.skip(iprot, field.type);
20764
              }
20765
              break;
20766
          }
20767
          iprot.readFieldEnd();
20768
        }
20769
      }
20770
      iprot.readStructEnd();
20771
      validate();
20772
    }
20773
 
20774
    public void write(TProtocol oprot) throws TException {
20775
      validate();
20776
 
20777
      oprot.writeStructBegin(STRUCT_DESC);
20778
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
20779
      oprot.writeI64(this.userId);
20780
      oprot.writeFieldEnd();
20781
      oprot.writeFieldStop();
20782
      oprot.writeStructEnd();
20783
    }
20784
 
20785
    @Override
20786
    public String toString() {
20787
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
20788
      boolean first = true;
20789
 
20790
      sb.append("userId:");
20791
      sb.append(this.userId);
20792
      first = false;
20793
      sb.append(")");
20794
      return sb.toString();
20795
    }
20796
 
20797
    public void validate() throws TException {
20798
      // check for required fields
20799
    }
20800
 
20801
  }
20802
 
20803
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
20804
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
20805
 
20806
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
20807
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20808
 
20809
    private Cart success;
20810
    private ShoppingCartException scx;
20811
 
20812
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20813
    public enum _Fields implements TFieldIdEnum {
20814
      SUCCESS((short)0, "success"),
20815
      SCX((short)1, "scx");
20816
 
20817
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20818
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20819
 
20820
      static {
20821
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20822
          byId.put((int)field._thriftId, field);
20823
          byName.put(field.getFieldName(), field);
20824
        }
20825
      }
20826
 
20827
      /**
20828
       * Find the _Fields constant that matches fieldId, or null if its not found.
20829
       */
20830
      public static _Fields findByThriftId(int fieldId) {
20831
        return byId.get(fieldId);
20832
      }
20833
 
20834
      /**
20835
       * Find the _Fields constant that matches fieldId, throwing an exception
20836
       * if it is not found.
20837
       */
20838
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20839
        _Fields fields = findByThriftId(fieldId);
20840
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20841
        return fields;
20842
      }
20843
 
20844
      /**
20845
       * Find the _Fields constant that matches name, or null if its not found.
20846
       */
20847
      public static _Fields findByName(String name) {
20848
        return byName.get(name);
20849
      }
20850
 
20851
      private final short _thriftId;
20852
      private final String _fieldName;
20853
 
20854
      _Fields(short thriftId, String fieldName) {
20855
        _thriftId = thriftId;
20856
        _fieldName = fieldName;
20857
      }
20858
 
20859
      public short getThriftFieldId() {
20860
        return _thriftId;
20861
      }
20862
 
20863
      public String getFieldName() {
20864
        return _fieldName;
20865
      }
20866
    }
20867
 
20868
    // isset id assignments
20869
 
20870
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20871
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20872
          new StructMetaData(TType.STRUCT, Cart.class)));
20873
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20874
          new FieldValueMetaData(TType.STRUCT)));
20875
    }});
20876
 
20877
    static {
20878
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
20879
    }
20880
 
20881
    public getCurrentCart_result() {
20882
    }
20883
 
20884
    public getCurrentCart_result(
20885
      Cart success,
20886
      ShoppingCartException scx)
20887
    {
20888
      this();
20889
      this.success = success;
20890
      this.scx = scx;
20891
    }
20892
 
20893
    /**
20894
     * Performs a deep copy on <i>other</i>.
20895
     */
20896
    public getCurrentCart_result(getCurrentCart_result other) {
20897
      if (other.isSetSuccess()) {
20898
        this.success = new Cart(other.success);
20899
      }
20900
      if (other.isSetScx()) {
20901
        this.scx = new ShoppingCartException(other.scx);
20902
      }
20903
    }
20904
 
20905
    public getCurrentCart_result deepCopy() {
20906
      return new getCurrentCart_result(this);
20907
    }
20908
 
20909
    @Deprecated
20910
    public getCurrentCart_result clone() {
20911
      return new getCurrentCart_result(this);
20912
    }
20913
 
20914
    public Cart getSuccess() {
20915
      return this.success;
20916
    }
20917
 
20918
    public getCurrentCart_result setSuccess(Cart success) {
20919
      this.success = success;
506 rajveer 20920
      return this;
20921
    }
20922
 
553 chandransh 20923
    public void unsetSuccess() {
20924
      this.success = null;
506 rajveer 20925
    }
20926
 
553 chandransh 20927
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20928
    public boolean isSetSuccess() {
20929
      return this.success != null;
506 rajveer 20930
    }
20931
 
553 chandransh 20932
    public void setSuccessIsSet(boolean value) {
20933
      if (!value) {
20934
        this.success = null;
20935
      }
506 rajveer 20936
    }
20937
 
553 chandransh 20938
    public ShoppingCartException getScx() {
20939
      return this.scx;
20940
    }
20941
 
20942
    public getCurrentCart_result setScx(ShoppingCartException scx) {
20943
      this.scx = scx;
20944
      return this;
20945
    }
20946
 
20947
    public void unsetScx() {
20948
      this.scx = null;
20949
    }
20950
 
20951
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20952
    public boolean isSetScx() {
20953
      return this.scx != null;
20954
    }
20955
 
20956
    public void setScxIsSet(boolean value) {
20957
      if (!value) {
20958
        this.scx = null;
20959
      }
20960
    }
20961
 
506 rajveer 20962
    public void setFieldValue(_Fields field, Object value) {
20963
      switch (field) {
553 chandransh 20964
      case SUCCESS:
506 rajveer 20965
        if (value == null) {
553 chandransh 20966
          unsetSuccess();
506 rajveer 20967
        } else {
553 chandransh 20968
          setSuccess((Cart)value);
506 rajveer 20969
        }
20970
        break;
20971
 
553 chandransh 20972
      case SCX:
506 rajveer 20973
        if (value == null) {
553 chandransh 20974
          unsetScx();
506 rajveer 20975
        } else {
553 chandransh 20976
          setScx((ShoppingCartException)value);
506 rajveer 20977
        }
20978
        break;
20979
 
20980
      }
20981
    }
20982
 
20983
    public void setFieldValue(int fieldID, Object value) {
20984
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20985
    }
20986
 
20987
    public Object getFieldValue(_Fields field) {
20988
      switch (field) {
553 chandransh 20989
      case SUCCESS:
20990
        return getSuccess();
506 rajveer 20991
 
553 chandransh 20992
      case SCX:
20993
        return getScx();
506 rajveer 20994
 
20995
      }
20996
      throw new IllegalStateException();
20997
    }
20998
 
20999
    public Object getFieldValue(int fieldId) {
21000
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21001
    }
21002
 
21003
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21004
    public boolean isSet(_Fields field) {
21005
      switch (field) {
553 chandransh 21006
      case SUCCESS:
21007
        return isSetSuccess();
21008
      case SCX:
21009
        return isSetScx();
506 rajveer 21010
      }
21011
      throw new IllegalStateException();
21012
    }
21013
 
21014
    public boolean isSet(int fieldID) {
21015
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21016
    }
21017
 
21018
    @Override
21019
    public boolean equals(Object that) {
21020
      if (that == null)
21021
        return false;
553 chandransh 21022
      if (that instanceof getCurrentCart_result)
21023
        return this.equals((getCurrentCart_result)that);
506 rajveer 21024
      return false;
21025
    }
21026
 
553 chandransh 21027
    public boolean equals(getCurrentCart_result that) {
506 rajveer 21028
      if (that == null)
21029
        return false;
21030
 
553 chandransh 21031
      boolean this_present_success = true && this.isSetSuccess();
21032
      boolean that_present_success = true && that.isSetSuccess();
21033
      if (this_present_success || that_present_success) {
21034
        if (!(this_present_success && that_present_success))
506 rajveer 21035
          return false;
553 chandransh 21036
        if (!this.success.equals(that.success))
506 rajveer 21037
          return false;
21038
      }
21039
 
553 chandransh 21040
      boolean this_present_scx = true && this.isSetScx();
21041
      boolean that_present_scx = true && that.isSetScx();
21042
      if (this_present_scx || that_present_scx) {
21043
        if (!(this_present_scx && that_present_scx))
506 rajveer 21044
          return false;
553 chandransh 21045
        if (!this.scx.equals(that.scx))
506 rajveer 21046
          return false;
21047
      }
21048
 
21049
      return true;
21050
    }
21051
 
21052
    @Override
21053
    public int hashCode() {
21054
      return 0;
21055
    }
21056
 
553 chandransh 21057
    public int compareTo(getCurrentCart_result other) {
506 rajveer 21058
      if (!getClass().equals(other.getClass())) {
21059
        return getClass().getName().compareTo(other.getClass().getName());
21060
      }
21061
 
21062
      int lastComparison = 0;
553 chandransh 21063
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 21064
 
553 chandransh 21065
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 21066
      if (lastComparison != 0) {
21067
        return lastComparison;
21068
      }
553 chandransh 21069
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 21070
      if (lastComparison != 0) {
21071
        return lastComparison;
21072
      }
553 chandransh 21073
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 21074
      if (lastComparison != 0) {
21075
        return lastComparison;
21076
      }
553 chandransh 21077
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 21078
      if (lastComparison != 0) {
21079
        return lastComparison;
21080
      }
21081
      return 0;
21082
    }
21083
 
21084
    public void read(TProtocol iprot) throws TException {
21085
      TField field;
21086
      iprot.readStructBegin();
21087
      while (true)
21088
      {
21089
        field = iprot.readFieldBegin();
21090
        if (field.type == TType.STOP) { 
21091
          break;
21092
        }
21093
        _Fields fieldId = _Fields.findByThriftId(field.id);
21094
        if (fieldId == null) {
21095
          TProtocolUtil.skip(iprot, field.type);
21096
        } else {
21097
          switch (fieldId) {
553 chandransh 21098
            case SUCCESS:
21099
              if (field.type == TType.STRUCT) {
21100
                this.success = new Cart();
21101
                this.success.read(iprot);
506 rajveer 21102
              } else { 
21103
                TProtocolUtil.skip(iprot, field.type);
21104
              }
21105
              break;
553 chandransh 21106
            case SCX:
21107
              if (field.type == TType.STRUCT) {
21108
                this.scx = new ShoppingCartException();
21109
                this.scx.read(iprot);
21110
              } else { 
21111
                TProtocolUtil.skip(iprot, field.type);
21112
              }
21113
              break;
21114
          }
21115
          iprot.readFieldEnd();
21116
        }
21117
      }
21118
      iprot.readStructEnd();
21119
      validate();
21120
    }
21121
 
21122
    public void write(TProtocol oprot) throws TException {
21123
      oprot.writeStructBegin(STRUCT_DESC);
21124
 
21125
      if (this.isSetSuccess()) {
21126
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21127
        this.success.write(oprot);
21128
        oprot.writeFieldEnd();
21129
      } else if (this.isSetScx()) {
21130
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21131
        this.scx.write(oprot);
21132
        oprot.writeFieldEnd();
21133
      }
21134
      oprot.writeFieldStop();
21135
      oprot.writeStructEnd();
21136
    }
21137
 
21138
    @Override
21139
    public String toString() {
21140
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
21141
      boolean first = true;
21142
 
21143
      sb.append("success:");
21144
      if (this.success == null) {
21145
        sb.append("null");
21146
      } else {
21147
        sb.append(this.success);
21148
      }
21149
      first = false;
21150
      if (!first) sb.append(", ");
21151
      sb.append("scx:");
21152
      if (this.scx == null) {
21153
        sb.append("null");
21154
      } else {
21155
        sb.append(this.scx);
21156
      }
21157
      first = false;
21158
      sb.append(")");
21159
      return sb.toString();
21160
    }
21161
 
21162
    public void validate() throws TException {
21163
      // check for required fields
21164
    }
21165
 
21166
  }
21167
 
21168
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
21169
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
21170
 
21171
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21172
 
21173
    private long cartId;
21174
 
21175
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21176
    public enum _Fields implements TFieldIdEnum {
21177
      CART_ID((short)1, "cartId");
21178
 
21179
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21180
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21181
 
21182
      static {
21183
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21184
          byId.put((int)field._thriftId, field);
21185
          byName.put(field.getFieldName(), field);
21186
        }
21187
      }
21188
 
21189
      /**
21190
       * Find the _Fields constant that matches fieldId, or null if its not found.
21191
       */
21192
      public static _Fields findByThriftId(int fieldId) {
21193
        return byId.get(fieldId);
21194
      }
21195
 
21196
      /**
21197
       * Find the _Fields constant that matches fieldId, throwing an exception
21198
       * if it is not found.
21199
       */
21200
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21201
        _Fields fields = findByThriftId(fieldId);
21202
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21203
        return fields;
21204
      }
21205
 
21206
      /**
21207
       * Find the _Fields constant that matches name, or null if its not found.
21208
       */
21209
      public static _Fields findByName(String name) {
21210
        return byName.get(name);
21211
      }
21212
 
21213
      private final short _thriftId;
21214
      private final String _fieldName;
21215
 
21216
      _Fields(short thriftId, String fieldName) {
21217
        _thriftId = thriftId;
21218
        _fieldName = fieldName;
21219
      }
21220
 
21221
      public short getThriftFieldId() {
21222
        return _thriftId;
21223
      }
21224
 
21225
      public String getFieldName() {
21226
        return _fieldName;
21227
      }
21228
    }
21229
 
21230
    // isset id assignments
21231
    private static final int __CARTID_ISSET_ID = 0;
21232
    private BitSet __isset_bit_vector = new BitSet(1);
21233
 
21234
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21235
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
21236
          new FieldValueMetaData(TType.I64)));
21237
    }});
21238
 
21239
    static {
21240
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
21241
    }
21242
 
21243
    public getCart_args() {
21244
    }
21245
 
21246
    public getCart_args(
21247
      long cartId)
21248
    {
21249
      this();
21250
      this.cartId = cartId;
21251
      setCartIdIsSet(true);
21252
    }
21253
 
21254
    /**
21255
     * Performs a deep copy on <i>other</i>.
21256
     */
21257
    public getCart_args(getCart_args other) {
21258
      __isset_bit_vector.clear();
21259
      __isset_bit_vector.or(other.__isset_bit_vector);
21260
      this.cartId = other.cartId;
21261
    }
21262
 
21263
    public getCart_args deepCopy() {
21264
      return new getCart_args(this);
21265
    }
21266
 
21267
    @Deprecated
21268
    public getCart_args clone() {
21269
      return new getCart_args(this);
21270
    }
21271
 
21272
    public long getCartId() {
21273
      return this.cartId;
21274
    }
21275
 
21276
    public getCart_args setCartId(long cartId) {
21277
      this.cartId = cartId;
21278
      setCartIdIsSet(true);
21279
      return this;
21280
    }
21281
 
21282
    public void unsetCartId() {
21283
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
21284
    }
21285
 
21286
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21287
    public boolean isSetCartId() {
21288
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
21289
    }
21290
 
21291
    public void setCartIdIsSet(boolean value) {
21292
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
21293
    }
21294
 
21295
    public void setFieldValue(_Fields field, Object value) {
21296
      switch (field) {
21297
      case CART_ID:
21298
        if (value == null) {
21299
          unsetCartId();
21300
        } else {
21301
          setCartId((Long)value);
21302
        }
21303
        break;
21304
 
21305
      }
21306
    }
21307
 
21308
    public void setFieldValue(int fieldID, Object value) {
21309
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21310
    }
21311
 
21312
    public Object getFieldValue(_Fields field) {
21313
      switch (field) {
21314
      case CART_ID:
21315
        return new Long(getCartId());
21316
 
21317
      }
21318
      throw new IllegalStateException();
21319
    }
21320
 
21321
    public Object getFieldValue(int fieldId) {
21322
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21323
    }
21324
 
21325
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21326
    public boolean isSet(_Fields field) {
21327
      switch (field) {
21328
      case CART_ID:
21329
        return isSetCartId();
21330
      }
21331
      throw new IllegalStateException();
21332
    }
21333
 
21334
    public boolean isSet(int fieldID) {
21335
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21336
    }
21337
 
21338
    @Override
21339
    public boolean equals(Object that) {
21340
      if (that == null)
21341
        return false;
21342
      if (that instanceof getCart_args)
21343
        return this.equals((getCart_args)that);
21344
      return false;
21345
    }
21346
 
21347
    public boolean equals(getCart_args that) {
21348
      if (that == null)
21349
        return false;
21350
 
21351
      boolean this_present_cartId = true;
21352
      boolean that_present_cartId = true;
21353
      if (this_present_cartId || that_present_cartId) {
21354
        if (!(this_present_cartId && that_present_cartId))
21355
          return false;
21356
        if (this.cartId != that.cartId)
21357
          return false;
21358
      }
21359
 
21360
      return true;
21361
    }
21362
 
21363
    @Override
21364
    public int hashCode() {
21365
      return 0;
21366
    }
21367
 
21368
    public int compareTo(getCart_args other) {
21369
      if (!getClass().equals(other.getClass())) {
21370
        return getClass().getName().compareTo(other.getClass().getName());
21371
      }
21372
 
21373
      int lastComparison = 0;
21374
      getCart_args typedOther = (getCart_args)other;
21375
 
21376
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
21377
      if (lastComparison != 0) {
21378
        return lastComparison;
21379
      }
21380
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
21381
      if (lastComparison != 0) {
21382
        return lastComparison;
21383
      }
21384
      return 0;
21385
    }
21386
 
21387
    public void read(TProtocol iprot) throws TException {
21388
      TField field;
21389
      iprot.readStructBegin();
21390
      while (true)
21391
      {
21392
        field = iprot.readFieldBegin();
21393
        if (field.type == TType.STOP) { 
21394
          break;
21395
        }
21396
        _Fields fieldId = _Fields.findByThriftId(field.id);
21397
        if (fieldId == null) {
21398
          TProtocolUtil.skip(iprot, field.type);
21399
        } else {
21400
          switch (fieldId) {
21401
            case CART_ID:
506 rajveer 21402
              if (field.type == TType.I64) {
553 chandransh 21403
                this.cartId = iprot.readI64();
21404
                setCartIdIsSet(true);
506 rajveer 21405
              } else { 
21406
                TProtocolUtil.skip(iprot, field.type);
21407
              }
21408
              break;
21409
          }
21410
          iprot.readFieldEnd();
21411
        }
21412
      }
21413
      iprot.readStructEnd();
21414
      validate();
21415
    }
21416
 
21417
    public void write(TProtocol oprot) throws TException {
21418
      validate();
21419
 
21420
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21421
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21422
      oprot.writeI64(this.cartId);
506 rajveer 21423
      oprot.writeFieldEnd();
21424
      oprot.writeFieldStop();
21425
      oprot.writeStructEnd();
21426
    }
21427
 
21428
    @Override
21429
    public String toString() {
553 chandransh 21430
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 21431
      boolean first = true;
21432
 
553 chandransh 21433
      sb.append("cartId:");
21434
      sb.append(this.cartId);
506 rajveer 21435
      first = false;
21436
      sb.append(")");
21437
      return sb.toString();
21438
    }
21439
 
21440
    public void validate() throws TException {
21441
      // check for required fields
21442
    }
21443
 
21444
  }
21445
 
553 chandransh 21446
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
21447
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 21448
 
553 chandransh 21449
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
21450
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 21451
 
553 chandransh 21452
    private Cart success;
21453
    private ShoppingCartException scx;
506 rajveer 21454
 
21455
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21456
    public enum _Fields implements TFieldIdEnum {
21457
      SUCCESS((short)0, "success"),
553 chandransh 21458
      SCX((short)1, "scx");
506 rajveer 21459
 
21460
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21461
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21462
 
21463
      static {
21464
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21465
          byId.put((int)field._thriftId, field);
21466
          byName.put(field.getFieldName(), field);
21467
        }
21468
      }
21469
 
21470
      /**
21471
       * Find the _Fields constant that matches fieldId, or null if its not found.
21472
       */
21473
      public static _Fields findByThriftId(int fieldId) {
21474
        return byId.get(fieldId);
21475
      }
21476
 
21477
      /**
21478
       * Find the _Fields constant that matches fieldId, throwing an exception
21479
       * if it is not found.
21480
       */
21481
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21482
        _Fields fields = findByThriftId(fieldId);
21483
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21484
        return fields;
21485
      }
21486
 
21487
      /**
21488
       * Find the _Fields constant that matches name, or null if its not found.
21489
       */
21490
      public static _Fields findByName(String name) {
21491
        return byName.get(name);
21492
      }
21493
 
21494
      private final short _thriftId;
21495
      private final String _fieldName;
21496
 
21497
      _Fields(short thriftId, String fieldName) {
21498
        _thriftId = thriftId;
21499
        _fieldName = fieldName;
21500
      }
21501
 
21502
      public short getThriftFieldId() {
21503
        return _thriftId;
21504
      }
21505
 
21506
      public String getFieldName() {
21507
        return _fieldName;
21508
      }
21509
    }
21510
 
21511
    // isset id assignments
21512
 
21513
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21514
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 21515
          new StructMetaData(TType.STRUCT, Cart.class)));
21516
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 21517
          new FieldValueMetaData(TType.STRUCT)));
21518
    }});
21519
 
21520
    static {
553 chandransh 21521
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 21522
    }
21523
 
553 chandransh 21524
    public getCart_result() {
506 rajveer 21525
    }
21526
 
553 chandransh 21527
    public getCart_result(
21528
      Cart success,
21529
      ShoppingCartException scx)
506 rajveer 21530
    {
21531
      this();
21532
      this.success = success;
553 chandransh 21533
      this.scx = scx;
506 rajveer 21534
    }
21535
 
21536
    /**
21537
     * Performs a deep copy on <i>other</i>.
21538
     */
553 chandransh 21539
    public getCart_result(getCart_result other) {
21540
      if (other.isSetSuccess()) {
21541
        this.success = new Cart(other.success);
506 rajveer 21542
      }
553 chandransh 21543
      if (other.isSetScx()) {
21544
        this.scx = new ShoppingCartException(other.scx);
21545
      }
506 rajveer 21546
    }
21547
 
553 chandransh 21548
    public getCart_result deepCopy() {
21549
      return new getCart_result(this);
506 rajveer 21550
    }
21551
 
21552
    @Deprecated
553 chandransh 21553
    public getCart_result clone() {
21554
      return new getCart_result(this);
506 rajveer 21555
    }
21556
 
553 chandransh 21557
    public Cart getSuccess() {
506 rajveer 21558
      return this.success;
21559
    }
21560
 
553 chandransh 21561
    public getCart_result setSuccess(Cart success) {
506 rajveer 21562
      this.success = success;
21563
      return this;
21564
    }
21565
 
21566
    public void unsetSuccess() {
553 chandransh 21567
      this.success = null;
506 rajveer 21568
    }
21569
 
21570
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21571
    public boolean isSetSuccess() {
553 chandransh 21572
      return this.success != null;
506 rajveer 21573
    }
21574
 
21575
    public void setSuccessIsSet(boolean value) {
553 chandransh 21576
      if (!value) {
21577
        this.success = null;
21578
      }
506 rajveer 21579
    }
21580
 
553 chandransh 21581
    public ShoppingCartException getScx() {
21582
      return this.scx;
506 rajveer 21583
    }
21584
 
553 chandransh 21585
    public getCart_result setScx(ShoppingCartException scx) {
21586
      this.scx = scx;
506 rajveer 21587
      return this;
21588
    }
21589
 
553 chandransh 21590
    public void unsetScx() {
21591
      this.scx = null;
506 rajveer 21592
    }
21593
 
553 chandransh 21594
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21595
    public boolean isSetScx() {
21596
      return this.scx != null;
506 rajveer 21597
    }
21598
 
553 chandransh 21599
    public void setScxIsSet(boolean value) {
506 rajveer 21600
      if (!value) {
553 chandransh 21601
        this.scx = null;
506 rajveer 21602
      }
21603
    }
21604
 
21605
    public void setFieldValue(_Fields field, Object value) {
21606
      switch (field) {
21607
      case SUCCESS:
21608
        if (value == null) {
21609
          unsetSuccess();
21610
        } else {
553 chandransh 21611
          setSuccess((Cart)value);
506 rajveer 21612
        }
21613
        break;
21614
 
553 chandransh 21615
      case SCX:
506 rajveer 21616
        if (value == null) {
553 chandransh 21617
          unsetScx();
506 rajveer 21618
        } else {
553 chandransh 21619
          setScx((ShoppingCartException)value);
506 rajveer 21620
        }
21621
        break;
21622
 
21623
      }
21624
    }
21625
 
21626
    public void setFieldValue(int fieldID, Object value) {
21627
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21628
    }
21629
 
21630
    public Object getFieldValue(_Fields field) {
21631
      switch (field) {
21632
      case SUCCESS:
553 chandransh 21633
        return getSuccess();
506 rajveer 21634
 
553 chandransh 21635
      case SCX:
21636
        return getScx();
506 rajveer 21637
 
21638
      }
21639
      throw new IllegalStateException();
21640
    }
21641
 
21642
    public Object getFieldValue(int fieldId) {
21643
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21644
    }
21645
 
21646
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21647
    public boolean isSet(_Fields field) {
21648
      switch (field) {
21649
      case SUCCESS:
21650
        return isSetSuccess();
553 chandransh 21651
      case SCX:
21652
        return isSetScx();
506 rajveer 21653
      }
21654
      throw new IllegalStateException();
21655
    }
21656
 
21657
    public boolean isSet(int fieldID) {
21658
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21659
    }
21660
 
21661
    @Override
21662
    public boolean equals(Object that) {
21663
      if (that == null)
21664
        return false;
553 chandransh 21665
      if (that instanceof getCart_result)
21666
        return this.equals((getCart_result)that);
506 rajveer 21667
      return false;
21668
    }
21669
 
553 chandransh 21670
    public boolean equals(getCart_result that) {
506 rajveer 21671
      if (that == null)
21672
        return false;
21673
 
553 chandransh 21674
      boolean this_present_success = true && this.isSetSuccess();
21675
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 21676
      if (this_present_success || that_present_success) {
21677
        if (!(this_present_success && that_present_success))
21678
          return false;
553 chandransh 21679
        if (!this.success.equals(that.success))
506 rajveer 21680
          return false;
21681
      }
21682
 
553 chandransh 21683
      boolean this_present_scx = true && this.isSetScx();
21684
      boolean that_present_scx = true && that.isSetScx();
21685
      if (this_present_scx || that_present_scx) {
21686
        if (!(this_present_scx && that_present_scx))
506 rajveer 21687
          return false;
553 chandransh 21688
        if (!this.scx.equals(that.scx))
506 rajveer 21689
          return false;
21690
      }
21691
 
21692
      return true;
21693
    }
21694
 
21695
    @Override
21696
    public int hashCode() {
21697
      return 0;
21698
    }
21699
 
553 chandransh 21700
    public int compareTo(getCart_result other) {
506 rajveer 21701
      if (!getClass().equals(other.getClass())) {
21702
        return getClass().getName().compareTo(other.getClass().getName());
21703
      }
21704
 
21705
      int lastComparison = 0;
553 chandransh 21706
      getCart_result typedOther = (getCart_result)other;
506 rajveer 21707
 
21708
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21709
      if (lastComparison != 0) {
21710
        return lastComparison;
21711
      }
21712
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21713
      if (lastComparison != 0) {
21714
        return lastComparison;
21715
      }
553 chandransh 21716
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 21717
      if (lastComparison != 0) {
21718
        return lastComparison;
21719
      }
553 chandransh 21720
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 21721
      if (lastComparison != 0) {
21722
        return lastComparison;
21723
      }
21724
      return 0;
21725
    }
21726
 
21727
    public void read(TProtocol iprot) throws TException {
21728
      TField field;
21729
      iprot.readStructBegin();
21730
      while (true)
21731
      {
21732
        field = iprot.readFieldBegin();
21733
        if (field.type == TType.STOP) { 
21734
          break;
21735
        }
21736
        _Fields fieldId = _Fields.findByThriftId(field.id);
21737
        if (fieldId == null) {
21738
          TProtocolUtil.skip(iprot, field.type);
21739
        } else {
21740
          switch (fieldId) {
21741
            case SUCCESS:
553 chandransh 21742
              if (field.type == TType.STRUCT) {
21743
                this.success = new Cart();
21744
                this.success.read(iprot);
506 rajveer 21745
              } else { 
21746
                TProtocolUtil.skip(iprot, field.type);
21747
              }
21748
              break;
553 chandransh 21749
            case SCX:
506 rajveer 21750
              if (field.type == TType.STRUCT) {
553 chandransh 21751
                this.scx = new ShoppingCartException();
21752
                this.scx.read(iprot);
506 rajveer 21753
              } else { 
21754
                TProtocolUtil.skip(iprot, field.type);
21755
              }
21756
              break;
21757
          }
21758
          iprot.readFieldEnd();
21759
        }
21760
      }
21761
      iprot.readStructEnd();
21762
      validate();
21763
    }
21764
 
21765
    public void write(TProtocol oprot) throws TException {
21766
      oprot.writeStructBegin(STRUCT_DESC);
21767
 
21768
      if (this.isSetSuccess()) {
21769
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 21770
        this.success.write(oprot);
506 rajveer 21771
        oprot.writeFieldEnd();
553 chandransh 21772
      } else if (this.isSetScx()) {
21773
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21774
        this.scx.write(oprot);
506 rajveer 21775
        oprot.writeFieldEnd();
21776
      }
21777
      oprot.writeFieldStop();
21778
      oprot.writeStructEnd();
21779
    }
21780
 
21781
    @Override
21782
    public String toString() {
553 chandransh 21783
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 21784
      boolean first = true;
21785
 
21786
      sb.append("success:");
553 chandransh 21787
      if (this.success == null) {
21788
        sb.append("null");
21789
      } else {
21790
        sb.append(this.success);
21791
      }
506 rajveer 21792
      first = false;
21793
      if (!first) sb.append(", ");
553 chandransh 21794
      sb.append("scx:");
21795
      if (this.scx == null) {
506 rajveer 21796
        sb.append("null");
21797
      } else {
553 chandransh 21798
        sb.append(this.scx);
506 rajveer 21799
      }
21800
      first = false;
21801
      sb.append(")");
21802
      return sb.toString();
21803
    }
21804
 
21805
    public void validate() throws TException {
21806
      // check for required fields
21807
    }
21808
 
21809
  }
21810
 
553 chandransh 21811
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
21812
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 21813
 
553 chandransh 21814
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
21815
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 21816
 
553 chandransh 21817
    private long userId;
21818
    private CartStatus status;
48 ashish 21819
 
21820
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21821
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21822
      USER_ID((short)1, "userId"),
21823
      /**
21824
       * 
21825
       * @see CartStatus
21826
       */
21827
      STATUS((short)2, "status");
48 ashish 21828
 
21829
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21830
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21831
 
21832
      static {
21833
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21834
          byId.put((int)field._thriftId, field);
21835
          byName.put(field.getFieldName(), field);
21836
        }
21837
      }
21838
 
21839
      /**
21840
       * Find the _Fields constant that matches fieldId, or null if its not found.
21841
       */
21842
      public static _Fields findByThriftId(int fieldId) {
21843
        return byId.get(fieldId);
21844
      }
21845
 
21846
      /**
21847
       * Find the _Fields constant that matches fieldId, throwing an exception
21848
       * if it is not found.
21849
       */
21850
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21851
        _Fields fields = findByThriftId(fieldId);
21852
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21853
        return fields;
21854
      }
21855
 
21856
      /**
21857
       * Find the _Fields constant that matches name, or null if its not found.
21858
       */
21859
      public static _Fields findByName(String name) {
21860
        return byName.get(name);
21861
      }
21862
 
21863
      private final short _thriftId;
21864
      private final String _fieldName;
21865
 
21866
      _Fields(short thriftId, String fieldName) {
21867
        _thriftId = thriftId;
21868
        _fieldName = fieldName;
21869
      }
21870
 
21871
      public short getThriftFieldId() {
21872
        return _thriftId;
21873
      }
21874
 
21875
      public String getFieldName() {
21876
        return _fieldName;
21877
      }
21878
    }
21879
 
21880
    // isset id assignments
21881
    private static final int __USERID_ISSET_ID = 0;
21882
    private BitSet __isset_bit_vector = new BitSet(1);
21883
 
21884
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21885
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 21886
          new FieldValueMetaData(TType.I64)));
553 chandransh 21887
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
21888
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 21889
    }});
21890
 
21891
    static {
553 chandransh 21892
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 21893
    }
21894
 
553 chandransh 21895
    public getCartsForUser_args() {
48 ashish 21896
    }
21897
 
553 chandransh 21898
    public getCartsForUser_args(
21899
      long userId,
21900
      CartStatus status)
48 ashish 21901
    {
21902
      this();
553 chandransh 21903
      this.userId = userId;
21904
      setUserIdIsSet(true);
21905
      this.status = status;
48 ashish 21906
    }
21907
 
21908
    /**
21909
     * Performs a deep copy on <i>other</i>.
21910
     */
553 chandransh 21911
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 21912
      __isset_bit_vector.clear();
21913
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21914
      this.userId = other.userId;
21915
      if (other.isSetStatus()) {
21916
        this.status = other.status;
48 ashish 21917
      }
21918
    }
21919
 
553 chandransh 21920
    public getCartsForUser_args deepCopy() {
21921
      return new getCartsForUser_args(this);
48 ashish 21922
    }
21923
 
21924
    @Deprecated
553 chandransh 21925
    public getCartsForUser_args clone() {
21926
      return new getCartsForUser_args(this);
48 ashish 21927
    }
21928
 
553 chandransh 21929
    public long getUserId() {
21930
      return this.userId;
48 ashish 21931
    }
21932
 
553 chandransh 21933
    public getCartsForUser_args setUserId(long userId) {
21934
      this.userId = userId;
21935
      setUserIdIsSet(true);
48 ashish 21936
      return this;
21937
    }
21938
 
553 chandransh 21939
    public void unsetUserId() {
48 ashish 21940
      __isset_bit_vector.clear(__USERID_ISSET_ID);
21941
    }
21942
 
553 chandransh 21943
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
21944
    public boolean isSetUserId() {
48 ashish 21945
      return __isset_bit_vector.get(__USERID_ISSET_ID);
21946
    }
21947
 
553 chandransh 21948
    public void setUserIdIsSet(boolean value) {
48 ashish 21949
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
21950
    }
21951
 
553 chandransh 21952
    /**
21953
     * 
21954
     * @see CartStatus
21955
     */
21956
    public CartStatus getStatus() {
21957
      return this.status;
48 ashish 21958
    }
21959
 
553 chandransh 21960
    /**
21961
     * 
21962
     * @see CartStatus
21963
     */
21964
    public getCartsForUser_args setStatus(CartStatus status) {
21965
      this.status = status;
48 ashish 21966
      return this;
21967
    }
21968
 
553 chandransh 21969
    public void unsetStatus() {
21970
      this.status = null;
48 ashish 21971
    }
21972
 
553 chandransh 21973
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
21974
    public boolean isSetStatus() {
21975
      return this.status != null;
48 ashish 21976
    }
21977
 
553 chandransh 21978
    public void setStatusIsSet(boolean value) {
48 ashish 21979
      if (!value) {
553 chandransh 21980
        this.status = null;
48 ashish 21981
      }
21982
    }
21983
 
21984
    public void setFieldValue(_Fields field, Object value) {
21985
      switch (field) {
553 chandransh 21986
      case USER_ID:
48 ashish 21987
        if (value == null) {
553 chandransh 21988
          unsetUserId();
48 ashish 21989
        } else {
553 chandransh 21990
          setUserId((Long)value);
48 ashish 21991
        }
21992
        break;
21993
 
553 chandransh 21994
      case STATUS:
48 ashish 21995
        if (value == null) {
553 chandransh 21996
          unsetStatus();
48 ashish 21997
        } else {
553 chandransh 21998
          setStatus((CartStatus)value);
48 ashish 21999
        }
22000
        break;
22001
 
22002
      }
22003
    }
22004
 
22005
    public void setFieldValue(int fieldID, Object value) {
22006
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22007
    }
22008
 
22009
    public Object getFieldValue(_Fields field) {
22010
      switch (field) {
553 chandransh 22011
      case USER_ID:
22012
        return new Long(getUserId());
48 ashish 22013
 
553 chandransh 22014
      case STATUS:
22015
        return getStatus();
48 ashish 22016
 
22017
      }
22018
      throw new IllegalStateException();
22019
    }
22020
 
22021
    public Object getFieldValue(int fieldId) {
22022
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22023
    }
22024
 
22025
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22026
    public boolean isSet(_Fields field) {
22027
      switch (field) {
553 chandransh 22028
      case USER_ID:
22029
        return isSetUserId();
22030
      case STATUS:
22031
        return isSetStatus();
48 ashish 22032
      }
22033
      throw new IllegalStateException();
22034
    }
22035
 
22036
    public boolean isSet(int fieldID) {
22037
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22038
    }
22039
 
22040
    @Override
22041
    public boolean equals(Object that) {
22042
      if (that == null)
22043
        return false;
553 chandransh 22044
      if (that instanceof getCartsForUser_args)
22045
        return this.equals((getCartsForUser_args)that);
48 ashish 22046
      return false;
22047
    }
22048
 
553 chandransh 22049
    public boolean equals(getCartsForUser_args that) {
48 ashish 22050
      if (that == null)
22051
        return false;
22052
 
553 chandransh 22053
      boolean this_present_userId = true;
22054
      boolean that_present_userId = true;
22055
      if (this_present_userId || that_present_userId) {
22056
        if (!(this_present_userId && that_present_userId))
48 ashish 22057
          return false;
553 chandransh 22058
        if (this.userId != that.userId)
48 ashish 22059
          return false;
22060
      }
22061
 
553 chandransh 22062
      boolean this_present_status = true && this.isSetStatus();
22063
      boolean that_present_status = true && that.isSetStatus();
22064
      if (this_present_status || that_present_status) {
22065
        if (!(this_present_status && that_present_status))
48 ashish 22066
          return false;
553 chandransh 22067
        if (!this.status.equals(that.status))
48 ashish 22068
          return false;
22069
      }
22070
 
22071
      return true;
22072
    }
22073
 
22074
    @Override
22075
    public int hashCode() {
22076
      return 0;
22077
    }
22078
 
553 chandransh 22079
    public int compareTo(getCartsForUser_args other) {
48 ashish 22080
      if (!getClass().equals(other.getClass())) {
22081
        return getClass().getName().compareTo(other.getClass().getName());
22082
      }
22083
 
22084
      int lastComparison = 0;
553 chandransh 22085
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 22086
 
553 chandransh 22087
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 22088
      if (lastComparison != 0) {
22089
        return lastComparison;
22090
      }
553 chandransh 22091
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 22092
      if (lastComparison != 0) {
22093
        return lastComparison;
22094
      }
553 chandransh 22095
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 22096
      if (lastComparison != 0) {
22097
        return lastComparison;
22098
      }
553 chandransh 22099
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 22100
      if (lastComparison != 0) {
22101
        return lastComparison;
22102
      }
22103
      return 0;
22104
    }
22105
 
22106
    public void read(TProtocol iprot) throws TException {
22107
      TField field;
22108
      iprot.readStructBegin();
22109
      while (true)
22110
      {
22111
        field = iprot.readFieldBegin();
22112
        if (field.type == TType.STOP) { 
22113
          break;
22114
        }
22115
        _Fields fieldId = _Fields.findByThriftId(field.id);
22116
        if (fieldId == null) {
22117
          TProtocolUtil.skip(iprot, field.type);
22118
        } else {
22119
          switch (fieldId) {
553 chandransh 22120
            case USER_ID:
48 ashish 22121
              if (field.type == TType.I64) {
553 chandransh 22122
                this.userId = iprot.readI64();
22123
                setUserIdIsSet(true);
48 ashish 22124
              } else { 
22125
                TProtocolUtil.skip(iprot, field.type);
22126
              }
22127
              break;
553 chandransh 22128
            case STATUS:
22129
              if (field.type == TType.I32) {
22130
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 22131
              } else { 
22132
                TProtocolUtil.skip(iprot, field.type);
22133
              }
22134
              break;
22135
          }
22136
          iprot.readFieldEnd();
22137
        }
22138
      }
22139
      iprot.readStructEnd();
22140
      validate();
22141
    }
22142
 
22143
    public void write(TProtocol oprot) throws TException {
22144
      validate();
22145
 
22146
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22147
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
22148
      oprot.writeI64(this.userId);
48 ashish 22149
      oprot.writeFieldEnd();
553 chandransh 22150
      if (this.status != null) {
22151
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
22152
        oprot.writeI32(this.status.getValue());
48 ashish 22153
        oprot.writeFieldEnd();
22154
      }
22155
      oprot.writeFieldStop();
22156
      oprot.writeStructEnd();
22157
    }
22158
 
22159
    @Override
22160
    public String toString() {
553 chandransh 22161
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 22162
      boolean first = true;
22163
 
553 chandransh 22164
      sb.append("userId:");
22165
      sb.append(this.userId);
48 ashish 22166
      first = false;
22167
      if (!first) sb.append(", ");
553 chandransh 22168
      sb.append("status:");
22169
      if (this.status == null) {
48 ashish 22170
        sb.append("null");
22171
      } else {
553 chandransh 22172
        String status_name = status.name();
22173
        if (status_name != null) {
22174
          sb.append(status_name);
22175
          sb.append(" (");
22176
        }
22177
        sb.append(this.status);
22178
        if (status_name != null) {
22179
          sb.append(")");
22180
        }
48 ashish 22181
      }
22182
      first = false;
22183
      sb.append(")");
22184
      return sb.toString();
22185
    }
22186
 
22187
    public void validate() throws TException {
22188
      // check for required fields
22189
    }
22190
 
22191
  }
22192
 
553 chandransh 22193
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
22194
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 22195
 
553 chandransh 22196
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
22197
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22198
 
553 chandransh 22199
    private List<Cart> success;
22200
    private ShoppingCartException scx;
48 ashish 22201
 
22202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22203
    public enum _Fields implements TFieldIdEnum {
22204
      SUCCESS((short)0, "success"),
553 chandransh 22205
      SCX((short)1, "scx");
48 ashish 22206
 
22207
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22208
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22209
 
22210
      static {
22211
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22212
          byId.put((int)field._thriftId, field);
22213
          byName.put(field.getFieldName(), field);
22214
        }
22215
      }
22216
 
22217
      /**
22218
       * Find the _Fields constant that matches fieldId, or null if its not found.
22219
       */
22220
      public static _Fields findByThriftId(int fieldId) {
22221
        return byId.get(fieldId);
22222
      }
22223
 
22224
      /**
22225
       * Find the _Fields constant that matches fieldId, throwing an exception
22226
       * if it is not found.
22227
       */
22228
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22229
        _Fields fields = findByThriftId(fieldId);
22230
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22231
        return fields;
22232
      }
22233
 
22234
      /**
22235
       * Find the _Fields constant that matches name, or null if its not found.
22236
       */
22237
      public static _Fields findByName(String name) {
22238
        return byName.get(name);
22239
      }
22240
 
22241
      private final short _thriftId;
22242
      private final String _fieldName;
22243
 
22244
      _Fields(short thriftId, String fieldName) {
22245
        _thriftId = thriftId;
22246
        _fieldName = fieldName;
22247
      }
22248
 
22249
      public short getThriftFieldId() {
22250
        return _thriftId;
22251
      }
22252
 
22253
      public String getFieldName() {
22254
        return _fieldName;
22255
      }
22256
    }
22257
 
22258
    // isset id assignments
22259
 
22260
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22261
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 22262
          new ListMetaData(TType.LIST, 
22263
              new StructMetaData(TType.STRUCT, Cart.class))));
22264
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 22265
          new FieldValueMetaData(TType.STRUCT)));
22266
    }});
22267
 
22268
    static {
553 chandransh 22269
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 22270
    }
22271
 
553 chandransh 22272
    public getCartsForUser_result() {
48 ashish 22273
    }
22274
 
553 chandransh 22275
    public getCartsForUser_result(
22276
      List<Cart> success,
22277
      ShoppingCartException scx)
48 ashish 22278
    {
22279
      this();
22280
      this.success = success;
553 chandransh 22281
      this.scx = scx;
48 ashish 22282
    }
22283
 
22284
    /**
22285
     * Performs a deep copy on <i>other</i>.
22286
     */
553 chandransh 22287
    public getCartsForUser_result(getCartsForUser_result other) {
22288
      if (other.isSetSuccess()) {
22289
        List<Cart> __this__success = new ArrayList<Cart>();
22290
        for (Cart other_element : other.success) {
22291
          __this__success.add(new Cart(other_element));
22292
        }
22293
        this.success = __this__success;
48 ashish 22294
      }
553 chandransh 22295
      if (other.isSetScx()) {
22296
        this.scx = new ShoppingCartException(other.scx);
22297
      }
48 ashish 22298
    }
22299
 
553 chandransh 22300
    public getCartsForUser_result deepCopy() {
22301
      return new getCartsForUser_result(this);
48 ashish 22302
    }
22303
 
22304
    @Deprecated
553 chandransh 22305
    public getCartsForUser_result clone() {
22306
      return new getCartsForUser_result(this);
48 ashish 22307
    }
22308
 
553 chandransh 22309
    public int getSuccessSize() {
22310
      return (this.success == null) ? 0 : this.success.size();
22311
    }
22312
 
22313
    public java.util.Iterator<Cart> getSuccessIterator() {
22314
      return (this.success == null) ? null : this.success.iterator();
22315
    }
22316
 
22317
    public void addToSuccess(Cart elem) {
22318
      if (this.success == null) {
22319
        this.success = new ArrayList<Cart>();
22320
      }
22321
      this.success.add(elem);
22322
    }
22323
 
22324
    public List<Cart> getSuccess() {
48 ashish 22325
      return this.success;
22326
    }
22327
 
553 chandransh 22328
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 22329
      this.success = success;
22330
      return this;
22331
    }
22332
 
22333
    public void unsetSuccess() {
553 chandransh 22334
      this.success = null;
48 ashish 22335
    }
22336
 
22337
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22338
    public boolean isSetSuccess() {
553 chandransh 22339
      return this.success != null;
48 ashish 22340
    }
22341
 
22342
    public void setSuccessIsSet(boolean value) {
553 chandransh 22343
      if (!value) {
22344
        this.success = null;
22345
      }
48 ashish 22346
    }
22347
 
553 chandransh 22348
    public ShoppingCartException getScx() {
22349
      return this.scx;
48 ashish 22350
    }
22351
 
553 chandransh 22352
    public getCartsForUser_result setScx(ShoppingCartException scx) {
22353
      this.scx = scx;
48 ashish 22354
      return this;
22355
    }
22356
 
553 chandransh 22357
    public void unsetScx() {
22358
      this.scx = null;
48 ashish 22359
    }
22360
 
553 chandransh 22361
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22362
    public boolean isSetScx() {
22363
      return this.scx != null;
48 ashish 22364
    }
22365
 
553 chandransh 22366
    public void setScxIsSet(boolean value) {
48 ashish 22367
      if (!value) {
553 chandransh 22368
        this.scx = null;
48 ashish 22369
      }
22370
    }
22371
 
22372
    public void setFieldValue(_Fields field, Object value) {
22373
      switch (field) {
22374
      case SUCCESS:
22375
        if (value == null) {
22376
          unsetSuccess();
22377
        } else {
553 chandransh 22378
          setSuccess((List<Cart>)value);
48 ashish 22379
        }
22380
        break;
22381
 
553 chandransh 22382
      case SCX:
48 ashish 22383
        if (value == null) {
553 chandransh 22384
          unsetScx();
48 ashish 22385
        } else {
553 chandransh 22386
          setScx((ShoppingCartException)value);
48 ashish 22387
        }
22388
        break;
22389
 
22390
      }
22391
    }
22392
 
22393
    public void setFieldValue(int fieldID, Object value) {
22394
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22395
    }
22396
 
22397
    public Object getFieldValue(_Fields field) {
22398
      switch (field) {
22399
      case SUCCESS:
553 chandransh 22400
        return getSuccess();
48 ashish 22401
 
553 chandransh 22402
      case SCX:
22403
        return getScx();
48 ashish 22404
 
22405
      }
22406
      throw new IllegalStateException();
22407
    }
22408
 
22409
    public Object getFieldValue(int fieldId) {
22410
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22411
    }
22412
 
22413
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22414
    public boolean isSet(_Fields field) {
22415
      switch (field) {
22416
      case SUCCESS:
22417
        return isSetSuccess();
553 chandransh 22418
      case SCX:
22419
        return isSetScx();
48 ashish 22420
      }
22421
      throw new IllegalStateException();
22422
    }
22423
 
22424
    public boolean isSet(int fieldID) {
22425
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22426
    }
22427
 
22428
    @Override
22429
    public boolean equals(Object that) {
22430
      if (that == null)
22431
        return false;
553 chandransh 22432
      if (that instanceof getCartsForUser_result)
22433
        return this.equals((getCartsForUser_result)that);
48 ashish 22434
      return false;
22435
    }
22436
 
553 chandransh 22437
    public boolean equals(getCartsForUser_result that) {
48 ashish 22438
      if (that == null)
22439
        return false;
22440
 
553 chandransh 22441
      boolean this_present_success = true && this.isSetSuccess();
22442
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 22443
      if (this_present_success || that_present_success) {
22444
        if (!(this_present_success && that_present_success))
22445
          return false;
553 chandransh 22446
        if (!this.success.equals(that.success))
48 ashish 22447
          return false;
22448
      }
22449
 
553 chandransh 22450
      boolean this_present_scx = true && this.isSetScx();
22451
      boolean that_present_scx = true && that.isSetScx();
22452
      if (this_present_scx || that_present_scx) {
22453
        if (!(this_present_scx && that_present_scx))
48 ashish 22454
          return false;
553 chandransh 22455
        if (!this.scx.equals(that.scx))
48 ashish 22456
          return false;
22457
      }
22458
 
22459
      return true;
22460
    }
22461
 
22462
    @Override
22463
    public int hashCode() {
22464
      return 0;
22465
    }
22466
 
553 chandransh 22467
    public int compareTo(getCartsForUser_result other) {
48 ashish 22468
      if (!getClass().equals(other.getClass())) {
22469
        return getClass().getName().compareTo(other.getClass().getName());
22470
      }
22471
 
22472
      int lastComparison = 0;
553 chandransh 22473
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 22474
 
22475
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22476
      if (lastComparison != 0) {
22477
        return lastComparison;
22478
      }
22479
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22480
      if (lastComparison != 0) {
22481
        return lastComparison;
22482
      }
553 chandransh 22483
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 22484
      if (lastComparison != 0) {
22485
        return lastComparison;
22486
      }
553 chandransh 22487
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 22488
      if (lastComparison != 0) {
22489
        return lastComparison;
22490
      }
22491
      return 0;
22492
    }
22493
 
22494
    public void read(TProtocol iprot) throws TException {
22495
      TField field;
22496
      iprot.readStructBegin();
22497
      while (true)
22498
      {
22499
        field = iprot.readFieldBegin();
22500
        if (field.type == TType.STOP) { 
22501
          break;
22502
        }
22503
        _Fields fieldId = _Fields.findByThriftId(field.id);
22504
        if (fieldId == null) {
22505
          TProtocolUtil.skip(iprot, field.type);
22506
        } else {
22507
          switch (fieldId) {
22508
            case SUCCESS:
553 chandransh 22509
              if (field.type == TType.LIST) {
22510
                {
1590 varun.gupt 22511
                  TList _list28 = iprot.readListBegin();
22512
                  this.success = new ArrayList<Cart>(_list28.size);
22513
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
553 chandransh 22514
                  {
1590 varun.gupt 22515
                    Cart _elem30;
22516
                    _elem30 = new Cart();
22517
                    _elem30.read(iprot);
22518
                    this.success.add(_elem30);
553 chandransh 22519
                  }
22520
                  iprot.readListEnd();
22521
                }
48 ashish 22522
              } else { 
22523
                TProtocolUtil.skip(iprot, field.type);
22524
              }
22525
              break;
553 chandransh 22526
            case SCX:
48 ashish 22527
              if (field.type == TType.STRUCT) {
553 chandransh 22528
                this.scx = new ShoppingCartException();
22529
                this.scx.read(iprot);
48 ashish 22530
              } else { 
22531
                TProtocolUtil.skip(iprot, field.type);
22532
              }
22533
              break;
22534
          }
22535
          iprot.readFieldEnd();
22536
        }
22537
      }
22538
      iprot.readStructEnd();
22539
      validate();
22540
    }
22541
 
22542
    public void write(TProtocol oprot) throws TException {
22543
      oprot.writeStructBegin(STRUCT_DESC);
22544
 
22545
      if (this.isSetSuccess()) {
22546
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 22547
        {
22548
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1590 varun.gupt 22549
          for (Cart _iter31 : this.success)
553 chandransh 22550
          {
1590 varun.gupt 22551
            _iter31.write(oprot);
553 chandransh 22552
          }
22553
          oprot.writeListEnd();
22554
        }
48 ashish 22555
        oprot.writeFieldEnd();
553 chandransh 22556
      } else if (this.isSetScx()) {
22557
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22558
        this.scx.write(oprot);
48 ashish 22559
        oprot.writeFieldEnd();
22560
      }
22561
      oprot.writeFieldStop();
22562
      oprot.writeStructEnd();
22563
    }
22564
 
22565
    @Override
22566
    public String toString() {
553 chandransh 22567
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 22568
      boolean first = true;
22569
 
22570
      sb.append("success:");
553 chandransh 22571
      if (this.success == null) {
22572
        sb.append("null");
22573
      } else {
22574
        sb.append(this.success);
22575
      }
48 ashish 22576
      first = false;
22577
      if (!first) sb.append(", ");
553 chandransh 22578
      sb.append("scx:");
22579
      if (this.scx == null) {
48 ashish 22580
        sb.append("null");
22581
      } else {
553 chandransh 22582
        sb.append(this.scx);
48 ashish 22583
      }
22584
      first = false;
22585
      sb.append(")");
22586
      return sb.toString();
22587
    }
22588
 
22589
    public void validate() throws TException {
22590
      // check for required fields
22591
    }
22592
 
22593
  }
22594
 
553 chandransh 22595
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
22596
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 22597
 
553 chandransh 22598
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 22599
 
553 chandransh 22600
    private CartStatus status;
48 ashish 22601
 
22602
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22603
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22604
      /**
22605
       * 
22606
       * @see CartStatus
22607
       */
22608
      STATUS((short)1, "status");
48 ashish 22609
 
22610
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22611
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22612
 
22613
      static {
22614
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22615
          byId.put((int)field._thriftId, field);
22616
          byName.put(field.getFieldName(), field);
22617
        }
22618
      }
22619
 
22620
      /**
22621
       * Find the _Fields constant that matches fieldId, or null if its not found.
22622
       */
22623
      public static _Fields findByThriftId(int fieldId) {
22624
        return byId.get(fieldId);
22625
      }
22626
 
22627
      /**
22628
       * Find the _Fields constant that matches fieldId, throwing an exception
22629
       * if it is not found.
22630
       */
22631
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22632
        _Fields fields = findByThriftId(fieldId);
22633
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22634
        return fields;
22635
      }
22636
 
22637
      /**
22638
       * Find the _Fields constant that matches name, or null if its not found.
22639
       */
22640
      public static _Fields findByName(String name) {
22641
        return byName.get(name);
22642
      }
22643
 
22644
      private final short _thriftId;
22645
      private final String _fieldName;
22646
 
22647
      _Fields(short thriftId, String fieldName) {
22648
        _thriftId = thriftId;
22649
        _fieldName = fieldName;
22650
      }
22651
 
22652
      public short getThriftFieldId() {
22653
        return _thriftId;
22654
      }
22655
 
22656
      public String getFieldName() {
22657
        return _fieldName;
22658
      }
22659
    }
22660
 
22661
    // isset id assignments
553 chandransh 22662
 
22663
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22664
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
22665
          new EnumMetaData(TType.ENUM, CartStatus.class)));
22666
    }});
22667
 
22668
    static {
22669
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
22670
    }
22671
 
22672
    public getCartsByStatus_args() {
22673
    }
22674
 
22675
    public getCartsByStatus_args(
22676
      CartStatus status)
22677
    {
22678
      this();
22679
      this.status = status;
22680
    }
22681
 
22682
    /**
22683
     * Performs a deep copy on <i>other</i>.
22684
     */
22685
    public getCartsByStatus_args(getCartsByStatus_args other) {
22686
      if (other.isSetStatus()) {
22687
        this.status = other.status;
22688
      }
22689
    }
22690
 
22691
    public getCartsByStatus_args deepCopy() {
22692
      return new getCartsByStatus_args(this);
22693
    }
22694
 
22695
    @Deprecated
22696
    public getCartsByStatus_args clone() {
22697
      return new getCartsByStatus_args(this);
22698
    }
22699
 
22700
    /**
22701
     * 
22702
     * @see CartStatus
22703
     */
22704
    public CartStatus getStatus() {
22705
      return this.status;
22706
    }
22707
 
22708
    /**
22709
     * 
22710
     * @see CartStatus
22711
     */
22712
    public getCartsByStatus_args setStatus(CartStatus status) {
22713
      this.status = status;
22714
      return this;
22715
    }
22716
 
22717
    public void unsetStatus() {
22718
      this.status = null;
22719
    }
22720
 
22721
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
22722
    public boolean isSetStatus() {
22723
      return this.status != null;
22724
    }
22725
 
22726
    public void setStatusIsSet(boolean value) {
22727
      if (!value) {
22728
        this.status = null;
22729
      }
22730
    }
22731
 
22732
    public void setFieldValue(_Fields field, Object value) {
22733
      switch (field) {
22734
      case STATUS:
22735
        if (value == null) {
22736
          unsetStatus();
22737
        } else {
22738
          setStatus((CartStatus)value);
22739
        }
22740
        break;
22741
 
22742
      }
22743
    }
22744
 
22745
    public void setFieldValue(int fieldID, Object value) {
22746
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22747
    }
22748
 
22749
    public Object getFieldValue(_Fields field) {
22750
      switch (field) {
22751
      case STATUS:
22752
        return getStatus();
22753
 
22754
      }
22755
      throw new IllegalStateException();
22756
    }
22757
 
22758
    public Object getFieldValue(int fieldId) {
22759
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22760
    }
22761
 
22762
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22763
    public boolean isSet(_Fields field) {
22764
      switch (field) {
22765
      case STATUS:
22766
        return isSetStatus();
22767
      }
22768
      throw new IllegalStateException();
22769
    }
22770
 
22771
    public boolean isSet(int fieldID) {
22772
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22773
    }
22774
 
22775
    @Override
22776
    public boolean equals(Object that) {
22777
      if (that == null)
22778
        return false;
22779
      if (that instanceof getCartsByStatus_args)
22780
        return this.equals((getCartsByStatus_args)that);
22781
      return false;
22782
    }
22783
 
22784
    public boolean equals(getCartsByStatus_args that) {
22785
      if (that == null)
22786
        return false;
22787
 
22788
      boolean this_present_status = true && this.isSetStatus();
22789
      boolean that_present_status = true && that.isSetStatus();
22790
      if (this_present_status || that_present_status) {
22791
        if (!(this_present_status && that_present_status))
22792
          return false;
22793
        if (!this.status.equals(that.status))
22794
          return false;
22795
      }
22796
 
22797
      return true;
22798
    }
22799
 
22800
    @Override
22801
    public int hashCode() {
22802
      return 0;
22803
    }
22804
 
22805
    public int compareTo(getCartsByStatus_args other) {
22806
      if (!getClass().equals(other.getClass())) {
22807
        return getClass().getName().compareTo(other.getClass().getName());
22808
      }
22809
 
22810
      int lastComparison = 0;
22811
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
22812
 
22813
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
22814
      if (lastComparison != 0) {
22815
        return lastComparison;
22816
      }
22817
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
22818
      if (lastComparison != 0) {
22819
        return lastComparison;
22820
      }
22821
      return 0;
22822
    }
22823
 
22824
    public void read(TProtocol iprot) throws TException {
22825
      TField field;
22826
      iprot.readStructBegin();
22827
      while (true)
22828
      {
22829
        field = iprot.readFieldBegin();
22830
        if (field.type == TType.STOP) { 
22831
          break;
22832
        }
22833
        _Fields fieldId = _Fields.findByThriftId(field.id);
22834
        if (fieldId == null) {
22835
          TProtocolUtil.skip(iprot, field.type);
22836
        } else {
22837
          switch (fieldId) {
22838
            case STATUS:
22839
              if (field.type == TType.I32) {
22840
                this.status = CartStatus.findByValue(iprot.readI32());
22841
              } else { 
22842
                TProtocolUtil.skip(iprot, field.type);
22843
              }
22844
              break;
22845
          }
22846
          iprot.readFieldEnd();
22847
        }
22848
      }
22849
      iprot.readStructEnd();
22850
      validate();
22851
    }
22852
 
22853
    public void write(TProtocol oprot) throws TException {
22854
      validate();
22855
 
22856
      oprot.writeStructBegin(STRUCT_DESC);
22857
      if (this.status != null) {
22858
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
22859
        oprot.writeI32(this.status.getValue());
22860
        oprot.writeFieldEnd();
22861
      }
22862
      oprot.writeFieldStop();
22863
      oprot.writeStructEnd();
22864
    }
22865
 
22866
    @Override
22867
    public String toString() {
22868
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
22869
      boolean first = true;
22870
 
22871
      sb.append("status:");
22872
      if (this.status == null) {
22873
        sb.append("null");
22874
      } else {
22875
        String status_name = status.name();
22876
        if (status_name != null) {
22877
          sb.append(status_name);
22878
          sb.append(" (");
22879
        }
22880
        sb.append(this.status);
22881
        if (status_name != null) {
22882
          sb.append(")");
22883
        }
22884
      }
22885
      first = false;
22886
      sb.append(")");
22887
      return sb.toString();
22888
    }
22889
 
22890
    public void validate() throws TException {
22891
      // check for required fields
22892
    }
22893
 
22894
  }
22895
 
22896
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
22897
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
22898
 
22899
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
22900
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
22901
 
22902
    private List<Cart> success;
22903
    private ShoppingCartException scx;
22904
 
22905
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22906
    public enum _Fields implements TFieldIdEnum {
22907
      SUCCESS((short)0, "success"),
22908
      SCX((short)1, "scx");
22909
 
22910
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22912
 
22913
      static {
22914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22915
          byId.put((int)field._thriftId, field);
22916
          byName.put(field.getFieldName(), field);
22917
        }
22918
      }
22919
 
22920
      /**
22921
       * Find the _Fields constant that matches fieldId, or null if its not found.
22922
       */
22923
      public static _Fields findByThriftId(int fieldId) {
22924
        return byId.get(fieldId);
22925
      }
22926
 
22927
      /**
22928
       * Find the _Fields constant that matches fieldId, throwing an exception
22929
       * if it is not found.
22930
       */
22931
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22932
        _Fields fields = findByThriftId(fieldId);
22933
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22934
        return fields;
22935
      }
22936
 
22937
      /**
22938
       * Find the _Fields constant that matches name, or null if its not found.
22939
       */
22940
      public static _Fields findByName(String name) {
22941
        return byName.get(name);
22942
      }
22943
 
22944
      private final short _thriftId;
22945
      private final String _fieldName;
22946
 
22947
      _Fields(short thriftId, String fieldName) {
22948
        _thriftId = thriftId;
22949
        _fieldName = fieldName;
22950
      }
22951
 
22952
      public short getThriftFieldId() {
22953
        return _thriftId;
22954
      }
22955
 
22956
      public String getFieldName() {
22957
        return _fieldName;
22958
      }
22959
    }
22960
 
22961
    // isset id assignments
22962
 
22963
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22964
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
22965
          new ListMetaData(TType.LIST, 
22966
              new StructMetaData(TType.STRUCT, Cart.class))));
22967
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22968
          new FieldValueMetaData(TType.STRUCT)));
22969
    }});
22970
 
22971
    static {
22972
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
22973
    }
22974
 
22975
    public getCartsByStatus_result() {
22976
    }
22977
 
22978
    public getCartsByStatus_result(
22979
      List<Cart> success,
22980
      ShoppingCartException scx)
22981
    {
22982
      this();
22983
      this.success = success;
22984
      this.scx = scx;
22985
    }
22986
 
22987
    /**
22988
     * Performs a deep copy on <i>other</i>.
22989
     */
22990
    public getCartsByStatus_result(getCartsByStatus_result other) {
22991
      if (other.isSetSuccess()) {
22992
        List<Cart> __this__success = new ArrayList<Cart>();
22993
        for (Cart other_element : other.success) {
22994
          __this__success.add(new Cart(other_element));
22995
        }
22996
        this.success = __this__success;
22997
      }
22998
      if (other.isSetScx()) {
22999
        this.scx = new ShoppingCartException(other.scx);
23000
      }
23001
    }
23002
 
23003
    public getCartsByStatus_result deepCopy() {
23004
      return new getCartsByStatus_result(this);
23005
    }
23006
 
23007
    @Deprecated
23008
    public getCartsByStatus_result clone() {
23009
      return new getCartsByStatus_result(this);
23010
    }
23011
 
23012
    public int getSuccessSize() {
23013
      return (this.success == null) ? 0 : this.success.size();
23014
    }
23015
 
23016
    public java.util.Iterator<Cart> getSuccessIterator() {
23017
      return (this.success == null) ? null : this.success.iterator();
23018
    }
23019
 
23020
    public void addToSuccess(Cart elem) {
23021
      if (this.success == null) {
23022
        this.success = new ArrayList<Cart>();
23023
      }
23024
      this.success.add(elem);
23025
    }
23026
 
23027
    public List<Cart> getSuccess() {
23028
      return this.success;
23029
    }
23030
 
23031
    public getCartsByStatus_result setSuccess(List<Cart> success) {
23032
      this.success = success;
23033
      return this;
23034
    }
23035
 
23036
    public void unsetSuccess() {
23037
      this.success = null;
23038
    }
23039
 
23040
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23041
    public boolean isSetSuccess() {
23042
      return this.success != null;
23043
    }
23044
 
23045
    public void setSuccessIsSet(boolean value) {
23046
      if (!value) {
23047
        this.success = null;
23048
      }
23049
    }
23050
 
23051
    public ShoppingCartException getScx() {
23052
      return this.scx;
23053
    }
23054
 
23055
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
23056
      this.scx = scx;
23057
      return this;
23058
    }
23059
 
23060
    public void unsetScx() {
23061
      this.scx = null;
23062
    }
23063
 
23064
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23065
    public boolean isSetScx() {
23066
      return this.scx != null;
23067
    }
23068
 
23069
    public void setScxIsSet(boolean value) {
23070
      if (!value) {
23071
        this.scx = null;
23072
      }
23073
    }
23074
 
23075
    public void setFieldValue(_Fields field, Object value) {
23076
      switch (field) {
23077
      case SUCCESS:
23078
        if (value == null) {
23079
          unsetSuccess();
23080
        } else {
23081
          setSuccess((List<Cart>)value);
23082
        }
23083
        break;
23084
 
23085
      case SCX:
23086
        if (value == null) {
23087
          unsetScx();
23088
        } else {
23089
          setScx((ShoppingCartException)value);
23090
        }
23091
        break;
23092
 
23093
      }
23094
    }
23095
 
23096
    public void setFieldValue(int fieldID, Object value) {
23097
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23098
    }
23099
 
23100
    public Object getFieldValue(_Fields field) {
23101
      switch (field) {
23102
      case SUCCESS:
23103
        return getSuccess();
23104
 
23105
      case SCX:
23106
        return getScx();
23107
 
23108
      }
23109
      throw new IllegalStateException();
23110
    }
23111
 
23112
    public Object getFieldValue(int fieldId) {
23113
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23114
    }
23115
 
23116
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23117
    public boolean isSet(_Fields field) {
23118
      switch (field) {
23119
      case SUCCESS:
23120
        return isSetSuccess();
23121
      case SCX:
23122
        return isSetScx();
23123
      }
23124
      throw new IllegalStateException();
23125
    }
23126
 
23127
    public boolean isSet(int fieldID) {
23128
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23129
    }
23130
 
23131
    @Override
23132
    public boolean equals(Object that) {
23133
      if (that == null)
23134
        return false;
23135
      if (that instanceof getCartsByStatus_result)
23136
        return this.equals((getCartsByStatus_result)that);
23137
      return false;
23138
    }
23139
 
23140
    public boolean equals(getCartsByStatus_result that) {
23141
      if (that == null)
23142
        return false;
23143
 
23144
      boolean this_present_success = true && this.isSetSuccess();
23145
      boolean that_present_success = true && that.isSetSuccess();
23146
      if (this_present_success || that_present_success) {
23147
        if (!(this_present_success && that_present_success))
23148
          return false;
23149
        if (!this.success.equals(that.success))
23150
          return false;
23151
      }
23152
 
23153
      boolean this_present_scx = true && this.isSetScx();
23154
      boolean that_present_scx = true && that.isSetScx();
23155
      if (this_present_scx || that_present_scx) {
23156
        if (!(this_present_scx && that_present_scx))
23157
          return false;
23158
        if (!this.scx.equals(that.scx))
23159
          return false;
23160
      }
23161
 
23162
      return true;
23163
    }
23164
 
23165
    @Override
23166
    public int hashCode() {
23167
      return 0;
23168
    }
23169
 
23170
    public int compareTo(getCartsByStatus_result other) {
23171
      if (!getClass().equals(other.getClass())) {
23172
        return getClass().getName().compareTo(other.getClass().getName());
23173
      }
23174
 
23175
      int lastComparison = 0;
23176
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
23177
 
23178
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23179
      if (lastComparison != 0) {
23180
        return lastComparison;
23181
      }
23182
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23183
      if (lastComparison != 0) {
23184
        return lastComparison;
23185
      }
23186
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23187
      if (lastComparison != 0) {
23188
        return lastComparison;
23189
      }
23190
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23191
      if (lastComparison != 0) {
23192
        return lastComparison;
23193
      }
23194
      return 0;
23195
    }
23196
 
23197
    public void read(TProtocol iprot) throws TException {
23198
      TField field;
23199
      iprot.readStructBegin();
23200
      while (true)
23201
      {
23202
        field = iprot.readFieldBegin();
23203
        if (field.type == TType.STOP) { 
23204
          break;
23205
        }
23206
        _Fields fieldId = _Fields.findByThriftId(field.id);
23207
        if (fieldId == null) {
23208
          TProtocolUtil.skip(iprot, field.type);
23209
        } else {
23210
          switch (fieldId) {
23211
            case SUCCESS:
23212
              if (field.type == TType.LIST) {
23213
                {
1590 varun.gupt 23214
                  TList _list32 = iprot.readListBegin();
23215
                  this.success = new ArrayList<Cart>(_list32.size);
23216
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
553 chandransh 23217
                  {
1590 varun.gupt 23218
                    Cart _elem34;
23219
                    _elem34 = new Cart();
23220
                    _elem34.read(iprot);
23221
                    this.success.add(_elem34);
553 chandransh 23222
                  }
23223
                  iprot.readListEnd();
23224
                }
23225
              } else { 
23226
                TProtocolUtil.skip(iprot, field.type);
23227
              }
23228
              break;
23229
            case SCX:
23230
              if (field.type == TType.STRUCT) {
23231
                this.scx = new ShoppingCartException();
23232
                this.scx.read(iprot);
23233
              } else { 
23234
                TProtocolUtil.skip(iprot, field.type);
23235
              }
23236
              break;
23237
          }
23238
          iprot.readFieldEnd();
23239
        }
23240
      }
23241
      iprot.readStructEnd();
23242
      validate();
23243
    }
23244
 
23245
    public void write(TProtocol oprot) throws TException {
23246
      oprot.writeStructBegin(STRUCT_DESC);
23247
 
23248
      if (this.isSetSuccess()) {
23249
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23250
        {
23251
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1590 varun.gupt 23252
          for (Cart _iter35 : this.success)
553 chandransh 23253
          {
1590 varun.gupt 23254
            _iter35.write(oprot);
553 chandransh 23255
          }
23256
          oprot.writeListEnd();
23257
        }
23258
        oprot.writeFieldEnd();
23259
      } else if (this.isSetScx()) {
23260
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23261
        this.scx.write(oprot);
23262
        oprot.writeFieldEnd();
23263
      }
23264
      oprot.writeFieldStop();
23265
      oprot.writeStructEnd();
23266
    }
23267
 
23268
    @Override
23269
    public String toString() {
23270
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
23271
      boolean first = true;
23272
 
23273
      sb.append("success:");
23274
      if (this.success == null) {
23275
        sb.append("null");
23276
      } else {
23277
        sb.append(this.success);
23278
      }
23279
      first = false;
23280
      if (!first) sb.append(", ");
23281
      sb.append("scx:");
23282
      if (this.scx == null) {
23283
        sb.append("null");
23284
      } else {
23285
        sb.append(this.scx);
23286
      }
23287
      first = false;
23288
      sb.append(")");
23289
      return sb.toString();
23290
    }
23291
 
23292
    public void validate() throws TException {
23293
      // check for required fields
23294
    }
23295
 
23296
  }
23297
 
23298
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
23299
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
23300
 
23301
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
23302
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
23303
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
23304
 
23305
    private long from_time;
23306
    private long to_time;
23307
    private CartStatus status;
23308
 
23309
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23310
    public enum _Fields implements TFieldIdEnum {
23311
      FROM_TIME((short)1, "from_time"),
23312
      TO_TIME((short)2, "to_time"),
23313
      /**
23314
       * 
23315
       * @see CartStatus
23316
       */
23317
      STATUS((short)3, "status");
23318
 
23319
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23320
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23321
 
23322
      static {
23323
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23324
          byId.put((int)field._thriftId, field);
23325
          byName.put(field.getFieldName(), field);
23326
        }
23327
      }
23328
 
23329
      /**
23330
       * Find the _Fields constant that matches fieldId, or null if its not found.
23331
       */
23332
      public static _Fields findByThriftId(int fieldId) {
23333
        return byId.get(fieldId);
23334
      }
23335
 
23336
      /**
23337
       * Find the _Fields constant that matches fieldId, throwing an exception
23338
       * if it is not found.
23339
       */
23340
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23341
        _Fields fields = findByThriftId(fieldId);
23342
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23343
        return fields;
23344
      }
23345
 
23346
      /**
23347
       * Find the _Fields constant that matches name, or null if its not found.
23348
       */
23349
      public static _Fields findByName(String name) {
23350
        return byName.get(name);
23351
      }
23352
 
23353
      private final short _thriftId;
23354
      private final String _fieldName;
23355
 
23356
      _Fields(short thriftId, String fieldName) {
23357
        _thriftId = thriftId;
23358
        _fieldName = fieldName;
23359
      }
23360
 
23361
      public short getThriftFieldId() {
23362
        return _thriftId;
23363
      }
23364
 
23365
      public String getFieldName() {
23366
        return _fieldName;
23367
      }
23368
    }
23369
 
23370
    // isset id assignments
23371
    private static final int __FROM_TIME_ISSET_ID = 0;
23372
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 23373
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 23374
 
23375
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23376
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 23377
          new FieldValueMetaData(TType.I64)));
553 chandransh 23378
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
23379
          new FieldValueMetaData(TType.I64)));
23380
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
23381
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 23382
    }});
23383
 
23384
    static {
553 chandransh 23385
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 23386
    }
23387
 
553 chandransh 23388
    public getCartsByTime_args() {
48 ashish 23389
    }
23390
 
553 chandransh 23391
    public getCartsByTime_args(
23392
      long from_time,
23393
      long to_time,
23394
      CartStatus status)
48 ashish 23395
    {
23396
      this();
553 chandransh 23397
      this.from_time = from_time;
23398
      setFrom_timeIsSet(true);
23399
      this.to_time = to_time;
23400
      setTo_timeIsSet(true);
23401
      this.status = status;
48 ashish 23402
    }
23403
 
23404
    /**
23405
     * Performs a deep copy on <i>other</i>.
23406
     */
553 chandransh 23407
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 23408
      __isset_bit_vector.clear();
23409
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 23410
      this.from_time = other.from_time;
23411
      this.to_time = other.to_time;
23412
      if (other.isSetStatus()) {
23413
        this.status = other.status;
23414
      }
48 ashish 23415
    }
23416
 
553 chandransh 23417
    public getCartsByTime_args deepCopy() {
23418
      return new getCartsByTime_args(this);
48 ashish 23419
    }
23420
 
23421
    @Deprecated
553 chandransh 23422
    public getCartsByTime_args clone() {
23423
      return new getCartsByTime_args(this);
48 ashish 23424
    }
23425
 
553 chandransh 23426
    public long getFrom_time() {
23427
      return this.from_time;
48 ashish 23428
    }
23429
 
553 chandransh 23430
    public getCartsByTime_args setFrom_time(long from_time) {
23431
      this.from_time = from_time;
23432
      setFrom_timeIsSet(true);
48 ashish 23433
      return this;
23434
    }
23435
 
553 chandransh 23436
    public void unsetFrom_time() {
23437
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 23438
    }
23439
 
553 chandransh 23440
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
23441
    public boolean isSetFrom_time() {
23442
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 23443
    }
23444
 
553 chandransh 23445
    public void setFrom_timeIsSet(boolean value) {
23446
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 23447
    }
23448
 
553 chandransh 23449
    public long getTo_time() {
23450
      return this.to_time;
123 ashish 23451
    }
23452
 
553 chandransh 23453
    public getCartsByTime_args setTo_time(long to_time) {
23454
      this.to_time = to_time;
23455
      setTo_timeIsSet(true);
123 ashish 23456
      return this;
23457
    }
23458
 
553 chandransh 23459
    public void unsetTo_time() {
23460
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 23461
    }
23462
 
553 chandransh 23463
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
23464
    public boolean isSetTo_time() {
23465
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 23466
    }
23467
 
553 chandransh 23468
    public void setTo_timeIsSet(boolean value) {
23469
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 23470
    }
23471
 
553 chandransh 23472
    /**
23473
     * 
23474
     * @see CartStatus
23475
     */
23476
    public CartStatus getStatus() {
23477
      return this.status;
23478
    }
23479
 
23480
    /**
23481
     * 
23482
     * @see CartStatus
23483
     */
23484
    public getCartsByTime_args setStatus(CartStatus status) {
23485
      this.status = status;
23486
      return this;
23487
    }
23488
 
23489
    public void unsetStatus() {
23490
      this.status = null;
23491
    }
23492
 
23493
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
23494
    public boolean isSetStatus() {
23495
      return this.status != null;
23496
    }
23497
 
23498
    public void setStatusIsSet(boolean value) {
23499
      if (!value) {
23500
        this.status = null;
23501
      }
23502
    }
23503
 
48 ashish 23504
    public void setFieldValue(_Fields field, Object value) {
23505
      switch (field) {
553 chandransh 23506
      case FROM_TIME:
48 ashish 23507
        if (value == null) {
553 chandransh 23508
          unsetFrom_time();
48 ashish 23509
        } else {
553 chandransh 23510
          setFrom_time((Long)value);
48 ashish 23511
        }
23512
        break;
23513
 
553 chandransh 23514
      case TO_TIME:
123 ashish 23515
        if (value == null) {
553 chandransh 23516
          unsetTo_time();
123 ashish 23517
        } else {
553 chandransh 23518
          setTo_time((Long)value);
123 ashish 23519
        }
23520
        break;
23521
 
553 chandransh 23522
      case STATUS:
23523
        if (value == null) {
23524
          unsetStatus();
23525
        } else {
23526
          setStatus((CartStatus)value);
23527
        }
23528
        break;
23529
 
48 ashish 23530
      }
23531
    }
23532
 
23533
    public void setFieldValue(int fieldID, Object value) {
23534
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23535
    }
23536
 
23537
    public Object getFieldValue(_Fields field) {
23538
      switch (field) {
553 chandransh 23539
      case FROM_TIME:
23540
        return new Long(getFrom_time());
48 ashish 23541
 
553 chandransh 23542
      case TO_TIME:
23543
        return new Long(getTo_time());
123 ashish 23544
 
553 chandransh 23545
      case STATUS:
23546
        return getStatus();
23547
 
48 ashish 23548
      }
23549
      throw new IllegalStateException();
23550
    }
23551
 
23552
    public Object getFieldValue(int fieldId) {
23553
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23554
    }
23555
 
23556
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23557
    public boolean isSet(_Fields field) {
23558
      switch (field) {
553 chandransh 23559
      case FROM_TIME:
23560
        return isSetFrom_time();
23561
      case TO_TIME:
23562
        return isSetTo_time();
23563
      case STATUS:
23564
        return isSetStatus();
48 ashish 23565
      }
23566
      throw new IllegalStateException();
23567
    }
23568
 
23569
    public boolean isSet(int fieldID) {
23570
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23571
    }
23572
 
23573
    @Override
23574
    public boolean equals(Object that) {
23575
      if (that == null)
23576
        return false;
553 chandransh 23577
      if (that instanceof getCartsByTime_args)
23578
        return this.equals((getCartsByTime_args)that);
48 ashish 23579
      return false;
23580
    }
23581
 
553 chandransh 23582
    public boolean equals(getCartsByTime_args that) {
48 ashish 23583
      if (that == null)
23584
        return false;
23585
 
553 chandransh 23586
      boolean this_present_from_time = true;
23587
      boolean that_present_from_time = true;
23588
      if (this_present_from_time || that_present_from_time) {
23589
        if (!(this_present_from_time && that_present_from_time))
48 ashish 23590
          return false;
553 chandransh 23591
        if (this.from_time != that.from_time)
48 ashish 23592
          return false;
23593
      }
23594
 
553 chandransh 23595
      boolean this_present_to_time = true;
23596
      boolean that_present_to_time = true;
23597
      if (this_present_to_time || that_present_to_time) {
23598
        if (!(this_present_to_time && that_present_to_time))
123 ashish 23599
          return false;
553 chandransh 23600
        if (this.to_time != that.to_time)
123 ashish 23601
          return false;
23602
      }
23603
 
553 chandransh 23604
      boolean this_present_status = true && this.isSetStatus();
23605
      boolean that_present_status = true && that.isSetStatus();
23606
      if (this_present_status || that_present_status) {
23607
        if (!(this_present_status && that_present_status))
23608
          return false;
23609
        if (!this.status.equals(that.status))
23610
          return false;
23611
      }
23612
 
48 ashish 23613
      return true;
23614
    }
23615
 
23616
    @Override
23617
    public int hashCode() {
23618
      return 0;
23619
    }
23620
 
553 chandransh 23621
    public int compareTo(getCartsByTime_args other) {
48 ashish 23622
      if (!getClass().equals(other.getClass())) {
23623
        return getClass().getName().compareTo(other.getClass().getName());
23624
      }
23625
 
23626
      int lastComparison = 0;
553 chandransh 23627
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 23628
 
553 chandransh 23629
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 23630
      if (lastComparison != 0) {
23631
        return lastComparison;
23632
      }
553 chandransh 23633
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 23634
      if (lastComparison != 0) {
23635
        return lastComparison;
23636
      }
553 chandransh 23637
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 23638
      if (lastComparison != 0) {
23639
        return lastComparison;
23640
      }
553 chandransh 23641
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 23642
      if (lastComparison != 0) {
23643
        return lastComparison;
23644
      }
553 chandransh 23645
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
23646
      if (lastComparison != 0) {
23647
        return lastComparison;
23648
      }
23649
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
23650
      if (lastComparison != 0) {
23651
        return lastComparison;
23652
      }
48 ashish 23653
      return 0;
23654
    }
23655
 
23656
    public void read(TProtocol iprot) throws TException {
23657
      TField field;
23658
      iprot.readStructBegin();
23659
      while (true)
23660
      {
23661
        field = iprot.readFieldBegin();
23662
        if (field.type == TType.STOP) { 
23663
          break;
23664
        }
23665
        _Fields fieldId = _Fields.findByThriftId(field.id);
23666
        if (fieldId == null) {
23667
          TProtocolUtil.skip(iprot, field.type);
23668
        } else {
23669
          switch (fieldId) {
553 chandransh 23670
            case FROM_TIME:
48 ashish 23671
              if (field.type == TType.I64) {
553 chandransh 23672
                this.from_time = iprot.readI64();
23673
                setFrom_timeIsSet(true);
48 ashish 23674
              } else { 
23675
                TProtocolUtil.skip(iprot, field.type);
23676
              }
23677
              break;
553 chandransh 23678
            case TO_TIME:
23679
              if (field.type == TType.I64) {
23680
                this.to_time = iprot.readI64();
23681
                setTo_timeIsSet(true);
123 ashish 23682
              } else { 
23683
                TProtocolUtil.skip(iprot, field.type);
23684
              }
23685
              break;
553 chandransh 23686
            case STATUS:
23687
              if (field.type == TType.I32) {
23688
                this.status = CartStatus.findByValue(iprot.readI32());
23689
              } else { 
23690
                TProtocolUtil.skip(iprot, field.type);
23691
              }
23692
              break;
48 ashish 23693
          }
23694
          iprot.readFieldEnd();
23695
        }
23696
      }
23697
      iprot.readStructEnd();
23698
      validate();
23699
    }
23700
 
23701
    public void write(TProtocol oprot) throws TException {
23702
      validate();
23703
 
23704
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 23705
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
23706
      oprot.writeI64(this.from_time);
48 ashish 23707
      oprot.writeFieldEnd();
553 chandransh 23708
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
23709
      oprot.writeI64(this.to_time);
123 ashish 23710
      oprot.writeFieldEnd();
553 chandransh 23711
      if (this.status != null) {
23712
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
23713
        oprot.writeI32(this.status.getValue());
23714
        oprot.writeFieldEnd();
23715
      }
48 ashish 23716
      oprot.writeFieldStop();
23717
      oprot.writeStructEnd();
23718
    }
23719
 
23720
    @Override
23721
    public String toString() {
553 chandransh 23722
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 23723
      boolean first = true;
23724
 
553 chandransh 23725
      sb.append("from_time:");
23726
      sb.append(this.from_time);
48 ashish 23727
      first = false;
123 ashish 23728
      if (!first) sb.append(", ");
553 chandransh 23729
      sb.append("to_time:");
23730
      sb.append(this.to_time);
123 ashish 23731
      first = false;
553 chandransh 23732
      if (!first) sb.append(", ");
23733
      sb.append("status:");
23734
      if (this.status == null) {
23735
        sb.append("null");
23736
      } else {
23737
        String status_name = status.name();
23738
        if (status_name != null) {
23739
          sb.append(status_name);
23740
          sb.append(" (");
23741
        }
23742
        sb.append(this.status);
23743
        if (status_name != null) {
23744
          sb.append(")");
23745
        }
23746
      }
23747
      first = false;
48 ashish 23748
      sb.append(")");
23749
      return sb.toString();
23750
    }
23751
 
23752
    public void validate() throws TException {
23753
      // check for required fields
23754
    }
23755
 
23756
  }
23757
 
553 chandransh 23758
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
23759
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 23760
 
553 chandransh 23761
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
23762
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 23763
 
553 chandransh 23764
    private List<Cart> success;
23765
    private ShoppingCartException scx;
48 ashish 23766
 
23767
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23768
    public enum _Fields implements TFieldIdEnum {
23769
      SUCCESS((short)0, "success"),
553 chandransh 23770
      SCX((short)1, "scx");
48 ashish 23771
 
23772
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23773
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23774
 
23775
      static {
23776
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23777
          byId.put((int)field._thriftId, field);
23778
          byName.put(field.getFieldName(), field);
23779
        }
23780
      }
23781
 
23782
      /**
23783
       * Find the _Fields constant that matches fieldId, or null if its not found.
23784
       */
23785
      public static _Fields findByThriftId(int fieldId) {
23786
        return byId.get(fieldId);
23787
      }
23788
 
23789
      /**
23790
       * Find the _Fields constant that matches fieldId, throwing an exception
23791
       * if it is not found.
23792
       */
23793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23794
        _Fields fields = findByThriftId(fieldId);
23795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23796
        return fields;
23797
      }
23798
 
23799
      /**
23800
       * Find the _Fields constant that matches name, or null if its not found.
23801
       */
23802
      public static _Fields findByName(String name) {
23803
        return byName.get(name);
23804
      }
23805
 
23806
      private final short _thriftId;
23807
      private final String _fieldName;
23808
 
23809
      _Fields(short thriftId, String fieldName) {
23810
        _thriftId = thriftId;
23811
        _fieldName = fieldName;
23812
      }
23813
 
23814
      public short getThriftFieldId() {
23815
        return _thriftId;
23816
      }
23817
 
23818
      public String getFieldName() {
23819
        return _fieldName;
23820
      }
23821
    }
23822
 
23823
    // isset id assignments
23824
 
23825
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23826
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 23827
          new ListMetaData(TType.LIST, 
23828
              new StructMetaData(TType.STRUCT, Cart.class))));
23829
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 23830
          new FieldValueMetaData(TType.STRUCT)));
23831
    }});
23832
 
23833
    static {
553 chandransh 23834
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 23835
    }
23836
 
553 chandransh 23837
    public getCartsByTime_result() {
48 ashish 23838
    }
23839
 
553 chandransh 23840
    public getCartsByTime_result(
23841
      List<Cart> success,
23842
      ShoppingCartException scx)
48 ashish 23843
    {
23844
      this();
23845
      this.success = success;
553 chandransh 23846
      this.scx = scx;
48 ashish 23847
    }
23848
 
23849
    /**
23850
     * Performs a deep copy on <i>other</i>.
23851
     */
553 chandransh 23852
    public getCartsByTime_result(getCartsByTime_result other) {
23853
      if (other.isSetSuccess()) {
23854
        List<Cart> __this__success = new ArrayList<Cart>();
23855
        for (Cart other_element : other.success) {
23856
          __this__success.add(new Cart(other_element));
23857
        }
23858
        this.success = __this__success;
48 ashish 23859
      }
553 chandransh 23860
      if (other.isSetScx()) {
23861
        this.scx = new ShoppingCartException(other.scx);
23862
      }
48 ashish 23863
    }
23864
 
553 chandransh 23865
    public getCartsByTime_result deepCopy() {
23866
      return new getCartsByTime_result(this);
48 ashish 23867
    }
23868
 
23869
    @Deprecated
553 chandransh 23870
    public getCartsByTime_result clone() {
23871
      return new getCartsByTime_result(this);
48 ashish 23872
    }
23873
 
553 chandransh 23874
    public int getSuccessSize() {
23875
      return (this.success == null) ? 0 : this.success.size();
23876
    }
23877
 
23878
    public java.util.Iterator<Cart> getSuccessIterator() {
23879
      return (this.success == null) ? null : this.success.iterator();
23880
    }
23881
 
23882
    public void addToSuccess(Cart elem) {
23883
      if (this.success == null) {
23884
        this.success = new ArrayList<Cart>();
23885
      }
23886
      this.success.add(elem);
23887
    }
23888
 
23889
    public List<Cart> getSuccess() {
48 ashish 23890
      return this.success;
23891
    }
23892
 
553 chandransh 23893
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 23894
      this.success = success;
23895
      return this;
23896
    }
23897
 
23898
    public void unsetSuccess() {
553 chandransh 23899
      this.success = null;
48 ashish 23900
    }
23901
 
23902
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23903
    public boolean isSetSuccess() {
553 chandransh 23904
      return this.success != null;
48 ashish 23905
    }
23906
 
23907
    public void setSuccessIsSet(boolean value) {
553 chandransh 23908
      if (!value) {
23909
        this.success = null;
23910
      }
48 ashish 23911
    }
23912
 
553 chandransh 23913
    public ShoppingCartException getScx() {
23914
      return this.scx;
48 ashish 23915
    }
23916
 
553 chandransh 23917
    public getCartsByTime_result setScx(ShoppingCartException scx) {
23918
      this.scx = scx;
48 ashish 23919
      return this;
23920
    }
23921
 
553 chandransh 23922
    public void unsetScx() {
23923
      this.scx = null;
48 ashish 23924
    }
23925
 
553 chandransh 23926
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23927
    public boolean isSetScx() {
23928
      return this.scx != null;
48 ashish 23929
    }
23930
 
553 chandransh 23931
    public void setScxIsSet(boolean value) {
48 ashish 23932
      if (!value) {
553 chandransh 23933
        this.scx = null;
48 ashish 23934
      }
23935
    }
23936
 
23937
    public void setFieldValue(_Fields field, Object value) {
23938
      switch (field) {
23939
      case SUCCESS:
23940
        if (value == null) {
23941
          unsetSuccess();
23942
        } else {
553 chandransh 23943
          setSuccess((List<Cart>)value);
48 ashish 23944
        }
23945
        break;
23946
 
553 chandransh 23947
      case SCX:
48 ashish 23948
        if (value == null) {
553 chandransh 23949
          unsetScx();
48 ashish 23950
        } else {
553 chandransh 23951
          setScx((ShoppingCartException)value);
48 ashish 23952
        }
23953
        break;
23954
 
23955
      }
23956
    }
23957
 
23958
    public void setFieldValue(int fieldID, Object value) {
23959
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23960
    }
23961
 
23962
    public Object getFieldValue(_Fields field) {
23963
      switch (field) {
23964
      case SUCCESS:
553 chandransh 23965
        return getSuccess();
48 ashish 23966
 
553 chandransh 23967
      case SCX:
23968
        return getScx();
48 ashish 23969
 
23970
      }
23971
      throw new IllegalStateException();
23972
    }
23973
 
23974
    public Object getFieldValue(int fieldId) {
23975
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23976
    }
23977
 
23978
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23979
    public boolean isSet(_Fields field) {
23980
      switch (field) {
23981
      case SUCCESS:
23982
        return isSetSuccess();
553 chandransh 23983
      case SCX:
23984
        return isSetScx();
48 ashish 23985
      }
23986
      throw new IllegalStateException();
23987
    }
23988
 
23989
    public boolean isSet(int fieldID) {
23990
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23991
    }
23992
 
23993
    @Override
23994
    public boolean equals(Object that) {
23995
      if (that == null)
23996
        return false;
553 chandransh 23997
      if (that instanceof getCartsByTime_result)
23998
        return this.equals((getCartsByTime_result)that);
48 ashish 23999
      return false;
24000
    }
24001
 
553 chandransh 24002
    public boolean equals(getCartsByTime_result that) {
48 ashish 24003
      if (that == null)
24004
        return false;
24005
 
553 chandransh 24006
      boolean this_present_success = true && this.isSetSuccess();
24007
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 24008
      if (this_present_success || that_present_success) {
24009
        if (!(this_present_success && that_present_success))
24010
          return false;
553 chandransh 24011
        if (!this.success.equals(that.success))
48 ashish 24012
          return false;
24013
      }
24014
 
553 chandransh 24015
      boolean this_present_scx = true && this.isSetScx();
24016
      boolean that_present_scx = true && that.isSetScx();
24017
      if (this_present_scx || that_present_scx) {
24018
        if (!(this_present_scx && that_present_scx))
48 ashish 24019
          return false;
553 chandransh 24020
        if (!this.scx.equals(that.scx))
48 ashish 24021
          return false;
24022
      }
24023
 
24024
      return true;
24025
    }
24026
 
24027
    @Override
24028
    public int hashCode() {
24029
      return 0;
24030
    }
24031
 
553 chandransh 24032
    public int compareTo(getCartsByTime_result other) {
48 ashish 24033
      if (!getClass().equals(other.getClass())) {
24034
        return getClass().getName().compareTo(other.getClass().getName());
24035
      }
24036
 
24037
      int lastComparison = 0;
553 chandransh 24038
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 24039
 
24040
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24041
      if (lastComparison != 0) {
24042
        return lastComparison;
24043
      }
24044
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24045
      if (lastComparison != 0) {
24046
        return lastComparison;
24047
      }
553 chandransh 24048
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 24049
      if (lastComparison != 0) {
24050
        return lastComparison;
24051
      }
553 chandransh 24052
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 24053
      if (lastComparison != 0) {
24054
        return lastComparison;
24055
      }
24056
      return 0;
24057
    }
24058
 
24059
    public void read(TProtocol iprot) throws TException {
24060
      TField field;
24061
      iprot.readStructBegin();
24062
      while (true)
24063
      {
24064
        field = iprot.readFieldBegin();
24065
        if (field.type == TType.STOP) { 
24066
          break;
24067
        }
24068
        _Fields fieldId = _Fields.findByThriftId(field.id);
24069
        if (fieldId == null) {
24070
          TProtocolUtil.skip(iprot, field.type);
24071
        } else {
24072
          switch (fieldId) {
24073
            case SUCCESS:
553 chandransh 24074
              if (field.type == TType.LIST) {
24075
                {
1590 varun.gupt 24076
                  TList _list36 = iprot.readListBegin();
24077
                  this.success = new ArrayList<Cart>(_list36.size);
24078
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
553 chandransh 24079
                  {
1590 varun.gupt 24080
                    Cart _elem38;
24081
                    _elem38 = new Cart();
24082
                    _elem38.read(iprot);
24083
                    this.success.add(_elem38);
553 chandransh 24084
                  }
24085
                  iprot.readListEnd();
24086
                }
48 ashish 24087
              } else { 
24088
                TProtocolUtil.skip(iprot, field.type);
24089
              }
24090
              break;
553 chandransh 24091
            case SCX:
48 ashish 24092
              if (field.type == TType.STRUCT) {
553 chandransh 24093
                this.scx = new ShoppingCartException();
24094
                this.scx.read(iprot);
48 ashish 24095
              } else { 
24096
                TProtocolUtil.skip(iprot, field.type);
24097
              }
24098
              break;
24099
          }
24100
          iprot.readFieldEnd();
24101
        }
24102
      }
24103
      iprot.readStructEnd();
24104
      validate();
24105
    }
24106
 
24107
    public void write(TProtocol oprot) throws TException {
24108
      oprot.writeStructBegin(STRUCT_DESC);
24109
 
24110
      if (this.isSetSuccess()) {
24111
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 24112
        {
24113
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1590 varun.gupt 24114
          for (Cart _iter39 : this.success)
553 chandransh 24115
          {
1590 varun.gupt 24116
            _iter39.write(oprot);
553 chandransh 24117
          }
24118
          oprot.writeListEnd();
24119
        }
48 ashish 24120
        oprot.writeFieldEnd();
553 chandransh 24121
      } else if (this.isSetScx()) {
24122
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24123
        this.scx.write(oprot);
48 ashish 24124
        oprot.writeFieldEnd();
24125
      }
24126
      oprot.writeFieldStop();
24127
      oprot.writeStructEnd();
24128
    }
24129
 
24130
    @Override
24131
    public String toString() {
553 chandransh 24132
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 24133
      boolean first = true;
24134
 
24135
      sb.append("success:");
553 chandransh 24136
      if (this.success == null) {
24137
        sb.append("null");
24138
      } else {
24139
        sb.append(this.success);
24140
      }
48 ashish 24141
      first = false;
24142
      if (!first) sb.append(", ");
553 chandransh 24143
      sb.append("scx:");
24144
      if (this.scx == null) {
48 ashish 24145
        sb.append("null");
24146
      } else {
553 chandransh 24147
        sb.append(this.scx);
48 ashish 24148
      }
24149
      first = false;
24150
      sb.append(")");
24151
      return sb.toString();
24152
    }
24153
 
24154
    public void validate() throws TException {
24155
      // check for required fields
24156
    }
24157
 
24158
  }
24159
 
553 chandransh 24160
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
24161
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 24162
 
553 chandransh 24163
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24164
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 24165
 
553 chandransh 24166
    private long cartId;
24167
    private CartStatus status;
48 ashish 24168
 
24169
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24170
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24171
      CART_ID((short)1, "cartId"),
24172
      /**
24173
       * 
24174
       * @see CartStatus
24175
       */
24176
      STATUS((short)2, "status");
48 ashish 24177
 
24178
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24179
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24180
 
24181
      static {
24182
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24183
          byId.put((int)field._thriftId, field);
24184
          byName.put(field.getFieldName(), field);
24185
        }
24186
      }
24187
 
24188
      /**
24189
       * Find the _Fields constant that matches fieldId, or null if its not found.
24190
       */
24191
      public static _Fields findByThriftId(int fieldId) {
24192
        return byId.get(fieldId);
24193
      }
24194
 
24195
      /**
24196
       * Find the _Fields constant that matches fieldId, throwing an exception
24197
       * if it is not found.
24198
       */
24199
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24200
        _Fields fields = findByThriftId(fieldId);
24201
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24202
        return fields;
24203
      }
24204
 
24205
      /**
24206
       * Find the _Fields constant that matches name, or null if its not found.
24207
       */
24208
      public static _Fields findByName(String name) {
24209
        return byName.get(name);
24210
      }
24211
 
24212
      private final short _thriftId;
24213
      private final String _fieldName;
24214
 
24215
      _Fields(short thriftId, String fieldName) {
24216
        _thriftId = thriftId;
24217
        _fieldName = fieldName;
24218
      }
24219
 
24220
      public short getThriftFieldId() {
24221
        return _thriftId;
24222
      }
24223
 
24224
      public String getFieldName() {
24225
        return _fieldName;
24226
      }
24227
    }
24228
 
24229
    // isset id assignments
553 chandransh 24230
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 24231
    private BitSet __isset_bit_vector = new BitSet(1);
24232
 
24233
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24234
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24235
          new FieldValueMetaData(TType.I64)));
553 chandransh 24236
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
24237
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 24238
    }});
24239
 
24240
    static {
553 chandransh 24241
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 24242
    }
24243
 
553 chandransh 24244
    public changeCartStatus_args() {
48 ashish 24245
    }
24246
 
553 chandransh 24247
    public changeCartStatus_args(
24248
      long cartId,
24249
      CartStatus status)
48 ashish 24250
    {
24251
      this();
553 chandransh 24252
      this.cartId = cartId;
24253
      setCartIdIsSet(true);
24254
      this.status = status;
48 ashish 24255
    }
24256
 
24257
    /**
24258
     * Performs a deep copy on <i>other</i>.
24259
     */
553 chandransh 24260
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 24261
      __isset_bit_vector.clear();
24262
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24263
      this.cartId = other.cartId;
24264
      if (other.isSetStatus()) {
24265
        this.status = other.status;
24266
      }
48 ashish 24267
    }
24268
 
553 chandransh 24269
    public changeCartStatus_args deepCopy() {
24270
      return new changeCartStatus_args(this);
48 ashish 24271
    }
24272
 
24273
    @Deprecated
553 chandransh 24274
    public changeCartStatus_args clone() {
24275
      return new changeCartStatus_args(this);
48 ashish 24276
    }
24277
 
553 chandransh 24278
    public long getCartId() {
24279
      return this.cartId;
48 ashish 24280
    }
24281
 
553 chandransh 24282
    public changeCartStatus_args setCartId(long cartId) {
24283
      this.cartId = cartId;
24284
      setCartIdIsSet(true);
48 ashish 24285
      return this;
24286
    }
24287
 
553 chandransh 24288
    public void unsetCartId() {
24289
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24290
    }
24291
 
553 chandransh 24292
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24293
    public boolean isSetCartId() {
24294
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24295
    }
24296
 
553 chandransh 24297
    public void setCartIdIsSet(boolean value) {
24298
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24299
    }
24300
 
553 chandransh 24301
    /**
24302
     * 
24303
     * @see CartStatus
24304
     */
24305
    public CartStatus getStatus() {
24306
      return this.status;
24307
    }
24308
 
24309
    /**
24310
     * 
24311
     * @see CartStatus
24312
     */
24313
    public changeCartStatus_args setStatus(CartStatus status) {
24314
      this.status = status;
24315
      return this;
24316
    }
24317
 
24318
    public void unsetStatus() {
24319
      this.status = null;
24320
    }
24321
 
24322
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
24323
    public boolean isSetStatus() {
24324
      return this.status != null;
24325
    }
24326
 
24327
    public void setStatusIsSet(boolean value) {
24328
      if (!value) {
24329
        this.status = null;
24330
      }
24331
    }
24332
 
48 ashish 24333
    public void setFieldValue(_Fields field, Object value) {
24334
      switch (field) {
553 chandransh 24335
      case CART_ID:
48 ashish 24336
        if (value == null) {
553 chandransh 24337
          unsetCartId();
48 ashish 24338
        } else {
553 chandransh 24339
          setCartId((Long)value);
48 ashish 24340
        }
24341
        break;
24342
 
553 chandransh 24343
      case STATUS:
24344
        if (value == null) {
24345
          unsetStatus();
24346
        } else {
24347
          setStatus((CartStatus)value);
24348
        }
24349
        break;
24350
 
48 ashish 24351
      }
24352
    }
24353
 
24354
    public void setFieldValue(int fieldID, Object value) {
24355
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24356
    }
24357
 
24358
    public Object getFieldValue(_Fields field) {
24359
      switch (field) {
553 chandransh 24360
      case CART_ID:
24361
        return new Long(getCartId());
48 ashish 24362
 
553 chandransh 24363
      case STATUS:
24364
        return getStatus();
24365
 
48 ashish 24366
      }
24367
      throw new IllegalStateException();
24368
    }
24369
 
24370
    public Object getFieldValue(int fieldId) {
24371
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24372
    }
24373
 
24374
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24375
    public boolean isSet(_Fields field) {
24376
      switch (field) {
553 chandransh 24377
      case CART_ID:
24378
        return isSetCartId();
24379
      case STATUS:
24380
        return isSetStatus();
48 ashish 24381
      }
24382
      throw new IllegalStateException();
24383
    }
24384
 
24385
    public boolean isSet(int fieldID) {
24386
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24387
    }
24388
 
24389
    @Override
24390
    public boolean equals(Object that) {
24391
      if (that == null)
24392
        return false;
553 chandransh 24393
      if (that instanceof changeCartStatus_args)
24394
        return this.equals((changeCartStatus_args)that);
48 ashish 24395
      return false;
24396
    }
24397
 
553 chandransh 24398
    public boolean equals(changeCartStatus_args that) {
48 ashish 24399
      if (that == null)
24400
        return false;
24401
 
553 chandransh 24402
      boolean this_present_cartId = true;
24403
      boolean that_present_cartId = true;
24404
      if (this_present_cartId || that_present_cartId) {
24405
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24406
          return false;
553 chandransh 24407
        if (this.cartId != that.cartId)
48 ashish 24408
          return false;
24409
      }
24410
 
553 chandransh 24411
      boolean this_present_status = true && this.isSetStatus();
24412
      boolean that_present_status = true && that.isSetStatus();
24413
      if (this_present_status || that_present_status) {
24414
        if (!(this_present_status && that_present_status))
24415
          return false;
24416
        if (!this.status.equals(that.status))
24417
          return false;
24418
      }
24419
 
48 ashish 24420
      return true;
24421
    }
24422
 
24423
    @Override
24424
    public int hashCode() {
24425
      return 0;
24426
    }
24427
 
553 chandransh 24428
    public int compareTo(changeCartStatus_args other) {
48 ashish 24429
      if (!getClass().equals(other.getClass())) {
24430
        return getClass().getName().compareTo(other.getClass().getName());
24431
      }
24432
 
24433
      int lastComparison = 0;
553 chandransh 24434
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 24435
 
553 chandransh 24436
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24437
      if (lastComparison != 0) {
24438
        return lastComparison;
24439
      }
553 chandransh 24440
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24441
      if (lastComparison != 0) {
24442
        return lastComparison;
24443
      }
553 chandransh 24444
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
24445
      if (lastComparison != 0) {
24446
        return lastComparison;
24447
      }
24448
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
24449
      if (lastComparison != 0) {
24450
        return lastComparison;
24451
      }
48 ashish 24452
      return 0;
24453
    }
24454
 
24455
    public void read(TProtocol iprot) throws TException {
24456
      TField field;
24457
      iprot.readStructBegin();
24458
      while (true)
24459
      {
24460
        field = iprot.readFieldBegin();
24461
        if (field.type == TType.STOP) { 
24462
          break;
24463
        }
24464
        _Fields fieldId = _Fields.findByThriftId(field.id);
24465
        if (fieldId == null) {
24466
          TProtocolUtil.skip(iprot, field.type);
24467
        } else {
24468
          switch (fieldId) {
553 chandransh 24469
            case CART_ID:
48 ashish 24470
              if (field.type == TType.I64) {
553 chandransh 24471
                this.cartId = iprot.readI64();
24472
                setCartIdIsSet(true);
48 ashish 24473
              } else { 
24474
                TProtocolUtil.skip(iprot, field.type);
24475
              }
24476
              break;
553 chandransh 24477
            case STATUS:
24478
              if (field.type == TType.I32) {
24479
                this.status = CartStatus.findByValue(iprot.readI32());
24480
              } else { 
24481
                TProtocolUtil.skip(iprot, field.type);
24482
              }
24483
              break;
48 ashish 24484
          }
24485
          iprot.readFieldEnd();
24486
        }
24487
      }
24488
      iprot.readStructEnd();
24489
      validate();
24490
    }
24491
 
24492
    public void write(TProtocol oprot) throws TException {
24493
      validate();
24494
 
24495
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24496
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24497
      oprot.writeI64(this.cartId);
48 ashish 24498
      oprot.writeFieldEnd();
553 chandransh 24499
      if (this.status != null) {
24500
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
24501
        oprot.writeI32(this.status.getValue());
24502
        oprot.writeFieldEnd();
24503
      }
48 ashish 24504
      oprot.writeFieldStop();
24505
      oprot.writeStructEnd();
24506
    }
24507
 
24508
    @Override
24509
    public String toString() {
553 chandransh 24510
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 24511
      boolean first = true;
24512
 
553 chandransh 24513
      sb.append("cartId:");
24514
      sb.append(this.cartId);
48 ashish 24515
      first = false;
553 chandransh 24516
      if (!first) sb.append(", ");
24517
      sb.append("status:");
24518
      if (this.status == null) {
24519
        sb.append("null");
24520
      } else {
24521
        String status_name = status.name();
24522
        if (status_name != null) {
24523
          sb.append(status_name);
24524
          sb.append(" (");
24525
        }
24526
        sb.append(this.status);
24527
        if (status_name != null) {
24528
          sb.append(")");
24529
        }
24530
      }
24531
      first = false;
48 ashish 24532
      sb.append(")");
24533
      return sb.toString();
24534
    }
24535
 
24536
    public void validate() throws TException {
24537
      // check for required fields
24538
    }
24539
 
24540
  }
24541
 
553 chandransh 24542
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
24543
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 24544
 
553 chandransh 24545
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 24546
 
553 chandransh 24547
    private ShoppingCartException scx;
48 ashish 24548
 
24549
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24550
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24551
      SCX((short)1, "scx");
48 ashish 24552
 
24553
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24554
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24555
 
24556
      static {
24557
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24558
          byId.put((int)field._thriftId, field);
24559
          byName.put(field.getFieldName(), field);
24560
        }
24561
      }
24562
 
24563
      /**
24564
       * Find the _Fields constant that matches fieldId, or null if its not found.
24565
       */
24566
      public static _Fields findByThriftId(int fieldId) {
24567
        return byId.get(fieldId);
24568
      }
24569
 
24570
      /**
24571
       * Find the _Fields constant that matches fieldId, throwing an exception
24572
       * if it is not found.
24573
       */
24574
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24575
        _Fields fields = findByThriftId(fieldId);
24576
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24577
        return fields;
24578
      }
24579
 
24580
      /**
24581
       * Find the _Fields constant that matches name, or null if its not found.
24582
       */
24583
      public static _Fields findByName(String name) {
24584
        return byName.get(name);
24585
      }
24586
 
24587
      private final short _thriftId;
24588
      private final String _fieldName;
24589
 
24590
      _Fields(short thriftId, String fieldName) {
24591
        _thriftId = thriftId;
24592
        _fieldName = fieldName;
24593
      }
24594
 
24595
      public short getThriftFieldId() {
24596
        return _thriftId;
24597
      }
24598
 
24599
      public String getFieldName() {
24600
        return _fieldName;
24601
      }
24602
    }
24603
 
24604
    // isset id assignments
24605
 
24606
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24607
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 24608
          new FieldValueMetaData(TType.STRUCT)));
24609
    }});
24610
 
24611
    static {
553 chandransh 24612
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 24613
    }
24614
 
553 chandransh 24615
    public changeCartStatus_result() {
48 ashish 24616
    }
24617
 
553 chandransh 24618
    public changeCartStatus_result(
24619
      ShoppingCartException scx)
48 ashish 24620
    {
24621
      this();
553 chandransh 24622
      this.scx = scx;
48 ashish 24623
    }
24624
 
24625
    /**
24626
     * Performs a deep copy on <i>other</i>.
24627
     */
553 chandransh 24628
    public changeCartStatus_result(changeCartStatus_result other) {
24629
      if (other.isSetScx()) {
24630
        this.scx = new ShoppingCartException(other.scx);
24631
      }
24632
    }
24633
 
24634
    public changeCartStatus_result deepCopy() {
24635
      return new changeCartStatus_result(this);
24636
    }
24637
 
24638
    @Deprecated
24639
    public changeCartStatus_result clone() {
24640
      return new changeCartStatus_result(this);
24641
    }
24642
 
24643
    public ShoppingCartException getScx() {
24644
      return this.scx;
24645
    }
24646
 
24647
    public changeCartStatus_result setScx(ShoppingCartException scx) {
24648
      this.scx = scx;
24649
      return this;
24650
    }
24651
 
24652
    public void unsetScx() {
24653
      this.scx = null;
24654
    }
24655
 
24656
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24657
    public boolean isSetScx() {
24658
      return this.scx != null;
24659
    }
24660
 
24661
    public void setScxIsSet(boolean value) {
24662
      if (!value) {
24663
        this.scx = null;
24664
      }
24665
    }
24666
 
24667
    public void setFieldValue(_Fields field, Object value) {
24668
      switch (field) {
24669
      case SCX:
24670
        if (value == null) {
24671
          unsetScx();
24672
        } else {
24673
          setScx((ShoppingCartException)value);
24674
        }
24675
        break;
24676
 
24677
      }
24678
    }
24679
 
24680
    public void setFieldValue(int fieldID, Object value) {
24681
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24682
    }
24683
 
24684
    public Object getFieldValue(_Fields field) {
24685
      switch (field) {
24686
      case SCX:
24687
        return getScx();
24688
 
24689
      }
24690
      throw new IllegalStateException();
24691
    }
24692
 
24693
    public Object getFieldValue(int fieldId) {
24694
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24695
    }
24696
 
24697
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24698
    public boolean isSet(_Fields field) {
24699
      switch (field) {
24700
      case SCX:
24701
        return isSetScx();
24702
      }
24703
      throw new IllegalStateException();
24704
    }
24705
 
24706
    public boolean isSet(int fieldID) {
24707
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24708
    }
24709
 
24710
    @Override
24711
    public boolean equals(Object that) {
24712
      if (that == null)
24713
        return false;
24714
      if (that instanceof changeCartStatus_result)
24715
        return this.equals((changeCartStatus_result)that);
24716
      return false;
24717
    }
24718
 
24719
    public boolean equals(changeCartStatus_result that) {
24720
      if (that == null)
24721
        return false;
24722
 
24723
      boolean this_present_scx = true && this.isSetScx();
24724
      boolean that_present_scx = true && that.isSetScx();
24725
      if (this_present_scx || that_present_scx) {
24726
        if (!(this_present_scx && that_present_scx))
24727
          return false;
24728
        if (!this.scx.equals(that.scx))
24729
          return false;
24730
      }
24731
 
24732
      return true;
24733
    }
24734
 
24735
    @Override
24736
    public int hashCode() {
24737
      return 0;
24738
    }
24739
 
24740
    public int compareTo(changeCartStatus_result other) {
24741
      if (!getClass().equals(other.getClass())) {
24742
        return getClass().getName().compareTo(other.getClass().getName());
24743
      }
24744
 
24745
      int lastComparison = 0;
24746
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
24747
 
24748
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24749
      if (lastComparison != 0) {
24750
        return lastComparison;
24751
      }
24752
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24753
      if (lastComparison != 0) {
24754
        return lastComparison;
24755
      }
24756
      return 0;
24757
    }
24758
 
24759
    public void read(TProtocol iprot) throws TException {
24760
      TField field;
24761
      iprot.readStructBegin();
24762
      while (true)
24763
      {
24764
        field = iprot.readFieldBegin();
24765
        if (field.type == TType.STOP) { 
24766
          break;
24767
        }
24768
        _Fields fieldId = _Fields.findByThriftId(field.id);
24769
        if (fieldId == null) {
24770
          TProtocolUtil.skip(iprot, field.type);
24771
        } else {
24772
          switch (fieldId) {
24773
            case SCX:
24774
              if (field.type == TType.STRUCT) {
24775
                this.scx = new ShoppingCartException();
24776
                this.scx.read(iprot);
24777
              } else { 
24778
                TProtocolUtil.skip(iprot, field.type);
24779
              }
24780
              break;
24781
          }
24782
          iprot.readFieldEnd();
24783
        }
24784
      }
24785
      iprot.readStructEnd();
24786
      validate();
24787
    }
24788
 
24789
    public void write(TProtocol oprot) throws TException {
24790
      oprot.writeStructBegin(STRUCT_DESC);
24791
 
24792
      if (this.isSetScx()) {
24793
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24794
        this.scx.write(oprot);
24795
        oprot.writeFieldEnd();
24796
      }
24797
      oprot.writeFieldStop();
24798
      oprot.writeStructEnd();
24799
    }
24800
 
24801
    @Override
24802
    public String toString() {
24803
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
24804
      boolean first = true;
24805
 
24806
      sb.append("scx:");
24807
      if (this.scx == null) {
24808
        sb.append("null");
24809
      } else {
24810
        sb.append(this.scx);
24811
      }
24812
      first = false;
24813
      sb.append(")");
24814
      return sb.toString();
24815
    }
24816
 
24817
    public void validate() throws TException {
24818
      // check for required fields
24819
    }
24820
 
24821
  }
24822
 
24823
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
24824
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
24825
 
24826
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24827
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
24828
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
24829
 
24830
    private long cartId;
24831
    private long itemId;
24832
    private long quantity;
24833
 
24834
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24835
    public enum _Fields implements TFieldIdEnum {
24836
      CART_ID((short)1, "cartId"),
24837
      ITEM_ID((short)2, "itemId"),
24838
      QUANTITY((short)3, "quantity");
24839
 
24840
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24841
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24842
 
24843
      static {
24844
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24845
          byId.put((int)field._thriftId, field);
24846
          byName.put(field.getFieldName(), field);
24847
        }
24848
      }
24849
 
24850
      /**
24851
       * Find the _Fields constant that matches fieldId, or null if its not found.
24852
       */
24853
      public static _Fields findByThriftId(int fieldId) {
24854
        return byId.get(fieldId);
24855
      }
24856
 
24857
      /**
24858
       * Find the _Fields constant that matches fieldId, throwing an exception
24859
       * if it is not found.
24860
       */
24861
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24862
        _Fields fields = findByThriftId(fieldId);
24863
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24864
        return fields;
24865
      }
24866
 
24867
      /**
24868
       * Find the _Fields constant that matches name, or null if its not found.
24869
       */
24870
      public static _Fields findByName(String name) {
24871
        return byName.get(name);
24872
      }
24873
 
24874
      private final short _thriftId;
24875
      private final String _fieldName;
24876
 
24877
      _Fields(short thriftId, String fieldName) {
24878
        _thriftId = thriftId;
24879
        _fieldName = fieldName;
24880
      }
24881
 
24882
      public short getThriftFieldId() {
24883
        return _thriftId;
24884
      }
24885
 
24886
      public String getFieldName() {
24887
        return _fieldName;
24888
      }
24889
    }
24890
 
24891
    // isset id assignments
24892
    private static final int __CARTID_ISSET_ID = 0;
24893
    private static final int __ITEMID_ISSET_ID = 1;
24894
    private static final int __QUANTITY_ISSET_ID = 2;
24895
    private BitSet __isset_bit_vector = new BitSet(3);
24896
 
24897
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24898
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
24899
          new FieldValueMetaData(TType.I64)));
24900
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
24901
          new FieldValueMetaData(TType.I64)));
24902
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
24903
          new FieldValueMetaData(TType.I64)));
24904
    }});
24905
 
24906
    static {
24907
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
24908
    }
24909
 
24910
    public addItemToCart_args() {
24911
    }
24912
 
24913
    public addItemToCart_args(
24914
      long cartId,
24915
      long itemId,
24916
      long quantity)
24917
    {
24918
      this();
24919
      this.cartId = cartId;
24920
      setCartIdIsSet(true);
24921
      this.itemId = itemId;
24922
      setItemIdIsSet(true);
24923
      this.quantity = quantity;
24924
      setQuantityIsSet(true);
24925
    }
24926
 
24927
    /**
24928
     * Performs a deep copy on <i>other</i>.
24929
     */
24930
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 24931
      __isset_bit_vector.clear();
24932
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24933
      this.cartId = other.cartId;
24934
      this.itemId = other.itemId;
24935
      this.quantity = other.quantity;
48 ashish 24936
    }
24937
 
553 chandransh 24938
    public addItemToCart_args deepCopy() {
24939
      return new addItemToCart_args(this);
48 ashish 24940
    }
24941
 
24942
    @Deprecated
553 chandransh 24943
    public addItemToCart_args clone() {
24944
      return new addItemToCart_args(this);
48 ashish 24945
    }
24946
 
553 chandransh 24947
    public long getCartId() {
24948
      return this.cartId;
48 ashish 24949
    }
24950
 
553 chandransh 24951
    public addItemToCart_args setCartId(long cartId) {
24952
      this.cartId = cartId;
24953
      setCartIdIsSet(true);
48 ashish 24954
      return this;
24955
    }
24956
 
553 chandransh 24957
    public void unsetCartId() {
24958
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24959
    }
24960
 
553 chandransh 24961
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24962
    public boolean isSetCartId() {
24963
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24964
    }
24965
 
553 chandransh 24966
    public void setCartIdIsSet(boolean value) {
24967
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24968
    }
24969
 
553 chandransh 24970
    public long getItemId() {
24971
      return this.itemId;
48 ashish 24972
    }
24973
 
553 chandransh 24974
    public addItemToCart_args setItemId(long itemId) {
24975
      this.itemId = itemId;
24976
      setItemIdIsSet(true);
48 ashish 24977
      return this;
24978
    }
24979
 
553 chandransh 24980
    public void unsetItemId() {
24981
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 24982
    }
24983
 
553 chandransh 24984
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
24985
    public boolean isSetItemId() {
24986
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 24987
    }
24988
 
553 chandransh 24989
    public void setItemIdIsSet(boolean value) {
24990
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
24991
    }
24992
 
24993
    public long getQuantity() {
24994
      return this.quantity;
24995
    }
24996
 
24997
    public addItemToCart_args setQuantity(long quantity) {
24998
      this.quantity = quantity;
24999
      setQuantityIsSet(true);
25000
      return this;
25001
    }
25002
 
25003
    public void unsetQuantity() {
25004
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
25005
    }
25006
 
25007
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
25008
    public boolean isSetQuantity() {
25009
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
25010
    }
25011
 
25012
    public void setQuantityIsSet(boolean value) {
25013
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
25014
    }
25015
 
25016
    public void setFieldValue(_Fields field, Object value) {
25017
      switch (field) {
25018
      case CART_ID:
25019
        if (value == null) {
25020
          unsetCartId();
25021
        } else {
25022
          setCartId((Long)value);
25023
        }
25024
        break;
25025
 
25026
      case ITEM_ID:
25027
        if (value == null) {
25028
          unsetItemId();
25029
        } else {
25030
          setItemId((Long)value);
25031
        }
25032
        break;
25033
 
25034
      case QUANTITY:
25035
        if (value == null) {
25036
          unsetQuantity();
25037
        } else {
25038
          setQuantity((Long)value);
25039
        }
25040
        break;
25041
 
25042
      }
25043
    }
25044
 
25045
    public void setFieldValue(int fieldID, Object value) {
25046
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25047
    }
25048
 
25049
    public Object getFieldValue(_Fields field) {
25050
      switch (field) {
25051
      case CART_ID:
25052
        return new Long(getCartId());
25053
 
25054
      case ITEM_ID:
25055
        return new Long(getItemId());
25056
 
25057
      case QUANTITY:
25058
        return new Long(getQuantity());
25059
 
25060
      }
25061
      throw new IllegalStateException();
25062
    }
25063
 
25064
    public Object getFieldValue(int fieldId) {
25065
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25066
    }
25067
 
25068
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25069
    public boolean isSet(_Fields field) {
25070
      switch (field) {
25071
      case CART_ID:
25072
        return isSetCartId();
25073
      case ITEM_ID:
25074
        return isSetItemId();
25075
      case QUANTITY:
25076
        return isSetQuantity();
25077
      }
25078
      throw new IllegalStateException();
25079
    }
25080
 
25081
    public boolean isSet(int fieldID) {
25082
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25083
    }
25084
 
25085
    @Override
25086
    public boolean equals(Object that) {
25087
      if (that == null)
25088
        return false;
25089
      if (that instanceof addItemToCart_args)
25090
        return this.equals((addItemToCart_args)that);
25091
      return false;
25092
    }
25093
 
25094
    public boolean equals(addItemToCart_args that) {
25095
      if (that == null)
25096
        return false;
25097
 
25098
      boolean this_present_cartId = true;
25099
      boolean that_present_cartId = true;
25100
      if (this_present_cartId || that_present_cartId) {
25101
        if (!(this_present_cartId && that_present_cartId))
25102
          return false;
25103
        if (this.cartId != that.cartId)
25104
          return false;
25105
      }
25106
 
25107
      boolean this_present_itemId = true;
25108
      boolean that_present_itemId = true;
25109
      if (this_present_itemId || that_present_itemId) {
25110
        if (!(this_present_itemId && that_present_itemId))
25111
          return false;
25112
        if (this.itemId != that.itemId)
25113
          return false;
25114
      }
25115
 
25116
      boolean this_present_quantity = true;
25117
      boolean that_present_quantity = true;
25118
      if (this_present_quantity || that_present_quantity) {
25119
        if (!(this_present_quantity && that_present_quantity))
25120
          return false;
25121
        if (this.quantity != that.quantity)
25122
          return false;
25123
      }
25124
 
25125
      return true;
25126
    }
25127
 
25128
    @Override
25129
    public int hashCode() {
25130
      return 0;
25131
    }
25132
 
25133
    public int compareTo(addItemToCart_args other) {
25134
      if (!getClass().equals(other.getClass())) {
25135
        return getClass().getName().compareTo(other.getClass().getName());
25136
      }
25137
 
25138
      int lastComparison = 0;
25139
      addItemToCart_args typedOther = (addItemToCart_args)other;
25140
 
25141
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
25142
      if (lastComparison != 0) {
25143
        return lastComparison;
25144
      }
25145
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
25146
      if (lastComparison != 0) {
25147
        return lastComparison;
25148
      }
25149
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
25150
      if (lastComparison != 0) {
25151
        return lastComparison;
25152
      }
25153
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
25154
      if (lastComparison != 0) {
25155
        return lastComparison;
25156
      }
25157
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
25158
      if (lastComparison != 0) {
25159
        return lastComparison;
25160
      }
25161
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
25162
      if (lastComparison != 0) {
25163
        return lastComparison;
25164
      }
25165
      return 0;
25166
    }
25167
 
25168
    public void read(TProtocol iprot) throws TException {
25169
      TField field;
25170
      iprot.readStructBegin();
25171
      while (true)
25172
      {
25173
        field = iprot.readFieldBegin();
25174
        if (field.type == TType.STOP) { 
25175
          break;
25176
        }
25177
        _Fields fieldId = _Fields.findByThriftId(field.id);
25178
        if (fieldId == null) {
25179
          TProtocolUtil.skip(iprot, field.type);
25180
        } else {
25181
          switch (fieldId) {
25182
            case CART_ID:
25183
              if (field.type == TType.I64) {
25184
                this.cartId = iprot.readI64();
25185
                setCartIdIsSet(true);
25186
              } else { 
25187
                TProtocolUtil.skip(iprot, field.type);
25188
              }
25189
              break;
25190
            case ITEM_ID:
25191
              if (field.type == TType.I64) {
25192
                this.itemId = iprot.readI64();
25193
                setItemIdIsSet(true);
25194
              } else { 
25195
                TProtocolUtil.skip(iprot, field.type);
25196
              }
25197
              break;
25198
            case QUANTITY:
25199
              if (field.type == TType.I64) {
25200
                this.quantity = iprot.readI64();
25201
                setQuantityIsSet(true);
25202
              } else { 
25203
                TProtocolUtil.skip(iprot, field.type);
25204
              }
25205
              break;
25206
          }
25207
          iprot.readFieldEnd();
25208
        }
25209
      }
25210
      iprot.readStructEnd();
25211
      validate();
25212
    }
25213
 
25214
    public void write(TProtocol oprot) throws TException {
25215
      validate();
25216
 
25217
      oprot.writeStructBegin(STRUCT_DESC);
25218
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25219
      oprot.writeI64(this.cartId);
25220
      oprot.writeFieldEnd();
25221
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
25222
      oprot.writeI64(this.itemId);
25223
      oprot.writeFieldEnd();
25224
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
25225
      oprot.writeI64(this.quantity);
25226
      oprot.writeFieldEnd();
25227
      oprot.writeFieldStop();
25228
      oprot.writeStructEnd();
25229
    }
25230
 
25231
    @Override
25232
    public String toString() {
25233
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
25234
      boolean first = true;
25235
 
25236
      sb.append("cartId:");
25237
      sb.append(this.cartId);
25238
      first = false;
25239
      if (!first) sb.append(", ");
25240
      sb.append("itemId:");
25241
      sb.append(this.itemId);
25242
      first = false;
25243
      if (!first) sb.append(", ");
25244
      sb.append("quantity:");
25245
      sb.append(this.quantity);
25246
      first = false;
25247
      sb.append(")");
25248
      return sb.toString();
25249
    }
25250
 
25251
    public void validate() throws TException {
25252
      // check for required fields
25253
    }
25254
 
25255
  }
25256
 
25257
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
25258
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
25259
 
25260
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
25261
 
25262
    private ShoppingCartException scx;
25263
 
25264
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25265
    public enum _Fields implements TFieldIdEnum {
25266
      SCX((short)1, "scx");
25267
 
25268
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25270
 
25271
      static {
25272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25273
          byId.put((int)field._thriftId, field);
25274
          byName.put(field.getFieldName(), field);
25275
        }
25276
      }
25277
 
25278
      /**
25279
       * Find the _Fields constant that matches fieldId, or null if its not found.
25280
       */
25281
      public static _Fields findByThriftId(int fieldId) {
25282
        return byId.get(fieldId);
25283
      }
25284
 
25285
      /**
25286
       * Find the _Fields constant that matches fieldId, throwing an exception
25287
       * if it is not found.
25288
       */
25289
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25290
        _Fields fields = findByThriftId(fieldId);
25291
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25292
        return fields;
25293
      }
25294
 
25295
      /**
25296
       * Find the _Fields constant that matches name, or null if its not found.
25297
       */
25298
      public static _Fields findByName(String name) {
25299
        return byName.get(name);
25300
      }
25301
 
25302
      private final short _thriftId;
25303
      private final String _fieldName;
25304
 
25305
      _Fields(short thriftId, String fieldName) {
25306
        _thriftId = thriftId;
25307
        _fieldName = fieldName;
25308
      }
25309
 
25310
      public short getThriftFieldId() {
25311
        return _thriftId;
25312
      }
25313
 
25314
      public String getFieldName() {
25315
        return _fieldName;
25316
      }
25317
    }
25318
 
25319
    // isset id assignments
25320
 
25321
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25322
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25323
          new FieldValueMetaData(TType.STRUCT)));
25324
    }});
25325
 
25326
    static {
25327
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
25328
    }
25329
 
25330
    public addItemToCart_result() {
25331
    }
25332
 
25333
    public addItemToCart_result(
25334
      ShoppingCartException scx)
25335
    {
25336
      this();
25337
      this.scx = scx;
25338
    }
25339
 
25340
    /**
25341
     * Performs a deep copy on <i>other</i>.
25342
     */
25343
    public addItemToCart_result(addItemToCart_result other) {
25344
      if (other.isSetScx()) {
25345
        this.scx = new ShoppingCartException(other.scx);
25346
      }
25347
    }
25348
 
25349
    public addItemToCart_result deepCopy() {
25350
      return new addItemToCart_result(this);
25351
    }
25352
 
25353
    @Deprecated
25354
    public addItemToCart_result clone() {
25355
      return new addItemToCart_result(this);
25356
    }
25357
 
25358
    public ShoppingCartException getScx() {
25359
      return this.scx;
25360
    }
25361
 
25362
    public addItemToCart_result setScx(ShoppingCartException scx) {
25363
      this.scx = scx;
25364
      return this;
25365
    }
25366
 
25367
    public void unsetScx() {
25368
      this.scx = null;
25369
    }
25370
 
25371
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25372
    public boolean isSetScx() {
25373
      return this.scx != null;
25374
    }
25375
 
25376
    public void setScxIsSet(boolean value) {
48 ashish 25377
      if (!value) {
553 chandransh 25378
        this.scx = null;
48 ashish 25379
      }
25380
    }
25381
 
25382
    public void setFieldValue(_Fields field, Object value) {
25383
      switch (field) {
553 chandransh 25384
      case SCX:
48 ashish 25385
        if (value == null) {
553 chandransh 25386
          unsetScx();
48 ashish 25387
        } else {
553 chandransh 25388
          setScx((ShoppingCartException)value);
48 ashish 25389
        }
25390
        break;
25391
 
553 chandransh 25392
      }
25393
    }
25394
 
25395
    public void setFieldValue(int fieldID, Object value) {
25396
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25397
    }
25398
 
25399
    public Object getFieldValue(_Fields field) {
25400
      switch (field) {
25401
      case SCX:
25402
        return getScx();
25403
 
25404
      }
25405
      throw new IllegalStateException();
25406
    }
25407
 
25408
    public Object getFieldValue(int fieldId) {
25409
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25410
    }
25411
 
25412
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25413
    public boolean isSet(_Fields field) {
25414
      switch (field) {
25415
      case SCX:
25416
        return isSetScx();
25417
      }
25418
      throw new IllegalStateException();
25419
    }
25420
 
25421
    public boolean isSet(int fieldID) {
25422
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25423
    }
25424
 
25425
    @Override
25426
    public boolean equals(Object that) {
25427
      if (that == null)
25428
        return false;
25429
      if (that instanceof addItemToCart_result)
25430
        return this.equals((addItemToCart_result)that);
25431
      return false;
25432
    }
25433
 
25434
    public boolean equals(addItemToCart_result that) {
25435
      if (that == null)
25436
        return false;
25437
 
25438
      boolean this_present_scx = true && this.isSetScx();
25439
      boolean that_present_scx = true && that.isSetScx();
25440
      if (this_present_scx || that_present_scx) {
25441
        if (!(this_present_scx && that_present_scx))
25442
          return false;
25443
        if (!this.scx.equals(that.scx))
25444
          return false;
25445
      }
25446
 
25447
      return true;
25448
    }
25449
 
25450
    @Override
25451
    public int hashCode() {
25452
      return 0;
25453
    }
25454
 
25455
    public int compareTo(addItemToCart_result other) {
25456
      if (!getClass().equals(other.getClass())) {
25457
        return getClass().getName().compareTo(other.getClass().getName());
25458
      }
25459
 
25460
      int lastComparison = 0;
25461
      addItemToCart_result typedOther = (addItemToCart_result)other;
25462
 
25463
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
25464
      if (lastComparison != 0) {
25465
        return lastComparison;
25466
      }
25467
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
25468
      if (lastComparison != 0) {
25469
        return lastComparison;
25470
      }
25471
      return 0;
25472
    }
25473
 
25474
    public void read(TProtocol iprot) throws TException {
25475
      TField field;
25476
      iprot.readStructBegin();
25477
      while (true)
25478
      {
25479
        field = iprot.readFieldBegin();
25480
        if (field.type == TType.STOP) { 
25481
          break;
25482
        }
25483
        _Fields fieldId = _Fields.findByThriftId(field.id);
25484
        if (fieldId == null) {
25485
          TProtocolUtil.skip(iprot, field.type);
25486
        } else {
25487
          switch (fieldId) {
25488
            case SCX:
25489
              if (field.type == TType.STRUCT) {
25490
                this.scx = new ShoppingCartException();
25491
                this.scx.read(iprot);
25492
              } else { 
25493
                TProtocolUtil.skip(iprot, field.type);
25494
              }
25495
              break;
25496
          }
25497
          iprot.readFieldEnd();
25498
        }
25499
      }
25500
      iprot.readStructEnd();
25501
      validate();
25502
    }
25503
 
25504
    public void write(TProtocol oprot) throws TException {
25505
      oprot.writeStructBegin(STRUCT_DESC);
25506
 
25507
      if (this.isSetScx()) {
25508
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25509
        this.scx.write(oprot);
25510
        oprot.writeFieldEnd();
25511
      }
25512
      oprot.writeFieldStop();
25513
      oprot.writeStructEnd();
25514
    }
25515
 
25516
    @Override
25517
    public String toString() {
25518
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
25519
      boolean first = true;
25520
 
25521
      sb.append("scx:");
25522
      if (this.scx == null) {
25523
        sb.append("null");
25524
      } else {
25525
        sb.append(this.scx);
25526
      }
25527
      first = false;
25528
      sb.append(")");
25529
      return sb.toString();
25530
    }
25531
 
25532
    public void validate() throws TException {
25533
      // check for required fields
25534
    }
25535
 
25536
  }
25537
 
25538
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
25539
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
25540
 
25541
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25542
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
25543
 
25544
    private long cartId;
25545
    private long itemId;
25546
 
25547
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25548
    public enum _Fields implements TFieldIdEnum {
25549
      CART_ID((short)1, "cartId"),
25550
      ITEM_ID((short)2, "itemId");
25551
 
25552
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25553
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25554
 
25555
      static {
25556
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25557
          byId.put((int)field._thriftId, field);
25558
          byName.put(field.getFieldName(), field);
25559
        }
25560
      }
25561
 
25562
      /**
25563
       * Find the _Fields constant that matches fieldId, or null if its not found.
25564
       */
25565
      public static _Fields findByThriftId(int fieldId) {
25566
        return byId.get(fieldId);
25567
      }
25568
 
25569
      /**
25570
       * Find the _Fields constant that matches fieldId, throwing an exception
25571
       * if it is not found.
25572
       */
25573
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25574
        _Fields fields = findByThriftId(fieldId);
25575
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25576
        return fields;
25577
      }
25578
 
25579
      /**
25580
       * Find the _Fields constant that matches name, or null if its not found.
25581
       */
25582
      public static _Fields findByName(String name) {
25583
        return byName.get(name);
25584
      }
25585
 
25586
      private final short _thriftId;
25587
      private final String _fieldName;
25588
 
25589
      _Fields(short thriftId, String fieldName) {
25590
        _thriftId = thriftId;
25591
        _fieldName = fieldName;
25592
      }
25593
 
25594
      public short getThriftFieldId() {
25595
        return _thriftId;
25596
      }
25597
 
25598
      public String getFieldName() {
25599
        return _fieldName;
25600
      }
25601
    }
25602
 
25603
    // isset id assignments
25604
    private static final int __CARTID_ISSET_ID = 0;
25605
    private static final int __ITEMID_ISSET_ID = 1;
25606
    private BitSet __isset_bit_vector = new BitSet(2);
25607
 
25608
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25609
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25610
          new FieldValueMetaData(TType.I64)));
25611
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
25612
          new FieldValueMetaData(TType.I64)));
25613
    }});
25614
 
25615
    static {
25616
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
25617
    }
25618
 
25619
    public deleteItemFromCart_args() {
25620
    }
25621
 
25622
    public deleteItemFromCart_args(
25623
      long cartId,
25624
      long itemId)
25625
    {
25626
      this();
25627
      this.cartId = cartId;
25628
      setCartIdIsSet(true);
25629
      this.itemId = itemId;
25630
      setItemIdIsSet(true);
25631
    }
25632
 
25633
    /**
25634
     * Performs a deep copy on <i>other</i>.
25635
     */
25636
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
25637
      __isset_bit_vector.clear();
25638
      __isset_bit_vector.or(other.__isset_bit_vector);
25639
      this.cartId = other.cartId;
25640
      this.itemId = other.itemId;
25641
    }
25642
 
25643
    public deleteItemFromCart_args deepCopy() {
25644
      return new deleteItemFromCart_args(this);
25645
    }
25646
 
25647
    @Deprecated
25648
    public deleteItemFromCart_args clone() {
25649
      return new deleteItemFromCart_args(this);
25650
    }
25651
 
25652
    public long getCartId() {
25653
      return this.cartId;
25654
    }
25655
 
25656
    public deleteItemFromCart_args setCartId(long cartId) {
25657
      this.cartId = cartId;
25658
      setCartIdIsSet(true);
25659
      return this;
25660
    }
25661
 
25662
    public void unsetCartId() {
25663
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
25664
    }
25665
 
25666
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25667
    public boolean isSetCartId() {
25668
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
25669
    }
25670
 
25671
    public void setCartIdIsSet(boolean value) {
25672
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
25673
    }
25674
 
25675
    public long getItemId() {
25676
      return this.itemId;
25677
    }
25678
 
25679
    public deleteItemFromCart_args setItemId(long itemId) {
25680
      this.itemId = itemId;
25681
      setItemIdIsSet(true);
25682
      return this;
25683
    }
25684
 
25685
    public void unsetItemId() {
25686
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
25687
    }
25688
 
25689
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
25690
    public boolean isSetItemId() {
25691
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
25692
    }
25693
 
25694
    public void setItemIdIsSet(boolean value) {
25695
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
25696
    }
25697
 
25698
    public void setFieldValue(_Fields field, Object value) {
25699
      switch (field) {
25700
      case CART_ID:
48 ashish 25701
        if (value == null) {
553 chandransh 25702
          unsetCartId();
48 ashish 25703
        } else {
553 chandransh 25704
          setCartId((Long)value);
48 ashish 25705
        }
25706
        break;
25707
 
553 chandransh 25708
      case ITEM_ID:
25709
        if (value == null) {
25710
          unsetItemId();
25711
        } else {
25712
          setItemId((Long)value);
25713
        }
25714
        break;
25715
 
48 ashish 25716
      }
25717
    }
25718
 
25719
    public void setFieldValue(int fieldID, Object value) {
25720
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25721
    }
25722
 
25723
    public Object getFieldValue(_Fields field) {
25724
      switch (field) {
553 chandransh 25725
      case CART_ID:
25726
        return new Long(getCartId());
48 ashish 25727
 
553 chandransh 25728
      case ITEM_ID:
25729
        return new Long(getItemId());
48 ashish 25730
 
25731
      }
25732
      throw new IllegalStateException();
25733
    }
25734
 
25735
    public Object getFieldValue(int fieldId) {
25736
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25737
    }
25738
 
25739
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25740
    public boolean isSet(_Fields field) {
25741
      switch (field) {
553 chandransh 25742
      case CART_ID:
25743
        return isSetCartId();
25744
      case ITEM_ID:
25745
        return isSetItemId();
48 ashish 25746
      }
25747
      throw new IllegalStateException();
25748
    }
25749
 
25750
    public boolean isSet(int fieldID) {
25751
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25752
    }
25753
 
25754
    @Override
25755
    public boolean equals(Object that) {
25756
      if (that == null)
25757
        return false;
553 chandransh 25758
      if (that instanceof deleteItemFromCart_args)
25759
        return this.equals((deleteItemFromCart_args)that);
48 ashish 25760
      return false;
25761
    }
25762
 
553 chandransh 25763
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 25764
      if (that == null)
25765
        return false;
25766
 
553 chandransh 25767
      boolean this_present_cartId = true;
25768
      boolean that_present_cartId = true;
25769
      if (this_present_cartId || that_present_cartId) {
25770
        if (!(this_present_cartId && that_present_cartId))
48 ashish 25771
          return false;
553 chandransh 25772
        if (this.cartId != that.cartId)
48 ashish 25773
          return false;
25774
      }
25775
 
553 chandransh 25776
      boolean this_present_itemId = true;
25777
      boolean that_present_itemId = true;
25778
      if (this_present_itemId || that_present_itemId) {
25779
        if (!(this_present_itemId && that_present_itemId))
48 ashish 25780
          return false;
553 chandransh 25781
        if (this.itemId != that.itemId)
48 ashish 25782
          return false;
25783
      }
25784
 
25785
      return true;
25786
    }
25787
 
25788
    @Override
25789
    public int hashCode() {
25790
      return 0;
25791
    }
25792
 
553 chandransh 25793
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 25794
      if (!getClass().equals(other.getClass())) {
25795
        return getClass().getName().compareTo(other.getClass().getName());
25796
      }
25797
 
25798
      int lastComparison = 0;
553 chandransh 25799
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 25800
 
553 chandransh 25801
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 25802
      if (lastComparison != 0) {
25803
        return lastComparison;
25804
      }
553 chandransh 25805
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 25806
      if (lastComparison != 0) {
25807
        return lastComparison;
25808
      }
553 chandransh 25809
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 25810
      if (lastComparison != 0) {
25811
        return lastComparison;
25812
      }
553 chandransh 25813
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 25814
      if (lastComparison != 0) {
25815
        return lastComparison;
25816
      }
25817
      return 0;
25818
    }
25819
 
25820
    public void read(TProtocol iprot) throws TException {
25821
      TField field;
25822
      iprot.readStructBegin();
25823
      while (true)
25824
      {
25825
        field = iprot.readFieldBegin();
25826
        if (field.type == TType.STOP) { 
25827
          break;
25828
        }
25829
        _Fields fieldId = _Fields.findByThriftId(field.id);
25830
        if (fieldId == null) {
25831
          TProtocolUtil.skip(iprot, field.type);
25832
        } else {
25833
          switch (fieldId) {
553 chandransh 25834
            case CART_ID:
25835
              if (field.type == TType.I64) {
25836
                this.cartId = iprot.readI64();
25837
                setCartIdIsSet(true);
48 ashish 25838
              } else { 
25839
                TProtocolUtil.skip(iprot, field.type);
25840
              }
25841
              break;
553 chandransh 25842
            case ITEM_ID:
25843
              if (field.type == TType.I64) {
25844
                this.itemId = iprot.readI64();
25845
                setItemIdIsSet(true);
25846
              } else { 
25847
                TProtocolUtil.skip(iprot, field.type);
25848
              }
25849
              break;
25850
          }
25851
          iprot.readFieldEnd();
25852
        }
25853
      }
25854
      iprot.readStructEnd();
25855
      validate();
25856
    }
25857
 
25858
    public void write(TProtocol oprot) throws TException {
25859
      validate();
25860
 
25861
      oprot.writeStructBegin(STRUCT_DESC);
25862
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25863
      oprot.writeI64(this.cartId);
25864
      oprot.writeFieldEnd();
25865
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
25866
      oprot.writeI64(this.itemId);
25867
      oprot.writeFieldEnd();
25868
      oprot.writeFieldStop();
25869
      oprot.writeStructEnd();
25870
    }
25871
 
25872
    @Override
25873
    public String toString() {
25874
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
25875
      boolean first = true;
25876
 
25877
      sb.append("cartId:");
25878
      sb.append(this.cartId);
25879
      first = false;
25880
      if (!first) sb.append(", ");
25881
      sb.append("itemId:");
25882
      sb.append(this.itemId);
25883
      first = false;
25884
      sb.append(")");
25885
      return sb.toString();
25886
    }
25887
 
25888
    public void validate() throws TException {
25889
      // check for required fields
25890
    }
25891
 
25892
  }
25893
 
25894
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
25895
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
25896
 
25897
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
25898
 
25899
    private ShoppingCartException scx;
25900
 
25901
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25902
    public enum _Fields implements TFieldIdEnum {
25903
      SCX((short)1, "scx");
25904
 
25905
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25906
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25907
 
25908
      static {
25909
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25910
          byId.put((int)field._thriftId, field);
25911
          byName.put(field.getFieldName(), field);
25912
        }
25913
      }
25914
 
25915
      /**
25916
       * Find the _Fields constant that matches fieldId, or null if its not found.
25917
       */
25918
      public static _Fields findByThriftId(int fieldId) {
25919
        return byId.get(fieldId);
25920
      }
25921
 
25922
      /**
25923
       * Find the _Fields constant that matches fieldId, throwing an exception
25924
       * if it is not found.
25925
       */
25926
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25927
        _Fields fields = findByThriftId(fieldId);
25928
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25929
        return fields;
25930
      }
25931
 
25932
      /**
25933
       * Find the _Fields constant that matches name, or null if its not found.
25934
       */
25935
      public static _Fields findByName(String name) {
25936
        return byName.get(name);
25937
      }
25938
 
25939
      private final short _thriftId;
25940
      private final String _fieldName;
25941
 
25942
      _Fields(short thriftId, String fieldName) {
25943
        _thriftId = thriftId;
25944
        _fieldName = fieldName;
25945
      }
25946
 
25947
      public short getThriftFieldId() {
25948
        return _thriftId;
25949
      }
25950
 
25951
      public String getFieldName() {
25952
        return _fieldName;
25953
      }
25954
    }
25955
 
25956
    // isset id assignments
25957
 
25958
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25959
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25960
          new FieldValueMetaData(TType.STRUCT)));
25961
    }});
25962
 
25963
    static {
25964
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
25965
    }
25966
 
25967
    public deleteItemFromCart_result() {
25968
    }
25969
 
25970
    public deleteItemFromCart_result(
25971
      ShoppingCartException scx)
25972
    {
25973
      this();
25974
      this.scx = scx;
25975
    }
25976
 
25977
    /**
25978
     * Performs a deep copy on <i>other</i>.
25979
     */
25980
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
25981
      if (other.isSetScx()) {
25982
        this.scx = new ShoppingCartException(other.scx);
25983
      }
25984
    }
25985
 
25986
    public deleteItemFromCart_result deepCopy() {
25987
      return new deleteItemFromCart_result(this);
25988
    }
25989
 
25990
    @Deprecated
25991
    public deleteItemFromCart_result clone() {
25992
      return new deleteItemFromCart_result(this);
25993
    }
25994
 
25995
    public ShoppingCartException getScx() {
25996
      return this.scx;
25997
    }
25998
 
25999
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
26000
      this.scx = scx;
26001
      return this;
26002
    }
26003
 
26004
    public void unsetScx() {
26005
      this.scx = null;
26006
    }
26007
 
26008
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26009
    public boolean isSetScx() {
26010
      return this.scx != null;
26011
    }
26012
 
26013
    public void setScxIsSet(boolean value) {
26014
      if (!value) {
26015
        this.scx = null;
26016
      }
26017
    }
26018
 
26019
    public void setFieldValue(_Fields field, Object value) {
26020
      switch (field) {
26021
      case SCX:
26022
        if (value == null) {
26023
          unsetScx();
26024
        } else {
26025
          setScx((ShoppingCartException)value);
26026
        }
26027
        break;
26028
 
26029
      }
26030
    }
26031
 
26032
    public void setFieldValue(int fieldID, Object value) {
26033
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26034
    }
26035
 
26036
    public Object getFieldValue(_Fields field) {
26037
      switch (field) {
26038
      case SCX:
26039
        return getScx();
26040
 
26041
      }
26042
      throw new IllegalStateException();
26043
    }
26044
 
26045
    public Object getFieldValue(int fieldId) {
26046
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26047
    }
26048
 
26049
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26050
    public boolean isSet(_Fields field) {
26051
      switch (field) {
26052
      case SCX:
26053
        return isSetScx();
26054
      }
26055
      throw new IllegalStateException();
26056
    }
26057
 
26058
    public boolean isSet(int fieldID) {
26059
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26060
    }
26061
 
26062
    @Override
26063
    public boolean equals(Object that) {
26064
      if (that == null)
26065
        return false;
26066
      if (that instanceof deleteItemFromCart_result)
26067
        return this.equals((deleteItemFromCart_result)that);
26068
      return false;
26069
    }
26070
 
26071
    public boolean equals(deleteItemFromCart_result that) {
26072
      if (that == null)
26073
        return false;
26074
 
26075
      boolean this_present_scx = true && this.isSetScx();
26076
      boolean that_present_scx = true && that.isSetScx();
26077
      if (this_present_scx || that_present_scx) {
26078
        if (!(this_present_scx && that_present_scx))
26079
          return false;
26080
        if (!this.scx.equals(that.scx))
26081
          return false;
26082
      }
26083
 
26084
      return true;
26085
    }
26086
 
26087
    @Override
26088
    public int hashCode() {
26089
      return 0;
26090
    }
26091
 
26092
    public int compareTo(deleteItemFromCart_result other) {
26093
      if (!getClass().equals(other.getClass())) {
26094
        return getClass().getName().compareTo(other.getClass().getName());
26095
      }
26096
 
26097
      int lastComparison = 0;
26098
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
26099
 
26100
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26101
      if (lastComparison != 0) {
26102
        return lastComparison;
26103
      }
26104
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26105
      if (lastComparison != 0) {
26106
        return lastComparison;
26107
      }
26108
      return 0;
26109
    }
26110
 
26111
    public void read(TProtocol iprot) throws TException {
26112
      TField field;
26113
      iprot.readStructBegin();
26114
      while (true)
26115
      {
26116
        field = iprot.readFieldBegin();
26117
        if (field.type == TType.STOP) { 
26118
          break;
26119
        }
26120
        _Fields fieldId = _Fields.findByThriftId(field.id);
26121
        if (fieldId == null) {
26122
          TProtocolUtil.skip(iprot, field.type);
26123
        } else {
26124
          switch (fieldId) {
26125
            case SCX:
48 ashish 26126
              if (field.type == TType.STRUCT) {
553 chandransh 26127
                this.scx = new ShoppingCartException();
26128
                this.scx.read(iprot);
48 ashish 26129
              } else { 
26130
                TProtocolUtil.skip(iprot, field.type);
26131
              }
26132
              break;
26133
          }
26134
          iprot.readFieldEnd();
26135
        }
26136
      }
26137
      iprot.readStructEnd();
26138
      validate();
26139
    }
26140
 
26141
    public void write(TProtocol oprot) throws TException {
26142
      oprot.writeStructBegin(STRUCT_DESC);
26143
 
553 chandransh 26144
      if (this.isSetScx()) {
26145
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26146
        this.scx.write(oprot);
48 ashish 26147
        oprot.writeFieldEnd();
26148
      }
26149
      oprot.writeFieldStop();
26150
      oprot.writeStructEnd();
26151
    }
26152
 
26153
    @Override
26154
    public String toString() {
553 chandransh 26155
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 26156
      boolean first = true;
26157
 
553 chandransh 26158
      sb.append("scx:");
26159
      if (this.scx == null) {
48 ashish 26160
        sb.append("null");
26161
      } else {
553 chandransh 26162
        sb.append(this.scx);
48 ashish 26163
      }
26164
      first = false;
26165
      sb.append(")");
26166
      return sb.toString();
26167
    }
26168
 
26169
    public void validate() throws TException {
26170
      // check for required fields
26171
    }
26172
 
26173
  }
26174
 
553 chandransh 26175
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
26176
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 26177
 
553 chandransh 26178
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
26179
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
26180
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 26181
 
553 chandransh 26182
    private long cartId;
26183
    private long itemId;
26184
    private long quantity;
48 ashish 26185
 
26186
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26187
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26188
      CART_ID((short)1, "cartId"),
26189
      ITEM_ID((short)2, "itemId"),
26190
      QUANTITY((short)3, "quantity");
48 ashish 26191
 
26192
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26193
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26194
 
26195
      static {
26196
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26197
          byId.put((int)field._thriftId, field);
26198
          byName.put(field.getFieldName(), field);
26199
        }
26200
      }
26201
 
26202
      /**
26203
       * Find the _Fields constant that matches fieldId, or null if its not found.
26204
       */
26205
      public static _Fields findByThriftId(int fieldId) {
26206
        return byId.get(fieldId);
26207
      }
26208
 
26209
      /**
26210
       * Find the _Fields constant that matches fieldId, throwing an exception
26211
       * if it is not found.
26212
       */
26213
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26214
        _Fields fields = findByThriftId(fieldId);
26215
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26216
        return fields;
26217
      }
26218
 
26219
      /**
26220
       * Find the _Fields constant that matches name, or null if its not found.
26221
       */
26222
      public static _Fields findByName(String name) {
26223
        return byName.get(name);
26224
      }
26225
 
26226
      private final short _thriftId;
26227
      private final String _fieldName;
26228
 
26229
      _Fields(short thriftId, String fieldName) {
26230
        _thriftId = thriftId;
26231
        _fieldName = fieldName;
26232
      }
26233
 
26234
      public short getThriftFieldId() {
26235
        return _thriftId;
26236
      }
26237
 
26238
      public String getFieldName() {
26239
        return _fieldName;
26240
      }
26241
    }
26242
 
26243
    // isset id assignments
553 chandransh 26244
    private static final int __CARTID_ISSET_ID = 0;
26245
    private static final int __ITEMID_ISSET_ID = 1;
26246
    private static final int __QUANTITY_ISSET_ID = 2;
26247
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 26248
 
26249
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26250
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 26251
          new FieldValueMetaData(TType.I64)));
553 chandransh 26252
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
26253
          new FieldValueMetaData(TType.I64)));
26254
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
26255
          new FieldValueMetaData(TType.I64)));
48 ashish 26256
    }});
26257
 
26258
    static {
553 chandransh 26259
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 26260
    }
26261
 
553 chandransh 26262
    public changeQuantity_args() {
48 ashish 26263
    }
26264
 
553 chandransh 26265
    public changeQuantity_args(
26266
      long cartId,
26267
      long itemId,
26268
      long quantity)
48 ashish 26269
    {
26270
      this();
553 chandransh 26271
      this.cartId = cartId;
26272
      setCartIdIsSet(true);
26273
      this.itemId = itemId;
26274
      setItemIdIsSet(true);
26275
      this.quantity = quantity;
26276
      setQuantityIsSet(true);
48 ashish 26277
    }
26278
 
26279
    /**
26280
     * Performs a deep copy on <i>other</i>.
26281
     */
553 chandransh 26282
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 26283
      __isset_bit_vector.clear();
26284
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 26285
      this.cartId = other.cartId;
26286
      this.itemId = other.itemId;
26287
      this.quantity = other.quantity;
48 ashish 26288
    }
26289
 
553 chandransh 26290
    public changeQuantity_args deepCopy() {
26291
      return new changeQuantity_args(this);
48 ashish 26292
    }
26293
 
26294
    @Deprecated
553 chandransh 26295
    public changeQuantity_args clone() {
26296
      return new changeQuantity_args(this);
48 ashish 26297
    }
26298
 
553 chandransh 26299
    public long getCartId() {
26300
      return this.cartId;
48 ashish 26301
    }
26302
 
553 chandransh 26303
    public changeQuantity_args setCartId(long cartId) {
26304
      this.cartId = cartId;
26305
      setCartIdIsSet(true);
48 ashish 26306
      return this;
26307
    }
26308
 
553 chandransh 26309
    public void unsetCartId() {
26310
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26311
    }
26312
 
553 chandransh 26313
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26314
    public boolean isSetCartId() {
26315
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26316
    }
26317
 
553 chandransh 26318
    public void setCartIdIsSet(boolean value) {
26319
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 26320
    }
26321
 
553 chandransh 26322
    public long getItemId() {
26323
      return this.itemId;
26324
    }
26325
 
26326
    public changeQuantity_args setItemId(long itemId) {
26327
      this.itemId = itemId;
26328
      setItemIdIsSet(true);
26329
      return this;
26330
    }
26331
 
26332
    public void unsetItemId() {
26333
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
26334
    }
26335
 
26336
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
26337
    public boolean isSetItemId() {
26338
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
26339
    }
26340
 
26341
    public void setItemIdIsSet(boolean value) {
26342
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
26343
    }
26344
 
26345
    public long getQuantity() {
26346
      return this.quantity;
26347
    }
26348
 
26349
    public changeQuantity_args setQuantity(long quantity) {
26350
      this.quantity = quantity;
26351
      setQuantityIsSet(true);
26352
      return this;
26353
    }
26354
 
26355
    public void unsetQuantity() {
26356
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
26357
    }
26358
 
26359
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
26360
    public boolean isSetQuantity() {
26361
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
26362
    }
26363
 
26364
    public void setQuantityIsSet(boolean value) {
26365
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
26366
    }
26367
 
48 ashish 26368
    public void setFieldValue(_Fields field, Object value) {
26369
      switch (field) {
553 chandransh 26370
      case CART_ID:
48 ashish 26371
        if (value == null) {
553 chandransh 26372
          unsetCartId();
48 ashish 26373
        } else {
553 chandransh 26374
          setCartId((Long)value);
48 ashish 26375
        }
26376
        break;
26377
 
553 chandransh 26378
      case ITEM_ID:
26379
        if (value == null) {
26380
          unsetItemId();
26381
        } else {
26382
          setItemId((Long)value);
26383
        }
26384
        break;
26385
 
26386
      case QUANTITY:
26387
        if (value == null) {
26388
          unsetQuantity();
26389
        } else {
26390
          setQuantity((Long)value);
26391
        }
26392
        break;
26393
 
48 ashish 26394
      }
26395
    }
26396
 
26397
    public void setFieldValue(int fieldID, Object value) {
26398
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26399
    }
26400
 
26401
    public Object getFieldValue(_Fields field) {
26402
      switch (field) {
553 chandransh 26403
      case CART_ID:
26404
        return new Long(getCartId());
48 ashish 26405
 
553 chandransh 26406
      case ITEM_ID:
26407
        return new Long(getItemId());
26408
 
26409
      case QUANTITY:
26410
        return new Long(getQuantity());
26411
 
48 ashish 26412
      }
26413
      throw new IllegalStateException();
26414
    }
26415
 
26416
    public Object getFieldValue(int fieldId) {
26417
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26418
    }
26419
 
26420
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26421
    public boolean isSet(_Fields field) {
26422
      switch (field) {
553 chandransh 26423
      case CART_ID:
26424
        return isSetCartId();
26425
      case ITEM_ID:
26426
        return isSetItemId();
26427
      case QUANTITY:
26428
        return isSetQuantity();
48 ashish 26429
      }
26430
      throw new IllegalStateException();
26431
    }
26432
 
26433
    public boolean isSet(int fieldID) {
26434
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26435
    }
26436
 
26437
    @Override
26438
    public boolean equals(Object that) {
26439
      if (that == null)
26440
        return false;
553 chandransh 26441
      if (that instanceof changeQuantity_args)
26442
        return this.equals((changeQuantity_args)that);
48 ashish 26443
      return false;
26444
    }
26445
 
553 chandransh 26446
    public boolean equals(changeQuantity_args that) {
48 ashish 26447
      if (that == null)
26448
        return false;
26449
 
553 chandransh 26450
      boolean this_present_cartId = true;
26451
      boolean that_present_cartId = true;
26452
      if (this_present_cartId || that_present_cartId) {
26453
        if (!(this_present_cartId && that_present_cartId))
48 ashish 26454
          return false;
553 chandransh 26455
        if (this.cartId != that.cartId)
48 ashish 26456
          return false;
26457
      }
26458
 
553 chandransh 26459
      boolean this_present_itemId = true;
26460
      boolean that_present_itemId = true;
26461
      if (this_present_itemId || that_present_itemId) {
26462
        if (!(this_present_itemId && that_present_itemId))
26463
          return false;
26464
        if (this.itemId != that.itemId)
26465
          return false;
26466
      }
26467
 
26468
      boolean this_present_quantity = true;
26469
      boolean that_present_quantity = true;
26470
      if (this_present_quantity || that_present_quantity) {
26471
        if (!(this_present_quantity && that_present_quantity))
26472
          return false;
26473
        if (this.quantity != that.quantity)
26474
          return false;
26475
      }
26476
 
48 ashish 26477
      return true;
26478
    }
26479
 
26480
    @Override
26481
    public int hashCode() {
26482
      return 0;
26483
    }
26484
 
553 chandransh 26485
    public int compareTo(changeQuantity_args other) {
48 ashish 26486
      if (!getClass().equals(other.getClass())) {
26487
        return getClass().getName().compareTo(other.getClass().getName());
26488
      }
26489
 
26490
      int lastComparison = 0;
553 chandransh 26491
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 26492
 
553 chandransh 26493
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 26494
      if (lastComparison != 0) {
26495
        return lastComparison;
26496
      }
553 chandransh 26497
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 26498
      if (lastComparison != 0) {
26499
        return lastComparison;
26500
      }
553 chandransh 26501
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
26502
      if (lastComparison != 0) {
26503
        return lastComparison;
26504
      }
26505
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
26506
      if (lastComparison != 0) {
26507
        return lastComparison;
26508
      }
26509
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
26510
      if (lastComparison != 0) {
26511
        return lastComparison;
26512
      }
26513
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
26514
      if (lastComparison != 0) {
26515
        return lastComparison;
26516
      }
48 ashish 26517
      return 0;
26518
    }
26519
 
26520
    public void read(TProtocol iprot) throws TException {
26521
      TField field;
26522
      iprot.readStructBegin();
26523
      while (true)
26524
      {
26525
        field = iprot.readFieldBegin();
26526
        if (field.type == TType.STOP) { 
26527
          break;
26528
        }
26529
        _Fields fieldId = _Fields.findByThriftId(field.id);
26530
        if (fieldId == null) {
26531
          TProtocolUtil.skip(iprot, field.type);
26532
        } else {
26533
          switch (fieldId) {
553 chandransh 26534
            case CART_ID:
48 ashish 26535
              if (field.type == TType.I64) {
553 chandransh 26536
                this.cartId = iprot.readI64();
26537
                setCartIdIsSet(true);
48 ashish 26538
              } else { 
26539
                TProtocolUtil.skip(iprot, field.type);
26540
              }
26541
              break;
553 chandransh 26542
            case ITEM_ID:
26543
              if (field.type == TType.I64) {
26544
                this.itemId = iprot.readI64();
26545
                setItemIdIsSet(true);
26546
              } else { 
26547
                TProtocolUtil.skip(iprot, field.type);
26548
              }
26549
              break;
26550
            case QUANTITY:
26551
              if (field.type == TType.I64) {
26552
                this.quantity = iprot.readI64();
26553
                setQuantityIsSet(true);
26554
              } else { 
26555
                TProtocolUtil.skip(iprot, field.type);
26556
              }
26557
              break;
48 ashish 26558
          }
26559
          iprot.readFieldEnd();
26560
        }
26561
      }
26562
      iprot.readStructEnd();
26563
      validate();
26564
    }
26565
 
26566
    public void write(TProtocol oprot) throws TException {
26567
      validate();
26568
 
26569
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 26570
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26571
      oprot.writeI64(this.cartId);
48 ashish 26572
      oprot.writeFieldEnd();
553 chandransh 26573
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
26574
      oprot.writeI64(this.itemId);
26575
      oprot.writeFieldEnd();
26576
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
26577
      oprot.writeI64(this.quantity);
26578
      oprot.writeFieldEnd();
48 ashish 26579
      oprot.writeFieldStop();
26580
      oprot.writeStructEnd();
26581
    }
26582
 
26583
    @Override
26584
    public String toString() {
553 chandransh 26585
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 26586
      boolean first = true;
26587
 
553 chandransh 26588
      sb.append("cartId:");
26589
      sb.append(this.cartId);
48 ashish 26590
      first = false;
553 chandransh 26591
      if (!first) sb.append(", ");
26592
      sb.append("itemId:");
26593
      sb.append(this.itemId);
26594
      first = false;
26595
      if (!first) sb.append(", ");
26596
      sb.append("quantity:");
26597
      sb.append(this.quantity);
26598
      first = false;
48 ashish 26599
      sb.append(")");
26600
      return sb.toString();
26601
    }
26602
 
26603
    public void validate() throws TException {
26604
      // check for required fields
26605
    }
26606
 
26607
  }
26608
 
553 chandransh 26609
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
26610
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 26611
 
553 chandransh 26612
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 26613
 
553 chandransh 26614
    private ShoppingCartException scx;
48 ashish 26615
 
26616
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26617
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26618
      SCX((short)1, "scx");
48 ashish 26619
 
26620
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26621
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26622
 
26623
      static {
26624
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26625
          byId.put((int)field._thriftId, field);
26626
          byName.put(field.getFieldName(), field);
26627
        }
26628
      }
26629
 
26630
      /**
26631
       * Find the _Fields constant that matches fieldId, or null if its not found.
26632
       */
26633
      public static _Fields findByThriftId(int fieldId) {
26634
        return byId.get(fieldId);
26635
      }
26636
 
26637
      /**
26638
       * Find the _Fields constant that matches fieldId, throwing an exception
26639
       * if it is not found.
26640
       */
26641
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26642
        _Fields fields = findByThriftId(fieldId);
26643
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26644
        return fields;
26645
      }
26646
 
26647
      /**
26648
       * Find the _Fields constant that matches name, or null if its not found.
26649
       */
26650
      public static _Fields findByName(String name) {
26651
        return byName.get(name);
26652
      }
26653
 
26654
      private final short _thriftId;
26655
      private final String _fieldName;
26656
 
26657
      _Fields(short thriftId, String fieldName) {
26658
        _thriftId = thriftId;
26659
        _fieldName = fieldName;
26660
      }
26661
 
26662
      public short getThriftFieldId() {
26663
        return _thriftId;
26664
      }
26665
 
26666
      public String getFieldName() {
26667
        return _fieldName;
26668
      }
26669
    }
26670
 
26671
    // isset id assignments
26672
 
26673
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26674
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 26675
          new FieldValueMetaData(TType.STRUCT)));
26676
    }});
26677
 
26678
    static {
553 chandransh 26679
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 26680
    }
26681
 
553 chandransh 26682
    public changeQuantity_result() {
48 ashish 26683
    }
26684
 
553 chandransh 26685
    public changeQuantity_result(
26686
      ShoppingCartException scx)
48 ashish 26687
    {
26688
      this();
553 chandransh 26689
      this.scx = scx;
48 ashish 26690
    }
26691
 
26692
    /**
26693
     * Performs a deep copy on <i>other</i>.
26694
     */
553 chandransh 26695
    public changeQuantity_result(changeQuantity_result other) {
26696
      if (other.isSetScx()) {
26697
        this.scx = new ShoppingCartException(other.scx);
26698
      }
26699
    }
26700
 
26701
    public changeQuantity_result deepCopy() {
26702
      return new changeQuantity_result(this);
26703
    }
26704
 
26705
    @Deprecated
26706
    public changeQuantity_result clone() {
26707
      return new changeQuantity_result(this);
26708
    }
26709
 
26710
    public ShoppingCartException getScx() {
26711
      return this.scx;
26712
    }
26713
 
26714
    public changeQuantity_result setScx(ShoppingCartException scx) {
26715
      this.scx = scx;
26716
      return this;
26717
    }
26718
 
26719
    public void unsetScx() {
26720
      this.scx = null;
26721
    }
26722
 
26723
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26724
    public boolean isSetScx() {
26725
      return this.scx != null;
26726
    }
26727
 
26728
    public void setScxIsSet(boolean value) {
26729
      if (!value) {
26730
        this.scx = null;
26731
      }
26732
    }
26733
 
26734
    public void setFieldValue(_Fields field, Object value) {
26735
      switch (field) {
26736
      case SCX:
26737
        if (value == null) {
26738
          unsetScx();
26739
        } else {
26740
          setScx((ShoppingCartException)value);
26741
        }
26742
        break;
26743
 
26744
      }
26745
    }
26746
 
26747
    public void setFieldValue(int fieldID, Object value) {
26748
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26749
    }
26750
 
26751
    public Object getFieldValue(_Fields field) {
26752
      switch (field) {
26753
      case SCX:
26754
        return getScx();
26755
 
26756
      }
26757
      throw new IllegalStateException();
26758
    }
26759
 
26760
    public Object getFieldValue(int fieldId) {
26761
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26762
    }
26763
 
26764
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26765
    public boolean isSet(_Fields field) {
26766
      switch (field) {
26767
      case SCX:
26768
        return isSetScx();
26769
      }
26770
      throw new IllegalStateException();
26771
    }
26772
 
26773
    public boolean isSet(int fieldID) {
26774
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26775
    }
26776
 
26777
    @Override
26778
    public boolean equals(Object that) {
26779
      if (that == null)
26780
        return false;
26781
      if (that instanceof changeQuantity_result)
26782
        return this.equals((changeQuantity_result)that);
26783
      return false;
26784
    }
26785
 
26786
    public boolean equals(changeQuantity_result that) {
26787
      if (that == null)
26788
        return false;
26789
 
26790
      boolean this_present_scx = true && this.isSetScx();
26791
      boolean that_present_scx = true && that.isSetScx();
26792
      if (this_present_scx || that_present_scx) {
26793
        if (!(this_present_scx && that_present_scx))
26794
          return false;
26795
        if (!this.scx.equals(that.scx))
26796
          return false;
26797
      }
26798
 
26799
      return true;
26800
    }
26801
 
26802
    @Override
26803
    public int hashCode() {
26804
      return 0;
26805
    }
26806
 
26807
    public int compareTo(changeQuantity_result other) {
26808
      if (!getClass().equals(other.getClass())) {
26809
        return getClass().getName().compareTo(other.getClass().getName());
26810
      }
26811
 
26812
      int lastComparison = 0;
26813
      changeQuantity_result typedOther = (changeQuantity_result)other;
26814
 
26815
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26816
      if (lastComparison != 0) {
26817
        return lastComparison;
26818
      }
26819
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26820
      if (lastComparison != 0) {
26821
        return lastComparison;
26822
      }
26823
      return 0;
26824
    }
26825
 
26826
    public void read(TProtocol iprot) throws TException {
26827
      TField field;
26828
      iprot.readStructBegin();
26829
      while (true)
26830
      {
26831
        field = iprot.readFieldBegin();
26832
        if (field.type == TType.STOP) { 
26833
          break;
26834
        }
26835
        _Fields fieldId = _Fields.findByThriftId(field.id);
26836
        if (fieldId == null) {
26837
          TProtocolUtil.skip(iprot, field.type);
26838
        } else {
26839
          switch (fieldId) {
26840
            case SCX:
26841
              if (field.type == TType.STRUCT) {
26842
                this.scx = new ShoppingCartException();
26843
                this.scx.read(iprot);
26844
              } else { 
26845
                TProtocolUtil.skip(iprot, field.type);
26846
              }
26847
              break;
26848
          }
26849
          iprot.readFieldEnd();
26850
        }
26851
      }
26852
      iprot.readStructEnd();
26853
      validate();
26854
    }
26855
 
26856
    public void write(TProtocol oprot) throws TException {
26857
      oprot.writeStructBegin(STRUCT_DESC);
26858
 
26859
      if (this.isSetScx()) {
26860
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26861
        this.scx.write(oprot);
26862
        oprot.writeFieldEnd();
26863
      }
26864
      oprot.writeFieldStop();
26865
      oprot.writeStructEnd();
26866
    }
26867
 
26868
    @Override
26869
    public String toString() {
26870
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
26871
      boolean first = true;
26872
 
26873
      sb.append("scx:");
26874
      if (this.scx == null) {
26875
        sb.append("null");
26876
      } else {
26877
        sb.append(this.scx);
26878
      }
26879
      first = false;
26880
      sb.append(")");
26881
      return sb.toString();
26882
    }
26883
 
26884
    public void validate() throws TException {
26885
      // check for required fields
26886
    }
26887
 
26888
  }
26889
 
26890
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
26891
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
26892
 
26893
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
26894
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
26895
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
26896
 
26897
    private long cartId;
26898
    private long itemId;
26899
    private LineStatus status;
26900
 
26901
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26902
    public enum _Fields implements TFieldIdEnum {
26903
      CART_ID((short)1, "cartId"),
26904
      ITEM_ID((short)2, "itemId"),
26905
      /**
26906
       * 
26907
       * @see LineStatus
26908
       */
26909
      STATUS((short)3, "status");
26910
 
26911
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26912
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26913
 
26914
      static {
26915
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26916
          byId.put((int)field._thriftId, field);
26917
          byName.put(field.getFieldName(), field);
26918
        }
26919
      }
26920
 
26921
      /**
26922
       * Find the _Fields constant that matches fieldId, or null if its not found.
26923
       */
26924
      public static _Fields findByThriftId(int fieldId) {
26925
        return byId.get(fieldId);
26926
      }
26927
 
26928
      /**
26929
       * Find the _Fields constant that matches fieldId, throwing an exception
26930
       * if it is not found.
26931
       */
26932
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26933
        _Fields fields = findByThriftId(fieldId);
26934
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26935
        return fields;
26936
      }
26937
 
26938
      /**
26939
       * Find the _Fields constant that matches name, or null if its not found.
26940
       */
26941
      public static _Fields findByName(String name) {
26942
        return byName.get(name);
26943
      }
26944
 
26945
      private final short _thriftId;
26946
      private final String _fieldName;
26947
 
26948
      _Fields(short thriftId, String fieldName) {
26949
        _thriftId = thriftId;
26950
        _fieldName = fieldName;
26951
      }
26952
 
26953
      public short getThriftFieldId() {
26954
        return _thriftId;
26955
      }
26956
 
26957
      public String getFieldName() {
26958
        return _fieldName;
26959
      }
26960
    }
26961
 
26962
    // isset id assignments
26963
    private static final int __CARTID_ISSET_ID = 0;
26964
    private static final int __ITEMID_ISSET_ID = 1;
26965
    private BitSet __isset_bit_vector = new BitSet(2);
26966
 
26967
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26968
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
26969
          new FieldValueMetaData(TType.I64)));
26970
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
26971
          new FieldValueMetaData(TType.I64)));
26972
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
26973
          new EnumMetaData(TType.ENUM, LineStatus.class)));
26974
    }});
26975
 
26976
    static {
26977
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
26978
    }
26979
 
26980
    public changeItemStatus_args() {
26981
    }
26982
 
26983
    public changeItemStatus_args(
26984
      long cartId,
26985
      long itemId,
26986
      LineStatus status)
26987
    {
26988
      this();
26989
      this.cartId = cartId;
26990
      setCartIdIsSet(true);
26991
      this.itemId = itemId;
26992
      setItemIdIsSet(true);
26993
      this.status = status;
26994
    }
26995
 
26996
    /**
26997
     * Performs a deep copy on <i>other</i>.
26998
     */
26999
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 27000
      __isset_bit_vector.clear();
27001
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 27002
      this.cartId = other.cartId;
27003
      this.itemId = other.itemId;
27004
      if (other.isSetStatus()) {
27005
        this.status = other.status;
48 ashish 27006
      }
27007
    }
27008
 
553 chandransh 27009
    public changeItemStatus_args deepCopy() {
27010
      return new changeItemStatus_args(this);
48 ashish 27011
    }
27012
 
27013
    @Deprecated
553 chandransh 27014
    public changeItemStatus_args clone() {
27015
      return new changeItemStatus_args(this);
48 ashish 27016
    }
27017
 
553 chandransh 27018
    public long getCartId() {
27019
      return this.cartId;
48 ashish 27020
    }
27021
 
553 chandransh 27022
    public changeItemStatus_args setCartId(long cartId) {
27023
      this.cartId = cartId;
27024
      setCartIdIsSet(true);
48 ashish 27025
      return this;
27026
    }
27027
 
553 chandransh 27028
    public void unsetCartId() {
27029
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 27030
    }
27031
 
553 chandransh 27032
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
27033
    public boolean isSetCartId() {
27034
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 27035
    }
27036
 
553 chandransh 27037
    public void setCartIdIsSet(boolean value) {
27038
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 27039
    }
27040
 
553 chandransh 27041
    public long getItemId() {
27042
      return this.itemId;
48 ashish 27043
    }
27044
 
553 chandransh 27045
    public changeItemStatus_args setItemId(long itemId) {
27046
      this.itemId = itemId;
27047
      setItemIdIsSet(true);
48 ashish 27048
      return this;
27049
    }
27050
 
553 chandransh 27051
    public void unsetItemId() {
27052
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 27053
    }
27054
 
553 chandransh 27055
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
27056
    public boolean isSetItemId() {
27057
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 27058
    }
27059
 
553 chandransh 27060
    public void setItemIdIsSet(boolean value) {
27061
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
27062
    }
27063
 
27064
    /**
27065
     * 
27066
     * @see LineStatus
27067
     */
27068
    public LineStatus getStatus() {
27069
      return this.status;
27070
    }
27071
 
27072
    /**
27073
     * 
27074
     * @see LineStatus
27075
     */
27076
    public changeItemStatus_args setStatus(LineStatus status) {
27077
      this.status = status;
27078
      return this;
27079
    }
27080
 
27081
    public void unsetStatus() {
27082
      this.status = null;
27083
    }
27084
 
27085
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
27086
    public boolean isSetStatus() {
27087
      return this.status != null;
27088
    }
27089
 
27090
    public void setStatusIsSet(boolean value) {
48 ashish 27091
      if (!value) {
553 chandransh 27092
        this.status = null;
48 ashish 27093
      }
27094
    }
27095
 
27096
    public void setFieldValue(_Fields field, Object value) {
27097
      switch (field) {
553 chandransh 27098
      case CART_ID:
48 ashish 27099
        if (value == null) {
553 chandransh 27100
          unsetCartId();
48 ashish 27101
        } else {
553 chandransh 27102
          setCartId((Long)value);
48 ashish 27103
        }
27104
        break;
27105
 
553 chandransh 27106
      case ITEM_ID:
48 ashish 27107
        if (value == null) {
553 chandransh 27108
          unsetItemId();
48 ashish 27109
        } else {
553 chandransh 27110
          setItemId((Long)value);
48 ashish 27111
        }
27112
        break;
27113
 
553 chandransh 27114
      case STATUS:
27115
        if (value == null) {
27116
          unsetStatus();
27117
        } else {
27118
          setStatus((LineStatus)value);
27119
        }
27120
        break;
27121
 
48 ashish 27122
      }
27123
    }
27124
 
27125
    public void setFieldValue(int fieldID, Object value) {
27126
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27127
    }
27128
 
27129
    public Object getFieldValue(_Fields field) {
27130
      switch (field) {
553 chandransh 27131
      case CART_ID:
27132
        return new Long(getCartId());
48 ashish 27133
 
553 chandransh 27134
      case ITEM_ID:
27135
        return new Long(getItemId());
48 ashish 27136
 
553 chandransh 27137
      case STATUS:
27138
        return getStatus();
27139
 
48 ashish 27140
      }
27141
      throw new IllegalStateException();
27142
    }
27143
 
27144
    public Object getFieldValue(int fieldId) {
27145
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27146
    }
27147
 
27148
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27149
    public boolean isSet(_Fields field) {
27150
      switch (field) {
553 chandransh 27151
      case CART_ID:
27152
        return isSetCartId();
27153
      case ITEM_ID:
27154
        return isSetItemId();
27155
      case STATUS:
27156
        return isSetStatus();
48 ashish 27157
      }
27158
      throw new IllegalStateException();
27159
    }
27160
 
27161
    public boolean isSet(int fieldID) {
27162
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27163
    }
27164
 
27165
    @Override
27166
    public boolean equals(Object that) {
27167
      if (that == null)
27168
        return false;
553 chandransh 27169
      if (that instanceof changeItemStatus_args)
27170
        return this.equals((changeItemStatus_args)that);
48 ashish 27171
      return false;
27172
    }
27173
 
553 chandransh 27174
    public boolean equals(changeItemStatus_args that) {
48 ashish 27175
      if (that == null)
27176
        return false;
27177
 
553 chandransh 27178
      boolean this_present_cartId = true;
27179
      boolean that_present_cartId = true;
27180
      if (this_present_cartId || that_present_cartId) {
27181
        if (!(this_present_cartId && that_present_cartId))
48 ashish 27182
          return false;
553 chandransh 27183
        if (this.cartId != that.cartId)
48 ashish 27184
          return false;
27185
      }
27186
 
553 chandransh 27187
      boolean this_present_itemId = true;
27188
      boolean that_present_itemId = true;
27189
      if (this_present_itemId || that_present_itemId) {
27190
        if (!(this_present_itemId && that_present_itemId))
48 ashish 27191
          return false;
553 chandransh 27192
        if (this.itemId != that.itemId)
48 ashish 27193
          return false;
27194
      }
27195
 
553 chandransh 27196
      boolean this_present_status = true && this.isSetStatus();
27197
      boolean that_present_status = true && that.isSetStatus();
27198
      if (this_present_status || that_present_status) {
27199
        if (!(this_present_status && that_present_status))
27200
          return false;
27201
        if (!this.status.equals(that.status))
27202
          return false;
27203
      }
27204
 
48 ashish 27205
      return true;
27206
    }
27207
 
27208
    @Override
27209
    public int hashCode() {
27210
      return 0;
27211
    }
27212
 
553 chandransh 27213
    public int compareTo(changeItemStatus_args other) {
48 ashish 27214
      if (!getClass().equals(other.getClass())) {
27215
        return getClass().getName().compareTo(other.getClass().getName());
27216
      }
27217
 
27218
      int lastComparison = 0;
553 chandransh 27219
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 27220
 
553 chandransh 27221
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 27222
      if (lastComparison != 0) {
27223
        return lastComparison;
27224
      }
553 chandransh 27225
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 27226
      if (lastComparison != 0) {
27227
        return lastComparison;
27228
      }
553 chandransh 27229
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 27230
      if (lastComparison != 0) {
27231
        return lastComparison;
27232
      }
553 chandransh 27233
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 27234
      if (lastComparison != 0) {
27235
        return lastComparison;
27236
      }
553 chandransh 27237
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
27238
      if (lastComparison != 0) {
27239
        return lastComparison;
27240
      }
27241
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
27242
      if (lastComparison != 0) {
27243
        return lastComparison;
27244
      }
48 ashish 27245
      return 0;
27246
    }
27247
 
27248
    public void read(TProtocol iprot) throws TException {
27249
      TField field;
27250
      iprot.readStructBegin();
27251
      while (true)
27252
      {
27253
        field = iprot.readFieldBegin();
27254
        if (field.type == TType.STOP) { 
27255
          break;
27256
        }
27257
        _Fields fieldId = _Fields.findByThriftId(field.id);
27258
        if (fieldId == null) {
27259
          TProtocolUtil.skip(iprot, field.type);
27260
        } else {
27261
          switch (fieldId) {
553 chandransh 27262
            case CART_ID:
27263
              if (field.type == TType.I64) {
27264
                this.cartId = iprot.readI64();
27265
                setCartIdIsSet(true);
48 ashish 27266
              } else { 
27267
                TProtocolUtil.skip(iprot, field.type);
27268
              }
27269
              break;
553 chandransh 27270
            case ITEM_ID:
27271
              if (field.type == TType.I64) {
27272
                this.itemId = iprot.readI64();
27273
                setItemIdIsSet(true);
48 ashish 27274
              } else { 
27275
                TProtocolUtil.skip(iprot, field.type);
27276
              }
27277
              break;
553 chandransh 27278
            case STATUS:
27279
              if (field.type == TType.I32) {
27280
                this.status = LineStatus.findByValue(iprot.readI32());
27281
              } else { 
27282
                TProtocolUtil.skip(iprot, field.type);
27283
              }
27284
              break;
48 ashish 27285
          }
27286
          iprot.readFieldEnd();
27287
        }
27288
      }
27289
      iprot.readStructEnd();
27290
      validate();
27291
    }
27292
 
27293
    public void write(TProtocol oprot) throws TException {
553 chandransh 27294
      validate();
27295
 
48 ashish 27296
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 27297
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
27298
      oprot.writeI64(this.cartId);
27299
      oprot.writeFieldEnd();
27300
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
27301
      oprot.writeI64(this.itemId);
27302
      oprot.writeFieldEnd();
27303
      if (this.status != null) {
27304
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
27305
        oprot.writeI32(this.status.getValue());
48 ashish 27306
        oprot.writeFieldEnd();
27307
      }
27308
      oprot.writeFieldStop();
27309
      oprot.writeStructEnd();
27310
    }
27311
 
27312
    @Override
27313
    public String toString() {
553 chandransh 27314
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 27315
      boolean first = true;
27316
 
553 chandransh 27317
      sb.append("cartId:");
27318
      sb.append(this.cartId);
48 ashish 27319
      first = false;
27320
      if (!first) sb.append(", ");
553 chandransh 27321
      sb.append("itemId:");
27322
      sb.append(this.itemId);
27323
      first = false;
27324
      if (!first) sb.append(", ");
27325
      sb.append("status:");
27326
      if (this.status == null) {
48 ashish 27327
        sb.append("null");
27328
      } else {
553 chandransh 27329
        String status_name = status.name();
27330
        if (status_name != null) {
27331
          sb.append(status_name);
27332
          sb.append(" (");
27333
        }
27334
        sb.append(this.status);
27335
        if (status_name != null) {
27336
          sb.append(")");
27337
        }
48 ashish 27338
      }
27339
      first = false;
27340
      sb.append(")");
27341
      return sb.toString();
27342
    }
27343
 
27344
    public void validate() throws TException {
27345
      // check for required fields
27346
    }
27347
 
27348
  }
27349
 
553 chandransh 27350
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
27351
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 27352
 
553 chandransh 27353
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 27354
 
553 chandransh 27355
    private ShoppingCartException scx;
48 ashish 27356
 
27357
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27358
    public enum _Fields implements TFieldIdEnum {
553 chandransh 27359
      SCX((short)1, "scx");
48 ashish 27360
 
27361
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27362
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27363
 
27364
      static {
27365
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27366
          byId.put((int)field._thriftId, field);
27367
          byName.put(field.getFieldName(), field);
27368
        }
27369
      }
27370
 
27371
      /**
27372
       * Find the _Fields constant that matches fieldId, or null if its not found.
27373
       */
27374
      public static _Fields findByThriftId(int fieldId) {
27375
        return byId.get(fieldId);
27376
      }
27377
 
27378
      /**
27379
       * Find the _Fields constant that matches fieldId, throwing an exception
27380
       * if it is not found.
27381
       */
27382
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27383
        _Fields fields = findByThriftId(fieldId);
27384
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27385
        return fields;
27386
      }
27387
 
27388
      /**
27389
       * Find the _Fields constant that matches name, or null if its not found.
27390
       */
27391
      public static _Fields findByName(String name) {
27392
        return byName.get(name);
27393
      }
27394
 
27395
      private final short _thriftId;
27396
      private final String _fieldName;
27397
 
27398
      _Fields(short thriftId, String fieldName) {
27399
        _thriftId = thriftId;
27400
        _fieldName = fieldName;
27401
      }
27402
 
27403
      public short getThriftFieldId() {
27404
        return _thriftId;
27405
      }
27406
 
27407
      public String getFieldName() {
27408
        return _fieldName;
27409
      }
27410
    }
27411
 
27412
    // isset id assignments
553 chandransh 27413
 
27414
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27415
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27416
          new FieldValueMetaData(TType.STRUCT)));
27417
    }});
27418
 
27419
    static {
27420
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
27421
    }
27422
 
27423
    public changeItemStatus_result() {
27424
    }
27425
 
27426
    public changeItemStatus_result(
27427
      ShoppingCartException scx)
27428
    {
27429
      this();
27430
      this.scx = scx;
27431
    }
27432
 
27433
    /**
27434
     * Performs a deep copy on <i>other</i>.
27435
     */
27436
    public changeItemStatus_result(changeItemStatus_result other) {
27437
      if (other.isSetScx()) {
27438
        this.scx = new ShoppingCartException(other.scx);
27439
      }
27440
    }
27441
 
27442
    public changeItemStatus_result deepCopy() {
27443
      return new changeItemStatus_result(this);
27444
    }
27445
 
27446
    @Deprecated
27447
    public changeItemStatus_result clone() {
27448
      return new changeItemStatus_result(this);
27449
    }
27450
 
27451
    public ShoppingCartException getScx() {
27452
      return this.scx;
27453
    }
27454
 
27455
    public changeItemStatus_result setScx(ShoppingCartException scx) {
27456
      this.scx = scx;
27457
      return this;
27458
    }
27459
 
27460
    public void unsetScx() {
27461
      this.scx = null;
27462
    }
27463
 
27464
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27465
    public boolean isSetScx() {
27466
      return this.scx != null;
27467
    }
27468
 
27469
    public void setScxIsSet(boolean value) {
27470
      if (!value) {
27471
        this.scx = null;
27472
      }
27473
    }
27474
 
27475
    public void setFieldValue(_Fields field, Object value) {
27476
      switch (field) {
27477
      case SCX:
27478
        if (value == null) {
27479
          unsetScx();
27480
        } else {
27481
          setScx((ShoppingCartException)value);
27482
        }
27483
        break;
27484
 
27485
      }
27486
    }
27487
 
27488
    public void setFieldValue(int fieldID, Object value) {
27489
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27490
    }
27491
 
27492
    public Object getFieldValue(_Fields field) {
27493
      switch (field) {
27494
      case SCX:
27495
        return getScx();
27496
 
27497
      }
27498
      throw new IllegalStateException();
27499
    }
27500
 
27501
    public Object getFieldValue(int fieldId) {
27502
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27503
    }
27504
 
27505
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27506
    public boolean isSet(_Fields field) {
27507
      switch (field) {
27508
      case SCX:
27509
        return isSetScx();
27510
      }
27511
      throw new IllegalStateException();
27512
    }
27513
 
27514
    public boolean isSet(int fieldID) {
27515
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27516
    }
27517
 
27518
    @Override
27519
    public boolean equals(Object that) {
27520
      if (that == null)
27521
        return false;
27522
      if (that instanceof changeItemStatus_result)
27523
        return this.equals((changeItemStatus_result)that);
27524
      return false;
27525
    }
27526
 
27527
    public boolean equals(changeItemStatus_result that) {
27528
      if (that == null)
27529
        return false;
27530
 
27531
      boolean this_present_scx = true && this.isSetScx();
27532
      boolean that_present_scx = true && that.isSetScx();
27533
      if (this_present_scx || that_present_scx) {
27534
        if (!(this_present_scx && that_present_scx))
27535
          return false;
27536
        if (!this.scx.equals(that.scx))
27537
          return false;
27538
      }
27539
 
27540
      return true;
27541
    }
27542
 
27543
    @Override
27544
    public int hashCode() {
27545
      return 0;
27546
    }
27547
 
27548
    public int compareTo(changeItemStatus_result other) {
27549
      if (!getClass().equals(other.getClass())) {
27550
        return getClass().getName().compareTo(other.getClass().getName());
27551
      }
27552
 
27553
      int lastComparison = 0;
27554
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
27555
 
27556
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
27557
      if (lastComparison != 0) {
27558
        return lastComparison;
27559
      }
27560
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
27561
      if (lastComparison != 0) {
27562
        return lastComparison;
27563
      }
27564
      return 0;
27565
    }
27566
 
27567
    public void read(TProtocol iprot) throws TException {
27568
      TField field;
27569
      iprot.readStructBegin();
27570
      while (true)
27571
      {
27572
        field = iprot.readFieldBegin();
27573
        if (field.type == TType.STOP) { 
27574
          break;
27575
        }
27576
        _Fields fieldId = _Fields.findByThriftId(field.id);
27577
        if (fieldId == null) {
27578
          TProtocolUtil.skip(iprot, field.type);
27579
        } else {
27580
          switch (fieldId) {
27581
            case SCX:
27582
              if (field.type == TType.STRUCT) {
27583
                this.scx = new ShoppingCartException();
27584
                this.scx.read(iprot);
27585
              } else { 
27586
                TProtocolUtil.skip(iprot, field.type);
27587
              }
27588
              break;
27589
          }
27590
          iprot.readFieldEnd();
27591
        }
27592
      }
27593
      iprot.readStructEnd();
27594
      validate();
27595
    }
27596
 
27597
    public void write(TProtocol oprot) throws TException {
27598
      oprot.writeStructBegin(STRUCT_DESC);
27599
 
27600
      if (this.isSetScx()) {
27601
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27602
        this.scx.write(oprot);
27603
        oprot.writeFieldEnd();
27604
      }
27605
      oprot.writeFieldStop();
27606
      oprot.writeStructEnd();
27607
    }
27608
 
27609
    @Override
27610
    public String toString() {
27611
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
27612
      boolean first = true;
27613
 
27614
      sb.append("scx:");
27615
      if (this.scx == null) {
27616
        sb.append("null");
27617
      } else {
27618
        sb.append(this.scx);
27619
      }
27620
      first = false;
27621
      sb.append(")");
27622
      return sb.toString();
27623
    }
27624
 
27625
    public void validate() throws TException {
27626
      // check for required fields
27627
    }
27628
 
27629
  }
27630
 
27631
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
27632
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
27633
 
27634
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
27635
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
27636
 
27637
    private long cartId;
27638
    private long addressId;
27639
 
27640
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27641
    public enum _Fields implements TFieldIdEnum {
27642
      CART_ID((short)1, "cartId"),
27643
      ADDRESS_ID((short)2, "addressId");
27644
 
27645
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27646
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27647
 
27648
      static {
27649
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27650
          byId.put((int)field._thriftId, field);
27651
          byName.put(field.getFieldName(), field);
27652
        }
27653
      }
27654
 
27655
      /**
27656
       * Find the _Fields constant that matches fieldId, or null if its not found.
27657
       */
27658
      public static _Fields findByThriftId(int fieldId) {
27659
        return byId.get(fieldId);
27660
      }
27661
 
27662
      /**
27663
       * Find the _Fields constant that matches fieldId, throwing an exception
27664
       * if it is not found.
27665
       */
27666
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27667
        _Fields fields = findByThriftId(fieldId);
27668
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27669
        return fields;
27670
      }
27671
 
27672
      /**
27673
       * Find the _Fields constant that matches name, or null if its not found.
27674
       */
27675
      public static _Fields findByName(String name) {
27676
        return byName.get(name);
27677
      }
27678
 
27679
      private final short _thriftId;
27680
      private final String _fieldName;
27681
 
27682
      _Fields(short thriftId, String fieldName) {
27683
        _thriftId = thriftId;
27684
        _fieldName = fieldName;
27685
      }
27686
 
27687
      public short getThriftFieldId() {
27688
        return _thriftId;
27689
      }
27690
 
27691
      public String getFieldName() {
27692
        return _fieldName;
27693
      }
27694
    }
27695
 
27696
    // isset id assignments
27697
    private static final int __CARTID_ISSET_ID = 0;
27698
    private static final int __ADDRESSID_ISSET_ID = 1;
27699
    private BitSet __isset_bit_vector = new BitSet(2);
27700
 
27701
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27702
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
27703
          new FieldValueMetaData(TType.I64)));
27704
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
27705
          new FieldValueMetaData(TType.I64)));
27706
    }});
27707
 
27708
    static {
27709
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
27710
    }
27711
 
27712
    public addAddressToCart_args() {
27713
    }
27714
 
27715
    public addAddressToCart_args(
27716
      long cartId,
27717
      long addressId)
27718
    {
27719
      this();
27720
      this.cartId = cartId;
27721
      setCartIdIsSet(true);
27722
      this.addressId = addressId;
27723
      setAddressIdIsSet(true);
27724
    }
27725
 
27726
    /**
27727
     * Performs a deep copy on <i>other</i>.
27728
     */
27729
    public addAddressToCart_args(addAddressToCart_args other) {
27730
      __isset_bit_vector.clear();
27731
      __isset_bit_vector.or(other.__isset_bit_vector);
27732
      this.cartId = other.cartId;
27733
      this.addressId = other.addressId;
27734
    }
27735
 
27736
    public addAddressToCart_args deepCopy() {
27737
      return new addAddressToCart_args(this);
27738
    }
27739
 
27740
    @Deprecated
27741
    public addAddressToCart_args clone() {
27742
      return new addAddressToCart_args(this);
27743
    }
27744
 
27745
    public long getCartId() {
27746
      return this.cartId;
27747
    }
27748
 
27749
    public addAddressToCart_args setCartId(long cartId) {
27750
      this.cartId = cartId;
27751
      setCartIdIsSet(true);
27752
      return this;
27753
    }
27754
 
27755
    public void unsetCartId() {
27756
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
27757
    }
27758
 
27759
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
27760
    public boolean isSetCartId() {
27761
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
27762
    }
27763
 
27764
    public void setCartIdIsSet(boolean value) {
27765
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
27766
    }
27767
 
27768
    public long getAddressId() {
27769
      return this.addressId;
27770
    }
27771
 
27772
    public addAddressToCart_args setAddressId(long addressId) {
27773
      this.addressId = addressId;
27774
      setAddressIdIsSet(true);
27775
      return this;
27776
    }
27777
 
27778
    public void unsetAddressId() {
27779
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
27780
    }
27781
 
27782
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
27783
    public boolean isSetAddressId() {
27784
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
27785
    }
27786
 
27787
    public void setAddressIdIsSet(boolean value) {
27788
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
27789
    }
27790
 
27791
    public void setFieldValue(_Fields field, Object value) {
27792
      switch (field) {
27793
      case CART_ID:
27794
        if (value == null) {
27795
          unsetCartId();
27796
        } else {
27797
          setCartId((Long)value);
27798
        }
27799
        break;
27800
 
27801
      case ADDRESS_ID:
27802
        if (value == null) {
27803
          unsetAddressId();
27804
        } else {
27805
          setAddressId((Long)value);
27806
        }
27807
        break;
27808
 
27809
      }
27810
    }
27811
 
27812
    public void setFieldValue(int fieldID, Object value) {
27813
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27814
    }
27815
 
27816
    public Object getFieldValue(_Fields field) {
27817
      switch (field) {
27818
      case CART_ID:
27819
        return new Long(getCartId());
27820
 
27821
      case ADDRESS_ID:
27822
        return new Long(getAddressId());
27823
 
27824
      }
27825
      throw new IllegalStateException();
27826
    }
27827
 
27828
    public Object getFieldValue(int fieldId) {
27829
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27830
    }
27831
 
27832
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27833
    public boolean isSet(_Fields field) {
27834
      switch (field) {
27835
      case CART_ID:
27836
        return isSetCartId();
27837
      case ADDRESS_ID:
27838
        return isSetAddressId();
27839
      }
27840
      throw new IllegalStateException();
27841
    }
27842
 
27843
    public boolean isSet(int fieldID) {
27844
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27845
    }
27846
 
27847
    @Override
27848
    public boolean equals(Object that) {
27849
      if (that == null)
27850
        return false;
27851
      if (that instanceof addAddressToCart_args)
27852
        return this.equals((addAddressToCart_args)that);
27853
      return false;
27854
    }
27855
 
27856
    public boolean equals(addAddressToCart_args that) {
27857
      if (that == null)
27858
        return false;
27859
 
27860
      boolean this_present_cartId = true;
27861
      boolean that_present_cartId = true;
27862
      if (this_present_cartId || that_present_cartId) {
27863
        if (!(this_present_cartId && that_present_cartId))
27864
          return false;
27865
        if (this.cartId != that.cartId)
27866
          return false;
27867
      }
27868
 
27869
      boolean this_present_addressId = true;
27870
      boolean that_present_addressId = true;
27871
      if (this_present_addressId || that_present_addressId) {
27872
        if (!(this_present_addressId && that_present_addressId))
27873
          return false;
27874
        if (this.addressId != that.addressId)
27875
          return false;
27876
      }
27877
 
27878
      return true;
27879
    }
27880
 
27881
    @Override
27882
    public int hashCode() {
27883
      return 0;
27884
    }
27885
 
27886
    public int compareTo(addAddressToCart_args other) {
27887
      if (!getClass().equals(other.getClass())) {
27888
        return getClass().getName().compareTo(other.getClass().getName());
27889
      }
27890
 
27891
      int lastComparison = 0;
27892
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
27893
 
27894
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
27895
      if (lastComparison != 0) {
27896
        return lastComparison;
27897
      }
27898
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
27899
      if (lastComparison != 0) {
27900
        return lastComparison;
27901
      }
27902
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
27903
      if (lastComparison != 0) {
27904
        return lastComparison;
27905
      }
27906
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
27907
      if (lastComparison != 0) {
27908
        return lastComparison;
27909
      }
27910
      return 0;
27911
    }
27912
 
27913
    public void read(TProtocol iprot) throws TException {
27914
      TField field;
27915
      iprot.readStructBegin();
27916
      while (true)
27917
      {
27918
        field = iprot.readFieldBegin();
27919
        if (field.type == TType.STOP) { 
27920
          break;
27921
        }
27922
        _Fields fieldId = _Fields.findByThriftId(field.id);
27923
        if (fieldId == null) {
27924
          TProtocolUtil.skip(iprot, field.type);
27925
        } else {
27926
          switch (fieldId) {
27927
            case CART_ID:
27928
              if (field.type == TType.I64) {
27929
                this.cartId = iprot.readI64();
27930
                setCartIdIsSet(true);
27931
              } else { 
27932
                TProtocolUtil.skip(iprot, field.type);
27933
              }
27934
              break;
27935
            case ADDRESS_ID:
27936
              if (field.type == TType.I64) {
27937
                this.addressId = iprot.readI64();
27938
                setAddressIdIsSet(true);
27939
              } else { 
27940
                TProtocolUtil.skip(iprot, field.type);
27941
              }
27942
              break;
27943
          }
27944
          iprot.readFieldEnd();
27945
        }
27946
      }
27947
      iprot.readStructEnd();
27948
      validate();
27949
    }
27950
 
27951
    public void write(TProtocol oprot) throws TException {
27952
      validate();
27953
 
27954
      oprot.writeStructBegin(STRUCT_DESC);
27955
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
27956
      oprot.writeI64(this.cartId);
27957
      oprot.writeFieldEnd();
27958
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
27959
      oprot.writeI64(this.addressId);
27960
      oprot.writeFieldEnd();
27961
      oprot.writeFieldStop();
27962
      oprot.writeStructEnd();
27963
    }
27964
 
27965
    @Override
27966
    public String toString() {
27967
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
27968
      boolean first = true;
27969
 
27970
      sb.append("cartId:");
27971
      sb.append(this.cartId);
27972
      first = false;
27973
      if (!first) sb.append(", ");
27974
      sb.append("addressId:");
27975
      sb.append(this.addressId);
27976
      first = false;
27977
      sb.append(")");
27978
      return sb.toString();
27979
    }
27980
 
27981
    public void validate() throws TException {
27982
      // check for required fields
27983
    }
27984
 
27985
  }
27986
 
27987
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
27988
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
27989
 
578 chandransh 27990
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 27991
 
578 chandransh 27992
    private ShoppingCartException scx;
553 chandransh 27993
 
27994
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27995
    public enum _Fields implements TFieldIdEnum {
578 chandransh 27996
      SCX((short)1, "scx");
553 chandransh 27997
 
27998
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27999
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28000
 
28001
      static {
28002
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28003
          byId.put((int)field._thriftId, field);
28004
          byName.put(field.getFieldName(), field);
28005
        }
28006
      }
28007
 
28008
      /**
28009
       * Find the _Fields constant that matches fieldId, or null if its not found.
28010
       */
28011
      public static _Fields findByThriftId(int fieldId) {
28012
        return byId.get(fieldId);
28013
      }
28014
 
28015
      /**
28016
       * Find the _Fields constant that matches fieldId, throwing an exception
28017
       * if it is not found.
28018
       */
28019
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28020
        _Fields fields = findByThriftId(fieldId);
28021
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28022
        return fields;
28023
      }
28024
 
28025
      /**
28026
       * Find the _Fields constant that matches name, or null if its not found.
28027
       */
28028
      public static _Fields findByName(String name) {
28029
        return byName.get(name);
28030
      }
28031
 
28032
      private final short _thriftId;
28033
      private final String _fieldName;
28034
 
28035
      _Fields(short thriftId, String fieldName) {
28036
        _thriftId = thriftId;
28037
        _fieldName = fieldName;
28038
      }
28039
 
28040
      public short getThriftFieldId() {
28041
        return _thriftId;
28042
      }
28043
 
28044
      public String getFieldName() {
28045
        return _fieldName;
28046
      }
28047
    }
578 chandransh 28048
 
28049
    // isset id assignments
28050
 
553 chandransh 28051
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 28052
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
28053
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 28054
    }});
28055
 
28056
    static {
28057
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
28058
    }
28059
 
28060
    public addAddressToCart_result() {
28061
    }
28062
 
578 chandransh 28063
    public addAddressToCart_result(
28064
      ShoppingCartException scx)
28065
    {
28066
      this();
28067
      this.scx = scx;
28068
    }
28069
 
553 chandransh 28070
    /**
28071
     * Performs a deep copy on <i>other</i>.
28072
     */
28073
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 28074
      if (other.isSetScx()) {
28075
        this.scx = new ShoppingCartException(other.scx);
28076
      }
553 chandransh 28077
    }
28078
 
28079
    public addAddressToCart_result deepCopy() {
28080
      return new addAddressToCart_result(this);
28081
    }
28082
 
28083
    @Deprecated
28084
    public addAddressToCart_result clone() {
28085
      return new addAddressToCart_result(this);
28086
    }
28087
 
578 chandransh 28088
    public ShoppingCartException getScx() {
28089
      return this.scx;
28090
    }
28091
 
28092
    public addAddressToCart_result setScx(ShoppingCartException scx) {
28093
      this.scx = scx;
28094
      return this;
28095
    }
28096
 
28097
    public void unsetScx() {
28098
      this.scx = null;
28099
    }
28100
 
28101
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28102
    public boolean isSetScx() {
28103
      return this.scx != null;
28104
    }
28105
 
28106
    public void setScxIsSet(boolean value) {
28107
      if (!value) {
28108
        this.scx = null;
28109
      }
28110
    }
28111
 
553 chandransh 28112
    public void setFieldValue(_Fields field, Object value) {
28113
      switch (field) {
578 chandransh 28114
      case SCX:
28115
        if (value == null) {
28116
          unsetScx();
28117
        } else {
28118
          setScx((ShoppingCartException)value);
28119
        }
28120
        break;
28121
 
553 chandransh 28122
      }
28123
    }
28124
 
28125
    public void setFieldValue(int fieldID, Object value) {
28126
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28127
    }
28128
 
28129
    public Object getFieldValue(_Fields field) {
28130
      switch (field) {
578 chandransh 28131
      case SCX:
28132
        return getScx();
28133
 
553 chandransh 28134
      }
28135
      throw new IllegalStateException();
28136
    }
28137
 
28138
    public Object getFieldValue(int fieldId) {
28139
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28140
    }
28141
 
28142
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28143
    public boolean isSet(_Fields field) {
28144
      switch (field) {
578 chandransh 28145
      case SCX:
28146
        return isSetScx();
553 chandransh 28147
      }
28148
      throw new IllegalStateException();
28149
    }
28150
 
28151
    public boolean isSet(int fieldID) {
28152
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28153
    }
28154
 
28155
    @Override
28156
    public boolean equals(Object that) {
28157
      if (that == null)
28158
        return false;
28159
      if (that instanceof addAddressToCart_result)
28160
        return this.equals((addAddressToCart_result)that);
28161
      return false;
28162
    }
28163
 
28164
    public boolean equals(addAddressToCart_result that) {
28165
      if (that == null)
28166
        return false;
28167
 
578 chandransh 28168
      boolean this_present_scx = true && this.isSetScx();
28169
      boolean that_present_scx = true && that.isSetScx();
28170
      if (this_present_scx || that_present_scx) {
28171
        if (!(this_present_scx && that_present_scx))
28172
          return false;
28173
        if (!this.scx.equals(that.scx))
28174
          return false;
28175
      }
28176
 
553 chandransh 28177
      return true;
28178
    }
28179
 
28180
    @Override
28181
    public int hashCode() {
28182
      return 0;
28183
    }
28184
 
28185
    public int compareTo(addAddressToCart_result other) {
28186
      if (!getClass().equals(other.getClass())) {
28187
        return getClass().getName().compareTo(other.getClass().getName());
28188
      }
28189
 
28190
      int lastComparison = 0;
28191
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
28192
 
578 chandransh 28193
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28194
      if (lastComparison != 0) {
28195
        return lastComparison;
28196
      }
28197
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28198
      if (lastComparison != 0) {
28199
        return lastComparison;
28200
      }
553 chandransh 28201
      return 0;
28202
    }
28203
 
28204
    public void read(TProtocol iprot) throws TException {
28205
      TField field;
28206
      iprot.readStructBegin();
28207
      while (true)
28208
      {
28209
        field = iprot.readFieldBegin();
28210
        if (field.type == TType.STOP) { 
28211
          break;
28212
        }
28213
        _Fields fieldId = _Fields.findByThriftId(field.id);
28214
        if (fieldId == null) {
28215
          TProtocolUtil.skip(iprot, field.type);
28216
        } else {
28217
          switch (fieldId) {
578 chandransh 28218
            case SCX:
28219
              if (field.type == TType.STRUCT) {
28220
                this.scx = new ShoppingCartException();
28221
                this.scx.read(iprot);
28222
              } else { 
28223
                TProtocolUtil.skip(iprot, field.type);
28224
              }
28225
              break;
553 chandransh 28226
          }
28227
          iprot.readFieldEnd();
28228
        }
28229
      }
28230
      iprot.readStructEnd();
28231
      validate();
28232
    }
28233
 
28234
    public void write(TProtocol oprot) throws TException {
28235
      oprot.writeStructBegin(STRUCT_DESC);
28236
 
578 chandransh 28237
      if (this.isSetScx()) {
28238
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28239
        this.scx.write(oprot);
28240
        oprot.writeFieldEnd();
28241
      }
553 chandransh 28242
      oprot.writeFieldStop();
28243
      oprot.writeStructEnd();
28244
    }
28245
 
28246
    @Override
28247
    public String toString() {
28248
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
28249
      boolean first = true;
28250
 
578 chandransh 28251
      sb.append("scx:");
28252
      if (this.scx == null) {
28253
        sb.append("null");
28254
      } else {
28255
        sb.append(this.scx);
28256
      }
28257
      first = false;
553 chandransh 28258
      sb.append(")");
28259
      return sb.toString();
28260
    }
28261
 
28262
    public void validate() throws TException {
28263
      // check for required fields
28264
    }
28265
 
28266
  }
28267
 
688 chandransh 28268
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
28269
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 28270
 
28271
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
28272
 
28273
    private long cartId;
28274
 
28275
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28276
    public enum _Fields implements TFieldIdEnum {
28277
      CART_ID((short)1, "cartId");
28278
 
28279
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28280
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28281
 
28282
      static {
28283
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28284
          byId.put((int)field._thriftId, field);
28285
          byName.put(field.getFieldName(), field);
28286
        }
28287
      }
28288
 
28289
      /**
28290
       * Find the _Fields constant that matches fieldId, or null if its not found.
28291
       */
28292
      public static _Fields findByThriftId(int fieldId) {
28293
        return byId.get(fieldId);
28294
      }
28295
 
28296
      /**
28297
       * Find the _Fields constant that matches fieldId, throwing an exception
28298
       * if it is not found.
28299
       */
28300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28301
        _Fields fields = findByThriftId(fieldId);
28302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28303
        return fields;
28304
      }
28305
 
28306
      /**
28307
       * Find the _Fields constant that matches name, or null if its not found.
28308
       */
28309
      public static _Fields findByName(String name) {
28310
        return byName.get(name);
28311
      }
28312
 
28313
      private final short _thriftId;
28314
      private final String _fieldName;
28315
 
28316
      _Fields(short thriftId, String fieldName) {
28317
        _thriftId = thriftId;
28318
        _fieldName = fieldName;
28319
      }
28320
 
28321
      public short getThriftFieldId() {
28322
        return _thriftId;
28323
      }
28324
 
28325
      public String getFieldName() {
28326
        return _fieldName;
28327
      }
28328
    }
28329
 
28330
    // isset id assignments
28331
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 28332
    private BitSet __isset_bit_vector = new BitSet(1);
28333
 
28334
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 28335
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 28336
          new FieldValueMetaData(TType.I64)));
28337
    }});
28338
 
28339
    static {
688 chandransh 28340
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 28341
    }
28342
 
688 chandransh 28343
    public createOrders_args() {
48 ashish 28344
    }
28345
 
688 chandransh 28346
    public createOrders_args(
553 chandransh 28347
      long cartId)
48 ashish 28348
    {
28349
      this();
553 chandransh 28350
      this.cartId = cartId;
28351
      setCartIdIsSet(true);
48 ashish 28352
    }
28353
 
28354
    /**
28355
     * Performs a deep copy on <i>other</i>.
28356
     */
688 chandransh 28357
    public createOrders_args(createOrders_args other) {
48 ashish 28358
      __isset_bit_vector.clear();
28359
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 28360
      this.cartId = other.cartId;
48 ashish 28361
    }
28362
 
688 chandransh 28363
    public createOrders_args deepCopy() {
28364
      return new createOrders_args(this);
48 ashish 28365
    }
28366
 
28367
    @Deprecated
688 chandransh 28368
    public createOrders_args clone() {
28369
      return new createOrders_args(this);
48 ashish 28370
    }
28371
 
553 chandransh 28372
    public long getCartId() {
28373
      return this.cartId;
48 ashish 28374
    }
28375
 
688 chandransh 28376
    public createOrders_args setCartId(long cartId) {
553 chandransh 28377
      this.cartId = cartId;
28378
      setCartIdIsSet(true);
48 ashish 28379
      return this;
28380
    }
28381
 
553 chandransh 28382
    public void unsetCartId() {
28383
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 28384
    }
28385
 
553 chandransh 28386
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
28387
    public boolean isSetCartId() {
28388
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 28389
    }
28390
 
553 chandransh 28391
    public void setCartIdIsSet(boolean value) {
28392
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 28393
    }
28394
 
28395
    public void setFieldValue(_Fields field, Object value) {
28396
      switch (field) {
553 chandransh 28397
      case CART_ID:
48 ashish 28398
        if (value == null) {
553 chandransh 28399
          unsetCartId();
48 ashish 28400
        } else {
553 chandransh 28401
          setCartId((Long)value);
48 ashish 28402
        }
28403
        break;
28404
 
28405
      }
28406
    }
28407
 
28408
    public void setFieldValue(int fieldID, Object value) {
28409
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28410
    }
28411
 
28412
    public Object getFieldValue(_Fields field) {
28413
      switch (field) {
553 chandransh 28414
      case CART_ID:
28415
        return new Long(getCartId());
48 ashish 28416
 
28417
      }
28418
      throw new IllegalStateException();
28419
    }
28420
 
28421
    public Object getFieldValue(int fieldId) {
28422
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28423
    }
28424
 
28425
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28426
    public boolean isSet(_Fields field) {
28427
      switch (field) {
553 chandransh 28428
      case CART_ID:
28429
        return isSetCartId();
48 ashish 28430
      }
28431
      throw new IllegalStateException();
28432
    }
28433
 
28434
    public boolean isSet(int fieldID) {
28435
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28436
    }
28437
 
28438
    @Override
28439
    public boolean equals(Object that) {
28440
      if (that == null)
28441
        return false;
688 chandransh 28442
      if (that instanceof createOrders_args)
28443
        return this.equals((createOrders_args)that);
48 ashish 28444
      return false;
28445
    }
28446
 
688 chandransh 28447
    public boolean equals(createOrders_args that) {
48 ashish 28448
      if (that == null)
28449
        return false;
28450
 
553 chandransh 28451
      boolean this_present_cartId = true;
28452
      boolean that_present_cartId = true;
28453
      if (this_present_cartId || that_present_cartId) {
28454
        if (!(this_present_cartId && that_present_cartId))
48 ashish 28455
          return false;
553 chandransh 28456
        if (this.cartId != that.cartId)
48 ashish 28457
          return false;
28458
      }
28459
 
28460
      return true;
28461
    }
28462
 
28463
    @Override
28464
    public int hashCode() {
28465
      return 0;
28466
    }
28467
 
688 chandransh 28468
    public int compareTo(createOrders_args other) {
48 ashish 28469
      if (!getClass().equals(other.getClass())) {
28470
        return getClass().getName().compareTo(other.getClass().getName());
28471
      }
28472
 
28473
      int lastComparison = 0;
688 chandransh 28474
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 28475
 
553 chandransh 28476
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 28477
      if (lastComparison != 0) {
28478
        return lastComparison;
28479
      }
553 chandransh 28480
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 28481
      if (lastComparison != 0) {
28482
        return lastComparison;
28483
      }
28484
      return 0;
28485
    }
28486
 
28487
    public void read(TProtocol iprot) throws TException {
28488
      TField field;
28489
      iprot.readStructBegin();
28490
      while (true)
28491
      {
28492
        field = iprot.readFieldBegin();
28493
        if (field.type == TType.STOP) { 
28494
          break;
28495
        }
28496
        _Fields fieldId = _Fields.findByThriftId(field.id);
28497
        if (fieldId == null) {
28498
          TProtocolUtil.skip(iprot, field.type);
28499
        } else {
28500
          switch (fieldId) {
553 chandransh 28501
            case CART_ID:
48 ashish 28502
              if (field.type == TType.I64) {
553 chandransh 28503
                this.cartId = iprot.readI64();
28504
                setCartIdIsSet(true);
48 ashish 28505
              } else { 
28506
                TProtocolUtil.skip(iprot, field.type);
28507
              }
28508
              break;
28509
          }
28510
          iprot.readFieldEnd();
28511
        }
28512
      }
28513
      iprot.readStructEnd();
28514
      validate();
28515
    }
28516
 
28517
    public void write(TProtocol oprot) throws TException {
28518
      validate();
28519
 
28520
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 28521
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
28522
      oprot.writeI64(this.cartId);
48 ashish 28523
      oprot.writeFieldEnd();
28524
      oprot.writeFieldStop();
28525
      oprot.writeStructEnd();
28526
    }
28527
 
28528
    @Override
28529
    public String toString() {
688 chandransh 28530
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 28531
      boolean first = true;
28532
 
553 chandransh 28533
      sb.append("cartId:");
28534
      sb.append(this.cartId);
48 ashish 28535
      first = false;
28536
      sb.append(")");
28537
      return sb.toString();
28538
    }
28539
 
28540
    public void validate() throws TException {
28541
      // check for required fields
28542
    }
28543
 
28544
  }
28545
 
688 chandransh 28546
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
28547
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 28548
 
578 chandransh 28549
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 28550
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 28551
 
578 chandransh 28552
    private long success;
553 chandransh 28553
    private ShoppingCartException scx;
48 ashish 28554
 
28555
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28556
    public enum _Fields implements TFieldIdEnum {
28557
      SUCCESS((short)0, "success"),
553 chandransh 28558
      SCX((short)1, "scx");
48 ashish 28559
 
28560
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28561
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28562
 
28563
      static {
28564
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28565
          byId.put((int)field._thriftId, field);
28566
          byName.put(field.getFieldName(), field);
28567
        }
28568
      }
28569
 
28570
      /**
28571
       * Find the _Fields constant that matches fieldId, or null if its not found.
28572
       */
28573
      public static _Fields findByThriftId(int fieldId) {
28574
        return byId.get(fieldId);
28575
      }
28576
 
28577
      /**
28578
       * Find the _Fields constant that matches fieldId, throwing an exception
28579
       * if it is not found.
28580
       */
28581
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28582
        _Fields fields = findByThriftId(fieldId);
28583
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28584
        return fields;
28585
      }
28586
 
28587
      /**
28588
       * Find the _Fields constant that matches name, or null if its not found.
28589
       */
28590
      public static _Fields findByName(String name) {
28591
        return byName.get(name);
28592
      }
28593
 
28594
      private final short _thriftId;
28595
      private final String _fieldName;
28596
 
28597
      _Fields(short thriftId, String fieldName) {
28598
        _thriftId = thriftId;
28599
        _fieldName = fieldName;
28600
      }
28601
 
28602
      public short getThriftFieldId() {
28603
        return _thriftId;
28604
      }
28605
 
28606
      public String getFieldName() {
28607
        return _fieldName;
28608
      }
28609
    }
28610
 
28611
    // isset id assignments
28612
    private static final int __SUCCESS_ISSET_ID = 0;
28613
    private BitSet __isset_bit_vector = new BitSet(1);
28614
 
28615
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28616
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 28617
          new FieldValueMetaData(TType.I64)));
553 chandransh 28618
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 28619
          new FieldValueMetaData(TType.STRUCT)));
28620
    }});
28621
 
28622
    static {
688 chandransh 28623
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 28624
    }
28625
 
688 chandransh 28626
    public createOrders_result() {
48 ashish 28627
    }
28628
 
688 chandransh 28629
    public createOrders_result(
578 chandransh 28630
      long success,
553 chandransh 28631
      ShoppingCartException scx)
48 ashish 28632
    {
28633
      this();
28634
      this.success = success;
28635
      setSuccessIsSet(true);
553 chandransh 28636
      this.scx = scx;
48 ashish 28637
    }
28638
 
28639
    /**
28640
     * Performs a deep copy on <i>other</i>.
28641
     */
688 chandransh 28642
    public createOrders_result(createOrders_result other) {
48 ashish 28643
      __isset_bit_vector.clear();
28644
      __isset_bit_vector.or(other.__isset_bit_vector);
28645
      this.success = other.success;
553 chandransh 28646
      if (other.isSetScx()) {
28647
        this.scx = new ShoppingCartException(other.scx);
48 ashish 28648
      }
28649
    }
28650
 
688 chandransh 28651
    public createOrders_result deepCopy() {
28652
      return new createOrders_result(this);
48 ashish 28653
    }
28654
 
28655
    @Deprecated
688 chandransh 28656
    public createOrders_result clone() {
28657
      return new createOrders_result(this);
48 ashish 28658
    }
28659
 
578 chandransh 28660
    public long getSuccess() {
48 ashish 28661
      return this.success;
28662
    }
28663
 
688 chandransh 28664
    public createOrders_result setSuccess(long success) {
48 ashish 28665
      this.success = success;
28666
      setSuccessIsSet(true);
28667
      return this;
28668
    }
28669
 
28670
    public void unsetSuccess() {
28671
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
28672
    }
28673
 
28674
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28675
    public boolean isSetSuccess() {
28676
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
28677
    }
28678
 
28679
    public void setSuccessIsSet(boolean value) {
28680
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
28681
    }
28682
 
553 chandransh 28683
    public ShoppingCartException getScx() {
28684
      return this.scx;
48 ashish 28685
    }
28686
 
688 chandransh 28687
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 28688
      this.scx = scx;
48 ashish 28689
      return this;
28690
    }
28691
 
553 chandransh 28692
    public void unsetScx() {
28693
      this.scx = null;
48 ashish 28694
    }
28695
 
553 chandransh 28696
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28697
    public boolean isSetScx() {
28698
      return this.scx != null;
48 ashish 28699
    }
28700
 
553 chandransh 28701
    public void setScxIsSet(boolean value) {
48 ashish 28702
      if (!value) {
553 chandransh 28703
        this.scx = null;
48 ashish 28704
      }
28705
    }
28706
 
28707
    public void setFieldValue(_Fields field, Object value) {
28708
      switch (field) {
28709
      case SUCCESS:
28710
        if (value == null) {
28711
          unsetSuccess();
28712
        } else {
578 chandransh 28713
          setSuccess((Long)value);
48 ashish 28714
        }
28715
        break;
28716
 
553 chandransh 28717
      case SCX:
48 ashish 28718
        if (value == null) {
553 chandransh 28719
          unsetScx();
48 ashish 28720
        } else {
553 chandransh 28721
          setScx((ShoppingCartException)value);
48 ashish 28722
        }
28723
        break;
28724
 
28725
      }
28726
    }
28727
 
28728
    public void setFieldValue(int fieldID, Object value) {
28729
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28730
    }
28731
 
28732
    public Object getFieldValue(_Fields field) {
28733
      switch (field) {
28734
      case SUCCESS:
578 chandransh 28735
        return new Long(getSuccess());
48 ashish 28736
 
553 chandransh 28737
      case SCX:
28738
        return getScx();
48 ashish 28739
 
28740
      }
28741
      throw new IllegalStateException();
28742
    }
28743
 
28744
    public Object getFieldValue(int fieldId) {
28745
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28746
    }
28747
 
28748
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28749
    public boolean isSet(_Fields field) {
28750
      switch (field) {
28751
      case SUCCESS:
28752
        return isSetSuccess();
553 chandransh 28753
      case SCX:
28754
        return isSetScx();
48 ashish 28755
      }
28756
      throw new IllegalStateException();
28757
    }
28758
 
28759
    public boolean isSet(int fieldID) {
28760
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28761
    }
28762
 
28763
    @Override
28764
    public boolean equals(Object that) {
28765
      if (that == null)
28766
        return false;
688 chandransh 28767
      if (that instanceof createOrders_result)
28768
        return this.equals((createOrders_result)that);
48 ashish 28769
      return false;
28770
    }
28771
 
688 chandransh 28772
    public boolean equals(createOrders_result that) {
48 ashish 28773
      if (that == null)
28774
        return false;
28775
 
28776
      boolean this_present_success = true;
28777
      boolean that_present_success = true;
28778
      if (this_present_success || that_present_success) {
28779
        if (!(this_present_success && that_present_success))
28780
          return false;
28781
        if (this.success != that.success)
28782
          return false;
28783
      }
28784
 
553 chandransh 28785
      boolean this_present_scx = true && this.isSetScx();
28786
      boolean that_present_scx = true && that.isSetScx();
28787
      if (this_present_scx || that_present_scx) {
28788
        if (!(this_present_scx && that_present_scx))
48 ashish 28789
          return false;
553 chandransh 28790
        if (!this.scx.equals(that.scx))
48 ashish 28791
          return false;
28792
      }
28793
 
28794
      return true;
28795
    }
28796
 
28797
    @Override
28798
    public int hashCode() {
28799
      return 0;
28800
    }
28801
 
688 chandransh 28802
    public int compareTo(createOrders_result other) {
48 ashish 28803
      if (!getClass().equals(other.getClass())) {
28804
        return getClass().getName().compareTo(other.getClass().getName());
28805
      }
28806
 
28807
      int lastComparison = 0;
688 chandransh 28808
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 28809
 
28810
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28811
      if (lastComparison != 0) {
28812
        return lastComparison;
28813
      }
28814
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28815
      if (lastComparison != 0) {
28816
        return lastComparison;
28817
      }
553 chandransh 28818
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 28819
      if (lastComparison != 0) {
28820
        return lastComparison;
28821
      }
553 chandransh 28822
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 28823
      if (lastComparison != 0) {
28824
        return lastComparison;
28825
      }
28826
      return 0;
28827
    }
28828
 
28829
    public void read(TProtocol iprot) throws TException {
28830
      TField field;
28831
      iprot.readStructBegin();
28832
      while (true)
28833
      {
28834
        field = iprot.readFieldBegin();
28835
        if (field.type == TType.STOP) { 
28836
          break;
28837
        }
28838
        _Fields fieldId = _Fields.findByThriftId(field.id);
28839
        if (fieldId == null) {
28840
          TProtocolUtil.skip(iprot, field.type);
28841
        } else {
28842
          switch (fieldId) {
28843
            case SUCCESS:
578 chandransh 28844
              if (field.type == TType.I64) {
28845
                this.success = iprot.readI64();
48 ashish 28846
                setSuccessIsSet(true);
28847
              } else { 
28848
                TProtocolUtil.skip(iprot, field.type);
28849
              }
28850
              break;
553 chandransh 28851
            case SCX:
48 ashish 28852
              if (field.type == TType.STRUCT) {
553 chandransh 28853
                this.scx = new ShoppingCartException();
28854
                this.scx.read(iprot);
48 ashish 28855
              } else { 
28856
                TProtocolUtil.skip(iprot, field.type);
28857
              }
28858
              break;
28859
          }
28860
          iprot.readFieldEnd();
28861
        }
28862
      }
28863
      iprot.readStructEnd();
28864
      validate();
28865
    }
28866
 
28867
    public void write(TProtocol oprot) throws TException {
28868
      oprot.writeStructBegin(STRUCT_DESC);
28869
 
28870
      if (this.isSetSuccess()) {
28871
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 28872
        oprot.writeI64(this.success);
48 ashish 28873
        oprot.writeFieldEnd();
553 chandransh 28874
      } else if (this.isSetScx()) {
28875
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28876
        this.scx.write(oprot);
48 ashish 28877
        oprot.writeFieldEnd();
28878
      }
28879
      oprot.writeFieldStop();
28880
      oprot.writeStructEnd();
28881
    }
28882
 
28883
    @Override
28884
    public String toString() {
688 chandransh 28885
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 28886
      boolean first = true;
28887
 
28888
      sb.append("success:");
28889
      sb.append(this.success);
28890
      first = false;
28891
      if (!first) sb.append(", ");
553 chandransh 28892
      sb.append("scx:");
28893
      if (this.scx == null) {
48 ashish 28894
        sb.append("null");
28895
      } else {
553 chandransh 28896
        sb.append(this.scx);
48 ashish 28897
      }
28898
      first = false;
28899
      sb.append(")");
28900
      return sb.toString();
28901
    }
28902
 
28903
    public void validate() throws TException {
28904
      // check for required fields
28905
    }
28906
 
28907
  }
28908
 
553 chandransh 28909
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
28910
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 28911
 
553 chandransh 28912
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 28913
 
553 chandransh 28914
    private long cartId;
48 ashish 28915
 
28916
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28917
    public enum _Fields implements TFieldIdEnum {
553 chandransh 28918
      CART_ID((short)1, "cartId");
48 ashish 28919
 
28920
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28922
 
28923
      static {
28924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28925
          byId.put((int)field._thriftId, field);
28926
          byName.put(field.getFieldName(), field);
28927
        }
28928
      }
28929
 
28930
      /**
28931
       * Find the _Fields constant that matches fieldId, or null if its not found.
28932
       */
28933
      public static _Fields findByThriftId(int fieldId) {
28934
        return byId.get(fieldId);
28935
      }
28936
 
28937
      /**
28938
       * Find the _Fields constant that matches fieldId, throwing an exception
28939
       * if it is not found.
28940
       */
28941
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28942
        _Fields fields = findByThriftId(fieldId);
28943
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28944
        return fields;
28945
      }
28946
 
28947
      /**
28948
       * Find the _Fields constant that matches name, or null if its not found.
28949
       */
28950
      public static _Fields findByName(String name) {
28951
        return byName.get(name);
28952
      }
28953
 
28954
      private final short _thriftId;
28955
      private final String _fieldName;
28956
 
28957
      _Fields(short thriftId, String fieldName) {
28958
        _thriftId = thriftId;
28959
        _fieldName = fieldName;
28960
      }
28961
 
28962
      public short getThriftFieldId() {
28963
        return _thriftId;
28964
      }
28965
 
28966
      public String getFieldName() {
28967
        return _fieldName;
28968
      }
28969
    }
28970
 
28971
    // isset id assignments
553 chandransh 28972
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 28973
    private BitSet __isset_bit_vector = new BitSet(1);
28974
 
28975
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 28976
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 28977
          new FieldValueMetaData(TType.I64)));
28978
    }});
28979
 
28980
    static {
553 chandransh 28981
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 28982
    }
28983
 
553 chandransh 28984
    public validateCart_args() {
48 ashish 28985
    }
28986
 
553 chandransh 28987
    public validateCart_args(
28988
      long cartId)
48 ashish 28989
    {
28990
      this();
553 chandransh 28991
      this.cartId = cartId;
28992
      setCartIdIsSet(true);
48 ashish 28993
    }
28994
 
28995
    /**
28996
     * Performs a deep copy on <i>other</i>.
28997
     */
553 chandransh 28998
    public validateCart_args(validateCart_args other) {
48 ashish 28999
      __isset_bit_vector.clear();
29000
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 29001
      this.cartId = other.cartId;
48 ashish 29002
    }
29003
 
553 chandransh 29004
    public validateCart_args deepCopy() {
29005
      return new validateCart_args(this);
48 ashish 29006
    }
29007
 
29008
    @Deprecated
553 chandransh 29009
    public validateCart_args clone() {
29010
      return new validateCart_args(this);
48 ashish 29011
    }
29012
 
553 chandransh 29013
    public long getCartId() {
29014
      return this.cartId;
48 ashish 29015
    }
29016
 
553 chandransh 29017
    public validateCart_args setCartId(long cartId) {
29018
      this.cartId = cartId;
29019
      setCartIdIsSet(true);
48 ashish 29020
      return this;
29021
    }
29022
 
553 chandransh 29023
    public void unsetCartId() {
29024
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 29025
    }
29026
 
553 chandransh 29027
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
29028
    public boolean isSetCartId() {
29029
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 29030
    }
29031
 
553 chandransh 29032
    public void setCartIdIsSet(boolean value) {
29033
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 29034
    }
29035
 
29036
    public void setFieldValue(_Fields field, Object value) {
29037
      switch (field) {
553 chandransh 29038
      case CART_ID:
48 ashish 29039
        if (value == null) {
553 chandransh 29040
          unsetCartId();
48 ashish 29041
        } else {
553 chandransh 29042
          setCartId((Long)value);
48 ashish 29043
        }
29044
        break;
29045
 
29046
      }
29047
    }
29048
 
29049
    public void setFieldValue(int fieldID, Object value) {
29050
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29051
    }
29052
 
29053
    public Object getFieldValue(_Fields field) {
29054
      switch (field) {
553 chandransh 29055
      case CART_ID:
29056
        return new Long(getCartId());
48 ashish 29057
 
29058
      }
29059
      throw new IllegalStateException();
29060
    }
29061
 
29062
    public Object getFieldValue(int fieldId) {
29063
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29064
    }
29065
 
29066
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29067
    public boolean isSet(_Fields field) {
29068
      switch (field) {
553 chandransh 29069
      case CART_ID:
29070
        return isSetCartId();
48 ashish 29071
      }
29072
      throw new IllegalStateException();
29073
    }
29074
 
29075
    public boolean isSet(int fieldID) {
29076
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29077
    }
29078
 
29079
    @Override
29080
    public boolean equals(Object that) {
29081
      if (that == null)
29082
        return false;
553 chandransh 29083
      if (that instanceof validateCart_args)
29084
        return this.equals((validateCart_args)that);
48 ashish 29085
      return false;
29086
    }
29087
 
553 chandransh 29088
    public boolean equals(validateCart_args that) {
48 ashish 29089
      if (that == null)
29090
        return false;
29091
 
553 chandransh 29092
      boolean this_present_cartId = true;
29093
      boolean that_present_cartId = true;
29094
      if (this_present_cartId || that_present_cartId) {
29095
        if (!(this_present_cartId && that_present_cartId))
48 ashish 29096
          return false;
553 chandransh 29097
        if (this.cartId != that.cartId)
48 ashish 29098
          return false;
29099
      }
29100
 
29101
      return true;
29102
    }
29103
 
29104
    @Override
29105
    public int hashCode() {
29106
      return 0;
29107
    }
29108
 
553 chandransh 29109
    public int compareTo(validateCart_args other) {
48 ashish 29110
      if (!getClass().equals(other.getClass())) {
29111
        return getClass().getName().compareTo(other.getClass().getName());
29112
      }
29113
 
29114
      int lastComparison = 0;
553 chandransh 29115
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 29116
 
553 chandransh 29117
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 29118
      if (lastComparison != 0) {
29119
        return lastComparison;
29120
      }
553 chandransh 29121
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 29122
      if (lastComparison != 0) {
29123
        return lastComparison;
29124
      }
29125
      return 0;
29126
    }
29127
 
29128
    public void read(TProtocol iprot) throws TException {
29129
      TField field;
29130
      iprot.readStructBegin();
29131
      while (true)
29132
      {
29133
        field = iprot.readFieldBegin();
29134
        if (field.type == TType.STOP) { 
29135
          break;
29136
        }
29137
        _Fields fieldId = _Fields.findByThriftId(field.id);
29138
        if (fieldId == null) {
29139
          TProtocolUtil.skip(iprot, field.type);
29140
        } else {
29141
          switch (fieldId) {
553 chandransh 29142
            case CART_ID:
48 ashish 29143
              if (field.type == TType.I64) {
553 chandransh 29144
                this.cartId = iprot.readI64();
29145
                setCartIdIsSet(true);
48 ashish 29146
              } else { 
29147
                TProtocolUtil.skip(iprot, field.type);
29148
              }
29149
              break;
29150
          }
29151
          iprot.readFieldEnd();
29152
        }
29153
      }
29154
      iprot.readStructEnd();
29155
      validate();
29156
    }
29157
 
29158
    public void write(TProtocol oprot) throws TException {
29159
      validate();
29160
 
29161
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 29162
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
29163
      oprot.writeI64(this.cartId);
48 ashish 29164
      oprot.writeFieldEnd();
29165
      oprot.writeFieldStop();
29166
      oprot.writeStructEnd();
29167
    }
29168
 
29169
    @Override
29170
    public String toString() {
553 chandransh 29171
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 29172
      boolean first = true;
29173
 
553 chandransh 29174
      sb.append("cartId:");
29175
      sb.append(this.cartId);
48 ashish 29176
      first = false;
29177
      sb.append(")");
29178
      return sb.toString();
29179
    }
29180
 
29181
    public void validate() throws TException {
29182
      // check for required fields
29183
    }
29184
 
29185
  }
29186
 
553 chandransh 29187
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
29188
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 29189
 
1466 ankur.sing 29190
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
578 chandransh 29191
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 29192
 
1466 ankur.sing 29193
    private String success;
578 chandransh 29194
    private ShoppingCartException scex;
48 ashish 29195
 
29196
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29197
    public enum _Fields implements TFieldIdEnum {
578 chandransh 29198
      SUCCESS((short)0, "success"),
29199
      SCEX((short)1, "scex");
48 ashish 29200
 
29201
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29202
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29203
 
29204
      static {
29205
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29206
          byId.put((int)field._thriftId, field);
29207
          byName.put(field.getFieldName(), field);
29208
        }
29209
      }
29210
 
29211
      /**
29212
       * Find the _Fields constant that matches fieldId, or null if its not found.
29213
       */
29214
      public static _Fields findByThriftId(int fieldId) {
29215
        return byId.get(fieldId);
29216
      }
29217
 
29218
      /**
29219
       * Find the _Fields constant that matches fieldId, throwing an exception
29220
       * if it is not found.
29221
       */
29222
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29223
        _Fields fields = findByThriftId(fieldId);
29224
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29225
        return fields;
29226
      }
29227
 
29228
      /**
29229
       * Find the _Fields constant that matches name, or null if its not found.
29230
       */
29231
      public static _Fields findByName(String name) {
29232
        return byName.get(name);
29233
      }
29234
 
29235
      private final short _thriftId;
29236
      private final String _fieldName;
29237
 
29238
      _Fields(short thriftId, String fieldName) {
29239
        _thriftId = thriftId;
29240
        _fieldName = fieldName;
29241
      }
29242
 
29243
      public short getThriftFieldId() {
29244
        return _thriftId;
29245
      }
29246
 
29247
      public String getFieldName() {
29248
        return _fieldName;
29249
      }
29250
    }
29251
 
29252
    // isset id assignments
29253
 
29254
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29255
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1466 ankur.sing 29256
          new FieldValueMetaData(TType.STRING)));
578 chandransh 29257
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
29258
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 29259
    }});
29260
 
29261
    static {
553 chandransh 29262
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 29263
    }
29264
 
553 chandransh 29265
    public validateCart_result() {
48 ashish 29266
    }
29267
 
553 chandransh 29268
    public validateCart_result(
1466 ankur.sing 29269
      String success,
578 chandransh 29270
      ShoppingCartException scex)
48 ashish 29271
    {
29272
      this();
29273
      this.success = success;
578 chandransh 29274
      this.scex = scex;
48 ashish 29275
    }
29276
 
29277
    /**
29278
     * Performs a deep copy on <i>other</i>.
29279
     */
553 chandransh 29280
    public validateCart_result(validateCart_result other) {
1466 ankur.sing 29281
      if (other.isSetSuccess()) {
29282
        this.success = other.success;
29283
      }
578 chandransh 29284
      if (other.isSetScex()) {
29285
        this.scex = new ShoppingCartException(other.scex);
29286
      }
48 ashish 29287
    }
29288
 
553 chandransh 29289
    public validateCart_result deepCopy() {
29290
      return new validateCart_result(this);
48 ashish 29291
    }
29292
 
29293
    @Deprecated
553 chandransh 29294
    public validateCart_result clone() {
29295
      return new validateCart_result(this);
48 ashish 29296
    }
29297
 
1466 ankur.sing 29298
    public String getSuccess() {
48 ashish 29299
      return this.success;
29300
    }
29301
 
1466 ankur.sing 29302
    public validateCart_result setSuccess(String success) {
48 ashish 29303
      this.success = success;
29304
      return this;
29305
    }
29306
 
29307
    public void unsetSuccess() {
1466 ankur.sing 29308
      this.success = null;
48 ashish 29309
    }
29310
 
29311
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29312
    public boolean isSetSuccess() {
1466 ankur.sing 29313
      return this.success != null;
48 ashish 29314
    }
29315
 
29316
    public void setSuccessIsSet(boolean value) {
1466 ankur.sing 29317
      if (!value) {
29318
        this.success = null;
29319
      }
48 ashish 29320
    }
29321
 
578 chandransh 29322
    public ShoppingCartException getScex() {
29323
      return this.scex;
29324
    }
29325
 
29326
    public validateCart_result setScex(ShoppingCartException scex) {
29327
      this.scex = scex;
29328
      return this;
29329
    }
29330
 
29331
    public void unsetScex() {
29332
      this.scex = null;
29333
    }
29334
 
29335
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
29336
    public boolean isSetScex() {
29337
      return this.scex != null;
29338
    }
29339
 
29340
    public void setScexIsSet(boolean value) {
29341
      if (!value) {
29342
        this.scex = null;
29343
      }
29344
    }
29345
 
553 chandransh 29346
    public void setFieldValue(_Fields field, Object value) {
29347
      switch (field) {
29348
      case SUCCESS:
29349
        if (value == null) {
29350
          unsetSuccess();
29351
        } else {
1466 ankur.sing 29352
          setSuccess((String)value);
553 chandransh 29353
        }
29354
        break;
29355
 
578 chandransh 29356
      case SCEX:
29357
        if (value == null) {
29358
          unsetScex();
29359
        } else {
29360
          setScex((ShoppingCartException)value);
29361
        }
29362
        break;
29363
 
553 chandransh 29364
      }
48 ashish 29365
    }
29366
 
553 chandransh 29367
    public void setFieldValue(int fieldID, Object value) {
29368
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29369
    }
29370
 
29371
    public Object getFieldValue(_Fields field) {
29372
      switch (field) {
29373
      case SUCCESS:
1466 ankur.sing 29374
        return getSuccess();
553 chandransh 29375
 
578 chandransh 29376
      case SCEX:
29377
        return getScex();
29378
 
553 chandransh 29379
      }
29380
      throw new IllegalStateException();
29381
    }
29382
 
29383
    public Object getFieldValue(int fieldId) {
29384
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29385
    }
29386
 
29387
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29388
    public boolean isSet(_Fields field) {
29389
      switch (field) {
29390
      case SUCCESS:
29391
        return isSetSuccess();
578 chandransh 29392
      case SCEX:
29393
        return isSetScex();
553 chandransh 29394
      }
29395
      throw new IllegalStateException();
29396
    }
29397
 
29398
    public boolean isSet(int fieldID) {
29399
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29400
    }
29401
 
29402
    @Override
29403
    public boolean equals(Object that) {
29404
      if (that == null)
29405
        return false;
29406
      if (that instanceof validateCart_result)
29407
        return this.equals((validateCart_result)that);
29408
      return false;
29409
    }
29410
 
29411
    public boolean equals(validateCart_result that) {
29412
      if (that == null)
29413
        return false;
29414
 
1466 ankur.sing 29415
      boolean this_present_success = true && this.isSetSuccess();
29416
      boolean that_present_success = true && that.isSetSuccess();
553 chandransh 29417
      if (this_present_success || that_present_success) {
29418
        if (!(this_present_success && that_present_success))
29419
          return false;
1466 ankur.sing 29420
        if (!this.success.equals(that.success))
553 chandransh 29421
          return false;
29422
      }
29423
 
578 chandransh 29424
      boolean this_present_scex = true && this.isSetScex();
29425
      boolean that_present_scex = true && that.isSetScex();
29426
      if (this_present_scex || that_present_scex) {
29427
        if (!(this_present_scex && that_present_scex))
29428
          return false;
29429
        if (!this.scex.equals(that.scex))
29430
          return false;
29431
      }
29432
 
553 chandransh 29433
      return true;
29434
    }
29435
 
29436
    @Override
29437
    public int hashCode() {
29438
      return 0;
29439
    }
29440
 
29441
    public int compareTo(validateCart_result other) {
29442
      if (!getClass().equals(other.getClass())) {
29443
        return getClass().getName().compareTo(other.getClass().getName());
29444
      }
29445
 
29446
      int lastComparison = 0;
29447
      validateCart_result typedOther = (validateCart_result)other;
29448
 
29449
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29450
      if (lastComparison != 0) {
29451
        return lastComparison;
29452
      }
29453
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29454
      if (lastComparison != 0) {
29455
        return lastComparison;
29456
      }
578 chandransh 29457
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
29458
      if (lastComparison != 0) {
29459
        return lastComparison;
29460
      }
29461
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
29462
      if (lastComparison != 0) {
29463
        return lastComparison;
29464
      }
553 chandransh 29465
      return 0;
29466
    }
29467
 
29468
    public void read(TProtocol iprot) throws TException {
29469
      TField field;
29470
      iprot.readStructBegin();
29471
      while (true)
29472
      {
29473
        field = iprot.readFieldBegin();
29474
        if (field.type == TType.STOP) { 
29475
          break;
29476
        }
29477
        _Fields fieldId = _Fields.findByThriftId(field.id);
29478
        if (fieldId == null) {
29479
          TProtocolUtil.skip(iprot, field.type);
29480
        } else {
29481
          switch (fieldId) {
29482
            case SUCCESS:
1466 ankur.sing 29483
              if (field.type == TType.STRING) {
29484
                this.success = iprot.readString();
553 chandransh 29485
              } else { 
29486
                TProtocolUtil.skip(iprot, field.type);
29487
              }
29488
              break;
578 chandransh 29489
            case SCEX:
29490
              if (field.type == TType.STRUCT) {
29491
                this.scex = new ShoppingCartException();
29492
                this.scex.read(iprot);
29493
              } else { 
29494
                TProtocolUtil.skip(iprot, field.type);
29495
              }
29496
              break;
553 chandransh 29497
          }
29498
          iprot.readFieldEnd();
29499
        }
29500
      }
29501
      iprot.readStructEnd();
29502
      validate();
29503
    }
29504
 
29505
    public void write(TProtocol oprot) throws TException {
29506
      oprot.writeStructBegin(STRUCT_DESC);
29507
 
29508
      if (this.isSetSuccess()) {
29509
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1466 ankur.sing 29510
        oprot.writeString(this.success);
553 chandransh 29511
        oprot.writeFieldEnd();
578 chandransh 29512
      } else if (this.isSetScex()) {
29513
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
29514
        this.scex.write(oprot);
29515
        oprot.writeFieldEnd();
553 chandransh 29516
      }
29517
      oprot.writeFieldStop();
29518
      oprot.writeStructEnd();
29519
    }
29520
 
29521
    @Override
29522
    public String toString() {
29523
      StringBuilder sb = new StringBuilder("validateCart_result(");
29524
      boolean first = true;
29525
 
29526
      sb.append("success:");
1466 ankur.sing 29527
      if (this.success == null) {
29528
        sb.append("null");
29529
      } else {
29530
        sb.append(this.success);
29531
      }
553 chandransh 29532
      first = false;
578 chandransh 29533
      if (!first) sb.append(", ");
29534
      sb.append("scex:");
29535
      if (this.scex == null) {
29536
        sb.append("null");
29537
      } else {
29538
        sb.append(this.scex);
29539
      }
29540
      first = false;
553 chandransh 29541
      sb.append(")");
29542
      return sb.toString();
29543
    }
29544
 
29545
    public void validate() throws TException {
29546
      // check for required fields
29547
    }
29548
 
29549
  }
29550
 
688 chandransh 29551
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
29552
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
578 chandransh 29553
 
688 chandransh 29554
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
29555
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
29556
 
29557
    private long fromCartId;
29558
    private long toCartId;
29559
 
29560
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29561
    public enum _Fields implements TFieldIdEnum {
29562
      FROM_CART_ID((short)1, "fromCartId"),
29563
      TO_CART_ID((short)2, "toCartId");
29564
 
29565
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29566
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29567
 
29568
      static {
29569
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29570
          byId.put((int)field._thriftId, field);
29571
          byName.put(field.getFieldName(), field);
29572
        }
29573
      }
29574
 
29575
      /**
29576
       * Find the _Fields constant that matches fieldId, or null if its not found.
29577
       */
29578
      public static _Fields findByThriftId(int fieldId) {
29579
        return byId.get(fieldId);
29580
      }
29581
 
29582
      /**
29583
       * Find the _Fields constant that matches fieldId, throwing an exception
29584
       * if it is not found.
29585
       */
29586
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29587
        _Fields fields = findByThriftId(fieldId);
29588
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29589
        return fields;
29590
      }
29591
 
29592
      /**
29593
       * Find the _Fields constant that matches name, or null if its not found.
29594
       */
29595
      public static _Fields findByName(String name) {
29596
        return byName.get(name);
29597
      }
29598
 
29599
      private final short _thriftId;
29600
      private final String _fieldName;
29601
 
29602
      _Fields(short thriftId, String fieldName) {
29603
        _thriftId = thriftId;
29604
        _fieldName = fieldName;
29605
      }
29606
 
29607
      public short getThriftFieldId() {
29608
        return _thriftId;
29609
      }
29610
 
29611
      public String getFieldName() {
29612
        return _fieldName;
29613
      }
29614
    }
29615
 
29616
    // isset id assignments
29617
    private static final int __FROMCARTID_ISSET_ID = 0;
29618
    private static final int __TOCARTID_ISSET_ID = 1;
29619
    private BitSet __isset_bit_vector = new BitSet(2);
29620
 
29621
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29622
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
29623
          new FieldValueMetaData(TType.I64)));
29624
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
29625
          new FieldValueMetaData(TType.I64)));
29626
    }});
29627
 
29628
    static {
29629
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
29630
    }
29631
 
29632
    public mergeCart_args() {
29633
    }
29634
 
29635
    public mergeCart_args(
29636
      long fromCartId,
29637
      long toCartId)
29638
    {
29639
      this();
29640
      this.fromCartId = fromCartId;
29641
      setFromCartIdIsSet(true);
29642
      this.toCartId = toCartId;
29643
      setToCartIdIsSet(true);
29644
    }
29645
 
29646
    /**
29647
     * Performs a deep copy on <i>other</i>.
29648
     */
29649
    public mergeCart_args(mergeCart_args other) {
29650
      __isset_bit_vector.clear();
29651
      __isset_bit_vector.or(other.__isset_bit_vector);
29652
      this.fromCartId = other.fromCartId;
29653
      this.toCartId = other.toCartId;
29654
    }
29655
 
29656
    public mergeCart_args deepCopy() {
29657
      return new mergeCart_args(this);
29658
    }
29659
 
29660
    @Deprecated
29661
    public mergeCart_args clone() {
29662
      return new mergeCart_args(this);
29663
    }
29664
 
29665
    public long getFromCartId() {
29666
      return this.fromCartId;
29667
    }
29668
 
29669
    public mergeCart_args setFromCartId(long fromCartId) {
29670
      this.fromCartId = fromCartId;
29671
      setFromCartIdIsSet(true);
29672
      return this;
29673
    }
29674
 
29675
    public void unsetFromCartId() {
29676
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
29677
    }
29678
 
29679
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
29680
    public boolean isSetFromCartId() {
29681
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
29682
    }
29683
 
29684
    public void setFromCartIdIsSet(boolean value) {
29685
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
29686
    }
29687
 
29688
    public long getToCartId() {
29689
      return this.toCartId;
29690
    }
29691
 
29692
    public mergeCart_args setToCartId(long toCartId) {
29693
      this.toCartId = toCartId;
29694
      setToCartIdIsSet(true);
29695
      return this;
29696
    }
29697
 
29698
    public void unsetToCartId() {
29699
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
29700
    }
29701
 
29702
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
29703
    public boolean isSetToCartId() {
29704
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
29705
    }
29706
 
29707
    public void setToCartIdIsSet(boolean value) {
29708
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
29709
    }
29710
 
29711
    public void setFieldValue(_Fields field, Object value) {
29712
      switch (field) {
29713
      case FROM_CART_ID:
29714
        if (value == null) {
29715
          unsetFromCartId();
29716
        } else {
29717
          setFromCartId((Long)value);
29718
        }
29719
        break;
29720
 
29721
      case TO_CART_ID:
29722
        if (value == null) {
29723
          unsetToCartId();
29724
        } else {
29725
          setToCartId((Long)value);
29726
        }
29727
        break;
29728
 
29729
      }
29730
    }
29731
 
29732
    public void setFieldValue(int fieldID, Object value) {
29733
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29734
    }
29735
 
29736
    public Object getFieldValue(_Fields field) {
29737
      switch (field) {
29738
      case FROM_CART_ID:
29739
        return new Long(getFromCartId());
29740
 
29741
      case TO_CART_ID:
29742
        return new Long(getToCartId());
29743
 
29744
      }
29745
      throw new IllegalStateException();
29746
    }
29747
 
29748
    public Object getFieldValue(int fieldId) {
29749
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29750
    }
29751
 
29752
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29753
    public boolean isSet(_Fields field) {
29754
      switch (field) {
29755
      case FROM_CART_ID:
29756
        return isSetFromCartId();
29757
      case TO_CART_ID:
29758
        return isSetToCartId();
29759
      }
29760
      throw new IllegalStateException();
29761
    }
29762
 
29763
    public boolean isSet(int fieldID) {
29764
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29765
    }
29766
 
29767
    @Override
29768
    public boolean equals(Object that) {
29769
      if (that == null)
29770
        return false;
29771
      if (that instanceof mergeCart_args)
29772
        return this.equals((mergeCart_args)that);
29773
      return false;
29774
    }
29775
 
29776
    public boolean equals(mergeCart_args that) {
29777
      if (that == null)
29778
        return false;
29779
 
29780
      boolean this_present_fromCartId = true;
29781
      boolean that_present_fromCartId = true;
29782
      if (this_present_fromCartId || that_present_fromCartId) {
29783
        if (!(this_present_fromCartId && that_present_fromCartId))
29784
          return false;
29785
        if (this.fromCartId != that.fromCartId)
29786
          return false;
29787
      }
29788
 
29789
      boolean this_present_toCartId = true;
29790
      boolean that_present_toCartId = true;
29791
      if (this_present_toCartId || that_present_toCartId) {
29792
        if (!(this_present_toCartId && that_present_toCartId))
29793
          return false;
29794
        if (this.toCartId != that.toCartId)
29795
          return false;
29796
      }
29797
 
29798
      return true;
29799
    }
29800
 
29801
    @Override
29802
    public int hashCode() {
29803
      return 0;
29804
    }
29805
 
29806
    public int compareTo(mergeCart_args other) {
29807
      if (!getClass().equals(other.getClass())) {
29808
        return getClass().getName().compareTo(other.getClass().getName());
29809
      }
29810
 
29811
      int lastComparison = 0;
29812
      mergeCart_args typedOther = (mergeCart_args)other;
29813
 
29814
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
29815
      if (lastComparison != 0) {
29816
        return lastComparison;
29817
      }
29818
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
29819
      if (lastComparison != 0) {
29820
        return lastComparison;
29821
      }
29822
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
29823
      if (lastComparison != 0) {
29824
        return lastComparison;
29825
      }
29826
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
29827
      if (lastComparison != 0) {
29828
        return lastComparison;
29829
      }
29830
      return 0;
29831
    }
29832
 
29833
    public void read(TProtocol iprot) throws TException {
29834
      TField field;
29835
      iprot.readStructBegin();
29836
      while (true)
29837
      {
29838
        field = iprot.readFieldBegin();
29839
        if (field.type == TType.STOP) { 
29840
          break;
29841
        }
29842
        _Fields fieldId = _Fields.findByThriftId(field.id);
29843
        if (fieldId == null) {
29844
          TProtocolUtil.skip(iprot, field.type);
29845
        } else {
29846
          switch (fieldId) {
29847
            case FROM_CART_ID:
29848
              if (field.type == TType.I64) {
29849
                this.fromCartId = iprot.readI64();
29850
                setFromCartIdIsSet(true);
29851
              } else { 
29852
                TProtocolUtil.skip(iprot, field.type);
29853
              }
29854
              break;
29855
            case TO_CART_ID:
29856
              if (field.type == TType.I64) {
29857
                this.toCartId = iprot.readI64();
29858
                setToCartIdIsSet(true);
29859
              } else { 
29860
                TProtocolUtil.skip(iprot, field.type);
29861
              }
29862
              break;
29863
          }
29864
          iprot.readFieldEnd();
29865
        }
29866
      }
29867
      iprot.readStructEnd();
29868
      validate();
29869
    }
29870
 
29871
    public void write(TProtocol oprot) throws TException {
29872
      validate();
29873
 
29874
      oprot.writeStructBegin(STRUCT_DESC);
29875
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
29876
      oprot.writeI64(this.fromCartId);
29877
      oprot.writeFieldEnd();
29878
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
29879
      oprot.writeI64(this.toCartId);
29880
      oprot.writeFieldEnd();
29881
      oprot.writeFieldStop();
29882
      oprot.writeStructEnd();
29883
    }
29884
 
29885
    @Override
29886
    public String toString() {
29887
      StringBuilder sb = new StringBuilder("mergeCart_args(");
29888
      boolean first = true;
29889
 
29890
      sb.append("fromCartId:");
29891
      sb.append(this.fromCartId);
29892
      first = false;
29893
      if (!first) sb.append(", ");
29894
      sb.append("toCartId:");
29895
      sb.append(this.toCartId);
29896
      first = false;
29897
      sb.append(")");
29898
      return sb.toString();
29899
    }
29900
 
29901
    public void validate() throws TException {
29902
      // check for required fields
29903
    }
29904
 
29905
  }
29906
 
29907
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
29908
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
29909
 
29910
 
29911
 
29912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29913
    public enum _Fields implements TFieldIdEnum {
29914
;
29915
 
29916
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29917
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29918
 
29919
      static {
29920
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29921
          byId.put((int)field._thriftId, field);
29922
          byName.put(field.getFieldName(), field);
29923
        }
29924
      }
29925
 
29926
      /**
29927
       * Find the _Fields constant that matches fieldId, or null if its not found.
29928
       */
29929
      public static _Fields findByThriftId(int fieldId) {
29930
        return byId.get(fieldId);
29931
      }
29932
 
29933
      /**
29934
       * Find the _Fields constant that matches fieldId, throwing an exception
29935
       * if it is not found.
29936
       */
29937
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29938
        _Fields fields = findByThriftId(fieldId);
29939
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29940
        return fields;
29941
      }
29942
 
29943
      /**
29944
       * Find the _Fields constant that matches name, or null if its not found.
29945
       */
29946
      public static _Fields findByName(String name) {
29947
        return byName.get(name);
29948
      }
29949
 
29950
      private final short _thriftId;
29951
      private final String _fieldName;
29952
 
29953
      _Fields(short thriftId, String fieldName) {
29954
        _thriftId = thriftId;
29955
        _fieldName = fieldName;
29956
      }
29957
 
29958
      public short getThriftFieldId() {
29959
        return _thriftId;
29960
      }
29961
 
29962
      public String getFieldName() {
29963
        return _fieldName;
29964
      }
29965
    }
29966
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29967
    }});
29968
 
29969
    static {
29970
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
29971
    }
29972
 
29973
    public mergeCart_result() {
29974
    }
29975
 
29976
    /**
29977
     * Performs a deep copy on <i>other</i>.
29978
     */
29979
    public mergeCart_result(mergeCart_result other) {
29980
    }
29981
 
29982
    public mergeCart_result deepCopy() {
29983
      return new mergeCart_result(this);
29984
    }
29985
 
29986
    @Deprecated
29987
    public mergeCart_result clone() {
29988
      return new mergeCart_result(this);
29989
    }
29990
 
29991
    public void setFieldValue(_Fields field, Object value) {
29992
      switch (field) {
29993
      }
29994
    }
29995
 
29996
    public void setFieldValue(int fieldID, Object value) {
29997
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29998
    }
29999
 
30000
    public Object getFieldValue(_Fields field) {
30001
      switch (field) {
30002
      }
30003
      throw new IllegalStateException();
30004
    }
30005
 
30006
    public Object getFieldValue(int fieldId) {
30007
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30008
    }
30009
 
30010
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30011
    public boolean isSet(_Fields field) {
30012
      switch (field) {
30013
      }
30014
      throw new IllegalStateException();
30015
    }
30016
 
30017
    public boolean isSet(int fieldID) {
30018
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30019
    }
30020
 
30021
    @Override
30022
    public boolean equals(Object that) {
30023
      if (that == null)
30024
        return false;
30025
      if (that instanceof mergeCart_result)
30026
        return this.equals((mergeCart_result)that);
30027
      return false;
30028
    }
30029
 
30030
    public boolean equals(mergeCart_result that) {
30031
      if (that == null)
30032
        return false;
30033
 
30034
      return true;
30035
    }
30036
 
30037
    @Override
30038
    public int hashCode() {
30039
      return 0;
30040
    }
30041
 
30042
    public int compareTo(mergeCart_result other) {
30043
      if (!getClass().equals(other.getClass())) {
30044
        return getClass().getName().compareTo(other.getClass().getName());
30045
      }
30046
 
30047
      int lastComparison = 0;
30048
      mergeCart_result typedOther = (mergeCart_result)other;
30049
 
30050
      return 0;
30051
    }
30052
 
30053
    public void read(TProtocol iprot) throws TException {
30054
      TField field;
30055
      iprot.readStructBegin();
30056
      while (true)
30057
      {
30058
        field = iprot.readFieldBegin();
30059
        if (field.type == TType.STOP) { 
30060
          break;
30061
        }
30062
        _Fields fieldId = _Fields.findByThriftId(field.id);
30063
        if (fieldId == null) {
30064
          TProtocolUtil.skip(iprot, field.type);
30065
        } else {
30066
          switch (fieldId) {
30067
          }
30068
          iprot.readFieldEnd();
30069
        }
30070
      }
30071
      iprot.readStructEnd();
30072
      validate();
30073
    }
30074
 
30075
    public void write(TProtocol oprot) throws TException {
30076
      oprot.writeStructBegin(STRUCT_DESC);
30077
 
30078
      oprot.writeFieldStop();
30079
      oprot.writeStructEnd();
30080
    }
30081
 
30082
    @Override
30083
    public String toString() {
30084
      StringBuilder sb = new StringBuilder("mergeCart_result(");
30085
      boolean first = true;
30086
 
30087
      sb.append(")");
30088
      return sb.toString();
30089
    }
30090
 
30091
    public void validate() throws TException {
30092
      // check for required fields
30093
    }
30094
 
30095
  }
30096
 
30097
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
30098
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
30099
 
578 chandransh 30100
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
30101
 
30102
    private long cartId;
30103
 
30104
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30105
    public enum _Fields implements TFieldIdEnum {
30106
      CART_ID((short)1, "cartId");
30107
 
30108
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30109
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30110
 
30111
      static {
30112
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30113
          byId.put((int)field._thriftId, field);
30114
          byName.put(field.getFieldName(), field);
30115
        }
30116
      }
30117
 
30118
      /**
30119
       * Find the _Fields constant that matches fieldId, or null if its not found.
30120
       */
30121
      public static _Fields findByThriftId(int fieldId) {
30122
        return byId.get(fieldId);
30123
      }
30124
 
30125
      /**
30126
       * Find the _Fields constant that matches fieldId, throwing an exception
30127
       * if it is not found.
30128
       */
30129
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30130
        _Fields fields = findByThriftId(fieldId);
30131
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30132
        return fields;
30133
      }
30134
 
30135
      /**
30136
       * Find the _Fields constant that matches name, or null if its not found.
30137
       */
30138
      public static _Fields findByName(String name) {
30139
        return byName.get(name);
30140
      }
30141
 
30142
      private final short _thriftId;
30143
      private final String _fieldName;
30144
 
30145
      _Fields(short thriftId, String fieldName) {
30146
        _thriftId = thriftId;
30147
        _fieldName = fieldName;
30148
      }
30149
 
30150
      public short getThriftFieldId() {
30151
        return _thriftId;
30152
      }
30153
 
30154
      public String getFieldName() {
30155
        return _fieldName;
30156
      }
30157
    }
30158
 
30159
    // isset id assignments
30160
    private static final int __CARTID_ISSET_ID = 0;
30161
    private BitSet __isset_bit_vector = new BitSet(1);
30162
 
30163
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30164
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
30165
          new FieldValueMetaData(TType.I64)));
30166
    }});
30167
 
30168
    static {
688 chandransh 30169
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
578 chandransh 30170
    }
30171
 
688 chandransh 30172
    public checkOut_args() {
578 chandransh 30173
    }
30174
 
688 chandransh 30175
    public checkOut_args(
578 chandransh 30176
      long cartId)
30177
    {
30178
      this();
30179
      this.cartId = cartId;
30180
      setCartIdIsSet(true);
30181
    }
30182
 
30183
    /**
30184
     * Performs a deep copy on <i>other</i>.
30185
     */
688 chandransh 30186
    public checkOut_args(checkOut_args other) {
578 chandransh 30187
      __isset_bit_vector.clear();
30188
      __isset_bit_vector.or(other.__isset_bit_vector);
30189
      this.cartId = other.cartId;
30190
    }
30191
 
688 chandransh 30192
    public checkOut_args deepCopy() {
30193
      return new checkOut_args(this);
578 chandransh 30194
    }
30195
 
30196
    @Deprecated
688 chandransh 30197
    public checkOut_args clone() {
30198
      return new checkOut_args(this);
578 chandransh 30199
    }
30200
 
30201
    public long getCartId() {
30202
      return this.cartId;
30203
    }
30204
 
688 chandransh 30205
    public checkOut_args setCartId(long cartId) {
578 chandransh 30206
      this.cartId = cartId;
30207
      setCartIdIsSet(true);
30208
      return this;
30209
    }
30210
 
30211
    public void unsetCartId() {
30212
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
30213
    }
30214
 
30215
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
30216
    public boolean isSetCartId() {
30217
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
30218
    }
30219
 
30220
    public void setCartIdIsSet(boolean value) {
30221
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
30222
    }
30223
 
30224
    public void setFieldValue(_Fields field, Object value) {
30225
      switch (field) {
30226
      case CART_ID:
30227
        if (value == null) {
30228
          unsetCartId();
30229
        } else {
30230
          setCartId((Long)value);
30231
        }
30232
        break;
30233
 
30234
      }
30235
    }
30236
 
30237
    public void setFieldValue(int fieldID, Object value) {
30238
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30239
    }
30240
 
30241
    public Object getFieldValue(_Fields field) {
30242
      switch (field) {
30243
      case CART_ID:
30244
        return new Long(getCartId());
30245
 
30246
      }
30247
      throw new IllegalStateException();
30248
    }
30249
 
30250
    public Object getFieldValue(int fieldId) {
30251
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30252
    }
30253
 
30254
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30255
    public boolean isSet(_Fields field) {
30256
      switch (field) {
30257
      case CART_ID:
30258
        return isSetCartId();
30259
      }
30260
      throw new IllegalStateException();
30261
    }
30262
 
30263
    public boolean isSet(int fieldID) {
30264
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30265
    }
30266
 
30267
    @Override
30268
    public boolean equals(Object that) {
30269
      if (that == null)
30270
        return false;
688 chandransh 30271
      if (that instanceof checkOut_args)
30272
        return this.equals((checkOut_args)that);
578 chandransh 30273
      return false;
30274
    }
30275
 
688 chandransh 30276
    public boolean equals(checkOut_args that) {
578 chandransh 30277
      if (that == null)
30278
        return false;
30279
 
30280
      boolean this_present_cartId = true;
30281
      boolean that_present_cartId = true;
30282
      if (this_present_cartId || that_present_cartId) {
30283
        if (!(this_present_cartId && that_present_cartId))
30284
          return false;
30285
        if (this.cartId != that.cartId)
30286
          return false;
30287
      }
30288
 
30289
      return true;
30290
    }
30291
 
30292
    @Override
30293
    public int hashCode() {
30294
      return 0;
30295
    }
30296
 
688 chandransh 30297
    public int compareTo(checkOut_args other) {
578 chandransh 30298
      if (!getClass().equals(other.getClass())) {
30299
        return getClass().getName().compareTo(other.getClass().getName());
30300
      }
30301
 
30302
      int lastComparison = 0;
688 chandransh 30303
      checkOut_args typedOther = (checkOut_args)other;
578 chandransh 30304
 
30305
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
30306
      if (lastComparison != 0) {
30307
        return lastComparison;
30308
      }
30309
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
30310
      if (lastComparison != 0) {
30311
        return lastComparison;
30312
      }
30313
      return 0;
30314
    }
30315
 
30316
    public void read(TProtocol iprot) throws TException {
30317
      TField field;
30318
      iprot.readStructBegin();
30319
      while (true)
30320
      {
30321
        field = iprot.readFieldBegin();
30322
        if (field.type == TType.STOP) { 
30323
          break;
30324
        }
30325
        _Fields fieldId = _Fields.findByThriftId(field.id);
30326
        if (fieldId == null) {
30327
          TProtocolUtil.skip(iprot, field.type);
30328
        } else {
30329
          switch (fieldId) {
30330
            case CART_ID:
30331
              if (field.type == TType.I64) {
30332
                this.cartId = iprot.readI64();
30333
                setCartIdIsSet(true);
30334
              } else { 
30335
                TProtocolUtil.skip(iprot, field.type);
30336
              }
30337
              break;
30338
          }
30339
          iprot.readFieldEnd();
30340
        }
30341
      }
30342
      iprot.readStructEnd();
30343
      validate();
30344
    }
30345
 
30346
    public void write(TProtocol oprot) throws TException {
30347
      validate();
30348
 
30349
      oprot.writeStructBegin(STRUCT_DESC);
30350
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
30351
      oprot.writeI64(this.cartId);
30352
      oprot.writeFieldEnd();
30353
      oprot.writeFieldStop();
30354
      oprot.writeStructEnd();
30355
    }
30356
 
30357
    @Override
30358
    public String toString() {
688 chandransh 30359
      StringBuilder sb = new StringBuilder("checkOut_args(");
578 chandransh 30360
      boolean first = true;
30361
 
30362
      sb.append("cartId:");
30363
      sb.append(this.cartId);
30364
      first = false;
30365
      sb.append(")");
30366
      return sb.toString();
30367
    }
30368
 
30369
    public void validate() throws TException {
30370
      // check for required fields
30371
    }
30372
 
30373
  }
30374
 
688 chandransh 30375
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
30376
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
578 chandransh 30377
 
30378
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
30379
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
30380
 
30381
    private boolean success;
30382
    private ShoppingCartException scex;
30383
 
30384
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30385
    public enum _Fields implements TFieldIdEnum {
30386
      SUCCESS((short)0, "success"),
30387
      SCEX((short)1, "scex");
30388
 
30389
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30390
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30391
 
30392
      static {
30393
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30394
          byId.put((int)field._thriftId, field);
30395
          byName.put(field.getFieldName(), field);
30396
        }
30397
      }
30398
 
30399
      /**
30400
       * Find the _Fields constant that matches fieldId, or null if its not found.
30401
       */
30402
      public static _Fields findByThriftId(int fieldId) {
30403
        return byId.get(fieldId);
30404
      }
30405
 
30406
      /**
30407
       * Find the _Fields constant that matches fieldId, throwing an exception
30408
       * if it is not found.
30409
       */
30410
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30411
        _Fields fields = findByThriftId(fieldId);
30412
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30413
        return fields;
30414
      }
30415
 
30416
      /**
30417
       * Find the _Fields constant that matches name, or null if its not found.
30418
       */
30419
      public static _Fields findByName(String name) {
30420
        return byName.get(name);
30421
      }
30422
 
30423
      private final short _thriftId;
30424
      private final String _fieldName;
30425
 
30426
      _Fields(short thriftId, String fieldName) {
30427
        _thriftId = thriftId;
30428
        _fieldName = fieldName;
30429
      }
30430
 
30431
      public short getThriftFieldId() {
30432
        return _thriftId;
30433
      }
30434
 
30435
      public String getFieldName() {
30436
        return _fieldName;
30437
      }
30438
    }
30439
 
30440
    // isset id assignments
30441
    private static final int __SUCCESS_ISSET_ID = 0;
30442
    private BitSet __isset_bit_vector = new BitSet(1);
30443
 
30444
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30445
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30446
          new FieldValueMetaData(TType.BOOL)));
30447
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
30448
          new FieldValueMetaData(TType.STRUCT)));
30449
    }});
30450
 
30451
    static {
688 chandransh 30452
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
578 chandransh 30453
    }
30454
 
688 chandransh 30455
    public checkOut_result() {
578 chandransh 30456
    }
30457
 
688 chandransh 30458
    public checkOut_result(
578 chandransh 30459
      boolean success,
30460
      ShoppingCartException scex)
30461
    {
30462
      this();
30463
      this.success = success;
30464
      setSuccessIsSet(true);
30465
      this.scex = scex;
30466
    }
30467
 
30468
    /**
30469
     * Performs a deep copy on <i>other</i>.
30470
     */
688 chandransh 30471
    public checkOut_result(checkOut_result other) {
578 chandransh 30472
      __isset_bit_vector.clear();
30473
      __isset_bit_vector.or(other.__isset_bit_vector);
30474
      this.success = other.success;
30475
      if (other.isSetScex()) {
30476
        this.scex = new ShoppingCartException(other.scex);
30477
      }
30478
    }
30479
 
688 chandransh 30480
    public checkOut_result deepCopy() {
30481
      return new checkOut_result(this);
578 chandransh 30482
    }
30483
 
30484
    @Deprecated
688 chandransh 30485
    public checkOut_result clone() {
30486
      return new checkOut_result(this);
578 chandransh 30487
    }
30488
 
30489
    public boolean isSuccess() {
30490
      return this.success;
30491
    }
30492
 
688 chandransh 30493
    public checkOut_result setSuccess(boolean success) {
578 chandransh 30494
      this.success = success;
30495
      setSuccessIsSet(true);
30496
      return this;
30497
    }
30498
 
30499
    public void unsetSuccess() {
30500
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
30501
    }
30502
 
30503
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30504
    public boolean isSetSuccess() {
30505
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
30506
    }
30507
 
30508
    public void setSuccessIsSet(boolean value) {
30509
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
30510
    }
30511
 
30512
    public ShoppingCartException getScex() {
30513
      return this.scex;
30514
    }
30515
 
688 chandransh 30516
    public checkOut_result setScex(ShoppingCartException scex) {
578 chandransh 30517
      this.scex = scex;
30518
      return this;
30519
    }
30520
 
30521
    public void unsetScex() {
30522
      this.scex = null;
30523
    }
30524
 
30525
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
30526
    public boolean isSetScex() {
30527
      return this.scex != null;
30528
    }
30529
 
30530
    public void setScexIsSet(boolean value) {
30531
      if (!value) {
30532
        this.scex = null;
30533
      }
30534
    }
30535
 
30536
    public void setFieldValue(_Fields field, Object value) {
30537
      switch (field) {
30538
      case SUCCESS:
30539
        if (value == null) {
30540
          unsetSuccess();
30541
        } else {
30542
          setSuccess((Boolean)value);
30543
        }
30544
        break;
30545
 
30546
      case SCEX:
30547
        if (value == null) {
30548
          unsetScex();
30549
        } else {
30550
          setScex((ShoppingCartException)value);
30551
        }
30552
        break;
30553
 
30554
      }
30555
    }
30556
 
30557
    public void setFieldValue(int fieldID, Object value) {
30558
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30559
    }
30560
 
30561
    public Object getFieldValue(_Fields field) {
30562
      switch (field) {
30563
      case SUCCESS:
30564
        return new Boolean(isSuccess());
30565
 
30566
      case SCEX:
30567
        return getScex();
30568
 
30569
      }
30570
      throw new IllegalStateException();
30571
    }
30572
 
30573
    public Object getFieldValue(int fieldId) {
30574
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30575
    }
30576
 
30577
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30578
    public boolean isSet(_Fields field) {
30579
      switch (field) {
30580
      case SUCCESS:
30581
        return isSetSuccess();
30582
      case SCEX:
30583
        return isSetScex();
30584
      }
30585
      throw new IllegalStateException();
30586
    }
30587
 
30588
    public boolean isSet(int fieldID) {
30589
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30590
    }
30591
 
30592
    @Override
30593
    public boolean equals(Object that) {
30594
      if (that == null)
30595
        return false;
688 chandransh 30596
      if (that instanceof checkOut_result)
30597
        return this.equals((checkOut_result)that);
578 chandransh 30598
      return false;
30599
    }
30600
 
688 chandransh 30601
    public boolean equals(checkOut_result that) {
578 chandransh 30602
      if (that == null)
30603
        return false;
30604
 
30605
      boolean this_present_success = true;
30606
      boolean that_present_success = true;
30607
      if (this_present_success || that_present_success) {
30608
        if (!(this_present_success && that_present_success))
30609
          return false;
30610
        if (this.success != that.success)
30611
          return false;
30612
      }
30613
 
30614
      boolean this_present_scex = true && this.isSetScex();
30615
      boolean that_present_scex = true && that.isSetScex();
30616
      if (this_present_scex || that_present_scex) {
30617
        if (!(this_present_scex && that_present_scex))
30618
          return false;
30619
        if (!this.scex.equals(that.scex))
30620
          return false;
30621
      }
30622
 
30623
      return true;
30624
    }
30625
 
30626
    @Override
30627
    public int hashCode() {
30628
      return 0;
30629
    }
30630
 
688 chandransh 30631
    public int compareTo(checkOut_result other) {
578 chandransh 30632
      if (!getClass().equals(other.getClass())) {
30633
        return getClass().getName().compareTo(other.getClass().getName());
30634
      }
30635
 
30636
      int lastComparison = 0;
688 chandransh 30637
      checkOut_result typedOther = (checkOut_result)other;
578 chandransh 30638
 
30639
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30640
      if (lastComparison != 0) {
30641
        return lastComparison;
30642
      }
30643
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30644
      if (lastComparison != 0) {
30645
        return lastComparison;
30646
      }
30647
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
30648
      if (lastComparison != 0) {
30649
        return lastComparison;
30650
      }
30651
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
30652
      if (lastComparison != 0) {
30653
        return lastComparison;
30654
      }
30655
      return 0;
30656
    }
30657
 
30658
    public void read(TProtocol iprot) throws TException {
30659
      TField field;
30660
      iprot.readStructBegin();
30661
      while (true)
30662
      {
30663
        field = iprot.readFieldBegin();
30664
        if (field.type == TType.STOP) { 
30665
          break;
30666
        }
30667
        _Fields fieldId = _Fields.findByThriftId(field.id);
30668
        if (fieldId == null) {
30669
          TProtocolUtil.skip(iprot, field.type);
30670
        } else {
30671
          switch (fieldId) {
30672
            case SUCCESS:
30673
              if (field.type == TType.BOOL) {
30674
                this.success = iprot.readBool();
30675
                setSuccessIsSet(true);
30676
              } else { 
30677
                TProtocolUtil.skip(iprot, field.type);
30678
              }
30679
              break;
30680
            case SCEX:
30681
              if (field.type == TType.STRUCT) {
30682
                this.scex = new ShoppingCartException();
30683
                this.scex.read(iprot);
30684
              } else { 
30685
                TProtocolUtil.skip(iprot, field.type);
30686
              }
30687
              break;
30688
          }
30689
          iprot.readFieldEnd();
30690
        }
30691
      }
30692
      iprot.readStructEnd();
30693
      validate();
30694
    }
30695
 
30696
    public void write(TProtocol oprot) throws TException {
30697
      oprot.writeStructBegin(STRUCT_DESC);
30698
 
30699
      if (this.isSetSuccess()) {
30700
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30701
        oprot.writeBool(this.success);
30702
        oprot.writeFieldEnd();
30703
      } else if (this.isSetScex()) {
30704
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
30705
        this.scex.write(oprot);
30706
        oprot.writeFieldEnd();
30707
      }
30708
      oprot.writeFieldStop();
30709
      oprot.writeStructEnd();
30710
    }
30711
 
30712
    @Override
30713
    public String toString() {
688 chandransh 30714
      StringBuilder sb = new StringBuilder("checkOut_result(");
578 chandransh 30715
      boolean first = true;
30716
 
30717
      sb.append("success:");
30718
      sb.append(this.success);
30719
      first = false;
30720
      if (!first) sb.append(", ");
30721
      sb.append("scex:");
30722
      if (this.scex == null) {
30723
        sb.append("null");
30724
      } else {
30725
        sb.append(this.scex);
30726
      }
30727
      first = false;
30728
      sb.append(")");
30729
      return sb.toString();
30730
    }
30731
 
30732
    public void validate() throws TException {
30733
      // check for required fields
30734
    }
30735
 
30736
  }
30737
 
688 chandransh 30738
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
30739
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
553 chandransh 30740
 
688 chandransh 30741
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
30742
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
553 chandransh 30743
 
688 chandransh 30744
    private long cartId;
708 rajveer 30745
    private Map<Long,Double> items;
553 chandransh 30746
 
30747
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30748
    public enum _Fields implements TFieldIdEnum {
688 chandransh 30749
      CART_ID((short)1, "cartId"),
30750
      ITEMS((short)2, "items");
553 chandransh 30751
 
30752
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30753
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30754
 
30755
      static {
30756
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30757
          byId.put((int)field._thriftId, field);
30758
          byName.put(field.getFieldName(), field);
30759
        }
30760
      }
30761
 
30762
      /**
30763
       * Find the _Fields constant that matches fieldId, or null if its not found.
30764
       */
30765
      public static _Fields findByThriftId(int fieldId) {
30766
        return byId.get(fieldId);
30767
      }
30768
 
30769
      /**
30770
       * Find the _Fields constant that matches fieldId, throwing an exception
30771
       * if it is not found.
30772
       */
30773
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30774
        _Fields fields = findByThriftId(fieldId);
30775
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30776
        return fields;
30777
      }
30778
 
30779
      /**
30780
       * Find the _Fields constant that matches name, or null if its not found.
30781
       */
30782
      public static _Fields findByName(String name) {
30783
        return byName.get(name);
30784
      }
30785
 
30786
      private final short _thriftId;
30787
      private final String _fieldName;
30788
 
30789
      _Fields(short thriftId, String fieldName) {
30790
        _thriftId = thriftId;
30791
        _fieldName = fieldName;
30792
      }
30793
 
30794
      public short getThriftFieldId() {
30795
        return _thriftId;
30796
      }
30797
 
30798
      public String getFieldName() {
30799
        return _fieldName;
30800
      }
30801
    }
30802
 
30803
    // isset id assignments
688 chandransh 30804
    private static final int __CARTID_ISSET_ID = 0;
30805
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 30806
 
30807
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 30808
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
553 chandransh 30809
          new FieldValueMetaData(TType.I64)));
688 chandransh 30810
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
30811
          new MapMetaData(TType.MAP, 
30812
              new FieldValueMetaData(TType.I64), 
708 rajveer 30813
              new FieldValueMetaData(TType.DOUBLE))));
553 chandransh 30814
    }});
30815
 
30816
    static {
688 chandransh 30817
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
553 chandransh 30818
    }
30819
 
688 chandransh 30820
    public resetCart_args() {
553 chandransh 30821
    }
30822
 
688 chandransh 30823
    public resetCart_args(
30824
      long cartId,
708 rajveer 30825
      Map<Long,Double> items)
553 chandransh 30826
    {
30827
      this();
688 chandransh 30828
      this.cartId = cartId;
30829
      setCartIdIsSet(true);
30830
      this.items = items;
553 chandransh 30831
    }
30832
 
30833
    /**
30834
     * Performs a deep copy on <i>other</i>.
30835
     */
688 chandransh 30836
    public resetCart_args(resetCart_args other) {
553 chandransh 30837
      __isset_bit_vector.clear();
30838
      __isset_bit_vector.or(other.__isset_bit_vector);
688 chandransh 30839
      this.cartId = other.cartId;
30840
      if (other.isSetItems()) {
708 rajveer 30841
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
30842
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {
688 chandransh 30843
 
30844
          Long other_element_key = other_element.getKey();
708 rajveer 30845
          Double other_element_value = other_element.getValue();
688 chandransh 30846
 
30847
          Long __this__items_copy_key = other_element_key;
30848
 
708 rajveer 30849
          Double __this__items_copy_value = other_element_value;
688 chandransh 30850
 
30851
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
30852
        }
30853
        this.items = __this__items;
30854
      }
553 chandransh 30855
    }
30856
 
688 chandransh 30857
    public resetCart_args deepCopy() {
30858
      return new resetCart_args(this);
553 chandransh 30859
    }
30860
 
30861
    @Deprecated
688 chandransh 30862
    public resetCart_args clone() {
30863
      return new resetCart_args(this);
553 chandransh 30864
    }
30865
 
688 chandransh 30866
    public long getCartId() {
30867
      return this.cartId;
553 chandransh 30868
    }
30869
 
688 chandransh 30870
    public resetCart_args setCartId(long cartId) {
30871
      this.cartId = cartId;
30872
      setCartIdIsSet(true);
48 ashish 30873
      return this;
30874
    }
30875
 
688 chandransh 30876
    public void unsetCartId() {
30877
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 30878
    }
30879
 
688 chandransh 30880
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
30881
    public boolean isSetCartId() {
30882
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 30883
    }
30884
 
688 chandransh 30885
    public void setCartIdIsSet(boolean value) {
30886
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 30887
    }
30888
 
688 chandransh 30889
    public int getItemsSize() {
30890
      return (this.items == null) ? 0 : this.items.size();
553 chandransh 30891
    }
30892
 
708 rajveer 30893
    public void putToItems(long key, double val) {
688 chandransh 30894
      if (this.items == null) {
708 rajveer 30895
        this.items = new HashMap<Long,Double>();
688 chandransh 30896
      }
30897
      this.items.put(key, val);
30898
    }
30899
 
708 rajveer 30900
    public Map<Long,Double> getItems() {
688 chandransh 30901
      return this.items;
30902
    }
30903
 
708 rajveer 30904
    public resetCart_args setItems(Map<Long,Double> items) {
688 chandransh 30905
      this.items = items;
553 chandransh 30906
      return this;
30907
    }
30908
 
688 chandransh 30909
    public void unsetItems() {
30910
      this.items = null;
553 chandransh 30911
    }
30912
 
688 chandransh 30913
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
30914
    public boolean isSetItems() {
30915
      return this.items != null;
553 chandransh 30916
    }
30917
 
688 chandransh 30918
    public void setItemsIsSet(boolean value) {
30919
      if (!value) {
30920
        this.items = null;
30921
      }
553 chandransh 30922
    }
30923
 
30924
    public void setFieldValue(_Fields field, Object value) {
30925
      switch (field) {
688 chandransh 30926
      case CART_ID:
553 chandransh 30927
        if (value == null) {
688 chandransh 30928
          unsetCartId();
553 chandransh 30929
        } else {
688 chandransh 30930
          setCartId((Long)value);
553 chandransh 30931
        }
30932
        break;
30933
 
688 chandransh 30934
      case ITEMS:
553 chandransh 30935
        if (value == null) {
688 chandransh 30936
          unsetItems();
553 chandransh 30937
        } else {
708 rajveer 30938
          setItems((Map<Long,Double>)value);
553 chandransh 30939
        }
30940
        break;
30941
 
30942
      }
30943
    }
30944
 
30945
    public void setFieldValue(int fieldID, Object value) {
30946
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30947
    }
30948
 
30949
    public Object getFieldValue(_Fields field) {
30950
      switch (field) {
688 chandransh 30951
      case CART_ID:
30952
        return new Long(getCartId());
553 chandransh 30953
 
688 chandransh 30954
      case ITEMS:
30955
        return getItems();
553 chandransh 30956
 
30957
      }
30958
      throw new IllegalStateException();
30959
    }
30960
 
30961
    public Object getFieldValue(int fieldId) {
30962
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30963
    }
30964
 
30965
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30966
    public boolean isSet(_Fields field) {
30967
      switch (field) {
688 chandransh 30968
      case CART_ID:
30969
        return isSetCartId();
30970
      case ITEMS:
30971
        return isSetItems();
553 chandransh 30972
      }
30973
      throw new IllegalStateException();
30974
    }
30975
 
30976
    public boolean isSet(int fieldID) {
30977
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30978
    }
30979
 
30980
    @Override
30981
    public boolean equals(Object that) {
30982
      if (that == null)
30983
        return false;
688 chandransh 30984
      if (that instanceof resetCart_args)
30985
        return this.equals((resetCart_args)that);
553 chandransh 30986
      return false;
30987
    }
30988
 
688 chandransh 30989
    public boolean equals(resetCart_args that) {
553 chandransh 30990
      if (that == null)
30991
        return false;
30992
 
688 chandransh 30993
      boolean this_present_cartId = true;
30994
      boolean that_present_cartId = true;
30995
      if (this_present_cartId || that_present_cartId) {
30996
        if (!(this_present_cartId && that_present_cartId))
553 chandransh 30997
          return false;
688 chandransh 30998
        if (this.cartId != that.cartId)
553 chandransh 30999
          return false;
31000
      }
31001
 
688 chandransh 31002
      boolean this_present_items = true && this.isSetItems();
31003
      boolean that_present_items = true && that.isSetItems();
31004
      if (this_present_items || that_present_items) {
31005
        if (!(this_present_items && that_present_items))
553 chandransh 31006
          return false;
688 chandransh 31007
        if (!this.items.equals(that.items))
553 chandransh 31008
          return false;
31009
      }
31010
 
31011
      return true;
31012
    }
31013
 
31014
    @Override
31015
    public int hashCode() {
31016
      return 0;
31017
    }
31018
 
31019
    public void read(TProtocol iprot) throws TException {
31020
      TField field;
31021
      iprot.readStructBegin();
31022
      while (true)
31023
      {
31024
        field = iprot.readFieldBegin();
31025
        if (field.type == TType.STOP) { 
31026
          break;
31027
        }
31028
        _Fields fieldId = _Fields.findByThriftId(field.id);
31029
        if (fieldId == null) {
31030
          TProtocolUtil.skip(iprot, field.type);
31031
        } else {
31032
          switch (fieldId) {
688 chandransh 31033
            case CART_ID:
553 chandransh 31034
              if (field.type == TType.I64) {
688 chandransh 31035
                this.cartId = iprot.readI64();
31036
                setCartIdIsSet(true);
553 chandransh 31037
              } else { 
31038
                TProtocolUtil.skip(iprot, field.type);
31039
              }
31040
              break;
688 chandransh 31041
            case ITEMS:
31042
              if (field.type == TType.MAP) {
31043
                {
1590 varun.gupt 31044
                  TMap _map40 = iprot.readMapBegin();
31045
                  this.items = new HashMap<Long,Double>(2*_map40.size);
31046
                  for (int _i41 = 0; _i41 < _map40.size; ++_i41)
688 chandransh 31047
                  {
1590 varun.gupt 31048
                    long _key42;
31049
                    double _val43;
31050
                    _key42 = iprot.readI64();
31051
                    _val43 = iprot.readDouble();
31052
                    this.items.put(_key42, _val43);
688 chandransh 31053
                  }
31054
                  iprot.readMapEnd();
31055
                }
553 chandransh 31056
              } else { 
31057
                TProtocolUtil.skip(iprot, field.type);
31058
              }
31059
              break;
31060
          }
31061
          iprot.readFieldEnd();
31062
        }
31063
      }
31064
      iprot.readStructEnd();
31065
      validate();
31066
    }
31067
 
31068
    public void write(TProtocol oprot) throws TException {
31069
      validate();
31070
 
31071
      oprot.writeStructBegin(STRUCT_DESC);
688 chandransh 31072
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
31073
      oprot.writeI64(this.cartId);
553 chandransh 31074
      oprot.writeFieldEnd();
688 chandransh 31075
      if (this.items != null) {
31076
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
31077
        {
708 rajveer 31078
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
1590 varun.gupt 31079
          for (Map.Entry<Long, Double> _iter44 : this.items.entrySet())
688 chandransh 31080
          {
1590 varun.gupt 31081
            oprot.writeI64(_iter44.getKey());
31082
            oprot.writeDouble(_iter44.getValue());
688 chandransh 31083
          }
31084
          oprot.writeMapEnd();
31085
        }
31086
        oprot.writeFieldEnd();
31087
      }
553 chandransh 31088
      oprot.writeFieldStop();
31089
      oprot.writeStructEnd();
31090
    }
31091
 
31092
    @Override
31093
    public String toString() {
688 chandransh 31094
      StringBuilder sb = new StringBuilder("resetCart_args(");
553 chandransh 31095
      boolean first = true;
31096
 
688 chandransh 31097
      sb.append("cartId:");
31098
      sb.append(this.cartId);
553 chandransh 31099
      first = false;
31100
      if (!first) sb.append(", ");
688 chandransh 31101
      sb.append("items:");
31102
      if (this.items == null) {
31103
        sb.append("null");
31104
      } else {
31105
        sb.append(this.items);
31106
      }
553 chandransh 31107
      first = false;
31108
      sb.append(")");
31109
      return sb.toString();
31110
    }
31111
 
31112
    public void validate() throws TException {
31113
      // check for required fields
31114
    }
31115
 
31116
  }
31117
 
688 chandransh 31118
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
31119
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
553 chandransh 31120
 
688 chandransh 31121
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
31122
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
553 chandransh 31123
 
688 chandransh 31124
    private boolean success;
31125
    private ShoppingCartException scex;
553 chandransh 31126
 
31127
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31128
    public enum _Fields implements TFieldIdEnum {
688 chandransh 31129
      SUCCESS((short)0, "success"),
31130
      SCEX((short)1, "scex");
553 chandransh 31131
 
31132
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31133
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31134
 
31135
      static {
31136
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31137
          byId.put((int)field._thriftId, field);
31138
          byName.put(field.getFieldName(), field);
31139
        }
31140
      }
31141
 
31142
      /**
31143
       * Find the _Fields constant that matches fieldId, or null if its not found.
31144
       */
31145
      public static _Fields findByThriftId(int fieldId) {
31146
        return byId.get(fieldId);
31147
      }
31148
 
31149
      /**
31150
       * Find the _Fields constant that matches fieldId, throwing an exception
31151
       * if it is not found.
31152
       */
31153
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31154
        _Fields fields = findByThriftId(fieldId);
31155
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31156
        return fields;
31157
      }
31158
 
31159
      /**
31160
       * Find the _Fields constant that matches name, or null if its not found.
31161
       */
31162
      public static _Fields findByName(String name) {
31163
        return byName.get(name);
31164
      }
31165
 
31166
      private final short _thriftId;
31167
      private final String _fieldName;
31168
 
31169
      _Fields(short thriftId, String fieldName) {
31170
        _thriftId = thriftId;
31171
        _fieldName = fieldName;
31172
      }
31173
 
31174
      public short getThriftFieldId() {
31175
        return _thriftId;
31176
      }
31177
 
31178
      public String getFieldName() {
31179
        return _fieldName;
31180
      }
31181
    }
688 chandransh 31182
 
31183
    // isset id assignments
31184
    private static final int __SUCCESS_ISSET_ID = 0;
31185
    private BitSet __isset_bit_vector = new BitSet(1);
31186
 
553 chandransh 31187
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 31188
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31189
          new FieldValueMetaData(TType.BOOL)));
31190
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
31191
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 31192
    }});
31193
 
31194
    static {
688 chandransh 31195
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
553 chandransh 31196
    }
31197
 
688 chandransh 31198
    public resetCart_result() {
553 chandransh 31199
    }
31200
 
688 chandransh 31201
    public resetCart_result(
31202
      boolean success,
31203
      ShoppingCartException scex)
31204
    {
31205
      this();
31206
      this.success = success;
31207
      setSuccessIsSet(true);
31208
      this.scex = scex;
31209
    }
31210
 
553 chandransh 31211
    /**
31212
     * Performs a deep copy on <i>other</i>.
31213
     */
688 chandransh 31214
    public resetCart_result(resetCart_result other) {
31215
      __isset_bit_vector.clear();
31216
      __isset_bit_vector.or(other.__isset_bit_vector);
31217
      this.success = other.success;
31218
      if (other.isSetScex()) {
31219
        this.scex = new ShoppingCartException(other.scex);
31220
      }
553 chandransh 31221
    }
31222
 
688 chandransh 31223
    public resetCart_result deepCopy() {
31224
      return new resetCart_result(this);
553 chandransh 31225
    }
31226
 
31227
    @Deprecated
688 chandransh 31228
    public resetCart_result clone() {
31229
      return new resetCart_result(this);
553 chandransh 31230
    }
31231
 
688 chandransh 31232
    public boolean isSuccess() {
31233
      return this.success;
31234
    }
31235
 
31236
    public resetCart_result setSuccess(boolean success) {
31237
      this.success = success;
31238
      setSuccessIsSet(true);
31239
      return this;
31240
    }
31241
 
31242
    public void unsetSuccess() {
31243
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
31244
    }
31245
 
31246
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31247
    public boolean isSetSuccess() {
31248
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
31249
    }
31250
 
31251
    public void setSuccessIsSet(boolean value) {
31252
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
31253
    }
31254
 
31255
    public ShoppingCartException getScex() {
31256
      return this.scex;
31257
    }
31258
 
31259
    public resetCart_result setScex(ShoppingCartException scex) {
31260
      this.scex = scex;
31261
      return this;
31262
    }
31263
 
31264
    public void unsetScex() {
31265
      this.scex = null;
31266
    }
31267
 
31268
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
31269
    public boolean isSetScex() {
31270
      return this.scex != null;
31271
    }
31272
 
31273
    public void setScexIsSet(boolean value) {
31274
      if (!value) {
31275
        this.scex = null;
31276
      }
31277
    }
31278
 
553 chandransh 31279
    public void setFieldValue(_Fields field, Object value) {
31280
      switch (field) {
688 chandransh 31281
      case SUCCESS:
31282
        if (value == null) {
31283
          unsetSuccess();
31284
        } else {
31285
          setSuccess((Boolean)value);
31286
        }
31287
        break;
31288
 
31289
      case SCEX:
31290
        if (value == null) {
31291
          unsetScex();
31292
        } else {
31293
          setScex((ShoppingCartException)value);
31294
        }
31295
        break;
31296
 
553 chandransh 31297
      }
31298
    }
31299
 
31300
    public void setFieldValue(int fieldID, Object value) {
31301
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31302
    }
31303
 
31304
    public Object getFieldValue(_Fields field) {
31305
      switch (field) {
688 chandransh 31306
      case SUCCESS:
31307
        return new Boolean(isSuccess());
31308
 
31309
      case SCEX:
31310
        return getScex();
31311
 
553 chandransh 31312
      }
31313
      throw new IllegalStateException();
31314
    }
31315
 
31316
    public Object getFieldValue(int fieldId) {
31317
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31318
    }
31319
 
31320
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31321
    public boolean isSet(_Fields field) {
31322
      switch (field) {
688 chandransh 31323
      case SUCCESS:
31324
        return isSetSuccess();
31325
      case SCEX:
31326
        return isSetScex();
553 chandransh 31327
      }
31328
      throw new IllegalStateException();
31329
    }
31330
 
31331
    public boolean isSet(int fieldID) {
31332
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31333
    }
31334
 
31335
    @Override
31336
    public boolean equals(Object that) {
31337
      if (that == null)
31338
        return false;
688 chandransh 31339
      if (that instanceof resetCart_result)
31340
        return this.equals((resetCart_result)that);
553 chandransh 31341
      return false;
31342
    }
31343
 
688 chandransh 31344
    public boolean equals(resetCart_result that) {
553 chandransh 31345
      if (that == null)
31346
        return false;
31347
 
688 chandransh 31348
      boolean this_present_success = true;
31349
      boolean that_present_success = true;
31350
      if (this_present_success || that_present_success) {
31351
        if (!(this_present_success && that_present_success))
31352
          return false;
31353
        if (this.success != that.success)
31354
          return false;
31355
      }
31356
 
31357
      boolean this_present_scex = true && this.isSetScex();
31358
      boolean that_present_scex = true && that.isSetScex();
31359
      if (this_present_scex || that_present_scex) {
31360
        if (!(this_present_scex && that_present_scex))
31361
          return false;
31362
        if (!this.scex.equals(that.scex))
31363
          return false;
31364
      }
31365
 
553 chandransh 31366
      return true;
31367
    }
31368
 
31369
    @Override
31370
    public int hashCode() {
31371
      return 0;
31372
    }
31373
 
688 chandransh 31374
    public int compareTo(resetCart_result other) {
553 chandransh 31375
      if (!getClass().equals(other.getClass())) {
31376
        return getClass().getName().compareTo(other.getClass().getName());
31377
      }
31378
 
31379
      int lastComparison = 0;
688 chandransh 31380
      resetCart_result typedOther = (resetCart_result)other;
553 chandransh 31381
 
688 chandransh 31382
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31383
      if (lastComparison != 0) {
31384
        return lastComparison;
31385
      }
31386
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31387
      if (lastComparison != 0) {
31388
        return lastComparison;
31389
      }
31390
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
31391
      if (lastComparison != 0) {
31392
        return lastComparison;
31393
      }
31394
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
31395
      if (lastComparison != 0) {
31396
        return lastComparison;
31397
      }
553 chandransh 31398
      return 0;
31399
    }
31400
 
31401
    public void read(TProtocol iprot) throws TException {
31402
      TField field;
31403
      iprot.readStructBegin();
31404
      while (true)
31405
      {
31406
        field = iprot.readFieldBegin();
31407
        if (field.type == TType.STOP) { 
31408
          break;
31409
        }
31410
        _Fields fieldId = _Fields.findByThriftId(field.id);
31411
        if (fieldId == null) {
31412
          TProtocolUtil.skip(iprot, field.type);
31413
        } else {
31414
          switch (fieldId) {
688 chandransh 31415
            case SUCCESS:
31416
              if (field.type == TType.BOOL) {
31417
                this.success = iprot.readBool();
31418
                setSuccessIsSet(true);
31419
              } else { 
31420
                TProtocolUtil.skip(iprot, field.type);
31421
              }
31422
              break;
31423
            case SCEX:
31424
              if (field.type == TType.STRUCT) {
31425
                this.scex = new ShoppingCartException();
31426
                this.scex.read(iprot);
31427
              } else { 
31428
                TProtocolUtil.skip(iprot, field.type);
31429
              }
31430
              break;
553 chandransh 31431
          }
31432
          iprot.readFieldEnd();
31433
        }
31434
      }
31435
      iprot.readStructEnd();
31436
      validate();
31437
    }
31438
 
31439
    public void write(TProtocol oprot) throws TException {
31440
      oprot.writeStructBegin(STRUCT_DESC);
31441
 
688 chandransh 31442
      if (this.isSetSuccess()) {
31443
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31444
        oprot.writeBool(this.success);
31445
        oprot.writeFieldEnd();
31446
      } else if (this.isSetScex()) {
31447
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
31448
        this.scex.write(oprot);
31449
        oprot.writeFieldEnd();
31450
      }
553 chandransh 31451
      oprot.writeFieldStop();
31452
      oprot.writeStructEnd();
31453
    }
31454
 
31455
    @Override
31456
    public String toString() {
688 chandransh 31457
      StringBuilder sb = new StringBuilder("resetCart_result(");
553 chandransh 31458
      boolean first = true;
31459
 
688 chandransh 31460
      sb.append("success:");
31461
      sb.append(this.success);
31462
      first = false;
31463
      if (!first) sb.append(", ");
31464
      sb.append("scex:");
31465
      if (this.scex == null) {
31466
        sb.append("null");
31467
      } else {
31468
        sb.append(this.scex);
31469
      }
31470
      first = false;
553 chandransh 31471
      sb.append(")");
31472
      return sb.toString();
31473
    }
31474
 
31475
    public void validate() throws TException {
31476
      // check for required fields
31477
    }
31478
 
31479
  }
31480
 
771 rajveer 31481
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
31482
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
553 chandransh 31483
 
771 rajveer 31484
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 31485
 
31486
    private long userId;
31487
 
31488
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31489
    public enum _Fields implements TFieldIdEnum {
771 rajveer 31490
      USER_ID((short)1, "userId");
553 chandransh 31491
 
31492
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31493
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31494
 
31495
      static {
31496
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31497
          byId.put((int)field._thriftId, field);
31498
          byName.put(field.getFieldName(), field);
31499
        }
31500
      }
31501
 
31502
      /**
31503
       * Find the _Fields constant that matches fieldId, or null if its not found.
31504
       */
31505
      public static _Fields findByThriftId(int fieldId) {
31506
        return byId.get(fieldId);
31507
      }
31508
 
31509
      /**
31510
       * Find the _Fields constant that matches fieldId, throwing an exception
31511
       * if it is not found.
31512
       */
31513
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31514
        _Fields fields = findByThriftId(fieldId);
31515
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31516
        return fields;
31517
      }
31518
 
31519
      /**
31520
       * Find the _Fields constant that matches name, or null if its not found.
31521
       */
31522
      public static _Fields findByName(String name) {
31523
        return byName.get(name);
31524
      }
31525
 
31526
      private final short _thriftId;
31527
      private final String _fieldName;
31528
 
31529
      _Fields(short thriftId, String fieldName) {
31530
        _thriftId = thriftId;
31531
        _fieldName = fieldName;
31532
      }
31533
 
31534
      public short getThriftFieldId() {
31535
        return _thriftId;
31536
      }
31537
 
31538
      public String getFieldName() {
31539
        return _fieldName;
31540
      }
31541
    }
31542
 
31543
    // isset id assignments
31544
    private static final int __USERID_ISSET_ID = 0;
771 rajveer 31545
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 31546
 
31547
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31548
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
31549
          new FieldValueMetaData(TType.I64)));
31550
    }});
31551
 
31552
    static {
771 rajveer 31553
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
553 chandransh 31554
    }
31555
 
771 rajveer 31556
    public getMyResearch_args() {
553 chandransh 31557
    }
31558
 
771 rajveer 31559
    public getMyResearch_args(
31560
      long userId)
553 chandransh 31561
    {
31562
      this();
31563
      this.userId = userId;
31564
      setUserIdIsSet(true);
31565
    }
31566
 
31567
    /**
31568
     * Performs a deep copy on <i>other</i>.
31569
     */
771 rajveer 31570
    public getMyResearch_args(getMyResearch_args other) {
553 chandransh 31571
      __isset_bit_vector.clear();
31572
      __isset_bit_vector.or(other.__isset_bit_vector);
31573
      this.userId = other.userId;
31574
    }
31575
 
771 rajveer 31576
    public getMyResearch_args deepCopy() {
31577
      return new getMyResearch_args(this);
553 chandransh 31578
    }
31579
 
31580
    @Deprecated
771 rajveer 31581
    public getMyResearch_args clone() {
31582
      return new getMyResearch_args(this);
553 chandransh 31583
    }
31584
 
31585
    public long getUserId() {
31586
      return this.userId;
31587
    }
31588
 
771 rajveer 31589
    public getMyResearch_args setUserId(long userId) {
553 chandransh 31590
      this.userId = userId;
31591
      setUserIdIsSet(true);
31592
      return this;
31593
    }
31594
 
31595
    public void unsetUserId() {
31596
      __isset_bit_vector.clear(__USERID_ISSET_ID);
31597
    }
31598
 
31599
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
31600
    public boolean isSetUserId() {
31601
      return __isset_bit_vector.get(__USERID_ISSET_ID);
31602
    }
31603
 
31604
    public void setUserIdIsSet(boolean value) {
31605
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
31606
    }
31607
 
48 ashish 31608
    public void setFieldValue(_Fields field, Object value) {
31609
      switch (field) {
553 chandransh 31610
      case USER_ID:
48 ashish 31611
        if (value == null) {
553 chandransh 31612
          unsetUserId();
48 ashish 31613
        } else {
553 chandransh 31614
          setUserId((Long)value);
48 ashish 31615
        }
31616
        break;
31617
 
31618
      }
31619
    }
31620
 
31621
    public void setFieldValue(int fieldID, Object value) {
31622
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31623
    }
31624
 
31625
    public Object getFieldValue(_Fields field) {
31626
      switch (field) {
553 chandransh 31627
      case USER_ID:
31628
        return new Long(getUserId());
48 ashish 31629
 
31630
      }
31631
      throw new IllegalStateException();
31632
    }
31633
 
31634
    public Object getFieldValue(int fieldId) {
31635
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31636
    }
31637
 
31638
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31639
    public boolean isSet(_Fields field) {
31640
      switch (field) {
553 chandransh 31641
      case USER_ID:
31642
        return isSetUserId();
48 ashish 31643
      }
31644
      throw new IllegalStateException();
31645
    }
31646
 
31647
    public boolean isSet(int fieldID) {
31648
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31649
    }
31650
 
31651
    @Override
31652
    public boolean equals(Object that) {
31653
      if (that == null)
31654
        return false;
771 rajveer 31655
      if (that instanceof getMyResearch_args)
31656
        return this.equals((getMyResearch_args)that);
48 ashish 31657
      return false;
31658
    }
31659
 
771 rajveer 31660
    public boolean equals(getMyResearch_args that) {
48 ashish 31661
      if (that == null)
31662
        return false;
31663
 
553 chandransh 31664
      boolean this_present_userId = true;
31665
      boolean that_present_userId = true;
31666
      if (this_present_userId || that_present_userId) {
31667
        if (!(this_present_userId && that_present_userId))
48 ashish 31668
          return false;
553 chandransh 31669
        if (this.userId != that.userId)
48 ashish 31670
          return false;
31671
      }
31672
 
31673
      return true;
31674
    }
31675
 
31676
    @Override
31677
    public int hashCode() {
31678
      return 0;
31679
    }
31680
 
771 rajveer 31681
    public int compareTo(getMyResearch_args other) {
48 ashish 31682
      if (!getClass().equals(other.getClass())) {
31683
        return getClass().getName().compareTo(other.getClass().getName());
31684
      }
31685
 
31686
      int lastComparison = 0;
771 rajveer 31687
      getMyResearch_args typedOther = (getMyResearch_args)other;
48 ashish 31688
 
553 chandransh 31689
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 31690
      if (lastComparison != 0) {
31691
        return lastComparison;
31692
      }
553 chandransh 31693
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 31694
      if (lastComparison != 0) {
31695
        return lastComparison;
31696
      }
31697
      return 0;
31698
    }
31699
 
31700
    public void read(TProtocol iprot) throws TException {
31701
      TField field;
31702
      iprot.readStructBegin();
31703
      while (true)
31704
      {
31705
        field = iprot.readFieldBegin();
31706
        if (field.type == TType.STOP) { 
31707
          break;
31708
        }
31709
        _Fields fieldId = _Fields.findByThriftId(field.id);
31710
        if (fieldId == null) {
31711
          TProtocolUtil.skip(iprot, field.type);
31712
        } else {
31713
          switch (fieldId) {
553 chandransh 31714
            case USER_ID:
31715
              if (field.type == TType.I64) {
31716
                this.userId = iprot.readI64();
31717
                setUserIdIsSet(true);
48 ashish 31718
              } else { 
31719
                TProtocolUtil.skip(iprot, field.type);
31720
              }
31721
              break;
31722
          }
31723
          iprot.readFieldEnd();
31724
        }
31725
      }
31726
      iprot.readStructEnd();
31727
      validate();
31728
    }
31729
 
31730
    public void write(TProtocol oprot) throws TException {
31731
      validate();
31732
 
31733
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 31734
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
31735
      oprot.writeI64(this.userId);
31736
      oprot.writeFieldEnd();
31737
      oprot.writeFieldStop();
31738
      oprot.writeStructEnd();
31739
    }
31740
 
31741
    @Override
31742
    public String toString() {
771 rajveer 31743
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
553 chandransh 31744
      boolean first = true;
31745
 
31746
      sb.append("userId:");
31747
      sb.append(this.userId);
31748
      first = false;
31749
      sb.append(")");
31750
      return sb.toString();
31751
    }
31752
 
31753
    public void validate() throws TException {
31754
      // check for required fields
31755
    }
31756
 
31757
  }
31758
 
31759
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
31760
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
31761
 
31762
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
31763
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
31764
 
31765
    private Widget success;
31766
    private WidgetException scx;
31767
 
31768
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31769
    public enum _Fields implements TFieldIdEnum {
31770
      SUCCESS((short)0, "success"),
31771
      SCX((short)1, "scx");
31772
 
31773
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31774
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31775
 
31776
      static {
31777
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31778
          byId.put((int)field._thriftId, field);
31779
          byName.put(field.getFieldName(), field);
31780
        }
31781
      }
31782
 
31783
      /**
31784
       * Find the _Fields constant that matches fieldId, or null if its not found.
31785
       */
31786
      public static _Fields findByThriftId(int fieldId) {
31787
        return byId.get(fieldId);
31788
      }
31789
 
31790
      /**
31791
       * Find the _Fields constant that matches fieldId, throwing an exception
31792
       * if it is not found.
31793
       */
31794
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31795
        _Fields fields = findByThriftId(fieldId);
31796
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31797
        return fields;
31798
      }
31799
 
31800
      /**
31801
       * Find the _Fields constant that matches name, or null if its not found.
31802
       */
31803
      public static _Fields findByName(String name) {
31804
        return byName.get(name);
31805
      }
31806
 
31807
      private final short _thriftId;
31808
      private final String _fieldName;
31809
 
31810
      _Fields(short thriftId, String fieldName) {
31811
        _thriftId = thriftId;
31812
        _fieldName = fieldName;
31813
      }
31814
 
31815
      public short getThriftFieldId() {
31816
        return _thriftId;
31817
      }
31818
 
31819
      public String getFieldName() {
31820
        return _fieldName;
31821
      }
31822
    }
31823
 
31824
    // isset id assignments
31825
 
31826
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 31827
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 31828
          new StructMetaData(TType.STRUCT, Widget.class)));
31829
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 31830
          new FieldValueMetaData(TType.STRUCT)));
31831
    }});
31832
 
31833
    static {
553 chandransh 31834
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 31835
    }
31836
 
553 chandransh 31837
    public getMyResearch_result() {
48 ashish 31838
    }
31839
 
553 chandransh 31840
    public getMyResearch_result(
31841
      Widget success,
31842
      WidgetException scx)
48 ashish 31843
    {
31844
      this();
31845
      this.success = success;
553 chandransh 31846
      this.scx = scx;
48 ashish 31847
    }
31848
 
31849
    /**
31850
     * Performs a deep copy on <i>other</i>.
31851
     */
553 chandransh 31852
    public getMyResearch_result(getMyResearch_result other) {
31853
      if (other.isSetSuccess()) {
31854
        this.success = new Widget(other.success);
48 ashish 31855
      }
553 chandransh 31856
      if (other.isSetScx()) {
31857
        this.scx = new WidgetException(other.scx);
31858
      }
48 ashish 31859
    }
31860
 
553 chandransh 31861
    public getMyResearch_result deepCopy() {
31862
      return new getMyResearch_result(this);
48 ashish 31863
    }
31864
 
31865
    @Deprecated
553 chandransh 31866
    public getMyResearch_result clone() {
31867
      return new getMyResearch_result(this);
48 ashish 31868
    }
31869
 
553 chandransh 31870
    public Widget getSuccess() {
48 ashish 31871
      return this.success;
31872
    }
31873
 
553 chandransh 31874
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 31875
      this.success = success;
31876
      return this;
31877
    }
31878
 
31879
    public void unsetSuccess() {
553 chandransh 31880
      this.success = null;
48 ashish 31881
    }
31882
 
31883
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31884
    public boolean isSetSuccess() {
553 chandransh 31885
      return this.success != null;
48 ashish 31886
    }
31887
 
31888
    public void setSuccessIsSet(boolean value) {
553 chandransh 31889
      if (!value) {
31890
        this.success = null;
31891
      }
48 ashish 31892
    }
31893
 
553 chandransh 31894
    public WidgetException getScx() {
31895
      return this.scx;
48 ashish 31896
    }
31897
 
553 chandransh 31898
    public getMyResearch_result setScx(WidgetException scx) {
31899
      this.scx = scx;
48 ashish 31900
      return this;
31901
    }
31902
 
553 chandransh 31903
    public void unsetScx() {
31904
      this.scx = null;
48 ashish 31905
    }
31906
 
553 chandransh 31907
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
31908
    public boolean isSetScx() {
31909
      return this.scx != null;
48 ashish 31910
    }
31911
 
553 chandransh 31912
    public void setScxIsSet(boolean value) {
48 ashish 31913
      if (!value) {
553 chandransh 31914
        this.scx = null;
48 ashish 31915
      }
31916
    }
31917
 
31918
    public void setFieldValue(_Fields field, Object value) {
31919
      switch (field) {
31920
      case SUCCESS:
31921
        if (value == null) {
31922
          unsetSuccess();
31923
        } else {
553 chandransh 31924
          setSuccess((Widget)value);
48 ashish 31925
        }
31926
        break;
31927
 
553 chandransh 31928
      case SCX:
48 ashish 31929
        if (value == null) {
553 chandransh 31930
          unsetScx();
48 ashish 31931
        } else {
553 chandransh 31932
          setScx((WidgetException)value);
48 ashish 31933
        }
31934
        break;
31935
 
31936
      }
31937
    }
31938
 
31939
    public void setFieldValue(int fieldID, Object value) {
31940
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31941
    }
31942
 
31943
    public Object getFieldValue(_Fields field) {
31944
      switch (field) {
31945
      case SUCCESS:
553 chandransh 31946
        return getSuccess();
48 ashish 31947
 
553 chandransh 31948
      case SCX:
31949
        return getScx();
48 ashish 31950
 
31951
      }
31952
      throw new IllegalStateException();
31953
    }
31954
 
31955
    public Object getFieldValue(int fieldId) {
31956
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31957
    }
31958
 
31959
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31960
    public boolean isSet(_Fields field) {
31961
      switch (field) {
31962
      case SUCCESS:
31963
        return isSetSuccess();
553 chandransh 31964
      case SCX:
31965
        return isSetScx();
48 ashish 31966
      }
31967
      throw new IllegalStateException();
31968
    }
31969
 
31970
    public boolean isSet(int fieldID) {
31971
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31972
    }
31973
 
31974
    @Override
31975
    public boolean equals(Object that) {
31976
      if (that == null)
31977
        return false;
553 chandransh 31978
      if (that instanceof getMyResearch_result)
31979
        return this.equals((getMyResearch_result)that);
48 ashish 31980
      return false;
31981
    }
31982
 
553 chandransh 31983
    public boolean equals(getMyResearch_result that) {
48 ashish 31984
      if (that == null)
31985
        return false;
31986
 
553 chandransh 31987
      boolean this_present_success = true && this.isSetSuccess();
31988
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 31989
      if (this_present_success || that_present_success) {
31990
        if (!(this_present_success && that_present_success))
31991
          return false;
553 chandransh 31992
        if (!this.success.equals(that.success))
48 ashish 31993
          return false;
31994
      }
31995
 
553 chandransh 31996
      boolean this_present_scx = true && this.isSetScx();
31997
      boolean that_present_scx = true && that.isSetScx();
31998
      if (this_present_scx || that_present_scx) {
31999
        if (!(this_present_scx && that_present_scx))
48 ashish 32000
          return false;
553 chandransh 32001
        if (!this.scx.equals(that.scx))
48 ashish 32002
          return false;
32003
      }
32004
 
32005
      return true;
32006
    }
32007
 
32008
    @Override
32009
    public int hashCode() {
32010
      return 0;
32011
    }
32012
 
553 chandransh 32013
    public int compareTo(getMyResearch_result other) {
48 ashish 32014
      if (!getClass().equals(other.getClass())) {
32015
        return getClass().getName().compareTo(other.getClass().getName());
32016
      }
32017
 
32018
      int lastComparison = 0;
553 chandransh 32019
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 32020
 
32021
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32022
      if (lastComparison != 0) {
32023
        return lastComparison;
32024
      }
32025
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32026
      if (lastComparison != 0) {
32027
        return lastComparison;
32028
      }
553 chandransh 32029
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 32030
      if (lastComparison != 0) {
32031
        return lastComparison;
32032
      }
553 chandransh 32033
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 32034
      if (lastComparison != 0) {
32035
        return lastComparison;
32036
      }
32037
      return 0;
32038
    }
32039
 
32040
    public void read(TProtocol iprot) throws TException {
32041
      TField field;
32042
      iprot.readStructBegin();
32043
      while (true)
32044
      {
32045
        field = iprot.readFieldBegin();
32046
        if (field.type == TType.STOP) { 
32047
          break;
32048
        }
32049
        _Fields fieldId = _Fields.findByThriftId(field.id);
32050
        if (fieldId == null) {
32051
          TProtocolUtil.skip(iprot, field.type);
32052
        } else {
32053
          switch (fieldId) {
32054
            case SUCCESS:
553 chandransh 32055
              if (field.type == TType.STRUCT) {
32056
                this.success = new Widget();
32057
                this.success.read(iprot);
48 ashish 32058
              } else { 
32059
                TProtocolUtil.skip(iprot, field.type);
32060
              }
32061
              break;
553 chandransh 32062
            case SCX:
48 ashish 32063
              if (field.type == TType.STRUCT) {
553 chandransh 32064
                this.scx = new WidgetException();
32065
                this.scx.read(iprot);
48 ashish 32066
              } else { 
32067
                TProtocolUtil.skip(iprot, field.type);
32068
              }
32069
              break;
32070
          }
32071
          iprot.readFieldEnd();
32072
        }
32073
      }
32074
      iprot.readStructEnd();
32075
      validate();
32076
    }
32077
 
32078
    public void write(TProtocol oprot) throws TException {
32079
      oprot.writeStructBegin(STRUCT_DESC);
32080
 
32081
      if (this.isSetSuccess()) {
32082
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 32083
        this.success.write(oprot);
48 ashish 32084
        oprot.writeFieldEnd();
553 chandransh 32085
      } else if (this.isSetScx()) {
32086
        oprot.writeFieldBegin(SCX_FIELD_DESC);
32087
        this.scx.write(oprot);
48 ashish 32088
        oprot.writeFieldEnd();
32089
      }
32090
      oprot.writeFieldStop();
32091
      oprot.writeStructEnd();
32092
    }
32093
 
32094
    @Override
32095
    public String toString() {
553 chandransh 32096
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 32097
      boolean first = true;
32098
 
32099
      sb.append("success:");
553 chandransh 32100
      if (this.success == null) {
32101
        sb.append("null");
32102
      } else {
32103
        sb.append(this.success);
32104
      }
48 ashish 32105
      first = false;
32106
      if (!first) sb.append(", ");
553 chandransh 32107
      sb.append("scx:");
32108
      if (this.scx == null) {
48 ashish 32109
        sb.append("null");
32110
      } else {
553 chandransh 32111
        sb.append(this.scx);
48 ashish 32112
      }
32113
      first = false;
32114
      sb.append(")");
32115
      return sb.toString();
32116
    }
32117
 
32118
    public void validate() throws TException {
32119
      // check for required fields
32120
    }
32121
 
32122
  }
32123
 
553 chandransh 32124
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
32125
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 32126
 
771 rajveer 32127
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
32128
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 32129
 
771 rajveer 32130
    private long userId;
32131
    private long itemId;
130 ashish 32132
 
32133
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32134
    public enum _Fields implements TFieldIdEnum {
771 rajveer 32135
      USER_ID((short)1, "userId"),
32136
      ITEM_ID((short)2, "itemId");
130 ashish 32137
 
32138
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32139
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32140
 
32141
      static {
32142
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32143
          byId.put((int)field._thriftId, field);
32144
          byName.put(field.getFieldName(), field);
32145
        }
32146
      }
32147
 
32148
      /**
32149
       * Find the _Fields constant that matches fieldId, or null if its not found.
32150
       */
32151
      public static _Fields findByThriftId(int fieldId) {
32152
        return byId.get(fieldId);
32153
      }
32154
 
32155
      /**
32156
       * Find the _Fields constant that matches fieldId, throwing an exception
32157
       * if it is not found.
32158
       */
32159
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32160
        _Fields fields = findByThriftId(fieldId);
32161
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32162
        return fields;
32163
      }
32164
 
32165
      /**
32166
       * Find the _Fields constant that matches name, or null if its not found.
32167
       */
32168
      public static _Fields findByName(String name) {
32169
        return byName.get(name);
32170
      }
32171
 
32172
      private final short _thriftId;
32173
      private final String _fieldName;
32174
 
32175
      _Fields(short thriftId, String fieldName) {
32176
        _thriftId = thriftId;
32177
        _fieldName = fieldName;
32178
      }
32179
 
32180
      public short getThriftFieldId() {
32181
        return _thriftId;
32182
      }
32183
 
32184
      public String getFieldName() {
32185
        return _fieldName;
32186
      }
32187
    }
32188
 
32189
    // isset id assignments
771 rajveer 32190
    private static final int __USERID_ISSET_ID = 0;
32191
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 32192
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 32193
 
32194
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 32195
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
130 ashish 32196
          new FieldValueMetaData(TType.I64)));
771 rajveer 32197
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 32198
          new FieldValueMetaData(TType.I64)));
130 ashish 32199
    }});
32200
 
32201
    static {
553 chandransh 32202
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 32203
    }
32204
 
553 chandransh 32205
    public updateMyResearch_args() {
130 ashish 32206
    }
32207
 
553 chandransh 32208
    public updateMyResearch_args(
771 rajveer 32209
      long userId,
32210
      long itemId)
130 ashish 32211
    {
32212
      this();
771 rajveer 32213
      this.userId = userId;
32214
      setUserIdIsSet(true);
32215
      this.itemId = itemId;
32216
      setItemIdIsSet(true);
130 ashish 32217
    }
32218
 
32219
    /**
32220
     * Performs a deep copy on <i>other</i>.
32221
     */
553 chandransh 32222
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 32223
      __isset_bit_vector.clear();
32224
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 32225
      this.userId = other.userId;
32226
      this.itemId = other.itemId;
130 ashish 32227
    }
32228
 
553 chandransh 32229
    public updateMyResearch_args deepCopy() {
32230
      return new updateMyResearch_args(this);
130 ashish 32231
    }
32232
 
32233
    @Deprecated
553 chandransh 32234
    public updateMyResearch_args clone() {
32235
      return new updateMyResearch_args(this);
130 ashish 32236
    }
32237
 
771 rajveer 32238
    public long getUserId() {
32239
      return this.userId;
130 ashish 32240
    }
32241
 
771 rajveer 32242
    public updateMyResearch_args setUserId(long userId) {
32243
      this.userId = userId;
32244
      setUserIdIsSet(true);
130 ashish 32245
      return this;
32246
    }
32247
 
771 rajveer 32248
    public void unsetUserId() {
32249
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 32250
    }
32251
 
771 rajveer 32252
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
32253
    public boolean isSetUserId() {
32254
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 32255
    }
32256
 
771 rajveer 32257
    public void setUserIdIsSet(boolean value) {
32258
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 32259
    }
32260
 
771 rajveer 32261
    public long getItemId() {
32262
      return this.itemId;
553 chandransh 32263
    }
32264
 
771 rajveer 32265
    public updateMyResearch_args setItemId(long itemId) {
32266
      this.itemId = itemId;
32267
      setItemIdIsSet(true);
553 chandransh 32268
      return this;
32269
    }
32270
 
771 rajveer 32271
    public void unsetItemId() {
32272
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 32273
    }
32274
 
771 rajveer 32275
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
32276
    public boolean isSetItemId() {
32277
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 32278
    }
32279
 
771 rajveer 32280
    public void setItemIdIsSet(boolean value) {
32281
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 32282
    }
32283
 
130 ashish 32284
    public void setFieldValue(_Fields field, Object value) {
32285
      switch (field) {
553 chandransh 32286
      case USER_ID:
130 ashish 32287
        if (value == null) {
771 rajveer 32288
          unsetUserId();
130 ashish 32289
        } else {
771 rajveer 32290
          setUserId((Long)value);
130 ashish 32291
        }
32292
        break;
32293
 
553 chandransh 32294
      case ITEM_ID:
32295
        if (value == null) {
771 rajveer 32296
          unsetItemId();
553 chandransh 32297
        } else {
771 rajveer 32298
          setItemId((Long)value);
553 chandransh 32299
        }
32300
        break;
32301
 
130 ashish 32302
      }
32303
    }
32304
 
32305
    public void setFieldValue(int fieldID, Object value) {
32306
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32307
    }
32308
 
32309
    public Object getFieldValue(_Fields field) {
32310
      switch (field) {
553 chandransh 32311
      case USER_ID:
771 rajveer 32312
        return new Long(getUserId());
130 ashish 32313
 
553 chandransh 32314
      case ITEM_ID:
771 rajveer 32315
        return new Long(getItemId());
553 chandransh 32316
 
130 ashish 32317
      }
32318
      throw new IllegalStateException();
32319
    }
32320
 
32321
    public Object getFieldValue(int fieldId) {
32322
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32323
    }
32324
 
32325
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32326
    public boolean isSet(_Fields field) {
32327
      switch (field) {
553 chandransh 32328
      case USER_ID:
771 rajveer 32329
        return isSetUserId();
553 chandransh 32330
      case ITEM_ID:
771 rajveer 32331
        return isSetItemId();
130 ashish 32332
      }
32333
      throw new IllegalStateException();
32334
    }
32335
 
32336
    public boolean isSet(int fieldID) {
32337
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32338
    }
32339
 
32340
    @Override
32341
    public boolean equals(Object that) {
32342
      if (that == null)
32343
        return false;
553 chandransh 32344
      if (that instanceof updateMyResearch_args)
32345
        return this.equals((updateMyResearch_args)that);
130 ashish 32346
      return false;
32347
    }
32348
 
553 chandransh 32349
    public boolean equals(updateMyResearch_args that) {
130 ashish 32350
      if (that == null)
32351
        return false;
32352
 
771 rajveer 32353
      boolean this_present_userId = true;
32354
      boolean that_present_userId = true;
32355
      if (this_present_userId || that_present_userId) {
32356
        if (!(this_present_userId && that_present_userId))
130 ashish 32357
          return false;
771 rajveer 32358
        if (this.userId != that.userId)
130 ashish 32359
          return false;
32360
      }
32361
 
771 rajveer 32362
      boolean this_present_itemId = true;
32363
      boolean that_present_itemId = true;
32364
      if (this_present_itemId || that_present_itemId) {
32365
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 32366
          return false;
771 rajveer 32367
        if (this.itemId != that.itemId)
553 chandransh 32368
          return false;
32369
      }
32370
 
130 ashish 32371
      return true;
32372
    }
32373
 
32374
    @Override
32375
    public int hashCode() {
32376
      return 0;
32377
    }
32378
 
553 chandransh 32379
    public int compareTo(updateMyResearch_args other) {
130 ashish 32380
      if (!getClass().equals(other.getClass())) {
32381
        return getClass().getName().compareTo(other.getClass().getName());
32382
      }
32383
 
32384
      int lastComparison = 0;
553 chandransh 32385
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 32386
 
771 rajveer 32387
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 32388
      if (lastComparison != 0) {
32389
        return lastComparison;
32390
      }
771 rajveer 32391
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 32392
      if (lastComparison != 0) {
32393
        return lastComparison;
32394
      }
771 rajveer 32395
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 32396
      if (lastComparison != 0) {
32397
        return lastComparison;
32398
      }
771 rajveer 32399
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 32400
      if (lastComparison != 0) {
32401
        return lastComparison;
32402
      }
130 ashish 32403
      return 0;
32404
    }
32405
 
32406
    public void read(TProtocol iprot) throws TException {
32407
      TField field;
32408
      iprot.readStructBegin();
32409
      while (true)
32410
      {
32411
        field = iprot.readFieldBegin();
32412
        if (field.type == TType.STOP) { 
32413
          break;
32414
        }
32415
        _Fields fieldId = _Fields.findByThriftId(field.id);
32416
        if (fieldId == null) {
32417
          TProtocolUtil.skip(iprot, field.type);
32418
        } else {
32419
          switch (fieldId) {
553 chandransh 32420
            case USER_ID:
130 ashish 32421
              if (field.type == TType.I64) {
771 rajveer 32422
                this.userId = iprot.readI64();
32423
                setUserIdIsSet(true);
130 ashish 32424
              } else { 
32425
                TProtocolUtil.skip(iprot, field.type);
32426
              }
32427
              break;
553 chandransh 32428
            case ITEM_ID:
32429
              if (field.type == TType.I64) {
771 rajveer 32430
                this.itemId = iprot.readI64();
32431
                setItemIdIsSet(true);
553 chandransh 32432
              } else { 
32433
                TProtocolUtil.skip(iprot, field.type);
32434
              }
32435
              break;
130 ashish 32436
          }
32437
          iprot.readFieldEnd();
32438
        }
32439
      }
32440
      iprot.readStructEnd();
32441
      validate();
32442
    }
32443
 
32444
    public void write(TProtocol oprot) throws TException {
32445
      validate();
32446
 
32447
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 32448
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 32449
      oprot.writeI64(this.userId);
130 ashish 32450
      oprot.writeFieldEnd();
553 chandransh 32451
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 32452
      oprot.writeI64(this.itemId);
553 chandransh 32453
      oprot.writeFieldEnd();
130 ashish 32454
      oprot.writeFieldStop();
32455
      oprot.writeStructEnd();
32456
    }
32457
 
32458
    @Override
32459
    public String toString() {
553 chandransh 32460
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 32461
      boolean first = true;
32462
 
771 rajveer 32463
      sb.append("userId:");
32464
      sb.append(this.userId);
130 ashish 32465
      first = false;
553 chandransh 32466
      if (!first) sb.append(", ");
771 rajveer 32467
      sb.append("itemId:");
32468
      sb.append(this.itemId);
553 chandransh 32469
      first = false;
130 ashish 32470
      sb.append(")");
32471
      return sb.toString();
32472
    }
32473
 
32474
    public void validate() throws TException {
32475
      // check for required fields
32476
    }
32477
 
32478
  }
32479
 
553 chandransh 32480
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
32481
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 32482
 
32483
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 32484
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 32485
 
32486
    private boolean success;
553 chandransh 32487
    private WidgetException scx;
130 ashish 32488
 
32489
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32490
    public enum _Fields implements TFieldIdEnum {
32491
      SUCCESS((short)0, "success"),
553 chandransh 32492
      SCX((short)1, "scx");
130 ashish 32493
 
32494
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32495
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32496
 
32497
      static {
32498
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32499
          byId.put((int)field._thriftId, field);
32500
          byName.put(field.getFieldName(), field);
32501
        }
32502
      }
32503
 
32504
      /**
32505
       * Find the _Fields constant that matches fieldId, or null if its not found.
32506
       */
32507
      public static _Fields findByThriftId(int fieldId) {
32508
        return byId.get(fieldId);
32509
      }
32510
 
32511
      /**
32512
       * Find the _Fields constant that matches fieldId, throwing an exception
32513
       * if it is not found.
32514
       */
32515
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32516
        _Fields fields = findByThriftId(fieldId);
32517
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32518
        return fields;
32519
      }
32520
 
32521
      /**
32522
       * Find the _Fields constant that matches name, or null if its not found.
32523
       */
32524
      public static _Fields findByName(String name) {
32525
        return byName.get(name);
32526
      }
32527
 
32528
      private final short _thriftId;
32529
      private final String _fieldName;
32530
 
32531
      _Fields(short thriftId, String fieldName) {
32532
        _thriftId = thriftId;
32533
        _fieldName = fieldName;
32534
      }
32535
 
32536
      public short getThriftFieldId() {
32537
        return _thriftId;
32538
      }
32539
 
32540
      public String getFieldName() {
32541
        return _fieldName;
32542
      }
32543
    }
32544
 
32545
    // isset id assignments
32546
    private static final int __SUCCESS_ISSET_ID = 0;
32547
    private BitSet __isset_bit_vector = new BitSet(1);
32548
 
32549
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32550
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
32551
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 32552
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 32553
          new FieldValueMetaData(TType.STRUCT)));
32554
    }});
32555
 
32556
    static {
553 chandransh 32557
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 32558
    }
32559
 
553 chandransh 32560
    public updateMyResearch_result() {
130 ashish 32561
    }
32562
 
553 chandransh 32563
    public updateMyResearch_result(
130 ashish 32564
      boolean success,
553 chandransh 32565
      WidgetException scx)
130 ashish 32566
    {
32567
      this();
32568
      this.success = success;
32569
      setSuccessIsSet(true);
553 chandransh 32570
      this.scx = scx;
130 ashish 32571
    }
32572
 
32573
    /**
32574
     * Performs a deep copy on <i>other</i>.
32575
     */
553 chandransh 32576
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 32577
      __isset_bit_vector.clear();
32578
      __isset_bit_vector.or(other.__isset_bit_vector);
32579
      this.success = other.success;
553 chandransh 32580
      if (other.isSetScx()) {
32581
        this.scx = new WidgetException(other.scx);
130 ashish 32582
      }
32583
    }
32584
 
553 chandransh 32585
    public updateMyResearch_result deepCopy() {
32586
      return new updateMyResearch_result(this);
130 ashish 32587
    }
32588
 
32589
    @Deprecated
553 chandransh 32590
    public updateMyResearch_result clone() {
32591
      return new updateMyResearch_result(this);
130 ashish 32592
    }
32593
 
32594
    public boolean isSuccess() {
32595
      return this.success;
32596
    }
32597
 
553 chandransh 32598
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 32599
      this.success = success;
32600
      setSuccessIsSet(true);
32601
      return this;
32602
    }
32603
 
32604
    public void unsetSuccess() {
32605
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
32606
    }
32607
 
32608
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32609
    public boolean isSetSuccess() {
32610
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
32611
    }
32612
 
32613
    public void setSuccessIsSet(boolean value) {
32614
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
32615
    }
32616
 
553 chandransh 32617
    public WidgetException getScx() {
32618
      return this.scx;
130 ashish 32619
    }
32620
 
553 chandransh 32621
    public updateMyResearch_result setScx(WidgetException scx) {
32622
      this.scx = scx;
130 ashish 32623
      return this;
32624
    }
32625
 
553 chandransh 32626
    public void unsetScx() {
32627
      this.scx = null;
130 ashish 32628
    }
32629
 
553 chandransh 32630
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
32631
    public boolean isSetScx() {
32632
      return this.scx != null;
130 ashish 32633
    }
32634
 
553 chandransh 32635
    public void setScxIsSet(boolean value) {
130 ashish 32636
      if (!value) {
553 chandransh 32637
        this.scx = null;
130 ashish 32638
      }
32639
    }
32640
 
32641
    public void setFieldValue(_Fields field, Object value) {
32642
      switch (field) {
32643
      case SUCCESS:
32644
        if (value == null) {
32645
          unsetSuccess();
32646
        } else {
32647
          setSuccess((Boolean)value);
32648
        }
32649
        break;
32650
 
553 chandransh 32651
      case SCX:
130 ashish 32652
        if (value == null) {
553 chandransh 32653
          unsetScx();
130 ashish 32654
        } else {
553 chandransh 32655
          setScx((WidgetException)value);
130 ashish 32656
        }
32657
        break;
32658
 
32659
      }
32660
    }
32661
 
32662
    public void setFieldValue(int fieldID, Object value) {
32663
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32664
    }
32665
 
32666
    public Object getFieldValue(_Fields field) {
32667
      switch (field) {
32668
      case SUCCESS:
32669
        return new Boolean(isSuccess());
32670
 
553 chandransh 32671
      case SCX:
32672
        return getScx();
130 ashish 32673
 
32674
      }
32675
      throw new IllegalStateException();
32676
    }
32677
 
32678
    public Object getFieldValue(int fieldId) {
32679
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32680
    }
32681
 
32682
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32683
    public boolean isSet(_Fields field) {
32684
      switch (field) {
32685
      case SUCCESS:
32686
        return isSetSuccess();
553 chandransh 32687
      case SCX:
32688
        return isSetScx();
130 ashish 32689
      }
32690
      throw new IllegalStateException();
32691
    }
32692
 
32693
    public boolean isSet(int fieldID) {
32694
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32695
    }
32696
 
32697
    @Override
32698
    public boolean equals(Object that) {
32699
      if (that == null)
32700
        return false;
553 chandransh 32701
      if (that instanceof updateMyResearch_result)
32702
        return this.equals((updateMyResearch_result)that);
130 ashish 32703
      return false;
32704
    }
32705
 
553 chandransh 32706
    public boolean equals(updateMyResearch_result that) {
130 ashish 32707
      if (that == null)
32708
        return false;
32709
 
32710
      boolean this_present_success = true;
32711
      boolean that_present_success = true;
32712
      if (this_present_success || that_present_success) {
32713
        if (!(this_present_success && that_present_success))
32714
          return false;
32715
        if (this.success != that.success)
32716
          return false;
32717
      }
32718
 
553 chandransh 32719
      boolean this_present_scx = true && this.isSetScx();
32720
      boolean that_present_scx = true && that.isSetScx();
32721
      if (this_present_scx || that_present_scx) {
32722
        if (!(this_present_scx && that_present_scx))
130 ashish 32723
          return false;
553 chandransh 32724
        if (!this.scx.equals(that.scx))
130 ashish 32725
          return false;
32726
      }
32727
 
32728
      return true;
32729
    }
32730
 
32731
    @Override
32732
    public int hashCode() {
32733
      return 0;
32734
    }
32735
 
553 chandransh 32736
    public int compareTo(updateMyResearch_result other) {
130 ashish 32737
      if (!getClass().equals(other.getClass())) {
32738
        return getClass().getName().compareTo(other.getClass().getName());
32739
      }
32740
 
32741
      int lastComparison = 0;
553 chandransh 32742
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 32743
 
32744
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32745
      if (lastComparison != 0) {
32746
        return lastComparison;
32747
      }
32748
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32749
      if (lastComparison != 0) {
32750
        return lastComparison;
32751
      }
553 chandransh 32752
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 32753
      if (lastComparison != 0) {
32754
        return lastComparison;
32755
      }
553 chandransh 32756
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 32757
      if (lastComparison != 0) {
32758
        return lastComparison;
32759
      }
32760
      return 0;
32761
    }
32762
 
32763
    public void read(TProtocol iprot) throws TException {
32764
      TField field;
32765
      iprot.readStructBegin();
32766
      while (true)
32767
      {
32768
        field = iprot.readFieldBegin();
32769
        if (field.type == TType.STOP) { 
32770
          break;
32771
        }
32772
        _Fields fieldId = _Fields.findByThriftId(field.id);
32773
        if (fieldId == null) {
32774
          TProtocolUtil.skip(iprot, field.type);
32775
        } else {
32776
          switch (fieldId) {
32777
            case SUCCESS:
32778
              if (field.type == TType.BOOL) {
32779
                this.success = iprot.readBool();
32780
                setSuccessIsSet(true);
32781
              } else { 
32782
                TProtocolUtil.skip(iprot, field.type);
32783
              }
32784
              break;
553 chandransh 32785
            case SCX:
130 ashish 32786
              if (field.type == TType.STRUCT) {
553 chandransh 32787
                this.scx = new WidgetException();
32788
                this.scx.read(iprot);
130 ashish 32789
              } else { 
32790
                TProtocolUtil.skip(iprot, field.type);
32791
              }
32792
              break;
32793
          }
32794
          iprot.readFieldEnd();
32795
        }
32796
      }
32797
      iprot.readStructEnd();
32798
      validate();
32799
    }
32800
 
32801
    public void write(TProtocol oprot) throws TException {
32802
      oprot.writeStructBegin(STRUCT_DESC);
32803
 
32804
      if (this.isSetSuccess()) {
32805
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32806
        oprot.writeBool(this.success);
32807
        oprot.writeFieldEnd();
553 chandransh 32808
      } else if (this.isSetScx()) {
32809
        oprot.writeFieldBegin(SCX_FIELD_DESC);
32810
        this.scx.write(oprot);
130 ashish 32811
        oprot.writeFieldEnd();
32812
      }
32813
      oprot.writeFieldStop();
32814
      oprot.writeStructEnd();
32815
    }
32816
 
32817
    @Override
32818
    public String toString() {
553 chandransh 32819
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 32820
      boolean first = true;
32821
 
32822
      sb.append("success:");
32823
      sb.append(this.success);
32824
      first = false;
32825
      if (!first) sb.append(", ");
553 chandransh 32826
      sb.append("scx:");
32827
      if (this.scx == null) {
130 ashish 32828
        sb.append("null");
32829
      } else {
553 chandransh 32830
        sb.append(this.scx);
130 ashish 32831
      }
32832
      first = false;
32833
      sb.append(")");
32834
      return sb.toString();
32835
    }
32836
 
32837
    public void validate() throws TException {
32838
      // check for required fields
32839
    }
32840
 
32841
  }
32842
 
553 chandransh 32843
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
32844
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 32845
 
771 rajveer 32846
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
32847
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 32848
 
771 rajveer 32849
    private long userId;
32850
    private long itemId;
130 ashish 32851
 
32852
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32853
    public enum _Fields implements TFieldIdEnum {
771 rajveer 32854
      USER_ID((short)1, "userId"),
32855
      ITEM_ID((short)2, "itemId");
130 ashish 32856
 
32857
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32859
 
32860
      static {
32861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32862
          byId.put((int)field._thriftId, field);
32863
          byName.put(field.getFieldName(), field);
32864
        }
32865
      }
32866
 
32867
      /**
32868
       * Find the _Fields constant that matches fieldId, or null if its not found.
32869
       */
32870
      public static _Fields findByThriftId(int fieldId) {
32871
        return byId.get(fieldId);
32872
      }
32873
 
32874
      /**
32875
       * Find the _Fields constant that matches fieldId, throwing an exception
32876
       * if it is not found.
32877
       */
32878
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32879
        _Fields fields = findByThriftId(fieldId);
32880
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32881
        return fields;
32882
      }
32883
 
32884
      /**
32885
       * Find the _Fields constant that matches name, or null if its not found.
32886
       */
32887
      public static _Fields findByName(String name) {
32888
        return byName.get(name);
32889
      }
32890
 
32891
      private final short _thriftId;
32892
      private final String _fieldName;
32893
 
32894
      _Fields(short thriftId, String fieldName) {
32895
        _thriftId = thriftId;
32896
        _fieldName = fieldName;
32897
      }
32898
 
32899
      public short getThriftFieldId() {
32900
        return _thriftId;
32901
      }
32902
 
32903
      public String getFieldName() {
32904
        return _fieldName;
32905
      }
32906
    }
32907
 
32908
    // isset id assignments
771 rajveer 32909
    private static final int __USERID_ISSET_ID = 0;
32910
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 32911
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 32912
 
32913
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 32914
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 32915
          new FieldValueMetaData(TType.I64)));
771 rajveer 32916
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 32917
          new FieldValueMetaData(TType.I64)));
130 ashish 32918
    }});
32919
 
32920
    static {
553 chandransh 32921
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 32922
    }
32923
 
553 chandransh 32924
    public deleteItemFromMyResearch_args() {
130 ashish 32925
    }
32926
 
553 chandransh 32927
    public deleteItemFromMyResearch_args(
771 rajveer 32928
      long userId,
32929
      long itemId)
130 ashish 32930
    {
32931
      this();
771 rajveer 32932
      this.userId = userId;
32933
      setUserIdIsSet(true);
32934
      this.itemId = itemId;
32935
      setItemIdIsSet(true);
130 ashish 32936
    }
32937
 
32938
    /**
32939
     * Performs a deep copy on <i>other</i>.
32940
     */
553 chandransh 32941
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 32942
      __isset_bit_vector.clear();
32943
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 32944
      this.userId = other.userId;
32945
      this.itemId = other.itemId;
553 chandransh 32946
    }
32947
 
32948
    public deleteItemFromMyResearch_args deepCopy() {
32949
      return new deleteItemFromMyResearch_args(this);
32950
    }
32951
 
32952
    @Deprecated
32953
    public deleteItemFromMyResearch_args clone() {
32954
      return new deleteItemFromMyResearch_args(this);
32955
    }
32956
 
771 rajveer 32957
    public long getUserId() {
32958
      return this.userId;
553 chandransh 32959
    }
32960
 
771 rajveer 32961
    public deleteItemFromMyResearch_args setUserId(long userId) {
32962
      this.userId = userId;
32963
      setUserIdIsSet(true);
553 chandransh 32964
      return this;
32965
    }
32966
 
771 rajveer 32967
    public void unsetUserId() {
32968
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 32969
    }
32970
 
771 rajveer 32971
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
32972
    public boolean isSetUserId() {
32973
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 32974
    }
32975
 
771 rajveer 32976
    public void setUserIdIsSet(boolean value) {
32977
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 32978
    }
32979
 
771 rajveer 32980
    public long getItemId() {
32981
      return this.itemId;
553 chandransh 32982
    }
32983
 
771 rajveer 32984
    public deleteItemFromMyResearch_args setItemId(long itemId) {
32985
      this.itemId = itemId;
32986
      setItemIdIsSet(true);
553 chandransh 32987
      return this;
32988
    }
32989
 
771 rajveer 32990
    public void unsetItemId() {
32991
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 32992
    }
32993
 
771 rajveer 32994
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
32995
    public boolean isSetItemId() {
32996
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 32997
    }
32998
 
771 rajveer 32999
    public void setItemIdIsSet(boolean value) {
33000
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 33001
    }
33002
 
33003
    public void setFieldValue(_Fields field, Object value) {
33004
      switch (field) {
33005
      case USER_ID:
33006
        if (value == null) {
771 rajveer 33007
          unsetUserId();
553 chandransh 33008
        } else {
771 rajveer 33009
          setUserId((Long)value);
553 chandransh 33010
        }
33011
        break;
33012
 
33013
      case ITEM_ID:
33014
        if (value == null) {
771 rajveer 33015
          unsetItemId();
553 chandransh 33016
        } else {
771 rajveer 33017
          setItemId((Long)value);
553 chandransh 33018
        }
33019
        break;
33020
 
130 ashish 33021
      }
33022
    }
33023
 
553 chandransh 33024
    public void setFieldValue(int fieldID, Object value) {
33025
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 33026
    }
33027
 
553 chandransh 33028
    public Object getFieldValue(_Fields field) {
33029
      switch (field) {
33030
      case USER_ID:
771 rajveer 33031
        return new Long(getUserId());
553 chandransh 33032
 
33033
      case ITEM_ID:
771 rajveer 33034
        return new Long(getItemId());
553 chandransh 33035
 
33036
      }
33037
      throw new IllegalStateException();
33038
    }
33039
 
33040
    public Object getFieldValue(int fieldId) {
33041
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33042
    }
33043
 
33044
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33045
    public boolean isSet(_Fields field) {
33046
      switch (field) {
33047
      case USER_ID:
771 rajveer 33048
        return isSetUserId();
553 chandransh 33049
      case ITEM_ID:
771 rajveer 33050
        return isSetItemId();
553 chandransh 33051
      }
33052
      throw new IllegalStateException();
33053
    }
33054
 
33055
    public boolean isSet(int fieldID) {
33056
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33057
    }
33058
 
33059
    @Override
33060
    public boolean equals(Object that) {
33061
      if (that == null)
33062
        return false;
33063
      if (that instanceof deleteItemFromMyResearch_args)
33064
        return this.equals((deleteItemFromMyResearch_args)that);
33065
      return false;
33066
    }
33067
 
33068
    public boolean equals(deleteItemFromMyResearch_args that) {
33069
      if (that == null)
33070
        return false;
33071
 
771 rajveer 33072
      boolean this_present_userId = true;
33073
      boolean that_present_userId = true;
33074
      if (this_present_userId || that_present_userId) {
33075
        if (!(this_present_userId && that_present_userId))
553 chandransh 33076
          return false;
771 rajveer 33077
        if (this.userId != that.userId)
553 chandransh 33078
          return false;
33079
      }
33080
 
771 rajveer 33081
      boolean this_present_itemId = true;
33082
      boolean that_present_itemId = true;
33083
      if (this_present_itemId || that_present_itemId) {
33084
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 33085
          return false;
771 rajveer 33086
        if (this.itemId != that.itemId)
553 chandransh 33087
          return false;
33088
      }
33089
 
33090
      return true;
33091
    }
33092
 
33093
    @Override
33094
    public int hashCode() {
33095
      return 0;
33096
    }
33097
 
33098
    public int compareTo(deleteItemFromMyResearch_args other) {
33099
      if (!getClass().equals(other.getClass())) {
33100
        return getClass().getName().compareTo(other.getClass().getName());
33101
      }
33102
 
33103
      int lastComparison = 0;
33104
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
33105
 
771 rajveer 33106
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 33107
      if (lastComparison != 0) {
33108
        return lastComparison;
33109
      }
771 rajveer 33110
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 33111
      if (lastComparison != 0) {
33112
        return lastComparison;
33113
      }
771 rajveer 33114
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 33115
      if (lastComparison != 0) {
33116
        return lastComparison;
33117
      }
771 rajveer 33118
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 33119
      if (lastComparison != 0) {
33120
        return lastComparison;
33121
      }
33122
      return 0;
33123
    }
33124
 
33125
    public void read(TProtocol iprot) throws TException {
33126
      TField field;
33127
      iprot.readStructBegin();
33128
      while (true)
33129
      {
33130
        field = iprot.readFieldBegin();
33131
        if (field.type == TType.STOP) { 
33132
          break;
33133
        }
33134
        _Fields fieldId = _Fields.findByThriftId(field.id);
33135
        if (fieldId == null) {
33136
          TProtocolUtil.skip(iprot, field.type);
33137
        } else {
33138
          switch (fieldId) {
33139
            case USER_ID:
33140
              if (field.type == TType.I64) {
771 rajveer 33141
                this.userId = iprot.readI64();
33142
                setUserIdIsSet(true);
553 chandransh 33143
              } else { 
33144
                TProtocolUtil.skip(iprot, field.type);
33145
              }
33146
              break;
33147
            case ITEM_ID:
33148
              if (field.type == TType.I64) {
771 rajveer 33149
                this.itemId = iprot.readI64();
33150
                setItemIdIsSet(true);
553 chandransh 33151
              } else { 
33152
                TProtocolUtil.skip(iprot, field.type);
33153
              }
33154
              break;
33155
          }
33156
          iprot.readFieldEnd();
33157
        }
33158
      }
33159
      iprot.readStructEnd();
33160
      validate();
33161
    }
33162
 
33163
    public void write(TProtocol oprot) throws TException {
33164
      validate();
33165
 
33166
      oprot.writeStructBegin(STRUCT_DESC);
33167
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 33168
      oprot.writeI64(this.userId);
553 chandransh 33169
      oprot.writeFieldEnd();
33170
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 33171
      oprot.writeI64(this.itemId);
553 chandransh 33172
      oprot.writeFieldEnd();
33173
      oprot.writeFieldStop();
33174
      oprot.writeStructEnd();
33175
    }
33176
 
33177
    @Override
33178
    public String toString() {
33179
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
33180
      boolean first = true;
33181
 
771 rajveer 33182
      sb.append("userId:");
33183
      sb.append(this.userId);
553 chandransh 33184
      first = false;
33185
      if (!first) sb.append(", ");
771 rajveer 33186
      sb.append("itemId:");
33187
      sb.append(this.itemId);
553 chandransh 33188
      first = false;
33189
      sb.append(")");
33190
      return sb.toString();
33191
    }
33192
 
33193
    public void validate() throws TException {
33194
      // check for required fields
33195
    }
33196
 
33197
  }
33198
 
33199
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
33200
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
33201
 
33202
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
33203
 
33204
    private WidgetException scx;
33205
 
33206
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33207
    public enum _Fields implements TFieldIdEnum {
33208
      SCX((short)1, "scx");
33209
 
33210
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33211
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33212
 
33213
      static {
33214
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33215
          byId.put((int)field._thriftId, field);
33216
          byName.put(field.getFieldName(), field);
33217
        }
33218
      }
33219
 
33220
      /**
33221
       * Find the _Fields constant that matches fieldId, or null if its not found.
33222
       */
33223
      public static _Fields findByThriftId(int fieldId) {
33224
        return byId.get(fieldId);
33225
      }
33226
 
33227
      /**
33228
       * Find the _Fields constant that matches fieldId, throwing an exception
33229
       * if it is not found.
33230
       */
33231
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33232
        _Fields fields = findByThriftId(fieldId);
33233
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33234
        return fields;
33235
      }
33236
 
33237
      /**
33238
       * Find the _Fields constant that matches name, or null if its not found.
33239
       */
33240
      public static _Fields findByName(String name) {
33241
        return byName.get(name);
33242
      }
33243
 
33244
      private final short _thriftId;
33245
      private final String _fieldName;
33246
 
33247
      _Fields(short thriftId, String fieldName) {
33248
        _thriftId = thriftId;
33249
        _fieldName = fieldName;
33250
      }
33251
 
33252
      public short getThriftFieldId() {
33253
        return _thriftId;
33254
      }
33255
 
33256
      public String getFieldName() {
33257
        return _fieldName;
33258
      }
33259
    }
33260
 
33261
    // isset id assignments
33262
 
33263
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33264
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
33265
          new FieldValueMetaData(TType.STRUCT)));
33266
    }});
33267
 
33268
    static {
33269
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
33270
    }
33271
 
33272
    public deleteItemFromMyResearch_result() {
33273
    }
33274
 
33275
    public deleteItemFromMyResearch_result(
33276
      WidgetException scx)
33277
    {
33278
      this();
33279
      this.scx = scx;
33280
    }
33281
 
33282
    /**
33283
     * Performs a deep copy on <i>other</i>.
33284
     */
33285
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
33286
      if (other.isSetScx()) {
33287
        this.scx = new WidgetException(other.scx);
33288
      }
33289
    }
33290
 
33291
    public deleteItemFromMyResearch_result deepCopy() {
33292
      return new deleteItemFromMyResearch_result(this);
33293
    }
33294
 
130 ashish 33295
    @Deprecated
553 chandransh 33296
    public deleteItemFromMyResearch_result clone() {
33297
      return new deleteItemFromMyResearch_result(this);
130 ashish 33298
    }
33299
 
553 chandransh 33300
    public WidgetException getScx() {
33301
      return this.scx;
130 ashish 33302
    }
33303
 
553 chandransh 33304
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
33305
      this.scx = scx;
130 ashish 33306
      return this;
33307
    }
33308
 
553 chandransh 33309
    public void unsetScx() {
33310
      this.scx = null;
130 ashish 33311
    }
33312
 
553 chandransh 33313
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
33314
    public boolean isSetScx() {
33315
      return this.scx != null;
130 ashish 33316
    }
33317
 
553 chandransh 33318
    public void setScxIsSet(boolean value) {
130 ashish 33319
      if (!value) {
553 chandransh 33320
        this.scx = null;
130 ashish 33321
      }
33322
    }
33323
 
553 chandransh 33324
    public void setFieldValue(_Fields field, Object value) {
33325
      switch (field) {
33326
      case SCX:
33327
        if (value == null) {
33328
          unsetScx();
33329
        } else {
33330
          setScx((WidgetException)value);
33331
        }
33332
        break;
33333
 
33334
      }
130 ashish 33335
    }
33336
 
553 chandransh 33337
    public void setFieldValue(int fieldID, Object value) {
33338
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33339
    }
33340
 
33341
    public Object getFieldValue(_Fields field) {
33342
      switch (field) {
33343
      case SCX:
33344
        return getScx();
33345
 
33346
      }
33347
      throw new IllegalStateException();
33348
    }
33349
 
33350
    public Object getFieldValue(int fieldId) {
33351
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33352
    }
33353
 
33354
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33355
    public boolean isSet(_Fields field) {
33356
      switch (field) {
33357
      case SCX:
33358
        return isSetScx();
33359
      }
33360
      throw new IllegalStateException();
33361
    }
33362
 
33363
    public boolean isSet(int fieldID) {
33364
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33365
    }
33366
 
33367
    @Override
33368
    public boolean equals(Object that) {
33369
      if (that == null)
33370
        return false;
33371
      if (that instanceof deleteItemFromMyResearch_result)
33372
        return this.equals((deleteItemFromMyResearch_result)that);
33373
      return false;
33374
    }
33375
 
33376
    public boolean equals(deleteItemFromMyResearch_result that) {
33377
      if (that == null)
33378
        return false;
33379
 
33380
      boolean this_present_scx = true && this.isSetScx();
33381
      boolean that_present_scx = true && that.isSetScx();
33382
      if (this_present_scx || that_present_scx) {
33383
        if (!(this_present_scx && that_present_scx))
33384
          return false;
33385
        if (!this.scx.equals(that.scx))
33386
          return false;
33387
      }
33388
 
33389
      return true;
33390
    }
33391
 
33392
    @Override
33393
    public int hashCode() {
33394
      return 0;
33395
    }
33396
 
33397
    public int compareTo(deleteItemFromMyResearch_result other) {
33398
      if (!getClass().equals(other.getClass())) {
33399
        return getClass().getName().compareTo(other.getClass().getName());
33400
      }
33401
 
33402
      int lastComparison = 0;
33403
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
33404
 
33405
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
33406
      if (lastComparison != 0) {
33407
        return lastComparison;
33408
      }
33409
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
33410
      if (lastComparison != 0) {
33411
        return lastComparison;
33412
      }
33413
      return 0;
33414
    }
33415
 
33416
    public void read(TProtocol iprot) throws TException {
33417
      TField field;
33418
      iprot.readStructBegin();
33419
      while (true)
33420
      {
33421
        field = iprot.readFieldBegin();
33422
        if (field.type == TType.STOP) { 
33423
          break;
33424
        }
33425
        _Fields fieldId = _Fields.findByThriftId(field.id);
33426
        if (fieldId == null) {
33427
          TProtocolUtil.skip(iprot, field.type);
33428
        } else {
33429
          switch (fieldId) {
33430
            case SCX:
33431
              if (field.type == TType.STRUCT) {
33432
                this.scx = new WidgetException();
33433
                this.scx.read(iprot);
33434
              } else { 
33435
                TProtocolUtil.skip(iprot, field.type);
33436
              }
33437
              break;
33438
          }
33439
          iprot.readFieldEnd();
33440
        }
33441
      }
33442
      iprot.readStructEnd();
33443
      validate();
33444
    }
33445
 
33446
    public void write(TProtocol oprot) throws TException {
33447
      oprot.writeStructBegin(STRUCT_DESC);
33448
 
33449
      if (this.isSetScx()) {
33450
        oprot.writeFieldBegin(SCX_FIELD_DESC);
33451
        this.scx.write(oprot);
33452
        oprot.writeFieldEnd();
33453
      }
33454
      oprot.writeFieldStop();
33455
      oprot.writeStructEnd();
33456
    }
33457
 
33458
    @Override
33459
    public String toString() {
33460
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
33461
      boolean first = true;
33462
 
33463
      sb.append("scx:");
33464
      if (this.scx == null) {
33465
        sb.append("null");
33466
      } else {
33467
        sb.append(this.scx);
33468
      }
33469
      first = false;
33470
      sb.append(")");
33471
      return sb.toString();
33472
    }
33473
 
33474
    public void validate() throws TException {
33475
      // check for required fields
33476
    }
33477
 
33478
  }
33479
 
771 rajveer 33480
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
33481
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
553 chandransh 33482
 
771 rajveer 33483
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
33484
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
553 chandransh 33485
 
771 rajveer 33486
    private long userId;
33487
    private long itemId;
553 chandransh 33488
 
33489
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33490
    public enum _Fields implements TFieldIdEnum {
771 rajveer 33491
      USER_ID((short)1, "userId"),
33492
      ITEM_ID((short)2, "itemId");
553 chandransh 33493
 
33494
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33495
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33496
 
33497
      static {
33498
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33499
          byId.put((int)field._thriftId, field);
33500
          byName.put(field.getFieldName(), field);
33501
        }
33502
      }
33503
 
33504
      /**
33505
       * Find the _Fields constant that matches fieldId, or null if its not found.
33506
       */
33507
      public static _Fields findByThriftId(int fieldId) {
33508
        return byId.get(fieldId);
33509
      }
33510
 
33511
      /**
33512
       * Find the _Fields constant that matches fieldId, throwing an exception
33513
       * if it is not found.
33514
       */
33515
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33516
        _Fields fields = findByThriftId(fieldId);
33517
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33518
        return fields;
33519
      }
33520
 
33521
      /**
33522
       * Find the _Fields constant that matches name, or null if its not found.
33523
       */
33524
      public static _Fields findByName(String name) {
33525
        return byName.get(name);
33526
      }
33527
 
33528
      private final short _thriftId;
33529
      private final String _fieldName;
33530
 
33531
      _Fields(short thriftId, String fieldName) {
33532
        _thriftId = thriftId;
33533
        _fieldName = fieldName;
33534
      }
33535
 
33536
      public short getThriftFieldId() {
33537
        return _thriftId;
33538
      }
33539
 
33540
      public String getFieldName() {
33541
        return _fieldName;
33542
      }
33543
    }
33544
 
33545
    // isset id assignments
771 rajveer 33546
    private static final int __USERID_ISSET_ID = 0;
33547
    private static final int __ITEMID_ISSET_ID = 1;
33548
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 33549
 
33550
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 33551
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 33552
          new FieldValueMetaData(TType.I64)));
771 rajveer 33553
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 33554
          new FieldValueMetaData(TType.I64)));
33555
    }});
33556
 
33557
    static {
771 rajveer 33558
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
553 chandransh 33559
    }
33560
 
771 rajveer 33561
    public updateBrowseHistory_args() {
553 chandransh 33562
    }
33563
 
771 rajveer 33564
    public updateBrowseHistory_args(
33565
      long userId,
33566
      long itemId)
553 chandransh 33567
    {
33568
      this();
771 rajveer 33569
      this.userId = userId;
33570
      setUserIdIsSet(true);
33571
      this.itemId = itemId;
33572
      setItemIdIsSet(true);
553 chandransh 33573
    }
33574
 
33575
    /**
33576
     * Performs a deep copy on <i>other</i>.
33577
     */
771 rajveer 33578
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
553 chandransh 33579
      __isset_bit_vector.clear();
33580
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 33581
      this.userId = other.userId;
33582
      this.itemId = other.itemId;
553 chandransh 33583
    }
33584
 
771 rajveer 33585
    public updateBrowseHistory_args deepCopy() {
33586
      return new updateBrowseHistory_args(this);
553 chandransh 33587
    }
33588
 
33589
    @Deprecated
771 rajveer 33590
    public updateBrowseHistory_args clone() {
33591
      return new updateBrowseHistory_args(this);
553 chandransh 33592
    }
33593
 
771 rajveer 33594
    public long getUserId() {
33595
      return this.userId;
553 chandransh 33596
    }
33597
 
771 rajveer 33598
    public updateBrowseHistory_args setUserId(long userId) {
33599
      this.userId = userId;
33600
      setUserIdIsSet(true);
130 ashish 33601
      return this;
33602
    }
33603
 
771 rajveer 33604
    public void unsetUserId() {
33605
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 33606
    }
33607
 
771 rajveer 33608
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
33609
    public boolean isSetUserId() {
33610
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 33611
    }
33612
 
771 rajveer 33613
    public void setUserIdIsSet(boolean value) {
33614
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 33615
    }
33616
 
771 rajveer 33617
    public long getItemId() {
33618
      return this.itemId;
553 chandransh 33619
    }
33620
 
771 rajveer 33621
    public updateBrowseHistory_args setItemId(long itemId) {
33622
      this.itemId = itemId;
33623
      setItemIdIsSet(true);
553 chandransh 33624
      return this;
33625
    }
33626
 
771 rajveer 33627
    public void unsetItemId() {
33628
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 33629
    }
33630
 
771 rajveer 33631
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
33632
    public boolean isSetItemId() {
33633
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 33634
    }
33635
 
771 rajveer 33636
    public void setItemIdIsSet(boolean value) {
33637
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 33638
    }
33639
 
130 ashish 33640
    public void setFieldValue(_Fields field, Object value) {
33641
      switch (field) {
771 rajveer 33642
      case USER_ID:
130 ashish 33643
        if (value == null) {
771 rajveer 33644
          unsetUserId();
130 ashish 33645
        } else {
771 rajveer 33646
          setUserId((Long)value);
130 ashish 33647
        }
33648
        break;
33649
 
771 rajveer 33650
      case ITEM_ID:
130 ashish 33651
        if (value == null) {
771 rajveer 33652
          unsetItemId();
130 ashish 33653
        } else {
771 rajveer 33654
          setItemId((Long)value);
130 ashish 33655
        }
33656
        break;
33657
 
33658
      }
33659
    }
33660
 
33661
    public void setFieldValue(int fieldID, Object value) {
33662
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33663
    }
33664
 
33665
    public Object getFieldValue(_Fields field) {
33666
      switch (field) {
771 rajveer 33667
      case USER_ID:
33668
        return new Long(getUserId());
33669
 
553 chandransh 33670
      case ITEM_ID:
771 rajveer 33671
        return new Long(getItemId());
130 ashish 33672
 
33673
      }
33674
      throw new IllegalStateException();
33675
    }
33676
 
33677
    public Object getFieldValue(int fieldId) {
33678
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33679
    }
33680
 
33681
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33682
    public boolean isSet(_Fields field) {
33683
      switch (field) {
771 rajveer 33684
      case USER_ID:
33685
        return isSetUserId();
553 chandransh 33686
      case ITEM_ID:
771 rajveer 33687
        return isSetItemId();
130 ashish 33688
      }
33689
      throw new IllegalStateException();
33690
    }
33691
 
33692
    public boolean isSet(int fieldID) {
33693
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33694
    }
33695
 
33696
    @Override
33697
    public boolean equals(Object that) {
33698
      if (that == null)
33699
        return false;
771 rajveer 33700
      if (that instanceof updateBrowseHistory_args)
33701
        return this.equals((updateBrowseHistory_args)that);
130 ashish 33702
      return false;
33703
    }
33704
 
771 rajveer 33705
    public boolean equals(updateBrowseHistory_args that) {
130 ashish 33706
      if (that == null)
33707
        return false;
33708
 
771 rajveer 33709
      boolean this_present_userId = true;
33710
      boolean that_present_userId = true;
33711
      if (this_present_userId || that_present_userId) {
33712
        if (!(this_present_userId && that_present_userId))
130 ashish 33713
          return false;
771 rajveer 33714
        if (this.userId != that.userId)
130 ashish 33715
          return false;
33716
      }
33717
 
771 rajveer 33718
      boolean this_present_itemId = true;
33719
      boolean that_present_itemId = true;
33720
      if (this_present_itemId || that_present_itemId) {
33721
        if (!(this_present_itemId && that_present_itemId))
130 ashish 33722
          return false;
771 rajveer 33723
        if (this.itemId != that.itemId)
130 ashish 33724
          return false;
33725
      }
33726
 
33727
      return true;
33728
    }
33729
 
33730
    @Override
33731
    public int hashCode() {
33732
      return 0;
33733
    }
33734
 
771 rajveer 33735
    public int compareTo(updateBrowseHistory_args other) {
130 ashish 33736
      if (!getClass().equals(other.getClass())) {
33737
        return getClass().getName().compareTo(other.getClass().getName());
33738
      }
33739
 
33740
      int lastComparison = 0;
771 rajveer 33741
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
130 ashish 33742
 
771 rajveer 33743
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 33744
      if (lastComparison != 0) {
33745
        return lastComparison;
33746
      }
771 rajveer 33747
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 33748
      if (lastComparison != 0) {
33749
        return lastComparison;
33750
      }
771 rajveer 33751
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
130 ashish 33752
      if (lastComparison != 0) {
33753
        return lastComparison;
33754
      }
771 rajveer 33755
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
130 ashish 33756
      if (lastComparison != 0) {
33757
        return lastComparison;
33758
      }
33759
      return 0;
33760
    }
33761
 
33762
    public void read(TProtocol iprot) throws TException {
33763
      TField field;
33764
      iprot.readStructBegin();
33765
      while (true)
33766
      {
33767
        field = iprot.readFieldBegin();
33768
        if (field.type == TType.STOP) { 
33769
          break;
33770
        }
33771
        _Fields fieldId = _Fields.findByThriftId(field.id);
33772
        if (fieldId == null) {
33773
          TProtocolUtil.skip(iprot, field.type);
33774
        } else {
33775
          switch (fieldId) {
771 rajveer 33776
            case USER_ID:
553 chandransh 33777
              if (field.type == TType.I64) {
771 rajveer 33778
                this.userId = iprot.readI64();
33779
                setUserIdIsSet(true);
130 ashish 33780
              } else { 
33781
                TProtocolUtil.skip(iprot, field.type);
33782
              }
33783
              break;
771 rajveer 33784
            case ITEM_ID:
553 chandransh 33785
              if (field.type == TType.I64) {
771 rajveer 33786
                this.itemId = iprot.readI64();
33787
                setItemIdIsSet(true);
553 chandransh 33788
              } else { 
33789
                TProtocolUtil.skip(iprot, field.type);
33790
              }
33791
              break;
130 ashish 33792
          }
33793
          iprot.readFieldEnd();
33794
        }
33795
      }
33796
      iprot.readStructEnd();
33797
      validate();
33798
    }
33799
 
33800
    public void write(TProtocol oprot) throws TException {
33801
      validate();
33802
 
33803
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 33804
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
33805
      oprot.writeI64(this.userId);
33806
      oprot.writeFieldEnd();
553 chandransh 33807
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 33808
      oprot.writeI64(this.itemId);
553 chandransh 33809
      oprot.writeFieldEnd();
130 ashish 33810
      oprot.writeFieldStop();
33811
      oprot.writeStructEnd();
33812
    }
33813
 
33814
    @Override
33815
    public String toString() {
771 rajveer 33816
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
130 ashish 33817
      boolean first = true;
33818
 
771 rajveer 33819
      sb.append("userId:");
33820
      sb.append(this.userId);
553 chandransh 33821
      first = false;
33822
      if (!first) sb.append(", ");
771 rajveer 33823
      sb.append("itemId:");
33824
      sb.append(this.itemId);
130 ashish 33825
      first = false;
33826
      sb.append(")");
33827
      return sb.toString();
33828
    }
33829
 
33830
    public void validate() throws TException {
33831
      // check for required fields
33832
    }
33833
 
33834
  }
33835
 
771 rajveer 33836
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
33837
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
130 ashish 33838
 
33839
 
33840
 
33841
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33842
    public enum _Fields implements TFieldIdEnum {
553 chandransh 33843
;
33844
 
33845
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33846
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33847
 
33848
      static {
33849
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33850
          byId.put((int)field._thriftId, field);
33851
          byName.put(field.getFieldName(), field);
33852
        }
33853
      }
33854
 
33855
      /**
33856
       * Find the _Fields constant that matches fieldId, or null if its not found.
33857
       */
33858
      public static _Fields findByThriftId(int fieldId) {
33859
        return byId.get(fieldId);
33860
      }
33861
 
33862
      /**
33863
       * Find the _Fields constant that matches fieldId, throwing an exception
33864
       * if it is not found.
33865
       */
33866
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33867
        _Fields fields = findByThriftId(fieldId);
33868
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33869
        return fields;
33870
      }
33871
 
33872
      /**
33873
       * Find the _Fields constant that matches name, or null if its not found.
33874
       */
33875
      public static _Fields findByName(String name) {
33876
        return byName.get(name);
33877
      }
33878
 
33879
      private final short _thriftId;
33880
      private final String _fieldName;
33881
 
33882
      _Fields(short thriftId, String fieldName) {
33883
        _thriftId = thriftId;
33884
        _fieldName = fieldName;
33885
      }
33886
 
33887
      public short getThriftFieldId() {
33888
        return _thriftId;
33889
      }
33890
 
33891
      public String getFieldName() {
33892
        return _fieldName;
33893
      }
33894
    }
33895
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33896
    }});
33897
 
33898
    static {
771 rajveer 33899
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
553 chandransh 33900
    }
33901
 
771 rajveer 33902
    public updateBrowseHistory_result() {
553 chandransh 33903
    }
33904
 
33905
    /**
33906
     * Performs a deep copy on <i>other</i>.
33907
     */
771 rajveer 33908
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
553 chandransh 33909
    }
33910
 
771 rajveer 33911
    public updateBrowseHistory_result deepCopy() {
33912
      return new updateBrowseHistory_result(this);
553 chandransh 33913
    }
33914
 
33915
    @Deprecated
771 rajveer 33916
    public updateBrowseHistory_result clone() {
33917
      return new updateBrowseHistory_result(this);
553 chandransh 33918
    }
33919
 
33920
    public void setFieldValue(_Fields field, Object value) {
33921
      switch (field) {
33922
      }
33923
    }
33924
 
33925
    public void setFieldValue(int fieldID, Object value) {
33926
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33927
    }
33928
 
33929
    public Object getFieldValue(_Fields field) {
33930
      switch (field) {
33931
      }
33932
      throw new IllegalStateException();
33933
    }
33934
 
33935
    public Object getFieldValue(int fieldId) {
33936
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33937
    }
33938
 
33939
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33940
    public boolean isSet(_Fields field) {
33941
      switch (field) {
33942
      }
33943
      throw new IllegalStateException();
33944
    }
33945
 
33946
    public boolean isSet(int fieldID) {
33947
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33948
    }
33949
 
33950
    @Override
33951
    public boolean equals(Object that) {
33952
      if (that == null)
33953
        return false;
771 rajveer 33954
      if (that instanceof updateBrowseHistory_result)
33955
        return this.equals((updateBrowseHistory_result)that);
553 chandransh 33956
      return false;
33957
    }
33958
 
771 rajveer 33959
    public boolean equals(updateBrowseHistory_result that) {
553 chandransh 33960
      if (that == null)
33961
        return false;
33962
 
33963
      return true;
33964
    }
33965
 
33966
    @Override
33967
    public int hashCode() {
33968
      return 0;
33969
    }
33970
 
771 rajveer 33971
    public int compareTo(updateBrowseHistory_result other) {
553 chandransh 33972
      if (!getClass().equals(other.getClass())) {
33973
        return getClass().getName().compareTo(other.getClass().getName());
33974
      }
33975
 
33976
      int lastComparison = 0;
771 rajveer 33977
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
553 chandransh 33978
 
33979
      return 0;
33980
    }
33981
 
33982
    public void read(TProtocol iprot) throws TException {
33983
      TField field;
33984
      iprot.readStructBegin();
33985
      while (true)
33986
      {
33987
        field = iprot.readFieldBegin();
33988
        if (field.type == TType.STOP) { 
33989
          break;
33990
        }
33991
        _Fields fieldId = _Fields.findByThriftId(field.id);
33992
        if (fieldId == null) {
33993
          TProtocolUtil.skip(iprot, field.type);
33994
        } else {
33995
          switch (fieldId) {
33996
          }
33997
          iprot.readFieldEnd();
33998
        }
33999
      }
34000
      iprot.readStructEnd();
34001
      validate();
34002
    }
34003
 
34004
    public void write(TProtocol oprot) throws TException {
34005
      oprot.writeStructBegin(STRUCT_DESC);
34006
 
34007
      oprot.writeFieldStop();
34008
      oprot.writeStructEnd();
34009
    }
34010
 
34011
    @Override
34012
    public String toString() {
771 rajveer 34013
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
553 chandransh 34014
      boolean first = true;
34015
 
34016
      sb.append(")");
34017
      return sb.toString();
34018
    }
34019
 
34020
    public void validate() throws TException {
34021
      // check for required fields
34022
    }
34023
 
34024
  }
34025
 
771 rajveer 34026
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
34027
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
553 chandransh 34028
 
771 rajveer 34029
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 34030
 
771 rajveer 34031
    private long userId;
553 chandransh 34032
 
34033
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34034
    public enum _Fields implements TFieldIdEnum {
771 rajveer 34035
      USER_ID((short)1, "userId");
553 chandransh 34036
 
34037
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34038
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34039
 
34040
      static {
34041
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34042
          byId.put((int)field._thriftId, field);
34043
          byName.put(field.getFieldName(), field);
34044
        }
34045
      }
34046
 
34047
      /**
34048
       * Find the _Fields constant that matches fieldId, or null if its not found.
34049
       */
34050
      public static _Fields findByThriftId(int fieldId) {
34051
        return byId.get(fieldId);
34052
      }
34053
 
34054
      /**
34055
       * Find the _Fields constant that matches fieldId, throwing an exception
34056
       * if it is not found.
34057
       */
34058
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34059
        _Fields fields = findByThriftId(fieldId);
34060
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34061
        return fields;
34062
      }
34063
 
34064
      /**
34065
       * Find the _Fields constant that matches name, or null if its not found.
34066
       */
34067
      public static _Fields findByName(String name) {
34068
        return byName.get(name);
34069
      }
34070
 
34071
      private final short _thriftId;
34072
      private final String _fieldName;
34073
 
34074
      _Fields(short thriftId, String fieldName) {
34075
        _thriftId = thriftId;
34076
        _fieldName = fieldName;
34077
      }
34078
 
34079
      public short getThriftFieldId() {
34080
        return _thriftId;
34081
      }
34082
 
34083
      public String getFieldName() {
34084
        return _fieldName;
34085
      }
34086
    }
34087
 
34088
    // isset id assignments
771 rajveer 34089
    private static final int __USERID_ISSET_ID = 0;
34090
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 34091
 
34092
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 34093
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 34094
          new FieldValueMetaData(TType.I64)));
34095
    }});
34096
 
34097
    static {
771 rajveer 34098
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
553 chandransh 34099
    }
34100
 
771 rajveer 34101
    public getBrowseHistory_args() {
553 chandransh 34102
    }
34103
 
771 rajveer 34104
    public getBrowseHistory_args(
34105
      long userId)
553 chandransh 34106
    {
34107
      this();
771 rajveer 34108
      this.userId = userId;
34109
      setUserIdIsSet(true);
553 chandransh 34110
    }
34111
 
34112
    /**
34113
     * Performs a deep copy on <i>other</i>.
34114
     */
771 rajveer 34115
    public getBrowseHistory_args(getBrowseHistory_args other) {
553 chandransh 34116
      __isset_bit_vector.clear();
34117
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 34118
      this.userId = other.userId;
553 chandransh 34119
    }
34120
 
771 rajveer 34121
    public getBrowseHistory_args deepCopy() {
34122
      return new getBrowseHistory_args(this);
553 chandransh 34123
    }
34124
 
34125
    @Deprecated
771 rajveer 34126
    public getBrowseHistory_args clone() {
34127
      return new getBrowseHistory_args(this);
553 chandransh 34128
    }
34129
 
771 rajveer 34130
    public long getUserId() {
34131
      return this.userId;
553 chandransh 34132
    }
34133
 
771 rajveer 34134
    public getBrowseHistory_args setUserId(long userId) {
34135
      this.userId = userId;
34136
      setUserIdIsSet(true);
553 chandransh 34137
      return this;
34138
    }
34139
 
771 rajveer 34140
    public void unsetUserId() {
34141
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 34142
    }
34143
 
771 rajveer 34144
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
34145
    public boolean isSetUserId() {
34146
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 34147
    }
34148
 
771 rajveer 34149
    public void setUserIdIsSet(boolean value) {
34150
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 34151
    }
34152
 
34153
    public void setFieldValue(_Fields field, Object value) {
34154
      switch (field) {
34155
      case USER_ID:
34156
        if (value == null) {
771 rajveer 34157
          unsetUserId();
553 chandransh 34158
        } else {
771 rajveer 34159
          setUserId((Long)value);
553 chandransh 34160
        }
34161
        break;
34162
 
34163
      }
34164
    }
34165
 
34166
    public void setFieldValue(int fieldID, Object value) {
34167
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34168
    }
34169
 
34170
    public Object getFieldValue(_Fields field) {
34171
      switch (field) {
34172
      case USER_ID:
771 rajveer 34173
        return new Long(getUserId());
553 chandransh 34174
 
34175
      }
34176
      throw new IllegalStateException();
34177
    }
34178
 
34179
    public Object getFieldValue(int fieldId) {
34180
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34181
    }
34182
 
34183
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34184
    public boolean isSet(_Fields field) {
34185
      switch (field) {
34186
      case USER_ID:
771 rajveer 34187
        return isSetUserId();
553 chandransh 34188
      }
34189
      throw new IllegalStateException();
34190
    }
34191
 
34192
    public boolean isSet(int fieldID) {
34193
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34194
    }
34195
 
34196
    @Override
34197
    public boolean equals(Object that) {
34198
      if (that == null)
34199
        return false;
771 rajveer 34200
      if (that instanceof getBrowseHistory_args)
34201
        return this.equals((getBrowseHistory_args)that);
553 chandransh 34202
      return false;
34203
    }
34204
 
771 rajveer 34205
    public boolean equals(getBrowseHistory_args that) {
553 chandransh 34206
      if (that == null)
34207
        return false;
34208
 
771 rajveer 34209
      boolean this_present_userId = true;
34210
      boolean that_present_userId = true;
34211
      if (this_present_userId || that_present_userId) {
34212
        if (!(this_present_userId && that_present_userId))
553 chandransh 34213
          return false;
771 rajveer 34214
        if (this.userId != that.userId)
553 chandransh 34215
          return false;
34216
      }
34217
 
34218
      return true;
34219
    }
34220
 
34221
    @Override
34222
    public int hashCode() {
34223
      return 0;
34224
    }
34225
 
771 rajveer 34226
    public int compareTo(getBrowseHistory_args other) {
553 chandransh 34227
      if (!getClass().equals(other.getClass())) {
34228
        return getClass().getName().compareTo(other.getClass().getName());
34229
      }
34230
 
34231
      int lastComparison = 0;
771 rajveer 34232
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
553 chandransh 34233
 
771 rajveer 34234
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 34235
      if (lastComparison != 0) {
34236
        return lastComparison;
34237
      }
771 rajveer 34238
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 34239
      if (lastComparison != 0) {
34240
        return lastComparison;
34241
      }
34242
      return 0;
34243
    }
34244
 
34245
    public void read(TProtocol iprot) throws TException {
34246
      TField field;
34247
      iprot.readStructBegin();
34248
      while (true)
34249
      {
34250
        field = iprot.readFieldBegin();
34251
        if (field.type == TType.STOP) { 
34252
          break;
34253
        }
34254
        _Fields fieldId = _Fields.findByThriftId(field.id);
34255
        if (fieldId == null) {
34256
          TProtocolUtil.skip(iprot, field.type);
34257
        } else {
34258
          switch (fieldId) {
34259
            case USER_ID:
34260
              if (field.type == TType.I64) {
771 rajveer 34261
                this.userId = iprot.readI64();
34262
                setUserIdIsSet(true);
553 chandransh 34263
              } else { 
34264
                TProtocolUtil.skip(iprot, field.type);
34265
              }
34266
              break;
34267
          }
34268
          iprot.readFieldEnd();
34269
        }
34270
      }
34271
      iprot.readStructEnd();
34272
      validate();
34273
    }
34274
 
34275
    public void write(TProtocol oprot) throws TException {
34276
      validate();
34277
 
34278
      oprot.writeStructBegin(STRUCT_DESC);
34279
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 34280
      oprot.writeI64(this.userId);
553 chandransh 34281
      oprot.writeFieldEnd();
34282
      oprot.writeFieldStop();
34283
      oprot.writeStructEnd();
34284
    }
34285
 
34286
    @Override
34287
    public String toString() {
771 rajveer 34288
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
553 chandransh 34289
      boolean first = true;
34290
 
771 rajveer 34291
      sb.append("userId:");
34292
      sb.append(this.userId);
553 chandransh 34293
      first = false;
34294
      sb.append(")");
34295
      return sb.toString();
34296
    }
34297
 
34298
    public void validate() throws TException {
34299
      // check for required fields
34300
    }
34301
 
34302
  }
34303
 
771 rajveer 34304
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
34305
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
553 chandransh 34306
 
34307
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
34308
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
34309
 
771 rajveer 34310
    private Widget success;
553 chandransh 34311
    private WidgetException scx;
34312
 
34313
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34314
    public enum _Fields implements TFieldIdEnum {
130 ashish 34315
      SUCCESS((short)0, "success"),
553 chandransh 34316
      SCX((short)1, "scx");
130 ashish 34317
 
34318
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34319
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34320
 
34321
      static {
34322
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34323
          byId.put((int)field._thriftId, field);
34324
          byName.put(field.getFieldName(), field);
34325
        }
34326
      }
34327
 
34328
      /**
34329
       * Find the _Fields constant that matches fieldId, or null if its not found.
34330
       */
34331
      public static _Fields findByThriftId(int fieldId) {
34332
        return byId.get(fieldId);
34333
      }
34334
 
34335
      /**
34336
       * Find the _Fields constant that matches fieldId, throwing an exception
34337
       * if it is not found.
34338
       */
34339
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34340
        _Fields fields = findByThriftId(fieldId);
34341
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34342
        return fields;
34343
      }
34344
 
34345
      /**
34346
       * Find the _Fields constant that matches name, or null if its not found.
34347
       */
34348
      public static _Fields findByName(String name) {
34349
        return byName.get(name);
34350
      }
34351
 
34352
      private final short _thriftId;
34353
      private final String _fieldName;
34354
 
34355
      _Fields(short thriftId, String fieldName) {
34356
        _thriftId = thriftId;
34357
        _fieldName = fieldName;
34358
      }
34359
 
34360
      public short getThriftFieldId() {
34361
        return _thriftId;
34362
      }
34363
 
34364
      public String getFieldName() {
34365
        return _fieldName;
34366
      }
34367
    }
34368
 
34369
    // isset id assignments
34370
 
34371
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34372
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
771 rajveer 34373
          new StructMetaData(TType.STRUCT, Widget.class)));
553 chandransh 34374
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 34375
          new FieldValueMetaData(TType.STRUCT)));
34376
    }});
34377
 
34378
    static {
771 rajveer 34379
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
130 ashish 34380
    }
34381
 
771 rajveer 34382
    public getBrowseHistory_result() {
130 ashish 34383
    }
34384
 
771 rajveer 34385
    public getBrowseHistory_result(
34386
      Widget success,
553 chandransh 34387
      WidgetException scx)
130 ashish 34388
    {
34389
      this();
34390
      this.success = success;
553 chandransh 34391
      this.scx = scx;
130 ashish 34392
    }
34393
 
34394
    /**
34395
     * Performs a deep copy on <i>other</i>.
34396
     */
771 rajveer 34397
    public getBrowseHistory_result(getBrowseHistory_result other) {
553 chandransh 34398
      if (other.isSetSuccess()) {
771 rajveer 34399
        this.success = new Widget(other.success);
553 chandransh 34400
      }
34401
      if (other.isSetScx()) {
34402
        this.scx = new WidgetException(other.scx);
34403
      }
34404
    }
34405
 
771 rajveer 34406
    public getBrowseHistory_result deepCopy() {
34407
      return new getBrowseHistory_result(this);
553 chandransh 34408
    }
34409
 
34410
    @Deprecated
771 rajveer 34411
    public getBrowseHistory_result clone() {
34412
      return new getBrowseHistory_result(this);
553 chandransh 34413
    }
34414
 
771 rajveer 34415
    public Widget getSuccess() {
553 chandransh 34416
      return this.success;
34417
    }
34418
 
771 rajveer 34419
    public getBrowseHistory_result setSuccess(Widget success) {
553 chandransh 34420
      this.success = success;
34421
      return this;
34422
    }
34423
 
34424
    public void unsetSuccess() {
34425
      this.success = null;
34426
    }
34427
 
34428
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
34429
    public boolean isSetSuccess() {
34430
      return this.success != null;
34431
    }
34432
 
34433
    public void setSuccessIsSet(boolean value) {
34434
      if (!value) {
34435
        this.success = null;
34436
      }
34437
    }
34438
 
34439
    public WidgetException getScx() {
34440
      return this.scx;
34441
    }
34442
 
771 rajveer 34443
    public getBrowseHistory_result setScx(WidgetException scx) {
553 chandransh 34444
      this.scx = scx;
34445
      return this;
34446
    }
34447
 
34448
    public void unsetScx() {
34449
      this.scx = null;
34450
    }
34451
 
34452
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
34453
    public boolean isSetScx() {
34454
      return this.scx != null;
34455
    }
34456
 
34457
    public void setScxIsSet(boolean value) {
34458
      if (!value) {
34459
        this.scx = null;
34460
      }
34461
    }
34462
 
34463
    public void setFieldValue(_Fields field, Object value) {
34464
      switch (field) {
34465
      case SUCCESS:
34466
        if (value == null) {
34467
          unsetSuccess();
34468
        } else {
771 rajveer 34469
          setSuccess((Widget)value);
553 chandransh 34470
        }
34471
        break;
34472
 
34473
      case SCX:
34474
        if (value == null) {
34475
          unsetScx();
34476
        } else {
34477
          setScx((WidgetException)value);
34478
        }
34479
        break;
34480
 
34481
      }
34482
    }
34483
 
34484
    public void setFieldValue(int fieldID, Object value) {
34485
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34486
    }
34487
 
34488
    public Object getFieldValue(_Fields field) {
34489
      switch (field) {
34490
      case SUCCESS:
34491
        return getSuccess();
34492
 
34493
      case SCX:
34494
        return getScx();
34495
 
34496
      }
34497
      throw new IllegalStateException();
34498
    }
34499
 
34500
    public Object getFieldValue(int fieldId) {
34501
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34502
    }
34503
 
34504
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34505
    public boolean isSet(_Fields field) {
34506
      switch (field) {
34507
      case SUCCESS:
34508
        return isSetSuccess();
34509
      case SCX:
34510
        return isSetScx();
34511
      }
34512
      throw new IllegalStateException();
34513
    }
34514
 
34515
    public boolean isSet(int fieldID) {
34516
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34517
    }
34518
 
34519
    @Override
34520
    public boolean equals(Object that) {
34521
      if (that == null)
34522
        return false;
771 rajveer 34523
      if (that instanceof getBrowseHistory_result)
34524
        return this.equals((getBrowseHistory_result)that);
553 chandransh 34525
      return false;
34526
    }
34527
 
771 rajveer 34528
    public boolean equals(getBrowseHistory_result that) {
553 chandransh 34529
      if (that == null)
34530
        return false;
34531
 
34532
      boolean this_present_success = true && this.isSetSuccess();
34533
      boolean that_present_success = true && that.isSetSuccess();
34534
      if (this_present_success || that_present_success) {
34535
        if (!(this_present_success && that_present_success))
34536
          return false;
34537
        if (!this.success.equals(that.success))
34538
          return false;
34539
      }
34540
 
34541
      boolean this_present_scx = true && this.isSetScx();
34542
      boolean that_present_scx = true && that.isSetScx();
34543
      if (this_present_scx || that_present_scx) {
34544
        if (!(this_present_scx && that_present_scx))
34545
          return false;
34546
        if (!this.scx.equals(that.scx))
34547
          return false;
34548
      }
34549
 
34550
      return true;
34551
    }
34552
 
34553
    @Override
34554
    public int hashCode() {
34555
      return 0;
34556
    }
34557
 
771 rajveer 34558
    public int compareTo(getBrowseHistory_result other) {
34559
      if (!getClass().equals(other.getClass())) {
34560
        return getClass().getName().compareTo(other.getClass().getName());
34561
      }
34562
 
34563
      int lastComparison = 0;
34564
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
34565
 
34566
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
34567
      if (lastComparison != 0) {
34568
        return lastComparison;
34569
      }
34570
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
34571
      if (lastComparison != 0) {
34572
        return lastComparison;
34573
      }
34574
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
34575
      if (lastComparison != 0) {
34576
        return lastComparison;
34577
      }
34578
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
34579
      if (lastComparison != 0) {
34580
        return lastComparison;
34581
      }
34582
      return 0;
34583
    }
34584
 
553 chandransh 34585
    public void read(TProtocol iprot) throws TException {
34586
      TField field;
34587
      iprot.readStructBegin();
34588
      while (true)
34589
      {
34590
        field = iprot.readFieldBegin();
34591
        if (field.type == TType.STOP) { 
34592
          break;
34593
        }
34594
        _Fields fieldId = _Fields.findByThriftId(field.id);
34595
        if (fieldId == null) {
34596
          TProtocolUtil.skip(iprot, field.type);
34597
        } else {
34598
          switch (fieldId) {
34599
            case SUCCESS:
34600
              if (field.type == TType.STRUCT) {
771 rajveer 34601
                this.success = new Widget();
553 chandransh 34602
                this.success.read(iprot);
34603
              } else { 
34604
                TProtocolUtil.skip(iprot, field.type);
34605
              }
34606
              break;
34607
            case SCX:
34608
              if (field.type == TType.STRUCT) {
34609
                this.scx = new WidgetException();
34610
                this.scx.read(iprot);
34611
              } else { 
34612
                TProtocolUtil.skip(iprot, field.type);
34613
              }
34614
              break;
34615
          }
34616
          iprot.readFieldEnd();
34617
        }
34618
      }
34619
      iprot.readStructEnd();
34620
      validate();
34621
    }
34622
 
34623
    public void write(TProtocol oprot) throws TException {
34624
      oprot.writeStructBegin(STRUCT_DESC);
34625
 
34626
      if (this.isSetSuccess()) {
34627
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
34628
        this.success.write(oprot);
34629
        oprot.writeFieldEnd();
34630
      } else if (this.isSetScx()) {
34631
        oprot.writeFieldBegin(SCX_FIELD_DESC);
34632
        this.scx.write(oprot);
34633
        oprot.writeFieldEnd();
34634
      }
34635
      oprot.writeFieldStop();
34636
      oprot.writeStructEnd();
34637
    }
34638
 
34639
    @Override
34640
    public String toString() {
771 rajveer 34641
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
553 chandransh 34642
      boolean first = true;
34643
 
34644
      sb.append("success:");
34645
      if (this.success == null) {
34646
        sb.append("null");
34647
      } else {
34648
        sb.append(this.success);
34649
      }
34650
      first = false;
34651
      if (!first) sb.append(", ");
34652
      sb.append("scx:");
34653
      if (this.scx == null) {
34654
        sb.append("null");
34655
      } else {
34656
        sb.append(this.scx);
34657
      }
34658
      first = false;
34659
      sb.append(")");
34660
      return sb.toString();
34661
    }
34662
 
34663
    public void validate() throws TException {
34664
      // check for required fields
34665
    }
34666
 
34667
  }
34668
 
771 rajveer 34669
  public static class mergeBrowseHistory_args implements TBase<mergeBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_args>   {
34670
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_args");
553 chandransh 34671
 
771 rajveer 34672
    private static final TField FROM_USER_ID_FIELD_DESC = new TField("fromUserId", TType.I64, (short)1);
34673
    private static final TField TO_USER_ID_FIELD_DESC = new TField("toUserId", TType.I64, (short)2);
553 chandransh 34674
 
771 rajveer 34675
    private long fromUserId;
34676
    private long toUserId;
553 chandransh 34677
 
34678
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34679
    public enum _Fields implements TFieldIdEnum {
771 rajveer 34680
      FROM_USER_ID((short)1, "fromUserId"),
34681
      TO_USER_ID((short)2, "toUserId");
553 chandransh 34682
 
34683
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34684
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34685
 
34686
      static {
34687
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34688
          byId.put((int)field._thriftId, field);
34689
          byName.put(field.getFieldName(), field);
34690
        }
34691
      }
34692
 
34693
      /**
34694
       * Find the _Fields constant that matches fieldId, or null if its not found.
34695
       */
34696
      public static _Fields findByThriftId(int fieldId) {
34697
        return byId.get(fieldId);
34698
      }
34699
 
34700
      /**
34701
       * Find the _Fields constant that matches fieldId, throwing an exception
34702
       * if it is not found.
34703
       */
34704
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34705
        _Fields fields = findByThriftId(fieldId);
34706
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34707
        return fields;
34708
      }
34709
 
34710
      /**
34711
       * Find the _Fields constant that matches name, or null if its not found.
34712
       */
34713
      public static _Fields findByName(String name) {
34714
        return byName.get(name);
34715
      }
34716
 
34717
      private final short _thriftId;
34718
      private final String _fieldName;
34719
 
34720
      _Fields(short thriftId, String fieldName) {
34721
        _thriftId = thriftId;
34722
        _fieldName = fieldName;
34723
      }
34724
 
34725
      public short getThriftFieldId() {
34726
        return _thriftId;
34727
      }
34728
 
34729
      public String getFieldName() {
34730
        return _fieldName;
34731
      }
34732
    }
34733
 
34734
    // isset id assignments
771 rajveer 34735
    private static final int __FROMUSERID_ISSET_ID = 0;
34736
    private static final int __TOUSERID_ISSET_ID = 1;
34737
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 34738
 
34739
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 34740
      put(_Fields.FROM_USER_ID, new FieldMetaData("fromUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 34741
          new FieldValueMetaData(TType.I64)));
771 rajveer 34742
      put(_Fields.TO_USER_ID, new FieldMetaData("toUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 34743
          new FieldValueMetaData(TType.I64)));
34744
    }});
34745
 
34746
    static {
771 rajveer 34747
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_args.class, metaDataMap);
553 chandransh 34748
    }
34749
 
771 rajveer 34750
    public mergeBrowseHistory_args() {
553 chandransh 34751
    }
34752
 
771 rajveer 34753
    public mergeBrowseHistory_args(
34754
      long fromUserId,
34755
      long toUserId)
553 chandransh 34756
    {
34757
      this();
771 rajveer 34758
      this.fromUserId = fromUserId;
34759
      setFromUserIdIsSet(true);
34760
      this.toUserId = toUserId;
34761
      setToUserIdIsSet(true);
553 chandransh 34762
    }
34763
 
34764
    /**
34765
     * Performs a deep copy on <i>other</i>.
34766
     */
771 rajveer 34767
    public mergeBrowseHistory_args(mergeBrowseHistory_args other) {
130 ashish 34768
      __isset_bit_vector.clear();
34769
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 34770
      this.fromUserId = other.fromUserId;
34771
      this.toUserId = other.toUserId;
553 chandransh 34772
    }
34773
 
771 rajveer 34774
    public mergeBrowseHistory_args deepCopy() {
34775
      return new mergeBrowseHistory_args(this);
553 chandransh 34776
    }
34777
 
34778
    @Deprecated
771 rajveer 34779
    public mergeBrowseHistory_args clone() {
34780
      return new mergeBrowseHistory_args(this);
553 chandransh 34781
    }
34782
 
771 rajveer 34783
    public long getFromUserId() {
34784
      return this.fromUserId;
553 chandransh 34785
    }
34786
 
771 rajveer 34787
    public mergeBrowseHistory_args setFromUserId(long fromUserId) {
34788
      this.fromUserId = fromUserId;
34789
      setFromUserIdIsSet(true);
553 chandransh 34790
      return this;
34791
    }
34792
 
771 rajveer 34793
    public void unsetFromUserId() {
34794
      __isset_bit_vector.clear(__FROMUSERID_ISSET_ID);
553 chandransh 34795
    }
34796
 
771 rajveer 34797
    /** Returns true if field fromUserId is set (has been asigned a value) and false otherwise */
34798
    public boolean isSetFromUserId() {
34799
      return __isset_bit_vector.get(__FROMUSERID_ISSET_ID);
553 chandransh 34800
    }
34801
 
771 rajveer 34802
    public void setFromUserIdIsSet(boolean value) {
34803
      __isset_bit_vector.set(__FROMUSERID_ISSET_ID, value);
553 chandransh 34804
    }
34805
 
771 rajveer 34806
    public long getToUserId() {
34807
      return this.toUserId;
553 chandransh 34808
    }
34809
 
771 rajveer 34810
    public mergeBrowseHistory_args setToUserId(long toUserId) {
34811
      this.toUserId = toUserId;
34812
      setToUserIdIsSet(true);
553 chandransh 34813
      return this;
34814
    }
34815
 
771 rajveer 34816
    public void unsetToUserId() {
34817
      __isset_bit_vector.clear(__TOUSERID_ISSET_ID);
553 chandransh 34818
    }
34819
 
771 rajveer 34820
    /** Returns true if field toUserId is set (has been asigned a value) and false otherwise */
34821
    public boolean isSetToUserId() {
34822
      return __isset_bit_vector.get(__TOUSERID_ISSET_ID);
553 chandransh 34823
    }
34824
 
771 rajveer 34825
    public void setToUserIdIsSet(boolean value) {
34826
      __isset_bit_vector.set(__TOUSERID_ISSET_ID, value);
553 chandransh 34827
    }
34828
 
34829
    public void setFieldValue(_Fields field, Object value) {
34830
      switch (field) {
771 rajveer 34831
      case FROM_USER_ID:
553 chandransh 34832
        if (value == null) {
771 rajveer 34833
          unsetFromUserId();
553 chandransh 34834
        } else {
771 rajveer 34835
          setFromUserId((Long)value);
553 chandransh 34836
        }
34837
        break;
34838
 
771 rajveer 34839
      case TO_USER_ID:
553 chandransh 34840
        if (value == null) {
771 rajveer 34841
          unsetToUserId();
553 chandransh 34842
        } else {
771 rajveer 34843
          setToUserId((Long)value);
553 chandransh 34844
        }
34845
        break;
34846
 
130 ashish 34847
      }
34848
    }
34849
 
553 chandransh 34850
    public void setFieldValue(int fieldID, Object value) {
34851
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 34852
    }
34853
 
553 chandransh 34854
    public Object getFieldValue(_Fields field) {
34855
      switch (field) {
771 rajveer 34856
      case FROM_USER_ID:
34857
        return new Long(getFromUserId());
553 chandransh 34858
 
771 rajveer 34859
      case TO_USER_ID:
34860
        return new Long(getToUserId());
553 chandransh 34861
 
34862
      }
34863
      throw new IllegalStateException();
34864
    }
34865
 
34866
    public Object getFieldValue(int fieldId) {
34867
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34868
    }
34869
 
34870
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34871
    public boolean isSet(_Fields field) {
34872
      switch (field) {
771 rajveer 34873
      case FROM_USER_ID:
34874
        return isSetFromUserId();
34875
      case TO_USER_ID:
34876
        return isSetToUserId();
553 chandransh 34877
      }
34878
      throw new IllegalStateException();
34879
    }
34880
 
34881
    public boolean isSet(int fieldID) {
34882
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34883
    }
34884
 
34885
    @Override
34886
    public boolean equals(Object that) {
34887
      if (that == null)
34888
        return false;
771 rajveer 34889
      if (that instanceof mergeBrowseHistory_args)
34890
        return this.equals((mergeBrowseHistory_args)that);
553 chandransh 34891
      return false;
34892
    }
34893
 
771 rajveer 34894
    public boolean equals(mergeBrowseHistory_args that) {
553 chandransh 34895
      if (that == null)
34896
        return false;
34897
 
771 rajveer 34898
      boolean this_present_fromUserId = true;
34899
      boolean that_present_fromUserId = true;
34900
      if (this_present_fromUserId || that_present_fromUserId) {
34901
        if (!(this_present_fromUserId && that_present_fromUserId))
553 chandransh 34902
          return false;
771 rajveer 34903
        if (this.fromUserId != that.fromUserId)
553 chandransh 34904
          return false;
34905
      }
34906
 
771 rajveer 34907
      boolean this_present_toUserId = true;
34908
      boolean that_present_toUserId = true;
34909
      if (this_present_toUserId || that_present_toUserId) {
34910
        if (!(this_present_toUserId && that_present_toUserId))
553 chandransh 34911
          return false;
771 rajveer 34912
        if (this.toUserId != that.toUserId)
553 chandransh 34913
          return false;
34914
      }
34915
 
34916
      return true;
34917
    }
34918
 
34919
    @Override
34920
    public int hashCode() {
34921
      return 0;
34922
    }
34923
 
771 rajveer 34924
    public int compareTo(mergeBrowseHistory_args other) {
553 chandransh 34925
      if (!getClass().equals(other.getClass())) {
34926
        return getClass().getName().compareTo(other.getClass().getName());
34927
      }
34928
 
34929
      int lastComparison = 0;
771 rajveer 34930
      mergeBrowseHistory_args typedOther = (mergeBrowseHistory_args)other;
553 chandransh 34931
 
771 rajveer 34932
      lastComparison = Boolean.valueOf(isSetFromUserId()).compareTo(isSetFromUserId());
553 chandransh 34933
      if (lastComparison != 0) {
34934
        return lastComparison;
34935
      }
771 rajveer 34936
      lastComparison = TBaseHelper.compareTo(fromUserId, typedOther.fromUserId);
553 chandransh 34937
      if (lastComparison != 0) {
34938
        return lastComparison;
34939
      }
771 rajveer 34940
      lastComparison = Boolean.valueOf(isSetToUserId()).compareTo(isSetToUserId());
553 chandransh 34941
      if (lastComparison != 0) {
34942
        return lastComparison;
34943
      }
771 rajveer 34944
      lastComparison = TBaseHelper.compareTo(toUserId, typedOther.toUserId);
553 chandransh 34945
      if (lastComparison != 0) {
34946
        return lastComparison;
34947
      }
34948
      return 0;
34949
    }
34950
 
34951
    public void read(TProtocol iprot) throws TException {
34952
      TField field;
34953
      iprot.readStructBegin();
34954
      while (true)
34955
      {
34956
        field = iprot.readFieldBegin();
34957
        if (field.type == TType.STOP) { 
34958
          break;
34959
        }
34960
        _Fields fieldId = _Fields.findByThriftId(field.id);
34961
        if (fieldId == null) {
34962
          TProtocolUtil.skip(iprot, field.type);
34963
        } else {
34964
          switch (fieldId) {
771 rajveer 34965
            case FROM_USER_ID:
553 chandransh 34966
              if (field.type == TType.I64) {
771 rajveer 34967
                this.fromUserId = iprot.readI64();
34968
                setFromUserIdIsSet(true);
553 chandransh 34969
              } else { 
34970
                TProtocolUtil.skip(iprot, field.type);
34971
              }
34972
              break;
771 rajveer 34973
            case TO_USER_ID:
553 chandransh 34974
              if (field.type == TType.I64) {
771 rajveer 34975
                this.toUserId = iprot.readI64();
34976
                setToUserIdIsSet(true);
553 chandransh 34977
              } else { 
34978
                TProtocolUtil.skip(iprot, field.type);
34979
              }
34980
              break;
34981
          }
34982
          iprot.readFieldEnd();
34983
        }
34984
      }
34985
      iprot.readStructEnd();
34986
      validate();
34987
    }
34988
 
34989
    public void write(TProtocol oprot) throws TException {
34990
      validate();
34991
 
34992
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 34993
      oprot.writeFieldBegin(FROM_USER_ID_FIELD_DESC);
34994
      oprot.writeI64(this.fromUserId);
553 chandransh 34995
      oprot.writeFieldEnd();
771 rajveer 34996
      oprot.writeFieldBegin(TO_USER_ID_FIELD_DESC);
34997
      oprot.writeI64(this.toUserId);
553 chandransh 34998
      oprot.writeFieldEnd();
34999
      oprot.writeFieldStop();
35000
      oprot.writeStructEnd();
35001
    }
35002
 
35003
    @Override
35004
    public String toString() {
771 rajveer 35005
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_args(");
553 chandransh 35006
      boolean first = true;
35007
 
771 rajveer 35008
      sb.append("fromUserId:");
35009
      sb.append(this.fromUserId);
553 chandransh 35010
      first = false;
35011
      if (!first) sb.append(", ");
771 rajveer 35012
      sb.append("toUserId:");
35013
      sb.append(this.toUserId);
553 chandransh 35014
      first = false;
35015
      sb.append(")");
35016
      return sb.toString();
35017
    }
35018
 
35019
    public void validate() throws TException {
35020
      // check for required fields
35021
    }
35022
 
35023
  }
35024
 
771 rajveer 35025
  public static class mergeBrowseHistory_result implements TBase<mergeBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_result>   {
35026
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_result");
553 chandransh 35027
 
35028
 
35029
 
35030
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35031
    public enum _Fields implements TFieldIdEnum {
35032
;
35033
 
35034
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35035
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35036
 
35037
      static {
35038
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35039
          byId.put((int)field._thriftId, field);
35040
          byName.put(field.getFieldName(), field);
35041
        }
35042
      }
35043
 
35044
      /**
35045
       * Find the _Fields constant that matches fieldId, or null if its not found.
35046
       */
35047
      public static _Fields findByThriftId(int fieldId) {
35048
        return byId.get(fieldId);
35049
      }
35050
 
35051
      /**
35052
       * Find the _Fields constant that matches fieldId, throwing an exception
35053
       * if it is not found.
35054
       */
35055
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35056
        _Fields fields = findByThriftId(fieldId);
35057
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35058
        return fields;
35059
      }
35060
 
35061
      /**
35062
       * Find the _Fields constant that matches name, or null if its not found.
35063
       */
35064
      public static _Fields findByName(String name) {
35065
        return byName.get(name);
35066
      }
35067
 
35068
      private final short _thriftId;
35069
      private final String _fieldName;
35070
 
35071
      _Fields(short thriftId, String fieldName) {
35072
        _thriftId = thriftId;
35073
        _fieldName = fieldName;
35074
      }
35075
 
35076
      public short getThriftFieldId() {
35077
        return _thriftId;
35078
      }
35079
 
35080
      public String getFieldName() {
35081
        return _fieldName;
35082
      }
35083
    }
35084
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35085
    }});
35086
 
35087
    static {
771 rajveer 35088
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_result.class, metaDataMap);
553 chandransh 35089
    }
35090
 
771 rajveer 35091
    public mergeBrowseHistory_result() {
553 chandransh 35092
    }
35093
 
35094
    /**
35095
     * Performs a deep copy on <i>other</i>.
35096
     */
771 rajveer 35097
    public mergeBrowseHistory_result(mergeBrowseHistory_result other) {
553 chandransh 35098
    }
35099
 
771 rajveer 35100
    public mergeBrowseHistory_result deepCopy() {
35101
      return new mergeBrowseHistory_result(this);
553 chandransh 35102
    }
35103
 
130 ashish 35104
    @Deprecated
771 rajveer 35105
    public mergeBrowseHistory_result clone() {
35106
      return new mergeBrowseHistory_result(this);
130 ashish 35107
    }
35108
 
553 chandransh 35109
    public void setFieldValue(_Fields field, Object value) {
35110
      switch (field) {
35111
      }
35112
    }
35113
 
35114
    public void setFieldValue(int fieldID, Object value) {
35115
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35116
    }
35117
 
35118
    public Object getFieldValue(_Fields field) {
35119
      switch (field) {
35120
      }
35121
      throw new IllegalStateException();
35122
    }
35123
 
35124
    public Object getFieldValue(int fieldId) {
35125
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35126
    }
35127
 
35128
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35129
    public boolean isSet(_Fields field) {
35130
      switch (field) {
35131
      }
35132
      throw new IllegalStateException();
35133
    }
35134
 
35135
    public boolean isSet(int fieldID) {
35136
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35137
    }
35138
 
35139
    @Override
35140
    public boolean equals(Object that) {
35141
      if (that == null)
35142
        return false;
771 rajveer 35143
      if (that instanceof mergeBrowseHistory_result)
35144
        return this.equals((mergeBrowseHistory_result)that);
553 chandransh 35145
      return false;
35146
    }
35147
 
771 rajveer 35148
    public boolean equals(mergeBrowseHistory_result that) {
553 chandransh 35149
      if (that == null)
35150
        return false;
35151
 
35152
      return true;
35153
    }
35154
 
35155
    @Override
35156
    public int hashCode() {
35157
      return 0;
35158
    }
35159
 
771 rajveer 35160
    public int compareTo(mergeBrowseHistory_result other) {
553 chandransh 35161
      if (!getClass().equals(other.getClass())) {
35162
        return getClass().getName().compareTo(other.getClass().getName());
35163
      }
35164
 
35165
      int lastComparison = 0;
771 rajveer 35166
      mergeBrowseHistory_result typedOther = (mergeBrowseHistory_result)other;
553 chandransh 35167
 
35168
      return 0;
35169
    }
35170
 
35171
    public void read(TProtocol iprot) throws TException {
35172
      TField field;
35173
      iprot.readStructBegin();
35174
      while (true)
35175
      {
35176
        field = iprot.readFieldBegin();
35177
        if (field.type == TType.STOP) { 
35178
          break;
35179
        }
35180
        _Fields fieldId = _Fields.findByThriftId(field.id);
35181
        if (fieldId == null) {
35182
          TProtocolUtil.skip(iprot, field.type);
35183
        } else {
35184
          switch (fieldId) {
35185
          }
35186
          iprot.readFieldEnd();
35187
        }
35188
      }
35189
      iprot.readStructEnd();
35190
      validate();
35191
    }
35192
 
35193
    public void write(TProtocol oprot) throws TException {
35194
      oprot.writeStructBegin(STRUCT_DESC);
35195
 
35196
      oprot.writeFieldStop();
35197
      oprot.writeStructEnd();
35198
    }
35199
 
35200
    @Override
35201
    public String toString() {
771 rajveer 35202
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_result(");
553 chandransh 35203
      boolean first = true;
35204
 
35205
      sb.append(")");
35206
      return sb.toString();
35207
    }
35208
 
35209
    public void validate() throws TException {
35210
      // check for required fields
35211
    }
35212
 
35213
  }
35214
 
1598 ankur.sing 35215
  public static class getUserCount_args implements TBase<getUserCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCount_args>   {
35216
    private static final TStruct STRUCT_DESC = new TStruct("getUserCount_args");
35217
 
35218
    private static final TField USER_TYPE_FIELD_DESC = new TField("userType", TType.I32, (short)1);
35219
 
35220
    private UserType userType;
35221
 
35222
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35223
    public enum _Fields implements TFieldIdEnum {
35224
      /**
35225
       * 
35226
       * @see UserType
35227
       */
35228
      USER_TYPE((short)1, "userType");
35229
 
35230
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35231
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35232
 
35233
      static {
35234
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35235
          byId.put((int)field._thriftId, field);
35236
          byName.put(field.getFieldName(), field);
35237
        }
35238
      }
35239
 
35240
      /**
35241
       * Find the _Fields constant that matches fieldId, or null if its not found.
35242
       */
35243
      public static _Fields findByThriftId(int fieldId) {
35244
        return byId.get(fieldId);
35245
      }
35246
 
35247
      /**
35248
       * Find the _Fields constant that matches fieldId, throwing an exception
35249
       * if it is not found.
35250
       */
35251
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35252
        _Fields fields = findByThriftId(fieldId);
35253
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35254
        return fields;
35255
      }
35256
 
35257
      /**
35258
       * Find the _Fields constant that matches name, or null if its not found.
35259
       */
35260
      public static _Fields findByName(String name) {
35261
        return byName.get(name);
35262
      }
35263
 
35264
      private final short _thriftId;
35265
      private final String _fieldName;
35266
 
35267
      _Fields(short thriftId, String fieldName) {
35268
        _thriftId = thriftId;
35269
        _fieldName = fieldName;
35270
      }
35271
 
35272
      public short getThriftFieldId() {
35273
        return _thriftId;
35274
      }
35275
 
35276
      public String getFieldName() {
35277
        return _fieldName;
35278
      }
35279
    }
35280
 
35281
    // isset id assignments
35282
 
35283
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35284
      put(_Fields.USER_TYPE, new FieldMetaData("userType", TFieldRequirementType.DEFAULT, 
35285
          new EnumMetaData(TType.ENUM, UserType.class)));
35286
    }});
35287
 
35288
    static {
35289
      FieldMetaData.addStructMetaDataMap(getUserCount_args.class, metaDataMap);
35290
    }
35291
 
35292
    public getUserCount_args() {
35293
    }
35294
 
35295
    public getUserCount_args(
35296
      UserType userType)
35297
    {
35298
      this();
35299
      this.userType = userType;
35300
    }
35301
 
35302
    /**
35303
     * Performs a deep copy on <i>other</i>.
35304
     */
35305
    public getUserCount_args(getUserCount_args other) {
35306
      if (other.isSetUserType()) {
35307
        this.userType = other.userType;
35308
      }
35309
    }
35310
 
35311
    public getUserCount_args deepCopy() {
35312
      return new getUserCount_args(this);
35313
    }
35314
 
35315
    @Deprecated
35316
    public getUserCount_args clone() {
35317
      return new getUserCount_args(this);
35318
    }
35319
 
35320
    /**
35321
     * 
35322
     * @see UserType
35323
     */
35324
    public UserType getUserType() {
35325
      return this.userType;
35326
    }
35327
 
35328
    /**
35329
     * 
35330
     * @see UserType
35331
     */
35332
    public getUserCount_args setUserType(UserType userType) {
35333
      this.userType = userType;
35334
      return this;
35335
    }
35336
 
35337
    public void unsetUserType() {
35338
      this.userType = null;
35339
    }
35340
 
35341
    /** Returns true if field userType is set (has been asigned a value) and false otherwise */
35342
    public boolean isSetUserType() {
35343
      return this.userType != null;
35344
    }
35345
 
35346
    public void setUserTypeIsSet(boolean value) {
35347
      if (!value) {
35348
        this.userType = null;
35349
      }
35350
    }
35351
 
35352
    public void setFieldValue(_Fields field, Object value) {
35353
      switch (field) {
35354
      case USER_TYPE:
35355
        if (value == null) {
35356
          unsetUserType();
35357
        } else {
35358
          setUserType((UserType)value);
35359
        }
35360
        break;
35361
 
35362
      }
35363
    }
35364
 
35365
    public void setFieldValue(int fieldID, Object value) {
35366
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35367
    }
35368
 
35369
    public Object getFieldValue(_Fields field) {
35370
      switch (field) {
35371
      case USER_TYPE:
35372
        return getUserType();
35373
 
35374
      }
35375
      throw new IllegalStateException();
35376
    }
35377
 
35378
    public Object getFieldValue(int fieldId) {
35379
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35380
    }
35381
 
35382
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35383
    public boolean isSet(_Fields field) {
35384
      switch (field) {
35385
      case USER_TYPE:
35386
        return isSetUserType();
35387
      }
35388
      throw new IllegalStateException();
35389
    }
35390
 
35391
    public boolean isSet(int fieldID) {
35392
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35393
    }
35394
 
35395
    @Override
35396
    public boolean equals(Object that) {
35397
      if (that == null)
35398
        return false;
35399
      if (that instanceof getUserCount_args)
35400
        return this.equals((getUserCount_args)that);
35401
      return false;
35402
    }
35403
 
35404
    public boolean equals(getUserCount_args that) {
35405
      if (that == null)
35406
        return false;
35407
 
35408
      boolean this_present_userType = true && this.isSetUserType();
35409
      boolean that_present_userType = true && that.isSetUserType();
35410
      if (this_present_userType || that_present_userType) {
35411
        if (!(this_present_userType && that_present_userType))
35412
          return false;
35413
        if (!this.userType.equals(that.userType))
35414
          return false;
35415
      }
35416
 
35417
      return true;
35418
    }
35419
 
35420
    @Override
35421
    public int hashCode() {
35422
      return 0;
35423
    }
35424
 
35425
    public int compareTo(getUserCount_args other) {
35426
      if (!getClass().equals(other.getClass())) {
35427
        return getClass().getName().compareTo(other.getClass().getName());
35428
      }
35429
 
35430
      int lastComparison = 0;
35431
      getUserCount_args typedOther = (getUserCount_args)other;
35432
 
35433
      lastComparison = Boolean.valueOf(isSetUserType()).compareTo(isSetUserType());
35434
      if (lastComparison != 0) {
35435
        return lastComparison;
35436
      }
35437
      lastComparison = TBaseHelper.compareTo(userType, typedOther.userType);
35438
      if (lastComparison != 0) {
35439
        return lastComparison;
35440
      }
35441
      return 0;
35442
    }
35443
 
35444
    public void read(TProtocol iprot) throws TException {
35445
      TField field;
35446
      iprot.readStructBegin();
35447
      while (true)
35448
      {
35449
        field = iprot.readFieldBegin();
35450
        if (field.type == TType.STOP) { 
35451
          break;
35452
        }
35453
        _Fields fieldId = _Fields.findByThriftId(field.id);
35454
        if (fieldId == null) {
35455
          TProtocolUtil.skip(iprot, field.type);
35456
        } else {
35457
          switch (fieldId) {
35458
            case USER_TYPE:
35459
              if (field.type == TType.I32) {
35460
                this.userType = UserType.findByValue(iprot.readI32());
35461
              } else { 
35462
                TProtocolUtil.skip(iprot, field.type);
35463
              }
35464
              break;
35465
          }
35466
          iprot.readFieldEnd();
35467
        }
35468
      }
35469
      iprot.readStructEnd();
35470
      validate();
35471
    }
35472
 
35473
    public void write(TProtocol oprot) throws TException {
35474
      validate();
35475
 
35476
      oprot.writeStructBegin(STRUCT_DESC);
35477
      if (this.userType != null) {
35478
        oprot.writeFieldBegin(USER_TYPE_FIELD_DESC);
35479
        oprot.writeI32(this.userType.getValue());
35480
        oprot.writeFieldEnd();
35481
      }
35482
      oprot.writeFieldStop();
35483
      oprot.writeStructEnd();
35484
    }
35485
 
35486
    @Override
35487
    public String toString() {
35488
      StringBuilder sb = new StringBuilder("getUserCount_args(");
35489
      boolean first = true;
35490
 
35491
      sb.append("userType:");
35492
      if (this.userType == null) {
35493
        sb.append("null");
35494
      } else {
35495
        String userType_name = userType.name();
35496
        if (userType_name != null) {
35497
          sb.append(userType_name);
35498
          sb.append(" (");
35499
        }
35500
        sb.append(this.userType);
35501
        if (userType_name != null) {
35502
          sb.append(")");
35503
        }
35504
      }
35505
      first = false;
35506
      sb.append(")");
35507
      return sb.toString();
35508
    }
35509
 
35510
    public void validate() throws TException {
35511
      // check for required fields
35512
    }
35513
 
35514
  }
35515
 
35516
  public static class getUserCount_result implements TBase<getUserCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCount_result>   {
35517
    private static final TStruct STRUCT_DESC = new TStruct("getUserCount_result");
35518
 
35519
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
35520
 
35521
    private long success;
35522
 
35523
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35524
    public enum _Fields implements TFieldIdEnum {
35525
      SUCCESS((short)0, "success");
35526
 
35527
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
35528
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
35529
 
35530
      static {
35531
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
35532
          byId.put((int)field._thriftId, field);
35533
          byName.put(field.getFieldName(), field);
35534
        }
35535
      }
35536
 
35537
      /**
35538
       * Find the _Fields constant that matches fieldId, or null if its not found.
35539
       */
35540
      public static _Fields findByThriftId(int fieldId) {
35541
        return byId.get(fieldId);
35542
      }
35543
 
35544
      /**
35545
       * Find the _Fields constant that matches fieldId, throwing an exception
35546
       * if it is not found.
35547
       */
35548
      public static _Fields findByThriftIdOrThrow(int fieldId) {
35549
        _Fields fields = findByThriftId(fieldId);
35550
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
35551
        return fields;
35552
      }
35553
 
35554
      /**
35555
       * Find the _Fields constant that matches name, or null if its not found.
35556
       */
35557
      public static _Fields findByName(String name) {
35558
        return byName.get(name);
35559
      }
35560
 
35561
      private final short _thriftId;
35562
      private final String _fieldName;
35563
 
35564
      _Fields(short thriftId, String fieldName) {
35565
        _thriftId = thriftId;
35566
        _fieldName = fieldName;
35567
      }
35568
 
35569
      public short getThriftFieldId() {
35570
        return _thriftId;
35571
      }
35572
 
35573
      public String getFieldName() {
35574
        return _fieldName;
35575
      }
35576
    }
35577
 
35578
    // isset id assignments
35579
    private static final int __SUCCESS_ISSET_ID = 0;
35580
    private BitSet __isset_bit_vector = new BitSet(1);
35581
 
35582
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35583
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
35584
          new FieldValueMetaData(TType.I64)));
35585
    }});
35586
 
35587
    static {
35588
      FieldMetaData.addStructMetaDataMap(getUserCount_result.class, metaDataMap);
35589
    }
35590
 
35591
    public getUserCount_result() {
35592
    }
35593
 
35594
    public getUserCount_result(
35595
      long success)
35596
    {
35597
      this();
35598
      this.success = success;
35599
      setSuccessIsSet(true);
35600
    }
35601
 
35602
    /**
35603
     * Performs a deep copy on <i>other</i>.
35604
     */
35605
    public getUserCount_result(getUserCount_result other) {
35606
      __isset_bit_vector.clear();
35607
      __isset_bit_vector.or(other.__isset_bit_vector);
35608
      this.success = other.success;
35609
    }
35610
 
35611
    public getUserCount_result deepCopy() {
35612
      return new getUserCount_result(this);
35613
    }
35614
 
35615
    @Deprecated
35616
    public getUserCount_result clone() {
35617
      return new getUserCount_result(this);
35618
    }
35619
 
35620
    public long getSuccess() {
35621
      return this.success;
35622
    }
35623
 
35624
    public getUserCount_result setSuccess(long success) {
35625
      this.success = success;
35626
      setSuccessIsSet(true);
35627
      return this;
35628
    }
35629
 
35630
    public void unsetSuccess() {
35631
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
35632
    }
35633
 
35634
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
35635
    public boolean isSetSuccess() {
35636
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
35637
    }
35638
 
35639
    public void setSuccessIsSet(boolean value) {
35640
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
35641
    }
35642
 
35643
    public void setFieldValue(_Fields field, Object value) {
35644
      switch (field) {
35645
      case SUCCESS:
35646
        if (value == null) {
35647
          unsetSuccess();
35648
        } else {
35649
          setSuccess((Long)value);
35650
        }
35651
        break;
35652
 
35653
      }
35654
    }
35655
 
35656
    public void setFieldValue(int fieldID, Object value) {
35657
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35658
    }
35659
 
35660
    public Object getFieldValue(_Fields field) {
35661
      switch (field) {
35662
      case SUCCESS:
35663
        return new Long(getSuccess());
35664
 
35665
      }
35666
      throw new IllegalStateException();
35667
    }
35668
 
35669
    public Object getFieldValue(int fieldId) {
35670
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35671
    }
35672
 
35673
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35674
    public boolean isSet(_Fields field) {
35675
      switch (field) {
35676
      case SUCCESS:
35677
        return isSetSuccess();
35678
      }
35679
      throw new IllegalStateException();
35680
    }
35681
 
35682
    public boolean isSet(int fieldID) {
35683
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35684
    }
35685
 
35686
    @Override
35687
    public boolean equals(Object that) {
35688
      if (that == null)
35689
        return false;
35690
      if (that instanceof getUserCount_result)
35691
        return this.equals((getUserCount_result)that);
35692
      return false;
35693
    }
35694
 
35695
    public boolean equals(getUserCount_result that) {
35696
      if (that == null)
35697
        return false;
35698
 
35699
      boolean this_present_success = true;
35700
      boolean that_present_success = true;
35701
      if (this_present_success || that_present_success) {
35702
        if (!(this_present_success && that_present_success))
35703
          return false;
35704
        if (this.success != that.success)
35705
          return false;
35706
      }
35707
 
35708
      return true;
35709
    }
35710
 
35711
    @Override
35712
    public int hashCode() {
35713
      return 0;
35714
    }
35715
 
35716
    public int compareTo(getUserCount_result other) {
35717
      if (!getClass().equals(other.getClass())) {
35718
        return getClass().getName().compareTo(other.getClass().getName());
35719
      }
35720
 
35721
      int lastComparison = 0;
35722
      getUserCount_result typedOther = (getUserCount_result)other;
35723
 
35724
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
35725
      if (lastComparison != 0) {
35726
        return lastComparison;
35727
      }
35728
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
35729
      if (lastComparison != 0) {
35730
        return lastComparison;
35731
      }
35732
      return 0;
35733
    }
35734
 
35735
    public void read(TProtocol iprot) throws TException {
35736
      TField field;
35737
      iprot.readStructBegin();
35738
      while (true)
35739
      {
35740
        field = iprot.readFieldBegin();
35741
        if (field.type == TType.STOP) { 
35742
          break;
35743
        }
35744
        _Fields fieldId = _Fields.findByThriftId(field.id);
35745
        if (fieldId == null) {
35746
          TProtocolUtil.skip(iprot, field.type);
35747
        } else {
35748
          switch (fieldId) {
35749
            case SUCCESS:
35750
              if (field.type == TType.I64) {
35751
                this.success = iprot.readI64();
35752
                setSuccessIsSet(true);
35753
              } else { 
35754
                TProtocolUtil.skip(iprot, field.type);
35755
              }
35756
              break;
35757
          }
35758
          iprot.readFieldEnd();
35759
        }
35760
      }
35761
      iprot.readStructEnd();
35762
      validate();
35763
    }
35764
 
35765
    public void write(TProtocol oprot) throws TException {
35766
      oprot.writeStructBegin(STRUCT_DESC);
35767
 
35768
      if (this.isSetSuccess()) {
35769
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
35770
        oprot.writeI64(this.success);
35771
        oprot.writeFieldEnd();
35772
      }
35773
      oprot.writeFieldStop();
35774
      oprot.writeStructEnd();
35775
    }
35776
 
35777
    @Override
35778
    public String toString() {
35779
      StringBuilder sb = new StringBuilder("getUserCount_result(");
35780
      boolean first = true;
35781
 
35782
      sb.append("success:");
35783
      sb.append(this.success);
35784
      first = false;
35785
      sb.append(")");
35786
      return sb.toString();
35787
    }
35788
 
35789
    public void validate() throws TException {
35790
      // check for required fields
35791
    }
35792
 
35793
  }
35794
 
48 ashish 35795
}