Subversion Repositories SmartDukaan

Rev

Rev 1491 | Rev 1598 | 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
 
48 ashish 167
  }
168
 
169
  public static class Client implements Iface {
170
    public Client(TProtocol prot)
171
    {
172
      this(prot, prot);
173
    }
174
 
175
    public Client(TProtocol iprot, TProtocol oprot)
176
    {
177
      iprot_ = iprot;
178
      oprot_ = oprot;
179
    }
180
 
181
    protected TProtocol iprot_;
182
    protected TProtocol oprot_;
183
 
184
    protected int seqid_;
185
 
186
    public TProtocol getInputProtocol()
187
    {
188
      return this.iprot_;
189
    }
190
 
191
    public TProtocol getOutputProtocol()
192
    {
193
      return this.oprot_;
194
    }
195
 
764 rajveer 196
    public void closeSession() throws TException
197
    {
198
      send_closeSession();
199
      recv_closeSession();
200
    }
201
 
202
    public void send_closeSession() throws TException
203
    {
204
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
205
      closeSession_args args = new closeSession_args();
206
      args.write(oprot_);
207
      oprot_.writeMessageEnd();
208
      oprot_.getTransport().flush();
209
    }
210
 
211
    public void recv_closeSession() throws TException
212
    {
213
      TMessage msg = iprot_.readMessageBegin();
214
      if (msg.type == TMessageType.EXCEPTION) {
215
        TApplicationException x = TApplicationException.read(iprot_);
216
        iprot_.readMessageEnd();
217
        throw x;
218
      }
219
      closeSession_result result = new closeSession_result();
220
      result.read(iprot_);
221
      iprot_.readMessageEnd();
222
      return;
223
    }
224
 
553 chandransh 225
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 226
    {
553 chandransh 227
      send_createAnonymousUser(jsessionId);
228
      return recv_createAnonymousUser();
48 ashish 229
    }
230
 
553 chandransh 231
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 232
    {
553 chandransh 233
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
234
      createAnonymousUser_args args = new createAnonymousUser_args();
235
      args.jsessionId = jsessionId;
48 ashish 236
      args.write(oprot_);
237
      oprot_.writeMessageEnd();
238
      oprot_.getTransport().flush();
239
    }
240
 
553 chandransh 241
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 242
    {
243
      TMessage msg = iprot_.readMessageBegin();
244
      if (msg.type == TMessageType.EXCEPTION) {
245
        TApplicationException x = TApplicationException.read(iprot_);
246
        iprot_.readMessageEnd();
247
        throw x;
248
      }
553 chandransh 249
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 250
      result.read(iprot_);
251
      iprot_.readMessageEnd();
252
      if (result.isSetSuccess()) {
253
        return result.success;
254
      }
553 chandransh 255
      if (result.ucex != null) {
256
        throw result.ucex;
48 ashish 257
      }
553 chandransh 258
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 259
    }
260
 
553 chandransh 261
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 262
    {
553 chandransh 263
      send_getUserById(userId);
264
      return recv_getUserById();
48 ashish 265
    }
266
 
553 chandransh 267
    public void send_getUserById(long userId) throws TException
48 ashish 268
    {
553 chandransh 269
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
270
      getUserById_args args = new getUserById_args();
48 ashish 271
      args.userId = userId;
272
      args.write(oprot_);
273
      oprot_.writeMessageEnd();
274
      oprot_.getTransport().flush();
275
    }
276
 
553 chandransh 277
    public User recv_getUserById() throws UserContextException, TException
48 ashish 278
    {
279
      TMessage msg = iprot_.readMessageBegin();
280
      if (msg.type == TMessageType.EXCEPTION) {
281
        TApplicationException x = TApplicationException.read(iprot_);
282
        iprot_.readMessageEnd();
283
        throw x;
284
      }
553 chandransh 285
      getUserById_result result = new getUserById_result();
48 ashish 286
      result.read(iprot_);
287
      iprot_.readMessageEnd();
288
      if (result.isSetSuccess()) {
289
        return result.success;
290
      }
553 chandransh 291
      if (result.ucex != null) {
292
        throw result.ucex;
48 ashish 293
      }
553 chandransh 294
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 295
    }
296
 
1491 vikas 297
    public User getUserByEmail(String email) throws UserContextException, TException
298
    {
299
      send_getUserByEmail(email);
300
      return recv_getUserByEmail();
301
    }
302
 
303
    public void send_getUserByEmail(String email) throws TException
304
    {
305
      oprot_.writeMessageBegin(new TMessage("getUserByEmail", TMessageType.CALL, seqid_));
306
      getUserByEmail_args args = new getUserByEmail_args();
307
      args.email = email;
308
      args.write(oprot_);
309
      oprot_.writeMessageEnd();
310
      oprot_.getTransport().flush();
311
    }
312
 
313
    public User recv_getUserByEmail() throws UserContextException, TException
314
    {
315
      TMessage msg = iprot_.readMessageBegin();
316
      if (msg.type == TMessageType.EXCEPTION) {
317
        TApplicationException x = TApplicationException.read(iprot_);
318
        iprot_.readMessageEnd();
319
        throw x;
320
      }
321
      getUserByEmail_result result = new getUserByEmail_result();
322
      result.read(iprot_);
323
      iprot_.readMessageEnd();
324
      if (result.isSetSuccess()) {
325
        return result.success;
326
      }
327
      if (result.ucex != null) {
328
        throw result.ucex;
329
      }
330
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserByEmail failed: unknown result");
331
    }
332
 
553 chandransh 333
    public User createUser(User user) throws UserContextException, TException
48 ashish 334
    {
553 chandransh 335
      send_createUser(user);
336
      return recv_createUser();
48 ashish 337
    }
338
 
553 chandransh 339
    public void send_createUser(User user) throws TException
48 ashish 340
    {
553 chandransh 341
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
342
      createUser_args args = new createUser_args();
343
      args.user = user;
48 ashish 344
      args.write(oprot_);
345
      oprot_.writeMessageEnd();
346
      oprot_.getTransport().flush();
347
    }
348
 
553 chandransh 349
    public User recv_createUser() throws UserContextException, TException
48 ashish 350
    {
351
      TMessage msg = iprot_.readMessageBegin();
352
      if (msg.type == TMessageType.EXCEPTION) {
353
        TApplicationException x = TApplicationException.read(iprot_);
354
        iprot_.readMessageEnd();
355
        throw x;
356
      }
553 chandransh 357
      createUser_result result = new createUser_result();
48 ashish 358
      result.read(iprot_);
359
      iprot_.readMessageEnd();
360
      if (result.isSetSuccess()) {
361
        return result.success;
362
      }
553 chandransh 363
      if (result.ucex != null) {
364
        throw result.ucex;
48 ashish 365
      }
553 chandransh 366
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 367
    }
368
 
553 chandransh 369
    public User updateUser(User user) throws UserContextException, TException
48 ashish 370
    {
553 chandransh 371
      send_updateUser(user);
372
      return recv_updateUser();
48 ashish 373
    }
374
 
553 chandransh 375
    public void send_updateUser(User user) throws TException
48 ashish 376
    {
553 chandransh 377
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
378
      updateUser_args args = new updateUser_args();
379
      args.user = user;
48 ashish 380
      args.write(oprot_);
381
      oprot_.writeMessageEnd();
382
      oprot_.getTransport().flush();
383
    }
384
 
553 chandransh 385
    public User recv_updateUser() throws UserContextException, TException
48 ashish 386
    {
387
      TMessage msg = iprot_.readMessageBegin();
388
      if (msg.type == TMessageType.EXCEPTION) {
389
        TApplicationException x = TApplicationException.read(iprot_);
390
        iprot_.readMessageEnd();
391
        throw x;
392
      }
553 chandransh 393
      updateUser_result result = new updateUser_result();
48 ashish 394
      result.read(iprot_);
395
      iprot_.readMessageEnd();
396
      if (result.isSetSuccess()) {
397
        return result.success;
398
      }
553 chandransh 399
      if (result.ucex != null) {
400
        throw result.ucex;
48 ashish 401
      }
553 chandransh 402
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 403
    }
404
 
553 chandransh 405
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 406
    {
553 chandransh 407
      send_deleteUser(userId);
408
      return recv_deleteUser();
48 ashish 409
    }
410
 
553 chandransh 411
    public void send_deleteUser(long userId) throws TException
48 ashish 412
    {
553 chandransh 413
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
414
      deleteUser_args args = new deleteUser_args();
48 ashish 415
      args.userId = userId;
416
      args.write(oprot_);
417
      oprot_.writeMessageEnd();
418
      oprot_.getTransport().flush();
419
    }
420
 
553 chandransh 421
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 422
    {
423
      TMessage msg = iprot_.readMessageBegin();
424
      if (msg.type == TMessageType.EXCEPTION) {
425
        TApplicationException x = TApplicationException.read(iprot_);
426
        iprot_.readMessageEnd();
427
        throw x;
428
      }
553 chandransh 429
      deleteUser_result result = new deleteUser_result();
48 ashish 430
      result.read(iprot_);
431
      iprot_.readMessageEnd();
432
      if (result.isSetSuccess()) {
433
        return result.success;
434
      }
553 chandransh 435
      if (result.ucex != null) {
436
        throw result.ucex;
48 ashish 437
      }
553 chandransh 438
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 439
    }
440
 
553 chandransh 441
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 442
    {
553 chandransh 443
      send_getUserState(userId);
444
      return recv_getUserState();
48 ashish 445
    }
446
 
553 chandransh 447
    public void send_getUserState(long userId) throws TException
48 ashish 448
    {
553 chandransh 449
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
450
      getUserState_args args = new getUserState_args();
48 ashish 451
      args.userId = userId;
452
      args.write(oprot_);
453
      oprot_.writeMessageEnd();
454
      oprot_.getTransport().flush();
455
    }
456
 
553 chandransh 457
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 458
    {
459
      TMessage msg = iprot_.readMessageBegin();
460
      if (msg.type == TMessageType.EXCEPTION) {
461
        TApplicationException x = TApplicationException.read(iprot_);
462
        iprot_.readMessageEnd();
463
        throw x;
464
      }
553 chandransh 465
      getUserState_result result = new getUserState_result();
48 ashish 466
      result.read(iprot_);
467
      iprot_.readMessageEnd();
468
      if (result.isSetSuccess()) {
469
        return result.success;
470
      }
553 chandransh 471
      if (result.ucex != null) {
472
        throw result.ucex;
48 ashish 473
      }
553 chandransh 474
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 475
    }
476
 
553 chandransh 477
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 478
    {
553 chandransh 479
      send_authenticateUser(email, password);
123 ashish 480
      return recv_authenticateUser();
481
    }
482
 
553 chandransh 483
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 484
    {
485
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
486
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 487
      args.email = email;
123 ashish 488
      args.password = password;
489
      args.write(oprot_);
490
      oprot_.writeMessageEnd();
491
      oprot_.getTransport().flush();
492
    }
493
 
553 chandransh 494
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 495
    {
496
      TMessage msg = iprot_.readMessageBegin();
497
      if (msg.type == TMessageType.EXCEPTION) {
498
        TApplicationException x = TApplicationException.read(iprot_);
499
        iprot_.readMessageEnd();
500
        throw x;
501
      }
502
      authenticateUser_result result = new authenticateUser_result();
503
      result.read(iprot_);
504
      iprot_.readMessageEnd();
505
      if (result.isSetSuccess()) {
506
        return result.success;
507
      }
553 chandransh 508
      if (result.auex != null) {
509
        throw result.auex;
123 ashish 510
      }
511
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
512
    }
513
 
48 ashish 514
    public boolean userExists(String email) throws UserContextException, TException
515
    {
516
      send_userExists(email);
517
      return recv_userExists();
518
    }
519
 
520
    public void send_userExists(String email) throws TException
521
    {
522
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
523
      userExists_args args = new userExists_args();
524
      args.email = email;
525
      args.write(oprot_);
526
      oprot_.writeMessageEnd();
527
      oprot_.getTransport().flush();
528
    }
529
 
530
    public boolean recv_userExists() throws UserContextException, TException
531
    {
532
      TMessage msg = iprot_.readMessageBegin();
533
      if (msg.type == TMessageType.EXCEPTION) {
534
        TApplicationException x = TApplicationException.read(iprot_);
535
        iprot_.readMessageEnd();
536
        throw x;
537
      }
538
      userExists_result result = new userExists_result();
539
      result.read(iprot_);
540
      iprot_.readMessageEnd();
541
      if (result.isSetSuccess()) {
542
        return result.success;
543
      }
544
      if (result.ucx != null) {
545
        throw result.ucx;
546
      }
547
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
548
    }
549
 
571 rajveer 550
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 551
    {
571 rajveer 552
      send_addAddressForUser(userId, address, setDefault);
48 ashish 553
      return recv_addAddressForUser();
554
    }
555
 
571 rajveer 556
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 557
    {
558
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
559
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 560
      args.userId = userId;
48 ashish 561
      args.address = address;
513 rajveer 562
      args.setDefault = setDefault;
48 ashish 563
      args.write(oprot_);
564
      oprot_.writeMessageEnd();
565
      oprot_.getTransport().flush();
566
    }
567
 
571 rajveer 568
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 569
    {
570
      TMessage msg = iprot_.readMessageBegin();
571
      if (msg.type == TMessageType.EXCEPTION) {
572
        TApplicationException x = TApplicationException.read(iprot_);
573
        iprot_.readMessageEnd();
574
        throw x;
575
      }
576
      addAddressForUser_result result = new addAddressForUser_result();
577
      result.read(iprot_);
578
      iprot_.readMessageEnd();
579
      if (result.isSetSuccess()) {
580
        return result.success;
581
      }
582
      if (result.ucx != null) {
583
        throw result.ucx;
584
      }
585
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
586
    }
587
 
588
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
589
    {
590
      send_removeAddressForUser(userid, addressId);
591
      return recv_removeAddressForUser();
592
    }
593
 
594
    public void send_removeAddressForUser(long userid, long addressId) throws TException
595
    {
596
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
597
      removeAddressForUser_args args = new removeAddressForUser_args();
598
      args.userid = userid;
599
      args.addressId = addressId;
600
      args.write(oprot_);
601
      oprot_.writeMessageEnd();
602
      oprot_.getTransport().flush();
603
    }
604
 
605
    public boolean recv_removeAddressForUser() throws UserContextException, TException
606
    {
607
      TMessage msg = iprot_.readMessageBegin();
608
      if (msg.type == TMessageType.EXCEPTION) {
609
        TApplicationException x = TApplicationException.read(iprot_);
610
        iprot_.readMessageEnd();
611
        throw x;
612
      }
613
      removeAddressForUser_result result = new removeAddressForUser_result();
614
      result.read(iprot_);
615
      iprot_.readMessageEnd();
616
      if (result.isSetSuccess()) {
617
        return result.success;
618
      }
619
      if (result.ucx != null) {
620
        throw result.ucx;
621
      }
622
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
623
    }
624
 
625
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
626
    {
627
      send_setUserAsLoggedIn(userId, timestamp);
628
      return recv_setUserAsLoggedIn();
629
    }
630
 
631
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
632
    {
633
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
634
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
635
      args.userId = userId;
636
      args.timestamp = timestamp;
637
      args.write(oprot_);
638
      oprot_.writeMessageEnd();
639
      oprot_.getTransport().flush();
640
    }
641
 
642
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
643
    {
644
      TMessage msg = iprot_.readMessageBegin();
645
      if (msg.type == TMessageType.EXCEPTION) {
646
        TApplicationException x = TApplicationException.read(iprot_);
647
        iprot_.readMessageEnd();
648
        throw x;
649
      }
650
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
651
      result.read(iprot_);
652
      iprot_.readMessageEnd();
653
      if (result.isSetSuccess()) {
654
        return result.success;
655
      }
656
      if (result.ucx != null) {
657
        throw result.ucx;
658
      }
659
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
660
    }
661
 
662
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
663
    {
664
      send_setUserAsLoggedOut(userid, timestamp);
665
      return recv_setUserAsLoggedOut();
666
    }
667
 
668
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
669
    {
670
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
671
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
672
      args.userid = userid;
673
      args.timestamp = timestamp;
674
      args.write(oprot_);
675
      oprot_.writeMessageEnd();
676
      oprot_.getTransport().flush();
677
    }
678
 
679
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
680
    {
681
      TMessage msg = iprot_.readMessageBegin();
682
      if (msg.type == TMessageType.EXCEPTION) {
683
        TApplicationException x = TApplicationException.read(iprot_);
684
        iprot_.readMessageEnd();
685
        throw x;
686
      }
687
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
688
      result.read(iprot_);
689
      iprot_.readMessageEnd();
690
      if (result.isSetSuccess()) {
691
        return result.success;
692
      }
693
      if (result.ucx != null) {
694
        throw result.ucx;
695
      }
696
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
697
    }
698
 
506 rajveer 699
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
700
    {
701
      send_setDefaultAddress(userid, addressId);
702
      return recv_setDefaultAddress();
703
    }
704
 
705
    public void send_setDefaultAddress(long userid, long addressId) throws TException
706
    {
707
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
708
      setDefaultAddress_args args = new setDefaultAddress_args();
709
      args.userid = userid;
710
      args.addressId = addressId;
711
      args.write(oprot_);
712
      oprot_.writeMessageEnd();
713
      oprot_.getTransport().flush();
714
    }
715
 
716
    public boolean recv_setDefaultAddress() throws UserContextException, TException
717
    {
718
      TMessage msg = iprot_.readMessageBegin();
719
      if (msg.type == TMessageType.EXCEPTION) {
720
        TApplicationException x = TApplicationException.read(iprot_);
721
        iprot_.readMessageEnd();
722
        throw x;
723
      }
724
      setDefaultAddress_result result = new setDefaultAddress_result();
725
      result.read(iprot_);
726
      iprot_.readMessageEnd();
727
      if (result.isSetSuccess()) {
728
        return result.success;
729
      }
730
      if (result.ucx != null) {
731
        throw result.ucx;
732
      }
733
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
734
    }
735
 
593 rajveer 736
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 737
    {
593 rajveer 738
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 739
      return recv_updatePassword();
740
    }
741
 
593 rajveer 742
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 743
    {
744
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
745
      updatePassword_args args = new updatePassword_args();
746
      args.userid = userid;
593 rajveer 747
      args.oldPassword = oldPassword;
748
      args.newPassword = newPassword;
48 ashish 749
      args.write(oprot_);
750
      oprot_.writeMessageEnd();
751
      oprot_.getTransport().flush();
752
    }
753
 
754
    public boolean recv_updatePassword() throws UserContextException, TException
755
    {
756
      TMessage msg = iprot_.readMessageBegin();
757
      if (msg.type == TMessageType.EXCEPTION) {
758
        TApplicationException x = TApplicationException.read(iprot_);
759
        iprot_.readMessageEnd();
760
        throw x;
761
      }
762
      updatePassword_result result = new updatePassword_result();
763
      result.read(iprot_);
764
      iprot_.readMessageEnd();
765
      if (result.isSetSuccess()) {
766
        return result.success;
767
      }
768
      if (result.ucx != null) {
769
        throw result.ucx;
770
      }
771
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
772
    }
773
 
896 rajveer 774
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException
582 rajveer 775
    {
896 rajveer 776
      send_forgotPassword(email, newPassword);
582 rajveer 777
      return recv_forgotPassword();
778
    }
779
 
896 rajveer 780
    public void send_forgotPassword(String email, String newPassword) throws TException
582 rajveer 781
    {
782
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
783
      forgotPassword_args args = new forgotPassword_args();
784
      args.email = email;
896 rajveer 785
      args.newPassword = newPassword;
582 rajveer 786
      args.write(oprot_);
787
      oprot_.writeMessageEnd();
788
      oprot_.getTransport().flush();
789
    }
790
 
791
    public boolean recv_forgotPassword() throws UserContextException, TException
792
    {
793
      TMessage msg = iprot_.readMessageBegin();
794
      if (msg.type == TMessageType.EXCEPTION) {
795
        TApplicationException x = TApplicationException.read(iprot_);
796
        iprot_.readMessageEnd();
797
        throw x;
798
      }
799
      forgotPassword_result result = new forgotPassword_result();
800
      result.read(iprot_);
801
      iprot_.readMessageEnd();
802
      if (result.isSetSuccess()) {
803
        return result.success;
804
      }
805
      if (result.ucx != null) {
806
        throw result.ucx;
807
      }
808
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
809
    }
810
 
593 rajveer 811
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
812
    {
813
      send_getAllAddressesForUser(userId);
814
      return recv_getAllAddressesForUser();
815
    }
816
 
817
    public void send_getAllAddressesForUser(long userId) throws TException
818
    {
819
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
820
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
821
      args.userId = userId;
822
      args.write(oprot_);
823
      oprot_.writeMessageEnd();
824
      oprot_.getTransport().flush();
825
    }
826
 
827
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
828
    {
829
      TMessage msg = iprot_.readMessageBegin();
830
      if (msg.type == TMessageType.EXCEPTION) {
831
        TApplicationException x = TApplicationException.read(iprot_);
832
        iprot_.readMessageEnd();
833
        throw x;
834
      }
835
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
836
      result.read(iprot_);
837
      iprot_.readMessageEnd();
838
      if (result.isSetSuccess()) {
839
        return result.success;
840
      }
841
      if (result.ucx != null) {
842
        throw result.ucx;
843
      }
844
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
845
    }
846
 
847
    public long getDefaultAddressId(long userId) throws UserContextException, TException
848
    {
849
      send_getDefaultAddressId(userId);
850
      return recv_getDefaultAddressId();
851
    }
852
 
853
    public void send_getDefaultAddressId(long userId) throws TException
854
    {
855
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
856
      getDefaultAddressId_args args = new getDefaultAddressId_args();
857
      args.userId = userId;
858
      args.write(oprot_);
859
      oprot_.writeMessageEnd();
860
      oprot_.getTransport().flush();
861
    }
862
 
863
    public long recv_getDefaultAddressId() throws UserContextException, TException
864
    {
865
      TMessage msg = iprot_.readMessageBegin();
866
      if (msg.type == TMessageType.EXCEPTION) {
867
        TApplicationException x = TApplicationException.read(iprot_);
868
        iprot_.readMessageEnd();
869
        throw x;
870
      }
871
      getDefaultAddressId_result result = new getDefaultAddressId_result();
872
      result.read(iprot_);
873
      iprot_.readMessageEnd();
874
      if (result.isSetSuccess()) {
875
        return result.success;
876
      }
877
      if (result.ucx != null) {
878
        throw result.ucx;
879
      }
880
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
881
    }
882
 
784 rajveer 883
    public String getDefaultPincode(long userId) throws UserContextException, TException
884
    {
885
      send_getDefaultPincode(userId);
886
      return recv_getDefaultPincode();
887
    }
888
 
889
    public void send_getDefaultPincode(long userId) throws TException
890
    {
891
      oprot_.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.CALL, seqid_));
892
      getDefaultPincode_args args = new getDefaultPincode_args();
893
      args.userId = userId;
894
      args.write(oprot_);
895
      oprot_.writeMessageEnd();
896
      oprot_.getTransport().flush();
897
    }
898
 
899
    public String recv_getDefaultPincode() throws UserContextException, TException
900
    {
901
      TMessage msg = iprot_.readMessageBegin();
902
      if (msg.type == TMessageType.EXCEPTION) {
903
        TApplicationException x = TApplicationException.read(iprot_);
904
        iprot_.readMessageEnd();
905
        throw x;
906
      }
907
      getDefaultPincode_result result = new getDefaultPincode_result();
908
      result.read(iprot_);
909
      iprot_.readMessageEnd();
910
      if (result.isSetSuccess()) {
911
        return result.success;
912
      }
913
      if (result.ucx != null) {
914
        throw result.ucx;
915
      }
916
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
917
    }
918
 
1177 varun.gupt 919
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException
920
    {
921
      send_saveUserCommunication(userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message);
922
      return recv_saveUserCommunication();
923
    }
924
 
925
    public void send_saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws TException
926
    {
927
      oprot_.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.CALL, seqid_));
928
      saveUserCommunication_args args = new saveUserCommunication_args();
929
      args.userId = userId;
930
      args.replyTo = replyTo;
931
      args.communicationType = communicationType;
932
      args.orderId = orderId;
933
      args.airwaybillNo = airwaybillNo;
934
      args.productName = productName;
935
      args.subject = subject;
936
      args.message = message;
937
      args.write(oprot_);
938
      oprot_.writeMessageEnd();
939
      oprot_.getTransport().flush();
940
    }
941
 
942
    public boolean recv_saveUserCommunication() throws UserCommunicationException, TException
943
    {
944
      TMessage msg = iprot_.readMessageBegin();
945
      if (msg.type == TMessageType.EXCEPTION) {
946
        TApplicationException x = TApplicationException.read(iprot_);
947
        iprot_.readMessageEnd();
948
        throw x;
949
      }
950
      saveUserCommunication_result result = new saveUserCommunication_result();
951
      result.read(iprot_);
952
      iprot_.readMessageEnd();
953
      if (result.isSetSuccess()) {
954
        return result.success;
955
      }
956
      if (result.ucx != null) {
957
        throw result.ucx;
958
      }
959
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "saveUserCommunication failed: unknown result");
960
    }
961
 
1590 varun.gupt 962
    public UserCommunication getUserCommunicationById(long id) throws UserCommunicationException, TException
963
    {
964
      send_getUserCommunicationById(id);
965
      return recv_getUserCommunicationById();
966
    }
967
 
968
    public void send_getUserCommunicationById(long id) throws TException
969
    {
970
      oprot_.writeMessageBegin(new TMessage("getUserCommunicationById", TMessageType.CALL, seqid_));
971
      getUserCommunicationById_args args = new getUserCommunicationById_args();
972
      args.id = id;
973
      args.write(oprot_);
974
      oprot_.writeMessageEnd();
975
      oprot_.getTransport().flush();
976
    }
977
 
978
    public UserCommunication recv_getUserCommunicationById() throws UserCommunicationException, TException
979
    {
980
      TMessage msg = iprot_.readMessageBegin();
981
      if (msg.type == TMessageType.EXCEPTION) {
982
        TApplicationException x = TApplicationException.read(iprot_);
983
        iprot_.readMessageEnd();
984
        throw x;
985
      }
986
      getUserCommunicationById_result result = new getUserCommunicationById_result();
987
      result.read(iprot_);
988
      iprot_.readMessageEnd();
989
      if (result.isSetSuccess()) {
990
        return result.success;
991
      }
992
      if (result.ucx != null) {
993
        throw result.ucx;
994
      }
995
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserCommunicationById failed: unknown result");
996
    }
997
 
998
    public List<UserCommunication> getUserCommunicationByUser(long userId) throws UserCommunicationException, TException
999
    {
1000
      send_getUserCommunicationByUser(userId);
1001
      return recv_getUserCommunicationByUser();
1002
    }
1003
 
1004
    public void send_getUserCommunicationByUser(long userId) throws TException
1005
    {
1006
      oprot_.writeMessageBegin(new TMessage("getUserCommunicationByUser", TMessageType.CALL, seqid_));
1007
      getUserCommunicationByUser_args args = new getUserCommunicationByUser_args();
1008
      args.userId = userId;
1009
      args.write(oprot_);
1010
      oprot_.writeMessageEnd();
1011
      oprot_.getTransport().flush();
1012
    }
1013
 
1014
    public List<UserCommunication> recv_getUserCommunicationByUser() throws UserCommunicationException, TException
1015
    {
1016
      TMessage msg = iprot_.readMessageBegin();
1017
      if (msg.type == TMessageType.EXCEPTION) {
1018
        TApplicationException x = TApplicationException.read(iprot_);
1019
        iprot_.readMessageEnd();
1020
        throw x;
1021
      }
1022
      getUserCommunicationByUser_result result = new getUserCommunicationByUser_result();
1023
      result.read(iprot_);
1024
      iprot_.readMessageEnd();
1025
      if (result.isSetSuccess()) {
1026
        return result.success;
1027
      }
1028
      if (result.ucx != null) {
1029
        throw result.ucx;
1030
      }
1031
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserCommunicationByUser failed: unknown result");
1032
    }
1033
 
1034
    public List<UserCommunication> getAllUserCommunications() throws UserCommunicationException, TException
1035
    {
1036
      send_getAllUserCommunications();
1037
      return recv_getAllUserCommunications();
1038
    }
1039
 
1040
    public void send_getAllUserCommunications() throws TException
1041
    {
1042
      oprot_.writeMessageBegin(new TMessage("getAllUserCommunications", TMessageType.CALL, seqid_));
1043
      getAllUserCommunications_args args = new getAllUserCommunications_args();
1044
      args.write(oprot_);
1045
      oprot_.writeMessageEnd();
1046
      oprot_.getTransport().flush();
1047
    }
1048
 
1049
    public List<UserCommunication> recv_getAllUserCommunications() throws UserCommunicationException, TException
1050
    {
1051
      TMessage msg = iprot_.readMessageBegin();
1052
      if (msg.type == TMessageType.EXCEPTION) {
1053
        TApplicationException x = TApplicationException.read(iprot_);
1054
        iprot_.readMessageEnd();
1055
        throw x;
1056
      }
1057
      getAllUserCommunications_result result = new getAllUserCommunications_result();
1058
      result.read(iprot_);
1059
      iprot_.readMessageEnd();
1060
      if (result.isSetSuccess()) {
1061
        return result.success;
1062
      }
1063
      if (result.ucx != null) {
1064
        throw result.ucx;
1065
      }
1066
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllUserCommunications failed: unknown result");
1067
    }
1068
 
553 chandransh 1069
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 1070
    {
553 chandransh 1071
      send_createCart(userId);
1072
      return recv_createCart();
48 ashish 1073
    }
1074
 
553 chandransh 1075
    public void send_createCart(long userId) throws TException
48 ashish 1076
    {
553 chandransh 1077
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
1078
      createCart_args args = new createCart_args();
1079
      args.userId = userId;
48 ashish 1080
      args.write(oprot_);
1081
      oprot_.writeMessageEnd();
1082
      oprot_.getTransport().flush();
1083
    }
1084
 
553 chandransh 1085
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 1086
    {
1087
      TMessage msg = iprot_.readMessageBegin();
1088
      if (msg.type == TMessageType.EXCEPTION) {
1089
        TApplicationException x = TApplicationException.read(iprot_);
1090
        iprot_.readMessageEnd();
1091
        throw x;
1092
      }
553 chandransh 1093
      createCart_result result = new createCart_result();
48 ashish 1094
      result.read(iprot_);
1095
      iprot_.readMessageEnd();
1096
      if (result.isSetSuccess()) {
1097
        return result.success;
1098
      }
553 chandransh 1099
      if (result.scx != null) {
1100
        throw result.scx;
48 ashish 1101
      }
553 chandransh 1102
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 1103
    }
1104
 
553 chandransh 1105
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 1106
    {
553 chandransh 1107
      send_getCurrentCart(userId);
1108
      return recv_getCurrentCart();
48 ashish 1109
    }
1110
 
553 chandransh 1111
    public void send_getCurrentCart(long userId) throws TException
48 ashish 1112
    {
553 chandransh 1113
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
1114
      getCurrentCart_args args = new getCurrentCart_args();
1115
      args.userId = userId;
48 ashish 1116
      args.write(oprot_);
1117
      oprot_.writeMessageEnd();
1118
      oprot_.getTransport().flush();
1119
    }
1120
 
553 chandransh 1121
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 1122
    {
1123
      TMessage msg = iprot_.readMessageBegin();
1124
      if (msg.type == TMessageType.EXCEPTION) {
1125
        TApplicationException x = TApplicationException.read(iprot_);
1126
        iprot_.readMessageEnd();
1127
        throw x;
1128
      }
553 chandransh 1129
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 1130
      result.read(iprot_);
1131
      iprot_.readMessageEnd();
1132
      if (result.isSetSuccess()) {
1133
        return result.success;
1134
      }
553 chandransh 1135
      if (result.scx != null) {
1136
        throw result.scx;
48 ashish 1137
      }
553 chandransh 1138
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 1139
    }
1140
 
553 chandransh 1141
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 1142
    {
553 chandransh 1143
      send_getCart(cartId);
1144
      return recv_getCart();
48 ashish 1145
    }
1146
 
553 chandransh 1147
    public void send_getCart(long cartId) throws TException
48 ashish 1148
    {
553 chandransh 1149
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
1150
      getCart_args args = new getCart_args();
1151
      args.cartId = cartId;
48 ashish 1152
      args.write(oprot_);
1153
      oprot_.writeMessageEnd();
1154
      oprot_.getTransport().flush();
1155
    }
1156
 
553 chandransh 1157
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 1158
    {
1159
      TMessage msg = iprot_.readMessageBegin();
1160
      if (msg.type == TMessageType.EXCEPTION) {
1161
        TApplicationException x = TApplicationException.read(iprot_);
1162
        iprot_.readMessageEnd();
1163
        throw x;
1164
      }
553 chandransh 1165
      getCart_result result = new getCart_result();
48 ashish 1166
      result.read(iprot_);
1167
      iprot_.readMessageEnd();
1168
      if (result.isSetSuccess()) {
1169
        return result.success;
1170
      }
553 chandransh 1171
      if (result.scx != null) {
1172
        throw result.scx;
48 ashish 1173
      }
553 chandransh 1174
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 1175
    }
1176
 
553 chandransh 1177
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 1178
    {
553 chandransh 1179
      send_getCartsForUser(userId, status);
1180
      return recv_getCartsForUser();
48 ashish 1181
    }
1182
 
553 chandransh 1183
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 1184
    {
553 chandransh 1185
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
1186
      getCartsForUser_args args = new getCartsForUser_args();
1187
      args.userId = userId;
1188
      args.status = status;
48 ashish 1189
      args.write(oprot_);
1190
      oprot_.writeMessageEnd();
1191
      oprot_.getTransport().flush();
1192
    }
1193
 
553 chandransh 1194
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 1195
    {
1196
      TMessage msg = iprot_.readMessageBegin();
1197
      if (msg.type == TMessageType.EXCEPTION) {
1198
        TApplicationException x = TApplicationException.read(iprot_);
1199
        iprot_.readMessageEnd();
1200
        throw x;
1201
      }
553 chandransh 1202
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 1203
      result.read(iprot_);
1204
      iprot_.readMessageEnd();
1205
      if (result.isSetSuccess()) {
1206
        return result.success;
1207
      }
553 chandransh 1208
      if (result.scx != null) {
1209
        throw result.scx;
48 ashish 1210
      }
553 chandransh 1211
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 1212
    }
1213
 
553 chandransh 1214
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 1215
    {
553 chandransh 1216
      send_getCartsByStatus(status);
1217
      return recv_getCartsByStatus();
48 ashish 1218
    }
1219
 
553 chandransh 1220
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 1221
    {
553 chandransh 1222
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
1223
      getCartsByStatus_args args = new getCartsByStatus_args();
1224
      args.status = status;
48 ashish 1225
      args.write(oprot_);
1226
      oprot_.writeMessageEnd();
1227
      oprot_.getTransport().flush();
1228
    }
1229
 
553 chandransh 1230
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 1231
    {
1232
      TMessage msg = iprot_.readMessageBegin();
1233
      if (msg.type == TMessageType.EXCEPTION) {
1234
        TApplicationException x = TApplicationException.read(iprot_);
1235
        iprot_.readMessageEnd();
1236
        throw x;
1237
      }
553 chandransh 1238
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 1239
      result.read(iprot_);
1240
      iprot_.readMessageEnd();
1241
      if (result.isSetSuccess()) {
1242
        return result.success;
1243
      }
553 chandransh 1244
      if (result.scx != null) {
1245
        throw result.scx;
48 ashish 1246
      }
553 chandransh 1247
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 1248
    }
1249
 
553 chandransh 1250
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 1251
    {
553 chandransh 1252
      send_getCartsByTime(from_time, to_time, status);
1253
      return recv_getCartsByTime();
48 ashish 1254
    }
1255
 
553 chandransh 1256
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 1257
    {
553 chandransh 1258
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
1259
      getCartsByTime_args args = new getCartsByTime_args();
1260
      args.from_time = from_time;
1261
      args.to_time = to_time;
1262
      args.status = status;
48 ashish 1263
      args.write(oprot_);
1264
      oprot_.writeMessageEnd();
1265
      oprot_.getTransport().flush();
1266
    }
1267
 
553 chandransh 1268
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 1269
    {
1270
      TMessage msg = iprot_.readMessageBegin();
1271
      if (msg.type == TMessageType.EXCEPTION) {
1272
        TApplicationException x = TApplicationException.read(iprot_);
1273
        iprot_.readMessageEnd();
1274
        throw x;
1275
      }
553 chandransh 1276
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 1277
      result.read(iprot_);
1278
      iprot_.readMessageEnd();
1279
      if (result.isSetSuccess()) {
1280
        return result.success;
1281
      }
553 chandransh 1282
      if (result.scx != null) {
1283
        throw result.scx;
48 ashish 1284
      }
553 chandransh 1285
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 1286
    }
1287
 
553 chandransh 1288
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 1289
    {
553 chandransh 1290
      send_changeCartStatus(cartId, status);
1291
      recv_changeCartStatus();
130 ashish 1292
    }
1293
 
553 chandransh 1294
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1295
    {
553 chandransh 1296
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1297
      changeCartStatus_args args = new changeCartStatus_args();
1298
      args.cartId = cartId;
1299
      args.status = status;
130 ashish 1300
      args.write(oprot_);
1301
      oprot_.writeMessageEnd();
1302
      oprot_.getTransport().flush();
1303
    }
1304
 
553 chandransh 1305
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 1306
    {
1307
      TMessage msg = iprot_.readMessageBegin();
1308
      if (msg.type == TMessageType.EXCEPTION) {
1309
        TApplicationException x = TApplicationException.read(iprot_);
1310
        iprot_.readMessageEnd();
1311
        throw x;
1312
      }
553 chandransh 1313
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1314
      result.read(iprot_);
1315
      iprot_.readMessageEnd();
553 chandransh 1316
      if (result.scx != null) {
1317
        throw result.scx;
1318
      }
1319
      return;
1320
    }
1321
 
1322
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1323
    {
1324
      send_addItemToCart(cartId, itemId, quantity);
1325
      recv_addItemToCart();
1326
    }
1327
 
1328
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1329
    {
1330
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1331
      addItemToCart_args args = new addItemToCart_args();
1332
      args.cartId = cartId;
1333
      args.itemId = itemId;
1334
      args.quantity = quantity;
1335
      args.write(oprot_);
1336
      oprot_.writeMessageEnd();
1337
      oprot_.getTransport().flush();
1338
    }
1339
 
1340
    public void recv_addItemToCart() throws ShoppingCartException, TException
1341
    {
1342
      TMessage msg = iprot_.readMessageBegin();
1343
      if (msg.type == TMessageType.EXCEPTION) {
1344
        TApplicationException x = TApplicationException.read(iprot_);
1345
        iprot_.readMessageEnd();
1346
        throw x;
1347
      }
1348
      addItemToCart_result result = new addItemToCart_result();
1349
      result.read(iprot_);
1350
      iprot_.readMessageEnd();
1351
      if (result.scx != null) {
1352
        throw result.scx;
1353
      }
1354
      return;
1355
    }
1356
 
1357
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1358
    {
1359
      send_deleteItemFromCart(cartId, itemId);
1360
      recv_deleteItemFromCart();
1361
    }
1362
 
1363
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1364
    {
1365
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1366
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1367
      args.cartId = cartId;
1368
      args.itemId = itemId;
1369
      args.write(oprot_);
1370
      oprot_.writeMessageEnd();
1371
      oprot_.getTransport().flush();
1372
    }
1373
 
1374
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1375
    {
1376
      TMessage msg = iprot_.readMessageBegin();
1377
      if (msg.type == TMessageType.EXCEPTION) {
1378
        TApplicationException x = TApplicationException.read(iprot_);
1379
        iprot_.readMessageEnd();
1380
        throw x;
1381
      }
1382
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1383
      result.read(iprot_);
1384
      iprot_.readMessageEnd();
1385
      if (result.scx != null) {
1386
        throw result.scx;
1387
      }
1388
      return;
1389
    }
1390
 
1391
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1392
    {
1393
      send_changeQuantity(cartId, itemId, quantity);
1394
      recv_changeQuantity();
1395
    }
1396
 
1397
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1398
    {
1399
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1400
      changeQuantity_args args = new changeQuantity_args();
1401
      args.cartId = cartId;
1402
      args.itemId = itemId;
1403
      args.quantity = quantity;
1404
      args.write(oprot_);
1405
      oprot_.writeMessageEnd();
1406
      oprot_.getTransport().flush();
1407
    }
1408
 
1409
    public void recv_changeQuantity() throws ShoppingCartException, TException
1410
    {
1411
      TMessage msg = iprot_.readMessageBegin();
1412
      if (msg.type == TMessageType.EXCEPTION) {
1413
        TApplicationException x = TApplicationException.read(iprot_);
1414
        iprot_.readMessageEnd();
1415
        throw x;
1416
      }
1417
      changeQuantity_result result = new changeQuantity_result();
1418
      result.read(iprot_);
1419
      iprot_.readMessageEnd();
1420
      if (result.scx != null) {
1421
        throw result.scx;
1422
      }
1423
      return;
1424
    }
1425
 
1426
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1427
    {
1428
      send_changeItemStatus(cartId, itemId, status);
1429
      recv_changeItemStatus();
1430
    }
1431
 
1432
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1433
    {
1434
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1435
      changeItemStatus_args args = new changeItemStatus_args();
1436
      args.cartId = cartId;
1437
      args.itemId = itemId;
1438
      args.status = status;
1439
      args.write(oprot_);
1440
      oprot_.writeMessageEnd();
1441
      oprot_.getTransport().flush();
1442
    }
1443
 
1444
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1445
    {
1446
      TMessage msg = iprot_.readMessageBegin();
1447
      if (msg.type == TMessageType.EXCEPTION) {
1448
        TApplicationException x = TApplicationException.read(iprot_);
1449
        iprot_.readMessageEnd();
1450
        throw x;
1451
      }
1452
      changeItemStatus_result result = new changeItemStatus_result();
1453
      result.read(iprot_);
1454
      iprot_.readMessageEnd();
1455
      if (result.scx != null) {
1456
        throw result.scx;
1457
      }
1458
      return;
1459
    }
1460
 
578 chandransh 1461
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1462
    {
1463
      send_addAddressToCart(cartId, addressId);
1464
      recv_addAddressToCart();
1465
    }
1466
 
1467
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1468
    {
1469
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1470
      addAddressToCart_args args = new addAddressToCart_args();
1471
      args.cartId = cartId;
1472
      args.addressId = addressId;
1473
      args.write(oprot_);
1474
      oprot_.writeMessageEnd();
1475
      oprot_.getTransport().flush();
1476
    }
1477
 
578 chandransh 1478
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1479
    {
1480
      TMessage msg = iprot_.readMessageBegin();
1481
      if (msg.type == TMessageType.EXCEPTION) {
1482
        TApplicationException x = TApplicationException.read(iprot_);
1483
        iprot_.readMessageEnd();
1484
        throw x;
1485
      }
1486
      addAddressToCart_result result = new addAddressToCart_result();
1487
      result.read(iprot_);
1488
      iprot_.readMessageEnd();
578 chandransh 1489
      if (result.scx != null) {
1490
        throw result.scx;
1491
      }
553 chandransh 1492
      return;
1493
    }
1494
 
688 chandransh 1495
    public long createOrders(long cartId) throws ShoppingCartException, TException
553 chandransh 1496
    {
688 chandransh 1497
      send_createOrders(cartId);
1498
      return recv_createOrders();
553 chandransh 1499
    }
1500
 
688 chandransh 1501
    public void send_createOrders(long cartId) throws TException
553 chandransh 1502
    {
688 chandransh 1503
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1504
      createOrders_args args = new createOrders_args();
553 chandransh 1505
      args.cartId = cartId;
1506
      args.write(oprot_);
1507
      oprot_.writeMessageEnd();
1508
      oprot_.getTransport().flush();
1509
    }
1510
 
688 chandransh 1511
    public long recv_createOrders() throws ShoppingCartException, TException
553 chandransh 1512
    {
1513
      TMessage msg = iprot_.readMessageBegin();
1514
      if (msg.type == TMessageType.EXCEPTION) {
1515
        TApplicationException x = TApplicationException.read(iprot_);
1516
        iprot_.readMessageEnd();
1517
        throw x;
1518
      }
688 chandransh 1519
      createOrders_result result = new createOrders_result();
553 chandransh 1520
      result.read(iprot_);
1521
      iprot_.readMessageEnd();
130 ashish 1522
      if (result.isSetSuccess()) {
1523
        return result.success;
1524
      }
553 chandransh 1525
      if (result.scx != null) {
1526
        throw result.scx;
130 ashish 1527
      }
688 chandransh 1528
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
130 ashish 1529
    }
1530
 
1466 ankur.sing 1531
    public String validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1532
    {
553 chandransh 1533
      send_validateCart(cartId);
1534
      return recv_validateCart();
130 ashish 1535
    }
1536
 
553 chandransh 1537
    public void send_validateCart(long cartId) throws TException
130 ashish 1538
    {
553 chandransh 1539
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1540
      validateCart_args args = new validateCart_args();
1541
      args.cartId = cartId;
130 ashish 1542
      args.write(oprot_);
1543
      oprot_.writeMessageEnd();
1544
      oprot_.getTransport().flush();
1545
    }
1546
 
1466 ankur.sing 1547
    public String recv_validateCart() throws ShoppingCartException, TException
130 ashish 1548
    {
1549
      TMessage msg = iprot_.readMessageBegin();
1550
      if (msg.type == TMessageType.EXCEPTION) {
1551
        TApplicationException x = TApplicationException.read(iprot_);
1552
        iprot_.readMessageEnd();
1553
        throw x;
1554
      }
553 chandransh 1555
      validateCart_result result = new validateCart_result();
130 ashish 1556
      result.read(iprot_);
1557
      iprot_.readMessageEnd();
1558
      if (result.isSetSuccess()) {
1559
        return result.success;
1560
      }
578 chandransh 1561
      if (result.scex != null) {
1562
        throw result.scex;
1563
      }
553 chandransh 1564
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1565
    }
1566
 
688 chandransh 1567
    public void mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1568
    {
688 chandransh 1569
      send_mergeCart(fromCartId, toCartId);
1570
      recv_mergeCart();
578 chandransh 1571
    }
1572
 
688 chandransh 1573
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1574
    {
688 chandransh 1575
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1576
      mergeCart_args args = new mergeCart_args();
1577
      args.fromCartId = fromCartId;
1578
      args.toCartId = toCartId;
1579
      args.write(oprot_);
1580
      oprot_.writeMessageEnd();
1581
      oprot_.getTransport().flush();
1582
    }
1583
 
1584
    public void recv_mergeCart() throws TException
1585
    {
1586
      TMessage msg = iprot_.readMessageBegin();
1587
      if (msg.type == TMessageType.EXCEPTION) {
1588
        TApplicationException x = TApplicationException.read(iprot_);
1589
        iprot_.readMessageEnd();
1590
        throw x;
1591
      }
1592
      mergeCart_result result = new mergeCart_result();
1593
      result.read(iprot_);
1594
      iprot_.readMessageEnd();
1595
      return;
1596
    }
1597
 
1598
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1599
    {
1600
      send_checkOut(cartId);
1601
      return recv_checkOut();
1602
    }
1603
 
1604
    public void send_checkOut(long cartId) throws TException
1605
    {
1606
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1607
      checkOut_args args = new checkOut_args();
578 chandransh 1608
      args.cartId = cartId;
1609
      args.write(oprot_);
1610
      oprot_.writeMessageEnd();
1611
      oprot_.getTransport().flush();
1612
    }
1613
 
688 chandransh 1614
    public boolean recv_checkOut() throws ShoppingCartException, TException
578 chandransh 1615
    {
1616
      TMessage msg = iprot_.readMessageBegin();
1617
      if (msg.type == TMessageType.EXCEPTION) {
1618
        TApplicationException x = TApplicationException.read(iprot_);
1619
        iprot_.readMessageEnd();
1620
        throw x;
1621
      }
688 chandransh 1622
      checkOut_result result = new checkOut_result();
578 chandransh 1623
      result.read(iprot_);
1624
      iprot_.readMessageEnd();
1625
      if (result.isSetSuccess()) {
1626
        return result.success;
1627
      }
1628
      if (result.scex != null) {
1629
        throw result.scex;
1630
      }
688 chandransh 1631
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
578 chandransh 1632
    }
1633
 
708 rajveer 1634
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException
553 chandransh 1635
    {
688 chandransh 1636
      send_resetCart(cartId, items);
1637
      return recv_resetCart();
553 chandransh 1638
    }
1639
 
708 rajveer 1640
    public void send_resetCart(long cartId, Map<Long,Double> items) throws TException
553 chandransh 1641
    {
688 chandransh 1642
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1643
      resetCart_args args = new resetCart_args();
1644
      args.cartId = cartId;
1645
      args.items = items;
553 chandransh 1646
      args.write(oprot_);
1647
      oprot_.writeMessageEnd();
1648
      oprot_.getTransport().flush();
1649
    }
1650
 
688 chandransh 1651
    public boolean recv_resetCart() throws ShoppingCartException, TException
553 chandransh 1652
    {
1653
      TMessage msg = iprot_.readMessageBegin();
1654
      if (msg.type == TMessageType.EXCEPTION) {
1655
        TApplicationException x = TApplicationException.read(iprot_);
1656
        iprot_.readMessageEnd();
1657
        throw x;
130 ashish 1658
      }
688 chandransh 1659
      resetCart_result result = new resetCart_result();
553 chandransh 1660
      result.read(iprot_);
1661
      iprot_.readMessageEnd();
688 chandransh 1662
      if (result.isSetSuccess()) {
1663
        return result.success;
1664
      }
1665
      if (result.scex != null) {
1666
        throw result.scex;
1667
      }
1668
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
130 ashish 1669
    }
1670
 
771 rajveer 1671
    public Widget getMyResearch(long userId) throws WidgetException, TException
553 chandransh 1672
    {
771 rajveer 1673
      send_getMyResearch(userId);
553 chandransh 1674
      return recv_getMyResearch();
1675
    }
1676
 
771 rajveer 1677
    public void send_getMyResearch(long userId) throws TException
553 chandransh 1678
    {
1679
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1680
      getMyResearch_args args = new getMyResearch_args();
771 rajveer 1681
      args.userId = userId;
553 chandransh 1682
      args.write(oprot_);
1683
      oprot_.writeMessageEnd();
1684
      oprot_.getTransport().flush();
1685
    }
1686
 
1687
    public Widget recv_getMyResearch() throws WidgetException, TException
1688
    {
1689
      TMessage msg = iprot_.readMessageBegin();
1690
      if (msg.type == TMessageType.EXCEPTION) {
1691
        TApplicationException x = TApplicationException.read(iprot_);
1692
        iprot_.readMessageEnd();
1693
        throw x;
1694
      }
1695
      getMyResearch_result result = new getMyResearch_result();
1696
      result.read(iprot_);
1697
      iprot_.readMessageEnd();
1698
      if (result.isSetSuccess()) {
1699
        return result.success;
1700
      }
1701
      if (result.scx != null) {
1702
        throw result.scx;
1703
      }
1704
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1705
    }
1706
 
771 rajveer 1707
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1708
    {
771 rajveer 1709
      send_updateMyResearch(userId, itemId);
553 chandransh 1710
      return recv_updateMyResearch();
1711
    }
1712
 
771 rajveer 1713
    public void send_updateMyResearch(long userId, long itemId) throws TException
553 chandransh 1714
    {
1715
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1716
      updateMyResearch_args args = new updateMyResearch_args();
771 rajveer 1717
      args.userId = userId;
1718
      args.itemId = itemId;
553 chandransh 1719
      args.write(oprot_);
1720
      oprot_.writeMessageEnd();
1721
      oprot_.getTransport().flush();
1722
    }
1723
 
1724
    public boolean recv_updateMyResearch() throws WidgetException, TException
1725
    {
1726
      TMessage msg = iprot_.readMessageBegin();
1727
      if (msg.type == TMessageType.EXCEPTION) {
1728
        TApplicationException x = TApplicationException.read(iprot_);
1729
        iprot_.readMessageEnd();
1730
        throw x;
1731
      }
1732
      updateMyResearch_result result = new updateMyResearch_result();
1733
      result.read(iprot_);
1734
      iprot_.readMessageEnd();
1735
      if (result.isSetSuccess()) {
1736
        return result.success;
1737
      }
1738
      if (result.scx != null) {
1739
        throw result.scx;
1740
      }
1741
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1742
    }
1743
 
771 rajveer 1744
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1745
    {
771 rajveer 1746
      send_deleteItemFromMyResearch(userId, itemId);
553 chandransh 1747
      recv_deleteItemFromMyResearch();
1748
    }
1749
 
771 rajveer 1750
    public void send_deleteItemFromMyResearch(long userId, long itemId) throws TException
553 chandransh 1751
    {
1752
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1753
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
771 rajveer 1754
      args.userId = userId;
1755
      args.itemId = itemId;
553 chandransh 1756
      args.write(oprot_);
1757
      oprot_.writeMessageEnd();
1758
      oprot_.getTransport().flush();
1759
    }
1760
 
1761
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1762
    {
1763
      TMessage msg = iprot_.readMessageBegin();
1764
      if (msg.type == TMessageType.EXCEPTION) {
1765
        TApplicationException x = TApplicationException.read(iprot_);
1766
        iprot_.readMessageEnd();
1767
        throw x;
1768
      }
1769
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1770
      result.read(iprot_);
1771
      iprot_.readMessageEnd();
1772
      if (result.scx != null) {
1773
        throw result.scx;
1774
      }
1775
      return;
1776
    }
1777
 
771 rajveer 1778
    public void updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1779
    {
771 rajveer 1780
      send_updateBrowseHistory(userId, itemId);
1781
      recv_updateBrowseHistory();
553 chandransh 1782
    }
1783
 
771 rajveer 1784
    public void send_updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1785
    {
771 rajveer 1786
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1787
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1788
      args.userId = userId;
1789
      args.itemId = itemId;
553 chandransh 1790
      args.write(oprot_);
1791
      oprot_.writeMessageEnd();
1792
      oprot_.getTransport().flush();
1793
    }
1794
 
771 rajveer 1795
    public void recv_updateBrowseHistory() throws TException
553 chandransh 1796
    {
1797
      TMessage msg = iprot_.readMessageBegin();
1798
      if (msg.type == TMessageType.EXCEPTION) {
1799
        TApplicationException x = TApplicationException.read(iprot_);
1800
        iprot_.readMessageEnd();
1801
        throw x;
1802
      }
771 rajveer 1803
      updateBrowseHistory_result result = new updateBrowseHistory_result();
553 chandransh 1804
      result.read(iprot_);
1805
      iprot_.readMessageEnd();
1806
      return;
1807
    }
1808
 
771 rajveer 1809
    public Widget getBrowseHistory(long userId) throws WidgetException, TException
553 chandransh 1810
    {
771 rajveer 1811
      send_getBrowseHistory(userId);
1812
      return recv_getBrowseHistory();
553 chandransh 1813
    }
1814
 
771 rajveer 1815
    public void send_getBrowseHistory(long userId) throws TException
553 chandransh 1816
    {
771 rajveer 1817
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1818
      getBrowseHistory_args args = new getBrowseHistory_args();
1819
      args.userId = userId;
553 chandransh 1820
      args.write(oprot_);
1821
      oprot_.writeMessageEnd();
1822
      oprot_.getTransport().flush();
1823
    }
1824
 
771 rajveer 1825
    public Widget recv_getBrowseHistory() throws WidgetException, TException
553 chandransh 1826
    {
1827
      TMessage msg = iprot_.readMessageBegin();
1828
      if (msg.type == TMessageType.EXCEPTION) {
1829
        TApplicationException x = TApplicationException.read(iprot_);
1830
        iprot_.readMessageEnd();
1831
        throw x;
1832
      }
771 rajveer 1833
      getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 1834
      result.read(iprot_);
1835
      iprot_.readMessageEnd();
1836
      if (result.isSetSuccess()) {
1837
        return result.success;
1838
      }
1839
      if (result.scx != null) {
1840
        throw result.scx;
1841
      }
771 rajveer 1842
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
553 chandransh 1843
    }
1844
 
771 rajveer 1845
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1846
    {
771 rajveer 1847
      send_mergeBrowseHistory(fromUserId, toUserId);
1848
      recv_mergeBrowseHistory();
553 chandransh 1849
    }
1850
 
771 rajveer 1851
    public void send_mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1852
    {
771 rajveer 1853
      oprot_.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.CALL, seqid_));
1854
      mergeBrowseHistory_args args = new mergeBrowseHistory_args();
1855
      args.fromUserId = fromUserId;
1856
      args.toUserId = toUserId;
553 chandransh 1857
      args.write(oprot_);
1858
      oprot_.writeMessageEnd();
1859
      oprot_.getTransport().flush();
1860
    }
1861
 
771 rajveer 1862
    public void recv_mergeBrowseHistory() throws TException
553 chandransh 1863
    {
1864
      TMessage msg = iprot_.readMessageBegin();
1865
      if (msg.type == TMessageType.EXCEPTION) {
1866
        TApplicationException x = TApplicationException.read(iprot_);
1867
        iprot_.readMessageEnd();
1868
        throw x;
1869
      }
771 rajveer 1870
      mergeBrowseHistory_result result = new mergeBrowseHistory_result();
553 chandransh 1871
      result.read(iprot_);
1872
      iprot_.readMessageEnd();
1873
      return;
1874
    }
1875
 
48 ashish 1876
  }
1877
  public static class Processor implements TProcessor {
1878
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1879
    public Processor(Iface iface)
1880
    {
1881
      iface_ = iface;
764 rajveer 1882
      processMap_.put("closeSession", new closeSession());
553 chandransh 1883
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1884
      processMap_.put("getUserById", new getUserById());
1491 vikas 1885
      processMap_.put("getUserByEmail", new getUserByEmail());
553 chandransh 1886
      processMap_.put("createUser", new createUser());
1887
      processMap_.put("updateUser", new updateUser());
1888
      processMap_.put("deleteUser", new deleteUser());
1889
      processMap_.put("getUserState", new getUserState());
123 ashish 1890
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1891
      processMap_.put("userExists", new userExists());
1892
      processMap_.put("addAddressForUser", new addAddressForUser());
1893
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1894
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1895
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1896
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1897
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1898
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1899
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1900
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
784 rajveer 1901
      processMap_.put("getDefaultPincode", new getDefaultPincode());
1177 varun.gupt 1902
      processMap_.put("saveUserCommunication", new saveUserCommunication());
1590 varun.gupt 1903
      processMap_.put("getUserCommunicationById", new getUserCommunicationById());
1904
      processMap_.put("getUserCommunicationByUser", new getUserCommunicationByUser());
1905
      processMap_.put("getAllUserCommunications", new getAllUserCommunications());
553 chandransh 1906
      processMap_.put("createCart", new createCart());
1907
      processMap_.put("getCurrentCart", new getCurrentCart());
1908
      processMap_.put("getCart", new getCart());
1909
      processMap_.put("getCartsForUser", new getCartsForUser());
1910
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1911
      processMap_.put("getCartsByTime", new getCartsByTime());
1912
      processMap_.put("changeCartStatus", new changeCartStatus());
1913
      processMap_.put("addItemToCart", new addItemToCart());
1914
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1915
      processMap_.put("changeQuantity", new changeQuantity());
1916
      processMap_.put("changeItemStatus", new changeItemStatus());
1917
      processMap_.put("addAddressToCart", new addAddressToCart());
688 chandransh 1918
      processMap_.put("createOrders", new createOrders());
553 chandransh 1919
      processMap_.put("validateCart", new validateCart());
1920
      processMap_.put("mergeCart", new mergeCart());
688 chandransh 1921
      processMap_.put("checkOut", new checkOut());
1922
      processMap_.put("resetCart", new resetCart());
553 chandransh 1923
      processMap_.put("getMyResearch", new getMyResearch());
1924
      processMap_.put("updateMyResearch", new updateMyResearch());
1925
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1926
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1927
      processMap_.put("getBrowseHistory", new getBrowseHistory());
771 rajveer 1928
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
48 ashish 1929
    }
1930
 
1931
    protected static interface ProcessFunction {
1932
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1933
    }
1934
 
1935
    private Iface iface_;
1936
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1937
 
1938
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1939
    {
1940
      TMessage msg = iprot.readMessageBegin();
1941
      ProcessFunction fn = processMap_.get(msg.name);
1942
      if (fn == null) {
1943
        TProtocolUtil.skip(iprot, TType.STRUCT);
1944
        iprot.readMessageEnd();
1945
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1946
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1947
        x.write(oprot);
1948
        oprot.writeMessageEnd();
1949
        oprot.getTransport().flush();
1950
        return true;
1951
      }
1952
      fn.process(msg.seqid, iprot, oprot);
1953
      return true;
1954
    }
1955
 
764 rajveer 1956
    private class closeSession implements ProcessFunction {
1957
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1958
      {
1959
        closeSession_args args = new closeSession_args();
1960
        args.read(iprot);
1961
        iprot.readMessageEnd();
1962
        closeSession_result result = new closeSession_result();
1963
        iface_.closeSession();
1964
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1965
        result.write(oprot);
1966
        oprot.writeMessageEnd();
1967
        oprot.getTransport().flush();
1968
      }
1969
 
1970
    }
1971
 
553 chandransh 1972
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1973
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1974
      {
553 chandransh 1975
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1976
        args.read(iprot);
1977
        iprot.readMessageEnd();
553 chandransh 1978
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1979
        try {
553 chandransh 1980
          result.success = iface_.createAnonymousUser(args.jsessionId);
1981
        } catch (UserContextException ucex) {
1982
          result.ucex = ucex;
48 ashish 1983
        } catch (Throwable th) {
553 chandransh 1984
          LOGGER.error("Internal error processing createAnonymousUser", th);
1985
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1986
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1987
          x.write(oprot);
1988
          oprot.writeMessageEnd();
1989
          oprot.getTransport().flush();
1990
          return;
1991
        }
553 chandransh 1992
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1993
        result.write(oprot);
1994
        oprot.writeMessageEnd();
1995
        oprot.getTransport().flush();
1996
      }
1997
 
1998
    }
1999
 
553 chandransh 2000
    private class getUserById implements ProcessFunction {
48 ashish 2001
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2002
      {
553 chandransh 2003
        getUserById_args args = new getUserById_args();
48 ashish 2004
        args.read(iprot);
2005
        iprot.readMessageEnd();
553 chandransh 2006
        getUserById_result result = new getUserById_result();
48 ashish 2007
        try {
553 chandransh 2008
          result.success = iface_.getUserById(args.userId);
2009
        } catch (UserContextException ucex) {
2010
          result.ucex = ucex;
48 ashish 2011
        } catch (Throwable th) {
553 chandransh 2012
          LOGGER.error("Internal error processing getUserById", th);
2013
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
2014
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 2015
          x.write(oprot);
2016
          oprot.writeMessageEnd();
2017
          oprot.getTransport().flush();
2018
          return;
2019
        }
553 chandransh 2020
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 2021
        result.write(oprot);
2022
        oprot.writeMessageEnd();
2023
        oprot.getTransport().flush();
2024
      }
2025
 
2026
    }
2027
 
1491 vikas 2028
    private class getUserByEmail implements ProcessFunction {
2029
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2030
      {
2031
        getUserByEmail_args args = new getUserByEmail_args();
2032
        args.read(iprot);
2033
        iprot.readMessageEnd();
2034
        getUserByEmail_result result = new getUserByEmail_result();
2035
        try {
2036
          result.success = iface_.getUserByEmail(args.email);
2037
        } catch (UserContextException ucex) {
2038
          result.ucex = ucex;
2039
        } catch (Throwable th) {
2040
          LOGGER.error("Internal error processing getUserByEmail", th);
2041
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserByEmail");
2042
          oprot.writeMessageBegin(new TMessage("getUserByEmail", TMessageType.EXCEPTION, seqid));
2043
          x.write(oprot);
2044
          oprot.writeMessageEnd();
2045
          oprot.getTransport().flush();
2046
          return;
2047
        }
2048
        oprot.writeMessageBegin(new TMessage("getUserByEmail", TMessageType.REPLY, seqid));
2049
        result.write(oprot);
2050
        oprot.writeMessageEnd();
2051
        oprot.getTransport().flush();
2052
      }
2053
 
2054
    }
2055
 
553 chandransh 2056
    private class createUser implements ProcessFunction {
48 ashish 2057
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2058
      {
553 chandransh 2059
        createUser_args args = new createUser_args();
48 ashish 2060
        args.read(iprot);
2061
        iprot.readMessageEnd();
553 chandransh 2062
        createUser_result result = new createUser_result();
48 ashish 2063
        try {
553 chandransh 2064
          result.success = iface_.createUser(args.user);
2065
        } catch (UserContextException ucex) {
2066
          result.ucex = ucex;
48 ashish 2067
        } catch (Throwable th) {
553 chandransh 2068
          LOGGER.error("Internal error processing createUser", th);
2069
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
2070
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 2071
          x.write(oprot);
2072
          oprot.writeMessageEnd();
2073
          oprot.getTransport().flush();
2074
          return;
2075
        }
553 chandransh 2076
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 2077
        result.write(oprot);
2078
        oprot.writeMessageEnd();
2079
        oprot.getTransport().flush();
2080
      }
2081
 
2082
    }
2083
 
553 chandransh 2084
    private class updateUser implements ProcessFunction {
48 ashish 2085
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2086
      {
553 chandransh 2087
        updateUser_args args = new updateUser_args();
48 ashish 2088
        args.read(iprot);
2089
        iprot.readMessageEnd();
553 chandransh 2090
        updateUser_result result = new updateUser_result();
48 ashish 2091
        try {
553 chandransh 2092
          result.success = iface_.updateUser(args.user);
2093
        } catch (UserContextException ucex) {
2094
          result.ucex = ucex;
48 ashish 2095
        } catch (Throwable th) {
553 chandransh 2096
          LOGGER.error("Internal error processing updateUser", th);
2097
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
2098
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 2099
          x.write(oprot);
2100
          oprot.writeMessageEnd();
2101
          oprot.getTransport().flush();
2102
          return;
2103
        }
553 chandransh 2104
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 2105
        result.write(oprot);
2106
        oprot.writeMessageEnd();
2107
        oprot.getTransport().flush();
2108
      }
2109
 
2110
    }
2111
 
553 chandransh 2112
    private class deleteUser implements ProcessFunction {
48 ashish 2113
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2114
      {
553 chandransh 2115
        deleteUser_args args = new deleteUser_args();
48 ashish 2116
        args.read(iprot);
2117
        iprot.readMessageEnd();
553 chandransh 2118
        deleteUser_result result = new deleteUser_result();
48 ashish 2119
        try {
553 chandransh 2120
          result.success = iface_.deleteUser(args.userId);
2121
          result.setSuccessIsSet(true);
2122
        } catch (UserContextException ucex) {
2123
          result.ucex = ucex;
48 ashish 2124
        } catch (Throwable th) {
553 chandransh 2125
          LOGGER.error("Internal error processing deleteUser", th);
2126
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
2127
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 2128
          x.write(oprot);
2129
          oprot.writeMessageEnd();
2130
          oprot.getTransport().flush();
2131
          return;
2132
        }
553 chandransh 2133
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 2134
        result.write(oprot);
2135
        oprot.writeMessageEnd();
2136
        oprot.getTransport().flush();
2137
      }
2138
 
2139
    }
2140
 
553 chandransh 2141
    private class getUserState implements ProcessFunction {
48 ashish 2142
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2143
      {
553 chandransh 2144
        getUserState_args args = new getUserState_args();
48 ashish 2145
        args.read(iprot);
2146
        iprot.readMessageEnd();
553 chandransh 2147
        getUserState_result result = new getUserState_result();
48 ashish 2148
        try {
553 chandransh 2149
          result.success = iface_.getUserState(args.userId);
2150
        } catch (UserContextException ucex) {
2151
          result.ucex = ucex;
48 ashish 2152
        } catch (Throwable th) {
553 chandransh 2153
          LOGGER.error("Internal error processing getUserState", th);
2154
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
2155
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 2156
          x.write(oprot);
2157
          oprot.writeMessageEnd();
2158
          oprot.getTransport().flush();
2159
          return;
2160
        }
553 chandransh 2161
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 2162
        result.write(oprot);
2163
        oprot.writeMessageEnd();
2164
        oprot.getTransport().flush();
2165
      }
2166
 
2167
    }
2168
 
123 ashish 2169
    private class authenticateUser implements ProcessFunction {
2170
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2171
      {
2172
        authenticateUser_args args = new authenticateUser_args();
2173
        args.read(iprot);
2174
        iprot.readMessageEnd();
2175
        authenticateUser_result result = new authenticateUser_result();
2176
        try {
553 chandransh 2177
          result.success = iface_.authenticateUser(args.email, args.password);
2178
        } catch (AuthenticationException auex) {
2179
          result.auex = auex;
123 ashish 2180
        } catch (Throwable th) {
2181
          LOGGER.error("Internal error processing authenticateUser", th);
2182
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
2183
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
2184
          x.write(oprot);
2185
          oprot.writeMessageEnd();
2186
          oprot.getTransport().flush();
2187
          return;
2188
        }
2189
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
2190
        result.write(oprot);
2191
        oprot.writeMessageEnd();
2192
        oprot.getTransport().flush();
2193
      }
2194
 
2195
    }
2196
 
48 ashish 2197
    private class userExists implements ProcessFunction {
2198
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2199
      {
2200
        userExists_args args = new userExists_args();
2201
        args.read(iprot);
2202
        iprot.readMessageEnd();
2203
        userExists_result result = new userExists_result();
2204
        try {
2205
          result.success = iface_.userExists(args.email);
2206
          result.setSuccessIsSet(true);
2207
        } catch (UserContextException ucx) {
2208
          result.ucx = ucx;
2209
        } catch (Throwable th) {
2210
          LOGGER.error("Internal error processing userExists", th);
2211
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
2212
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
2213
          x.write(oprot);
2214
          oprot.writeMessageEnd();
2215
          oprot.getTransport().flush();
2216
          return;
2217
        }
2218
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
2219
        result.write(oprot);
2220
        oprot.writeMessageEnd();
2221
        oprot.getTransport().flush();
2222
      }
2223
 
2224
    }
2225
 
2226
    private class addAddressForUser implements ProcessFunction {
2227
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2228
      {
2229
        addAddressForUser_args args = new addAddressForUser_args();
2230
        args.read(iprot);
2231
        iprot.readMessageEnd();
2232
        addAddressForUser_result result = new addAddressForUser_result();
2233
        try {
571 rajveer 2234
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2235
          result.setSuccessIsSet(true);
2236
        } catch (UserContextException ucx) {
2237
          result.ucx = ucx;
2238
        } catch (Throwable th) {
2239
          LOGGER.error("Internal error processing addAddressForUser", th);
2240
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2241
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2242
          x.write(oprot);
2243
          oprot.writeMessageEnd();
2244
          oprot.getTransport().flush();
2245
          return;
2246
        }
2247
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2248
        result.write(oprot);
2249
        oprot.writeMessageEnd();
2250
        oprot.getTransport().flush();
2251
      }
2252
 
2253
    }
2254
 
2255
    private class removeAddressForUser implements ProcessFunction {
2256
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2257
      {
2258
        removeAddressForUser_args args = new removeAddressForUser_args();
2259
        args.read(iprot);
2260
        iprot.readMessageEnd();
2261
        removeAddressForUser_result result = new removeAddressForUser_result();
2262
        try {
2263
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2264
          result.setSuccessIsSet(true);
2265
        } catch (UserContextException ucx) {
2266
          result.ucx = ucx;
2267
        } catch (Throwable th) {
2268
          LOGGER.error("Internal error processing removeAddressForUser", th);
2269
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2270
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2271
          x.write(oprot);
2272
          oprot.writeMessageEnd();
2273
          oprot.getTransport().flush();
2274
          return;
2275
        }
2276
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2277
        result.write(oprot);
2278
        oprot.writeMessageEnd();
2279
        oprot.getTransport().flush();
2280
      }
2281
 
2282
    }
2283
 
2284
    private class setUserAsLoggedIn implements ProcessFunction {
2285
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2286
      {
2287
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2288
        args.read(iprot);
2289
        iprot.readMessageEnd();
2290
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2291
        try {
2292
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2293
          result.setSuccessIsSet(true);
2294
        } catch (UserContextException ucx) {
2295
          result.ucx = ucx;
2296
        } catch (Throwable th) {
2297
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2298
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2299
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2300
          x.write(oprot);
2301
          oprot.writeMessageEnd();
2302
          oprot.getTransport().flush();
2303
          return;
2304
        }
2305
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2306
        result.write(oprot);
2307
        oprot.writeMessageEnd();
2308
        oprot.getTransport().flush();
2309
      }
2310
 
2311
    }
2312
 
2313
    private class setUserAsLoggedOut implements ProcessFunction {
2314
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2315
      {
2316
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2317
        args.read(iprot);
2318
        iprot.readMessageEnd();
2319
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2320
        try {
2321
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2322
          result.setSuccessIsSet(true);
2323
        } catch (UserContextException ucx) {
2324
          result.ucx = ucx;
2325
        } catch (Throwable th) {
2326
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2327
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2328
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2329
          x.write(oprot);
2330
          oprot.writeMessageEnd();
2331
          oprot.getTransport().flush();
2332
          return;
2333
        }
2334
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2335
        result.write(oprot);
2336
        oprot.writeMessageEnd();
2337
        oprot.getTransport().flush();
2338
      }
2339
 
2340
    }
2341
 
506 rajveer 2342
    private class setDefaultAddress implements ProcessFunction {
2343
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2344
      {
2345
        setDefaultAddress_args args = new setDefaultAddress_args();
2346
        args.read(iprot);
2347
        iprot.readMessageEnd();
2348
        setDefaultAddress_result result = new setDefaultAddress_result();
2349
        try {
2350
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2351
          result.setSuccessIsSet(true);
2352
        } catch (UserContextException ucx) {
2353
          result.ucx = ucx;
2354
        } catch (Throwable th) {
2355
          LOGGER.error("Internal error processing setDefaultAddress", th);
2356
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2357
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2358
          x.write(oprot);
2359
          oprot.writeMessageEnd();
2360
          oprot.getTransport().flush();
2361
          return;
2362
        }
2363
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2364
        result.write(oprot);
2365
        oprot.writeMessageEnd();
2366
        oprot.getTransport().flush();
2367
      }
2368
 
2369
    }
2370
 
48 ashish 2371
    private class updatePassword implements ProcessFunction {
2372
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2373
      {
2374
        updatePassword_args args = new updatePassword_args();
2375
        args.read(iprot);
2376
        iprot.readMessageEnd();
2377
        updatePassword_result result = new updatePassword_result();
2378
        try {
593 rajveer 2379
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2380
          result.setSuccessIsSet(true);
2381
        } catch (UserContextException ucx) {
2382
          result.ucx = ucx;
2383
        } catch (Throwable th) {
2384
          LOGGER.error("Internal error processing updatePassword", th);
2385
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2386
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2387
          x.write(oprot);
2388
          oprot.writeMessageEnd();
2389
          oprot.getTransport().flush();
2390
          return;
2391
        }
2392
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2393
        result.write(oprot);
2394
        oprot.writeMessageEnd();
2395
        oprot.getTransport().flush();
2396
      }
2397
 
2398
    }
2399
 
582 rajveer 2400
    private class forgotPassword implements ProcessFunction {
2401
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2402
      {
2403
        forgotPassword_args args = new forgotPassword_args();
2404
        args.read(iprot);
2405
        iprot.readMessageEnd();
2406
        forgotPassword_result result = new forgotPassword_result();
2407
        try {
896 rajveer 2408
          result.success = iface_.forgotPassword(args.email, args.newPassword);
582 rajveer 2409
          result.setSuccessIsSet(true);
2410
        } catch (UserContextException ucx) {
2411
          result.ucx = ucx;
2412
        } catch (Throwable th) {
2413
          LOGGER.error("Internal error processing forgotPassword", th);
2414
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2415
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2416
          x.write(oprot);
2417
          oprot.writeMessageEnd();
2418
          oprot.getTransport().flush();
2419
          return;
2420
        }
2421
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2422
        result.write(oprot);
2423
        oprot.writeMessageEnd();
2424
        oprot.getTransport().flush();
2425
      }
2426
 
2427
    }
2428
 
593 rajveer 2429
    private class getAllAddressesForUser implements ProcessFunction {
2430
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2431
      {
2432
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2433
        args.read(iprot);
2434
        iprot.readMessageEnd();
2435
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2436
        try {
2437
          result.success = iface_.getAllAddressesForUser(args.userId);
2438
        } catch (UserContextException ucx) {
2439
          result.ucx = ucx;
2440
        } catch (Throwable th) {
2441
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2442
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2443
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2444
          x.write(oprot);
2445
          oprot.writeMessageEnd();
2446
          oprot.getTransport().flush();
2447
          return;
2448
        }
2449
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2450
        result.write(oprot);
2451
        oprot.writeMessageEnd();
2452
        oprot.getTransport().flush();
2453
      }
2454
 
2455
    }
2456
 
2457
    private class getDefaultAddressId implements ProcessFunction {
2458
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2459
      {
2460
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2461
        args.read(iprot);
2462
        iprot.readMessageEnd();
2463
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2464
        try {
2465
          result.success = iface_.getDefaultAddressId(args.userId);
2466
          result.setSuccessIsSet(true);
2467
        } catch (UserContextException ucx) {
2468
          result.ucx = ucx;
2469
        } catch (Throwable th) {
2470
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2471
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2472
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2473
          x.write(oprot);
2474
          oprot.writeMessageEnd();
2475
          oprot.getTransport().flush();
2476
          return;
2477
        }
2478
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2479
        result.write(oprot);
2480
        oprot.writeMessageEnd();
2481
        oprot.getTransport().flush();
2482
      }
2483
 
2484
    }
2485
 
784 rajveer 2486
    private class getDefaultPincode implements ProcessFunction {
2487
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2488
      {
2489
        getDefaultPincode_args args = new getDefaultPincode_args();
2490
        args.read(iprot);
2491
        iprot.readMessageEnd();
2492
        getDefaultPincode_result result = new getDefaultPincode_result();
2493
        try {
2494
          result.success = iface_.getDefaultPincode(args.userId);
2495
        } catch (UserContextException ucx) {
2496
          result.ucx = ucx;
2497
        } catch (Throwable th) {
2498
          LOGGER.error("Internal error processing getDefaultPincode", th);
2499
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultPincode");
2500
          oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.EXCEPTION, seqid));
2501
          x.write(oprot);
2502
          oprot.writeMessageEnd();
2503
          oprot.getTransport().flush();
2504
          return;
2505
        }
2506
        oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.REPLY, seqid));
2507
        result.write(oprot);
2508
        oprot.writeMessageEnd();
2509
        oprot.getTransport().flush();
2510
      }
2511
 
2512
    }
2513
 
1177 varun.gupt 2514
    private class saveUserCommunication implements ProcessFunction {
2515
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2516
      {
2517
        saveUserCommunication_args args = new saveUserCommunication_args();
2518
        args.read(iprot);
2519
        iprot.readMessageEnd();
2520
        saveUserCommunication_result result = new saveUserCommunication_result();
2521
        try {
2522
          result.success = iface_.saveUserCommunication(args.userId, args.replyTo, args.communicationType, args.orderId, args.airwaybillNo, args.productName, args.subject, args.message);
2523
          result.setSuccessIsSet(true);
2524
        } catch (UserCommunicationException ucx) {
2525
          result.ucx = ucx;
2526
        } catch (Throwable th) {
2527
          LOGGER.error("Internal error processing saveUserCommunication", th);
2528
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing saveUserCommunication");
2529
          oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.EXCEPTION, seqid));
2530
          x.write(oprot);
2531
          oprot.writeMessageEnd();
2532
          oprot.getTransport().flush();
2533
          return;
2534
        }
2535
        oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.REPLY, seqid));
2536
        result.write(oprot);
2537
        oprot.writeMessageEnd();
2538
        oprot.getTransport().flush();
2539
      }
2540
 
2541
    }
2542
 
1590 varun.gupt 2543
    private class getUserCommunicationById implements ProcessFunction {
2544
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2545
      {
2546
        getUserCommunicationById_args args = new getUserCommunicationById_args();
2547
        args.read(iprot);
2548
        iprot.readMessageEnd();
2549
        getUserCommunicationById_result result = new getUserCommunicationById_result();
2550
        try {
2551
          result.success = iface_.getUserCommunicationById(args.id);
2552
        } catch (UserCommunicationException ucx) {
2553
          result.ucx = ucx;
2554
        } catch (Throwable th) {
2555
          LOGGER.error("Internal error processing getUserCommunicationById", th);
2556
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserCommunicationById");
2557
          oprot.writeMessageBegin(new TMessage("getUserCommunicationById", TMessageType.EXCEPTION, seqid));
2558
          x.write(oprot);
2559
          oprot.writeMessageEnd();
2560
          oprot.getTransport().flush();
2561
          return;
2562
        }
2563
        oprot.writeMessageBegin(new TMessage("getUserCommunicationById", TMessageType.REPLY, seqid));
2564
        result.write(oprot);
2565
        oprot.writeMessageEnd();
2566
        oprot.getTransport().flush();
2567
      }
2568
 
2569
    }
2570
 
2571
    private class getUserCommunicationByUser implements ProcessFunction {
2572
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2573
      {
2574
        getUserCommunicationByUser_args args = new getUserCommunicationByUser_args();
2575
        args.read(iprot);
2576
        iprot.readMessageEnd();
2577
        getUserCommunicationByUser_result result = new getUserCommunicationByUser_result();
2578
        try {
2579
          result.success = iface_.getUserCommunicationByUser(args.userId);
2580
        } catch (UserCommunicationException ucx) {
2581
          result.ucx = ucx;
2582
        } catch (Throwable th) {
2583
          LOGGER.error("Internal error processing getUserCommunicationByUser", th);
2584
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserCommunicationByUser");
2585
          oprot.writeMessageBegin(new TMessage("getUserCommunicationByUser", TMessageType.EXCEPTION, seqid));
2586
          x.write(oprot);
2587
          oprot.writeMessageEnd();
2588
          oprot.getTransport().flush();
2589
          return;
2590
        }
2591
        oprot.writeMessageBegin(new TMessage("getUserCommunicationByUser", TMessageType.REPLY, seqid));
2592
        result.write(oprot);
2593
        oprot.writeMessageEnd();
2594
        oprot.getTransport().flush();
2595
      }
2596
 
2597
    }
2598
 
2599
    private class getAllUserCommunications implements ProcessFunction {
2600
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2601
      {
2602
        getAllUserCommunications_args args = new getAllUserCommunications_args();
2603
        args.read(iprot);
2604
        iprot.readMessageEnd();
2605
        getAllUserCommunications_result result = new getAllUserCommunications_result();
2606
        try {
2607
          result.success = iface_.getAllUserCommunications();
2608
        } catch (UserCommunicationException ucx) {
2609
          result.ucx = ucx;
2610
        } catch (Throwable th) {
2611
          LOGGER.error("Internal error processing getAllUserCommunications", th);
2612
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllUserCommunications");
2613
          oprot.writeMessageBegin(new TMessage("getAllUserCommunications", TMessageType.EXCEPTION, seqid));
2614
          x.write(oprot);
2615
          oprot.writeMessageEnd();
2616
          oprot.getTransport().flush();
2617
          return;
2618
        }
2619
        oprot.writeMessageBegin(new TMessage("getAllUserCommunications", TMessageType.REPLY, seqid));
2620
        result.write(oprot);
2621
        oprot.writeMessageEnd();
2622
        oprot.getTransport().flush();
2623
      }
2624
 
2625
    }
2626
 
553 chandransh 2627
    private class createCart implements ProcessFunction {
48 ashish 2628
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2629
      {
553 chandransh 2630
        createCart_args args = new createCart_args();
48 ashish 2631
        args.read(iprot);
2632
        iprot.readMessageEnd();
553 chandransh 2633
        createCart_result result = new createCart_result();
48 ashish 2634
        try {
553 chandransh 2635
          result.success = iface_.createCart(args.userId);
48 ashish 2636
          result.setSuccessIsSet(true);
553 chandransh 2637
        } catch (ShoppingCartException scx) {
2638
          result.scx = scx;
48 ashish 2639
        } catch (Throwable th) {
553 chandransh 2640
          LOGGER.error("Internal error processing createCart", th);
2641
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2642
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2643
          x.write(oprot);
2644
          oprot.writeMessageEnd();
2645
          oprot.getTransport().flush();
2646
          return;
2647
        }
553 chandransh 2648
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2649
        result.write(oprot);
2650
        oprot.writeMessageEnd();
2651
        oprot.getTransport().flush();
2652
      }
2653
 
2654
    }
2655
 
553 chandransh 2656
    private class getCurrentCart implements ProcessFunction {
48 ashish 2657
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2658
      {
553 chandransh 2659
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2660
        args.read(iprot);
2661
        iprot.readMessageEnd();
553 chandransh 2662
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2663
        try {
553 chandransh 2664
          result.success = iface_.getCurrentCart(args.userId);
2665
        } catch (ShoppingCartException scx) {
2666
          result.scx = scx;
48 ashish 2667
        } catch (Throwable th) {
553 chandransh 2668
          LOGGER.error("Internal error processing getCurrentCart", th);
2669
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2670
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2671
          x.write(oprot);
2672
          oprot.writeMessageEnd();
2673
          oprot.getTransport().flush();
2674
          return;
2675
        }
553 chandransh 2676
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2677
        result.write(oprot);
2678
        oprot.writeMessageEnd();
2679
        oprot.getTransport().flush();
2680
      }
2681
 
2682
    }
2683
 
553 chandransh 2684
    private class getCart implements ProcessFunction {
48 ashish 2685
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2686
      {
553 chandransh 2687
        getCart_args args = new getCart_args();
48 ashish 2688
        args.read(iprot);
2689
        iprot.readMessageEnd();
553 chandransh 2690
        getCart_result result = new getCart_result();
48 ashish 2691
        try {
553 chandransh 2692
          result.success = iface_.getCart(args.cartId);
2693
        } catch (ShoppingCartException scx) {
2694
          result.scx = scx;
48 ashish 2695
        } catch (Throwable th) {
553 chandransh 2696
          LOGGER.error("Internal error processing getCart", th);
2697
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2698
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2699
          x.write(oprot);
2700
          oprot.writeMessageEnd();
2701
          oprot.getTransport().flush();
2702
          return;
2703
        }
553 chandransh 2704
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2705
        result.write(oprot);
2706
        oprot.writeMessageEnd();
2707
        oprot.getTransport().flush();
2708
      }
2709
 
2710
    }
2711
 
553 chandransh 2712
    private class getCartsForUser implements ProcessFunction {
48 ashish 2713
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2714
      {
553 chandransh 2715
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2716
        args.read(iprot);
2717
        iprot.readMessageEnd();
553 chandransh 2718
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2719
        try {
553 chandransh 2720
          result.success = iface_.getCartsForUser(args.userId, args.status);
2721
        } catch (ShoppingCartException scx) {
2722
          result.scx = scx;
48 ashish 2723
        } catch (Throwable th) {
553 chandransh 2724
          LOGGER.error("Internal error processing getCartsForUser", th);
2725
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2726
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2727
          x.write(oprot);
2728
          oprot.writeMessageEnd();
2729
          oprot.getTransport().flush();
2730
          return;
2731
        }
553 chandransh 2732
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2733
        result.write(oprot);
2734
        oprot.writeMessageEnd();
2735
        oprot.getTransport().flush();
2736
      }
2737
 
2738
    }
2739
 
553 chandransh 2740
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2741
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2742
      {
553 chandransh 2743
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2744
        args.read(iprot);
2745
        iprot.readMessageEnd();
553 chandransh 2746
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2747
        try {
553 chandransh 2748
          result.success = iface_.getCartsByStatus(args.status);
2749
        } catch (ShoppingCartException scx) {
2750
          result.scx = scx;
48 ashish 2751
        } catch (Throwable th) {
553 chandransh 2752
          LOGGER.error("Internal error processing getCartsByStatus", th);
2753
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2754
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2755
          x.write(oprot);
2756
          oprot.writeMessageEnd();
2757
          oprot.getTransport().flush();
2758
          return;
2759
        }
553 chandransh 2760
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2761
        result.write(oprot);
2762
        oprot.writeMessageEnd();
2763
        oprot.getTransport().flush();
2764
      }
2765
 
2766
    }
2767
 
553 chandransh 2768
    private class getCartsByTime implements ProcessFunction {
48 ashish 2769
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2770
      {
553 chandransh 2771
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2772
        args.read(iprot);
2773
        iprot.readMessageEnd();
553 chandransh 2774
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2775
        try {
553 chandransh 2776
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2777
        } catch (ShoppingCartException scx) {
2778
          result.scx = scx;
48 ashish 2779
        } catch (Throwable th) {
553 chandransh 2780
          LOGGER.error("Internal error processing getCartsByTime", th);
2781
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2782
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2783
          x.write(oprot);
2784
          oprot.writeMessageEnd();
2785
          oprot.getTransport().flush();
2786
          return;
2787
        }
553 chandransh 2788
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2789
        result.write(oprot);
2790
        oprot.writeMessageEnd();
2791
        oprot.getTransport().flush();
2792
      }
2793
 
2794
    }
2795
 
553 chandransh 2796
    private class changeCartStatus implements ProcessFunction {
130 ashish 2797
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2798
      {
553 chandransh 2799
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2800
        args.read(iprot);
2801
        iprot.readMessageEnd();
553 chandransh 2802
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2803
        try {
553 chandransh 2804
          iface_.changeCartStatus(args.cartId, args.status);
2805
        } catch (ShoppingCartException scx) {
2806
          result.scx = scx;
2807
        } catch (Throwable th) {
2808
          LOGGER.error("Internal error processing changeCartStatus", th);
2809
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2810
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2811
          x.write(oprot);
2812
          oprot.writeMessageEnd();
2813
          oprot.getTransport().flush();
2814
          return;
2815
        }
2816
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2817
        result.write(oprot);
2818
        oprot.writeMessageEnd();
2819
        oprot.getTransport().flush();
2820
      }
2821
 
2822
    }
2823
 
2824
    private class addItemToCart implements ProcessFunction {
2825
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2826
      {
2827
        addItemToCart_args args = new addItemToCart_args();
2828
        args.read(iprot);
2829
        iprot.readMessageEnd();
2830
        addItemToCart_result result = new addItemToCart_result();
2831
        try {
2832
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2833
        } catch (ShoppingCartException scx) {
2834
          result.scx = scx;
2835
        } catch (Throwable th) {
2836
          LOGGER.error("Internal error processing addItemToCart", th);
2837
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2838
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2839
          x.write(oprot);
2840
          oprot.writeMessageEnd();
2841
          oprot.getTransport().flush();
2842
          return;
2843
        }
2844
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2845
        result.write(oprot);
2846
        oprot.writeMessageEnd();
2847
        oprot.getTransport().flush();
2848
      }
2849
 
2850
    }
2851
 
2852
    private class deleteItemFromCart implements ProcessFunction {
2853
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2854
      {
2855
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2856
        args.read(iprot);
2857
        iprot.readMessageEnd();
2858
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2859
        try {
2860
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2861
        } catch (ShoppingCartException scx) {
2862
          result.scx = scx;
2863
        } catch (Throwable th) {
2864
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2865
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2866
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2867
          x.write(oprot);
2868
          oprot.writeMessageEnd();
2869
          oprot.getTransport().flush();
2870
          return;
2871
        }
2872
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2873
        result.write(oprot);
2874
        oprot.writeMessageEnd();
2875
        oprot.getTransport().flush();
2876
      }
2877
 
2878
    }
2879
 
2880
    private class changeQuantity implements ProcessFunction {
2881
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2882
      {
2883
        changeQuantity_args args = new changeQuantity_args();
2884
        args.read(iprot);
2885
        iprot.readMessageEnd();
2886
        changeQuantity_result result = new changeQuantity_result();
2887
        try {
2888
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2889
        } catch (ShoppingCartException scx) {
2890
          result.scx = scx;
2891
        } catch (Throwable th) {
2892
          LOGGER.error("Internal error processing changeQuantity", th);
2893
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2894
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2895
          x.write(oprot);
2896
          oprot.writeMessageEnd();
2897
          oprot.getTransport().flush();
2898
          return;
2899
        }
2900
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2901
        result.write(oprot);
2902
        oprot.writeMessageEnd();
2903
        oprot.getTransport().flush();
2904
      }
2905
 
2906
    }
2907
 
2908
    private class changeItemStatus implements ProcessFunction {
2909
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2910
      {
2911
        changeItemStatus_args args = new changeItemStatus_args();
2912
        args.read(iprot);
2913
        iprot.readMessageEnd();
2914
        changeItemStatus_result result = new changeItemStatus_result();
2915
        try {
2916
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2917
        } catch (ShoppingCartException scx) {
2918
          result.scx = scx;
2919
        } catch (Throwable th) {
2920
          LOGGER.error("Internal error processing changeItemStatus", th);
2921
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2922
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2923
          x.write(oprot);
2924
          oprot.writeMessageEnd();
2925
          oprot.getTransport().flush();
2926
          return;
2927
        }
2928
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2929
        result.write(oprot);
2930
        oprot.writeMessageEnd();
2931
        oprot.getTransport().flush();
2932
      }
2933
 
2934
    }
2935
 
2936
    private class addAddressToCart implements ProcessFunction {
2937
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2938
      {
2939
        addAddressToCart_args args = new addAddressToCart_args();
2940
        args.read(iprot);
2941
        iprot.readMessageEnd();
2942
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2943
        try {
2944
          iface_.addAddressToCart(args.cartId, args.addressId);
2945
        } catch (ShoppingCartException scx) {
2946
          result.scx = scx;
2947
        } catch (Throwable th) {
2948
          LOGGER.error("Internal error processing addAddressToCart", th);
2949
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2950
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2951
          x.write(oprot);
2952
          oprot.writeMessageEnd();
2953
          oprot.getTransport().flush();
2954
          return;
2955
        }
553 chandransh 2956
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2957
        result.write(oprot);
2958
        oprot.writeMessageEnd();
2959
        oprot.getTransport().flush();
2960
      }
2961
 
2962
    }
2963
 
688 chandransh 2964
    private class createOrders implements ProcessFunction {
553 chandransh 2965
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2966
      {
688 chandransh 2967
        createOrders_args args = new createOrders_args();
553 chandransh 2968
        args.read(iprot);
2969
        iprot.readMessageEnd();
688 chandransh 2970
        createOrders_result result = new createOrders_result();
553 chandransh 2971
        try {
688 chandransh 2972
          result.success = iface_.createOrders(args.cartId);
130 ashish 2973
          result.setSuccessIsSet(true);
553 chandransh 2974
        } catch (ShoppingCartException scx) {
2975
          result.scx = scx;
130 ashish 2976
        } catch (Throwable th) {
688 chandransh 2977
          LOGGER.error("Internal error processing createOrders", th);
2978
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
2979
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
130 ashish 2980
          x.write(oprot);
2981
          oprot.writeMessageEnd();
2982
          oprot.getTransport().flush();
2983
          return;
2984
        }
688 chandransh 2985
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
130 ashish 2986
        result.write(oprot);
2987
        oprot.writeMessageEnd();
2988
        oprot.getTransport().flush();
2989
      }
2990
 
2991
    }
2992
 
553 chandransh 2993
    private class validateCart implements ProcessFunction {
130 ashish 2994
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2995
      {
553 chandransh 2996
        validateCart_args args = new validateCart_args();
130 ashish 2997
        args.read(iprot);
2998
        iprot.readMessageEnd();
553 chandransh 2999
        validateCart_result result = new validateCart_result();
578 chandransh 3000
        try {
3001
          result.success = iface_.validateCart(args.cartId);
3002
        } catch (ShoppingCartException scex) {
3003
          result.scex = scex;
3004
        } catch (Throwable th) {
3005
          LOGGER.error("Internal error processing validateCart", th);
3006
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
3007
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
3008
          x.write(oprot);
3009
          oprot.writeMessageEnd();
3010
          oprot.getTransport().flush();
3011
          return;
3012
        }
553 chandransh 3013
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
3014
        result.write(oprot);
3015
        oprot.writeMessageEnd();
3016
        oprot.getTransport().flush();
3017
      }
3018
 
3019
    }
3020
 
688 chandransh 3021
    private class mergeCart implements ProcessFunction {
578 chandransh 3022
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3023
      {
688 chandransh 3024
        mergeCart_args args = new mergeCart_args();
578 chandransh 3025
        args.read(iprot);
3026
        iprot.readMessageEnd();
688 chandransh 3027
        mergeCart_result result = new mergeCart_result();
3028
        iface_.mergeCart(args.fromCartId, args.toCartId);
3029
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
3030
        result.write(oprot);
3031
        oprot.writeMessageEnd();
3032
        oprot.getTransport().flush();
3033
      }
3034
 
3035
    }
3036
 
3037
    private class checkOut implements ProcessFunction {
3038
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3039
      {
3040
        checkOut_args args = new checkOut_args();
3041
        args.read(iprot);
3042
        iprot.readMessageEnd();
3043
        checkOut_result result = new checkOut_result();
578 chandransh 3044
        try {
688 chandransh 3045
          result.success = iface_.checkOut(args.cartId);
578 chandransh 3046
          result.setSuccessIsSet(true);
3047
        } catch (ShoppingCartException scex) {
3048
          result.scex = scex;
3049
        } catch (Throwable th) {
688 chandransh 3050
          LOGGER.error("Internal error processing checkOut", th);
3051
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
3052
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 3053
          x.write(oprot);
3054
          oprot.writeMessageEnd();
3055
          oprot.getTransport().flush();
3056
          return;
3057
        }
688 chandransh 3058
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 3059
        result.write(oprot);
3060
        oprot.writeMessageEnd();
3061
        oprot.getTransport().flush();
3062
      }
3063
 
3064
    }
3065
 
688 chandransh 3066
    private class resetCart implements ProcessFunction {
553 chandransh 3067
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3068
      {
688 chandransh 3069
        resetCart_args args = new resetCart_args();
553 chandransh 3070
        args.read(iprot);
3071
        iprot.readMessageEnd();
688 chandransh 3072
        resetCart_result result = new resetCart_result();
3073
        try {
3074
          result.success = iface_.resetCart(args.cartId, args.items);
3075
          result.setSuccessIsSet(true);
3076
        } catch (ShoppingCartException scex) {
3077
          result.scex = scex;
3078
        } catch (Throwable th) {
3079
          LOGGER.error("Internal error processing resetCart", th);
3080
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
3081
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
3082
          x.write(oprot);
3083
          oprot.writeMessageEnd();
3084
          oprot.getTransport().flush();
3085
          return;
3086
        }
3087
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 3088
        result.write(oprot);
3089
        oprot.writeMessageEnd();
3090
        oprot.getTransport().flush();
3091
      }
3092
 
3093
    }
3094
 
3095
    private class getMyResearch implements ProcessFunction {
3096
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3097
      {
3098
        getMyResearch_args args = new getMyResearch_args();
3099
        args.read(iprot);
3100
        iprot.readMessageEnd();
3101
        getMyResearch_result result = new getMyResearch_result();
3102
        try {
771 rajveer 3103
          result.success = iface_.getMyResearch(args.userId);
553 chandransh 3104
        } catch (WidgetException scx) {
3105
          result.scx = scx;
3106
        } catch (Throwable th) {
3107
          LOGGER.error("Internal error processing getMyResearch", th);
3108
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
3109
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
3110
          x.write(oprot);
3111
          oprot.writeMessageEnd();
3112
          oprot.getTransport().flush();
3113
          return;
3114
        }
3115
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
3116
        result.write(oprot);
3117
        oprot.writeMessageEnd();
3118
        oprot.getTransport().flush();
3119
      }
3120
 
3121
    }
3122
 
3123
    private class updateMyResearch implements ProcessFunction {
3124
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3125
      {
3126
        updateMyResearch_args args = new updateMyResearch_args();
3127
        args.read(iprot);
3128
        iprot.readMessageEnd();
3129
        updateMyResearch_result result = new updateMyResearch_result();
3130
        try {
771 rajveer 3131
          result.success = iface_.updateMyResearch(args.userId, args.itemId);
130 ashish 3132
          result.setSuccessIsSet(true);
553 chandransh 3133
        } catch (WidgetException scx) {
3134
          result.scx = scx;
130 ashish 3135
        } catch (Throwable th) {
553 chandransh 3136
          LOGGER.error("Internal error processing updateMyResearch", th);
3137
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
3138
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 3139
          x.write(oprot);
3140
          oprot.writeMessageEnd();
3141
          oprot.getTransport().flush();
3142
          return;
3143
        }
553 chandransh 3144
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 3145
        result.write(oprot);
3146
        oprot.writeMessageEnd();
3147
        oprot.getTransport().flush();
3148
      }
3149
 
3150
    }
3151
 
553 chandransh 3152
    private class deleteItemFromMyResearch implements ProcessFunction {
3153
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3154
      {
3155
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
3156
        args.read(iprot);
3157
        iprot.readMessageEnd();
3158
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
3159
        try {
771 rajveer 3160
          iface_.deleteItemFromMyResearch(args.userId, args.itemId);
553 chandransh 3161
        } catch (WidgetException scx) {
3162
          result.scx = scx;
3163
        } catch (Throwable th) {
3164
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
3165
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
3166
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
3167
          x.write(oprot);
3168
          oprot.writeMessageEnd();
3169
          oprot.getTransport().flush();
3170
          return;
3171
        }
3172
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
3173
        result.write(oprot);
3174
        oprot.writeMessageEnd();
3175
        oprot.getTransport().flush();
3176
      }
3177
 
3178
    }
3179
 
771 rajveer 3180
    private class updateBrowseHistory implements ProcessFunction {
553 chandransh 3181
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3182
      {
771 rajveer 3183
        updateBrowseHistory_args args = new updateBrowseHistory_args();
553 chandransh 3184
        args.read(iprot);
3185
        iprot.readMessageEnd();
771 rajveer 3186
        updateBrowseHistory_result result = new updateBrowseHistory_result();
3187
        iface_.updateBrowseHistory(args.userId, args.itemId);
3188
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 3189
        result.write(oprot);
3190
        oprot.writeMessageEnd();
3191
        oprot.getTransport().flush();
3192
      }
3193
 
3194
    }
3195
 
771 rajveer 3196
    private class getBrowseHistory implements ProcessFunction {
553 chandransh 3197
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3198
      {
771 rajveer 3199
        getBrowseHistory_args args = new getBrowseHistory_args();
553 chandransh 3200
        args.read(iprot);
3201
        iprot.readMessageEnd();
771 rajveer 3202
        getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 3203
        try {
771 rajveer 3204
          result.success = iface_.getBrowseHistory(args.userId);
553 chandransh 3205
        } catch (WidgetException scx) {
3206
          result.scx = scx;
3207
        } catch (Throwable th) {
771 rajveer 3208
          LOGGER.error("Internal error processing getBrowseHistory", th);
3209
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
3210
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
553 chandransh 3211
          x.write(oprot);
3212
          oprot.writeMessageEnd();
3213
          oprot.getTransport().flush();
3214
          return;
3215
        }
771 rajveer 3216
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 3217
        result.write(oprot);
3218
        oprot.writeMessageEnd();
3219
        oprot.getTransport().flush();
3220
      }
3221
 
3222
    }
3223
 
771 rajveer 3224
    private class mergeBrowseHistory implements ProcessFunction {
553 chandransh 3225
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3226
      {
771 rajveer 3227
        mergeBrowseHistory_args args = new mergeBrowseHistory_args();
553 chandransh 3228
        args.read(iprot);
3229
        iprot.readMessageEnd();
771 rajveer 3230
        mergeBrowseHistory_result result = new mergeBrowseHistory_result();
3231
        iface_.mergeBrowseHistory(args.fromUserId, args.toUserId);
3232
        oprot.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 3233
        result.write(oprot);
3234
        oprot.writeMessageEnd();
3235
        oprot.getTransport().flush();
3236
      }
3237
 
3238
    }
3239
 
48 ashish 3240
  }
3241
 
764 rajveer 3242
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3243
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3244
 
3245
 
3246
 
3247
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3248
    public enum _Fields implements TFieldIdEnum {
3249
;
3250
 
3251
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3252
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3253
 
3254
      static {
3255
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3256
          byId.put((int)field._thriftId, field);
3257
          byName.put(field.getFieldName(), field);
3258
        }
3259
      }
3260
 
3261
      /**
3262
       * Find the _Fields constant that matches fieldId, or null if its not found.
3263
       */
3264
      public static _Fields findByThriftId(int fieldId) {
3265
        return byId.get(fieldId);
3266
      }
3267
 
3268
      /**
3269
       * Find the _Fields constant that matches fieldId, throwing an exception
3270
       * if it is not found.
3271
       */
3272
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3273
        _Fields fields = findByThriftId(fieldId);
3274
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3275
        return fields;
3276
      }
3277
 
3278
      /**
3279
       * Find the _Fields constant that matches name, or null if its not found.
3280
       */
3281
      public static _Fields findByName(String name) {
3282
        return byName.get(name);
3283
      }
3284
 
3285
      private final short _thriftId;
3286
      private final String _fieldName;
3287
 
3288
      _Fields(short thriftId, String fieldName) {
3289
        _thriftId = thriftId;
3290
        _fieldName = fieldName;
3291
      }
3292
 
3293
      public short getThriftFieldId() {
3294
        return _thriftId;
3295
      }
3296
 
3297
      public String getFieldName() {
3298
        return _fieldName;
3299
      }
3300
    }
3301
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3302
    }});
3303
 
3304
    static {
3305
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3306
    }
3307
 
3308
    public closeSession_args() {
3309
    }
3310
 
3311
    /**
3312
     * Performs a deep copy on <i>other</i>.
3313
     */
3314
    public closeSession_args(closeSession_args other) {
3315
    }
3316
 
3317
    public closeSession_args deepCopy() {
3318
      return new closeSession_args(this);
3319
    }
3320
 
3321
    @Deprecated
3322
    public closeSession_args clone() {
3323
      return new closeSession_args(this);
3324
    }
3325
 
3326
    public void setFieldValue(_Fields field, Object value) {
3327
      switch (field) {
3328
      }
3329
    }
3330
 
3331
    public void setFieldValue(int fieldID, Object value) {
3332
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3333
    }
3334
 
3335
    public Object getFieldValue(_Fields field) {
3336
      switch (field) {
3337
      }
3338
      throw new IllegalStateException();
3339
    }
3340
 
3341
    public Object getFieldValue(int fieldId) {
3342
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3343
    }
3344
 
3345
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3346
    public boolean isSet(_Fields field) {
3347
      switch (field) {
3348
      }
3349
      throw new IllegalStateException();
3350
    }
3351
 
3352
    public boolean isSet(int fieldID) {
3353
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3354
    }
3355
 
3356
    @Override
3357
    public boolean equals(Object that) {
3358
      if (that == null)
3359
        return false;
3360
      if (that instanceof closeSession_args)
3361
        return this.equals((closeSession_args)that);
3362
      return false;
3363
    }
3364
 
3365
    public boolean equals(closeSession_args that) {
3366
      if (that == null)
3367
        return false;
3368
 
3369
      return true;
3370
    }
3371
 
3372
    @Override
3373
    public int hashCode() {
3374
      return 0;
3375
    }
3376
 
3377
    public int compareTo(closeSession_args other) {
3378
      if (!getClass().equals(other.getClass())) {
3379
        return getClass().getName().compareTo(other.getClass().getName());
3380
      }
3381
 
3382
      int lastComparison = 0;
3383
      closeSession_args typedOther = (closeSession_args)other;
3384
 
3385
      return 0;
3386
    }
3387
 
3388
    public void read(TProtocol iprot) throws TException {
3389
      TField field;
3390
      iprot.readStructBegin();
3391
      while (true)
3392
      {
3393
        field = iprot.readFieldBegin();
3394
        if (field.type == TType.STOP) { 
3395
          break;
3396
        }
3397
        _Fields fieldId = _Fields.findByThriftId(field.id);
3398
        if (fieldId == null) {
3399
          TProtocolUtil.skip(iprot, field.type);
3400
        } else {
3401
          switch (fieldId) {
3402
          }
3403
          iprot.readFieldEnd();
3404
        }
3405
      }
3406
      iprot.readStructEnd();
3407
      validate();
3408
    }
3409
 
3410
    public void write(TProtocol oprot) throws TException {
3411
      validate();
3412
 
3413
      oprot.writeStructBegin(STRUCT_DESC);
3414
      oprot.writeFieldStop();
3415
      oprot.writeStructEnd();
3416
    }
3417
 
3418
    @Override
3419
    public String toString() {
3420
      StringBuilder sb = new StringBuilder("closeSession_args(");
3421
      boolean first = true;
3422
 
3423
      sb.append(")");
3424
      return sb.toString();
3425
    }
3426
 
3427
    public void validate() throws TException {
3428
      // check for required fields
3429
    }
3430
 
3431
  }
3432
 
3433
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3434
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3435
 
3436
 
3437
 
3438
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3439
    public enum _Fields implements TFieldIdEnum {
3440
;
3441
 
3442
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3443
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3444
 
3445
      static {
3446
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3447
          byId.put((int)field._thriftId, field);
3448
          byName.put(field.getFieldName(), field);
3449
        }
3450
      }
3451
 
3452
      /**
3453
       * Find the _Fields constant that matches fieldId, or null if its not found.
3454
       */
3455
      public static _Fields findByThriftId(int fieldId) {
3456
        return byId.get(fieldId);
3457
      }
3458
 
3459
      /**
3460
       * Find the _Fields constant that matches fieldId, throwing an exception
3461
       * if it is not found.
3462
       */
3463
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3464
        _Fields fields = findByThriftId(fieldId);
3465
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3466
        return fields;
3467
      }
3468
 
3469
      /**
3470
       * Find the _Fields constant that matches name, or null if its not found.
3471
       */
3472
      public static _Fields findByName(String name) {
3473
        return byName.get(name);
3474
      }
3475
 
3476
      private final short _thriftId;
3477
      private final String _fieldName;
3478
 
3479
      _Fields(short thriftId, String fieldName) {
3480
        _thriftId = thriftId;
3481
        _fieldName = fieldName;
3482
      }
3483
 
3484
      public short getThriftFieldId() {
3485
        return _thriftId;
3486
      }
3487
 
3488
      public String getFieldName() {
3489
        return _fieldName;
3490
      }
3491
    }
3492
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3493
    }});
3494
 
3495
    static {
3496
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3497
    }
3498
 
3499
    public closeSession_result() {
3500
    }
3501
 
3502
    /**
3503
     * Performs a deep copy on <i>other</i>.
3504
     */
3505
    public closeSession_result(closeSession_result other) {
3506
    }
3507
 
3508
    public closeSession_result deepCopy() {
3509
      return new closeSession_result(this);
3510
    }
3511
 
3512
    @Deprecated
3513
    public closeSession_result clone() {
3514
      return new closeSession_result(this);
3515
    }
3516
 
3517
    public void setFieldValue(_Fields field, Object value) {
3518
      switch (field) {
3519
      }
3520
    }
3521
 
3522
    public void setFieldValue(int fieldID, Object value) {
3523
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3524
    }
3525
 
3526
    public Object getFieldValue(_Fields field) {
3527
      switch (field) {
3528
      }
3529
      throw new IllegalStateException();
3530
    }
3531
 
3532
    public Object getFieldValue(int fieldId) {
3533
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3534
    }
3535
 
3536
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3537
    public boolean isSet(_Fields field) {
3538
      switch (field) {
3539
      }
3540
      throw new IllegalStateException();
3541
    }
3542
 
3543
    public boolean isSet(int fieldID) {
3544
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3545
    }
3546
 
3547
    @Override
3548
    public boolean equals(Object that) {
3549
      if (that == null)
3550
        return false;
3551
      if (that instanceof closeSession_result)
3552
        return this.equals((closeSession_result)that);
3553
      return false;
3554
    }
3555
 
3556
    public boolean equals(closeSession_result that) {
3557
      if (that == null)
3558
        return false;
3559
 
3560
      return true;
3561
    }
3562
 
3563
    @Override
3564
    public int hashCode() {
3565
      return 0;
3566
    }
3567
 
3568
    public int compareTo(closeSession_result other) {
3569
      if (!getClass().equals(other.getClass())) {
3570
        return getClass().getName().compareTo(other.getClass().getName());
3571
      }
3572
 
3573
      int lastComparison = 0;
3574
      closeSession_result typedOther = (closeSession_result)other;
3575
 
3576
      return 0;
3577
    }
3578
 
3579
    public void read(TProtocol iprot) throws TException {
3580
      TField field;
3581
      iprot.readStructBegin();
3582
      while (true)
3583
      {
3584
        field = iprot.readFieldBegin();
3585
        if (field.type == TType.STOP) { 
3586
          break;
3587
        }
3588
        _Fields fieldId = _Fields.findByThriftId(field.id);
3589
        if (fieldId == null) {
3590
          TProtocolUtil.skip(iprot, field.type);
3591
        } else {
3592
          switch (fieldId) {
3593
          }
3594
          iprot.readFieldEnd();
3595
        }
3596
      }
3597
      iprot.readStructEnd();
3598
      validate();
3599
    }
3600
 
3601
    public void write(TProtocol oprot) throws TException {
3602
      oprot.writeStructBegin(STRUCT_DESC);
3603
 
3604
      oprot.writeFieldStop();
3605
      oprot.writeStructEnd();
3606
    }
3607
 
3608
    @Override
3609
    public String toString() {
3610
      StringBuilder sb = new StringBuilder("closeSession_result(");
3611
      boolean first = true;
3612
 
3613
      sb.append(")");
3614
      return sb.toString();
3615
    }
3616
 
3617
    public void validate() throws TException {
3618
      // check for required fields
3619
    }
3620
 
3621
  }
3622
 
553 chandransh 3623
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3624
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3625
 
553 chandransh 3626
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3627
 
553 chandransh 3628
    private String jsessionId;
48 ashish 3629
 
3630
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3631
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3632
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3633
 
3634
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3635
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3636
 
3637
      static {
3638
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3639
          byId.put((int)field._thriftId, field);
3640
          byName.put(field.getFieldName(), field);
3641
        }
3642
      }
3643
 
3644
      /**
3645
       * Find the _Fields constant that matches fieldId, or null if its not found.
3646
       */
3647
      public static _Fields findByThriftId(int fieldId) {
3648
        return byId.get(fieldId);
3649
      }
3650
 
3651
      /**
3652
       * Find the _Fields constant that matches fieldId, throwing an exception
3653
       * if it is not found.
3654
       */
3655
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3656
        _Fields fields = findByThriftId(fieldId);
3657
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3658
        return fields;
3659
      }
3660
 
3661
      /**
3662
       * Find the _Fields constant that matches name, or null if its not found.
3663
       */
3664
      public static _Fields findByName(String name) {
3665
        return byName.get(name);
3666
      }
3667
 
3668
      private final short _thriftId;
3669
      private final String _fieldName;
3670
 
3671
      _Fields(short thriftId, String fieldName) {
3672
        _thriftId = thriftId;
3673
        _fieldName = fieldName;
3674
      }
3675
 
3676
      public short getThriftFieldId() {
3677
        return _thriftId;
3678
      }
3679
 
3680
      public String getFieldName() {
3681
        return _fieldName;
3682
      }
3683
    }
3684
 
3685
    // isset id assignments
3686
 
3687
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3688
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3689
          new FieldValueMetaData(TType.STRING)));
48 ashish 3690
    }});
3691
 
3692
    static {
553 chandransh 3693
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3694
    }
3695
 
553 chandransh 3696
    public createAnonymousUser_args() {
48 ashish 3697
    }
3698
 
553 chandransh 3699
    public createAnonymousUser_args(
3700
      String jsessionId)
48 ashish 3701
    {
3702
      this();
553 chandransh 3703
      this.jsessionId = jsessionId;
48 ashish 3704
    }
3705
 
3706
    /**
3707
     * Performs a deep copy on <i>other</i>.
3708
     */
553 chandransh 3709
    public createAnonymousUser_args(createAnonymousUser_args other) {
3710
      if (other.isSetJsessionId()) {
3711
        this.jsessionId = other.jsessionId;
48 ashish 3712
      }
3713
    }
3714
 
553 chandransh 3715
    public createAnonymousUser_args deepCopy() {
3716
      return new createAnonymousUser_args(this);
48 ashish 3717
    }
3718
 
3719
    @Deprecated
553 chandransh 3720
    public createAnonymousUser_args clone() {
3721
      return new createAnonymousUser_args(this);
48 ashish 3722
    }
3723
 
553 chandransh 3724
    public String getJsessionId() {
3725
      return this.jsessionId;
48 ashish 3726
    }
3727
 
553 chandransh 3728
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3729
      this.jsessionId = jsessionId;
48 ashish 3730
      return this;
3731
    }
3732
 
553 chandransh 3733
    public void unsetJsessionId() {
3734
      this.jsessionId = null;
48 ashish 3735
    }
3736
 
553 chandransh 3737
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3738
    public boolean isSetJsessionId() {
3739
      return this.jsessionId != null;
48 ashish 3740
    }
3741
 
553 chandransh 3742
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3743
      if (!value) {
553 chandransh 3744
        this.jsessionId = null;
48 ashish 3745
      }
3746
    }
3747
 
3748
    public void setFieldValue(_Fields field, Object value) {
3749
      switch (field) {
553 chandransh 3750
      case JSESSION_ID:
48 ashish 3751
        if (value == null) {
553 chandransh 3752
          unsetJsessionId();
48 ashish 3753
        } else {
553 chandransh 3754
          setJsessionId((String)value);
48 ashish 3755
        }
3756
        break;
3757
 
3758
      }
3759
    }
3760
 
3761
    public void setFieldValue(int fieldID, Object value) {
3762
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3763
    }
3764
 
3765
    public Object getFieldValue(_Fields field) {
3766
      switch (field) {
553 chandransh 3767
      case JSESSION_ID:
3768
        return getJsessionId();
48 ashish 3769
 
3770
      }
3771
      throw new IllegalStateException();
3772
    }
3773
 
3774
    public Object getFieldValue(int fieldId) {
3775
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3776
    }
3777
 
3778
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3779
    public boolean isSet(_Fields field) {
3780
      switch (field) {
553 chandransh 3781
      case JSESSION_ID:
3782
        return isSetJsessionId();
48 ashish 3783
      }
3784
      throw new IllegalStateException();
3785
    }
3786
 
3787
    public boolean isSet(int fieldID) {
3788
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3789
    }
3790
 
3791
    @Override
3792
    public boolean equals(Object that) {
3793
      if (that == null)
3794
        return false;
553 chandransh 3795
      if (that instanceof createAnonymousUser_args)
3796
        return this.equals((createAnonymousUser_args)that);
48 ashish 3797
      return false;
3798
    }
3799
 
553 chandransh 3800
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3801
      if (that == null)
3802
        return false;
3803
 
553 chandransh 3804
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3805
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3806
      if (this_present_jsessionId || that_present_jsessionId) {
3807
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3808
          return false;
553 chandransh 3809
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3810
          return false;
3811
      }
3812
 
3813
      return true;
3814
    }
3815
 
3816
    @Override
3817
    public int hashCode() {
3818
      return 0;
3819
    }
3820
 
553 chandransh 3821
    public int compareTo(createAnonymousUser_args other) {
3822
      if (!getClass().equals(other.getClass())) {
3823
        return getClass().getName().compareTo(other.getClass().getName());
3824
      }
3825
 
3826
      int lastComparison = 0;
3827
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3828
 
3829
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3830
      if (lastComparison != 0) {
3831
        return lastComparison;
3832
      }
3833
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3834
      if (lastComparison != 0) {
3835
        return lastComparison;
3836
      }
3837
      return 0;
3838
    }
3839
 
48 ashish 3840
    public void read(TProtocol iprot) throws TException {
3841
      TField field;
3842
      iprot.readStructBegin();
3843
      while (true)
3844
      {
3845
        field = iprot.readFieldBegin();
3846
        if (field.type == TType.STOP) { 
3847
          break;
3848
        }
3849
        _Fields fieldId = _Fields.findByThriftId(field.id);
3850
        if (fieldId == null) {
3851
          TProtocolUtil.skip(iprot, field.type);
3852
        } else {
3853
          switch (fieldId) {
553 chandransh 3854
            case JSESSION_ID:
3855
              if (field.type == TType.STRING) {
3856
                this.jsessionId = iprot.readString();
48 ashish 3857
              } else { 
3858
                TProtocolUtil.skip(iprot, field.type);
3859
              }
3860
              break;
3861
          }
3862
          iprot.readFieldEnd();
3863
        }
3864
      }
3865
      iprot.readStructEnd();
3866
      validate();
3867
    }
3868
 
3869
    public void write(TProtocol oprot) throws TException {
3870
      validate();
3871
 
3872
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3873
      if (this.jsessionId != null) {
3874
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3875
        oprot.writeString(this.jsessionId);
48 ashish 3876
        oprot.writeFieldEnd();
3877
      }
3878
      oprot.writeFieldStop();
3879
      oprot.writeStructEnd();
3880
    }
3881
 
3882
    @Override
3883
    public String toString() {
553 chandransh 3884
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3885
      boolean first = true;
3886
 
553 chandransh 3887
      sb.append("jsessionId:");
3888
      if (this.jsessionId == null) {
48 ashish 3889
        sb.append("null");
3890
      } else {
553 chandransh 3891
        sb.append(this.jsessionId);
48 ashish 3892
      }
3893
      first = false;
3894
      sb.append(")");
3895
      return sb.toString();
3896
    }
3897
 
3898
    public void validate() throws TException {
3899
      // check for required fields
3900
    }
3901
 
3902
  }
3903
 
571 rajveer 3904
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3905
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3906
 
3907
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3908
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3909
 
553 chandransh 3910
    private User success;
3911
    private UserContextException ucex;
48 ashish 3912
 
3913
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3914
    public enum _Fields implements TFieldIdEnum {
3915
      SUCCESS((short)0, "success"),
553 chandransh 3916
      UCEX((short)1, "ucex");
48 ashish 3917
 
3918
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3919
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3920
 
3921
      static {
3922
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3923
          byId.put((int)field._thriftId, field);
3924
          byName.put(field.getFieldName(), field);
3925
        }
3926
      }
3927
 
3928
      /**
3929
       * Find the _Fields constant that matches fieldId, or null if its not found.
3930
       */
3931
      public static _Fields findByThriftId(int fieldId) {
3932
        return byId.get(fieldId);
3933
      }
3934
 
3935
      /**
3936
       * Find the _Fields constant that matches fieldId, throwing an exception
3937
       * if it is not found.
3938
       */
3939
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3940
        _Fields fields = findByThriftId(fieldId);
3941
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3942
        return fields;
3943
      }
3944
 
3945
      /**
3946
       * Find the _Fields constant that matches name, or null if its not found.
3947
       */
3948
      public static _Fields findByName(String name) {
3949
        return byName.get(name);
3950
      }
3951
 
3952
      private final short _thriftId;
3953
      private final String _fieldName;
3954
 
3955
      _Fields(short thriftId, String fieldName) {
3956
        _thriftId = thriftId;
3957
        _fieldName = fieldName;
3958
      }
3959
 
3960
      public short getThriftFieldId() {
3961
        return _thriftId;
3962
      }
3963
 
3964
      public String getFieldName() {
3965
        return _fieldName;
3966
      }
3967
    }
3968
 
3969
    // isset id assignments
3970
 
3971
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3972
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3973
          new StructMetaData(TType.STRUCT, User.class)));
3974
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3975
          new FieldValueMetaData(TType.STRUCT)));
3976
    }});
3977
 
3978
    static {
553 chandransh 3979
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3980
    }
3981
 
553 chandransh 3982
    public createAnonymousUser_result() {
48 ashish 3983
    }
3984
 
553 chandransh 3985
    public createAnonymousUser_result(
3986
      User success,
3987
      UserContextException ucex)
48 ashish 3988
    {
3989
      this();
3990
      this.success = success;
553 chandransh 3991
      this.ucex = ucex;
48 ashish 3992
    }
3993
 
3994
    /**
3995
     * Performs a deep copy on <i>other</i>.
3996
     */
553 chandransh 3997
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3998
      if (other.isSetSuccess()) {
553 chandransh 3999
        this.success = new User(other.success);
48 ashish 4000
      }
553 chandransh 4001
      if (other.isSetUcex()) {
4002
        this.ucex = new UserContextException(other.ucex);
48 ashish 4003
      }
4004
    }
4005
 
553 chandransh 4006
    public createAnonymousUser_result deepCopy() {
4007
      return new createAnonymousUser_result(this);
48 ashish 4008
    }
4009
 
4010
    @Deprecated
553 chandransh 4011
    public createAnonymousUser_result clone() {
4012
      return new createAnonymousUser_result(this);
48 ashish 4013
    }
4014
 
553 chandransh 4015
    public User getSuccess() {
48 ashish 4016
      return this.success;
4017
    }
4018
 
553 chandransh 4019
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 4020
      this.success = success;
4021
      return this;
4022
    }
4023
 
4024
    public void unsetSuccess() {
4025
      this.success = null;
4026
    }
4027
 
4028
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4029
    public boolean isSetSuccess() {
4030
      return this.success != null;
4031
    }
4032
 
4033
    public void setSuccessIsSet(boolean value) {
4034
      if (!value) {
4035
        this.success = null;
4036
      }
4037
    }
4038
 
553 chandransh 4039
    public UserContextException getUcex() {
4040
      return this.ucex;
48 ashish 4041
    }
4042
 
553 chandransh 4043
    public createAnonymousUser_result setUcex(UserContextException ucex) {
4044
      this.ucex = ucex;
48 ashish 4045
      return this;
4046
    }
4047
 
553 chandransh 4048
    public void unsetUcex() {
4049
      this.ucex = null;
48 ashish 4050
    }
4051
 
553 chandransh 4052
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4053
    public boolean isSetUcex() {
4054
      return this.ucex != null;
48 ashish 4055
    }
4056
 
553 chandransh 4057
    public void setUcexIsSet(boolean value) {
48 ashish 4058
      if (!value) {
553 chandransh 4059
        this.ucex = null;
48 ashish 4060
      }
4061
    }
4062
 
4063
    public void setFieldValue(_Fields field, Object value) {
4064
      switch (field) {
4065
      case SUCCESS:
4066
        if (value == null) {
4067
          unsetSuccess();
4068
        } else {
553 chandransh 4069
          setSuccess((User)value);
48 ashish 4070
        }
4071
        break;
4072
 
553 chandransh 4073
      case UCEX:
48 ashish 4074
        if (value == null) {
553 chandransh 4075
          unsetUcex();
48 ashish 4076
        } else {
553 chandransh 4077
          setUcex((UserContextException)value);
48 ashish 4078
        }
4079
        break;
4080
 
4081
      }
4082
    }
4083
 
4084
    public void setFieldValue(int fieldID, Object value) {
4085
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4086
    }
4087
 
4088
    public Object getFieldValue(_Fields field) {
4089
      switch (field) {
4090
      case SUCCESS:
4091
        return getSuccess();
4092
 
553 chandransh 4093
      case UCEX:
4094
        return getUcex();
48 ashish 4095
 
4096
      }
4097
      throw new IllegalStateException();
4098
    }
4099
 
4100
    public Object getFieldValue(int fieldId) {
4101
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4102
    }
4103
 
4104
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4105
    public boolean isSet(_Fields field) {
4106
      switch (field) {
4107
      case SUCCESS:
4108
        return isSetSuccess();
553 chandransh 4109
      case UCEX:
4110
        return isSetUcex();
48 ashish 4111
      }
4112
      throw new IllegalStateException();
4113
    }
4114
 
4115
    public boolean isSet(int fieldID) {
4116
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4117
    }
4118
 
4119
    @Override
4120
    public boolean equals(Object that) {
4121
      if (that == null)
4122
        return false;
553 chandransh 4123
      if (that instanceof createAnonymousUser_result)
4124
        return this.equals((createAnonymousUser_result)that);
48 ashish 4125
      return false;
4126
    }
4127
 
553 chandransh 4128
    public boolean equals(createAnonymousUser_result that) {
48 ashish 4129
      if (that == null)
4130
        return false;
4131
 
4132
      boolean this_present_success = true && this.isSetSuccess();
4133
      boolean that_present_success = true && that.isSetSuccess();
4134
      if (this_present_success || that_present_success) {
4135
        if (!(this_present_success && that_present_success))
4136
          return false;
4137
        if (!this.success.equals(that.success))
4138
          return false;
4139
      }
4140
 
553 chandransh 4141
      boolean this_present_ucex = true && this.isSetUcex();
4142
      boolean that_present_ucex = true && that.isSetUcex();
4143
      if (this_present_ucex || that_present_ucex) {
4144
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4145
          return false;
553 chandransh 4146
        if (!this.ucex.equals(that.ucex))
48 ashish 4147
          return false;
4148
      }
4149
 
4150
      return true;
4151
    }
4152
 
4153
    @Override
4154
    public int hashCode() {
4155
      return 0;
4156
    }
4157
 
571 rajveer 4158
    public int compareTo(createAnonymousUser_result other) {
4159
      if (!getClass().equals(other.getClass())) {
4160
        return getClass().getName().compareTo(other.getClass().getName());
4161
      }
4162
 
4163
      int lastComparison = 0;
4164
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
4165
 
4166
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4167
      if (lastComparison != 0) {
4168
        return lastComparison;
4169
      }
4170
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4171
      if (lastComparison != 0) {
4172
        return lastComparison;
4173
      }
4174
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4175
      if (lastComparison != 0) {
4176
        return lastComparison;
4177
      }
4178
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4179
      if (lastComparison != 0) {
4180
        return lastComparison;
4181
      }
4182
      return 0;
4183
    }
4184
 
48 ashish 4185
    public void read(TProtocol iprot) throws TException {
4186
      TField field;
4187
      iprot.readStructBegin();
4188
      while (true)
4189
      {
4190
        field = iprot.readFieldBegin();
4191
        if (field.type == TType.STOP) { 
4192
          break;
4193
        }
4194
        _Fields fieldId = _Fields.findByThriftId(field.id);
4195
        if (fieldId == null) {
4196
          TProtocolUtil.skip(iprot, field.type);
4197
        } else {
4198
          switch (fieldId) {
4199
            case SUCCESS:
4200
              if (field.type == TType.STRUCT) {
553 chandransh 4201
                this.success = new User();
48 ashish 4202
                this.success.read(iprot);
4203
              } else { 
4204
                TProtocolUtil.skip(iprot, field.type);
4205
              }
4206
              break;
553 chandransh 4207
            case UCEX:
48 ashish 4208
              if (field.type == TType.STRUCT) {
553 chandransh 4209
                this.ucex = new UserContextException();
4210
                this.ucex.read(iprot);
48 ashish 4211
              } else { 
4212
                TProtocolUtil.skip(iprot, field.type);
4213
              }
4214
              break;
4215
          }
4216
          iprot.readFieldEnd();
4217
        }
4218
      }
4219
      iprot.readStructEnd();
4220
      validate();
4221
    }
4222
 
4223
    public void write(TProtocol oprot) throws TException {
4224
      oprot.writeStructBegin(STRUCT_DESC);
4225
 
4226
      if (this.isSetSuccess()) {
4227
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4228
        this.success.write(oprot);
4229
        oprot.writeFieldEnd();
553 chandransh 4230
      } else if (this.isSetUcex()) {
4231
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4232
        this.ucex.write(oprot);
48 ashish 4233
        oprot.writeFieldEnd();
4234
      }
4235
      oprot.writeFieldStop();
4236
      oprot.writeStructEnd();
4237
    }
4238
 
4239
    @Override
4240
    public String toString() {
553 chandransh 4241
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 4242
      boolean first = true;
4243
 
4244
      sb.append("success:");
4245
      if (this.success == null) {
4246
        sb.append("null");
4247
      } else {
4248
        sb.append(this.success);
4249
      }
4250
      first = false;
4251
      if (!first) sb.append(", ");
553 chandransh 4252
      sb.append("ucex:");
4253
      if (this.ucex == null) {
48 ashish 4254
        sb.append("null");
4255
      } else {
553 chandransh 4256
        sb.append(this.ucex);
48 ashish 4257
      }
4258
      first = false;
4259
      sb.append(")");
4260
      return sb.toString();
4261
    }
4262
 
4263
    public void validate() throws TException {
4264
      // check for required fields
4265
    }
4266
 
4267
  }
4268
 
553 chandransh 4269
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
4270
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 4271
 
4272
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
4273
 
4274
    private long userId;
4275
 
4276
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4277
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4278
      USER_ID((short)1, "userId");
48 ashish 4279
 
4280
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4281
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4282
 
4283
      static {
4284
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4285
          byId.put((int)field._thriftId, field);
4286
          byName.put(field.getFieldName(), field);
4287
        }
4288
      }
4289
 
4290
      /**
4291
       * Find the _Fields constant that matches fieldId, or null if its not found.
4292
       */
4293
      public static _Fields findByThriftId(int fieldId) {
4294
        return byId.get(fieldId);
4295
      }
4296
 
4297
      /**
4298
       * Find the _Fields constant that matches fieldId, throwing an exception
4299
       * if it is not found.
4300
       */
4301
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4302
        _Fields fields = findByThriftId(fieldId);
4303
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4304
        return fields;
4305
      }
4306
 
4307
      /**
4308
       * Find the _Fields constant that matches name, or null if its not found.
4309
       */
4310
      public static _Fields findByName(String name) {
4311
        return byName.get(name);
4312
      }
4313
 
4314
      private final short _thriftId;
4315
      private final String _fieldName;
4316
 
4317
      _Fields(short thriftId, String fieldName) {
4318
        _thriftId = thriftId;
4319
        _fieldName = fieldName;
4320
      }
4321
 
4322
      public short getThriftFieldId() {
4323
        return _thriftId;
4324
      }
4325
 
4326
      public String getFieldName() {
4327
        return _fieldName;
4328
      }
4329
    }
4330
 
4331
    // isset id assignments
4332
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 4333
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 4334
 
4335
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4336
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4337
          new FieldValueMetaData(TType.I64)));
4338
    }});
4339
 
4340
    static {
553 chandransh 4341
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 4342
    }
4343
 
553 chandransh 4344
    public getUserById_args() {
48 ashish 4345
    }
4346
 
553 chandransh 4347
    public getUserById_args(
4348
      long userId)
48 ashish 4349
    {
4350
      this();
4351
      this.userId = userId;
4352
      setUserIdIsSet(true);
4353
    }
4354
 
4355
    /**
4356
     * Performs a deep copy on <i>other</i>.
4357
     */
553 chandransh 4358
    public getUserById_args(getUserById_args other) {
48 ashish 4359
      __isset_bit_vector.clear();
4360
      __isset_bit_vector.or(other.__isset_bit_vector);
4361
      this.userId = other.userId;
4362
    }
4363
 
553 chandransh 4364
    public getUserById_args deepCopy() {
4365
      return new getUserById_args(this);
48 ashish 4366
    }
4367
 
4368
    @Deprecated
553 chandransh 4369
    public getUserById_args clone() {
4370
      return new getUserById_args(this);
48 ashish 4371
    }
4372
 
4373
    public long getUserId() {
4374
      return this.userId;
4375
    }
4376
 
553 chandransh 4377
    public getUserById_args setUserId(long userId) {
48 ashish 4378
      this.userId = userId;
4379
      setUserIdIsSet(true);
4380
      return this;
4381
    }
4382
 
4383
    public void unsetUserId() {
4384
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4385
    }
4386
 
4387
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4388
    public boolean isSetUserId() {
4389
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4390
    }
4391
 
4392
    public void setUserIdIsSet(boolean value) {
4393
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4394
    }
4395
 
4396
    public void setFieldValue(_Fields field, Object value) {
4397
      switch (field) {
4398
      case USER_ID:
4399
        if (value == null) {
4400
          unsetUserId();
4401
        } else {
4402
          setUserId((Long)value);
4403
        }
4404
        break;
4405
 
4406
      }
4407
    }
4408
 
4409
    public void setFieldValue(int fieldID, Object value) {
4410
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4411
    }
4412
 
4413
    public Object getFieldValue(_Fields field) {
4414
      switch (field) {
4415
      case USER_ID:
4416
        return new Long(getUserId());
4417
 
4418
      }
4419
      throw new IllegalStateException();
4420
    }
4421
 
4422
    public Object getFieldValue(int fieldId) {
4423
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4424
    }
4425
 
4426
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4427
    public boolean isSet(_Fields field) {
4428
      switch (field) {
4429
      case USER_ID:
4430
        return isSetUserId();
4431
      }
4432
      throw new IllegalStateException();
4433
    }
4434
 
4435
    public boolean isSet(int fieldID) {
4436
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4437
    }
4438
 
4439
    @Override
4440
    public boolean equals(Object that) {
4441
      if (that == null)
4442
        return false;
553 chandransh 4443
      if (that instanceof getUserById_args)
4444
        return this.equals((getUserById_args)that);
48 ashish 4445
      return false;
4446
    }
4447
 
553 chandransh 4448
    public boolean equals(getUserById_args that) {
48 ashish 4449
      if (that == null)
4450
        return false;
4451
 
4452
      boolean this_present_userId = true;
4453
      boolean that_present_userId = true;
4454
      if (this_present_userId || that_present_userId) {
4455
        if (!(this_present_userId && that_present_userId))
4456
          return false;
4457
        if (this.userId != that.userId)
4458
          return false;
4459
      }
4460
 
4461
      return true;
4462
    }
4463
 
4464
    @Override
4465
    public int hashCode() {
4466
      return 0;
4467
    }
4468
 
553 chandransh 4469
    public int compareTo(getUserById_args other) {
48 ashish 4470
      if (!getClass().equals(other.getClass())) {
4471
        return getClass().getName().compareTo(other.getClass().getName());
4472
      }
4473
 
4474
      int lastComparison = 0;
553 chandransh 4475
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4476
 
4477
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4478
      if (lastComparison != 0) {
4479
        return lastComparison;
4480
      }
4481
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4482
      if (lastComparison != 0) {
4483
        return lastComparison;
4484
      }
4485
      return 0;
4486
    }
4487
 
4488
    public void read(TProtocol iprot) throws TException {
4489
      TField field;
4490
      iprot.readStructBegin();
4491
      while (true)
4492
      {
4493
        field = iprot.readFieldBegin();
4494
        if (field.type == TType.STOP) { 
4495
          break;
4496
        }
4497
        _Fields fieldId = _Fields.findByThriftId(field.id);
4498
        if (fieldId == null) {
4499
          TProtocolUtil.skip(iprot, field.type);
4500
        } else {
4501
          switch (fieldId) {
4502
            case USER_ID:
4503
              if (field.type == TType.I64) {
4504
                this.userId = iprot.readI64();
4505
                setUserIdIsSet(true);
4506
              } else { 
4507
                TProtocolUtil.skip(iprot, field.type);
4508
              }
4509
              break;
4510
          }
4511
          iprot.readFieldEnd();
4512
        }
4513
      }
4514
      iprot.readStructEnd();
4515
      validate();
4516
    }
4517
 
4518
    public void write(TProtocol oprot) throws TException {
4519
      validate();
4520
 
4521
      oprot.writeStructBegin(STRUCT_DESC);
4522
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4523
      oprot.writeI64(this.userId);
4524
      oprot.writeFieldEnd();
4525
      oprot.writeFieldStop();
4526
      oprot.writeStructEnd();
4527
    }
4528
 
4529
    @Override
4530
    public String toString() {
553 chandransh 4531
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4532
      boolean first = true;
4533
 
4534
      sb.append("userId:");
4535
      sb.append(this.userId);
4536
      first = false;
4537
      sb.append(")");
4538
      return sb.toString();
4539
    }
4540
 
4541
    public void validate() throws TException {
4542
      // check for required fields
4543
    }
4544
 
4545
  }
4546
 
571 rajveer 4547
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4548
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4549
 
4550
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4551
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4552
 
553 chandransh 4553
    private User success;
4554
    private UserContextException ucex;
48 ashish 4555
 
4556
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4557
    public enum _Fields implements TFieldIdEnum {
4558
      SUCCESS((short)0, "success"),
553 chandransh 4559
      UCEX((short)1, "ucex");
48 ashish 4560
 
4561
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4562
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4563
 
4564
      static {
4565
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4566
          byId.put((int)field._thriftId, field);
4567
          byName.put(field.getFieldName(), field);
4568
        }
4569
      }
4570
 
4571
      /**
4572
       * Find the _Fields constant that matches fieldId, or null if its not found.
4573
       */
4574
      public static _Fields findByThriftId(int fieldId) {
4575
        return byId.get(fieldId);
4576
      }
4577
 
4578
      /**
4579
       * Find the _Fields constant that matches fieldId, throwing an exception
4580
       * if it is not found.
4581
       */
4582
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4583
        _Fields fields = findByThriftId(fieldId);
4584
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4585
        return fields;
4586
      }
4587
 
4588
      /**
4589
       * Find the _Fields constant that matches name, or null if its not found.
4590
       */
4591
      public static _Fields findByName(String name) {
4592
        return byName.get(name);
4593
      }
4594
 
4595
      private final short _thriftId;
4596
      private final String _fieldName;
4597
 
4598
      _Fields(short thriftId, String fieldName) {
4599
        _thriftId = thriftId;
4600
        _fieldName = fieldName;
4601
      }
4602
 
4603
      public short getThriftFieldId() {
4604
        return _thriftId;
4605
      }
4606
 
4607
      public String getFieldName() {
4608
        return _fieldName;
4609
      }
4610
    }
4611
 
4612
    // isset id assignments
4613
 
4614
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4615
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4616
          new StructMetaData(TType.STRUCT, User.class)));
4617
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4618
          new FieldValueMetaData(TType.STRUCT)));
4619
    }});
4620
 
4621
    static {
553 chandransh 4622
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4623
    }
4624
 
553 chandransh 4625
    public getUserById_result() {
48 ashish 4626
    }
4627
 
553 chandransh 4628
    public getUserById_result(
4629
      User success,
4630
      UserContextException ucex)
48 ashish 4631
    {
4632
      this();
4633
      this.success = success;
553 chandransh 4634
      this.ucex = ucex;
48 ashish 4635
    }
4636
 
4637
    /**
4638
     * Performs a deep copy on <i>other</i>.
4639
     */
553 chandransh 4640
    public getUserById_result(getUserById_result other) {
48 ashish 4641
      if (other.isSetSuccess()) {
553 chandransh 4642
        this.success = new User(other.success);
48 ashish 4643
      }
553 chandransh 4644
      if (other.isSetUcex()) {
4645
        this.ucex = new UserContextException(other.ucex);
48 ashish 4646
      }
4647
    }
4648
 
553 chandransh 4649
    public getUserById_result deepCopy() {
4650
      return new getUserById_result(this);
48 ashish 4651
    }
4652
 
4653
    @Deprecated
553 chandransh 4654
    public getUserById_result clone() {
4655
      return new getUserById_result(this);
48 ashish 4656
    }
4657
 
553 chandransh 4658
    public User getSuccess() {
48 ashish 4659
      return this.success;
4660
    }
4661
 
553 chandransh 4662
    public getUserById_result setSuccess(User success) {
48 ashish 4663
      this.success = success;
4664
      return this;
4665
    }
4666
 
4667
    public void unsetSuccess() {
4668
      this.success = null;
4669
    }
4670
 
4671
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4672
    public boolean isSetSuccess() {
4673
      return this.success != null;
4674
    }
4675
 
4676
    public void setSuccessIsSet(boolean value) {
4677
      if (!value) {
4678
        this.success = null;
4679
      }
4680
    }
4681
 
553 chandransh 4682
    public UserContextException getUcex() {
4683
      return this.ucex;
48 ashish 4684
    }
4685
 
553 chandransh 4686
    public getUserById_result setUcex(UserContextException ucex) {
4687
      this.ucex = ucex;
48 ashish 4688
      return this;
4689
    }
4690
 
553 chandransh 4691
    public void unsetUcex() {
4692
      this.ucex = null;
48 ashish 4693
    }
4694
 
553 chandransh 4695
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4696
    public boolean isSetUcex() {
4697
      return this.ucex != null;
48 ashish 4698
    }
4699
 
553 chandransh 4700
    public void setUcexIsSet(boolean value) {
48 ashish 4701
      if (!value) {
553 chandransh 4702
        this.ucex = null;
48 ashish 4703
      }
4704
    }
4705
 
4706
    public void setFieldValue(_Fields field, Object value) {
4707
      switch (field) {
4708
      case SUCCESS:
4709
        if (value == null) {
4710
          unsetSuccess();
4711
        } else {
553 chandransh 4712
          setSuccess((User)value);
48 ashish 4713
        }
4714
        break;
4715
 
553 chandransh 4716
      case UCEX:
48 ashish 4717
        if (value == null) {
553 chandransh 4718
          unsetUcex();
48 ashish 4719
        } else {
553 chandransh 4720
          setUcex((UserContextException)value);
48 ashish 4721
        }
4722
        break;
4723
 
4724
      }
4725
    }
4726
 
4727
    public void setFieldValue(int fieldID, Object value) {
4728
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4729
    }
4730
 
4731
    public Object getFieldValue(_Fields field) {
4732
      switch (field) {
4733
      case SUCCESS:
4734
        return getSuccess();
4735
 
553 chandransh 4736
      case UCEX:
4737
        return getUcex();
48 ashish 4738
 
4739
      }
4740
      throw new IllegalStateException();
4741
    }
4742
 
4743
    public Object getFieldValue(int fieldId) {
4744
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4745
    }
4746
 
4747
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4748
    public boolean isSet(_Fields field) {
4749
      switch (field) {
4750
      case SUCCESS:
4751
        return isSetSuccess();
553 chandransh 4752
      case UCEX:
4753
        return isSetUcex();
48 ashish 4754
      }
4755
      throw new IllegalStateException();
4756
    }
4757
 
4758
    public boolean isSet(int fieldID) {
4759
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4760
    }
4761
 
4762
    @Override
4763
    public boolean equals(Object that) {
4764
      if (that == null)
4765
        return false;
553 chandransh 4766
      if (that instanceof getUserById_result)
4767
        return this.equals((getUserById_result)that);
48 ashish 4768
      return false;
4769
    }
4770
 
553 chandransh 4771
    public boolean equals(getUserById_result that) {
48 ashish 4772
      if (that == null)
4773
        return false;
4774
 
4775
      boolean this_present_success = true && this.isSetSuccess();
4776
      boolean that_present_success = true && that.isSetSuccess();
4777
      if (this_present_success || that_present_success) {
4778
        if (!(this_present_success && that_present_success))
4779
          return false;
4780
        if (!this.success.equals(that.success))
4781
          return false;
4782
      }
4783
 
553 chandransh 4784
      boolean this_present_ucex = true && this.isSetUcex();
4785
      boolean that_present_ucex = true && that.isSetUcex();
4786
      if (this_present_ucex || that_present_ucex) {
4787
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4788
          return false;
553 chandransh 4789
        if (!this.ucex.equals(that.ucex))
48 ashish 4790
          return false;
4791
      }
4792
 
4793
      return true;
4794
    }
4795
 
4796
    @Override
4797
    public int hashCode() {
4798
      return 0;
4799
    }
4800
 
571 rajveer 4801
    public int compareTo(getUserById_result other) {
4802
      if (!getClass().equals(other.getClass())) {
4803
        return getClass().getName().compareTo(other.getClass().getName());
4804
      }
4805
 
4806
      int lastComparison = 0;
4807
      getUserById_result typedOther = (getUserById_result)other;
4808
 
4809
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4810
      if (lastComparison != 0) {
4811
        return lastComparison;
4812
      }
4813
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4814
      if (lastComparison != 0) {
4815
        return lastComparison;
4816
      }
4817
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4818
      if (lastComparison != 0) {
4819
        return lastComparison;
4820
      }
4821
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4822
      if (lastComparison != 0) {
4823
        return lastComparison;
4824
      }
4825
      return 0;
4826
    }
4827
 
48 ashish 4828
    public void read(TProtocol iprot) throws TException {
4829
      TField field;
4830
      iprot.readStructBegin();
4831
      while (true)
4832
      {
4833
        field = iprot.readFieldBegin();
4834
        if (field.type == TType.STOP) { 
4835
          break;
4836
        }
4837
        _Fields fieldId = _Fields.findByThriftId(field.id);
4838
        if (fieldId == null) {
4839
          TProtocolUtil.skip(iprot, field.type);
4840
        } else {
4841
          switch (fieldId) {
4842
            case SUCCESS:
4843
              if (field.type == TType.STRUCT) {
553 chandransh 4844
                this.success = new User();
48 ashish 4845
                this.success.read(iprot);
4846
              } else { 
4847
                TProtocolUtil.skip(iprot, field.type);
4848
              }
4849
              break;
553 chandransh 4850
            case UCEX:
48 ashish 4851
              if (field.type == TType.STRUCT) {
553 chandransh 4852
                this.ucex = new UserContextException();
4853
                this.ucex.read(iprot);
48 ashish 4854
              } else { 
4855
                TProtocolUtil.skip(iprot, field.type);
4856
              }
4857
              break;
4858
          }
4859
          iprot.readFieldEnd();
4860
        }
4861
      }
4862
      iprot.readStructEnd();
4863
      validate();
4864
    }
4865
 
4866
    public void write(TProtocol oprot) throws TException {
4867
      oprot.writeStructBegin(STRUCT_DESC);
4868
 
4869
      if (this.isSetSuccess()) {
4870
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4871
        this.success.write(oprot);
4872
        oprot.writeFieldEnd();
553 chandransh 4873
      } else if (this.isSetUcex()) {
4874
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4875
        this.ucex.write(oprot);
48 ashish 4876
        oprot.writeFieldEnd();
4877
      }
4878
      oprot.writeFieldStop();
4879
      oprot.writeStructEnd();
4880
    }
4881
 
4882
    @Override
4883
    public String toString() {
553 chandransh 4884
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4885
      boolean first = true;
4886
 
4887
      sb.append("success:");
4888
      if (this.success == null) {
4889
        sb.append("null");
4890
      } else {
4891
        sb.append(this.success);
4892
      }
4893
      first = false;
4894
      if (!first) sb.append(", ");
553 chandransh 4895
      sb.append("ucex:");
4896
      if (this.ucex == null) {
48 ashish 4897
        sb.append("null");
4898
      } else {
553 chandransh 4899
        sb.append(this.ucex);
48 ashish 4900
      }
4901
      first = false;
4902
      sb.append(")");
4903
      return sb.toString();
4904
    }
4905
 
4906
    public void validate() throws TException {
4907
      // check for required fields
4908
    }
4909
 
4910
  }
4911
 
1491 vikas 4912
  public static class getUserByEmail_args implements TBase<getUserByEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserByEmail_args>   {
4913
    private static final TStruct STRUCT_DESC = new TStruct("getUserByEmail_args");
4914
 
4915
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
4916
 
4917
    private String email;
4918
 
4919
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4920
    public enum _Fields implements TFieldIdEnum {
4921
      EMAIL((short)1, "email");
4922
 
4923
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4924
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4925
 
4926
      static {
4927
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4928
          byId.put((int)field._thriftId, field);
4929
          byName.put(field.getFieldName(), field);
4930
        }
4931
      }
4932
 
4933
      /**
4934
       * Find the _Fields constant that matches fieldId, or null if its not found.
4935
       */
4936
      public static _Fields findByThriftId(int fieldId) {
4937
        return byId.get(fieldId);
4938
      }
4939
 
4940
      /**
4941
       * Find the _Fields constant that matches fieldId, throwing an exception
4942
       * if it is not found.
4943
       */
4944
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4945
        _Fields fields = findByThriftId(fieldId);
4946
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4947
        return fields;
4948
      }
4949
 
4950
      /**
4951
       * Find the _Fields constant that matches name, or null if its not found.
4952
       */
4953
      public static _Fields findByName(String name) {
4954
        return byName.get(name);
4955
      }
4956
 
4957
      private final short _thriftId;
4958
      private final String _fieldName;
4959
 
4960
      _Fields(short thriftId, String fieldName) {
4961
        _thriftId = thriftId;
4962
        _fieldName = fieldName;
4963
      }
4964
 
4965
      public short getThriftFieldId() {
4966
        return _thriftId;
4967
      }
4968
 
4969
      public String getFieldName() {
4970
        return _fieldName;
4971
      }
4972
    }
4973
 
4974
    // isset id assignments
4975
 
4976
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4977
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
4978
          new FieldValueMetaData(TType.STRING)));
4979
    }});
4980
 
4981
    static {
4982
      FieldMetaData.addStructMetaDataMap(getUserByEmail_args.class, metaDataMap);
4983
    }
4984
 
4985
    public getUserByEmail_args() {
4986
    }
4987
 
4988
    public getUserByEmail_args(
4989
      String email)
4990
    {
4991
      this();
4992
      this.email = email;
4993
    }
4994
 
4995
    /**
4996
     * Performs a deep copy on <i>other</i>.
4997
     */
4998
    public getUserByEmail_args(getUserByEmail_args other) {
4999
      if (other.isSetEmail()) {
5000
        this.email = other.email;
5001
      }
5002
    }
5003
 
5004
    public getUserByEmail_args deepCopy() {
5005
      return new getUserByEmail_args(this);
5006
    }
5007
 
5008
    @Deprecated
5009
    public getUserByEmail_args clone() {
5010
      return new getUserByEmail_args(this);
5011
    }
5012
 
5013
    public String getEmail() {
5014
      return this.email;
5015
    }
5016
 
5017
    public getUserByEmail_args setEmail(String email) {
5018
      this.email = email;
5019
      return this;
5020
    }
5021
 
5022
    public void unsetEmail() {
5023
      this.email = null;
5024
    }
5025
 
5026
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
5027
    public boolean isSetEmail() {
5028
      return this.email != null;
5029
    }
5030
 
5031
    public void setEmailIsSet(boolean value) {
5032
      if (!value) {
5033
        this.email = null;
5034
      }
5035
    }
5036
 
5037
    public void setFieldValue(_Fields field, Object value) {
5038
      switch (field) {
5039
      case EMAIL:
5040
        if (value == null) {
5041
          unsetEmail();
5042
        } else {
5043
          setEmail((String)value);
5044
        }
5045
        break;
5046
 
5047
      }
5048
    }
5049
 
5050
    public void setFieldValue(int fieldID, Object value) {
5051
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5052
    }
5053
 
5054
    public Object getFieldValue(_Fields field) {
5055
      switch (field) {
5056
      case EMAIL:
5057
        return getEmail();
5058
 
5059
      }
5060
      throw new IllegalStateException();
5061
    }
5062
 
5063
    public Object getFieldValue(int fieldId) {
5064
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5065
    }
5066
 
5067
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5068
    public boolean isSet(_Fields field) {
5069
      switch (field) {
5070
      case EMAIL:
5071
        return isSetEmail();
5072
      }
5073
      throw new IllegalStateException();
5074
    }
5075
 
5076
    public boolean isSet(int fieldID) {
5077
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5078
    }
5079
 
5080
    @Override
5081
    public boolean equals(Object that) {
5082
      if (that == null)
5083
        return false;
5084
      if (that instanceof getUserByEmail_args)
5085
        return this.equals((getUserByEmail_args)that);
5086
      return false;
5087
    }
5088
 
5089
    public boolean equals(getUserByEmail_args that) {
5090
      if (that == null)
5091
        return false;
5092
 
5093
      boolean this_present_email = true && this.isSetEmail();
5094
      boolean that_present_email = true && that.isSetEmail();
5095
      if (this_present_email || that_present_email) {
5096
        if (!(this_present_email && that_present_email))
5097
          return false;
5098
        if (!this.email.equals(that.email))
5099
          return false;
5100
      }
5101
 
5102
      return true;
5103
    }
5104
 
5105
    @Override
5106
    public int hashCode() {
5107
      return 0;
5108
    }
5109
 
5110
    public int compareTo(getUserByEmail_args other) {
5111
      if (!getClass().equals(other.getClass())) {
5112
        return getClass().getName().compareTo(other.getClass().getName());
5113
      }
5114
 
5115
      int lastComparison = 0;
5116
      getUserByEmail_args typedOther = (getUserByEmail_args)other;
5117
 
5118
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
5119
      if (lastComparison != 0) {
5120
        return lastComparison;
5121
      }
5122
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
5123
      if (lastComparison != 0) {
5124
        return lastComparison;
5125
      }
5126
      return 0;
5127
    }
5128
 
5129
    public void read(TProtocol iprot) throws TException {
5130
      TField field;
5131
      iprot.readStructBegin();
5132
      while (true)
5133
      {
5134
        field = iprot.readFieldBegin();
5135
        if (field.type == TType.STOP) { 
5136
          break;
5137
        }
5138
        _Fields fieldId = _Fields.findByThriftId(field.id);
5139
        if (fieldId == null) {
5140
          TProtocolUtil.skip(iprot, field.type);
5141
        } else {
5142
          switch (fieldId) {
5143
            case EMAIL:
5144
              if (field.type == TType.STRING) {
5145
                this.email = iprot.readString();
5146
              } else { 
5147
                TProtocolUtil.skip(iprot, field.type);
5148
              }
5149
              break;
5150
          }
5151
          iprot.readFieldEnd();
5152
        }
5153
      }
5154
      iprot.readStructEnd();
5155
      validate();
5156
    }
5157
 
5158
    public void write(TProtocol oprot) throws TException {
5159
      validate();
5160
 
5161
      oprot.writeStructBegin(STRUCT_DESC);
5162
      if (this.email != null) {
5163
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
5164
        oprot.writeString(this.email);
5165
        oprot.writeFieldEnd();
5166
      }
5167
      oprot.writeFieldStop();
5168
      oprot.writeStructEnd();
5169
    }
5170
 
5171
    @Override
5172
    public String toString() {
5173
      StringBuilder sb = new StringBuilder("getUserByEmail_args(");
5174
      boolean first = true;
5175
 
5176
      sb.append("email:");
5177
      if (this.email == null) {
5178
        sb.append("null");
5179
      } else {
5180
        sb.append(this.email);
5181
      }
5182
      first = false;
5183
      sb.append(")");
5184
      return sb.toString();
5185
    }
5186
 
5187
    public void validate() throws TException {
5188
      // check for required fields
5189
    }
5190
 
5191
  }
5192
 
5193
  public static class getUserByEmail_result implements TBase<getUserByEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserByEmail_result>   {
5194
    private static final TStruct STRUCT_DESC = new TStruct("getUserByEmail_result");
5195
 
5196
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
5197
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
5198
 
5199
    private User success;
5200
    private UserContextException ucex;
5201
 
5202
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5203
    public enum _Fields implements TFieldIdEnum {
5204
      SUCCESS((short)0, "success"),
5205
      UCEX((short)1, "ucex");
5206
 
5207
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5208
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5209
 
5210
      static {
5211
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5212
          byId.put((int)field._thriftId, field);
5213
          byName.put(field.getFieldName(), field);
5214
        }
5215
      }
5216
 
5217
      /**
5218
       * Find the _Fields constant that matches fieldId, or null if its not found.
5219
       */
5220
      public static _Fields findByThriftId(int fieldId) {
5221
        return byId.get(fieldId);
5222
      }
5223
 
5224
      /**
5225
       * Find the _Fields constant that matches fieldId, throwing an exception
5226
       * if it is not found.
5227
       */
5228
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5229
        _Fields fields = findByThriftId(fieldId);
5230
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5231
        return fields;
5232
      }
5233
 
5234
      /**
5235
       * Find the _Fields constant that matches name, or null if its not found.
5236
       */
5237
      public static _Fields findByName(String name) {
5238
        return byName.get(name);
5239
      }
5240
 
5241
      private final short _thriftId;
5242
      private final String _fieldName;
5243
 
5244
      _Fields(short thriftId, String fieldName) {
5245
        _thriftId = thriftId;
5246
        _fieldName = fieldName;
5247
      }
5248
 
5249
      public short getThriftFieldId() {
5250
        return _thriftId;
5251
      }
5252
 
5253
      public String getFieldName() {
5254
        return _fieldName;
5255
      }
5256
    }
5257
 
5258
    // isset id assignments
5259
 
5260
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5261
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5262
          new StructMetaData(TType.STRUCT, User.class)));
5263
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
5264
          new FieldValueMetaData(TType.STRUCT)));
5265
    }});
5266
 
5267
    static {
5268
      FieldMetaData.addStructMetaDataMap(getUserByEmail_result.class, metaDataMap);
5269
    }
5270
 
5271
    public getUserByEmail_result() {
5272
    }
5273
 
5274
    public getUserByEmail_result(
5275
      User success,
5276
      UserContextException ucex)
5277
    {
5278
      this();
5279
      this.success = success;
5280
      this.ucex = ucex;
5281
    }
5282
 
5283
    /**
5284
     * Performs a deep copy on <i>other</i>.
5285
     */
5286
    public getUserByEmail_result(getUserByEmail_result other) {
5287
      if (other.isSetSuccess()) {
5288
        this.success = new User(other.success);
5289
      }
5290
      if (other.isSetUcex()) {
5291
        this.ucex = new UserContextException(other.ucex);
5292
      }
5293
    }
5294
 
5295
    public getUserByEmail_result deepCopy() {
5296
      return new getUserByEmail_result(this);
5297
    }
5298
 
5299
    @Deprecated
5300
    public getUserByEmail_result clone() {
5301
      return new getUserByEmail_result(this);
5302
    }
5303
 
5304
    public User getSuccess() {
5305
      return this.success;
5306
    }
5307
 
5308
    public getUserByEmail_result setSuccess(User success) {
5309
      this.success = success;
5310
      return this;
5311
    }
5312
 
5313
    public void unsetSuccess() {
5314
      this.success = null;
5315
    }
5316
 
5317
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5318
    public boolean isSetSuccess() {
5319
      return this.success != null;
5320
    }
5321
 
5322
    public void setSuccessIsSet(boolean value) {
5323
      if (!value) {
5324
        this.success = null;
5325
      }
5326
    }
5327
 
5328
    public UserContextException getUcex() {
5329
      return this.ucex;
5330
    }
5331
 
5332
    public getUserByEmail_result setUcex(UserContextException ucex) {
5333
      this.ucex = ucex;
5334
      return this;
5335
    }
5336
 
5337
    public void unsetUcex() {
5338
      this.ucex = null;
5339
    }
5340
 
5341
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5342
    public boolean isSetUcex() {
5343
      return this.ucex != null;
5344
    }
5345
 
5346
    public void setUcexIsSet(boolean value) {
5347
      if (!value) {
5348
        this.ucex = null;
5349
      }
5350
    }
5351
 
5352
    public void setFieldValue(_Fields field, Object value) {
5353
      switch (field) {
5354
      case SUCCESS:
5355
        if (value == null) {
5356
          unsetSuccess();
5357
        } else {
5358
          setSuccess((User)value);
5359
        }
5360
        break;
5361
 
5362
      case UCEX:
5363
        if (value == null) {
5364
          unsetUcex();
5365
        } else {
5366
          setUcex((UserContextException)value);
5367
        }
5368
        break;
5369
 
5370
      }
5371
    }
5372
 
5373
    public void setFieldValue(int fieldID, Object value) {
5374
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5375
    }
5376
 
5377
    public Object getFieldValue(_Fields field) {
5378
      switch (field) {
5379
      case SUCCESS:
5380
        return getSuccess();
5381
 
5382
      case UCEX:
5383
        return getUcex();
5384
 
5385
      }
5386
      throw new IllegalStateException();
5387
    }
5388
 
5389
    public Object getFieldValue(int fieldId) {
5390
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5391
    }
5392
 
5393
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5394
    public boolean isSet(_Fields field) {
5395
      switch (field) {
5396
      case SUCCESS:
5397
        return isSetSuccess();
5398
      case UCEX:
5399
        return isSetUcex();
5400
      }
5401
      throw new IllegalStateException();
5402
    }
5403
 
5404
    public boolean isSet(int fieldID) {
5405
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5406
    }
5407
 
5408
    @Override
5409
    public boolean equals(Object that) {
5410
      if (that == null)
5411
        return false;
5412
      if (that instanceof getUserByEmail_result)
5413
        return this.equals((getUserByEmail_result)that);
5414
      return false;
5415
    }
5416
 
5417
    public boolean equals(getUserByEmail_result that) {
5418
      if (that == null)
5419
        return false;
5420
 
5421
      boolean this_present_success = true && this.isSetSuccess();
5422
      boolean that_present_success = true && that.isSetSuccess();
5423
      if (this_present_success || that_present_success) {
5424
        if (!(this_present_success && that_present_success))
5425
          return false;
5426
        if (!this.success.equals(that.success))
5427
          return false;
5428
      }
5429
 
5430
      boolean this_present_ucex = true && this.isSetUcex();
5431
      boolean that_present_ucex = true && that.isSetUcex();
5432
      if (this_present_ucex || that_present_ucex) {
5433
        if (!(this_present_ucex && that_present_ucex))
5434
          return false;
5435
        if (!this.ucex.equals(that.ucex))
5436
          return false;
5437
      }
5438
 
5439
      return true;
5440
    }
5441
 
5442
    @Override
5443
    public int hashCode() {
5444
      return 0;
5445
    }
5446
 
5447
    public int compareTo(getUserByEmail_result other) {
5448
      if (!getClass().equals(other.getClass())) {
5449
        return getClass().getName().compareTo(other.getClass().getName());
5450
      }
5451
 
5452
      int lastComparison = 0;
5453
      getUserByEmail_result typedOther = (getUserByEmail_result)other;
5454
 
5455
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5456
      if (lastComparison != 0) {
5457
        return lastComparison;
5458
      }
5459
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5460
      if (lastComparison != 0) {
5461
        return lastComparison;
5462
      }
5463
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5464
      if (lastComparison != 0) {
5465
        return lastComparison;
5466
      }
5467
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5468
      if (lastComparison != 0) {
5469
        return lastComparison;
5470
      }
5471
      return 0;
5472
    }
5473
 
5474
    public void read(TProtocol iprot) throws TException {
5475
      TField field;
5476
      iprot.readStructBegin();
5477
      while (true)
5478
      {
5479
        field = iprot.readFieldBegin();
5480
        if (field.type == TType.STOP) { 
5481
          break;
5482
        }
5483
        _Fields fieldId = _Fields.findByThriftId(field.id);
5484
        if (fieldId == null) {
5485
          TProtocolUtil.skip(iprot, field.type);
5486
        } else {
5487
          switch (fieldId) {
5488
            case SUCCESS:
5489
              if (field.type == TType.STRUCT) {
5490
                this.success = new User();
5491
                this.success.read(iprot);
5492
              } else { 
5493
                TProtocolUtil.skip(iprot, field.type);
5494
              }
5495
              break;
5496
            case UCEX:
5497
              if (field.type == TType.STRUCT) {
5498
                this.ucex = new UserContextException();
5499
                this.ucex.read(iprot);
5500
              } else { 
5501
                TProtocolUtil.skip(iprot, field.type);
5502
              }
5503
              break;
5504
          }
5505
          iprot.readFieldEnd();
5506
        }
5507
      }
5508
      iprot.readStructEnd();
5509
      validate();
5510
    }
5511
 
5512
    public void write(TProtocol oprot) throws TException {
5513
      oprot.writeStructBegin(STRUCT_DESC);
5514
 
5515
      if (this.isSetSuccess()) {
5516
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5517
        this.success.write(oprot);
5518
        oprot.writeFieldEnd();
5519
      } else if (this.isSetUcex()) {
5520
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5521
        this.ucex.write(oprot);
5522
        oprot.writeFieldEnd();
5523
      }
5524
      oprot.writeFieldStop();
5525
      oprot.writeStructEnd();
5526
    }
5527
 
5528
    @Override
5529
    public String toString() {
5530
      StringBuilder sb = new StringBuilder("getUserByEmail_result(");
5531
      boolean first = true;
5532
 
5533
      sb.append("success:");
5534
      if (this.success == null) {
5535
        sb.append("null");
5536
      } else {
5537
        sb.append(this.success);
5538
      }
5539
      first = false;
5540
      if (!first) sb.append(", ");
5541
      sb.append("ucex:");
5542
      if (this.ucex == null) {
5543
        sb.append("null");
5544
      } else {
5545
        sb.append(this.ucex);
5546
      }
5547
      first = false;
5548
      sb.append(")");
5549
      return sb.toString();
5550
    }
5551
 
5552
    public void validate() throws TException {
5553
      // check for required fields
5554
    }
5555
 
5556
  }
5557
 
571 rajveer 5558
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 5559
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 5560
 
553 chandransh 5561
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5562
 
553 chandransh 5563
    private User user;
48 ashish 5564
 
5565
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5566
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5567
      USER((short)1, "user");
48 ashish 5568
 
5569
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5570
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5571
 
5572
      static {
5573
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5574
          byId.put((int)field._thriftId, field);
5575
          byName.put(field.getFieldName(), field);
5576
        }
5577
      }
5578
 
5579
      /**
5580
       * Find the _Fields constant that matches fieldId, or null if its not found.
5581
       */
5582
      public static _Fields findByThriftId(int fieldId) {
5583
        return byId.get(fieldId);
5584
      }
5585
 
5586
      /**
5587
       * Find the _Fields constant that matches fieldId, throwing an exception
5588
       * if it is not found.
5589
       */
5590
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5591
        _Fields fields = findByThriftId(fieldId);
5592
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5593
        return fields;
5594
      }
5595
 
5596
      /**
5597
       * Find the _Fields constant that matches name, or null if its not found.
5598
       */
5599
      public static _Fields findByName(String name) {
5600
        return byName.get(name);
5601
      }
5602
 
5603
      private final short _thriftId;
5604
      private final String _fieldName;
5605
 
5606
      _Fields(short thriftId, String fieldName) {
5607
        _thriftId = thriftId;
5608
        _fieldName = fieldName;
5609
      }
5610
 
5611
      public short getThriftFieldId() {
5612
        return _thriftId;
5613
      }
5614
 
5615
      public String getFieldName() {
5616
        return _fieldName;
5617
      }
5618
    }
5619
 
5620
    // isset id assignments
5621
 
5622
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5623
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5624
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5625
    }});
5626
 
5627
    static {
553 chandransh 5628
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 5629
    }
5630
 
553 chandransh 5631
    public createUser_args() {
48 ashish 5632
    }
5633
 
553 chandransh 5634
    public createUser_args(
5635
      User user)
48 ashish 5636
    {
5637
      this();
553 chandransh 5638
      this.user = user;
48 ashish 5639
    }
5640
 
5641
    /**
5642
     * Performs a deep copy on <i>other</i>.
5643
     */
553 chandransh 5644
    public createUser_args(createUser_args other) {
5645
      if (other.isSetUser()) {
5646
        this.user = new User(other.user);
48 ashish 5647
      }
5648
    }
5649
 
553 chandransh 5650
    public createUser_args deepCopy() {
5651
      return new createUser_args(this);
48 ashish 5652
    }
5653
 
5654
    @Deprecated
553 chandransh 5655
    public createUser_args clone() {
5656
      return new createUser_args(this);
48 ashish 5657
    }
5658
 
553 chandransh 5659
    public User getUser() {
5660
      return this.user;
48 ashish 5661
    }
5662
 
553 chandransh 5663
    public createUser_args setUser(User user) {
5664
      this.user = user;
48 ashish 5665
      return this;
5666
    }
5667
 
553 chandransh 5668
    public void unsetUser() {
5669
      this.user = null;
48 ashish 5670
    }
5671
 
553 chandransh 5672
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5673
    public boolean isSetUser() {
5674
      return this.user != null;
48 ashish 5675
    }
5676
 
553 chandransh 5677
    public void setUserIsSet(boolean value) {
48 ashish 5678
      if (!value) {
553 chandransh 5679
        this.user = null;
48 ashish 5680
      }
5681
    }
5682
 
5683
    public void setFieldValue(_Fields field, Object value) {
5684
      switch (field) {
553 chandransh 5685
      case USER:
48 ashish 5686
        if (value == null) {
553 chandransh 5687
          unsetUser();
48 ashish 5688
        } else {
553 chandransh 5689
          setUser((User)value);
48 ashish 5690
        }
5691
        break;
5692
 
5693
      }
5694
    }
5695
 
5696
    public void setFieldValue(int fieldID, Object value) {
5697
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5698
    }
5699
 
5700
    public Object getFieldValue(_Fields field) {
5701
      switch (field) {
553 chandransh 5702
      case USER:
5703
        return getUser();
48 ashish 5704
 
5705
      }
5706
      throw new IllegalStateException();
5707
    }
5708
 
5709
    public Object getFieldValue(int fieldId) {
5710
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5711
    }
5712
 
5713
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5714
    public boolean isSet(_Fields field) {
5715
      switch (field) {
553 chandransh 5716
      case USER:
5717
        return isSetUser();
48 ashish 5718
      }
5719
      throw new IllegalStateException();
5720
    }
5721
 
5722
    public boolean isSet(int fieldID) {
5723
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5724
    }
5725
 
5726
    @Override
5727
    public boolean equals(Object that) {
5728
      if (that == null)
5729
        return false;
553 chandransh 5730
      if (that instanceof createUser_args)
5731
        return this.equals((createUser_args)that);
48 ashish 5732
      return false;
5733
    }
5734
 
553 chandransh 5735
    public boolean equals(createUser_args that) {
48 ashish 5736
      if (that == null)
5737
        return false;
5738
 
553 chandransh 5739
      boolean this_present_user = true && this.isSetUser();
5740
      boolean that_present_user = true && that.isSetUser();
5741
      if (this_present_user || that_present_user) {
5742
        if (!(this_present_user && that_present_user))
48 ashish 5743
          return false;
553 chandransh 5744
        if (!this.user.equals(that.user))
48 ashish 5745
          return false;
5746
      }
5747
 
5748
      return true;
5749
    }
5750
 
5751
    @Override
5752
    public int hashCode() {
5753
      return 0;
5754
    }
5755
 
571 rajveer 5756
    public int compareTo(createUser_args other) {
5757
      if (!getClass().equals(other.getClass())) {
5758
        return getClass().getName().compareTo(other.getClass().getName());
5759
      }
5760
 
5761
      int lastComparison = 0;
5762
      createUser_args typedOther = (createUser_args)other;
5763
 
5764
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5765
      if (lastComparison != 0) {
5766
        return lastComparison;
5767
      }
5768
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5769
      if (lastComparison != 0) {
5770
        return lastComparison;
5771
      }
5772
      return 0;
5773
    }
5774
 
48 ashish 5775
    public void read(TProtocol iprot) throws TException {
5776
      TField field;
5777
      iprot.readStructBegin();
5778
      while (true)
5779
      {
5780
        field = iprot.readFieldBegin();
5781
        if (field.type == TType.STOP) { 
5782
          break;
5783
        }
5784
        _Fields fieldId = _Fields.findByThriftId(field.id);
5785
        if (fieldId == null) {
5786
          TProtocolUtil.skip(iprot, field.type);
5787
        } else {
5788
          switch (fieldId) {
553 chandransh 5789
            case USER:
5790
              if (field.type == TType.STRUCT) {
5791
                this.user = new User();
5792
                this.user.read(iprot);
48 ashish 5793
              } else { 
5794
                TProtocolUtil.skip(iprot, field.type);
5795
              }
5796
              break;
5797
          }
5798
          iprot.readFieldEnd();
5799
        }
5800
      }
5801
      iprot.readStructEnd();
5802
      validate();
5803
    }
5804
 
5805
    public void write(TProtocol oprot) throws TException {
5806
      validate();
5807
 
5808
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5809
      if (this.user != null) {
5810
        oprot.writeFieldBegin(USER_FIELD_DESC);
5811
        this.user.write(oprot);
48 ashish 5812
        oprot.writeFieldEnd();
5813
      }
5814
      oprot.writeFieldStop();
5815
      oprot.writeStructEnd();
5816
    }
5817
 
5818
    @Override
5819
    public String toString() {
553 chandransh 5820
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 5821
      boolean first = true;
5822
 
553 chandransh 5823
      sb.append("user:");
5824
      if (this.user == null) {
48 ashish 5825
        sb.append("null");
5826
      } else {
553 chandransh 5827
        sb.append(this.user);
48 ashish 5828
      }
5829
      first = false;
5830
      sb.append(")");
5831
      return sb.toString();
5832
    }
5833
 
5834
    public void validate() throws TException {
5835
      // check for required fields
5836
    }
5837
 
5838
  }
5839
 
571 rajveer 5840
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 5841
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 5842
 
5843
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5844
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5845
 
553 chandransh 5846
    private User success;
5847
    private UserContextException ucex;
48 ashish 5848
 
5849
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5850
    public enum _Fields implements TFieldIdEnum {
5851
      SUCCESS((short)0, "success"),
553 chandransh 5852
      UCEX((short)1, "ucex");
48 ashish 5853
 
5854
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5855
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5856
 
5857
      static {
5858
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5859
          byId.put((int)field._thriftId, field);
5860
          byName.put(field.getFieldName(), field);
5861
        }
5862
      }
5863
 
5864
      /**
5865
       * Find the _Fields constant that matches fieldId, or null if its not found.
5866
       */
5867
      public static _Fields findByThriftId(int fieldId) {
5868
        return byId.get(fieldId);
5869
      }
5870
 
5871
      /**
5872
       * Find the _Fields constant that matches fieldId, throwing an exception
5873
       * if it is not found.
5874
       */
5875
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5876
        _Fields fields = findByThriftId(fieldId);
5877
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5878
        return fields;
5879
      }
5880
 
5881
      /**
5882
       * Find the _Fields constant that matches name, or null if its not found.
5883
       */
5884
      public static _Fields findByName(String name) {
5885
        return byName.get(name);
5886
      }
5887
 
5888
      private final short _thriftId;
5889
      private final String _fieldName;
5890
 
5891
      _Fields(short thriftId, String fieldName) {
5892
        _thriftId = thriftId;
5893
        _fieldName = fieldName;
5894
      }
5895
 
5896
      public short getThriftFieldId() {
5897
        return _thriftId;
5898
      }
5899
 
5900
      public String getFieldName() {
5901
        return _fieldName;
5902
      }
5903
    }
5904
 
5905
    // isset id assignments
5906
 
5907
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5908
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5909
          new StructMetaData(TType.STRUCT, User.class)));
5910
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5911
          new FieldValueMetaData(TType.STRUCT)));
5912
    }});
5913
 
5914
    static {
553 chandransh 5915
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 5916
    }
5917
 
553 chandransh 5918
    public createUser_result() {
48 ashish 5919
    }
5920
 
553 chandransh 5921
    public createUser_result(
5922
      User success,
5923
      UserContextException ucex)
48 ashish 5924
    {
5925
      this();
5926
      this.success = success;
553 chandransh 5927
      this.ucex = ucex;
48 ashish 5928
    }
5929
 
5930
    /**
5931
     * Performs a deep copy on <i>other</i>.
5932
     */
553 chandransh 5933
    public createUser_result(createUser_result other) {
48 ashish 5934
      if (other.isSetSuccess()) {
553 chandransh 5935
        this.success = new User(other.success);
48 ashish 5936
      }
553 chandransh 5937
      if (other.isSetUcex()) {
5938
        this.ucex = new UserContextException(other.ucex);
48 ashish 5939
      }
5940
    }
5941
 
553 chandransh 5942
    public createUser_result deepCopy() {
5943
      return new createUser_result(this);
48 ashish 5944
    }
5945
 
5946
    @Deprecated
553 chandransh 5947
    public createUser_result clone() {
5948
      return new createUser_result(this);
48 ashish 5949
    }
5950
 
553 chandransh 5951
    public User getSuccess() {
48 ashish 5952
      return this.success;
5953
    }
5954
 
553 chandransh 5955
    public createUser_result setSuccess(User success) {
48 ashish 5956
      this.success = success;
5957
      return this;
5958
    }
5959
 
5960
    public void unsetSuccess() {
5961
      this.success = null;
5962
    }
5963
 
5964
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5965
    public boolean isSetSuccess() {
5966
      return this.success != null;
5967
    }
5968
 
5969
    public void setSuccessIsSet(boolean value) {
5970
      if (!value) {
5971
        this.success = null;
5972
      }
5973
    }
5974
 
553 chandransh 5975
    public UserContextException getUcex() {
5976
      return this.ucex;
48 ashish 5977
    }
5978
 
553 chandransh 5979
    public createUser_result setUcex(UserContextException ucex) {
5980
      this.ucex = ucex;
48 ashish 5981
      return this;
5982
    }
5983
 
553 chandransh 5984
    public void unsetUcex() {
5985
      this.ucex = null;
48 ashish 5986
    }
5987
 
553 chandransh 5988
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5989
    public boolean isSetUcex() {
5990
      return this.ucex != null;
48 ashish 5991
    }
5992
 
553 chandransh 5993
    public void setUcexIsSet(boolean value) {
48 ashish 5994
      if (!value) {
553 chandransh 5995
        this.ucex = null;
48 ashish 5996
      }
5997
    }
5998
 
5999
    public void setFieldValue(_Fields field, Object value) {
6000
      switch (field) {
6001
      case SUCCESS:
6002
        if (value == null) {
6003
          unsetSuccess();
6004
        } else {
553 chandransh 6005
          setSuccess((User)value);
48 ashish 6006
        }
6007
        break;
6008
 
553 chandransh 6009
      case UCEX:
48 ashish 6010
        if (value == null) {
553 chandransh 6011
          unsetUcex();
48 ashish 6012
        } else {
553 chandransh 6013
          setUcex((UserContextException)value);
48 ashish 6014
        }
6015
        break;
6016
 
6017
      }
6018
    }
6019
 
6020
    public void setFieldValue(int fieldID, Object value) {
6021
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6022
    }
6023
 
6024
    public Object getFieldValue(_Fields field) {
6025
      switch (field) {
6026
      case SUCCESS:
6027
        return getSuccess();
6028
 
553 chandransh 6029
      case UCEX:
6030
        return getUcex();
48 ashish 6031
 
6032
      }
6033
      throw new IllegalStateException();
6034
    }
6035
 
6036
    public Object getFieldValue(int fieldId) {
6037
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6038
    }
6039
 
6040
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6041
    public boolean isSet(_Fields field) {
6042
      switch (field) {
6043
      case SUCCESS:
6044
        return isSetSuccess();
553 chandransh 6045
      case UCEX:
6046
        return isSetUcex();
48 ashish 6047
      }
6048
      throw new IllegalStateException();
6049
    }
6050
 
6051
    public boolean isSet(int fieldID) {
6052
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6053
    }
6054
 
6055
    @Override
6056
    public boolean equals(Object that) {
6057
      if (that == null)
6058
        return false;
553 chandransh 6059
      if (that instanceof createUser_result)
6060
        return this.equals((createUser_result)that);
48 ashish 6061
      return false;
6062
    }
6063
 
553 chandransh 6064
    public boolean equals(createUser_result that) {
48 ashish 6065
      if (that == null)
6066
        return false;
6067
 
6068
      boolean this_present_success = true && this.isSetSuccess();
6069
      boolean that_present_success = true && that.isSetSuccess();
6070
      if (this_present_success || that_present_success) {
6071
        if (!(this_present_success && that_present_success))
6072
          return false;
6073
        if (!this.success.equals(that.success))
6074
          return false;
6075
      }
6076
 
553 chandransh 6077
      boolean this_present_ucex = true && this.isSetUcex();
6078
      boolean that_present_ucex = true && that.isSetUcex();
6079
      if (this_present_ucex || that_present_ucex) {
6080
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6081
          return false;
553 chandransh 6082
        if (!this.ucex.equals(that.ucex))
48 ashish 6083
          return false;
6084
      }
6085
 
6086
      return true;
6087
    }
6088
 
6089
    @Override
6090
    public int hashCode() {
6091
      return 0;
6092
    }
6093
 
571 rajveer 6094
    public int compareTo(createUser_result other) {
6095
      if (!getClass().equals(other.getClass())) {
6096
        return getClass().getName().compareTo(other.getClass().getName());
6097
      }
6098
 
6099
      int lastComparison = 0;
6100
      createUser_result typedOther = (createUser_result)other;
6101
 
6102
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6103
      if (lastComparison != 0) {
6104
        return lastComparison;
6105
      }
6106
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6107
      if (lastComparison != 0) {
6108
        return lastComparison;
6109
      }
6110
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6111
      if (lastComparison != 0) {
6112
        return lastComparison;
6113
      }
6114
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6115
      if (lastComparison != 0) {
6116
        return lastComparison;
6117
      }
6118
      return 0;
6119
    }
6120
 
48 ashish 6121
    public void read(TProtocol iprot) throws TException {
6122
      TField field;
6123
      iprot.readStructBegin();
6124
      while (true)
6125
      {
6126
        field = iprot.readFieldBegin();
6127
        if (field.type == TType.STOP) { 
6128
          break;
6129
        }
6130
        _Fields fieldId = _Fields.findByThriftId(field.id);
6131
        if (fieldId == null) {
6132
          TProtocolUtil.skip(iprot, field.type);
6133
        } else {
6134
          switch (fieldId) {
6135
            case SUCCESS:
6136
              if (field.type == TType.STRUCT) {
553 chandransh 6137
                this.success = new User();
48 ashish 6138
                this.success.read(iprot);
6139
              } else { 
6140
                TProtocolUtil.skip(iprot, field.type);
6141
              }
6142
              break;
553 chandransh 6143
            case UCEX:
48 ashish 6144
              if (field.type == TType.STRUCT) {
553 chandransh 6145
                this.ucex = new UserContextException();
6146
                this.ucex.read(iprot);
48 ashish 6147
              } else { 
6148
                TProtocolUtil.skip(iprot, field.type);
6149
              }
6150
              break;
6151
          }
6152
          iprot.readFieldEnd();
6153
        }
6154
      }
6155
      iprot.readStructEnd();
6156
      validate();
6157
    }
6158
 
6159
    public void write(TProtocol oprot) throws TException {
6160
      oprot.writeStructBegin(STRUCT_DESC);
6161
 
6162
      if (this.isSetSuccess()) {
6163
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6164
        this.success.write(oprot);
6165
        oprot.writeFieldEnd();
553 chandransh 6166
      } else if (this.isSetUcex()) {
6167
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6168
        this.ucex.write(oprot);
48 ashish 6169
        oprot.writeFieldEnd();
6170
      }
6171
      oprot.writeFieldStop();
6172
      oprot.writeStructEnd();
6173
    }
6174
 
6175
    @Override
6176
    public String toString() {
553 chandransh 6177
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 6178
      boolean first = true;
6179
 
6180
      sb.append("success:");
6181
      if (this.success == null) {
6182
        sb.append("null");
6183
      } else {
6184
        sb.append(this.success);
6185
      }
6186
      first = false;
6187
      if (!first) sb.append(", ");
553 chandransh 6188
      sb.append("ucex:");
6189
      if (this.ucex == null) {
48 ashish 6190
        sb.append("null");
6191
      } else {
553 chandransh 6192
        sb.append(this.ucex);
48 ashish 6193
      }
6194
      first = false;
6195
      sb.append(")");
6196
      return sb.toString();
6197
    }
6198
 
6199
    public void validate() throws TException {
6200
      // check for required fields
6201
    }
6202
 
6203
  }
6204
 
571 rajveer 6205
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 6206
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 6207
 
553 chandransh 6208
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 6209
 
553 chandransh 6210
    private User user;
48 ashish 6211
 
6212
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6213
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6214
      USER((short)1, "user");
48 ashish 6215
 
6216
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6217
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6218
 
6219
      static {
6220
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6221
          byId.put((int)field._thriftId, field);
6222
          byName.put(field.getFieldName(), field);
6223
        }
6224
      }
6225
 
6226
      /**
6227
       * Find the _Fields constant that matches fieldId, or null if its not found.
6228
       */
6229
      public static _Fields findByThriftId(int fieldId) {
6230
        return byId.get(fieldId);
6231
      }
6232
 
6233
      /**
6234
       * Find the _Fields constant that matches fieldId, throwing an exception
6235
       * if it is not found.
6236
       */
6237
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6238
        _Fields fields = findByThriftId(fieldId);
6239
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6240
        return fields;
6241
      }
6242
 
6243
      /**
6244
       * Find the _Fields constant that matches name, or null if its not found.
6245
       */
6246
      public static _Fields findByName(String name) {
6247
        return byName.get(name);
6248
      }
6249
 
6250
      private final short _thriftId;
6251
      private final String _fieldName;
6252
 
6253
      _Fields(short thriftId, String fieldName) {
6254
        _thriftId = thriftId;
6255
        _fieldName = fieldName;
6256
      }
6257
 
6258
      public short getThriftFieldId() {
6259
        return _thriftId;
6260
      }
6261
 
6262
      public String getFieldName() {
6263
        return _fieldName;
6264
      }
6265
    }
6266
 
6267
    // isset id assignments
6268
 
6269
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 6270
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
6271
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 6272
    }});
6273
 
6274
    static {
553 chandransh 6275
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 6276
    }
6277
 
553 chandransh 6278
    public updateUser_args() {
48 ashish 6279
    }
6280
 
553 chandransh 6281
    public updateUser_args(
6282
      User user)
48 ashish 6283
    {
6284
      this();
553 chandransh 6285
      this.user = user;
48 ashish 6286
    }
6287
 
6288
    /**
6289
     * Performs a deep copy on <i>other</i>.
6290
     */
553 chandransh 6291
    public updateUser_args(updateUser_args other) {
6292
      if (other.isSetUser()) {
6293
        this.user = new User(other.user);
6294
      }
48 ashish 6295
    }
6296
 
553 chandransh 6297
    public updateUser_args deepCopy() {
6298
      return new updateUser_args(this);
48 ashish 6299
    }
6300
 
6301
    @Deprecated
553 chandransh 6302
    public updateUser_args clone() {
6303
      return new updateUser_args(this);
48 ashish 6304
    }
6305
 
553 chandransh 6306
    public User getUser() {
6307
      return this.user;
48 ashish 6308
    }
6309
 
553 chandransh 6310
    public updateUser_args setUser(User user) {
6311
      this.user = user;
48 ashish 6312
      return this;
6313
    }
6314
 
553 chandransh 6315
    public void unsetUser() {
6316
      this.user = null;
48 ashish 6317
    }
6318
 
553 chandransh 6319
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
6320
    public boolean isSetUser() {
6321
      return this.user != null;
48 ashish 6322
    }
6323
 
553 chandransh 6324
    public void setUserIsSet(boolean value) {
6325
      if (!value) {
6326
        this.user = null;
6327
      }
48 ashish 6328
    }
6329
 
6330
    public void setFieldValue(_Fields field, Object value) {
6331
      switch (field) {
553 chandransh 6332
      case USER:
48 ashish 6333
        if (value == null) {
553 chandransh 6334
          unsetUser();
48 ashish 6335
        } else {
553 chandransh 6336
          setUser((User)value);
48 ashish 6337
        }
6338
        break;
6339
 
6340
      }
6341
    }
6342
 
6343
    public void setFieldValue(int fieldID, Object value) {
6344
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6345
    }
6346
 
6347
    public Object getFieldValue(_Fields field) {
6348
      switch (field) {
553 chandransh 6349
      case USER:
6350
        return getUser();
48 ashish 6351
 
6352
      }
6353
      throw new IllegalStateException();
6354
    }
6355
 
6356
    public Object getFieldValue(int fieldId) {
6357
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6358
    }
6359
 
6360
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6361
    public boolean isSet(_Fields field) {
6362
      switch (field) {
553 chandransh 6363
      case USER:
6364
        return isSetUser();
48 ashish 6365
      }
6366
      throw new IllegalStateException();
6367
    }
6368
 
6369
    public boolean isSet(int fieldID) {
6370
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6371
    }
6372
 
6373
    @Override
6374
    public boolean equals(Object that) {
6375
      if (that == null)
6376
        return false;
553 chandransh 6377
      if (that instanceof updateUser_args)
6378
        return this.equals((updateUser_args)that);
48 ashish 6379
      return false;
6380
    }
6381
 
553 chandransh 6382
    public boolean equals(updateUser_args that) {
48 ashish 6383
      if (that == null)
6384
        return false;
6385
 
553 chandransh 6386
      boolean this_present_user = true && this.isSetUser();
6387
      boolean that_present_user = true && that.isSetUser();
6388
      if (this_present_user || that_present_user) {
6389
        if (!(this_present_user && that_present_user))
48 ashish 6390
          return false;
553 chandransh 6391
        if (!this.user.equals(that.user))
48 ashish 6392
          return false;
6393
      }
6394
 
6395
      return true;
6396
    }
6397
 
6398
    @Override
6399
    public int hashCode() {
6400
      return 0;
6401
    }
6402
 
571 rajveer 6403
    public int compareTo(updateUser_args other) {
6404
      if (!getClass().equals(other.getClass())) {
6405
        return getClass().getName().compareTo(other.getClass().getName());
6406
      }
6407
 
6408
      int lastComparison = 0;
6409
      updateUser_args typedOther = (updateUser_args)other;
6410
 
6411
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
6412
      if (lastComparison != 0) {
6413
        return lastComparison;
6414
      }
6415
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
6416
      if (lastComparison != 0) {
6417
        return lastComparison;
6418
      }
6419
      return 0;
6420
    }
6421
 
48 ashish 6422
    public void read(TProtocol iprot) throws TException {
6423
      TField field;
6424
      iprot.readStructBegin();
6425
      while (true)
6426
      {
6427
        field = iprot.readFieldBegin();
6428
        if (field.type == TType.STOP) { 
6429
          break;
6430
        }
6431
        _Fields fieldId = _Fields.findByThriftId(field.id);
6432
        if (fieldId == null) {
6433
          TProtocolUtil.skip(iprot, field.type);
6434
        } else {
6435
          switch (fieldId) {
553 chandransh 6436
            case USER:
6437
              if (field.type == TType.STRUCT) {
6438
                this.user = new User();
6439
                this.user.read(iprot);
48 ashish 6440
              } else { 
6441
                TProtocolUtil.skip(iprot, field.type);
6442
              }
6443
              break;
6444
          }
6445
          iprot.readFieldEnd();
6446
        }
6447
      }
6448
      iprot.readStructEnd();
6449
      validate();
6450
    }
6451
 
6452
    public void write(TProtocol oprot) throws TException {
6453
      validate();
6454
 
6455
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 6456
      if (this.user != null) {
6457
        oprot.writeFieldBegin(USER_FIELD_DESC);
6458
        this.user.write(oprot);
6459
        oprot.writeFieldEnd();
6460
      }
48 ashish 6461
      oprot.writeFieldStop();
6462
      oprot.writeStructEnd();
6463
    }
6464
 
6465
    @Override
6466
    public String toString() {
553 chandransh 6467
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 6468
      boolean first = true;
6469
 
553 chandransh 6470
      sb.append("user:");
6471
      if (this.user == null) {
6472
        sb.append("null");
6473
      } else {
6474
        sb.append(this.user);
6475
      }
48 ashish 6476
      first = false;
6477
      sb.append(")");
6478
      return sb.toString();
6479
    }
6480
 
6481
    public void validate() throws TException {
6482
      // check for required fields
6483
    }
6484
 
6485
  }
6486
 
571 rajveer 6487
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 6488
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 6489
 
6490
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6491
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6492
 
553 chandransh 6493
    private User success;
6494
    private UserContextException ucex;
48 ashish 6495
 
6496
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6497
    public enum _Fields implements TFieldIdEnum {
6498
      SUCCESS((short)0, "success"),
553 chandransh 6499
      UCEX((short)1, "ucex");
48 ashish 6500
 
6501
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6502
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6503
 
6504
      static {
6505
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6506
          byId.put((int)field._thriftId, field);
6507
          byName.put(field.getFieldName(), field);
6508
        }
6509
      }
6510
 
6511
      /**
6512
       * Find the _Fields constant that matches fieldId, or null if its not found.
6513
       */
6514
      public static _Fields findByThriftId(int fieldId) {
6515
        return byId.get(fieldId);
6516
      }
6517
 
6518
      /**
6519
       * Find the _Fields constant that matches fieldId, throwing an exception
6520
       * if it is not found.
6521
       */
6522
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6523
        _Fields fields = findByThriftId(fieldId);
6524
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6525
        return fields;
6526
      }
6527
 
6528
      /**
6529
       * Find the _Fields constant that matches name, or null if its not found.
6530
       */
6531
      public static _Fields findByName(String name) {
6532
        return byName.get(name);
6533
      }
6534
 
6535
      private final short _thriftId;
6536
      private final String _fieldName;
6537
 
6538
      _Fields(short thriftId, String fieldName) {
6539
        _thriftId = thriftId;
6540
        _fieldName = fieldName;
6541
      }
6542
 
6543
      public short getThriftFieldId() {
6544
        return _thriftId;
6545
      }
6546
 
6547
      public String getFieldName() {
6548
        return _fieldName;
6549
      }
6550
    }
6551
 
6552
    // isset id assignments
6553
 
6554
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6555
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6556
          new StructMetaData(TType.STRUCT, User.class)));
6557
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6558
          new FieldValueMetaData(TType.STRUCT)));
6559
    }});
6560
 
6561
    static {
553 chandransh 6562
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 6563
    }
6564
 
553 chandransh 6565
    public updateUser_result() {
48 ashish 6566
    }
6567
 
553 chandransh 6568
    public updateUser_result(
6569
      User success,
6570
      UserContextException ucex)
48 ashish 6571
    {
6572
      this();
6573
      this.success = success;
553 chandransh 6574
      this.ucex = ucex;
48 ashish 6575
    }
6576
 
6577
    /**
6578
     * Performs a deep copy on <i>other</i>.
6579
     */
553 chandransh 6580
    public updateUser_result(updateUser_result other) {
48 ashish 6581
      if (other.isSetSuccess()) {
553 chandransh 6582
        this.success = new User(other.success);
48 ashish 6583
      }
553 chandransh 6584
      if (other.isSetUcex()) {
6585
        this.ucex = new UserContextException(other.ucex);
48 ashish 6586
      }
6587
    }
6588
 
553 chandransh 6589
    public updateUser_result deepCopy() {
6590
      return new updateUser_result(this);
48 ashish 6591
    }
6592
 
6593
    @Deprecated
553 chandransh 6594
    public updateUser_result clone() {
6595
      return new updateUser_result(this);
48 ashish 6596
    }
6597
 
553 chandransh 6598
    public User getSuccess() {
48 ashish 6599
      return this.success;
6600
    }
6601
 
553 chandransh 6602
    public updateUser_result setSuccess(User success) {
48 ashish 6603
      this.success = success;
6604
      return this;
6605
    }
6606
 
6607
    public void unsetSuccess() {
6608
      this.success = null;
6609
    }
6610
 
6611
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6612
    public boolean isSetSuccess() {
6613
      return this.success != null;
6614
    }
6615
 
6616
    public void setSuccessIsSet(boolean value) {
6617
      if (!value) {
6618
        this.success = null;
6619
      }
6620
    }
6621
 
553 chandransh 6622
    public UserContextException getUcex() {
6623
      return this.ucex;
48 ashish 6624
    }
6625
 
553 chandransh 6626
    public updateUser_result setUcex(UserContextException ucex) {
6627
      this.ucex = ucex;
48 ashish 6628
      return this;
6629
    }
6630
 
553 chandransh 6631
    public void unsetUcex() {
6632
      this.ucex = null;
48 ashish 6633
    }
6634
 
553 chandransh 6635
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6636
    public boolean isSetUcex() {
6637
      return this.ucex != null;
48 ashish 6638
    }
6639
 
553 chandransh 6640
    public void setUcexIsSet(boolean value) {
48 ashish 6641
      if (!value) {
553 chandransh 6642
        this.ucex = null;
48 ashish 6643
      }
6644
    }
6645
 
6646
    public void setFieldValue(_Fields field, Object value) {
6647
      switch (field) {
6648
      case SUCCESS:
6649
        if (value == null) {
6650
          unsetSuccess();
6651
        } else {
553 chandransh 6652
          setSuccess((User)value);
48 ashish 6653
        }
6654
        break;
6655
 
553 chandransh 6656
      case UCEX:
48 ashish 6657
        if (value == null) {
553 chandransh 6658
          unsetUcex();
48 ashish 6659
        } else {
553 chandransh 6660
          setUcex((UserContextException)value);
48 ashish 6661
        }
6662
        break;
6663
 
6664
      }
6665
    }
6666
 
6667
    public void setFieldValue(int fieldID, Object value) {
6668
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6669
    }
6670
 
6671
    public Object getFieldValue(_Fields field) {
6672
      switch (field) {
6673
      case SUCCESS:
6674
        return getSuccess();
6675
 
553 chandransh 6676
      case UCEX:
6677
        return getUcex();
48 ashish 6678
 
6679
      }
6680
      throw new IllegalStateException();
6681
    }
6682
 
6683
    public Object getFieldValue(int fieldId) {
6684
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6685
    }
6686
 
6687
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6688
    public boolean isSet(_Fields field) {
6689
      switch (field) {
6690
      case SUCCESS:
6691
        return isSetSuccess();
553 chandransh 6692
      case UCEX:
6693
        return isSetUcex();
48 ashish 6694
      }
6695
      throw new IllegalStateException();
6696
    }
6697
 
6698
    public boolean isSet(int fieldID) {
6699
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6700
    }
6701
 
6702
    @Override
6703
    public boolean equals(Object that) {
6704
      if (that == null)
6705
        return false;
553 chandransh 6706
      if (that instanceof updateUser_result)
6707
        return this.equals((updateUser_result)that);
48 ashish 6708
      return false;
6709
    }
6710
 
553 chandransh 6711
    public boolean equals(updateUser_result that) {
48 ashish 6712
      if (that == null)
6713
        return false;
6714
 
6715
      boolean this_present_success = true && this.isSetSuccess();
6716
      boolean that_present_success = true && that.isSetSuccess();
6717
      if (this_present_success || that_present_success) {
6718
        if (!(this_present_success && that_present_success))
6719
          return false;
6720
        if (!this.success.equals(that.success))
6721
          return false;
6722
      }
6723
 
553 chandransh 6724
      boolean this_present_ucex = true && this.isSetUcex();
6725
      boolean that_present_ucex = true && that.isSetUcex();
6726
      if (this_present_ucex || that_present_ucex) {
6727
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6728
          return false;
553 chandransh 6729
        if (!this.ucex.equals(that.ucex))
48 ashish 6730
          return false;
6731
      }
6732
 
6733
      return true;
6734
    }
6735
 
6736
    @Override
6737
    public int hashCode() {
6738
      return 0;
6739
    }
6740
 
571 rajveer 6741
    public int compareTo(updateUser_result other) {
6742
      if (!getClass().equals(other.getClass())) {
6743
        return getClass().getName().compareTo(other.getClass().getName());
6744
      }
6745
 
6746
      int lastComparison = 0;
6747
      updateUser_result typedOther = (updateUser_result)other;
6748
 
6749
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6750
      if (lastComparison != 0) {
6751
        return lastComparison;
6752
      }
6753
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6754
      if (lastComparison != 0) {
6755
        return lastComparison;
6756
      }
6757
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6758
      if (lastComparison != 0) {
6759
        return lastComparison;
6760
      }
6761
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6762
      if (lastComparison != 0) {
6763
        return lastComparison;
6764
      }
6765
      return 0;
6766
    }
6767
 
48 ashish 6768
    public void read(TProtocol iprot) throws TException {
6769
      TField field;
6770
      iprot.readStructBegin();
6771
      while (true)
6772
      {
6773
        field = iprot.readFieldBegin();
6774
        if (field.type == TType.STOP) { 
6775
          break;
6776
        }
6777
        _Fields fieldId = _Fields.findByThriftId(field.id);
6778
        if (fieldId == null) {
6779
          TProtocolUtil.skip(iprot, field.type);
6780
        } else {
6781
          switch (fieldId) {
6782
            case SUCCESS:
6783
              if (field.type == TType.STRUCT) {
553 chandransh 6784
                this.success = new User();
48 ashish 6785
                this.success.read(iprot);
6786
              } else { 
6787
                TProtocolUtil.skip(iprot, field.type);
6788
              }
6789
              break;
553 chandransh 6790
            case UCEX:
48 ashish 6791
              if (field.type == TType.STRUCT) {
553 chandransh 6792
                this.ucex = new UserContextException();
6793
                this.ucex.read(iprot);
48 ashish 6794
              } else { 
6795
                TProtocolUtil.skip(iprot, field.type);
6796
              }
6797
              break;
6798
          }
6799
          iprot.readFieldEnd();
6800
        }
6801
      }
6802
      iprot.readStructEnd();
6803
      validate();
6804
    }
6805
 
6806
    public void write(TProtocol oprot) throws TException {
6807
      oprot.writeStructBegin(STRUCT_DESC);
6808
 
6809
      if (this.isSetSuccess()) {
6810
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6811
        this.success.write(oprot);
6812
        oprot.writeFieldEnd();
553 chandransh 6813
      } else if (this.isSetUcex()) {
6814
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6815
        this.ucex.write(oprot);
48 ashish 6816
        oprot.writeFieldEnd();
6817
      }
6818
      oprot.writeFieldStop();
6819
      oprot.writeStructEnd();
6820
    }
6821
 
6822
    @Override
6823
    public String toString() {
553 chandransh 6824
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 6825
      boolean first = true;
6826
 
6827
      sb.append("success:");
6828
      if (this.success == null) {
6829
        sb.append("null");
6830
      } else {
6831
        sb.append(this.success);
6832
      }
6833
      first = false;
6834
      if (!first) sb.append(", ");
553 chandransh 6835
      sb.append("ucex:");
6836
      if (this.ucex == null) {
48 ashish 6837
        sb.append("null");
6838
      } else {
553 chandransh 6839
        sb.append(this.ucex);
48 ashish 6840
      }
6841
      first = false;
6842
      sb.append(")");
6843
      return sb.toString();
6844
    }
6845
 
6846
    public void validate() throws TException {
6847
      // check for required fields
6848
    }
6849
 
6850
  }
6851
 
553 chandransh 6852
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
6853
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 6854
 
6855
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6856
 
6857
    private long userId;
6858
 
6859
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6860
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6861
      USER_ID((short)1, "userId");
48 ashish 6862
 
6863
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6864
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6865
 
6866
      static {
6867
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6868
          byId.put((int)field._thriftId, field);
6869
          byName.put(field.getFieldName(), field);
6870
        }
6871
      }
6872
 
6873
      /**
6874
       * Find the _Fields constant that matches fieldId, or null if its not found.
6875
       */
6876
      public static _Fields findByThriftId(int fieldId) {
6877
        return byId.get(fieldId);
6878
      }
6879
 
6880
      /**
6881
       * Find the _Fields constant that matches fieldId, throwing an exception
6882
       * if it is not found.
6883
       */
6884
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6885
        _Fields fields = findByThriftId(fieldId);
6886
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6887
        return fields;
6888
      }
6889
 
6890
      /**
6891
       * Find the _Fields constant that matches name, or null if its not found.
6892
       */
6893
      public static _Fields findByName(String name) {
6894
        return byName.get(name);
6895
      }
6896
 
6897
      private final short _thriftId;
6898
      private final String _fieldName;
6899
 
6900
      _Fields(short thriftId, String fieldName) {
6901
        _thriftId = thriftId;
6902
        _fieldName = fieldName;
6903
      }
6904
 
6905
      public short getThriftFieldId() {
6906
        return _thriftId;
6907
      }
6908
 
6909
      public String getFieldName() {
6910
        return _fieldName;
6911
      }
6912
    }
6913
 
6914
    // isset id assignments
6915
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6916
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6917
 
6918
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6919
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6920
          new FieldValueMetaData(TType.I64)));
6921
    }});
6922
 
6923
    static {
553 chandransh 6924
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 6925
    }
6926
 
553 chandransh 6927
    public deleteUser_args() {
48 ashish 6928
    }
6929
 
553 chandransh 6930
    public deleteUser_args(
6931
      long userId)
48 ashish 6932
    {
6933
      this();
6934
      this.userId = userId;
6935
      setUserIdIsSet(true);
6936
    }
6937
 
6938
    /**
6939
     * Performs a deep copy on <i>other</i>.
6940
     */
553 chandransh 6941
    public deleteUser_args(deleteUser_args other) {
48 ashish 6942
      __isset_bit_vector.clear();
6943
      __isset_bit_vector.or(other.__isset_bit_vector);
6944
      this.userId = other.userId;
6945
    }
6946
 
553 chandransh 6947
    public deleteUser_args deepCopy() {
6948
      return new deleteUser_args(this);
48 ashish 6949
    }
6950
 
6951
    @Deprecated
553 chandransh 6952
    public deleteUser_args clone() {
6953
      return new deleteUser_args(this);
48 ashish 6954
    }
6955
 
6956
    public long getUserId() {
6957
      return this.userId;
6958
    }
6959
 
553 chandransh 6960
    public deleteUser_args setUserId(long userId) {
48 ashish 6961
      this.userId = userId;
6962
      setUserIdIsSet(true);
6963
      return this;
6964
    }
6965
 
6966
    public void unsetUserId() {
6967
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6968
    }
6969
 
6970
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6971
    public boolean isSetUserId() {
6972
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6973
    }
6974
 
6975
    public void setUserIdIsSet(boolean value) {
6976
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6977
    }
6978
 
6979
    public void setFieldValue(_Fields field, Object value) {
6980
      switch (field) {
6981
      case USER_ID:
6982
        if (value == null) {
6983
          unsetUserId();
6984
        } else {
6985
          setUserId((Long)value);
6986
        }
6987
        break;
6988
 
6989
      }
6990
    }
6991
 
6992
    public void setFieldValue(int fieldID, Object value) {
6993
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6994
    }
6995
 
6996
    public Object getFieldValue(_Fields field) {
6997
      switch (field) {
6998
      case USER_ID:
6999
        return new Long(getUserId());
7000
 
7001
      }
7002
      throw new IllegalStateException();
7003
    }
7004
 
7005
    public Object getFieldValue(int fieldId) {
7006
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7007
    }
7008
 
7009
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7010
    public boolean isSet(_Fields field) {
7011
      switch (field) {
7012
      case USER_ID:
7013
        return isSetUserId();
7014
      }
7015
      throw new IllegalStateException();
7016
    }
7017
 
7018
    public boolean isSet(int fieldID) {
7019
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7020
    }
7021
 
7022
    @Override
7023
    public boolean equals(Object that) {
7024
      if (that == null)
7025
        return false;
553 chandransh 7026
      if (that instanceof deleteUser_args)
7027
        return this.equals((deleteUser_args)that);
48 ashish 7028
      return false;
7029
    }
7030
 
553 chandransh 7031
    public boolean equals(deleteUser_args that) {
48 ashish 7032
      if (that == null)
7033
        return false;
7034
 
7035
      boolean this_present_userId = true;
7036
      boolean that_present_userId = true;
7037
      if (this_present_userId || that_present_userId) {
7038
        if (!(this_present_userId && that_present_userId))
7039
          return false;
7040
        if (this.userId != that.userId)
7041
          return false;
7042
      }
7043
 
7044
      return true;
7045
    }
7046
 
7047
    @Override
7048
    public int hashCode() {
7049
      return 0;
7050
    }
7051
 
553 chandransh 7052
    public int compareTo(deleteUser_args other) {
48 ashish 7053
      if (!getClass().equals(other.getClass())) {
7054
        return getClass().getName().compareTo(other.getClass().getName());
7055
      }
7056
 
7057
      int lastComparison = 0;
553 chandransh 7058
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 7059
 
7060
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
7061
      if (lastComparison != 0) {
7062
        return lastComparison;
7063
      }
7064
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
7065
      if (lastComparison != 0) {
7066
        return lastComparison;
7067
      }
7068
      return 0;
7069
    }
7070
 
7071
    public void read(TProtocol iprot) throws TException {
7072
      TField field;
7073
      iprot.readStructBegin();
7074
      while (true)
7075
      {
7076
        field = iprot.readFieldBegin();
7077
        if (field.type == TType.STOP) { 
7078
          break;
7079
        }
7080
        _Fields fieldId = _Fields.findByThriftId(field.id);
7081
        if (fieldId == null) {
7082
          TProtocolUtil.skip(iprot, field.type);
7083
        } else {
7084
          switch (fieldId) {
7085
            case USER_ID:
7086
              if (field.type == TType.I64) {
7087
                this.userId = iprot.readI64();
7088
                setUserIdIsSet(true);
7089
              } else { 
7090
                TProtocolUtil.skip(iprot, field.type);
7091
              }
7092
              break;
7093
          }
7094
          iprot.readFieldEnd();
7095
        }
7096
      }
7097
      iprot.readStructEnd();
7098
      validate();
7099
    }
7100
 
7101
    public void write(TProtocol oprot) throws TException {
7102
      validate();
7103
 
7104
      oprot.writeStructBegin(STRUCT_DESC);
7105
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
7106
      oprot.writeI64(this.userId);
7107
      oprot.writeFieldEnd();
7108
      oprot.writeFieldStop();
7109
      oprot.writeStructEnd();
7110
    }
7111
 
7112
    @Override
7113
    public String toString() {
553 chandransh 7114
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 7115
      boolean first = true;
7116
 
7117
      sb.append("userId:");
7118
      sb.append(this.userId);
7119
      first = false;
7120
      sb.append(")");
7121
      return sb.toString();
7122
    }
7123
 
7124
    public void validate() throws TException {
7125
      // check for required fields
7126
    }
7127
 
7128
  }
7129
 
553 chandransh 7130
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
7131
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 7132
 
553 chandransh 7133
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7134
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 7135
 
553 chandransh 7136
    private boolean success;
7137
    private UserContextException ucex;
48 ashish 7138
 
7139
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7140
    public enum _Fields implements TFieldIdEnum {
7141
      SUCCESS((short)0, "success"),
553 chandransh 7142
      UCEX((short)1, "ucex");
48 ashish 7143
 
7144
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7145
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7146
 
7147
      static {
7148
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7149
          byId.put((int)field._thriftId, field);
7150
          byName.put(field.getFieldName(), field);
7151
        }
7152
      }
7153
 
7154
      /**
7155
       * Find the _Fields constant that matches fieldId, or null if its not found.
7156
       */
7157
      public static _Fields findByThriftId(int fieldId) {
7158
        return byId.get(fieldId);
7159
      }
7160
 
7161
      /**
7162
       * Find the _Fields constant that matches fieldId, throwing an exception
7163
       * if it is not found.
7164
       */
7165
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7166
        _Fields fields = findByThriftId(fieldId);
7167
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7168
        return fields;
7169
      }
7170
 
7171
      /**
7172
       * Find the _Fields constant that matches name, or null if its not found.
7173
       */
7174
      public static _Fields findByName(String name) {
7175
        return byName.get(name);
7176
      }
7177
 
7178
      private final short _thriftId;
7179
      private final String _fieldName;
7180
 
7181
      _Fields(short thriftId, String fieldName) {
7182
        _thriftId = thriftId;
7183
        _fieldName = fieldName;
7184
      }
7185
 
7186
      public short getThriftFieldId() {
7187
        return _thriftId;
7188
      }
7189
 
7190
      public String getFieldName() {
7191
        return _fieldName;
7192
      }
7193
    }
7194
 
7195
    // isset id assignments
553 chandransh 7196
    private static final int __SUCCESS_ISSET_ID = 0;
7197
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 7198
 
7199
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7200
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7201
          new FieldValueMetaData(TType.BOOL)));
7202
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 7203
          new FieldValueMetaData(TType.STRUCT)));
7204
    }});
7205
 
7206
    static {
553 chandransh 7207
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 7208
    }
7209
 
553 chandransh 7210
    public deleteUser_result() {
48 ashish 7211
    }
7212
 
553 chandransh 7213
    public deleteUser_result(
7214
      boolean success,
7215
      UserContextException ucex)
48 ashish 7216
    {
7217
      this();
7218
      this.success = success;
553 chandransh 7219
      setSuccessIsSet(true);
7220
      this.ucex = ucex;
48 ashish 7221
    }
7222
 
7223
    /**
7224
     * Performs a deep copy on <i>other</i>.
7225
     */
553 chandransh 7226
    public deleteUser_result(deleteUser_result other) {
7227
      __isset_bit_vector.clear();
7228
      __isset_bit_vector.or(other.__isset_bit_vector);
7229
      this.success = other.success;
7230
      if (other.isSetUcex()) {
7231
        this.ucex = new UserContextException(other.ucex);
48 ashish 7232
      }
7233
    }
7234
 
553 chandransh 7235
    public deleteUser_result deepCopy() {
7236
      return new deleteUser_result(this);
48 ashish 7237
    }
7238
 
7239
    @Deprecated
553 chandransh 7240
    public deleteUser_result clone() {
7241
      return new deleteUser_result(this);
48 ashish 7242
    }
7243
 
553 chandransh 7244
    public boolean isSuccess() {
48 ashish 7245
      return this.success;
7246
    }
7247
 
553 chandransh 7248
    public deleteUser_result setSuccess(boolean success) {
48 ashish 7249
      this.success = success;
553 chandransh 7250
      setSuccessIsSet(true);
48 ashish 7251
      return this;
7252
    }
7253
 
7254
    public void unsetSuccess() {
553 chandransh 7255
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 7256
    }
7257
 
7258
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7259
    public boolean isSetSuccess() {
553 chandransh 7260
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 7261
    }
7262
 
7263
    public void setSuccessIsSet(boolean value) {
553 chandransh 7264
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 7265
    }
7266
 
553 chandransh 7267
    public UserContextException getUcex() {
7268
      return this.ucex;
48 ashish 7269
    }
7270
 
553 chandransh 7271
    public deleteUser_result setUcex(UserContextException ucex) {
7272
      this.ucex = ucex;
48 ashish 7273
      return this;
7274
    }
7275
 
553 chandransh 7276
    public void unsetUcex() {
7277
      this.ucex = null;
48 ashish 7278
    }
7279
 
553 chandransh 7280
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
7281
    public boolean isSetUcex() {
7282
      return this.ucex != null;
48 ashish 7283
    }
7284
 
553 chandransh 7285
    public void setUcexIsSet(boolean value) {
48 ashish 7286
      if (!value) {
553 chandransh 7287
        this.ucex = null;
48 ashish 7288
      }
7289
    }
7290
 
7291
    public void setFieldValue(_Fields field, Object value) {
7292
      switch (field) {
7293
      case SUCCESS:
7294
        if (value == null) {
7295
          unsetSuccess();
7296
        } else {
553 chandransh 7297
          setSuccess((Boolean)value);
48 ashish 7298
        }
7299
        break;
7300
 
553 chandransh 7301
      case UCEX:
48 ashish 7302
        if (value == null) {
553 chandransh 7303
          unsetUcex();
48 ashish 7304
        } else {
553 chandransh 7305
          setUcex((UserContextException)value);
48 ashish 7306
        }
7307
        break;
7308
 
7309
      }
7310
    }
7311
 
7312
    public void setFieldValue(int fieldID, Object value) {
7313
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7314
    }
7315
 
7316
    public Object getFieldValue(_Fields field) {
7317
      switch (field) {
7318
      case SUCCESS:
553 chandransh 7319
        return new Boolean(isSuccess());
48 ashish 7320
 
553 chandransh 7321
      case UCEX:
7322
        return getUcex();
48 ashish 7323
 
7324
      }
7325
      throw new IllegalStateException();
7326
    }
7327
 
7328
    public Object getFieldValue(int fieldId) {
7329
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7330
    }
7331
 
7332
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7333
    public boolean isSet(_Fields field) {
7334
      switch (field) {
7335
      case SUCCESS:
7336
        return isSetSuccess();
553 chandransh 7337
      case UCEX:
7338
        return isSetUcex();
48 ashish 7339
      }
7340
      throw new IllegalStateException();
7341
    }
7342
 
7343
    public boolean isSet(int fieldID) {
7344
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7345
    }
7346
 
7347
    @Override
7348
    public boolean equals(Object that) {
7349
      if (that == null)
7350
        return false;
553 chandransh 7351
      if (that instanceof deleteUser_result)
7352
        return this.equals((deleteUser_result)that);
48 ashish 7353
      return false;
7354
    }
7355
 
553 chandransh 7356
    public boolean equals(deleteUser_result that) {
48 ashish 7357
      if (that == null)
7358
        return false;
7359
 
553 chandransh 7360
      boolean this_present_success = true;
7361
      boolean that_present_success = true;
48 ashish 7362
      if (this_present_success || that_present_success) {
7363
        if (!(this_present_success && that_present_success))
7364
          return false;
553 chandransh 7365
        if (this.success != that.success)
48 ashish 7366
          return false;
7367
      }
7368
 
553 chandransh 7369
      boolean this_present_ucex = true && this.isSetUcex();
7370
      boolean that_present_ucex = true && that.isSetUcex();
7371
      if (this_present_ucex || that_present_ucex) {
7372
        if (!(this_present_ucex && that_present_ucex))
48 ashish 7373
          return false;
553 chandransh 7374
        if (!this.ucex.equals(that.ucex))
48 ashish 7375
          return false;
7376
      }
7377
 
7378
      return true;
7379
    }
7380
 
7381
    @Override
7382
    public int hashCode() {
7383
      return 0;
7384
    }
7385
 
553 chandransh 7386
    public int compareTo(deleteUser_result other) {
7387
      if (!getClass().equals(other.getClass())) {
7388
        return getClass().getName().compareTo(other.getClass().getName());
7389
      }
7390
 
7391
      int lastComparison = 0;
7392
      deleteUser_result typedOther = (deleteUser_result)other;
7393
 
7394
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7395
      if (lastComparison != 0) {
7396
        return lastComparison;
7397
      }
7398
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7399
      if (lastComparison != 0) {
7400
        return lastComparison;
7401
      }
7402
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
7403
      if (lastComparison != 0) {
7404
        return lastComparison;
7405
      }
7406
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
7407
      if (lastComparison != 0) {
7408
        return lastComparison;
7409
      }
7410
      return 0;
7411
    }
7412
 
48 ashish 7413
    public void read(TProtocol iprot) throws TException {
7414
      TField field;
7415
      iprot.readStructBegin();
7416
      while (true)
7417
      {
7418
        field = iprot.readFieldBegin();
7419
        if (field.type == TType.STOP) { 
7420
          break;
7421
        }
7422
        _Fields fieldId = _Fields.findByThriftId(field.id);
7423
        if (fieldId == null) {
7424
          TProtocolUtil.skip(iprot, field.type);
7425
        } else {
7426
          switch (fieldId) {
7427
            case SUCCESS:
553 chandransh 7428
              if (field.type == TType.BOOL) {
7429
                this.success = iprot.readBool();
7430
                setSuccessIsSet(true);
48 ashish 7431
              } else { 
7432
                TProtocolUtil.skip(iprot, field.type);
7433
              }
7434
              break;
553 chandransh 7435
            case UCEX:
48 ashish 7436
              if (field.type == TType.STRUCT) {
553 chandransh 7437
                this.ucex = new UserContextException();
7438
                this.ucex.read(iprot);
48 ashish 7439
              } else { 
7440
                TProtocolUtil.skip(iprot, field.type);
7441
              }
7442
              break;
7443
          }
7444
          iprot.readFieldEnd();
7445
        }
7446
      }
7447
      iprot.readStructEnd();
7448
      validate();
7449
    }
7450
 
7451
    public void write(TProtocol oprot) throws TException {
7452
      oprot.writeStructBegin(STRUCT_DESC);
7453
 
7454
      if (this.isSetSuccess()) {
7455
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 7456
        oprot.writeBool(this.success);
48 ashish 7457
        oprot.writeFieldEnd();
553 chandransh 7458
      } else if (this.isSetUcex()) {
7459
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7460
        this.ucex.write(oprot);
48 ashish 7461
        oprot.writeFieldEnd();
7462
      }
7463
      oprot.writeFieldStop();
7464
      oprot.writeStructEnd();
7465
    }
7466
 
7467
    @Override
7468
    public String toString() {
553 chandransh 7469
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 7470
      boolean first = true;
7471
 
7472
      sb.append("success:");
553 chandransh 7473
      sb.append(this.success);
48 ashish 7474
      first = false;
7475
      if (!first) sb.append(", ");
553 chandransh 7476
      sb.append("ucex:");
7477
      if (this.ucex == null) {
48 ashish 7478
        sb.append("null");
7479
      } else {
553 chandransh 7480
        sb.append(this.ucex);
48 ashish 7481
      }
7482
      first = false;
7483
      sb.append(")");
7484
      return sb.toString();
7485
    }
7486
 
7487
    public void validate() throws TException {
7488
      // check for required fields
7489
    }
7490
 
7491
  }
7492
 
553 chandransh 7493
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
7494
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 7495
 
7496
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
7497
 
7498
    private long userId;
7499
 
7500
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7501
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7502
      USER_ID((short)1, "userId");
48 ashish 7503
 
7504
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7505
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7506
 
7507
      static {
7508
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7509
          byId.put((int)field._thriftId, field);
7510
          byName.put(field.getFieldName(), field);
7511
        }
7512
      }
7513
 
7514
      /**
7515
       * Find the _Fields constant that matches fieldId, or null if its not found.
7516
       */
7517
      public static _Fields findByThriftId(int fieldId) {
7518
        return byId.get(fieldId);
7519
      }
7520
 
7521
      /**
7522
       * Find the _Fields constant that matches fieldId, throwing an exception
7523
       * if it is not found.
7524
       */
7525
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7526
        _Fields fields = findByThriftId(fieldId);
7527
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7528
        return fields;
7529
      }
7530
 
7531
      /**
7532
       * Find the _Fields constant that matches name, or null if its not found.
7533
       */
7534
      public static _Fields findByName(String name) {
7535
        return byName.get(name);
7536
      }
7537
 
7538
      private final short _thriftId;
7539
      private final String _fieldName;
7540
 
7541
      _Fields(short thriftId, String fieldName) {
7542
        _thriftId = thriftId;
7543
        _fieldName = fieldName;
7544
      }
7545
 
7546
      public short getThriftFieldId() {
7547
        return _thriftId;
7548
      }
7549
 
7550
      public String getFieldName() {
7551
        return _fieldName;
7552
      }
7553
    }
7554
 
7555
    // isset id assignments
7556
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 7557
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 7558
 
7559
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7560
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
7561
          new FieldValueMetaData(TType.I64)));
7562
    }});
7563
 
7564
    static {
553 chandransh 7565
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 7566
    }
7567
 
553 chandransh 7568
    public getUserState_args() {
48 ashish 7569
    }
7570
 
553 chandransh 7571
    public getUserState_args(
7572
      long userId)
48 ashish 7573
    {
7574
      this();
7575
      this.userId = userId;
7576
      setUserIdIsSet(true);
7577
    }
7578
 
7579
    /**
7580
     * Performs a deep copy on <i>other</i>.
7581
     */
553 chandransh 7582
    public getUserState_args(getUserState_args other) {
48 ashish 7583
      __isset_bit_vector.clear();
7584
      __isset_bit_vector.or(other.__isset_bit_vector);
7585
      this.userId = other.userId;
7586
    }
7587
 
553 chandransh 7588
    public getUserState_args deepCopy() {
7589
      return new getUserState_args(this);
48 ashish 7590
    }
7591
 
7592
    @Deprecated
553 chandransh 7593
    public getUserState_args clone() {
7594
      return new getUserState_args(this);
48 ashish 7595
    }
7596
 
7597
    public long getUserId() {
7598
      return this.userId;
7599
    }
7600
 
553 chandransh 7601
    public getUserState_args setUserId(long userId) {
48 ashish 7602
      this.userId = userId;
7603
      setUserIdIsSet(true);
7604
      return this;
7605
    }
7606
 
7607
    public void unsetUserId() {
7608
      __isset_bit_vector.clear(__USERID_ISSET_ID);
7609
    }
7610
 
7611
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
7612
    public boolean isSetUserId() {
7613
      return __isset_bit_vector.get(__USERID_ISSET_ID);
7614
    }
7615
 
7616
    public void setUserIdIsSet(boolean value) {
7617
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
7618
    }
7619
 
7620
    public void setFieldValue(_Fields field, Object value) {
7621
      switch (field) {
7622
      case USER_ID:
7623
        if (value == null) {
7624
          unsetUserId();
7625
        } else {
7626
          setUserId((Long)value);
7627
        }
7628
        break;
7629
 
7630
      }
7631
    }
7632
 
7633
    public void setFieldValue(int fieldID, Object value) {
7634
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7635
    }
7636
 
7637
    public Object getFieldValue(_Fields field) {
7638
      switch (field) {
7639
      case USER_ID:
7640
        return new Long(getUserId());
7641
 
7642
      }
7643
      throw new IllegalStateException();
7644
    }
7645
 
7646
    public Object getFieldValue(int fieldId) {
7647
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7648
    }
7649
 
7650
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7651
    public boolean isSet(_Fields field) {
7652
      switch (field) {
7653
      case USER_ID:
7654
        return isSetUserId();
7655
      }
7656
      throw new IllegalStateException();
7657
    }
7658
 
7659
    public boolean isSet(int fieldID) {
7660
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7661
    }
7662
 
7663
    @Override
7664
    public boolean equals(Object that) {
7665
      if (that == null)
7666
        return false;
553 chandransh 7667
      if (that instanceof getUserState_args)
7668
        return this.equals((getUserState_args)that);
48 ashish 7669
      return false;
7670
    }
7671
 
553 chandransh 7672
    public boolean equals(getUserState_args that) {
48 ashish 7673
      if (that == null)
7674
        return false;
7675
 
7676
      boolean this_present_userId = true;
7677
      boolean that_present_userId = true;
7678
      if (this_present_userId || that_present_userId) {
7679
        if (!(this_present_userId && that_present_userId))
7680
          return false;
7681
        if (this.userId != that.userId)
7682
          return false;
7683
      }
7684
 
7685
      return true;
7686
    }
7687
 
7688
    @Override
7689
    public int hashCode() {
7690
      return 0;
7691
    }
7692
 
553 chandransh 7693
    public int compareTo(getUserState_args other) {
48 ashish 7694
      if (!getClass().equals(other.getClass())) {
7695
        return getClass().getName().compareTo(other.getClass().getName());
7696
      }
7697
 
7698
      int lastComparison = 0;
553 chandransh 7699
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 7700
 
7701
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
7702
      if (lastComparison != 0) {
7703
        return lastComparison;
7704
      }
7705
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
7706
      if (lastComparison != 0) {
7707
        return lastComparison;
7708
      }
7709
      return 0;
7710
    }
7711
 
7712
    public void read(TProtocol iprot) throws TException {
7713
      TField field;
7714
      iprot.readStructBegin();
7715
      while (true)
7716
      {
7717
        field = iprot.readFieldBegin();
7718
        if (field.type == TType.STOP) { 
7719
          break;
7720
        }
7721
        _Fields fieldId = _Fields.findByThriftId(field.id);
7722
        if (fieldId == null) {
7723
          TProtocolUtil.skip(iprot, field.type);
7724
        } else {
7725
          switch (fieldId) {
7726
            case USER_ID:
7727
              if (field.type == TType.I64) {
7728
                this.userId = iprot.readI64();
7729
                setUserIdIsSet(true);
7730
              } else { 
7731
                TProtocolUtil.skip(iprot, field.type);
7732
              }
7733
              break;
7734
          }
7735
          iprot.readFieldEnd();
7736
        }
7737
      }
7738
      iprot.readStructEnd();
7739
      validate();
7740
    }
7741
 
7742
    public void write(TProtocol oprot) throws TException {
7743
      validate();
7744
 
7745
      oprot.writeStructBegin(STRUCT_DESC);
7746
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
7747
      oprot.writeI64(this.userId);
7748
      oprot.writeFieldEnd();
7749
      oprot.writeFieldStop();
7750
      oprot.writeStructEnd();
7751
    }
7752
 
7753
    @Override
7754
    public String toString() {
553 chandransh 7755
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 7756
      boolean first = true;
7757
 
7758
      sb.append("userId:");
7759
      sb.append(this.userId);
7760
      first = false;
7761
      sb.append(")");
7762
      return sb.toString();
7763
    }
7764
 
7765
    public void validate() throws TException {
7766
      // check for required fields
7767
    }
7768
 
7769
  }
7770
 
553 chandransh 7771
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
7772
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 7773
 
7774
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7775
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 7776
 
553 chandransh 7777
    private UserState success;
7778
    private UserContextException ucex;
48 ashish 7779
 
7780
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7781
    public enum _Fields implements TFieldIdEnum {
7782
      SUCCESS((short)0, "success"),
553 chandransh 7783
      UCEX((short)1, "ucex");
48 ashish 7784
 
7785
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7786
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7787
 
7788
      static {
7789
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7790
          byId.put((int)field._thriftId, field);
7791
          byName.put(field.getFieldName(), field);
7792
        }
7793
      }
7794
 
7795
      /**
7796
       * Find the _Fields constant that matches fieldId, or null if its not found.
7797
       */
7798
      public static _Fields findByThriftId(int fieldId) {
7799
        return byId.get(fieldId);
7800
      }
7801
 
7802
      /**
7803
       * Find the _Fields constant that matches fieldId, throwing an exception
7804
       * if it is not found.
7805
       */
7806
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7807
        _Fields fields = findByThriftId(fieldId);
7808
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7809
        return fields;
7810
      }
7811
 
7812
      /**
7813
       * Find the _Fields constant that matches name, or null if its not found.
7814
       */
7815
      public static _Fields findByName(String name) {
7816
        return byName.get(name);
7817
      }
7818
 
7819
      private final short _thriftId;
7820
      private final String _fieldName;
7821
 
7822
      _Fields(short thriftId, String fieldName) {
7823
        _thriftId = thriftId;
7824
        _fieldName = fieldName;
7825
      }
7826
 
7827
      public short getThriftFieldId() {
7828
        return _thriftId;
7829
      }
7830
 
7831
      public String getFieldName() {
7832
        return _fieldName;
7833
      }
7834
    }
7835
 
7836
    // isset id assignments
7837
 
7838
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7839
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7840
          new StructMetaData(TType.STRUCT, UserState.class)));
7841
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 7842
          new FieldValueMetaData(TType.STRUCT)));
7843
    }});
7844
 
7845
    static {
553 chandransh 7846
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 7847
    }
7848
 
553 chandransh 7849
    public getUserState_result() {
48 ashish 7850
    }
7851
 
553 chandransh 7852
    public getUserState_result(
7853
      UserState success,
7854
      UserContextException ucex)
48 ashish 7855
    {
7856
      this();
7857
      this.success = success;
553 chandransh 7858
      this.ucex = ucex;
48 ashish 7859
    }
7860
 
7861
    /**
7862
     * Performs a deep copy on <i>other</i>.
7863
     */
553 chandransh 7864
    public getUserState_result(getUserState_result other) {
48 ashish 7865
      if (other.isSetSuccess()) {
553 chandransh 7866
        this.success = new UserState(other.success);
48 ashish 7867
      }
553 chandransh 7868
      if (other.isSetUcex()) {
7869
        this.ucex = new UserContextException(other.ucex);
48 ashish 7870
      }
7871
    }
7872
 
553 chandransh 7873
    public getUserState_result deepCopy() {
7874
      return new getUserState_result(this);
48 ashish 7875
    }
7876
 
7877
    @Deprecated
553 chandransh 7878
    public getUserState_result clone() {
7879
      return new getUserState_result(this);
48 ashish 7880
    }
7881
 
553 chandransh 7882
    public UserState getSuccess() {
48 ashish 7883
      return this.success;
7884
    }
7885
 
553 chandransh 7886
    public getUserState_result setSuccess(UserState success) {
48 ashish 7887
      this.success = success;
7888
      return this;
7889
    }
7890
 
7891
    public void unsetSuccess() {
7892
      this.success = null;
7893
    }
7894
 
7895
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7896
    public boolean isSetSuccess() {
7897
      return this.success != null;
7898
    }
7899
 
7900
    public void setSuccessIsSet(boolean value) {
7901
      if (!value) {
7902
        this.success = null;
7903
      }
7904
    }
7905
 
553 chandransh 7906
    public UserContextException getUcex() {
7907
      return this.ucex;
48 ashish 7908
    }
7909
 
553 chandransh 7910
    public getUserState_result setUcex(UserContextException ucex) {
7911
      this.ucex = ucex;
48 ashish 7912
      return this;
7913
    }
7914
 
553 chandransh 7915
    public void unsetUcex() {
7916
      this.ucex = null;
48 ashish 7917
    }
7918
 
553 chandransh 7919
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
7920
    public boolean isSetUcex() {
7921
      return this.ucex != null;
48 ashish 7922
    }
7923
 
553 chandransh 7924
    public void setUcexIsSet(boolean value) {
48 ashish 7925
      if (!value) {
553 chandransh 7926
        this.ucex = null;
48 ashish 7927
      }
7928
    }
7929
 
7930
    public void setFieldValue(_Fields field, Object value) {
7931
      switch (field) {
7932
      case SUCCESS:
7933
        if (value == null) {
7934
          unsetSuccess();
7935
        } else {
553 chandransh 7936
          setSuccess((UserState)value);
48 ashish 7937
        }
7938
        break;
7939
 
553 chandransh 7940
      case UCEX:
48 ashish 7941
        if (value == null) {
553 chandransh 7942
          unsetUcex();
48 ashish 7943
        } else {
553 chandransh 7944
          setUcex((UserContextException)value);
48 ashish 7945
        }
7946
        break;
7947
 
7948
      }
7949
    }
7950
 
7951
    public void setFieldValue(int fieldID, Object value) {
7952
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7953
    }
7954
 
7955
    public Object getFieldValue(_Fields field) {
7956
      switch (field) {
7957
      case SUCCESS:
7958
        return getSuccess();
7959
 
553 chandransh 7960
      case UCEX:
7961
        return getUcex();
48 ashish 7962
 
7963
      }
7964
      throw new IllegalStateException();
7965
    }
7966
 
7967
    public Object getFieldValue(int fieldId) {
7968
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7969
    }
7970
 
7971
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7972
    public boolean isSet(_Fields field) {
7973
      switch (field) {
7974
      case SUCCESS:
7975
        return isSetSuccess();
553 chandransh 7976
      case UCEX:
7977
        return isSetUcex();
48 ashish 7978
      }
7979
      throw new IllegalStateException();
7980
    }
7981
 
7982
    public boolean isSet(int fieldID) {
7983
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7984
    }
7985
 
7986
    @Override
7987
    public boolean equals(Object that) {
7988
      if (that == null)
7989
        return false;
553 chandransh 7990
      if (that instanceof getUserState_result)
7991
        return this.equals((getUserState_result)that);
48 ashish 7992
      return false;
7993
    }
7994
 
553 chandransh 7995
    public boolean equals(getUserState_result that) {
48 ashish 7996
      if (that == null)
7997
        return false;
7998
 
7999
      boolean this_present_success = true && this.isSetSuccess();
8000
      boolean that_present_success = true && that.isSetSuccess();
8001
      if (this_present_success || that_present_success) {
8002
        if (!(this_present_success && that_present_success))
8003
          return false;
8004
        if (!this.success.equals(that.success))
8005
          return false;
8006
      }
8007
 
553 chandransh 8008
      boolean this_present_ucex = true && this.isSetUcex();
8009
      boolean that_present_ucex = true && that.isSetUcex();
8010
      if (this_present_ucex || that_present_ucex) {
8011
        if (!(this_present_ucex && that_present_ucex))
48 ashish 8012
          return false;
553 chandransh 8013
        if (!this.ucex.equals(that.ucex))
48 ashish 8014
          return false;
8015
      }
8016
 
8017
      return true;
8018
    }
8019
 
8020
    @Override
8021
    public int hashCode() {
8022
      return 0;
8023
    }
8024
 
553 chandransh 8025
    public int compareTo(getUserState_result other) {
48 ashish 8026
      if (!getClass().equals(other.getClass())) {
8027
        return getClass().getName().compareTo(other.getClass().getName());
8028
      }
8029
 
8030
      int lastComparison = 0;
553 chandransh 8031
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 8032
 
8033
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8034
      if (lastComparison != 0) {
8035
        return lastComparison;
8036
      }
8037
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8038
      if (lastComparison != 0) {
8039
        return lastComparison;
8040
      }
553 chandransh 8041
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 8042
      if (lastComparison != 0) {
8043
        return lastComparison;
8044
      }
553 chandransh 8045
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 8046
      if (lastComparison != 0) {
8047
        return lastComparison;
8048
      }
8049
      return 0;
8050
    }
8051
 
8052
    public void read(TProtocol iprot) throws TException {
8053
      TField field;
8054
      iprot.readStructBegin();
8055
      while (true)
8056
      {
8057
        field = iprot.readFieldBegin();
8058
        if (field.type == TType.STOP) { 
8059
          break;
8060
        }
8061
        _Fields fieldId = _Fields.findByThriftId(field.id);
8062
        if (fieldId == null) {
8063
          TProtocolUtil.skip(iprot, field.type);
8064
        } else {
8065
          switch (fieldId) {
8066
            case SUCCESS:
8067
              if (field.type == TType.STRUCT) {
553 chandransh 8068
                this.success = new UserState();
48 ashish 8069
                this.success.read(iprot);
8070
              } else { 
8071
                TProtocolUtil.skip(iprot, field.type);
8072
              }
8073
              break;
553 chandransh 8074
            case UCEX:
48 ashish 8075
              if (field.type == TType.STRUCT) {
553 chandransh 8076
                this.ucex = new UserContextException();
8077
                this.ucex.read(iprot);
48 ashish 8078
              } else { 
8079
                TProtocolUtil.skip(iprot, field.type);
8080
              }
8081
              break;
8082
          }
8083
          iprot.readFieldEnd();
8084
        }
8085
      }
8086
      iprot.readStructEnd();
8087
      validate();
8088
    }
8089
 
8090
    public void write(TProtocol oprot) throws TException {
8091
      oprot.writeStructBegin(STRUCT_DESC);
8092
 
8093
      if (this.isSetSuccess()) {
8094
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8095
        this.success.write(oprot);
8096
        oprot.writeFieldEnd();
553 chandransh 8097
      } else if (this.isSetUcex()) {
8098
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
8099
        this.ucex.write(oprot);
48 ashish 8100
        oprot.writeFieldEnd();
8101
      }
8102
      oprot.writeFieldStop();
8103
      oprot.writeStructEnd();
8104
    }
8105
 
8106
    @Override
8107
    public String toString() {
553 chandransh 8108
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 8109
      boolean first = true;
8110
 
8111
      sb.append("success:");
8112
      if (this.success == null) {
8113
        sb.append("null");
8114
      } else {
8115
        sb.append(this.success);
8116
      }
8117
      first = false;
8118
      if (!first) sb.append(", ");
553 chandransh 8119
      sb.append("ucex:");
8120
      if (this.ucex == null) {
48 ashish 8121
        sb.append("null");
8122
      } else {
553 chandransh 8123
        sb.append(this.ucex);
48 ashish 8124
      }
8125
      first = false;
8126
      sb.append(")");
8127
      return sb.toString();
8128
    }
8129
 
8130
    public void validate() throws TException {
8131
      // check for required fields
8132
    }
8133
 
8134
  }
8135
 
553 chandransh 8136
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
8137
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 8138
 
8139
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
8140
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
8141
 
8142
    private String email;
8143
    private String password;
8144
 
8145
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8146
    public enum _Fields implements TFieldIdEnum {
8147
      EMAIL((short)1, "email"),
8148
      PASSWORD((short)2, "password");
8149
 
8150
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8151
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8152
 
8153
      static {
8154
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8155
          byId.put((int)field._thriftId, field);
8156
          byName.put(field.getFieldName(), field);
8157
        }
8158
      }
8159
 
8160
      /**
8161
       * Find the _Fields constant that matches fieldId, or null if its not found.
8162
       */
8163
      public static _Fields findByThriftId(int fieldId) {
8164
        return byId.get(fieldId);
8165
      }
8166
 
8167
      /**
8168
       * Find the _Fields constant that matches fieldId, throwing an exception
8169
       * if it is not found.
8170
       */
8171
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8172
        _Fields fields = findByThriftId(fieldId);
8173
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8174
        return fields;
8175
      }
8176
 
8177
      /**
8178
       * Find the _Fields constant that matches name, or null if its not found.
8179
       */
8180
      public static _Fields findByName(String name) {
8181
        return byName.get(name);
8182
      }
8183
 
8184
      private final short _thriftId;
8185
      private final String _fieldName;
8186
 
8187
      _Fields(short thriftId, String fieldName) {
8188
        _thriftId = thriftId;
8189
        _fieldName = fieldName;
8190
      }
8191
 
8192
      public short getThriftFieldId() {
8193
        return _thriftId;
8194
      }
8195
 
8196
      public String getFieldName() {
8197
        return _fieldName;
8198
      }
8199
    }
8200
 
8201
    // isset id assignments
8202
 
8203
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8204
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
8205
          new FieldValueMetaData(TType.STRING)));
8206
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
8207
          new FieldValueMetaData(TType.STRING)));
8208
    }});
8209
 
8210
    static {
553 chandransh 8211
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 8212
    }
8213
 
553 chandransh 8214
    public authenticateUser_args() {
48 ashish 8215
    }
8216
 
553 chandransh 8217
    public authenticateUser_args(
48 ashish 8218
      String email,
8219
      String password)
8220
    {
8221
      this();
8222
      this.email = email;
8223
      this.password = password;
8224
    }
8225
 
8226
    /**
8227
     * Performs a deep copy on <i>other</i>.
8228
     */
553 chandransh 8229
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 8230
      if (other.isSetEmail()) {
8231
        this.email = other.email;
8232
      }
8233
      if (other.isSetPassword()) {
8234
        this.password = other.password;
8235
      }
8236
    }
8237
 
553 chandransh 8238
    public authenticateUser_args deepCopy() {
8239
      return new authenticateUser_args(this);
48 ashish 8240
    }
8241
 
8242
    @Deprecated
553 chandransh 8243
    public authenticateUser_args clone() {
8244
      return new authenticateUser_args(this);
48 ashish 8245
    }
8246
 
8247
    public String getEmail() {
8248
      return this.email;
8249
    }
8250
 
553 chandransh 8251
    public authenticateUser_args setEmail(String email) {
48 ashish 8252
      this.email = email;
8253
      return this;
8254
    }
8255
 
8256
    public void unsetEmail() {
8257
      this.email = null;
8258
    }
8259
 
8260
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
8261
    public boolean isSetEmail() {
8262
      return this.email != null;
8263
    }
8264
 
8265
    public void setEmailIsSet(boolean value) {
8266
      if (!value) {
8267
        this.email = null;
8268
      }
8269
    }
8270
 
8271
    public String getPassword() {
8272
      return this.password;
8273
    }
8274
 
553 chandransh 8275
    public authenticateUser_args setPassword(String password) {
48 ashish 8276
      this.password = password;
8277
      return this;
8278
    }
8279
 
8280
    public void unsetPassword() {
8281
      this.password = null;
8282
    }
8283
 
8284
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
8285
    public boolean isSetPassword() {
8286
      return this.password != null;
8287
    }
8288
 
8289
    public void setPasswordIsSet(boolean value) {
8290
      if (!value) {
8291
        this.password = null;
8292
      }
8293
    }
8294
 
8295
    public void setFieldValue(_Fields field, Object value) {
8296
      switch (field) {
8297
      case EMAIL:
8298
        if (value == null) {
8299
          unsetEmail();
8300
        } else {
8301
          setEmail((String)value);
8302
        }
8303
        break;
8304
 
8305
      case PASSWORD:
8306
        if (value == null) {
8307
          unsetPassword();
8308
        } else {
8309
          setPassword((String)value);
8310
        }
8311
        break;
8312
 
8313
      }
8314
    }
8315
 
8316
    public void setFieldValue(int fieldID, Object value) {
8317
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8318
    }
8319
 
8320
    public Object getFieldValue(_Fields field) {
8321
      switch (field) {
8322
      case EMAIL:
8323
        return getEmail();
8324
 
8325
      case PASSWORD:
8326
        return getPassword();
8327
 
8328
      }
8329
      throw new IllegalStateException();
8330
    }
8331
 
8332
    public Object getFieldValue(int fieldId) {
8333
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8334
    }
8335
 
8336
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8337
    public boolean isSet(_Fields field) {
8338
      switch (field) {
8339
      case EMAIL:
8340
        return isSetEmail();
8341
      case PASSWORD:
8342
        return isSetPassword();
8343
      }
8344
      throw new IllegalStateException();
8345
    }
8346
 
8347
    public boolean isSet(int fieldID) {
8348
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8349
    }
8350
 
8351
    @Override
8352
    public boolean equals(Object that) {
8353
      if (that == null)
8354
        return false;
553 chandransh 8355
      if (that instanceof authenticateUser_args)
8356
        return this.equals((authenticateUser_args)that);
48 ashish 8357
      return false;
8358
    }
8359
 
553 chandransh 8360
    public boolean equals(authenticateUser_args that) {
48 ashish 8361
      if (that == null)
8362
        return false;
8363
 
8364
      boolean this_present_email = true && this.isSetEmail();
8365
      boolean that_present_email = true && that.isSetEmail();
8366
      if (this_present_email || that_present_email) {
8367
        if (!(this_present_email && that_present_email))
8368
          return false;
8369
        if (!this.email.equals(that.email))
8370
          return false;
8371
      }
8372
 
8373
      boolean this_present_password = true && this.isSetPassword();
8374
      boolean that_present_password = true && that.isSetPassword();
8375
      if (this_present_password || that_present_password) {
8376
        if (!(this_present_password && that_present_password))
8377
          return false;
8378
        if (!this.password.equals(that.password))
8379
          return false;
8380
      }
8381
 
8382
      return true;
8383
    }
8384
 
8385
    @Override
8386
    public int hashCode() {
8387
      return 0;
8388
    }
8389
 
553 chandransh 8390
    public int compareTo(authenticateUser_args other) {
48 ashish 8391
      if (!getClass().equals(other.getClass())) {
8392
        return getClass().getName().compareTo(other.getClass().getName());
8393
      }
8394
 
8395
      int lastComparison = 0;
553 chandransh 8396
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 8397
 
8398
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8399
      if (lastComparison != 0) {
8400
        return lastComparison;
8401
      }
8402
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8403
      if (lastComparison != 0) {
8404
        return lastComparison;
8405
      }
8406
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
8407
      if (lastComparison != 0) {
8408
        return lastComparison;
8409
      }
8410
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
8411
      if (lastComparison != 0) {
8412
        return lastComparison;
8413
      }
8414
      return 0;
8415
    }
8416
 
8417
    public void read(TProtocol iprot) throws TException {
8418
      TField field;
8419
      iprot.readStructBegin();
8420
      while (true)
8421
      {
8422
        field = iprot.readFieldBegin();
8423
        if (field.type == TType.STOP) { 
8424
          break;
8425
        }
8426
        _Fields fieldId = _Fields.findByThriftId(field.id);
8427
        if (fieldId == null) {
8428
          TProtocolUtil.skip(iprot, field.type);
8429
        } else {
8430
          switch (fieldId) {
8431
            case EMAIL:
8432
              if (field.type == TType.STRING) {
8433
                this.email = iprot.readString();
8434
              } else { 
8435
                TProtocolUtil.skip(iprot, field.type);
8436
              }
8437
              break;
8438
            case PASSWORD:
8439
              if (field.type == TType.STRING) {
8440
                this.password = iprot.readString();
8441
              } else { 
8442
                TProtocolUtil.skip(iprot, field.type);
8443
              }
8444
              break;
8445
          }
8446
          iprot.readFieldEnd();
8447
        }
8448
      }
8449
      iprot.readStructEnd();
8450
      validate();
8451
    }
8452
 
8453
    public void write(TProtocol oprot) throws TException {
8454
      validate();
8455
 
8456
      oprot.writeStructBegin(STRUCT_DESC);
8457
      if (this.email != null) {
8458
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8459
        oprot.writeString(this.email);
8460
        oprot.writeFieldEnd();
8461
      }
8462
      if (this.password != null) {
8463
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
8464
        oprot.writeString(this.password);
8465
        oprot.writeFieldEnd();
8466
      }
8467
      oprot.writeFieldStop();
8468
      oprot.writeStructEnd();
8469
    }
8470
 
8471
    @Override
8472
    public String toString() {
553 chandransh 8473
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 8474
      boolean first = true;
8475
 
8476
      sb.append("email:");
8477
      if (this.email == null) {
8478
        sb.append("null");
8479
      } else {
8480
        sb.append(this.email);
8481
      }
8482
      first = false;
8483
      if (!first) sb.append(", ");
8484
      sb.append("password:");
8485
      if (this.password == null) {
8486
        sb.append("null");
8487
      } else {
8488
        sb.append(this.password);
8489
      }
8490
      first = false;
8491
      sb.append(")");
8492
      return sb.toString();
8493
    }
8494
 
8495
    public void validate() throws TException {
8496
      // check for required fields
8497
    }
8498
 
8499
  }
8500
 
571 rajveer 8501
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 8502
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 8503
 
8504
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 8505
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 8506
 
553 chandransh 8507
    private User success;
8508
    private AuthenticationException auex;
48 ashish 8509
 
8510
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8511
    public enum _Fields implements TFieldIdEnum {
8512
      SUCCESS((short)0, "success"),
553 chandransh 8513
      AUEX((short)1, "auex");
48 ashish 8514
 
8515
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8516
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8517
 
8518
      static {
8519
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8520
          byId.put((int)field._thriftId, field);
8521
          byName.put(field.getFieldName(), field);
8522
        }
8523
      }
8524
 
8525
      /**
8526
       * Find the _Fields constant that matches fieldId, or null if its not found.
8527
       */
8528
      public static _Fields findByThriftId(int fieldId) {
8529
        return byId.get(fieldId);
8530
      }
8531
 
8532
      /**
8533
       * Find the _Fields constant that matches fieldId, throwing an exception
8534
       * if it is not found.
8535
       */
8536
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8537
        _Fields fields = findByThriftId(fieldId);
8538
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8539
        return fields;
8540
      }
8541
 
8542
      /**
8543
       * Find the _Fields constant that matches name, or null if its not found.
8544
       */
8545
      public static _Fields findByName(String name) {
8546
        return byName.get(name);
8547
      }
8548
 
8549
      private final short _thriftId;
8550
      private final String _fieldName;
8551
 
8552
      _Fields(short thriftId, String fieldName) {
8553
        _thriftId = thriftId;
8554
        _fieldName = fieldName;
8555
      }
8556
 
8557
      public short getThriftFieldId() {
8558
        return _thriftId;
8559
      }
8560
 
8561
      public String getFieldName() {
8562
        return _fieldName;
8563
      }
8564
    }
8565
 
8566
    // isset id assignments
8567
 
8568
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8569
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 8570
          new StructMetaData(TType.STRUCT, User.class)));
8571
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 8572
          new FieldValueMetaData(TType.STRUCT)));
8573
    }});
8574
 
8575
    static {
553 chandransh 8576
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 8577
    }
8578
 
553 chandransh 8579
    public authenticateUser_result() {
48 ashish 8580
    }
8581
 
553 chandransh 8582
    public authenticateUser_result(
8583
      User success,
8584
      AuthenticationException auex)
48 ashish 8585
    {
8586
      this();
8587
      this.success = success;
553 chandransh 8588
      this.auex = auex;
48 ashish 8589
    }
8590
 
8591
    /**
8592
     * Performs a deep copy on <i>other</i>.
8593
     */
553 chandransh 8594
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 8595
      if (other.isSetSuccess()) {
553 chandransh 8596
        this.success = new User(other.success);
48 ashish 8597
      }
553 chandransh 8598
      if (other.isSetAuex()) {
8599
        this.auex = new AuthenticationException(other.auex);
48 ashish 8600
      }
8601
    }
8602
 
553 chandransh 8603
    public authenticateUser_result deepCopy() {
8604
      return new authenticateUser_result(this);
48 ashish 8605
    }
8606
 
8607
    @Deprecated
553 chandransh 8608
    public authenticateUser_result clone() {
8609
      return new authenticateUser_result(this);
48 ashish 8610
    }
8611
 
553 chandransh 8612
    public User getSuccess() {
48 ashish 8613
      return this.success;
8614
    }
8615
 
553 chandransh 8616
    public authenticateUser_result setSuccess(User success) {
48 ashish 8617
      this.success = success;
8618
      return this;
8619
    }
8620
 
8621
    public void unsetSuccess() {
8622
      this.success = null;
8623
    }
8624
 
8625
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8626
    public boolean isSetSuccess() {
8627
      return this.success != null;
8628
    }
8629
 
8630
    public void setSuccessIsSet(boolean value) {
8631
      if (!value) {
8632
        this.success = null;
8633
      }
8634
    }
8635
 
553 chandransh 8636
    public AuthenticationException getAuex() {
8637
      return this.auex;
48 ashish 8638
    }
8639
 
553 chandransh 8640
    public authenticateUser_result setAuex(AuthenticationException auex) {
8641
      this.auex = auex;
48 ashish 8642
      return this;
8643
    }
8644
 
553 chandransh 8645
    public void unsetAuex() {
8646
      this.auex = null;
48 ashish 8647
    }
8648
 
553 chandransh 8649
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
8650
    public boolean isSetAuex() {
8651
      return this.auex != null;
48 ashish 8652
    }
8653
 
553 chandransh 8654
    public void setAuexIsSet(boolean value) {
48 ashish 8655
      if (!value) {
553 chandransh 8656
        this.auex = null;
48 ashish 8657
      }
8658
    }
8659
 
8660
    public void setFieldValue(_Fields field, Object value) {
8661
      switch (field) {
8662
      case SUCCESS:
8663
        if (value == null) {
8664
          unsetSuccess();
8665
        } else {
553 chandransh 8666
          setSuccess((User)value);
48 ashish 8667
        }
8668
        break;
8669
 
553 chandransh 8670
      case AUEX:
48 ashish 8671
        if (value == null) {
553 chandransh 8672
          unsetAuex();
48 ashish 8673
        } else {
553 chandransh 8674
          setAuex((AuthenticationException)value);
48 ashish 8675
        }
8676
        break;
8677
 
8678
      }
8679
    }
8680
 
8681
    public void setFieldValue(int fieldID, Object value) {
8682
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8683
    }
8684
 
8685
    public Object getFieldValue(_Fields field) {
8686
      switch (field) {
8687
      case SUCCESS:
8688
        return getSuccess();
8689
 
553 chandransh 8690
      case AUEX:
8691
        return getAuex();
48 ashish 8692
 
8693
      }
8694
      throw new IllegalStateException();
8695
    }
8696
 
8697
    public Object getFieldValue(int fieldId) {
8698
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8699
    }
8700
 
8701
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8702
    public boolean isSet(_Fields field) {
8703
      switch (field) {
8704
      case SUCCESS:
8705
        return isSetSuccess();
553 chandransh 8706
      case AUEX:
8707
        return isSetAuex();
48 ashish 8708
      }
8709
      throw new IllegalStateException();
8710
    }
8711
 
8712
    public boolean isSet(int fieldID) {
8713
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8714
    }
8715
 
8716
    @Override
8717
    public boolean equals(Object that) {
8718
      if (that == null)
8719
        return false;
553 chandransh 8720
      if (that instanceof authenticateUser_result)
8721
        return this.equals((authenticateUser_result)that);
48 ashish 8722
      return false;
8723
    }
8724
 
553 chandransh 8725
    public boolean equals(authenticateUser_result that) {
48 ashish 8726
      if (that == null)
8727
        return false;
8728
 
8729
      boolean this_present_success = true && this.isSetSuccess();
8730
      boolean that_present_success = true && that.isSetSuccess();
8731
      if (this_present_success || that_present_success) {
8732
        if (!(this_present_success && that_present_success))
8733
          return false;
8734
        if (!this.success.equals(that.success))
8735
          return false;
8736
      }
8737
 
553 chandransh 8738
      boolean this_present_auex = true && this.isSetAuex();
8739
      boolean that_present_auex = true && that.isSetAuex();
8740
      if (this_present_auex || that_present_auex) {
8741
        if (!(this_present_auex && that_present_auex))
48 ashish 8742
          return false;
553 chandransh 8743
        if (!this.auex.equals(that.auex))
48 ashish 8744
          return false;
8745
      }
8746
 
8747
      return true;
8748
    }
8749
 
8750
    @Override
8751
    public int hashCode() {
8752
      return 0;
8753
    }
8754
 
571 rajveer 8755
    public int compareTo(authenticateUser_result other) {
8756
      if (!getClass().equals(other.getClass())) {
8757
        return getClass().getName().compareTo(other.getClass().getName());
8758
      }
8759
 
8760
      int lastComparison = 0;
8761
      authenticateUser_result typedOther = (authenticateUser_result)other;
8762
 
8763
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8764
      if (lastComparison != 0) {
8765
        return lastComparison;
8766
      }
8767
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8768
      if (lastComparison != 0) {
8769
        return lastComparison;
8770
      }
8771
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
8772
      if (lastComparison != 0) {
8773
        return lastComparison;
8774
      }
8775
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
8776
      if (lastComparison != 0) {
8777
        return lastComparison;
8778
      }
8779
      return 0;
8780
    }
8781
 
48 ashish 8782
    public void read(TProtocol iprot) throws TException {
8783
      TField field;
8784
      iprot.readStructBegin();
8785
      while (true)
8786
      {
8787
        field = iprot.readFieldBegin();
8788
        if (field.type == TType.STOP) { 
8789
          break;
8790
        }
8791
        _Fields fieldId = _Fields.findByThriftId(field.id);
8792
        if (fieldId == null) {
8793
          TProtocolUtil.skip(iprot, field.type);
8794
        } else {
8795
          switch (fieldId) {
8796
            case SUCCESS:
8797
              if (field.type == TType.STRUCT) {
553 chandransh 8798
                this.success = new User();
48 ashish 8799
                this.success.read(iprot);
8800
              } else { 
8801
                TProtocolUtil.skip(iprot, field.type);
8802
              }
8803
              break;
553 chandransh 8804
            case AUEX:
48 ashish 8805
              if (field.type == TType.STRUCT) {
553 chandransh 8806
                this.auex = new AuthenticationException();
8807
                this.auex.read(iprot);
48 ashish 8808
              } else { 
8809
                TProtocolUtil.skip(iprot, field.type);
8810
              }
8811
              break;
8812
          }
8813
          iprot.readFieldEnd();
8814
        }
8815
      }
8816
      iprot.readStructEnd();
8817
      validate();
8818
    }
8819
 
8820
    public void write(TProtocol oprot) throws TException {
8821
      oprot.writeStructBegin(STRUCT_DESC);
8822
 
8823
      if (this.isSetSuccess()) {
8824
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8825
        this.success.write(oprot);
8826
        oprot.writeFieldEnd();
553 chandransh 8827
      } else if (this.isSetAuex()) {
8828
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
8829
        this.auex.write(oprot);
48 ashish 8830
        oprot.writeFieldEnd();
8831
      }
8832
      oprot.writeFieldStop();
8833
      oprot.writeStructEnd();
8834
    }
8835
 
8836
    @Override
8837
    public String toString() {
553 chandransh 8838
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 8839
      boolean first = true;
8840
 
8841
      sb.append("success:");
8842
      if (this.success == null) {
8843
        sb.append("null");
8844
      } else {
8845
        sb.append(this.success);
8846
      }
8847
      first = false;
8848
      if (!first) sb.append(", ");
553 chandransh 8849
      sb.append("auex:");
8850
      if (this.auex == null) {
48 ashish 8851
        sb.append("null");
8852
      } else {
553 chandransh 8853
        sb.append(this.auex);
48 ashish 8854
      }
8855
      first = false;
8856
      sb.append(")");
8857
      return sb.toString();
8858
    }
8859
 
8860
    public void validate() throws TException {
8861
      // check for required fields
8862
    }
8863
 
8864
  }
8865
 
553 chandransh 8866
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
8867
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 8868
 
553 chandransh 8869
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 8870
 
553 chandransh 8871
    private String email;
123 ashish 8872
 
8873
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8874
    public enum _Fields implements TFieldIdEnum {
553 chandransh 8875
      EMAIL((short)1, "email");
123 ashish 8876
 
8877
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8878
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8879
 
8880
      static {
8881
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8882
          byId.put((int)field._thriftId, field);
8883
          byName.put(field.getFieldName(), field);
8884
        }
8885
      }
8886
 
8887
      /**
8888
       * Find the _Fields constant that matches fieldId, or null if its not found.
8889
       */
8890
      public static _Fields findByThriftId(int fieldId) {
8891
        return byId.get(fieldId);
8892
      }
8893
 
8894
      /**
8895
       * Find the _Fields constant that matches fieldId, throwing an exception
8896
       * if it is not found.
8897
       */
8898
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8899
        _Fields fields = findByThriftId(fieldId);
8900
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8901
        return fields;
8902
      }
8903
 
8904
      /**
8905
       * Find the _Fields constant that matches name, or null if its not found.
8906
       */
8907
      public static _Fields findByName(String name) {
8908
        return byName.get(name);
8909
      }
8910
 
8911
      private final short _thriftId;
8912
      private final String _fieldName;
8913
 
8914
      _Fields(short thriftId, String fieldName) {
8915
        _thriftId = thriftId;
8916
        _fieldName = fieldName;
8917
      }
8918
 
8919
      public short getThriftFieldId() {
8920
        return _thriftId;
8921
      }
8922
 
8923
      public String getFieldName() {
8924
        return _fieldName;
8925
      }
8926
    }
8927
 
8928
    // isset id assignments
553 chandransh 8929
 
8930
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8931
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
8932
          new FieldValueMetaData(TType.STRING)));
8933
    }});
8934
 
8935
    static {
8936
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
8937
    }
8938
 
8939
    public userExists_args() {
8940
    }
8941
 
8942
    public userExists_args(
8943
      String email)
8944
    {
8945
      this();
8946
      this.email = email;
8947
    }
8948
 
8949
    /**
8950
     * Performs a deep copy on <i>other</i>.
8951
     */
8952
    public userExists_args(userExists_args other) {
8953
      if (other.isSetEmail()) {
8954
        this.email = other.email;
8955
      }
8956
    }
8957
 
8958
    public userExists_args deepCopy() {
8959
      return new userExists_args(this);
8960
    }
8961
 
8962
    @Deprecated
8963
    public userExists_args clone() {
8964
      return new userExists_args(this);
8965
    }
8966
 
8967
    public String getEmail() {
8968
      return this.email;
8969
    }
8970
 
8971
    public userExists_args setEmail(String email) {
8972
      this.email = email;
8973
      return this;
8974
    }
8975
 
8976
    public void unsetEmail() {
8977
      this.email = null;
8978
    }
8979
 
8980
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
8981
    public boolean isSetEmail() {
8982
      return this.email != null;
8983
    }
8984
 
8985
    public void setEmailIsSet(boolean value) {
8986
      if (!value) {
8987
        this.email = null;
8988
      }
8989
    }
8990
 
8991
    public void setFieldValue(_Fields field, Object value) {
8992
      switch (field) {
8993
      case EMAIL:
8994
        if (value == null) {
8995
          unsetEmail();
8996
        } else {
8997
          setEmail((String)value);
8998
        }
8999
        break;
9000
 
9001
      }
9002
    }
9003
 
9004
    public void setFieldValue(int fieldID, Object value) {
9005
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9006
    }
9007
 
9008
    public Object getFieldValue(_Fields field) {
9009
      switch (field) {
9010
      case EMAIL:
9011
        return getEmail();
9012
 
9013
      }
9014
      throw new IllegalStateException();
9015
    }
9016
 
9017
    public Object getFieldValue(int fieldId) {
9018
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9019
    }
9020
 
9021
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9022
    public boolean isSet(_Fields field) {
9023
      switch (field) {
9024
      case EMAIL:
9025
        return isSetEmail();
9026
      }
9027
      throw new IllegalStateException();
9028
    }
9029
 
9030
    public boolean isSet(int fieldID) {
9031
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9032
    }
9033
 
9034
    @Override
9035
    public boolean equals(Object that) {
9036
      if (that == null)
9037
        return false;
9038
      if (that instanceof userExists_args)
9039
        return this.equals((userExists_args)that);
9040
      return false;
9041
    }
9042
 
9043
    public boolean equals(userExists_args that) {
9044
      if (that == null)
9045
        return false;
9046
 
9047
      boolean this_present_email = true && this.isSetEmail();
9048
      boolean that_present_email = true && that.isSetEmail();
9049
      if (this_present_email || that_present_email) {
9050
        if (!(this_present_email && that_present_email))
9051
          return false;
9052
        if (!this.email.equals(that.email))
9053
          return false;
9054
      }
9055
 
9056
      return true;
9057
    }
9058
 
9059
    @Override
9060
    public int hashCode() {
9061
      return 0;
9062
    }
9063
 
9064
    public int compareTo(userExists_args other) {
9065
      if (!getClass().equals(other.getClass())) {
9066
        return getClass().getName().compareTo(other.getClass().getName());
9067
      }
9068
 
9069
      int lastComparison = 0;
9070
      userExists_args typedOther = (userExists_args)other;
9071
 
9072
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
9073
      if (lastComparison != 0) {
9074
        return lastComparison;
9075
      }
9076
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
9077
      if (lastComparison != 0) {
9078
        return lastComparison;
9079
      }
9080
      return 0;
9081
    }
9082
 
9083
    public void read(TProtocol iprot) throws TException {
9084
      TField field;
9085
      iprot.readStructBegin();
9086
      while (true)
9087
      {
9088
        field = iprot.readFieldBegin();
9089
        if (field.type == TType.STOP) { 
9090
          break;
9091
        }
9092
        _Fields fieldId = _Fields.findByThriftId(field.id);
9093
        if (fieldId == null) {
9094
          TProtocolUtil.skip(iprot, field.type);
9095
        } else {
9096
          switch (fieldId) {
9097
            case EMAIL:
9098
              if (field.type == TType.STRING) {
9099
                this.email = iprot.readString();
9100
              } else { 
9101
                TProtocolUtil.skip(iprot, field.type);
9102
              }
9103
              break;
9104
          }
9105
          iprot.readFieldEnd();
9106
        }
9107
      }
9108
      iprot.readStructEnd();
9109
      validate();
9110
    }
9111
 
9112
    public void write(TProtocol oprot) throws TException {
9113
      validate();
9114
 
9115
      oprot.writeStructBegin(STRUCT_DESC);
9116
      if (this.email != null) {
9117
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
9118
        oprot.writeString(this.email);
9119
        oprot.writeFieldEnd();
9120
      }
9121
      oprot.writeFieldStop();
9122
      oprot.writeStructEnd();
9123
    }
9124
 
9125
    @Override
9126
    public String toString() {
9127
      StringBuilder sb = new StringBuilder("userExists_args(");
9128
      boolean first = true;
9129
 
9130
      sb.append("email:");
9131
      if (this.email == null) {
9132
        sb.append("null");
9133
      } else {
9134
        sb.append(this.email);
9135
      }
9136
      first = false;
9137
      sb.append(")");
9138
      return sb.toString();
9139
    }
9140
 
9141
    public void validate() throws TException {
9142
      // check for required fields
9143
    }
9144
 
9145
  }
9146
 
9147
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
9148
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
9149
 
9150
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9151
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9152
 
9153
    private boolean success;
9154
    private UserContextException ucx;
9155
 
9156
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9157
    public enum _Fields implements TFieldIdEnum {
9158
      SUCCESS((short)0, "success"),
9159
      UCX((short)1, "ucx");
9160
 
9161
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9162
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9163
 
9164
      static {
9165
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9166
          byId.put((int)field._thriftId, field);
9167
          byName.put(field.getFieldName(), field);
9168
        }
9169
      }
9170
 
9171
      /**
9172
       * Find the _Fields constant that matches fieldId, or null if its not found.
9173
       */
9174
      public static _Fields findByThriftId(int fieldId) {
9175
        return byId.get(fieldId);
9176
      }
9177
 
9178
      /**
9179
       * Find the _Fields constant that matches fieldId, throwing an exception
9180
       * if it is not found.
9181
       */
9182
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9183
        _Fields fields = findByThriftId(fieldId);
9184
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9185
        return fields;
9186
      }
9187
 
9188
      /**
9189
       * Find the _Fields constant that matches name, or null if its not found.
9190
       */
9191
      public static _Fields findByName(String name) {
9192
        return byName.get(name);
9193
      }
9194
 
9195
      private final short _thriftId;
9196
      private final String _fieldName;
9197
 
9198
      _Fields(short thriftId, String fieldName) {
9199
        _thriftId = thriftId;
9200
        _fieldName = fieldName;
9201
      }
9202
 
9203
      public short getThriftFieldId() {
9204
        return _thriftId;
9205
      }
9206
 
9207
      public String getFieldName() {
9208
        return _fieldName;
9209
      }
9210
    }
9211
 
9212
    // isset id assignments
9213
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 9214
    private BitSet __isset_bit_vector = new BitSet(1);
9215
 
9216
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9217
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 9218
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 9219
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9220
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 9221
    }});
9222
 
9223
    static {
553 chandransh 9224
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 9225
    }
9226
 
553 chandransh 9227
    public userExists_result() {
123 ashish 9228
    }
9229
 
553 chandransh 9230
    public userExists_result(
9231
      boolean success,
9232
      UserContextException ucx)
123 ashish 9233
    {
9234
      this();
553 chandransh 9235
      this.success = success;
9236
      setSuccessIsSet(true);
9237
      this.ucx = ucx;
123 ashish 9238
    }
9239
 
9240
    /**
9241
     * Performs a deep copy on <i>other</i>.
9242
     */
553 chandransh 9243
    public userExists_result(userExists_result other) {
123 ashish 9244
      __isset_bit_vector.clear();
9245
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 9246
      this.success = other.success;
9247
      if (other.isSetUcx()) {
9248
        this.ucx = new UserContextException(other.ucx);
123 ashish 9249
      }
9250
    }
9251
 
553 chandransh 9252
    public userExists_result deepCopy() {
9253
      return new userExists_result(this);
123 ashish 9254
    }
9255
 
9256
    @Deprecated
553 chandransh 9257
    public userExists_result clone() {
9258
      return new userExists_result(this);
123 ashish 9259
    }
9260
 
553 chandransh 9261
    public boolean isSuccess() {
9262
      return this.success;
123 ashish 9263
    }
9264
 
553 chandransh 9265
    public userExists_result setSuccess(boolean success) {
9266
      this.success = success;
9267
      setSuccessIsSet(true);
123 ashish 9268
      return this;
9269
    }
9270
 
553 chandransh 9271
    public void unsetSuccess() {
9272
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 9273
    }
9274
 
553 chandransh 9275
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9276
    public boolean isSetSuccess() {
9277
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 9278
    }
9279
 
553 chandransh 9280
    public void setSuccessIsSet(boolean value) {
9281
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9282
    }
9283
 
9284
    public UserContextException getUcx() {
9285
      return this.ucx;
9286
    }
9287
 
9288
    public userExists_result setUcx(UserContextException ucx) {
9289
      this.ucx = ucx;
9290
      return this;
9291
    }
9292
 
9293
    public void unsetUcx() {
9294
      this.ucx = null;
9295
    }
9296
 
9297
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9298
    public boolean isSetUcx() {
9299
      return this.ucx != null;
9300
    }
9301
 
9302
    public void setUcxIsSet(boolean value) {
123 ashish 9303
      if (!value) {
553 chandransh 9304
        this.ucx = null;
123 ashish 9305
      }
9306
    }
9307
 
553 chandransh 9308
    public void setFieldValue(_Fields field, Object value) {
9309
      switch (field) {
9310
      case SUCCESS:
9311
        if (value == null) {
9312
          unsetSuccess();
9313
        } else {
9314
          setSuccess((Boolean)value);
9315
        }
9316
        break;
9317
 
9318
      case UCX:
9319
        if (value == null) {
9320
          unsetUcx();
9321
        } else {
9322
          setUcx((UserContextException)value);
9323
        }
9324
        break;
9325
 
9326
      }
123 ashish 9327
    }
9328
 
553 chandransh 9329
    public void setFieldValue(int fieldID, Object value) {
9330
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9331
    }
9332
 
9333
    public Object getFieldValue(_Fields field) {
9334
      switch (field) {
9335
      case SUCCESS:
9336
        return new Boolean(isSuccess());
9337
 
9338
      case UCX:
9339
        return getUcx();
9340
 
9341
      }
9342
      throw new IllegalStateException();
9343
    }
9344
 
9345
    public Object getFieldValue(int fieldId) {
9346
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9347
    }
9348
 
9349
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9350
    public boolean isSet(_Fields field) {
9351
      switch (field) {
9352
      case SUCCESS:
9353
        return isSetSuccess();
9354
      case UCX:
9355
        return isSetUcx();
9356
      }
9357
      throw new IllegalStateException();
9358
    }
9359
 
9360
    public boolean isSet(int fieldID) {
9361
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9362
    }
9363
 
9364
    @Override
9365
    public boolean equals(Object that) {
9366
      if (that == null)
9367
        return false;
9368
      if (that instanceof userExists_result)
9369
        return this.equals((userExists_result)that);
9370
      return false;
9371
    }
9372
 
9373
    public boolean equals(userExists_result that) {
9374
      if (that == null)
9375
        return false;
9376
 
9377
      boolean this_present_success = true;
9378
      boolean that_present_success = true;
9379
      if (this_present_success || that_present_success) {
9380
        if (!(this_present_success && that_present_success))
9381
          return false;
9382
        if (this.success != that.success)
9383
          return false;
9384
      }
9385
 
9386
      boolean this_present_ucx = true && this.isSetUcx();
9387
      boolean that_present_ucx = true && that.isSetUcx();
9388
      if (this_present_ucx || that_present_ucx) {
9389
        if (!(this_present_ucx && that_present_ucx))
9390
          return false;
9391
        if (!this.ucx.equals(that.ucx))
9392
          return false;
9393
      }
9394
 
9395
      return true;
9396
    }
9397
 
9398
    @Override
9399
    public int hashCode() {
9400
      return 0;
9401
    }
9402
 
9403
    public int compareTo(userExists_result other) {
9404
      if (!getClass().equals(other.getClass())) {
9405
        return getClass().getName().compareTo(other.getClass().getName());
9406
      }
9407
 
9408
      int lastComparison = 0;
9409
      userExists_result typedOther = (userExists_result)other;
9410
 
9411
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9412
      if (lastComparison != 0) {
9413
        return lastComparison;
9414
      }
9415
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9416
      if (lastComparison != 0) {
9417
        return lastComparison;
9418
      }
9419
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9420
      if (lastComparison != 0) {
9421
        return lastComparison;
9422
      }
9423
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9424
      if (lastComparison != 0) {
9425
        return lastComparison;
9426
      }
9427
      return 0;
9428
    }
9429
 
9430
    public void read(TProtocol iprot) throws TException {
9431
      TField field;
9432
      iprot.readStructBegin();
9433
      while (true)
9434
      {
9435
        field = iprot.readFieldBegin();
9436
        if (field.type == TType.STOP) { 
9437
          break;
9438
        }
9439
        _Fields fieldId = _Fields.findByThriftId(field.id);
9440
        if (fieldId == null) {
9441
          TProtocolUtil.skip(iprot, field.type);
9442
        } else {
9443
          switch (fieldId) {
9444
            case SUCCESS:
9445
              if (field.type == TType.BOOL) {
9446
                this.success = iprot.readBool();
9447
                setSuccessIsSet(true);
9448
              } else { 
9449
                TProtocolUtil.skip(iprot, field.type);
9450
              }
9451
              break;
9452
            case UCX:
9453
              if (field.type == TType.STRUCT) {
9454
                this.ucx = new UserContextException();
9455
                this.ucx.read(iprot);
9456
              } else { 
9457
                TProtocolUtil.skip(iprot, field.type);
9458
              }
9459
              break;
9460
          }
9461
          iprot.readFieldEnd();
9462
        }
9463
      }
9464
      iprot.readStructEnd();
9465
      validate();
9466
    }
9467
 
9468
    public void write(TProtocol oprot) throws TException {
9469
      oprot.writeStructBegin(STRUCT_DESC);
9470
 
9471
      if (this.isSetSuccess()) {
9472
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9473
        oprot.writeBool(this.success);
9474
        oprot.writeFieldEnd();
9475
      } else if (this.isSetUcx()) {
9476
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9477
        this.ucx.write(oprot);
9478
        oprot.writeFieldEnd();
9479
      }
9480
      oprot.writeFieldStop();
9481
      oprot.writeStructEnd();
9482
    }
9483
 
9484
    @Override
9485
    public String toString() {
9486
      StringBuilder sb = new StringBuilder("userExists_result(");
9487
      boolean first = true;
9488
 
9489
      sb.append("success:");
9490
      sb.append(this.success);
9491
      first = false;
9492
      if (!first) sb.append(", ");
9493
      sb.append("ucx:");
9494
      if (this.ucx == null) {
9495
        sb.append("null");
9496
      } else {
9497
        sb.append(this.ucx);
9498
      }
9499
      first = false;
9500
      sb.append(")");
9501
      return sb.toString();
9502
    }
9503
 
9504
    public void validate() throws TException {
9505
      // check for required fields
9506
    }
9507
 
9508
  }
9509
 
9510
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
9511
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
9512
 
9513
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
9514
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 9515
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 9516
 
9517
    private long userId;
9518
    private Address address;
9519
    private boolean setDefault;
9520
 
9521
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9522
    public enum _Fields implements TFieldIdEnum {
9523
      USER_ID((short)1, "userId"),
9524
      ADDRESS((short)2, "address"),
571 rajveer 9525
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 9526
 
9527
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9528
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9529
 
9530
      static {
9531
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9532
          byId.put((int)field._thriftId, field);
9533
          byName.put(field.getFieldName(), field);
9534
        }
9535
      }
9536
 
9537
      /**
9538
       * Find the _Fields constant that matches fieldId, or null if its not found.
9539
       */
9540
      public static _Fields findByThriftId(int fieldId) {
9541
        return byId.get(fieldId);
9542
      }
9543
 
9544
      /**
9545
       * Find the _Fields constant that matches fieldId, throwing an exception
9546
       * if it is not found.
9547
       */
9548
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9549
        _Fields fields = findByThriftId(fieldId);
9550
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9551
        return fields;
9552
      }
9553
 
9554
      /**
9555
       * Find the _Fields constant that matches name, or null if its not found.
9556
       */
9557
      public static _Fields findByName(String name) {
9558
        return byName.get(name);
9559
      }
9560
 
9561
      private final short _thriftId;
9562
      private final String _fieldName;
9563
 
9564
      _Fields(short thriftId, String fieldName) {
9565
        _thriftId = thriftId;
9566
        _fieldName = fieldName;
9567
      }
9568
 
9569
      public short getThriftFieldId() {
9570
        return _thriftId;
9571
      }
9572
 
9573
      public String getFieldName() {
9574
        return _fieldName;
9575
      }
9576
    }
9577
 
9578
    // isset id assignments
9579
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 9580
    private static final int __SETDEFAULT_ISSET_ID = 1;
9581
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 9582
 
9583
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9584
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
9585
          new FieldValueMetaData(TType.I64)));
9586
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
9587
          new StructMetaData(TType.STRUCT, Address.class)));
9588
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
9589
          new FieldValueMetaData(TType.BOOL)));
9590
    }});
9591
 
9592
    static {
9593
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
9594
    }
9595
 
9596
    public addAddressForUser_args() {
9597
    }
9598
 
9599
    public addAddressForUser_args(
9600
      long userId,
9601
      Address address,
9602
      boolean setDefault)
9603
    {
9604
      this();
9605
      this.userId = userId;
9606
      setUserIdIsSet(true);
9607
      this.address = address;
9608
      this.setDefault = setDefault;
9609
      setSetDefaultIsSet(true);
9610
    }
9611
 
9612
    /**
9613
     * Performs a deep copy on <i>other</i>.
9614
     */
9615
    public addAddressForUser_args(addAddressForUser_args other) {
9616
      __isset_bit_vector.clear();
9617
      __isset_bit_vector.or(other.__isset_bit_vector);
9618
      this.userId = other.userId;
9619
      if (other.isSetAddress()) {
9620
        this.address = new Address(other.address);
9621
      }
9622
      this.setDefault = other.setDefault;
9623
    }
9624
 
9625
    public addAddressForUser_args deepCopy() {
9626
      return new addAddressForUser_args(this);
9627
    }
9628
 
9629
    @Deprecated
9630
    public addAddressForUser_args clone() {
9631
      return new addAddressForUser_args(this);
9632
    }
9633
 
9634
    public long getUserId() {
9635
      return this.userId;
9636
    }
9637
 
9638
    public addAddressForUser_args setUserId(long userId) {
9639
      this.userId = userId;
9640
      setUserIdIsSet(true);
123 ashish 9641
      return this;
9642
    }
9643
 
553 chandransh 9644
    public void unsetUserId() {
9645
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 9646
    }
9647
 
553 chandransh 9648
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
9649
    public boolean isSetUserId() {
9650
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 9651
    }
9652
 
553 chandransh 9653
    public void setUserIdIsSet(boolean value) {
9654
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9655
    }
9656
 
9657
    public Address getAddress() {
9658
      return this.address;
9659
    }
9660
 
9661
    public addAddressForUser_args setAddress(Address address) {
9662
      this.address = address;
9663
      return this;
9664
    }
9665
 
9666
    public void unsetAddress() {
9667
      this.address = null;
9668
    }
9669
 
9670
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
9671
    public boolean isSetAddress() {
9672
      return this.address != null;
9673
    }
9674
 
9675
    public void setAddressIsSet(boolean value) {
123 ashish 9676
      if (!value) {
553 chandransh 9677
        this.address = null;
123 ashish 9678
      }
9679
    }
9680
 
553 chandransh 9681
    public boolean isSetDefault() {
9682
      return this.setDefault;
9683
    }
9684
 
9685
    public addAddressForUser_args setSetDefault(boolean setDefault) {
9686
      this.setDefault = setDefault;
9687
      setSetDefaultIsSet(true);
9688
      return this;
9689
    }
9690
 
9691
    public void unsetSetDefault() {
9692
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
9693
    }
9694
 
9695
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
9696
    public boolean isSetSetDefault() {
9697
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
9698
    }
9699
 
9700
    public void setSetDefaultIsSet(boolean value) {
9701
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
9702
    }
9703
 
123 ashish 9704
    public void setFieldValue(_Fields field, Object value) {
9705
      switch (field) {
553 chandransh 9706
      case USER_ID:
123 ashish 9707
        if (value == null) {
553 chandransh 9708
          unsetUserId();
123 ashish 9709
        } else {
553 chandransh 9710
          setUserId((Long)value);
123 ashish 9711
        }
9712
        break;
9713
 
553 chandransh 9714
      case ADDRESS:
123 ashish 9715
        if (value == null) {
553 chandransh 9716
          unsetAddress();
123 ashish 9717
        } else {
553 chandransh 9718
          setAddress((Address)value);
123 ashish 9719
        }
9720
        break;
9721
 
553 chandransh 9722
      case SET_DEFAULT:
9723
        if (value == null) {
9724
          unsetSetDefault();
9725
        } else {
9726
          setSetDefault((Boolean)value);
9727
        }
9728
        break;
9729
 
123 ashish 9730
      }
9731
    }
9732
 
9733
    public void setFieldValue(int fieldID, Object value) {
9734
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9735
    }
9736
 
9737
    public Object getFieldValue(_Fields field) {
9738
      switch (field) {
553 chandransh 9739
      case USER_ID:
9740
        return new Long(getUserId());
123 ashish 9741
 
553 chandransh 9742
      case ADDRESS:
9743
        return getAddress();
123 ashish 9744
 
553 chandransh 9745
      case SET_DEFAULT:
9746
        return new Boolean(isSetDefault());
9747
 
123 ashish 9748
      }
9749
      throw new IllegalStateException();
9750
    }
9751
 
9752
    public Object getFieldValue(int fieldId) {
9753
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9754
    }
9755
 
9756
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9757
    public boolean isSet(_Fields field) {
9758
      switch (field) {
553 chandransh 9759
      case USER_ID:
9760
        return isSetUserId();
9761
      case ADDRESS:
9762
        return isSetAddress();
9763
      case SET_DEFAULT:
9764
        return isSetSetDefault();
123 ashish 9765
      }
9766
      throw new IllegalStateException();
9767
    }
9768
 
9769
    public boolean isSet(int fieldID) {
9770
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9771
    }
9772
 
9773
    @Override
9774
    public boolean equals(Object that) {
9775
      if (that == null)
9776
        return false;
553 chandransh 9777
      if (that instanceof addAddressForUser_args)
9778
        return this.equals((addAddressForUser_args)that);
123 ashish 9779
      return false;
9780
    }
9781
 
553 chandransh 9782
    public boolean equals(addAddressForUser_args that) {
123 ashish 9783
      if (that == null)
9784
        return false;
9785
 
553 chandransh 9786
      boolean this_present_userId = true;
9787
      boolean that_present_userId = true;
9788
      if (this_present_userId || that_present_userId) {
9789
        if (!(this_present_userId && that_present_userId))
123 ashish 9790
          return false;
553 chandransh 9791
        if (this.userId != that.userId)
123 ashish 9792
          return false;
9793
      }
9794
 
553 chandransh 9795
      boolean this_present_address = true && this.isSetAddress();
9796
      boolean that_present_address = true && that.isSetAddress();
9797
      if (this_present_address || that_present_address) {
9798
        if (!(this_present_address && that_present_address))
123 ashish 9799
          return false;
553 chandransh 9800
        if (!this.address.equals(that.address))
123 ashish 9801
          return false;
9802
      }
9803
 
553 chandransh 9804
      boolean this_present_setDefault = true;
9805
      boolean that_present_setDefault = true;
9806
      if (this_present_setDefault || that_present_setDefault) {
9807
        if (!(this_present_setDefault && that_present_setDefault))
9808
          return false;
9809
        if (this.setDefault != that.setDefault)
9810
          return false;
9811
      }
9812
 
123 ashish 9813
      return true;
9814
    }
9815
 
9816
    @Override
9817
    public int hashCode() {
9818
      return 0;
9819
    }
9820
 
553 chandransh 9821
    public int compareTo(addAddressForUser_args other) {
123 ashish 9822
      if (!getClass().equals(other.getClass())) {
9823
        return getClass().getName().compareTo(other.getClass().getName());
9824
      }
9825
 
9826
      int lastComparison = 0;
553 chandransh 9827
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 9828
 
553 chandransh 9829
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 9830
      if (lastComparison != 0) {
9831
        return lastComparison;
9832
      }
553 chandransh 9833
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 9834
      if (lastComparison != 0) {
9835
        return lastComparison;
9836
      }
553 chandransh 9837
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 9838
      if (lastComparison != 0) {
9839
        return lastComparison;
9840
      }
553 chandransh 9841
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 9842
      if (lastComparison != 0) {
9843
        return lastComparison;
9844
      }
553 chandransh 9845
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
9846
      if (lastComparison != 0) {
9847
        return lastComparison;
9848
      }
9849
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
9850
      if (lastComparison != 0) {
9851
        return lastComparison;
9852
      }
123 ashish 9853
      return 0;
9854
    }
9855
 
9856
    public void read(TProtocol iprot) throws TException {
9857
      TField field;
9858
      iprot.readStructBegin();
9859
      while (true)
9860
      {
9861
        field = iprot.readFieldBegin();
9862
        if (field.type == TType.STOP) { 
9863
          break;
9864
        }
9865
        _Fields fieldId = _Fields.findByThriftId(field.id);
9866
        if (fieldId == null) {
9867
          TProtocolUtil.skip(iprot, field.type);
9868
        } else {
9869
          switch (fieldId) {
553 chandransh 9870
            case USER_ID:
9871
              if (field.type == TType.I64) {
9872
                this.userId = iprot.readI64();
9873
                setUserIdIsSet(true);
123 ashish 9874
              } else { 
9875
                TProtocolUtil.skip(iprot, field.type);
9876
              }
9877
              break;
553 chandransh 9878
            case ADDRESS:
9879
              if (field.type == TType.STRUCT) {
9880
                this.address = new Address();
9881
                this.address.read(iprot);
123 ashish 9882
              } else { 
9883
                TProtocolUtil.skip(iprot, field.type);
9884
              }
9885
              break;
553 chandransh 9886
            case SET_DEFAULT:
123 ashish 9887
              if (field.type == TType.BOOL) {
553 chandransh 9888
                this.setDefault = iprot.readBool();
9889
                setSetDefaultIsSet(true);
123 ashish 9890
              } else { 
9891
                TProtocolUtil.skip(iprot, field.type);
9892
              }
9893
              break;
9894
          }
9895
          iprot.readFieldEnd();
9896
        }
9897
      }
9898
      iprot.readStructEnd();
9899
      validate();
9900
    }
9901
 
9902
    public void write(TProtocol oprot) throws TException {
9903
      validate();
9904
 
9905
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9906
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
9907
      oprot.writeI64(this.userId);
9908
      oprot.writeFieldEnd();
9909
      if (this.address != null) {
9910
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
9911
        this.address.write(oprot);
123 ashish 9912
        oprot.writeFieldEnd();
9913
      }
553 chandransh 9914
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
9915
      oprot.writeBool(this.setDefault);
9916
      oprot.writeFieldEnd();
123 ashish 9917
      oprot.writeFieldStop();
9918
      oprot.writeStructEnd();
9919
    }
9920
 
9921
    @Override
9922
    public String toString() {
553 chandransh 9923
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 9924
      boolean first = true;
9925
 
553 chandransh 9926
      sb.append("userId:");
9927
      sb.append(this.userId);
123 ashish 9928
      first = false;
9929
      if (!first) sb.append(", ");
553 chandransh 9930
      sb.append("address:");
9931
      if (this.address == null) {
123 ashish 9932
        sb.append("null");
9933
      } else {
553 chandransh 9934
        sb.append(this.address);
123 ashish 9935
      }
9936
      first = false;
9937
      if (!first) sb.append(", ");
553 chandransh 9938
      sb.append("setDefault:");
9939
      sb.append(this.setDefault);
9940
      first = false;
123 ashish 9941
      sb.append(")");
9942
      return sb.toString();
9943
    }
9944
 
9945
    public void validate() throws TException {
9946
      // check for required fields
9947
    }
9948
 
9949
  }
9950
 
553 chandransh 9951
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
9952
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 9953
 
571 rajveer 9954
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 9955
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 9956
 
571 rajveer 9957
    private long success;
553 chandransh 9958
    private UserContextException ucx;
123 ashish 9959
 
9960
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9961
    public enum _Fields implements TFieldIdEnum {
9962
      SUCCESS((short)0, "success"),
553 chandransh 9963
      UCX((short)1, "ucx");
123 ashish 9964
 
9965
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9966
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9967
 
9968
      static {
9969
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9970
          byId.put((int)field._thriftId, field);
9971
          byName.put(field.getFieldName(), field);
9972
        }
9973
      }
9974
 
9975
      /**
9976
       * Find the _Fields constant that matches fieldId, or null if its not found.
9977
       */
9978
      public static _Fields findByThriftId(int fieldId) {
9979
        return byId.get(fieldId);
9980
      }
9981
 
9982
      /**
9983
       * Find the _Fields constant that matches fieldId, throwing an exception
9984
       * if it is not found.
9985
       */
9986
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9987
        _Fields fields = findByThriftId(fieldId);
9988
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9989
        return fields;
9990
      }
9991
 
9992
      /**
9993
       * Find the _Fields constant that matches name, or null if its not found.
9994
       */
9995
      public static _Fields findByName(String name) {
9996
        return byName.get(name);
9997
      }
9998
 
9999
      private final short _thriftId;
10000
      private final String _fieldName;
10001
 
10002
      _Fields(short thriftId, String fieldName) {
10003
        _thriftId = thriftId;
10004
        _fieldName = fieldName;
10005
      }
10006
 
10007
      public short getThriftFieldId() {
10008
        return _thriftId;
10009
      }
10010
 
10011
      public String getFieldName() {
10012
        return _fieldName;
10013
      }
10014
    }
10015
 
10016
    // isset id assignments
10017
    private static final int __SUCCESS_ISSET_ID = 0;
10018
    private BitSet __isset_bit_vector = new BitSet(1);
10019
 
10020
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10021
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 10022
          new FieldValueMetaData(TType.I64)));
553 chandransh 10023
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 10024
          new FieldValueMetaData(TType.STRUCT)));
10025
    }});
10026
 
10027
    static {
553 chandransh 10028
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 10029
    }
10030
 
553 chandransh 10031
    public addAddressForUser_result() {
123 ashish 10032
    }
10033
 
553 chandransh 10034
    public addAddressForUser_result(
571 rajveer 10035
      long success,
553 chandransh 10036
      UserContextException ucx)
123 ashish 10037
    {
10038
      this();
10039
      this.success = success;
10040
      setSuccessIsSet(true);
553 chandransh 10041
      this.ucx = ucx;
123 ashish 10042
    }
10043
 
10044
    /**
10045
     * Performs a deep copy on <i>other</i>.
10046
     */
553 chandransh 10047
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 10048
      __isset_bit_vector.clear();
10049
      __isset_bit_vector.or(other.__isset_bit_vector);
10050
      this.success = other.success;
553 chandransh 10051
      if (other.isSetUcx()) {
10052
        this.ucx = new UserContextException(other.ucx);
123 ashish 10053
      }
10054
    }
10055
 
553 chandransh 10056
    public addAddressForUser_result deepCopy() {
10057
      return new addAddressForUser_result(this);
123 ashish 10058
    }
10059
 
10060
    @Deprecated
553 chandransh 10061
    public addAddressForUser_result clone() {
10062
      return new addAddressForUser_result(this);
123 ashish 10063
    }
10064
 
571 rajveer 10065
    public long getSuccess() {
123 ashish 10066
      return this.success;
10067
    }
10068
 
571 rajveer 10069
    public addAddressForUser_result setSuccess(long success) {
123 ashish 10070
      this.success = success;
10071
      setSuccessIsSet(true);
10072
      return this;
10073
    }
10074
 
10075
    public void unsetSuccess() {
10076
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10077
    }
10078
 
10079
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10080
    public boolean isSetSuccess() {
10081
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10082
    }
10083
 
10084
    public void setSuccessIsSet(boolean value) {
10085
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10086
    }
10087
 
553 chandransh 10088
    public UserContextException getUcx() {
10089
      return this.ucx;
123 ashish 10090
    }
10091
 
553 chandransh 10092
    public addAddressForUser_result setUcx(UserContextException ucx) {
10093
      this.ucx = ucx;
123 ashish 10094
      return this;
10095
    }
10096
 
553 chandransh 10097
    public void unsetUcx() {
10098
      this.ucx = null;
123 ashish 10099
    }
10100
 
553 chandransh 10101
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10102
    public boolean isSetUcx() {
10103
      return this.ucx != null;
123 ashish 10104
    }
10105
 
553 chandransh 10106
    public void setUcxIsSet(boolean value) {
123 ashish 10107
      if (!value) {
553 chandransh 10108
        this.ucx = null;
123 ashish 10109
      }
10110
    }
10111
 
10112
    public void setFieldValue(_Fields field, Object value) {
10113
      switch (field) {
10114
      case SUCCESS:
10115
        if (value == null) {
10116
          unsetSuccess();
10117
        } else {
571 rajveer 10118
          setSuccess((Long)value);
123 ashish 10119
        }
10120
        break;
10121
 
553 chandransh 10122
      case UCX:
123 ashish 10123
        if (value == null) {
553 chandransh 10124
          unsetUcx();
123 ashish 10125
        } else {
553 chandransh 10126
          setUcx((UserContextException)value);
123 ashish 10127
        }
10128
        break;
10129
 
10130
      }
10131
    }
10132
 
10133
    public void setFieldValue(int fieldID, Object value) {
10134
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10135
    }
10136
 
10137
    public Object getFieldValue(_Fields field) {
10138
      switch (field) {
10139
      case SUCCESS:
571 rajveer 10140
        return new Long(getSuccess());
123 ashish 10141
 
553 chandransh 10142
      case UCX:
10143
        return getUcx();
123 ashish 10144
 
10145
      }
10146
      throw new IllegalStateException();
10147
    }
10148
 
10149
    public Object getFieldValue(int fieldId) {
10150
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10151
    }
10152
 
10153
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10154
    public boolean isSet(_Fields field) {
10155
      switch (field) {
10156
      case SUCCESS:
10157
        return isSetSuccess();
553 chandransh 10158
      case UCX:
10159
        return isSetUcx();
123 ashish 10160
      }
10161
      throw new IllegalStateException();
10162
    }
10163
 
10164
    public boolean isSet(int fieldID) {
10165
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10166
    }
10167
 
10168
    @Override
10169
    public boolean equals(Object that) {
10170
      if (that == null)
10171
        return false;
553 chandransh 10172
      if (that instanceof addAddressForUser_result)
10173
        return this.equals((addAddressForUser_result)that);
123 ashish 10174
      return false;
10175
    }
10176
 
553 chandransh 10177
    public boolean equals(addAddressForUser_result that) {
123 ashish 10178
      if (that == null)
10179
        return false;
10180
 
10181
      boolean this_present_success = true;
10182
      boolean that_present_success = true;
10183
      if (this_present_success || that_present_success) {
10184
        if (!(this_present_success && that_present_success))
10185
          return false;
10186
        if (this.success != that.success)
10187
          return false;
10188
      }
10189
 
553 chandransh 10190
      boolean this_present_ucx = true && this.isSetUcx();
10191
      boolean that_present_ucx = true && that.isSetUcx();
10192
      if (this_present_ucx || that_present_ucx) {
10193
        if (!(this_present_ucx && that_present_ucx))
123 ashish 10194
          return false;
553 chandransh 10195
        if (!this.ucx.equals(that.ucx))
123 ashish 10196
          return false;
10197
      }
10198
 
10199
      return true;
10200
    }
10201
 
10202
    @Override
10203
    public int hashCode() {
10204
      return 0;
10205
    }
10206
 
553 chandransh 10207
    public int compareTo(addAddressForUser_result other) {
123 ashish 10208
      if (!getClass().equals(other.getClass())) {
10209
        return getClass().getName().compareTo(other.getClass().getName());
10210
      }
10211
 
10212
      int lastComparison = 0;
553 chandransh 10213
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 10214
 
10215
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10216
      if (lastComparison != 0) {
10217
        return lastComparison;
10218
      }
10219
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10220
      if (lastComparison != 0) {
10221
        return lastComparison;
10222
      }
553 chandransh 10223
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 10224
      if (lastComparison != 0) {
10225
        return lastComparison;
10226
      }
553 chandransh 10227
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 10228
      if (lastComparison != 0) {
10229
        return lastComparison;
10230
      }
10231
      return 0;
10232
    }
10233
 
10234
    public void read(TProtocol iprot) throws TException {
10235
      TField field;
10236
      iprot.readStructBegin();
10237
      while (true)
10238
      {
10239
        field = iprot.readFieldBegin();
10240
        if (field.type == TType.STOP) { 
10241
          break;
10242
        }
10243
        _Fields fieldId = _Fields.findByThriftId(field.id);
10244
        if (fieldId == null) {
10245
          TProtocolUtil.skip(iprot, field.type);
10246
        } else {
10247
          switch (fieldId) {
10248
            case SUCCESS:
571 rajveer 10249
              if (field.type == TType.I64) {
10250
                this.success = iprot.readI64();
123 ashish 10251
                setSuccessIsSet(true);
10252
              } else { 
10253
                TProtocolUtil.skip(iprot, field.type);
10254
              }
10255
              break;
553 chandransh 10256
            case UCX:
123 ashish 10257
              if (field.type == TType.STRUCT) {
553 chandransh 10258
                this.ucx = new UserContextException();
10259
                this.ucx.read(iprot);
123 ashish 10260
              } else { 
10261
                TProtocolUtil.skip(iprot, field.type);
10262
              }
10263
              break;
10264
          }
10265
          iprot.readFieldEnd();
10266
        }
10267
      }
10268
      iprot.readStructEnd();
10269
      validate();
10270
    }
10271
 
10272
    public void write(TProtocol oprot) throws TException {
10273
      oprot.writeStructBegin(STRUCT_DESC);
10274
 
10275
      if (this.isSetSuccess()) {
10276
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 10277
        oprot.writeI64(this.success);
123 ashish 10278
        oprot.writeFieldEnd();
553 chandransh 10279
      } else if (this.isSetUcx()) {
10280
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10281
        this.ucx.write(oprot);
123 ashish 10282
        oprot.writeFieldEnd();
10283
      }
10284
      oprot.writeFieldStop();
10285
      oprot.writeStructEnd();
10286
    }
10287
 
10288
    @Override
10289
    public String toString() {
553 chandransh 10290
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 10291
      boolean first = true;
10292
 
10293
      sb.append("success:");
10294
      sb.append(this.success);
10295
      first = false;
10296
      if (!first) sb.append(", ");
553 chandransh 10297
      sb.append("ucx:");
10298
      if (this.ucx == null) {
123 ashish 10299
        sb.append("null");
10300
      } else {
553 chandransh 10301
        sb.append(this.ucx);
123 ashish 10302
      }
10303
      first = false;
10304
      sb.append(")");
10305
      return sb.toString();
10306
    }
10307
 
10308
    public void validate() throws TException {
10309
      // check for required fields
10310
    }
10311
 
10312
  }
10313
 
553 chandransh 10314
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
10315
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 10316
 
553 chandransh 10317
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10318
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 10319
 
553 chandransh 10320
    private long userid;
10321
    private long addressId;
48 ashish 10322
 
10323
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10324
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10325
      USERID((short)1, "userid"),
10326
      ADDRESS_ID((short)2, "addressId");
48 ashish 10327
 
10328
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10329
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10330
 
10331
      static {
10332
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10333
          byId.put((int)field._thriftId, field);
10334
          byName.put(field.getFieldName(), field);
10335
        }
10336
      }
10337
 
10338
      /**
10339
       * Find the _Fields constant that matches fieldId, or null if its not found.
10340
       */
10341
      public static _Fields findByThriftId(int fieldId) {
10342
        return byId.get(fieldId);
10343
      }
10344
 
10345
      /**
10346
       * Find the _Fields constant that matches fieldId, throwing an exception
10347
       * if it is not found.
10348
       */
10349
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10350
        _Fields fields = findByThriftId(fieldId);
10351
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10352
        return fields;
10353
      }
10354
 
10355
      /**
10356
       * Find the _Fields constant that matches name, or null if its not found.
10357
       */
10358
      public static _Fields findByName(String name) {
10359
        return byName.get(name);
10360
      }
10361
 
10362
      private final short _thriftId;
10363
      private final String _fieldName;
10364
 
10365
      _Fields(short thriftId, String fieldName) {
10366
        _thriftId = thriftId;
10367
        _fieldName = fieldName;
10368
      }
10369
 
10370
      public short getThriftFieldId() {
10371
        return _thriftId;
10372
      }
10373
 
10374
      public String getFieldName() {
10375
        return _fieldName;
10376
      }
10377
    }
10378
 
10379
    // isset id assignments
553 chandransh 10380
    private static final int __USERID_ISSET_ID = 0;
10381
    private static final int __ADDRESSID_ISSET_ID = 1;
10382
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10383
 
10384
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10385
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10386
          new FieldValueMetaData(TType.I64)));
10387
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
10388
          new FieldValueMetaData(TType.I64)));
48 ashish 10389
    }});
10390
 
10391
    static {
553 chandransh 10392
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 10393
    }
10394
 
553 chandransh 10395
    public removeAddressForUser_args() {
48 ashish 10396
    }
10397
 
553 chandransh 10398
    public removeAddressForUser_args(
10399
      long userid,
10400
      long addressId)
48 ashish 10401
    {
10402
      this();
553 chandransh 10403
      this.userid = userid;
10404
      setUseridIsSet(true);
10405
      this.addressId = addressId;
10406
      setAddressIdIsSet(true);
48 ashish 10407
    }
10408
 
10409
    /**
10410
     * Performs a deep copy on <i>other</i>.
10411
     */
553 chandransh 10412
    public removeAddressForUser_args(removeAddressForUser_args other) {
10413
      __isset_bit_vector.clear();
10414
      __isset_bit_vector.or(other.__isset_bit_vector);
10415
      this.userid = other.userid;
10416
      this.addressId = other.addressId;
48 ashish 10417
    }
10418
 
553 chandransh 10419
    public removeAddressForUser_args deepCopy() {
10420
      return new removeAddressForUser_args(this);
48 ashish 10421
    }
10422
 
10423
    @Deprecated
553 chandransh 10424
    public removeAddressForUser_args clone() {
10425
      return new removeAddressForUser_args(this);
48 ashish 10426
    }
10427
 
553 chandransh 10428
    public long getUserid() {
10429
      return this.userid;
48 ashish 10430
    }
10431
 
553 chandransh 10432
    public removeAddressForUser_args setUserid(long userid) {
10433
      this.userid = userid;
10434
      setUseridIsSet(true);
48 ashish 10435
      return this;
10436
    }
10437
 
553 chandransh 10438
    public void unsetUserid() {
10439
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10440
    }
10441
 
553 chandransh 10442
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10443
    public boolean isSetUserid() {
10444
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10445
    }
10446
 
553 chandransh 10447
    public void setUseridIsSet(boolean value) {
10448
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10449
    }
10450
 
553 chandransh 10451
    public long getAddressId() {
10452
      return this.addressId;
10453
    }
10454
 
10455
    public removeAddressForUser_args setAddressId(long addressId) {
10456
      this.addressId = addressId;
10457
      setAddressIdIsSet(true);
10458
      return this;
10459
    }
10460
 
10461
    public void unsetAddressId() {
10462
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
10463
    }
10464
 
10465
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
10466
    public boolean isSetAddressId() {
10467
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
10468
    }
10469
 
10470
    public void setAddressIdIsSet(boolean value) {
10471
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
10472
    }
10473
 
48 ashish 10474
    public void setFieldValue(_Fields field, Object value) {
10475
      switch (field) {
553 chandransh 10476
      case USERID:
48 ashish 10477
        if (value == null) {
553 chandransh 10478
          unsetUserid();
48 ashish 10479
        } else {
553 chandransh 10480
          setUserid((Long)value);
48 ashish 10481
        }
10482
        break;
10483
 
553 chandransh 10484
      case ADDRESS_ID:
10485
        if (value == null) {
10486
          unsetAddressId();
10487
        } else {
10488
          setAddressId((Long)value);
10489
        }
10490
        break;
10491
 
48 ashish 10492
      }
10493
    }
10494
 
10495
    public void setFieldValue(int fieldID, Object value) {
10496
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10497
    }
10498
 
10499
    public Object getFieldValue(_Fields field) {
10500
      switch (field) {
553 chandransh 10501
      case USERID:
10502
        return new Long(getUserid());
48 ashish 10503
 
553 chandransh 10504
      case ADDRESS_ID:
10505
        return new Long(getAddressId());
10506
 
48 ashish 10507
      }
10508
      throw new IllegalStateException();
10509
    }
10510
 
10511
    public Object getFieldValue(int fieldId) {
10512
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10513
    }
10514
 
10515
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10516
    public boolean isSet(_Fields field) {
10517
      switch (field) {
553 chandransh 10518
      case USERID:
10519
        return isSetUserid();
10520
      case ADDRESS_ID:
10521
        return isSetAddressId();
48 ashish 10522
      }
10523
      throw new IllegalStateException();
10524
    }
10525
 
10526
    public boolean isSet(int fieldID) {
10527
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10528
    }
10529
 
10530
    @Override
10531
    public boolean equals(Object that) {
10532
      if (that == null)
10533
        return false;
553 chandransh 10534
      if (that instanceof removeAddressForUser_args)
10535
        return this.equals((removeAddressForUser_args)that);
48 ashish 10536
      return false;
10537
    }
10538
 
553 chandransh 10539
    public boolean equals(removeAddressForUser_args that) {
48 ashish 10540
      if (that == null)
10541
        return false;
10542
 
553 chandransh 10543
      boolean this_present_userid = true;
10544
      boolean that_present_userid = true;
10545
      if (this_present_userid || that_present_userid) {
10546
        if (!(this_present_userid && that_present_userid))
48 ashish 10547
          return false;
553 chandransh 10548
        if (this.userid != that.userid)
48 ashish 10549
          return false;
10550
      }
10551
 
553 chandransh 10552
      boolean this_present_addressId = true;
10553
      boolean that_present_addressId = true;
10554
      if (this_present_addressId || that_present_addressId) {
10555
        if (!(this_present_addressId && that_present_addressId))
10556
          return false;
10557
        if (this.addressId != that.addressId)
10558
          return false;
10559
      }
10560
 
48 ashish 10561
      return true;
10562
    }
10563
 
10564
    @Override
10565
    public int hashCode() {
10566
      return 0;
10567
    }
10568
 
553 chandransh 10569
    public int compareTo(removeAddressForUser_args other) {
48 ashish 10570
      if (!getClass().equals(other.getClass())) {
10571
        return getClass().getName().compareTo(other.getClass().getName());
10572
      }
10573
 
10574
      int lastComparison = 0;
553 chandransh 10575
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 10576
 
553 chandransh 10577
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 10578
      if (lastComparison != 0) {
10579
        return lastComparison;
10580
      }
553 chandransh 10581
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 10582
      if (lastComparison != 0) {
10583
        return lastComparison;
10584
      }
553 chandransh 10585
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
10586
      if (lastComparison != 0) {
10587
        return lastComparison;
10588
      }
10589
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
10590
      if (lastComparison != 0) {
10591
        return lastComparison;
10592
      }
48 ashish 10593
      return 0;
10594
    }
10595
 
10596
    public void read(TProtocol iprot) throws TException {
10597
      TField field;
10598
      iprot.readStructBegin();
10599
      while (true)
10600
      {
10601
        field = iprot.readFieldBegin();
10602
        if (field.type == TType.STOP) { 
10603
          break;
10604
        }
10605
        _Fields fieldId = _Fields.findByThriftId(field.id);
10606
        if (fieldId == null) {
10607
          TProtocolUtil.skip(iprot, field.type);
10608
        } else {
10609
          switch (fieldId) {
553 chandransh 10610
            case USERID:
10611
              if (field.type == TType.I64) {
10612
                this.userid = iprot.readI64();
10613
                setUseridIsSet(true);
48 ashish 10614
              } else { 
10615
                TProtocolUtil.skip(iprot, field.type);
10616
              }
10617
              break;
553 chandransh 10618
            case ADDRESS_ID:
10619
              if (field.type == TType.I64) {
10620
                this.addressId = iprot.readI64();
10621
                setAddressIdIsSet(true);
10622
              } else { 
10623
                TProtocolUtil.skip(iprot, field.type);
10624
              }
10625
              break;
48 ashish 10626
          }
10627
          iprot.readFieldEnd();
10628
        }
10629
      }
10630
      iprot.readStructEnd();
10631
      validate();
10632
    }
10633
 
10634
    public void write(TProtocol oprot) throws TException {
10635
      validate();
10636
 
10637
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10638
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10639
      oprot.writeI64(this.userid);
10640
      oprot.writeFieldEnd();
10641
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
10642
      oprot.writeI64(this.addressId);
10643
      oprot.writeFieldEnd();
48 ashish 10644
      oprot.writeFieldStop();
10645
      oprot.writeStructEnd();
10646
    }
10647
 
10648
    @Override
10649
    public String toString() {
553 chandransh 10650
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 10651
      boolean first = true;
10652
 
553 chandransh 10653
      sb.append("userid:");
10654
      sb.append(this.userid);
48 ashish 10655
      first = false;
553 chandransh 10656
      if (!first) sb.append(", ");
10657
      sb.append("addressId:");
10658
      sb.append(this.addressId);
10659
      first = false;
48 ashish 10660
      sb.append(")");
10661
      return sb.toString();
10662
    }
10663
 
10664
    public void validate() throws TException {
10665
      // check for required fields
10666
    }
10667
 
10668
  }
10669
 
553 chandransh 10670
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
10671
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 10672
 
10673
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10674
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10675
 
10676
    private boolean success;
10677
    private UserContextException ucx;
10678
 
10679
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10680
    public enum _Fields implements TFieldIdEnum {
10681
      SUCCESS((short)0, "success"),
10682
      UCX((short)1, "ucx");
10683
 
10684
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10685
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10686
 
10687
      static {
10688
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10689
          byId.put((int)field._thriftId, field);
10690
          byName.put(field.getFieldName(), field);
10691
        }
10692
      }
10693
 
10694
      /**
10695
       * Find the _Fields constant that matches fieldId, or null if its not found.
10696
       */
10697
      public static _Fields findByThriftId(int fieldId) {
10698
        return byId.get(fieldId);
10699
      }
10700
 
10701
      /**
10702
       * Find the _Fields constant that matches fieldId, throwing an exception
10703
       * if it is not found.
10704
       */
10705
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10706
        _Fields fields = findByThriftId(fieldId);
10707
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10708
        return fields;
10709
      }
10710
 
10711
      /**
10712
       * Find the _Fields constant that matches name, or null if its not found.
10713
       */
10714
      public static _Fields findByName(String name) {
10715
        return byName.get(name);
10716
      }
10717
 
10718
      private final short _thriftId;
10719
      private final String _fieldName;
10720
 
10721
      _Fields(short thriftId, String fieldName) {
10722
        _thriftId = thriftId;
10723
        _fieldName = fieldName;
10724
      }
10725
 
10726
      public short getThriftFieldId() {
10727
        return _thriftId;
10728
      }
10729
 
10730
      public String getFieldName() {
10731
        return _fieldName;
10732
      }
10733
    }
10734
 
10735
    // isset id assignments
10736
    private static final int __SUCCESS_ISSET_ID = 0;
10737
    private BitSet __isset_bit_vector = new BitSet(1);
10738
 
10739
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10740
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10741
          new FieldValueMetaData(TType.BOOL)));
10742
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10743
          new FieldValueMetaData(TType.STRUCT)));
10744
    }});
10745
 
10746
    static {
553 chandransh 10747
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 10748
    }
10749
 
553 chandransh 10750
    public removeAddressForUser_result() {
48 ashish 10751
    }
10752
 
553 chandransh 10753
    public removeAddressForUser_result(
48 ashish 10754
      boolean success,
10755
      UserContextException ucx)
10756
    {
10757
      this();
10758
      this.success = success;
10759
      setSuccessIsSet(true);
10760
      this.ucx = ucx;
10761
    }
10762
 
10763
    /**
10764
     * Performs a deep copy on <i>other</i>.
10765
     */
553 chandransh 10766
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 10767
      __isset_bit_vector.clear();
10768
      __isset_bit_vector.or(other.__isset_bit_vector);
10769
      this.success = other.success;
10770
      if (other.isSetUcx()) {
10771
        this.ucx = new UserContextException(other.ucx);
10772
      }
10773
    }
10774
 
553 chandransh 10775
    public removeAddressForUser_result deepCopy() {
10776
      return new removeAddressForUser_result(this);
48 ashish 10777
    }
10778
 
10779
    @Deprecated
553 chandransh 10780
    public removeAddressForUser_result clone() {
10781
      return new removeAddressForUser_result(this);
48 ashish 10782
    }
10783
 
10784
    public boolean isSuccess() {
10785
      return this.success;
10786
    }
10787
 
553 chandransh 10788
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 10789
      this.success = success;
10790
      setSuccessIsSet(true);
10791
      return this;
10792
    }
10793
 
10794
    public void unsetSuccess() {
10795
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10796
    }
10797
 
10798
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10799
    public boolean isSetSuccess() {
10800
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10801
    }
10802
 
10803
    public void setSuccessIsSet(boolean value) {
10804
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10805
    }
10806
 
10807
    public UserContextException getUcx() {
10808
      return this.ucx;
10809
    }
10810
 
553 chandransh 10811
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 10812
      this.ucx = ucx;
10813
      return this;
10814
    }
10815
 
10816
    public void unsetUcx() {
10817
      this.ucx = null;
10818
    }
10819
 
10820
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10821
    public boolean isSetUcx() {
10822
      return this.ucx != null;
10823
    }
10824
 
10825
    public void setUcxIsSet(boolean value) {
10826
      if (!value) {
10827
        this.ucx = null;
10828
      }
10829
    }
10830
 
10831
    public void setFieldValue(_Fields field, Object value) {
10832
      switch (field) {
10833
      case SUCCESS:
10834
        if (value == null) {
10835
          unsetSuccess();
10836
        } else {
10837
          setSuccess((Boolean)value);
10838
        }
10839
        break;
10840
 
10841
      case UCX:
10842
        if (value == null) {
10843
          unsetUcx();
10844
        } else {
10845
          setUcx((UserContextException)value);
10846
        }
10847
        break;
10848
 
10849
      }
10850
    }
10851
 
10852
    public void setFieldValue(int fieldID, Object value) {
10853
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10854
    }
10855
 
10856
    public Object getFieldValue(_Fields field) {
10857
      switch (field) {
10858
      case SUCCESS:
10859
        return new Boolean(isSuccess());
10860
 
10861
      case UCX:
10862
        return getUcx();
10863
 
10864
      }
10865
      throw new IllegalStateException();
10866
    }
10867
 
10868
    public Object getFieldValue(int fieldId) {
10869
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10870
    }
10871
 
10872
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10873
    public boolean isSet(_Fields field) {
10874
      switch (field) {
10875
      case SUCCESS:
10876
        return isSetSuccess();
10877
      case UCX:
10878
        return isSetUcx();
10879
      }
10880
      throw new IllegalStateException();
10881
    }
10882
 
10883
    public boolean isSet(int fieldID) {
10884
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10885
    }
10886
 
10887
    @Override
10888
    public boolean equals(Object that) {
10889
      if (that == null)
10890
        return false;
553 chandransh 10891
      if (that instanceof removeAddressForUser_result)
10892
        return this.equals((removeAddressForUser_result)that);
48 ashish 10893
      return false;
10894
    }
10895
 
553 chandransh 10896
    public boolean equals(removeAddressForUser_result that) {
48 ashish 10897
      if (that == null)
10898
        return false;
10899
 
10900
      boolean this_present_success = true;
10901
      boolean that_present_success = true;
10902
      if (this_present_success || that_present_success) {
10903
        if (!(this_present_success && that_present_success))
10904
          return false;
10905
        if (this.success != that.success)
10906
          return false;
10907
      }
10908
 
10909
      boolean this_present_ucx = true && this.isSetUcx();
10910
      boolean that_present_ucx = true && that.isSetUcx();
10911
      if (this_present_ucx || that_present_ucx) {
10912
        if (!(this_present_ucx && that_present_ucx))
10913
          return false;
10914
        if (!this.ucx.equals(that.ucx))
10915
          return false;
10916
      }
10917
 
10918
      return true;
10919
    }
10920
 
10921
    @Override
10922
    public int hashCode() {
10923
      return 0;
10924
    }
10925
 
553 chandransh 10926
    public int compareTo(removeAddressForUser_result other) {
48 ashish 10927
      if (!getClass().equals(other.getClass())) {
10928
        return getClass().getName().compareTo(other.getClass().getName());
10929
      }
10930
 
10931
      int lastComparison = 0;
553 chandransh 10932
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 10933
 
10934
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10935
      if (lastComparison != 0) {
10936
        return lastComparison;
10937
      }
10938
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10939
      if (lastComparison != 0) {
10940
        return lastComparison;
10941
      }
10942
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10943
      if (lastComparison != 0) {
10944
        return lastComparison;
10945
      }
10946
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10947
      if (lastComparison != 0) {
10948
        return lastComparison;
10949
      }
10950
      return 0;
10951
    }
10952
 
10953
    public void read(TProtocol iprot) throws TException {
10954
      TField field;
10955
      iprot.readStructBegin();
10956
      while (true)
10957
      {
10958
        field = iprot.readFieldBegin();
10959
        if (field.type == TType.STOP) { 
10960
          break;
10961
        }
10962
        _Fields fieldId = _Fields.findByThriftId(field.id);
10963
        if (fieldId == null) {
10964
          TProtocolUtil.skip(iprot, field.type);
10965
        } else {
10966
          switch (fieldId) {
10967
            case SUCCESS:
10968
              if (field.type == TType.BOOL) {
10969
                this.success = iprot.readBool();
10970
                setSuccessIsSet(true);
10971
              } else { 
10972
                TProtocolUtil.skip(iprot, field.type);
10973
              }
10974
              break;
10975
            case UCX:
10976
              if (field.type == TType.STRUCT) {
10977
                this.ucx = new UserContextException();
10978
                this.ucx.read(iprot);
10979
              } else { 
10980
                TProtocolUtil.skip(iprot, field.type);
10981
              }
10982
              break;
10983
          }
10984
          iprot.readFieldEnd();
10985
        }
10986
      }
10987
      iprot.readStructEnd();
10988
      validate();
10989
    }
10990
 
10991
    public void write(TProtocol oprot) throws TException {
10992
      oprot.writeStructBegin(STRUCT_DESC);
10993
 
10994
      if (this.isSetSuccess()) {
10995
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10996
        oprot.writeBool(this.success);
10997
        oprot.writeFieldEnd();
10998
      } else if (this.isSetUcx()) {
10999
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11000
        this.ucx.write(oprot);
11001
        oprot.writeFieldEnd();
11002
      }
11003
      oprot.writeFieldStop();
11004
      oprot.writeStructEnd();
11005
    }
11006
 
11007
    @Override
11008
    public String toString() {
553 chandransh 11009
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 11010
      boolean first = true;
11011
 
11012
      sb.append("success:");
11013
      sb.append(this.success);
11014
      first = false;
11015
      if (!first) sb.append(", ");
11016
      sb.append("ucx:");
11017
      if (this.ucx == null) {
11018
        sb.append("null");
11019
      } else {
11020
        sb.append(this.ucx);
11021
      }
11022
      first = false;
11023
      sb.append(")");
11024
      return sb.toString();
11025
    }
11026
 
11027
    public void validate() throws TException {
11028
      // check for required fields
11029
    }
11030
 
11031
  }
11032
 
553 chandransh 11033
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
11034
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 11035
 
553 chandransh 11036
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 11037
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
11038
 
553 chandransh 11039
    private long userId;
48 ashish 11040
    private long timestamp;
11041
 
11042
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11043
    public enum _Fields implements TFieldIdEnum {
553 chandransh 11044
      USER_ID((short)1, "userId"),
11045
      TIMESTAMP((short)2, "timestamp");
48 ashish 11046
 
11047
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11048
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11049
 
11050
      static {
11051
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11052
          byId.put((int)field._thriftId, field);
11053
          byName.put(field.getFieldName(), field);
11054
        }
11055
      }
11056
 
11057
      /**
11058
       * Find the _Fields constant that matches fieldId, or null if its not found.
11059
       */
11060
      public static _Fields findByThriftId(int fieldId) {
11061
        return byId.get(fieldId);
11062
      }
11063
 
11064
      /**
11065
       * Find the _Fields constant that matches fieldId, throwing an exception
11066
       * if it is not found.
11067
       */
11068
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11069
        _Fields fields = findByThriftId(fieldId);
11070
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11071
        return fields;
11072
      }
11073
 
11074
      /**
11075
       * Find the _Fields constant that matches name, or null if its not found.
11076
       */
11077
      public static _Fields findByName(String name) {
11078
        return byName.get(name);
11079
      }
11080
 
11081
      private final short _thriftId;
11082
      private final String _fieldName;
11083
 
11084
      _Fields(short thriftId, String fieldName) {
11085
        _thriftId = thriftId;
11086
        _fieldName = fieldName;
11087
      }
11088
 
11089
      public short getThriftFieldId() {
11090
        return _thriftId;
11091
      }
11092
 
11093
      public String getFieldName() {
11094
        return _fieldName;
11095
      }
11096
    }
11097
 
11098
    // isset id assignments
553 chandransh 11099
    private static final int __USERID_ISSET_ID = 0;
11100
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 11101
    private BitSet __isset_bit_vector = new BitSet(2);
11102
 
11103
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 11104
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
11105
          new FieldValueMetaData(TType.I64)));
48 ashish 11106
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11107
          new FieldValueMetaData(TType.I64)));
11108
    }});
11109
 
11110
    static {
553 chandransh 11111
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 11112
    }
11113
 
553 chandransh 11114
    public setUserAsLoggedIn_args() {
48 ashish 11115
    }
11116
 
553 chandransh 11117
    public setUserAsLoggedIn_args(
11118
      long userId,
11119
      long timestamp)
48 ashish 11120
    {
11121
      this();
553 chandransh 11122
      this.userId = userId;
11123
      setUserIdIsSet(true);
48 ashish 11124
      this.timestamp = timestamp;
11125
      setTimestampIsSet(true);
11126
    }
11127
 
11128
    /**
11129
     * Performs a deep copy on <i>other</i>.
11130
     */
553 chandransh 11131
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 11132
      __isset_bit_vector.clear();
11133
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 11134
      this.userId = other.userId;
48 ashish 11135
      this.timestamp = other.timestamp;
11136
    }
11137
 
553 chandransh 11138
    public setUserAsLoggedIn_args deepCopy() {
11139
      return new setUserAsLoggedIn_args(this);
48 ashish 11140
    }
11141
 
11142
    @Deprecated
553 chandransh 11143
    public setUserAsLoggedIn_args clone() {
11144
      return new setUserAsLoggedIn_args(this);
48 ashish 11145
    }
11146
 
553 chandransh 11147
    public long getUserId() {
11148
      return this.userId;
48 ashish 11149
    }
11150
 
553 chandransh 11151
    public setUserAsLoggedIn_args setUserId(long userId) {
11152
      this.userId = userId;
11153
      setUserIdIsSet(true);
48 ashish 11154
      return this;
11155
    }
11156
 
553 chandransh 11157
    public void unsetUserId() {
11158
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 11159
    }
11160
 
553 chandransh 11161
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
11162
    public boolean isSetUserId() {
11163
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 11164
    }
11165
 
553 chandransh 11166
    public void setUserIdIsSet(boolean value) {
11167
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 11168
    }
11169
 
11170
    public long getTimestamp() {
11171
      return this.timestamp;
11172
    }
11173
 
553 chandransh 11174
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 11175
      this.timestamp = timestamp;
11176
      setTimestampIsSet(true);
11177
      return this;
11178
    }
11179
 
11180
    public void unsetTimestamp() {
11181
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11182
    }
11183
 
11184
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11185
    public boolean isSetTimestamp() {
11186
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11187
    }
11188
 
11189
    public void setTimestampIsSet(boolean value) {
11190
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11191
    }
11192
 
11193
    public void setFieldValue(_Fields field, Object value) {
11194
      switch (field) {
553 chandransh 11195
      case USER_ID:
48 ashish 11196
        if (value == null) {
553 chandransh 11197
          unsetUserId();
48 ashish 11198
        } else {
553 chandransh 11199
          setUserId((Long)value);
48 ashish 11200
        }
11201
        break;
11202
 
11203
      case TIMESTAMP:
11204
        if (value == null) {
11205
          unsetTimestamp();
11206
        } else {
11207
          setTimestamp((Long)value);
11208
        }
11209
        break;
11210
 
11211
      }
11212
    }
11213
 
11214
    public void setFieldValue(int fieldID, Object value) {
11215
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11216
    }
11217
 
11218
    public Object getFieldValue(_Fields field) {
11219
      switch (field) {
553 chandransh 11220
      case USER_ID:
11221
        return new Long(getUserId());
48 ashish 11222
 
11223
      case TIMESTAMP:
11224
        return new Long(getTimestamp());
11225
 
11226
      }
11227
      throw new IllegalStateException();
11228
    }
11229
 
11230
    public Object getFieldValue(int fieldId) {
11231
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11232
    }
11233
 
11234
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11235
    public boolean isSet(_Fields field) {
11236
      switch (field) {
553 chandransh 11237
      case USER_ID:
11238
        return isSetUserId();
48 ashish 11239
      case TIMESTAMP:
11240
        return isSetTimestamp();
11241
      }
11242
      throw new IllegalStateException();
11243
    }
11244
 
11245
    public boolean isSet(int fieldID) {
11246
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11247
    }
11248
 
11249
    @Override
11250
    public boolean equals(Object that) {
11251
      if (that == null)
11252
        return false;
553 chandransh 11253
      if (that instanceof setUserAsLoggedIn_args)
11254
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 11255
      return false;
11256
    }
11257
 
553 chandransh 11258
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 11259
      if (that == null)
11260
        return false;
11261
 
553 chandransh 11262
      boolean this_present_userId = true;
11263
      boolean that_present_userId = true;
11264
      if (this_present_userId || that_present_userId) {
11265
        if (!(this_present_userId && that_present_userId))
48 ashish 11266
          return false;
553 chandransh 11267
        if (this.userId != that.userId)
48 ashish 11268
          return false;
11269
      }
11270
 
11271
      boolean this_present_timestamp = true;
11272
      boolean that_present_timestamp = true;
11273
      if (this_present_timestamp || that_present_timestamp) {
11274
        if (!(this_present_timestamp && that_present_timestamp))
11275
          return false;
11276
        if (this.timestamp != that.timestamp)
11277
          return false;
11278
      }
11279
 
11280
      return true;
11281
    }
11282
 
11283
    @Override
11284
    public int hashCode() {
11285
      return 0;
11286
    }
11287
 
553 chandransh 11288
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 11289
      if (!getClass().equals(other.getClass())) {
11290
        return getClass().getName().compareTo(other.getClass().getName());
11291
      }
11292
 
11293
      int lastComparison = 0;
553 chandransh 11294
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 11295
 
553 chandransh 11296
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 11297
      if (lastComparison != 0) {
11298
        return lastComparison;
11299
      }
553 chandransh 11300
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 11301
      if (lastComparison != 0) {
11302
        return lastComparison;
11303
      }
11304
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11305
      if (lastComparison != 0) {
11306
        return lastComparison;
11307
      }
11308
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11309
      if (lastComparison != 0) {
11310
        return lastComparison;
11311
      }
11312
      return 0;
11313
    }
11314
 
11315
    public void read(TProtocol iprot) throws TException {
11316
      TField field;
11317
      iprot.readStructBegin();
11318
      while (true)
11319
      {
11320
        field = iprot.readFieldBegin();
11321
        if (field.type == TType.STOP) { 
11322
          break;
11323
        }
11324
        _Fields fieldId = _Fields.findByThriftId(field.id);
11325
        if (fieldId == null) {
11326
          TProtocolUtil.skip(iprot, field.type);
11327
        } else {
11328
          switch (fieldId) {
553 chandransh 11329
            case USER_ID:
11330
              if (field.type == TType.I64) {
11331
                this.userId = iprot.readI64();
11332
                setUserIdIsSet(true);
48 ashish 11333
              } else { 
11334
                TProtocolUtil.skip(iprot, field.type);
11335
              }
11336
              break;
11337
            case TIMESTAMP:
11338
              if (field.type == TType.I64) {
11339
                this.timestamp = iprot.readI64();
11340
                setTimestampIsSet(true);
11341
              } else { 
11342
                TProtocolUtil.skip(iprot, field.type);
11343
              }
11344
              break;
11345
          }
11346
          iprot.readFieldEnd();
11347
        }
11348
      }
11349
      iprot.readStructEnd();
11350
      validate();
11351
    }
11352
 
11353
    public void write(TProtocol oprot) throws TException {
11354
      validate();
11355
 
11356
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 11357
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
11358
      oprot.writeI64(this.userId);
11359
      oprot.writeFieldEnd();
48 ashish 11360
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11361
      oprot.writeI64(this.timestamp);
11362
      oprot.writeFieldEnd();
11363
      oprot.writeFieldStop();
11364
      oprot.writeStructEnd();
11365
    }
11366
 
11367
    @Override
11368
    public String toString() {
553 chandransh 11369
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 11370
      boolean first = true;
11371
 
553 chandransh 11372
      sb.append("userId:");
11373
      sb.append(this.userId);
48 ashish 11374
      first = false;
11375
      if (!first) sb.append(", ");
11376
      sb.append("timestamp:");
11377
      sb.append(this.timestamp);
11378
      first = false;
11379
      sb.append(")");
11380
      return sb.toString();
11381
    }
11382
 
11383
    public void validate() throws TException {
11384
      // check for required fields
11385
    }
11386
 
11387
  }
11388
 
553 chandransh 11389
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
11390
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 11391
 
11392
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11393
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11394
 
11395
    private boolean success;
11396
    private UserContextException ucx;
11397
 
11398
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11399
    public enum _Fields implements TFieldIdEnum {
11400
      SUCCESS((short)0, "success"),
11401
      UCX((short)1, "ucx");
11402
 
11403
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11404
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11405
 
11406
      static {
11407
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11408
          byId.put((int)field._thriftId, field);
11409
          byName.put(field.getFieldName(), field);
11410
        }
11411
      }
11412
 
11413
      /**
11414
       * Find the _Fields constant that matches fieldId, or null if its not found.
11415
       */
11416
      public static _Fields findByThriftId(int fieldId) {
11417
        return byId.get(fieldId);
11418
      }
11419
 
11420
      /**
11421
       * Find the _Fields constant that matches fieldId, throwing an exception
11422
       * if it is not found.
11423
       */
11424
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11425
        _Fields fields = findByThriftId(fieldId);
11426
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11427
        return fields;
11428
      }
11429
 
11430
      /**
11431
       * Find the _Fields constant that matches name, or null if its not found.
11432
       */
11433
      public static _Fields findByName(String name) {
11434
        return byName.get(name);
11435
      }
11436
 
11437
      private final short _thriftId;
11438
      private final String _fieldName;
11439
 
11440
      _Fields(short thriftId, String fieldName) {
11441
        _thriftId = thriftId;
11442
        _fieldName = fieldName;
11443
      }
11444
 
11445
      public short getThriftFieldId() {
11446
        return _thriftId;
11447
      }
11448
 
11449
      public String getFieldName() {
11450
        return _fieldName;
11451
      }
11452
    }
11453
 
11454
    // isset id assignments
11455
    private static final int __SUCCESS_ISSET_ID = 0;
11456
    private BitSet __isset_bit_vector = new BitSet(1);
11457
 
11458
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11459
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11460
          new FieldValueMetaData(TType.BOOL)));
11461
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11462
          new FieldValueMetaData(TType.STRUCT)));
11463
    }});
11464
 
11465
    static {
553 chandransh 11466
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 11467
    }
11468
 
553 chandransh 11469
    public setUserAsLoggedIn_result() {
48 ashish 11470
    }
11471
 
553 chandransh 11472
    public setUserAsLoggedIn_result(
48 ashish 11473
      boolean success,
11474
      UserContextException ucx)
11475
    {
11476
      this();
11477
      this.success = success;
11478
      setSuccessIsSet(true);
11479
      this.ucx = ucx;
11480
    }
11481
 
11482
    /**
11483
     * Performs a deep copy on <i>other</i>.
11484
     */
553 chandransh 11485
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 11486
      __isset_bit_vector.clear();
11487
      __isset_bit_vector.or(other.__isset_bit_vector);
11488
      this.success = other.success;
11489
      if (other.isSetUcx()) {
11490
        this.ucx = new UserContextException(other.ucx);
11491
      }
11492
    }
11493
 
553 chandransh 11494
    public setUserAsLoggedIn_result deepCopy() {
11495
      return new setUserAsLoggedIn_result(this);
48 ashish 11496
    }
11497
 
11498
    @Deprecated
553 chandransh 11499
    public setUserAsLoggedIn_result clone() {
11500
      return new setUserAsLoggedIn_result(this);
48 ashish 11501
    }
11502
 
11503
    public boolean isSuccess() {
11504
      return this.success;
11505
    }
11506
 
553 chandransh 11507
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 11508
      this.success = success;
11509
      setSuccessIsSet(true);
11510
      return this;
11511
    }
11512
 
11513
    public void unsetSuccess() {
11514
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11515
    }
11516
 
11517
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11518
    public boolean isSetSuccess() {
11519
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11520
    }
11521
 
11522
    public void setSuccessIsSet(boolean value) {
11523
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11524
    }
11525
 
11526
    public UserContextException getUcx() {
11527
      return this.ucx;
11528
    }
11529
 
553 chandransh 11530
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 11531
      this.ucx = ucx;
11532
      return this;
11533
    }
11534
 
11535
    public void unsetUcx() {
11536
      this.ucx = null;
11537
    }
11538
 
11539
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11540
    public boolean isSetUcx() {
11541
      return this.ucx != null;
11542
    }
11543
 
11544
    public void setUcxIsSet(boolean value) {
11545
      if (!value) {
11546
        this.ucx = null;
11547
      }
11548
    }
11549
 
11550
    public void setFieldValue(_Fields field, Object value) {
11551
      switch (field) {
11552
      case SUCCESS:
11553
        if (value == null) {
11554
          unsetSuccess();
11555
        } else {
11556
          setSuccess((Boolean)value);
11557
        }
11558
        break;
11559
 
11560
      case UCX:
11561
        if (value == null) {
11562
          unsetUcx();
11563
        } else {
11564
          setUcx((UserContextException)value);
11565
        }
11566
        break;
11567
 
11568
      }
11569
    }
11570
 
11571
    public void setFieldValue(int fieldID, Object value) {
11572
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11573
    }
11574
 
11575
    public Object getFieldValue(_Fields field) {
11576
      switch (field) {
11577
      case SUCCESS:
11578
        return new Boolean(isSuccess());
11579
 
11580
      case UCX:
11581
        return getUcx();
11582
 
11583
      }
11584
      throw new IllegalStateException();
11585
    }
11586
 
11587
    public Object getFieldValue(int fieldId) {
11588
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11589
    }
11590
 
11591
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11592
    public boolean isSet(_Fields field) {
11593
      switch (field) {
11594
      case SUCCESS:
11595
        return isSetSuccess();
11596
      case UCX:
11597
        return isSetUcx();
11598
      }
11599
      throw new IllegalStateException();
11600
    }
11601
 
11602
    public boolean isSet(int fieldID) {
11603
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11604
    }
11605
 
11606
    @Override
11607
    public boolean equals(Object that) {
11608
      if (that == null)
11609
        return false;
553 chandransh 11610
      if (that instanceof setUserAsLoggedIn_result)
11611
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 11612
      return false;
11613
    }
11614
 
553 chandransh 11615
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 11616
      if (that == null)
11617
        return false;
11618
 
11619
      boolean this_present_success = true;
11620
      boolean that_present_success = true;
11621
      if (this_present_success || that_present_success) {
11622
        if (!(this_present_success && that_present_success))
11623
          return false;
11624
        if (this.success != that.success)
11625
          return false;
11626
      }
11627
 
11628
      boolean this_present_ucx = true && this.isSetUcx();
11629
      boolean that_present_ucx = true && that.isSetUcx();
11630
      if (this_present_ucx || that_present_ucx) {
11631
        if (!(this_present_ucx && that_present_ucx))
11632
          return false;
11633
        if (!this.ucx.equals(that.ucx))
11634
          return false;
11635
      }
11636
 
11637
      return true;
11638
    }
11639
 
11640
    @Override
11641
    public int hashCode() {
11642
      return 0;
11643
    }
11644
 
553 chandransh 11645
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 11646
      if (!getClass().equals(other.getClass())) {
11647
        return getClass().getName().compareTo(other.getClass().getName());
11648
      }
11649
 
11650
      int lastComparison = 0;
553 chandransh 11651
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 11652
 
11653
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11654
      if (lastComparison != 0) {
11655
        return lastComparison;
11656
      }
11657
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11658
      if (lastComparison != 0) {
11659
        return lastComparison;
11660
      }
11661
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11662
      if (lastComparison != 0) {
11663
        return lastComparison;
11664
      }
11665
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11666
      if (lastComparison != 0) {
11667
        return lastComparison;
11668
      }
11669
      return 0;
11670
    }
11671
 
11672
    public void read(TProtocol iprot) throws TException {
11673
      TField field;
11674
      iprot.readStructBegin();
11675
      while (true)
11676
      {
11677
        field = iprot.readFieldBegin();
11678
        if (field.type == TType.STOP) { 
11679
          break;
11680
        }
11681
        _Fields fieldId = _Fields.findByThriftId(field.id);
11682
        if (fieldId == null) {
11683
          TProtocolUtil.skip(iprot, field.type);
11684
        } else {
11685
          switch (fieldId) {
11686
            case SUCCESS:
11687
              if (field.type == TType.BOOL) {
11688
                this.success = iprot.readBool();
11689
                setSuccessIsSet(true);
11690
              } else { 
11691
                TProtocolUtil.skip(iprot, field.type);
11692
              }
11693
              break;
11694
            case UCX:
11695
              if (field.type == TType.STRUCT) {
11696
                this.ucx = new UserContextException();
11697
                this.ucx.read(iprot);
11698
              } else { 
11699
                TProtocolUtil.skip(iprot, field.type);
11700
              }
11701
              break;
11702
          }
11703
          iprot.readFieldEnd();
11704
        }
11705
      }
11706
      iprot.readStructEnd();
11707
      validate();
11708
    }
11709
 
11710
    public void write(TProtocol oprot) throws TException {
11711
      oprot.writeStructBegin(STRUCT_DESC);
11712
 
11713
      if (this.isSetSuccess()) {
11714
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11715
        oprot.writeBool(this.success);
11716
        oprot.writeFieldEnd();
11717
      } else if (this.isSetUcx()) {
11718
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11719
        this.ucx.write(oprot);
11720
        oprot.writeFieldEnd();
11721
      }
11722
      oprot.writeFieldStop();
11723
      oprot.writeStructEnd();
11724
    }
11725
 
11726
    @Override
11727
    public String toString() {
553 chandransh 11728
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 11729
      boolean first = true;
11730
 
11731
      sb.append("success:");
11732
      sb.append(this.success);
11733
      first = false;
11734
      if (!first) sb.append(", ");
11735
      sb.append("ucx:");
11736
      if (this.ucx == null) {
11737
        sb.append("null");
11738
      } else {
11739
        sb.append(this.ucx);
11740
      }
11741
      first = false;
11742
      sb.append(")");
11743
      return sb.toString();
11744
    }
11745
 
11746
    public void validate() throws TException {
11747
      // check for required fields
11748
    }
11749
 
11750
  }
11751
 
553 chandransh 11752
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
11753
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 11754
 
553 chandransh 11755
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11756
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 11757
 
11758
    private long userid;
11759
    private long timestamp;
11760
 
11761
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11762
    public enum _Fields implements TFieldIdEnum {
553 chandransh 11763
      USERID((short)1, "userid"),
11764
      TIMESTAMP((short)2, "timestamp");
48 ashish 11765
 
11766
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11767
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11768
 
11769
      static {
11770
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11771
          byId.put((int)field._thriftId, field);
11772
          byName.put(field.getFieldName(), field);
11773
        }
11774
      }
11775
 
11776
      /**
11777
       * Find the _Fields constant that matches fieldId, or null if its not found.
11778
       */
11779
      public static _Fields findByThriftId(int fieldId) {
11780
        return byId.get(fieldId);
11781
      }
11782
 
11783
      /**
11784
       * Find the _Fields constant that matches fieldId, throwing an exception
11785
       * if it is not found.
11786
       */
11787
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11788
        _Fields fields = findByThriftId(fieldId);
11789
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11790
        return fields;
11791
      }
11792
 
11793
      /**
11794
       * Find the _Fields constant that matches name, or null if its not found.
11795
       */
11796
      public static _Fields findByName(String name) {
11797
        return byName.get(name);
11798
      }
11799
 
11800
      private final short _thriftId;
11801
      private final String _fieldName;
11802
 
11803
      _Fields(short thriftId, String fieldName) {
11804
        _thriftId = thriftId;
11805
        _fieldName = fieldName;
11806
      }
11807
 
11808
      public short getThriftFieldId() {
11809
        return _thriftId;
11810
      }
11811
 
11812
      public String getFieldName() {
11813
        return _fieldName;
11814
      }
11815
    }
11816
 
11817
    // isset id assignments
11818
    private static final int __USERID_ISSET_ID = 0;
11819
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 11820
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 11821
 
11822
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11823
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11824
          new FieldValueMetaData(TType.I64)));
11825
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11826
          new FieldValueMetaData(TType.I64)));
11827
    }});
11828
 
11829
    static {
553 chandransh 11830
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 11831
    }
11832
 
553 chandransh 11833
    public setUserAsLoggedOut_args() {
48 ashish 11834
    }
11835
 
553 chandransh 11836
    public setUserAsLoggedOut_args(
48 ashish 11837
      long userid,
553 chandransh 11838
      long timestamp)
48 ashish 11839
    {
11840
      this();
11841
      this.userid = userid;
11842
      setUseridIsSet(true);
11843
      this.timestamp = timestamp;
11844
      setTimestampIsSet(true);
11845
    }
11846
 
11847
    /**
11848
     * Performs a deep copy on <i>other</i>.
11849
     */
553 chandransh 11850
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 11851
      __isset_bit_vector.clear();
11852
      __isset_bit_vector.or(other.__isset_bit_vector);
11853
      this.userid = other.userid;
11854
      this.timestamp = other.timestamp;
11855
    }
11856
 
553 chandransh 11857
    public setUserAsLoggedOut_args deepCopy() {
11858
      return new setUserAsLoggedOut_args(this);
48 ashish 11859
    }
11860
 
11861
    @Deprecated
553 chandransh 11862
    public setUserAsLoggedOut_args clone() {
11863
      return new setUserAsLoggedOut_args(this);
48 ashish 11864
    }
11865
 
11866
    public long getUserid() {
11867
      return this.userid;
11868
    }
11869
 
553 chandransh 11870
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 11871
      this.userid = userid;
11872
      setUseridIsSet(true);
11873
      return this;
11874
    }
11875
 
11876
    public void unsetUserid() {
11877
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11878
    }
11879
 
11880
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11881
    public boolean isSetUserid() {
11882
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11883
    }
11884
 
11885
    public void setUseridIsSet(boolean value) {
11886
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11887
    }
11888
 
11889
    public long getTimestamp() {
11890
      return this.timestamp;
11891
    }
11892
 
553 chandransh 11893
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 11894
      this.timestamp = timestamp;
11895
      setTimestampIsSet(true);
11896
      return this;
11897
    }
11898
 
11899
    public void unsetTimestamp() {
11900
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11901
    }
11902
 
11903
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11904
    public boolean isSetTimestamp() {
11905
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11906
    }
11907
 
11908
    public void setTimestampIsSet(boolean value) {
11909
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11910
    }
11911
 
11912
    public void setFieldValue(_Fields field, Object value) {
11913
      switch (field) {
11914
      case USERID:
11915
        if (value == null) {
11916
          unsetUserid();
11917
        } else {
11918
          setUserid((Long)value);
11919
        }
11920
        break;
11921
 
11922
      case TIMESTAMP:
11923
        if (value == null) {
11924
          unsetTimestamp();
11925
        } else {
11926
          setTimestamp((Long)value);
11927
        }
11928
        break;
11929
 
11930
      }
11931
    }
11932
 
11933
    public void setFieldValue(int fieldID, Object value) {
11934
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11935
    }
11936
 
11937
    public Object getFieldValue(_Fields field) {
11938
      switch (field) {
11939
      case USERID:
11940
        return new Long(getUserid());
11941
 
11942
      case TIMESTAMP:
11943
        return new Long(getTimestamp());
11944
 
11945
      }
11946
      throw new IllegalStateException();
11947
    }
11948
 
11949
    public Object getFieldValue(int fieldId) {
11950
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11951
    }
11952
 
11953
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11954
    public boolean isSet(_Fields field) {
11955
      switch (field) {
11956
      case USERID:
11957
        return isSetUserid();
11958
      case TIMESTAMP:
11959
        return isSetTimestamp();
11960
      }
11961
      throw new IllegalStateException();
11962
    }
11963
 
11964
    public boolean isSet(int fieldID) {
11965
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11966
    }
11967
 
11968
    @Override
11969
    public boolean equals(Object that) {
11970
      if (that == null)
11971
        return false;
553 chandransh 11972
      if (that instanceof setUserAsLoggedOut_args)
11973
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 11974
      return false;
11975
    }
11976
 
553 chandransh 11977
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 11978
      if (that == null)
11979
        return false;
11980
 
11981
      boolean this_present_userid = true;
11982
      boolean that_present_userid = true;
11983
      if (this_present_userid || that_present_userid) {
11984
        if (!(this_present_userid && that_present_userid))
11985
          return false;
11986
        if (this.userid != that.userid)
11987
          return false;
11988
      }
11989
 
11990
      boolean this_present_timestamp = true;
11991
      boolean that_present_timestamp = true;
11992
      if (this_present_timestamp || that_present_timestamp) {
11993
        if (!(this_present_timestamp && that_present_timestamp))
11994
          return false;
11995
        if (this.timestamp != that.timestamp)
11996
          return false;
11997
      }
11998
 
11999
      return true;
12000
    }
12001
 
12002
    @Override
12003
    public int hashCode() {
12004
      return 0;
12005
    }
12006
 
553 chandransh 12007
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 12008
      if (!getClass().equals(other.getClass())) {
12009
        return getClass().getName().compareTo(other.getClass().getName());
12010
      }
12011
 
12012
      int lastComparison = 0;
553 chandransh 12013
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 12014
 
12015
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12016
      if (lastComparison != 0) {
12017
        return lastComparison;
12018
      }
12019
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12020
      if (lastComparison != 0) {
12021
        return lastComparison;
12022
      }
12023
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
12024
      if (lastComparison != 0) {
12025
        return lastComparison;
12026
      }
12027
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
12028
      if (lastComparison != 0) {
12029
        return lastComparison;
12030
      }
12031
      return 0;
12032
    }
12033
 
12034
    public void read(TProtocol iprot) throws TException {
12035
      TField field;
12036
      iprot.readStructBegin();
12037
      while (true)
12038
      {
12039
        field = iprot.readFieldBegin();
12040
        if (field.type == TType.STOP) { 
12041
          break;
12042
        }
12043
        _Fields fieldId = _Fields.findByThriftId(field.id);
12044
        if (fieldId == null) {
12045
          TProtocolUtil.skip(iprot, field.type);
12046
        } else {
12047
          switch (fieldId) {
12048
            case USERID:
12049
              if (field.type == TType.I64) {
12050
                this.userid = iprot.readI64();
12051
                setUseridIsSet(true);
12052
              } else { 
12053
                TProtocolUtil.skip(iprot, field.type);
12054
              }
12055
              break;
12056
            case TIMESTAMP:
12057
              if (field.type == TType.I64) {
12058
                this.timestamp = iprot.readI64();
12059
                setTimestampIsSet(true);
12060
              } else { 
12061
                TProtocolUtil.skip(iprot, field.type);
12062
              }
12063
              break;
12064
          }
12065
          iprot.readFieldEnd();
12066
        }
12067
      }
12068
      iprot.readStructEnd();
12069
      validate();
12070
    }
12071
 
12072
    public void write(TProtocol oprot) throws TException {
12073
      validate();
12074
 
12075
      oprot.writeStructBegin(STRUCT_DESC);
12076
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12077
      oprot.writeI64(this.userid);
12078
      oprot.writeFieldEnd();
12079
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
12080
      oprot.writeI64(this.timestamp);
12081
      oprot.writeFieldEnd();
12082
      oprot.writeFieldStop();
12083
      oprot.writeStructEnd();
12084
    }
12085
 
12086
    @Override
12087
    public String toString() {
553 chandransh 12088
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 12089
      boolean first = true;
12090
 
12091
      sb.append("userid:");
12092
      sb.append(this.userid);
12093
      first = false;
12094
      if (!first) sb.append(", ");
12095
      sb.append("timestamp:");
12096
      sb.append(this.timestamp);
12097
      first = false;
12098
      sb.append(")");
12099
      return sb.toString();
12100
    }
12101
 
12102
    public void validate() throws TException {
12103
      // check for required fields
12104
    }
12105
 
12106
  }
12107
 
553 chandransh 12108
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
12109
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 12110
 
12111
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12112
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12113
 
12114
    private boolean success;
12115
    private UserContextException ucx;
12116
 
12117
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12118
    public enum _Fields implements TFieldIdEnum {
12119
      SUCCESS((short)0, "success"),
12120
      UCX((short)1, "ucx");
12121
 
12122
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12123
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12124
 
12125
      static {
12126
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12127
          byId.put((int)field._thriftId, field);
12128
          byName.put(field.getFieldName(), field);
12129
        }
12130
      }
12131
 
12132
      /**
12133
       * Find the _Fields constant that matches fieldId, or null if its not found.
12134
       */
12135
      public static _Fields findByThriftId(int fieldId) {
12136
        return byId.get(fieldId);
12137
      }
12138
 
12139
      /**
12140
       * Find the _Fields constant that matches fieldId, throwing an exception
12141
       * if it is not found.
12142
       */
12143
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12144
        _Fields fields = findByThriftId(fieldId);
12145
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12146
        return fields;
12147
      }
12148
 
12149
      /**
12150
       * Find the _Fields constant that matches name, or null if its not found.
12151
       */
12152
      public static _Fields findByName(String name) {
12153
        return byName.get(name);
12154
      }
12155
 
12156
      private final short _thriftId;
12157
      private final String _fieldName;
12158
 
12159
      _Fields(short thriftId, String fieldName) {
12160
        _thriftId = thriftId;
12161
        _fieldName = fieldName;
12162
      }
12163
 
12164
      public short getThriftFieldId() {
12165
        return _thriftId;
12166
      }
12167
 
12168
      public String getFieldName() {
12169
        return _fieldName;
12170
      }
12171
    }
12172
 
12173
    // isset id assignments
12174
    private static final int __SUCCESS_ISSET_ID = 0;
12175
    private BitSet __isset_bit_vector = new BitSet(1);
12176
 
12177
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12178
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12179
          new FieldValueMetaData(TType.BOOL)));
12180
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12181
          new FieldValueMetaData(TType.STRUCT)));
12182
    }});
12183
 
12184
    static {
553 chandransh 12185
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 12186
    }
12187
 
553 chandransh 12188
    public setUserAsLoggedOut_result() {
48 ashish 12189
    }
12190
 
553 chandransh 12191
    public setUserAsLoggedOut_result(
48 ashish 12192
      boolean success,
12193
      UserContextException ucx)
12194
    {
12195
      this();
12196
      this.success = success;
12197
      setSuccessIsSet(true);
12198
      this.ucx = ucx;
12199
    }
12200
 
12201
    /**
12202
     * Performs a deep copy on <i>other</i>.
12203
     */
553 chandransh 12204
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 12205
      __isset_bit_vector.clear();
12206
      __isset_bit_vector.or(other.__isset_bit_vector);
12207
      this.success = other.success;
12208
      if (other.isSetUcx()) {
12209
        this.ucx = new UserContextException(other.ucx);
12210
      }
12211
    }
12212
 
553 chandransh 12213
    public setUserAsLoggedOut_result deepCopy() {
12214
      return new setUserAsLoggedOut_result(this);
48 ashish 12215
    }
12216
 
12217
    @Deprecated
553 chandransh 12218
    public setUserAsLoggedOut_result clone() {
12219
      return new setUserAsLoggedOut_result(this);
48 ashish 12220
    }
12221
 
12222
    public boolean isSuccess() {
12223
      return this.success;
12224
    }
12225
 
553 chandransh 12226
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 12227
      this.success = success;
12228
      setSuccessIsSet(true);
12229
      return this;
12230
    }
12231
 
12232
    public void unsetSuccess() {
12233
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12234
    }
12235
 
12236
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12237
    public boolean isSetSuccess() {
12238
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12239
    }
12240
 
12241
    public void setSuccessIsSet(boolean value) {
12242
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12243
    }
12244
 
12245
    public UserContextException getUcx() {
12246
      return this.ucx;
12247
    }
12248
 
553 chandransh 12249
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 12250
      this.ucx = ucx;
12251
      return this;
12252
    }
12253
 
12254
    public void unsetUcx() {
12255
      this.ucx = null;
12256
    }
12257
 
12258
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12259
    public boolean isSetUcx() {
12260
      return this.ucx != null;
12261
    }
12262
 
12263
    public void setUcxIsSet(boolean value) {
12264
      if (!value) {
12265
        this.ucx = null;
12266
      }
12267
    }
12268
 
12269
    public void setFieldValue(_Fields field, Object value) {
12270
      switch (field) {
12271
      case SUCCESS:
12272
        if (value == null) {
12273
          unsetSuccess();
12274
        } else {
12275
          setSuccess((Boolean)value);
12276
        }
12277
        break;
12278
 
12279
      case UCX:
12280
        if (value == null) {
12281
          unsetUcx();
12282
        } else {
12283
          setUcx((UserContextException)value);
12284
        }
12285
        break;
12286
 
12287
      }
12288
    }
12289
 
12290
    public void setFieldValue(int fieldID, Object value) {
12291
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12292
    }
12293
 
12294
    public Object getFieldValue(_Fields field) {
12295
      switch (field) {
12296
      case SUCCESS:
12297
        return new Boolean(isSuccess());
12298
 
12299
      case UCX:
12300
        return getUcx();
12301
 
12302
      }
12303
      throw new IllegalStateException();
12304
    }
12305
 
12306
    public Object getFieldValue(int fieldId) {
12307
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12308
    }
12309
 
12310
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12311
    public boolean isSet(_Fields field) {
12312
      switch (field) {
12313
      case SUCCESS:
12314
        return isSetSuccess();
12315
      case UCX:
12316
        return isSetUcx();
12317
      }
12318
      throw new IllegalStateException();
12319
    }
12320
 
12321
    public boolean isSet(int fieldID) {
12322
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12323
    }
12324
 
12325
    @Override
12326
    public boolean equals(Object that) {
12327
      if (that == null)
12328
        return false;
553 chandransh 12329
      if (that instanceof setUserAsLoggedOut_result)
12330
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 12331
      return false;
12332
    }
12333
 
553 chandransh 12334
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 12335
      if (that == null)
12336
        return false;
12337
 
12338
      boolean this_present_success = true;
12339
      boolean that_present_success = true;
12340
      if (this_present_success || that_present_success) {
12341
        if (!(this_present_success && that_present_success))
12342
          return false;
12343
        if (this.success != that.success)
12344
          return false;
12345
      }
12346
 
12347
      boolean this_present_ucx = true && this.isSetUcx();
12348
      boolean that_present_ucx = true && that.isSetUcx();
12349
      if (this_present_ucx || that_present_ucx) {
12350
        if (!(this_present_ucx && that_present_ucx))
12351
          return false;
12352
        if (!this.ucx.equals(that.ucx))
12353
          return false;
12354
      }
12355
 
12356
      return true;
12357
    }
12358
 
12359
    @Override
12360
    public int hashCode() {
12361
      return 0;
12362
    }
12363
 
553 chandransh 12364
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 12365
      if (!getClass().equals(other.getClass())) {
12366
        return getClass().getName().compareTo(other.getClass().getName());
12367
      }
12368
 
12369
      int lastComparison = 0;
553 chandransh 12370
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 12371
 
12372
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12373
      if (lastComparison != 0) {
12374
        return lastComparison;
12375
      }
12376
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12377
      if (lastComparison != 0) {
12378
        return lastComparison;
12379
      }
12380
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12381
      if (lastComparison != 0) {
12382
        return lastComparison;
12383
      }
12384
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12385
      if (lastComparison != 0) {
12386
        return lastComparison;
12387
      }
12388
      return 0;
12389
    }
12390
 
12391
    public void read(TProtocol iprot) throws TException {
12392
      TField field;
12393
      iprot.readStructBegin();
12394
      while (true)
12395
      {
12396
        field = iprot.readFieldBegin();
12397
        if (field.type == TType.STOP) { 
12398
          break;
12399
        }
12400
        _Fields fieldId = _Fields.findByThriftId(field.id);
12401
        if (fieldId == null) {
12402
          TProtocolUtil.skip(iprot, field.type);
12403
        } else {
12404
          switch (fieldId) {
12405
            case SUCCESS:
12406
              if (field.type == TType.BOOL) {
12407
                this.success = iprot.readBool();
12408
                setSuccessIsSet(true);
12409
              } else { 
12410
                TProtocolUtil.skip(iprot, field.type);
12411
              }
12412
              break;
12413
            case UCX:
12414
              if (field.type == TType.STRUCT) {
12415
                this.ucx = new UserContextException();
12416
                this.ucx.read(iprot);
12417
              } else { 
12418
                TProtocolUtil.skip(iprot, field.type);
12419
              }
12420
              break;
12421
          }
12422
          iprot.readFieldEnd();
12423
        }
12424
      }
12425
      iprot.readStructEnd();
12426
      validate();
12427
    }
12428
 
12429
    public void write(TProtocol oprot) throws TException {
12430
      oprot.writeStructBegin(STRUCT_DESC);
12431
 
12432
      if (this.isSetSuccess()) {
12433
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12434
        oprot.writeBool(this.success);
12435
        oprot.writeFieldEnd();
12436
      } else if (this.isSetUcx()) {
12437
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12438
        this.ucx.write(oprot);
12439
        oprot.writeFieldEnd();
12440
      }
12441
      oprot.writeFieldStop();
12442
      oprot.writeStructEnd();
12443
    }
12444
 
12445
    @Override
12446
    public String toString() {
553 chandransh 12447
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 12448
      boolean first = true;
12449
 
12450
      sb.append("success:");
12451
      sb.append(this.success);
12452
      first = false;
12453
      if (!first) sb.append(", ");
12454
      sb.append("ucx:");
12455
      if (this.ucx == null) {
12456
        sb.append("null");
12457
      } else {
12458
        sb.append(this.ucx);
12459
      }
12460
      first = false;
12461
      sb.append(")");
12462
      return sb.toString();
12463
    }
12464
 
12465
    public void validate() throws TException {
12466
      // check for required fields
12467
    }
12468
 
12469
  }
12470
 
553 chandransh 12471
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
12472
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 12473
 
12474
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
12475
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
12476
 
12477
    private long userid;
12478
    private long addressId;
12479
 
12480
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12481
    public enum _Fields implements TFieldIdEnum {
12482
      USERID((short)1, "userid"),
12483
      ADDRESS_ID((short)2, "addressId");
12484
 
12485
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12486
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12487
 
12488
      static {
12489
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12490
          byId.put((int)field._thriftId, field);
12491
          byName.put(field.getFieldName(), field);
12492
        }
12493
      }
12494
 
12495
      /**
12496
       * Find the _Fields constant that matches fieldId, or null if its not found.
12497
       */
12498
      public static _Fields findByThriftId(int fieldId) {
12499
        return byId.get(fieldId);
12500
      }
12501
 
12502
      /**
12503
       * Find the _Fields constant that matches fieldId, throwing an exception
12504
       * if it is not found.
12505
       */
12506
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12507
        _Fields fields = findByThriftId(fieldId);
12508
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12509
        return fields;
12510
      }
12511
 
12512
      /**
12513
       * Find the _Fields constant that matches name, or null if its not found.
12514
       */
12515
      public static _Fields findByName(String name) {
12516
        return byName.get(name);
12517
      }
12518
 
12519
      private final short _thriftId;
12520
      private final String _fieldName;
12521
 
12522
      _Fields(short thriftId, String fieldName) {
12523
        _thriftId = thriftId;
12524
        _fieldName = fieldName;
12525
      }
12526
 
12527
      public short getThriftFieldId() {
12528
        return _thriftId;
12529
      }
12530
 
12531
      public String getFieldName() {
12532
        return _fieldName;
12533
      }
12534
    }
12535
 
12536
    // isset id assignments
12537
    private static final int __USERID_ISSET_ID = 0;
12538
    private static final int __ADDRESSID_ISSET_ID = 1;
12539
    private BitSet __isset_bit_vector = new BitSet(2);
12540
 
12541
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12542
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
12543
          new FieldValueMetaData(TType.I64)));
12544
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
12545
          new FieldValueMetaData(TType.I64)));
12546
    }});
12547
 
12548
    static {
553 chandransh 12549
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 12550
    }
12551
 
553 chandransh 12552
    public setDefaultAddress_args() {
48 ashish 12553
    }
12554
 
553 chandransh 12555
    public setDefaultAddress_args(
48 ashish 12556
      long userid,
12557
      long addressId)
12558
    {
12559
      this();
12560
      this.userid = userid;
12561
      setUseridIsSet(true);
12562
      this.addressId = addressId;
12563
      setAddressIdIsSet(true);
12564
    }
12565
 
12566
    /**
12567
     * Performs a deep copy on <i>other</i>.
12568
     */
553 chandransh 12569
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 12570
      __isset_bit_vector.clear();
12571
      __isset_bit_vector.or(other.__isset_bit_vector);
12572
      this.userid = other.userid;
12573
      this.addressId = other.addressId;
12574
    }
12575
 
553 chandransh 12576
    public setDefaultAddress_args deepCopy() {
12577
      return new setDefaultAddress_args(this);
48 ashish 12578
    }
12579
 
12580
    @Deprecated
553 chandransh 12581
    public setDefaultAddress_args clone() {
12582
      return new setDefaultAddress_args(this);
48 ashish 12583
    }
12584
 
12585
    public long getUserid() {
12586
      return this.userid;
12587
    }
12588
 
553 chandransh 12589
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 12590
      this.userid = userid;
12591
      setUseridIsSet(true);
12592
      return this;
12593
    }
12594
 
12595
    public void unsetUserid() {
12596
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12597
    }
12598
 
12599
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12600
    public boolean isSetUserid() {
12601
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12602
    }
12603
 
12604
    public void setUseridIsSet(boolean value) {
12605
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12606
    }
12607
 
12608
    public long getAddressId() {
12609
      return this.addressId;
12610
    }
12611
 
553 chandransh 12612
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 12613
      this.addressId = addressId;
12614
      setAddressIdIsSet(true);
12615
      return this;
12616
    }
12617
 
12618
    public void unsetAddressId() {
12619
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
12620
    }
12621
 
12622
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
12623
    public boolean isSetAddressId() {
12624
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
12625
    }
12626
 
12627
    public void setAddressIdIsSet(boolean value) {
12628
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
12629
    }
12630
 
12631
    public void setFieldValue(_Fields field, Object value) {
12632
      switch (field) {
12633
      case USERID:
12634
        if (value == null) {
12635
          unsetUserid();
12636
        } else {
12637
          setUserid((Long)value);
12638
        }
12639
        break;
12640
 
12641
      case ADDRESS_ID:
12642
        if (value == null) {
12643
          unsetAddressId();
12644
        } else {
12645
          setAddressId((Long)value);
12646
        }
12647
        break;
12648
 
12649
      }
12650
    }
12651
 
12652
    public void setFieldValue(int fieldID, Object value) {
12653
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12654
    }
12655
 
12656
    public Object getFieldValue(_Fields field) {
12657
      switch (field) {
12658
      case USERID:
12659
        return new Long(getUserid());
12660
 
12661
      case ADDRESS_ID:
12662
        return new Long(getAddressId());
12663
 
12664
      }
12665
      throw new IllegalStateException();
12666
    }
12667
 
12668
    public Object getFieldValue(int fieldId) {
12669
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12670
    }
12671
 
12672
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12673
    public boolean isSet(_Fields field) {
12674
      switch (field) {
12675
      case USERID:
12676
        return isSetUserid();
12677
      case ADDRESS_ID:
12678
        return isSetAddressId();
12679
      }
12680
      throw new IllegalStateException();
12681
    }
12682
 
12683
    public boolean isSet(int fieldID) {
12684
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12685
    }
12686
 
12687
    @Override
12688
    public boolean equals(Object that) {
12689
      if (that == null)
12690
        return false;
553 chandransh 12691
      if (that instanceof setDefaultAddress_args)
12692
        return this.equals((setDefaultAddress_args)that);
48 ashish 12693
      return false;
12694
    }
12695
 
553 chandransh 12696
    public boolean equals(setDefaultAddress_args that) {
48 ashish 12697
      if (that == null)
12698
        return false;
12699
 
12700
      boolean this_present_userid = true;
12701
      boolean that_present_userid = true;
12702
      if (this_present_userid || that_present_userid) {
12703
        if (!(this_present_userid && that_present_userid))
12704
          return false;
12705
        if (this.userid != that.userid)
12706
          return false;
12707
      }
12708
 
12709
      boolean this_present_addressId = true;
12710
      boolean that_present_addressId = true;
12711
      if (this_present_addressId || that_present_addressId) {
12712
        if (!(this_present_addressId && that_present_addressId))
12713
          return false;
12714
        if (this.addressId != that.addressId)
12715
          return false;
12716
      }
12717
 
12718
      return true;
12719
    }
12720
 
12721
    @Override
12722
    public int hashCode() {
12723
      return 0;
12724
    }
12725
 
553 chandransh 12726
    public int compareTo(setDefaultAddress_args other) {
48 ashish 12727
      if (!getClass().equals(other.getClass())) {
12728
        return getClass().getName().compareTo(other.getClass().getName());
12729
      }
12730
 
12731
      int lastComparison = 0;
553 chandransh 12732
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 12733
 
12734
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12735
      if (lastComparison != 0) {
12736
        return lastComparison;
12737
      }
12738
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12739
      if (lastComparison != 0) {
12740
        return lastComparison;
12741
      }
12742
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
12743
      if (lastComparison != 0) {
12744
        return lastComparison;
12745
      }
12746
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
12747
      if (lastComparison != 0) {
12748
        return lastComparison;
12749
      }
12750
      return 0;
12751
    }
12752
 
12753
    public void read(TProtocol iprot) throws TException {
12754
      TField field;
12755
      iprot.readStructBegin();
12756
      while (true)
12757
      {
12758
        field = iprot.readFieldBegin();
12759
        if (field.type == TType.STOP) { 
12760
          break;
12761
        }
12762
        _Fields fieldId = _Fields.findByThriftId(field.id);
12763
        if (fieldId == null) {
12764
          TProtocolUtil.skip(iprot, field.type);
12765
        } else {
12766
          switch (fieldId) {
12767
            case USERID:
12768
              if (field.type == TType.I64) {
12769
                this.userid = iprot.readI64();
12770
                setUseridIsSet(true);
12771
              } else { 
12772
                TProtocolUtil.skip(iprot, field.type);
12773
              }
12774
              break;
12775
            case ADDRESS_ID:
12776
              if (field.type == TType.I64) {
12777
                this.addressId = iprot.readI64();
12778
                setAddressIdIsSet(true);
12779
              } else { 
12780
                TProtocolUtil.skip(iprot, field.type);
12781
              }
12782
              break;
12783
          }
12784
          iprot.readFieldEnd();
12785
        }
12786
      }
12787
      iprot.readStructEnd();
12788
      validate();
12789
    }
12790
 
12791
    public void write(TProtocol oprot) throws TException {
12792
      validate();
12793
 
12794
      oprot.writeStructBegin(STRUCT_DESC);
12795
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12796
      oprot.writeI64(this.userid);
12797
      oprot.writeFieldEnd();
12798
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
12799
      oprot.writeI64(this.addressId);
12800
      oprot.writeFieldEnd();
12801
      oprot.writeFieldStop();
12802
      oprot.writeStructEnd();
12803
    }
12804
 
12805
    @Override
12806
    public String toString() {
553 chandransh 12807
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 12808
      boolean first = true;
12809
 
12810
      sb.append("userid:");
12811
      sb.append(this.userid);
12812
      first = false;
12813
      if (!first) sb.append(", ");
12814
      sb.append("addressId:");
12815
      sb.append(this.addressId);
12816
      first = false;
12817
      sb.append(")");
12818
      return sb.toString();
12819
    }
12820
 
12821
    public void validate() throws TException {
12822
      // check for required fields
12823
    }
12824
 
12825
  }
12826
 
553 chandransh 12827
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
12828
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 12829
 
12830
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12831
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12832
 
12833
    private boolean success;
12834
    private UserContextException ucx;
12835
 
12836
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12837
    public enum _Fields implements TFieldIdEnum {
12838
      SUCCESS((short)0, "success"),
12839
      UCX((short)1, "ucx");
12840
 
12841
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12842
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12843
 
12844
      static {
12845
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12846
          byId.put((int)field._thriftId, field);
12847
          byName.put(field.getFieldName(), field);
12848
        }
12849
      }
12850
 
12851
      /**
12852
       * Find the _Fields constant that matches fieldId, or null if its not found.
12853
       */
12854
      public static _Fields findByThriftId(int fieldId) {
12855
        return byId.get(fieldId);
12856
      }
12857
 
12858
      /**
12859
       * Find the _Fields constant that matches fieldId, throwing an exception
12860
       * if it is not found.
12861
       */
12862
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12863
        _Fields fields = findByThriftId(fieldId);
12864
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12865
        return fields;
12866
      }
12867
 
12868
      /**
12869
       * Find the _Fields constant that matches name, or null if its not found.
12870
       */
12871
      public static _Fields findByName(String name) {
12872
        return byName.get(name);
12873
      }
12874
 
12875
      private final short _thriftId;
12876
      private final String _fieldName;
12877
 
12878
      _Fields(short thriftId, String fieldName) {
12879
        _thriftId = thriftId;
12880
        _fieldName = fieldName;
12881
      }
12882
 
12883
      public short getThriftFieldId() {
12884
        return _thriftId;
12885
      }
12886
 
12887
      public String getFieldName() {
12888
        return _fieldName;
12889
      }
12890
    }
12891
 
12892
    // isset id assignments
12893
    private static final int __SUCCESS_ISSET_ID = 0;
12894
    private BitSet __isset_bit_vector = new BitSet(1);
12895
 
12896
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12897
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12898
          new FieldValueMetaData(TType.BOOL)));
12899
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12900
          new FieldValueMetaData(TType.STRUCT)));
12901
    }});
12902
 
12903
    static {
553 chandransh 12904
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 12905
    }
12906
 
553 chandransh 12907
    public setDefaultAddress_result() {
48 ashish 12908
    }
12909
 
553 chandransh 12910
    public setDefaultAddress_result(
48 ashish 12911
      boolean success,
12912
      UserContextException ucx)
12913
    {
12914
      this();
12915
      this.success = success;
12916
      setSuccessIsSet(true);
12917
      this.ucx = ucx;
12918
    }
12919
 
12920
    /**
12921
     * Performs a deep copy on <i>other</i>.
12922
     */
553 chandransh 12923
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 12924
      __isset_bit_vector.clear();
12925
      __isset_bit_vector.or(other.__isset_bit_vector);
12926
      this.success = other.success;
12927
      if (other.isSetUcx()) {
12928
        this.ucx = new UserContextException(other.ucx);
12929
      }
12930
    }
12931
 
553 chandransh 12932
    public setDefaultAddress_result deepCopy() {
12933
      return new setDefaultAddress_result(this);
48 ashish 12934
    }
12935
 
12936
    @Deprecated
553 chandransh 12937
    public setDefaultAddress_result clone() {
12938
      return new setDefaultAddress_result(this);
48 ashish 12939
    }
12940
 
12941
    public boolean isSuccess() {
12942
      return this.success;
12943
    }
12944
 
553 chandransh 12945
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 12946
      this.success = success;
12947
      setSuccessIsSet(true);
12948
      return this;
12949
    }
12950
 
12951
    public void unsetSuccess() {
12952
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12953
    }
12954
 
12955
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12956
    public boolean isSetSuccess() {
12957
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12958
    }
12959
 
12960
    public void setSuccessIsSet(boolean value) {
12961
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12962
    }
12963
 
12964
    public UserContextException getUcx() {
12965
      return this.ucx;
12966
    }
12967
 
553 chandransh 12968
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 12969
      this.ucx = ucx;
12970
      return this;
12971
    }
12972
 
12973
    public void unsetUcx() {
12974
      this.ucx = null;
12975
    }
12976
 
12977
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12978
    public boolean isSetUcx() {
12979
      return this.ucx != null;
12980
    }
12981
 
12982
    public void setUcxIsSet(boolean value) {
12983
      if (!value) {
12984
        this.ucx = null;
12985
      }
12986
    }
12987
 
12988
    public void setFieldValue(_Fields field, Object value) {
12989
      switch (field) {
12990
      case SUCCESS:
12991
        if (value == null) {
12992
          unsetSuccess();
12993
        } else {
12994
          setSuccess((Boolean)value);
12995
        }
12996
        break;
12997
 
12998
      case UCX:
12999
        if (value == null) {
13000
          unsetUcx();
13001
        } else {
13002
          setUcx((UserContextException)value);
13003
        }
13004
        break;
13005
 
13006
      }
13007
    }
13008
 
13009
    public void setFieldValue(int fieldID, Object value) {
13010
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13011
    }
13012
 
13013
    public Object getFieldValue(_Fields field) {
13014
      switch (field) {
13015
      case SUCCESS:
13016
        return new Boolean(isSuccess());
13017
 
13018
      case UCX:
13019
        return getUcx();
13020
 
13021
      }
13022
      throw new IllegalStateException();
13023
    }
13024
 
13025
    public Object getFieldValue(int fieldId) {
13026
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13027
    }
13028
 
13029
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13030
    public boolean isSet(_Fields field) {
13031
      switch (field) {
13032
      case SUCCESS:
13033
        return isSetSuccess();
13034
      case UCX:
13035
        return isSetUcx();
13036
      }
13037
      throw new IllegalStateException();
13038
    }
13039
 
13040
    public boolean isSet(int fieldID) {
13041
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13042
    }
13043
 
13044
    @Override
13045
    public boolean equals(Object that) {
13046
      if (that == null)
13047
        return false;
553 chandransh 13048
      if (that instanceof setDefaultAddress_result)
13049
        return this.equals((setDefaultAddress_result)that);
48 ashish 13050
      return false;
13051
    }
13052
 
553 chandransh 13053
    public boolean equals(setDefaultAddress_result that) {
48 ashish 13054
      if (that == null)
13055
        return false;
13056
 
13057
      boolean this_present_success = true;
13058
      boolean that_present_success = true;
13059
      if (this_present_success || that_present_success) {
13060
        if (!(this_present_success && that_present_success))
13061
          return false;
13062
        if (this.success != that.success)
13063
          return false;
13064
      }
13065
 
13066
      boolean this_present_ucx = true && this.isSetUcx();
13067
      boolean that_present_ucx = true && that.isSetUcx();
13068
      if (this_present_ucx || that_present_ucx) {
13069
        if (!(this_present_ucx && that_present_ucx))
13070
          return false;
13071
        if (!this.ucx.equals(that.ucx))
13072
          return false;
13073
      }
13074
 
13075
      return true;
13076
    }
13077
 
13078
    @Override
13079
    public int hashCode() {
13080
      return 0;
13081
    }
13082
 
553 chandransh 13083
    public int compareTo(setDefaultAddress_result other) {
48 ashish 13084
      if (!getClass().equals(other.getClass())) {
13085
        return getClass().getName().compareTo(other.getClass().getName());
13086
      }
13087
 
13088
      int lastComparison = 0;
553 chandransh 13089
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 13090
 
13091
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13092
      if (lastComparison != 0) {
13093
        return lastComparison;
13094
      }
13095
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13096
      if (lastComparison != 0) {
13097
        return lastComparison;
13098
      }
13099
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13100
      if (lastComparison != 0) {
13101
        return lastComparison;
13102
      }
13103
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13104
      if (lastComparison != 0) {
13105
        return lastComparison;
13106
      }
13107
      return 0;
13108
    }
13109
 
13110
    public void read(TProtocol iprot) throws TException {
13111
      TField field;
13112
      iprot.readStructBegin();
13113
      while (true)
13114
      {
13115
        field = iprot.readFieldBegin();
13116
        if (field.type == TType.STOP) { 
13117
          break;
13118
        }
13119
        _Fields fieldId = _Fields.findByThriftId(field.id);
13120
        if (fieldId == null) {
13121
          TProtocolUtil.skip(iprot, field.type);
13122
        } else {
13123
          switch (fieldId) {
13124
            case SUCCESS:
13125
              if (field.type == TType.BOOL) {
13126
                this.success = iprot.readBool();
13127
                setSuccessIsSet(true);
13128
              } else { 
13129
                TProtocolUtil.skip(iprot, field.type);
13130
              }
13131
              break;
13132
            case UCX:
13133
              if (field.type == TType.STRUCT) {
13134
                this.ucx = new UserContextException();
13135
                this.ucx.read(iprot);
13136
              } else { 
13137
                TProtocolUtil.skip(iprot, field.type);
13138
              }
13139
              break;
13140
          }
13141
          iprot.readFieldEnd();
13142
        }
13143
      }
13144
      iprot.readStructEnd();
13145
      validate();
13146
    }
13147
 
13148
    public void write(TProtocol oprot) throws TException {
13149
      oprot.writeStructBegin(STRUCT_DESC);
13150
 
13151
      if (this.isSetSuccess()) {
13152
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13153
        oprot.writeBool(this.success);
13154
        oprot.writeFieldEnd();
13155
      } else if (this.isSetUcx()) {
13156
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13157
        this.ucx.write(oprot);
13158
        oprot.writeFieldEnd();
13159
      }
13160
      oprot.writeFieldStop();
13161
      oprot.writeStructEnd();
13162
    }
13163
 
13164
    @Override
13165
    public String toString() {
553 chandransh 13166
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 13167
      boolean first = true;
13168
 
13169
      sb.append("success:");
13170
      sb.append(this.success);
13171
      first = false;
13172
      if (!first) sb.append(", ");
13173
      sb.append("ucx:");
13174
      if (this.ucx == null) {
13175
        sb.append("null");
13176
      } else {
13177
        sb.append(this.ucx);
13178
      }
13179
      first = false;
13180
      sb.append(")");
13181
      return sb.toString();
13182
    }
13183
 
13184
    public void validate() throws TException {
13185
      // check for required fields
13186
    }
13187
 
13188
  }
13189
 
553 chandransh 13190
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
13191
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 13192
 
553 chandransh 13193
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 13194
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
13195
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 13196
 
553 chandransh 13197
    private long userid;
593 rajveer 13198
    private String oldPassword;
13199
    private String newPassword;
48 ashish 13200
 
13201
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13202
    public enum _Fields implements TFieldIdEnum {
553 chandransh 13203
      USERID((short)1, "userid"),
593 rajveer 13204
      OLD_PASSWORD((short)2, "oldPassword"),
13205
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 13206
 
13207
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13208
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13209
 
13210
      static {
13211
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13212
          byId.put((int)field._thriftId, field);
13213
          byName.put(field.getFieldName(), field);
13214
        }
13215
      }
13216
 
13217
      /**
13218
       * Find the _Fields constant that matches fieldId, or null if its not found.
13219
       */
13220
      public static _Fields findByThriftId(int fieldId) {
13221
        return byId.get(fieldId);
13222
      }
13223
 
13224
      /**
13225
       * Find the _Fields constant that matches fieldId, throwing an exception
13226
       * if it is not found.
13227
       */
13228
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13229
        _Fields fields = findByThriftId(fieldId);
13230
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13231
        return fields;
13232
      }
13233
 
13234
      /**
13235
       * Find the _Fields constant that matches name, or null if its not found.
13236
       */
13237
      public static _Fields findByName(String name) {
13238
        return byName.get(name);
13239
      }
13240
 
13241
      private final short _thriftId;
13242
      private final String _fieldName;
13243
 
13244
      _Fields(short thriftId, String fieldName) {
13245
        _thriftId = thriftId;
13246
        _fieldName = fieldName;
13247
      }
13248
 
13249
      public short getThriftFieldId() {
13250
        return _thriftId;
13251
      }
13252
 
13253
      public String getFieldName() {
13254
        return _fieldName;
13255
      }
13256
    }
13257
 
13258
    // isset id assignments
13259
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 13260
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 13261
 
13262
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 13263
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 13264
          new FieldValueMetaData(TType.I64)));
593 rajveer 13265
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 13266
          new FieldValueMetaData(TType.STRING)));
593 rajveer 13267
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
13268
          new FieldValueMetaData(TType.STRING)));
48 ashish 13269
    }});
13270
 
13271
    static {
553 chandransh 13272
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 13273
    }
13274
 
553 chandransh 13275
    public updatePassword_args() {
48 ashish 13276
    }
13277
 
553 chandransh 13278
    public updatePassword_args(
13279
      long userid,
593 rajveer 13280
      String oldPassword,
13281
      String newPassword)
48 ashish 13282
    {
13283
      this();
553 chandransh 13284
      this.userid = userid;
13285
      setUseridIsSet(true);
593 rajveer 13286
      this.oldPassword = oldPassword;
13287
      this.newPassword = newPassword;
48 ashish 13288
    }
13289
 
13290
    /**
13291
     * Performs a deep copy on <i>other</i>.
13292
     */
553 chandransh 13293
    public updatePassword_args(updatePassword_args other) {
48 ashish 13294
      __isset_bit_vector.clear();
13295
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 13296
      this.userid = other.userid;
593 rajveer 13297
      if (other.isSetOldPassword()) {
13298
        this.oldPassword = other.oldPassword;
553 chandransh 13299
      }
593 rajveer 13300
      if (other.isSetNewPassword()) {
13301
        this.newPassword = other.newPassword;
13302
      }
48 ashish 13303
    }
13304
 
553 chandransh 13305
    public updatePassword_args deepCopy() {
13306
      return new updatePassword_args(this);
48 ashish 13307
    }
13308
 
13309
    @Deprecated
553 chandransh 13310
    public updatePassword_args clone() {
13311
      return new updatePassword_args(this);
48 ashish 13312
    }
13313
 
553 chandransh 13314
    public long getUserid() {
13315
      return this.userid;
48 ashish 13316
    }
13317
 
553 chandransh 13318
    public updatePassword_args setUserid(long userid) {
13319
      this.userid = userid;
13320
      setUseridIsSet(true);
48 ashish 13321
      return this;
13322
    }
13323
 
553 chandransh 13324
    public void unsetUserid() {
48 ashish 13325
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13326
    }
13327
 
553 chandransh 13328
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13329
    public boolean isSetUserid() {
48 ashish 13330
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13331
    }
13332
 
553 chandransh 13333
    public void setUseridIsSet(boolean value) {
48 ashish 13334
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13335
    }
13336
 
593 rajveer 13337
    public String getOldPassword() {
13338
      return this.oldPassword;
48 ashish 13339
    }
13340
 
593 rajveer 13341
    public updatePassword_args setOldPassword(String oldPassword) {
13342
      this.oldPassword = oldPassword;
48 ashish 13343
      return this;
13344
    }
13345
 
593 rajveer 13346
    public void unsetOldPassword() {
13347
      this.oldPassword = null;
48 ashish 13348
    }
13349
 
593 rajveer 13350
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
13351
    public boolean isSetOldPassword() {
13352
      return this.oldPassword != null;
48 ashish 13353
    }
13354
 
593 rajveer 13355
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 13356
      if (!value) {
593 rajveer 13357
        this.oldPassword = null;
553 chandransh 13358
      }
48 ashish 13359
    }
13360
 
593 rajveer 13361
    public String getNewPassword() {
13362
      return this.newPassword;
13363
    }
13364
 
13365
    public updatePassword_args setNewPassword(String newPassword) {
13366
      this.newPassword = newPassword;
13367
      return this;
13368
    }
13369
 
13370
    public void unsetNewPassword() {
13371
      this.newPassword = null;
13372
    }
13373
 
13374
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
13375
    public boolean isSetNewPassword() {
13376
      return this.newPassword != null;
13377
    }
13378
 
13379
    public void setNewPasswordIsSet(boolean value) {
13380
      if (!value) {
13381
        this.newPassword = null;
13382
      }
13383
    }
13384
 
48 ashish 13385
    public void setFieldValue(_Fields field, Object value) {
13386
      switch (field) {
553 chandransh 13387
      case USERID:
48 ashish 13388
        if (value == null) {
553 chandransh 13389
          unsetUserid();
48 ashish 13390
        } else {
553 chandransh 13391
          setUserid((Long)value);
48 ashish 13392
        }
13393
        break;
13394
 
593 rajveer 13395
      case OLD_PASSWORD:
48 ashish 13396
        if (value == null) {
593 rajveer 13397
          unsetOldPassword();
48 ashish 13398
        } else {
593 rajveer 13399
          setOldPassword((String)value);
48 ashish 13400
        }
13401
        break;
13402
 
593 rajveer 13403
      case NEW_PASSWORD:
13404
        if (value == null) {
13405
          unsetNewPassword();
13406
        } else {
13407
          setNewPassword((String)value);
13408
        }
13409
        break;
13410
 
48 ashish 13411
      }
13412
    }
13413
 
13414
    public void setFieldValue(int fieldID, Object value) {
13415
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13416
    }
13417
 
13418
    public Object getFieldValue(_Fields field) {
13419
      switch (field) {
553 chandransh 13420
      case USERID:
13421
        return new Long(getUserid());
48 ashish 13422
 
593 rajveer 13423
      case OLD_PASSWORD:
13424
        return getOldPassword();
48 ashish 13425
 
593 rajveer 13426
      case NEW_PASSWORD:
13427
        return getNewPassword();
13428
 
48 ashish 13429
      }
13430
      throw new IllegalStateException();
13431
    }
13432
 
13433
    public Object getFieldValue(int fieldId) {
13434
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13435
    }
13436
 
13437
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13438
    public boolean isSet(_Fields field) {
13439
      switch (field) {
553 chandransh 13440
      case USERID:
13441
        return isSetUserid();
593 rajveer 13442
      case OLD_PASSWORD:
13443
        return isSetOldPassword();
13444
      case NEW_PASSWORD:
13445
        return isSetNewPassword();
48 ashish 13446
      }
13447
      throw new IllegalStateException();
13448
    }
13449
 
13450
    public boolean isSet(int fieldID) {
13451
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13452
    }
13453
 
13454
    @Override
13455
    public boolean equals(Object that) {
13456
      if (that == null)
13457
        return false;
553 chandransh 13458
      if (that instanceof updatePassword_args)
13459
        return this.equals((updatePassword_args)that);
48 ashish 13460
      return false;
13461
    }
13462
 
553 chandransh 13463
    public boolean equals(updatePassword_args that) {
48 ashish 13464
      if (that == null)
13465
        return false;
13466
 
553 chandransh 13467
      boolean this_present_userid = true;
13468
      boolean that_present_userid = true;
13469
      if (this_present_userid || that_present_userid) {
13470
        if (!(this_present_userid && that_present_userid))
48 ashish 13471
          return false;
553 chandransh 13472
        if (this.userid != that.userid)
48 ashish 13473
          return false;
13474
      }
13475
 
593 rajveer 13476
      boolean this_present_oldPassword = true && this.isSetOldPassword();
13477
      boolean that_present_oldPassword = true && that.isSetOldPassword();
13478
      if (this_present_oldPassword || that_present_oldPassword) {
13479
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 13480
          return false;
593 rajveer 13481
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 13482
          return false;
13483
      }
13484
 
593 rajveer 13485
      boolean this_present_newPassword = true && this.isSetNewPassword();
13486
      boolean that_present_newPassword = true && that.isSetNewPassword();
13487
      if (this_present_newPassword || that_present_newPassword) {
13488
        if (!(this_present_newPassword && that_present_newPassword))
13489
          return false;
13490
        if (!this.newPassword.equals(that.newPassword))
13491
          return false;
13492
      }
13493
 
48 ashish 13494
      return true;
13495
    }
13496
 
13497
    @Override
13498
    public int hashCode() {
13499
      return 0;
13500
    }
13501
 
553 chandransh 13502
    public int compareTo(updatePassword_args other) {
48 ashish 13503
      if (!getClass().equals(other.getClass())) {
13504
        return getClass().getName().compareTo(other.getClass().getName());
13505
      }
13506
 
13507
      int lastComparison = 0;
553 chandransh 13508
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 13509
 
553 chandransh 13510
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 13511
      if (lastComparison != 0) {
13512
        return lastComparison;
13513
      }
553 chandransh 13514
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 13515
      if (lastComparison != 0) {
13516
        return lastComparison;
13517
      }
593 rajveer 13518
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 13519
      if (lastComparison != 0) {
13520
        return lastComparison;
13521
      }
593 rajveer 13522
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 13523
      if (lastComparison != 0) {
13524
        return lastComparison;
13525
      }
593 rajveer 13526
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
13527
      if (lastComparison != 0) {
13528
        return lastComparison;
13529
      }
13530
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
13531
      if (lastComparison != 0) {
13532
        return lastComparison;
13533
      }
48 ashish 13534
      return 0;
13535
    }
13536
 
13537
    public void read(TProtocol iprot) throws TException {
13538
      TField field;
13539
      iprot.readStructBegin();
13540
      while (true)
13541
      {
13542
        field = iprot.readFieldBegin();
13543
        if (field.type == TType.STOP) { 
13544
          break;
13545
        }
13546
        _Fields fieldId = _Fields.findByThriftId(field.id);
13547
        if (fieldId == null) {
13548
          TProtocolUtil.skip(iprot, field.type);
13549
        } else {
13550
          switch (fieldId) {
553 chandransh 13551
            case USERID:
48 ashish 13552
              if (field.type == TType.I64) {
553 chandransh 13553
                this.userid = iprot.readI64();
13554
                setUseridIsSet(true);
48 ashish 13555
              } else { 
13556
                TProtocolUtil.skip(iprot, field.type);
13557
              }
13558
              break;
593 rajveer 13559
            case OLD_PASSWORD:
553 chandransh 13560
              if (field.type == TType.STRING) {
593 rajveer 13561
                this.oldPassword = iprot.readString();
48 ashish 13562
              } else { 
13563
                TProtocolUtil.skip(iprot, field.type);
13564
              }
13565
              break;
593 rajveer 13566
            case NEW_PASSWORD:
13567
              if (field.type == TType.STRING) {
13568
                this.newPassword = iprot.readString();
13569
              } else { 
13570
                TProtocolUtil.skip(iprot, field.type);
13571
              }
13572
              break;
48 ashish 13573
          }
13574
          iprot.readFieldEnd();
13575
        }
13576
      }
13577
      iprot.readStructEnd();
13578
      validate();
13579
    }
13580
 
13581
    public void write(TProtocol oprot) throws TException {
13582
      validate();
13583
 
13584
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 13585
      oprot.writeFieldBegin(USERID_FIELD_DESC);
13586
      oprot.writeI64(this.userid);
48 ashish 13587
      oprot.writeFieldEnd();
593 rajveer 13588
      if (this.oldPassword != null) {
13589
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
13590
        oprot.writeString(this.oldPassword);
553 chandransh 13591
        oprot.writeFieldEnd();
13592
      }
593 rajveer 13593
      if (this.newPassword != null) {
13594
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
13595
        oprot.writeString(this.newPassword);
13596
        oprot.writeFieldEnd();
13597
      }
48 ashish 13598
      oprot.writeFieldStop();
13599
      oprot.writeStructEnd();
13600
    }
13601
 
13602
    @Override
13603
    public String toString() {
553 chandransh 13604
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 13605
      boolean first = true;
13606
 
553 chandransh 13607
      sb.append("userid:");
13608
      sb.append(this.userid);
48 ashish 13609
      first = false;
13610
      if (!first) sb.append(", ");
593 rajveer 13611
      sb.append("oldPassword:");
13612
      if (this.oldPassword == null) {
553 chandransh 13613
        sb.append("null");
13614
      } else {
593 rajveer 13615
        sb.append(this.oldPassword);
553 chandransh 13616
      }
48 ashish 13617
      first = false;
593 rajveer 13618
      if (!first) sb.append(", ");
13619
      sb.append("newPassword:");
13620
      if (this.newPassword == null) {
13621
        sb.append("null");
13622
      } else {
13623
        sb.append(this.newPassword);
13624
      }
13625
      first = false;
48 ashish 13626
      sb.append(")");
13627
      return sb.toString();
13628
    }
13629
 
13630
    public void validate() throws TException {
13631
      // check for required fields
13632
    }
13633
 
13634
  }
13635
 
553 chandransh 13636
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
13637
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 13638
 
13639
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13640
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13641
 
13642
    private boolean success;
13643
    private UserContextException ucx;
13644
 
13645
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13646
    public enum _Fields implements TFieldIdEnum {
13647
      SUCCESS((short)0, "success"),
13648
      UCX((short)1, "ucx");
13649
 
13650
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13651
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13652
 
13653
      static {
13654
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13655
          byId.put((int)field._thriftId, field);
13656
          byName.put(field.getFieldName(), field);
13657
        }
13658
      }
13659
 
13660
      /**
13661
       * Find the _Fields constant that matches fieldId, or null if its not found.
13662
       */
13663
      public static _Fields findByThriftId(int fieldId) {
13664
        return byId.get(fieldId);
13665
      }
13666
 
13667
      /**
13668
       * Find the _Fields constant that matches fieldId, throwing an exception
13669
       * if it is not found.
13670
       */
13671
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13672
        _Fields fields = findByThriftId(fieldId);
13673
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13674
        return fields;
13675
      }
13676
 
13677
      /**
13678
       * Find the _Fields constant that matches name, or null if its not found.
13679
       */
13680
      public static _Fields findByName(String name) {
13681
        return byName.get(name);
13682
      }
13683
 
13684
      private final short _thriftId;
13685
      private final String _fieldName;
13686
 
13687
      _Fields(short thriftId, String fieldName) {
13688
        _thriftId = thriftId;
13689
        _fieldName = fieldName;
13690
      }
13691
 
13692
      public short getThriftFieldId() {
13693
        return _thriftId;
13694
      }
13695
 
13696
      public String getFieldName() {
13697
        return _fieldName;
13698
      }
13699
    }
13700
 
13701
    // isset id assignments
13702
    private static final int __SUCCESS_ISSET_ID = 0;
13703
    private BitSet __isset_bit_vector = new BitSet(1);
13704
 
13705
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13706
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13707
          new FieldValueMetaData(TType.BOOL)));
13708
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13709
          new FieldValueMetaData(TType.STRUCT)));
13710
    }});
13711
 
13712
    static {
553 chandransh 13713
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 13714
    }
13715
 
553 chandransh 13716
    public updatePassword_result() {
48 ashish 13717
    }
13718
 
553 chandransh 13719
    public updatePassword_result(
48 ashish 13720
      boolean success,
13721
      UserContextException ucx)
13722
    {
13723
      this();
13724
      this.success = success;
13725
      setSuccessIsSet(true);
13726
      this.ucx = ucx;
13727
    }
13728
 
13729
    /**
13730
     * Performs a deep copy on <i>other</i>.
13731
     */
553 chandransh 13732
    public updatePassword_result(updatePassword_result other) {
48 ashish 13733
      __isset_bit_vector.clear();
13734
      __isset_bit_vector.or(other.__isset_bit_vector);
13735
      this.success = other.success;
13736
      if (other.isSetUcx()) {
13737
        this.ucx = new UserContextException(other.ucx);
13738
      }
13739
    }
13740
 
553 chandransh 13741
    public updatePassword_result deepCopy() {
13742
      return new updatePassword_result(this);
48 ashish 13743
    }
13744
 
13745
    @Deprecated
553 chandransh 13746
    public updatePassword_result clone() {
13747
      return new updatePassword_result(this);
48 ashish 13748
    }
13749
 
13750
    public boolean isSuccess() {
13751
      return this.success;
13752
    }
13753
 
553 chandransh 13754
    public updatePassword_result setSuccess(boolean success) {
48 ashish 13755
      this.success = success;
13756
      setSuccessIsSet(true);
13757
      return this;
13758
    }
13759
 
13760
    public void unsetSuccess() {
13761
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13762
    }
13763
 
13764
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13765
    public boolean isSetSuccess() {
13766
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13767
    }
13768
 
13769
    public void setSuccessIsSet(boolean value) {
13770
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13771
    }
13772
 
13773
    public UserContextException getUcx() {
13774
      return this.ucx;
13775
    }
13776
 
553 chandransh 13777
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 13778
      this.ucx = ucx;
13779
      return this;
13780
    }
13781
 
13782
    public void unsetUcx() {
13783
      this.ucx = null;
13784
    }
13785
 
13786
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13787
    public boolean isSetUcx() {
13788
      return this.ucx != null;
13789
    }
13790
 
13791
    public void setUcxIsSet(boolean value) {
13792
      if (!value) {
13793
        this.ucx = null;
13794
      }
13795
    }
13796
 
13797
    public void setFieldValue(_Fields field, Object value) {
13798
      switch (field) {
13799
      case SUCCESS:
13800
        if (value == null) {
13801
          unsetSuccess();
13802
        } else {
13803
          setSuccess((Boolean)value);
13804
        }
13805
        break;
13806
 
13807
      case UCX:
13808
        if (value == null) {
13809
          unsetUcx();
13810
        } else {
13811
          setUcx((UserContextException)value);
13812
        }
13813
        break;
13814
 
13815
      }
13816
    }
13817
 
13818
    public void setFieldValue(int fieldID, Object value) {
13819
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13820
    }
13821
 
13822
    public Object getFieldValue(_Fields field) {
13823
      switch (field) {
13824
      case SUCCESS:
13825
        return new Boolean(isSuccess());
13826
 
13827
      case UCX:
13828
        return getUcx();
13829
 
13830
      }
13831
      throw new IllegalStateException();
13832
    }
13833
 
13834
    public Object getFieldValue(int fieldId) {
13835
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13836
    }
13837
 
13838
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13839
    public boolean isSet(_Fields field) {
13840
      switch (field) {
13841
      case SUCCESS:
13842
        return isSetSuccess();
13843
      case UCX:
13844
        return isSetUcx();
13845
      }
13846
      throw new IllegalStateException();
13847
    }
13848
 
13849
    public boolean isSet(int fieldID) {
13850
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13851
    }
13852
 
13853
    @Override
13854
    public boolean equals(Object that) {
13855
      if (that == null)
13856
        return false;
553 chandransh 13857
      if (that instanceof updatePassword_result)
13858
        return this.equals((updatePassword_result)that);
48 ashish 13859
      return false;
13860
    }
13861
 
553 chandransh 13862
    public boolean equals(updatePassword_result that) {
48 ashish 13863
      if (that == null)
13864
        return false;
13865
 
13866
      boolean this_present_success = true;
13867
      boolean that_present_success = true;
13868
      if (this_present_success || that_present_success) {
13869
        if (!(this_present_success && that_present_success))
13870
          return false;
13871
        if (this.success != that.success)
13872
          return false;
13873
      }
13874
 
13875
      boolean this_present_ucx = true && this.isSetUcx();
13876
      boolean that_present_ucx = true && that.isSetUcx();
13877
      if (this_present_ucx || that_present_ucx) {
13878
        if (!(this_present_ucx && that_present_ucx))
13879
          return false;
13880
        if (!this.ucx.equals(that.ucx))
13881
          return false;
13882
      }
13883
 
13884
      return true;
13885
    }
13886
 
13887
    @Override
13888
    public int hashCode() {
13889
      return 0;
13890
    }
13891
 
553 chandransh 13892
    public int compareTo(updatePassword_result other) {
48 ashish 13893
      if (!getClass().equals(other.getClass())) {
13894
        return getClass().getName().compareTo(other.getClass().getName());
13895
      }
13896
 
13897
      int lastComparison = 0;
553 chandransh 13898
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 13899
 
13900
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13901
      if (lastComparison != 0) {
13902
        return lastComparison;
13903
      }
13904
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13905
      if (lastComparison != 0) {
13906
        return lastComparison;
13907
      }
13908
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13909
      if (lastComparison != 0) {
13910
        return lastComparison;
13911
      }
13912
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13913
      if (lastComparison != 0) {
13914
        return lastComparison;
13915
      }
13916
      return 0;
13917
    }
13918
 
13919
    public void read(TProtocol iprot) throws TException {
13920
      TField field;
13921
      iprot.readStructBegin();
13922
      while (true)
13923
      {
13924
        field = iprot.readFieldBegin();
13925
        if (field.type == TType.STOP) { 
13926
          break;
13927
        }
13928
        _Fields fieldId = _Fields.findByThriftId(field.id);
13929
        if (fieldId == null) {
13930
          TProtocolUtil.skip(iprot, field.type);
13931
        } else {
13932
          switch (fieldId) {
13933
            case SUCCESS:
13934
              if (field.type == TType.BOOL) {
13935
                this.success = iprot.readBool();
13936
                setSuccessIsSet(true);
13937
              } else { 
13938
                TProtocolUtil.skip(iprot, field.type);
13939
              }
13940
              break;
13941
            case UCX:
13942
              if (field.type == TType.STRUCT) {
13943
                this.ucx = new UserContextException();
13944
                this.ucx.read(iprot);
13945
              } else { 
13946
                TProtocolUtil.skip(iprot, field.type);
13947
              }
13948
              break;
13949
          }
13950
          iprot.readFieldEnd();
13951
        }
13952
      }
13953
      iprot.readStructEnd();
13954
      validate();
13955
    }
13956
 
13957
    public void write(TProtocol oprot) throws TException {
13958
      oprot.writeStructBegin(STRUCT_DESC);
13959
 
13960
      if (this.isSetSuccess()) {
13961
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13962
        oprot.writeBool(this.success);
13963
        oprot.writeFieldEnd();
13964
      } else if (this.isSetUcx()) {
13965
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13966
        this.ucx.write(oprot);
13967
        oprot.writeFieldEnd();
13968
      }
13969
      oprot.writeFieldStop();
13970
      oprot.writeStructEnd();
13971
    }
13972
 
13973
    @Override
13974
    public String toString() {
553 chandransh 13975
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 13976
      boolean first = true;
13977
 
13978
      sb.append("success:");
13979
      sb.append(this.success);
13980
      first = false;
13981
      if (!first) sb.append(", ");
13982
      sb.append("ucx:");
13983
      if (this.ucx == null) {
13984
        sb.append("null");
13985
      } else {
13986
        sb.append(this.ucx);
13987
      }
13988
      first = false;
13989
      sb.append(")");
13990
      return sb.toString();
13991
    }
13992
 
13993
    public void validate() throws TException {
13994
      // check for required fields
13995
    }
13996
 
13997
  }
13998
 
582 rajveer 13999
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
14000
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
14001
 
14002
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
896 rajveer 14003
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)2);
582 rajveer 14004
 
14005
    private String email;
896 rajveer 14006
    private String newPassword;
582 rajveer 14007
 
14008
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14009
    public enum _Fields implements TFieldIdEnum {
896 rajveer 14010
      EMAIL((short)1, "email"),
14011
      NEW_PASSWORD((short)2, "newPassword");
582 rajveer 14012
 
14013
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14014
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14015
 
14016
      static {
14017
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14018
          byId.put((int)field._thriftId, field);
14019
          byName.put(field.getFieldName(), field);
14020
        }
14021
      }
14022
 
14023
      /**
14024
       * Find the _Fields constant that matches fieldId, or null if its not found.
14025
       */
14026
      public static _Fields findByThriftId(int fieldId) {
14027
        return byId.get(fieldId);
14028
      }
14029
 
14030
      /**
14031
       * Find the _Fields constant that matches fieldId, throwing an exception
14032
       * if it is not found.
14033
       */
14034
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14035
        _Fields fields = findByThriftId(fieldId);
14036
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14037
        return fields;
14038
      }
14039
 
14040
      /**
14041
       * Find the _Fields constant that matches name, or null if its not found.
14042
       */
14043
      public static _Fields findByName(String name) {
14044
        return byName.get(name);
14045
      }
14046
 
14047
      private final short _thriftId;
14048
      private final String _fieldName;
14049
 
14050
      _Fields(short thriftId, String fieldName) {
14051
        _thriftId = thriftId;
14052
        _fieldName = fieldName;
14053
      }
14054
 
14055
      public short getThriftFieldId() {
14056
        return _thriftId;
14057
      }
14058
 
14059
      public String getFieldName() {
14060
        return _fieldName;
14061
      }
14062
    }
14063
 
14064
    // isset id assignments
14065
 
14066
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14067
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
14068
          new FieldValueMetaData(TType.STRING)));
896 rajveer 14069
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
14070
          new FieldValueMetaData(TType.STRING)));
582 rajveer 14071
    }});
14072
 
14073
    static {
14074
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
14075
    }
14076
 
14077
    public forgotPassword_args() {
14078
    }
14079
 
14080
    public forgotPassword_args(
896 rajveer 14081
      String email,
14082
      String newPassword)
582 rajveer 14083
    {
14084
      this();
14085
      this.email = email;
896 rajveer 14086
      this.newPassword = newPassword;
582 rajveer 14087
    }
14088
 
14089
    /**
14090
     * Performs a deep copy on <i>other</i>.
14091
     */
14092
    public forgotPassword_args(forgotPassword_args other) {
14093
      if (other.isSetEmail()) {
14094
        this.email = other.email;
14095
      }
896 rajveer 14096
      if (other.isSetNewPassword()) {
14097
        this.newPassword = other.newPassword;
14098
      }
582 rajveer 14099
    }
14100
 
14101
    public forgotPassword_args deepCopy() {
14102
      return new forgotPassword_args(this);
14103
    }
14104
 
14105
    @Deprecated
14106
    public forgotPassword_args clone() {
14107
      return new forgotPassword_args(this);
14108
    }
14109
 
14110
    public String getEmail() {
14111
      return this.email;
14112
    }
14113
 
14114
    public forgotPassword_args setEmail(String email) {
14115
      this.email = email;
14116
      return this;
14117
    }
14118
 
14119
    public void unsetEmail() {
14120
      this.email = null;
14121
    }
14122
 
14123
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
14124
    public boolean isSetEmail() {
14125
      return this.email != null;
14126
    }
14127
 
14128
    public void setEmailIsSet(boolean value) {
14129
      if (!value) {
14130
        this.email = null;
14131
      }
14132
    }
14133
 
896 rajveer 14134
    public String getNewPassword() {
14135
      return this.newPassword;
14136
    }
14137
 
14138
    public forgotPassword_args setNewPassword(String newPassword) {
14139
      this.newPassword = newPassword;
14140
      return this;
14141
    }
14142
 
14143
    public void unsetNewPassword() {
14144
      this.newPassword = null;
14145
    }
14146
 
14147
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
14148
    public boolean isSetNewPassword() {
14149
      return this.newPassword != null;
14150
    }
14151
 
14152
    public void setNewPasswordIsSet(boolean value) {
14153
      if (!value) {
14154
        this.newPassword = null;
14155
      }
14156
    }
14157
 
582 rajveer 14158
    public void setFieldValue(_Fields field, Object value) {
14159
      switch (field) {
14160
      case EMAIL:
14161
        if (value == null) {
14162
          unsetEmail();
14163
        } else {
14164
          setEmail((String)value);
14165
        }
14166
        break;
14167
 
896 rajveer 14168
      case NEW_PASSWORD:
14169
        if (value == null) {
14170
          unsetNewPassword();
14171
        } else {
14172
          setNewPassword((String)value);
14173
        }
14174
        break;
14175
 
582 rajveer 14176
      }
14177
    }
14178
 
14179
    public void setFieldValue(int fieldID, Object value) {
14180
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14181
    }
14182
 
14183
    public Object getFieldValue(_Fields field) {
14184
      switch (field) {
14185
      case EMAIL:
14186
        return getEmail();
14187
 
896 rajveer 14188
      case NEW_PASSWORD:
14189
        return getNewPassword();
14190
 
582 rajveer 14191
      }
14192
      throw new IllegalStateException();
14193
    }
14194
 
14195
    public Object getFieldValue(int fieldId) {
14196
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14197
    }
14198
 
14199
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14200
    public boolean isSet(_Fields field) {
14201
      switch (field) {
14202
      case EMAIL:
14203
        return isSetEmail();
896 rajveer 14204
      case NEW_PASSWORD:
14205
        return isSetNewPassword();
582 rajveer 14206
      }
14207
      throw new IllegalStateException();
14208
    }
14209
 
14210
    public boolean isSet(int fieldID) {
14211
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14212
    }
14213
 
14214
    @Override
14215
    public boolean equals(Object that) {
14216
      if (that == null)
14217
        return false;
14218
      if (that instanceof forgotPassword_args)
14219
        return this.equals((forgotPassword_args)that);
14220
      return false;
14221
    }
14222
 
14223
    public boolean equals(forgotPassword_args that) {
14224
      if (that == null)
14225
        return false;
14226
 
14227
      boolean this_present_email = true && this.isSetEmail();
14228
      boolean that_present_email = true && that.isSetEmail();
14229
      if (this_present_email || that_present_email) {
14230
        if (!(this_present_email && that_present_email))
14231
          return false;
14232
        if (!this.email.equals(that.email))
14233
          return false;
14234
      }
14235
 
896 rajveer 14236
      boolean this_present_newPassword = true && this.isSetNewPassword();
14237
      boolean that_present_newPassword = true && that.isSetNewPassword();
14238
      if (this_present_newPassword || that_present_newPassword) {
14239
        if (!(this_present_newPassword && that_present_newPassword))
14240
          return false;
14241
        if (!this.newPassword.equals(that.newPassword))
14242
          return false;
14243
      }
14244
 
582 rajveer 14245
      return true;
14246
    }
14247
 
14248
    @Override
14249
    public int hashCode() {
14250
      return 0;
14251
    }
14252
 
14253
    public int compareTo(forgotPassword_args other) {
14254
      if (!getClass().equals(other.getClass())) {
14255
        return getClass().getName().compareTo(other.getClass().getName());
14256
      }
14257
 
14258
      int lastComparison = 0;
14259
      forgotPassword_args typedOther = (forgotPassword_args)other;
14260
 
14261
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
14262
      if (lastComparison != 0) {
14263
        return lastComparison;
14264
      }
14265
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
14266
      if (lastComparison != 0) {
14267
        return lastComparison;
14268
      }
896 rajveer 14269
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
14270
      if (lastComparison != 0) {
14271
        return lastComparison;
14272
      }
14273
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
14274
      if (lastComparison != 0) {
14275
        return lastComparison;
14276
      }
582 rajveer 14277
      return 0;
14278
    }
14279
 
14280
    public void read(TProtocol iprot) throws TException {
14281
      TField field;
14282
      iprot.readStructBegin();
14283
      while (true)
14284
      {
14285
        field = iprot.readFieldBegin();
14286
        if (field.type == TType.STOP) { 
14287
          break;
14288
        }
14289
        _Fields fieldId = _Fields.findByThriftId(field.id);
14290
        if (fieldId == null) {
14291
          TProtocolUtil.skip(iprot, field.type);
14292
        } else {
14293
          switch (fieldId) {
14294
            case EMAIL:
14295
              if (field.type == TType.STRING) {
14296
                this.email = iprot.readString();
14297
              } else { 
14298
                TProtocolUtil.skip(iprot, field.type);
14299
              }
14300
              break;
896 rajveer 14301
            case NEW_PASSWORD:
14302
              if (field.type == TType.STRING) {
14303
                this.newPassword = iprot.readString();
14304
              } else { 
14305
                TProtocolUtil.skip(iprot, field.type);
14306
              }
14307
              break;
582 rajveer 14308
          }
14309
          iprot.readFieldEnd();
14310
        }
14311
      }
14312
      iprot.readStructEnd();
14313
      validate();
14314
    }
14315
 
14316
    public void write(TProtocol oprot) throws TException {
14317
      validate();
14318
 
14319
      oprot.writeStructBegin(STRUCT_DESC);
14320
      if (this.email != null) {
14321
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
14322
        oprot.writeString(this.email);
14323
        oprot.writeFieldEnd();
14324
      }
896 rajveer 14325
      if (this.newPassword != null) {
14326
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
14327
        oprot.writeString(this.newPassword);
14328
        oprot.writeFieldEnd();
14329
      }
582 rajveer 14330
      oprot.writeFieldStop();
14331
      oprot.writeStructEnd();
14332
    }
14333
 
14334
    @Override
14335
    public String toString() {
14336
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
14337
      boolean first = true;
14338
 
14339
      sb.append("email:");
14340
      if (this.email == null) {
14341
        sb.append("null");
14342
      } else {
14343
        sb.append(this.email);
14344
      }
14345
      first = false;
896 rajveer 14346
      if (!first) sb.append(", ");
14347
      sb.append("newPassword:");
14348
      if (this.newPassword == null) {
14349
        sb.append("null");
14350
      } else {
14351
        sb.append(this.newPassword);
14352
      }
14353
      first = false;
582 rajveer 14354
      sb.append(")");
14355
      return sb.toString();
14356
    }
14357
 
14358
    public void validate() throws TException {
14359
      // check for required fields
14360
    }
14361
 
14362
  }
14363
 
14364
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
14365
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
14366
 
14367
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14368
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14369
 
14370
    private boolean success;
14371
    private UserContextException ucx;
14372
 
14373
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14374
    public enum _Fields implements TFieldIdEnum {
14375
      SUCCESS((short)0, "success"),
14376
      UCX((short)1, "ucx");
14377
 
14378
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14379
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14380
 
14381
      static {
14382
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14383
          byId.put((int)field._thriftId, field);
14384
          byName.put(field.getFieldName(), field);
14385
        }
14386
      }
14387
 
14388
      /**
14389
       * Find the _Fields constant that matches fieldId, or null if its not found.
14390
       */
14391
      public static _Fields findByThriftId(int fieldId) {
14392
        return byId.get(fieldId);
14393
      }
14394
 
14395
      /**
14396
       * Find the _Fields constant that matches fieldId, throwing an exception
14397
       * if it is not found.
14398
       */
14399
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14400
        _Fields fields = findByThriftId(fieldId);
14401
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14402
        return fields;
14403
      }
14404
 
14405
      /**
14406
       * Find the _Fields constant that matches name, or null if its not found.
14407
       */
14408
      public static _Fields findByName(String name) {
14409
        return byName.get(name);
14410
      }
14411
 
14412
      private final short _thriftId;
14413
      private final String _fieldName;
14414
 
14415
      _Fields(short thriftId, String fieldName) {
14416
        _thriftId = thriftId;
14417
        _fieldName = fieldName;
14418
      }
14419
 
14420
      public short getThriftFieldId() {
14421
        return _thriftId;
14422
      }
14423
 
14424
      public String getFieldName() {
14425
        return _fieldName;
14426
      }
14427
    }
14428
 
14429
    // isset id assignments
14430
    private static final int __SUCCESS_ISSET_ID = 0;
14431
    private BitSet __isset_bit_vector = new BitSet(1);
14432
 
14433
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14434
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14435
          new FieldValueMetaData(TType.BOOL)));
14436
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14437
          new FieldValueMetaData(TType.STRUCT)));
14438
    }});
14439
 
14440
    static {
14441
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
14442
    }
14443
 
14444
    public forgotPassword_result() {
14445
    }
14446
 
14447
    public forgotPassword_result(
14448
      boolean success,
14449
      UserContextException ucx)
14450
    {
14451
      this();
14452
      this.success = success;
14453
      setSuccessIsSet(true);
14454
      this.ucx = ucx;
14455
    }
14456
 
14457
    /**
14458
     * Performs a deep copy on <i>other</i>.
14459
     */
14460
    public forgotPassword_result(forgotPassword_result other) {
14461
      __isset_bit_vector.clear();
14462
      __isset_bit_vector.or(other.__isset_bit_vector);
14463
      this.success = other.success;
14464
      if (other.isSetUcx()) {
14465
        this.ucx = new UserContextException(other.ucx);
14466
      }
14467
    }
14468
 
14469
    public forgotPassword_result deepCopy() {
14470
      return new forgotPassword_result(this);
14471
    }
14472
 
14473
    @Deprecated
14474
    public forgotPassword_result clone() {
14475
      return new forgotPassword_result(this);
14476
    }
14477
 
14478
    public boolean isSuccess() {
14479
      return this.success;
14480
    }
14481
 
14482
    public forgotPassword_result setSuccess(boolean success) {
14483
      this.success = success;
14484
      setSuccessIsSet(true);
14485
      return this;
14486
    }
14487
 
14488
    public void unsetSuccess() {
14489
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14490
    }
14491
 
14492
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14493
    public boolean isSetSuccess() {
14494
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14495
    }
14496
 
14497
    public void setSuccessIsSet(boolean value) {
14498
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14499
    }
14500
 
14501
    public UserContextException getUcx() {
14502
      return this.ucx;
14503
    }
14504
 
14505
    public forgotPassword_result setUcx(UserContextException ucx) {
14506
      this.ucx = ucx;
14507
      return this;
14508
    }
14509
 
14510
    public void unsetUcx() {
14511
      this.ucx = null;
14512
    }
14513
 
14514
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14515
    public boolean isSetUcx() {
14516
      return this.ucx != null;
14517
    }
14518
 
14519
    public void setUcxIsSet(boolean value) {
14520
      if (!value) {
14521
        this.ucx = null;
14522
      }
14523
    }
14524
 
14525
    public void setFieldValue(_Fields field, Object value) {
14526
      switch (field) {
14527
      case SUCCESS:
14528
        if (value == null) {
14529
          unsetSuccess();
14530
        } else {
14531
          setSuccess((Boolean)value);
14532
        }
14533
        break;
14534
 
14535
      case UCX:
14536
        if (value == null) {
14537
          unsetUcx();
14538
        } else {
14539
          setUcx((UserContextException)value);
14540
        }
14541
        break;
14542
 
14543
      }
14544
    }
14545
 
14546
    public void setFieldValue(int fieldID, Object value) {
14547
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14548
    }
14549
 
14550
    public Object getFieldValue(_Fields field) {
14551
      switch (field) {
14552
      case SUCCESS:
14553
        return new Boolean(isSuccess());
14554
 
14555
      case UCX:
14556
        return getUcx();
14557
 
14558
      }
14559
      throw new IllegalStateException();
14560
    }
14561
 
14562
    public Object getFieldValue(int fieldId) {
14563
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14564
    }
14565
 
14566
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14567
    public boolean isSet(_Fields field) {
14568
      switch (field) {
14569
      case SUCCESS:
14570
        return isSetSuccess();
14571
      case UCX:
14572
        return isSetUcx();
14573
      }
14574
      throw new IllegalStateException();
14575
    }
14576
 
14577
    public boolean isSet(int fieldID) {
14578
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14579
    }
14580
 
14581
    @Override
14582
    public boolean equals(Object that) {
14583
      if (that == null)
14584
        return false;
14585
      if (that instanceof forgotPassword_result)
14586
        return this.equals((forgotPassword_result)that);
14587
      return false;
14588
    }
14589
 
14590
    public boolean equals(forgotPassword_result that) {
14591
      if (that == null)
14592
        return false;
14593
 
14594
      boolean this_present_success = true;
14595
      boolean that_present_success = true;
14596
      if (this_present_success || that_present_success) {
14597
        if (!(this_present_success && that_present_success))
14598
          return false;
14599
        if (this.success != that.success)
14600
          return false;
14601
      }
14602
 
14603
      boolean this_present_ucx = true && this.isSetUcx();
14604
      boolean that_present_ucx = true && that.isSetUcx();
14605
      if (this_present_ucx || that_present_ucx) {
14606
        if (!(this_present_ucx && that_present_ucx))
14607
          return false;
14608
        if (!this.ucx.equals(that.ucx))
14609
          return false;
14610
      }
14611
 
14612
      return true;
14613
    }
14614
 
14615
    @Override
14616
    public int hashCode() {
14617
      return 0;
14618
    }
14619
 
14620
    public int compareTo(forgotPassword_result other) {
14621
      if (!getClass().equals(other.getClass())) {
14622
        return getClass().getName().compareTo(other.getClass().getName());
14623
      }
14624
 
14625
      int lastComparison = 0;
14626
      forgotPassword_result typedOther = (forgotPassword_result)other;
14627
 
14628
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14629
      if (lastComparison != 0) {
14630
        return lastComparison;
14631
      }
14632
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14633
      if (lastComparison != 0) {
14634
        return lastComparison;
14635
      }
14636
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14637
      if (lastComparison != 0) {
14638
        return lastComparison;
14639
      }
14640
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14641
      if (lastComparison != 0) {
14642
        return lastComparison;
14643
      }
14644
      return 0;
14645
    }
14646
 
14647
    public void read(TProtocol iprot) throws TException {
14648
      TField field;
14649
      iprot.readStructBegin();
14650
      while (true)
14651
      {
14652
        field = iprot.readFieldBegin();
14653
        if (field.type == TType.STOP) { 
14654
          break;
14655
        }
14656
        _Fields fieldId = _Fields.findByThriftId(field.id);
14657
        if (fieldId == null) {
14658
          TProtocolUtil.skip(iprot, field.type);
14659
        } else {
14660
          switch (fieldId) {
14661
            case SUCCESS:
14662
              if (field.type == TType.BOOL) {
14663
                this.success = iprot.readBool();
14664
                setSuccessIsSet(true);
14665
              } else { 
14666
                TProtocolUtil.skip(iprot, field.type);
14667
              }
14668
              break;
14669
            case UCX:
14670
              if (field.type == TType.STRUCT) {
14671
                this.ucx = new UserContextException();
14672
                this.ucx.read(iprot);
14673
              } else { 
14674
                TProtocolUtil.skip(iprot, field.type);
14675
              }
14676
              break;
14677
          }
14678
          iprot.readFieldEnd();
14679
        }
14680
      }
14681
      iprot.readStructEnd();
14682
      validate();
14683
    }
14684
 
14685
    public void write(TProtocol oprot) throws TException {
14686
      oprot.writeStructBegin(STRUCT_DESC);
14687
 
14688
      if (this.isSetSuccess()) {
14689
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14690
        oprot.writeBool(this.success);
14691
        oprot.writeFieldEnd();
14692
      } else if (this.isSetUcx()) {
14693
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14694
        this.ucx.write(oprot);
14695
        oprot.writeFieldEnd();
14696
      }
14697
      oprot.writeFieldStop();
14698
      oprot.writeStructEnd();
14699
    }
14700
 
14701
    @Override
14702
    public String toString() {
14703
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
14704
      boolean first = true;
14705
 
14706
      sb.append("success:");
14707
      sb.append(this.success);
14708
      first = false;
14709
      if (!first) sb.append(", ");
14710
      sb.append("ucx:");
14711
      if (this.ucx == null) {
14712
        sb.append("null");
14713
      } else {
14714
        sb.append(this.ucx);
14715
      }
14716
      first = false;
14717
      sb.append(")");
14718
      return sb.toString();
14719
    }
14720
 
14721
    public void validate() throws TException {
14722
      // check for required fields
14723
    }
14724
 
14725
  }
14726
 
593 rajveer 14727
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
14728
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
14729
 
14730
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14731
 
14732
    private long userId;
14733
 
14734
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14735
    public enum _Fields implements TFieldIdEnum {
14736
      USER_ID((short)1, "userId");
14737
 
14738
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14739
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14740
 
14741
      static {
14742
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14743
          byId.put((int)field._thriftId, field);
14744
          byName.put(field.getFieldName(), field);
14745
        }
14746
      }
14747
 
14748
      /**
14749
       * Find the _Fields constant that matches fieldId, or null if its not found.
14750
       */
14751
      public static _Fields findByThriftId(int fieldId) {
14752
        return byId.get(fieldId);
14753
      }
14754
 
14755
      /**
14756
       * Find the _Fields constant that matches fieldId, throwing an exception
14757
       * if it is not found.
14758
       */
14759
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14760
        _Fields fields = findByThriftId(fieldId);
14761
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14762
        return fields;
14763
      }
14764
 
14765
      /**
14766
       * Find the _Fields constant that matches name, or null if its not found.
14767
       */
14768
      public static _Fields findByName(String name) {
14769
        return byName.get(name);
14770
      }
14771
 
14772
      private final short _thriftId;
14773
      private final String _fieldName;
14774
 
14775
      _Fields(short thriftId, String fieldName) {
14776
        _thriftId = thriftId;
14777
        _fieldName = fieldName;
14778
      }
14779
 
14780
      public short getThriftFieldId() {
14781
        return _thriftId;
14782
      }
14783
 
14784
      public String getFieldName() {
14785
        return _fieldName;
14786
      }
14787
    }
14788
 
14789
    // isset id assignments
14790
    private static final int __USERID_ISSET_ID = 0;
14791
    private BitSet __isset_bit_vector = new BitSet(1);
14792
 
14793
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14794
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14795
          new FieldValueMetaData(TType.I64)));
14796
    }});
14797
 
14798
    static {
14799
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
14800
    }
14801
 
14802
    public getAllAddressesForUser_args() {
14803
    }
14804
 
14805
    public getAllAddressesForUser_args(
14806
      long userId)
14807
    {
14808
      this();
14809
      this.userId = userId;
14810
      setUserIdIsSet(true);
14811
    }
14812
 
14813
    /**
14814
     * Performs a deep copy on <i>other</i>.
14815
     */
14816
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
14817
      __isset_bit_vector.clear();
14818
      __isset_bit_vector.or(other.__isset_bit_vector);
14819
      this.userId = other.userId;
14820
    }
14821
 
14822
    public getAllAddressesForUser_args deepCopy() {
14823
      return new getAllAddressesForUser_args(this);
14824
    }
14825
 
14826
    @Deprecated
14827
    public getAllAddressesForUser_args clone() {
14828
      return new getAllAddressesForUser_args(this);
14829
    }
14830
 
14831
    public long getUserId() {
14832
      return this.userId;
14833
    }
14834
 
14835
    public getAllAddressesForUser_args setUserId(long userId) {
14836
      this.userId = userId;
14837
      setUserIdIsSet(true);
14838
      return this;
14839
    }
14840
 
14841
    public void unsetUserId() {
14842
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14843
    }
14844
 
14845
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14846
    public boolean isSetUserId() {
14847
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14848
    }
14849
 
14850
    public void setUserIdIsSet(boolean value) {
14851
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14852
    }
14853
 
14854
    public void setFieldValue(_Fields field, Object value) {
14855
      switch (field) {
14856
      case USER_ID:
14857
        if (value == null) {
14858
          unsetUserId();
14859
        } else {
14860
          setUserId((Long)value);
14861
        }
14862
        break;
14863
 
14864
      }
14865
    }
14866
 
14867
    public void setFieldValue(int fieldID, Object value) {
14868
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14869
    }
14870
 
14871
    public Object getFieldValue(_Fields field) {
14872
      switch (field) {
14873
      case USER_ID:
14874
        return new Long(getUserId());
14875
 
14876
      }
14877
      throw new IllegalStateException();
14878
    }
14879
 
14880
    public Object getFieldValue(int fieldId) {
14881
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14882
    }
14883
 
14884
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14885
    public boolean isSet(_Fields field) {
14886
      switch (field) {
14887
      case USER_ID:
14888
        return isSetUserId();
14889
      }
14890
      throw new IllegalStateException();
14891
    }
14892
 
14893
    public boolean isSet(int fieldID) {
14894
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14895
    }
14896
 
14897
    @Override
14898
    public boolean equals(Object that) {
14899
      if (that == null)
14900
        return false;
14901
      if (that instanceof getAllAddressesForUser_args)
14902
        return this.equals((getAllAddressesForUser_args)that);
14903
      return false;
14904
    }
14905
 
14906
    public boolean equals(getAllAddressesForUser_args that) {
14907
      if (that == null)
14908
        return false;
14909
 
14910
      boolean this_present_userId = true;
14911
      boolean that_present_userId = true;
14912
      if (this_present_userId || that_present_userId) {
14913
        if (!(this_present_userId && that_present_userId))
14914
          return false;
14915
        if (this.userId != that.userId)
14916
          return false;
14917
      }
14918
 
14919
      return true;
14920
    }
14921
 
14922
    @Override
14923
    public int hashCode() {
14924
      return 0;
14925
    }
14926
 
14927
    public int compareTo(getAllAddressesForUser_args other) {
14928
      if (!getClass().equals(other.getClass())) {
14929
        return getClass().getName().compareTo(other.getClass().getName());
14930
      }
14931
 
14932
      int lastComparison = 0;
14933
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
14934
 
14935
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14936
      if (lastComparison != 0) {
14937
        return lastComparison;
14938
      }
14939
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14940
      if (lastComparison != 0) {
14941
        return lastComparison;
14942
      }
14943
      return 0;
14944
    }
14945
 
14946
    public void read(TProtocol iprot) throws TException {
14947
      TField field;
14948
      iprot.readStructBegin();
14949
      while (true)
14950
      {
14951
        field = iprot.readFieldBegin();
14952
        if (field.type == TType.STOP) { 
14953
          break;
14954
        }
14955
        _Fields fieldId = _Fields.findByThriftId(field.id);
14956
        if (fieldId == null) {
14957
          TProtocolUtil.skip(iprot, field.type);
14958
        } else {
14959
          switch (fieldId) {
14960
            case USER_ID:
14961
              if (field.type == TType.I64) {
14962
                this.userId = iprot.readI64();
14963
                setUserIdIsSet(true);
14964
              } else { 
14965
                TProtocolUtil.skip(iprot, field.type);
14966
              }
14967
              break;
14968
          }
14969
          iprot.readFieldEnd();
14970
        }
14971
      }
14972
      iprot.readStructEnd();
14973
      validate();
14974
    }
14975
 
14976
    public void write(TProtocol oprot) throws TException {
14977
      validate();
14978
 
14979
      oprot.writeStructBegin(STRUCT_DESC);
14980
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14981
      oprot.writeI64(this.userId);
14982
      oprot.writeFieldEnd();
14983
      oprot.writeFieldStop();
14984
      oprot.writeStructEnd();
14985
    }
14986
 
14987
    @Override
14988
    public String toString() {
14989
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
14990
      boolean first = true;
14991
 
14992
      sb.append("userId:");
14993
      sb.append(this.userId);
14994
      first = false;
14995
      sb.append(")");
14996
      return sb.toString();
14997
    }
14998
 
14999
    public void validate() throws TException {
15000
      // check for required fields
15001
    }
15002
 
15003
  }
15004
 
15005
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
15006
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
15007
 
15008
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
15009
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15010
 
15011
    private List<Address> success;
15012
    private UserContextException ucx;
15013
 
15014
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15015
    public enum _Fields implements TFieldIdEnum {
15016
      SUCCESS((short)0, "success"),
15017
      UCX((short)1, "ucx");
15018
 
15019
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15020
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15021
 
15022
      static {
15023
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15024
          byId.put((int)field._thriftId, field);
15025
          byName.put(field.getFieldName(), field);
15026
        }
15027
      }
15028
 
15029
      /**
15030
       * Find the _Fields constant that matches fieldId, or null if its not found.
15031
       */
15032
      public static _Fields findByThriftId(int fieldId) {
15033
        return byId.get(fieldId);
15034
      }
15035
 
15036
      /**
15037
       * Find the _Fields constant that matches fieldId, throwing an exception
15038
       * if it is not found.
15039
       */
15040
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15041
        _Fields fields = findByThriftId(fieldId);
15042
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15043
        return fields;
15044
      }
15045
 
15046
      /**
15047
       * Find the _Fields constant that matches name, or null if its not found.
15048
       */
15049
      public static _Fields findByName(String name) {
15050
        return byName.get(name);
15051
      }
15052
 
15053
      private final short _thriftId;
15054
      private final String _fieldName;
15055
 
15056
      _Fields(short thriftId, String fieldName) {
15057
        _thriftId = thriftId;
15058
        _fieldName = fieldName;
15059
      }
15060
 
15061
      public short getThriftFieldId() {
15062
        return _thriftId;
15063
      }
15064
 
15065
      public String getFieldName() {
15066
        return _fieldName;
15067
      }
15068
    }
15069
 
15070
    // isset id assignments
15071
 
15072
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15073
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15074
          new ListMetaData(TType.LIST, 
15075
              new StructMetaData(TType.STRUCT, Address.class))));
15076
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15077
          new FieldValueMetaData(TType.STRUCT)));
15078
    }});
15079
 
15080
    static {
15081
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
15082
    }
15083
 
15084
    public getAllAddressesForUser_result() {
15085
    }
15086
 
15087
    public getAllAddressesForUser_result(
15088
      List<Address> success,
15089
      UserContextException ucx)
15090
    {
15091
      this();
15092
      this.success = success;
15093
      this.ucx = ucx;
15094
    }
15095
 
15096
    /**
15097
     * Performs a deep copy on <i>other</i>.
15098
     */
15099
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
15100
      if (other.isSetSuccess()) {
15101
        List<Address> __this__success = new ArrayList<Address>();
15102
        for (Address other_element : other.success) {
15103
          __this__success.add(new Address(other_element));
15104
        }
15105
        this.success = __this__success;
15106
      }
15107
      if (other.isSetUcx()) {
15108
        this.ucx = new UserContextException(other.ucx);
15109
      }
15110
    }
15111
 
15112
    public getAllAddressesForUser_result deepCopy() {
15113
      return new getAllAddressesForUser_result(this);
15114
    }
15115
 
15116
    @Deprecated
15117
    public getAllAddressesForUser_result clone() {
15118
      return new getAllAddressesForUser_result(this);
15119
    }
15120
 
15121
    public int getSuccessSize() {
15122
      return (this.success == null) ? 0 : this.success.size();
15123
    }
15124
 
15125
    public java.util.Iterator<Address> getSuccessIterator() {
15126
      return (this.success == null) ? null : this.success.iterator();
15127
    }
15128
 
15129
    public void addToSuccess(Address elem) {
15130
      if (this.success == null) {
15131
        this.success = new ArrayList<Address>();
15132
      }
15133
      this.success.add(elem);
15134
    }
15135
 
15136
    public List<Address> getSuccess() {
15137
      return this.success;
15138
    }
15139
 
15140
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
15141
      this.success = success;
15142
      return this;
15143
    }
15144
 
15145
    public void unsetSuccess() {
15146
      this.success = null;
15147
    }
15148
 
15149
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15150
    public boolean isSetSuccess() {
15151
      return this.success != null;
15152
    }
15153
 
15154
    public void setSuccessIsSet(boolean value) {
15155
      if (!value) {
15156
        this.success = null;
15157
      }
15158
    }
15159
 
15160
    public UserContextException getUcx() {
15161
      return this.ucx;
15162
    }
15163
 
15164
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
15165
      this.ucx = ucx;
15166
      return this;
15167
    }
15168
 
15169
    public void unsetUcx() {
15170
      this.ucx = null;
15171
    }
15172
 
15173
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15174
    public boolean isSetUcx() {
15175
      return this.ucx != null;
15176
    }
15177
 
15178
    public void setUcxIsSet(boolean value) {
15179
      if (!value) {
15180
        this.ucx = null;
15181
      }
15182
    }
15183
 
15184
    public void setFieldValue(_Fields field, Object value) {
15185
      switch (field) {
15186
      case SUCCESS:
15187
        if (value == null) {
15188
          unsetSuccess();
15189
        } else {
15190
          setSuccess((List<Address>)value);
15191
        }
15192
        break;
15193
 
15194
      case UCX:
15195
        if (value == null) {
15196
          unsetUcx();
15197
        } else {
15198
          setUcx((UserContextException)value);
15199
        }
15200
        break;
15201
 
15202
      }
15203
    }
15204
 
15205
    public void setFieldValue(int fieldID, Object value) {
15206
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15207
    }
15208
 
15209
    public Object getFieldValue(_Fields field) {
15210
      switch (field) {
15211
      case SUCCESS:
15212
        return getSuccess();
15213
 
15214
      case UCX:
15215
        return getUcx();
15216
 
15217
      }
15218
      throw new IllegalStateException();
15219
    }
15220
 
15221
    public Object getFieldValue(int fieldId) {
15222
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15223
    }
15224
 
15225
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15226
    public boolean isSet(_Fields field) {
15227
      switch (field) {
15228
      case SUCCESS:
15229
        return isSetSuccess();
15230
      case UCX:
15231
        return isSetUcx();
15232
      }
15233
      throw new IllegalStateException();
15234
    }
15235
 
15236
    public boolean isSet(int fieldID) {
15237
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15238
    }
15239
 
15240
    @Override
15241
    public boolean equals(Object that) {
15242
      if (that == null)
15243
        return false;
15244
      if (that instanceof getAllAddressesForUser_result)
15245
        return this.equals((getAllAddressesForUser_result)that);
15246
      return false;
15247
    }
15248
 
15249
    public boolean equals(getAllAddressesForUser_result that) {
15250
      if (that == null)
15251
        return false;
15252
 
15253
      boolean this_present_success = true && this.isSetSuccess();
15254
      boolean that_present_success = true && that.isSetSuccess();
15255
      if (this_present_success || that_present_success) {
15256
        if (!(this_present_success && that_present_success))
15257
          return false;
15258
        if (!this.success.equals(that.success))
15259
          return false;
15260
      }
15261
 
15262
      boolean this_present_ucx = true && this.isSetUcx();
15263
      boolean that_present_ucx = true && that.isSetUcx();
15264
      if (this_present_ucx || that_present_ucx) {
15265
        if (!(this_present_ucx && that_present_ucx))
15266
          return false;
15267
        if (!this.ucx.equals(that.ucx))
15268
          return false;
15269
      }
15270
 
15271
      return true;
15272
    }
15273
 
15274
    @Override
15275
    public int hashCode() {
15276
      return 0;
15277
    }
15278
 
15279
    public int compareTo(getAllAddressesForUser_result other) {
15280
      if (!getClass().equals(other.getClass())) {
15281
        return getClass().getName().compareTo(other.getClass().getName());
15282
      }
15283
 
15284
      int lastComparison = 0;
15285
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
15286
 
15287
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15288
      if (lastComparison != 0) {
15289
        return lastComparison;
15290
      }
15291
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15292
      if (lastComparison != 0) {
15293
        return lastComparison;
15294
      }
15295
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15296
      if (lastComparison != 0) {
15297
        return lastComparison;
15298
      }
15299
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15300
      if (lastComparison != 0) {
15301
        return lastComparison;
15302
      }
15303
      return 0;
15304
    }
15305
 
15306
    public void read(TProtocol iprot) throws TException {
15307
      TField field;
15308
      iprot.readStructBegin();
15309
      while (true)
15310
      {
15311
        field = iprot.readFieldBegin();
15312
        if (field.type == TType.STOP) { 
15313
          break;
15314
        }
15315
        _Fields fieldId = _Fields.findByThriftId(field.id);
15316
        if (fieldId == null) {
15317
          TProtocolUtil.skip(iprot, field.type);
15318
        } else {
15319
          switch (fieldId) {
15320
            case SUCCESS:
15321
              if (field.type == TType.LIST) {
15322
                {
771 rajveer 15323
                  TList _list16 = iprot.readListBegin();
15324
                  this.success = new ArrayList<Address>(_list16.size);
15325
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
593 rajveer 15326
                  {
771 rajveer 15327
                    Address _elem18;
15328
                    _elem18 = new Address();
15329
                    _elem18.read(iprot);
15330
                    this.success.add(_elem18);
593 rajveer 15331
                  }
15332
                  iprot.readListEnd();
15333
                }
15334
              } else { 
15335
                TProtocolUtil.skip(iprot, field.type);
15336
              }
15337
              break;
15338
            case UCX:
15339
              if (field.type == TType.STRUCT) {
15340
                this.ucx = new UserContextException();
15341
                this.ucx.read(iprot);
15342
              } else { 
15343
                TProtocolUtil.skip(iprot, field.type);
15344
              }
15345
              break;
15346
          }
15347
          iprot.readFieldEnd();
15348
        }
15349
      }
15350
      iprot.readStructEnd();
15351
      validate();
15352
    }
15353
 
15354
    public void write(TProtocol oprot) throws TException {
15355
      oprot.writeStructBegin(STRUCT_DESC);
15356
 
15357
      if (this.isSetSuccess()) {
15358
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15359
        {
15360
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 15361
          for (Address _iter19 : this.success)
593 rajveer 15362
          {
771 rajveer 15363
            _iter19.write(oprot);
593 rajveer 15364
          }
15365
          oprot.writeListEnd();
15366
        }
15367
        oprot.writeFieldEnd();
15368
      } else if (this.isSetUcx()) {
15369
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15370
        this.ucx.write(oprot);
15371
        oprot.writeFieldEnd();
15372
      }
15373
      oprot.writeFieldStop();
15374
      oprot.writeStructEnd();
15375
    }
15376
 
15377
    @Override
15378
    public String toString() {
15379
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
15380
      boolean first = true;
15381
 
15382
      sb.append("success:");
15383
      if (this.success == null) {
15384
        sb.append("null");
15385
      } else {
15386
        sb.append(this.success);
15387
      }
15388
      first = false;
15389
      if (!first) sb.append(", ");
15390
      sb.append("ucx:");
15391
      if (this.ucx == null) {
15392
        sb.append("null");
15393
      } else {
15394
        sb.append(this.ucx);
15395
      }
15396
      first = false;
15397
      sb.append(")");
15398
      return sb.toString();
15399
    }
15400
 
15401
    public void validate() throws TException {
15402
      // check for required fields
15403
    }
15404
 
15405
  }
15406
 
15407
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
15408
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
15409
 
15410
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15411
 
15412
    private long userId;
15413
 
15414
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15415
    public enum _Fields implements TFieldIdEnum {
15416
      USER_ID((short)1, "userId");
15417
 
15418
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15419
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15420
 
15421
      static {
15422
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15423
          byId.put((int)field._thriftId, field);
15424
          byName.put(field.getFieldName(), field);
15425
        }
15426
      }
15427
 
15428
      /**
15429
       * Find the _Fields constant that matches fieldId, or null if its not found.
15430
       */
15431
      public static _Fields findByThriftId(int fieldId) {
15432
        return byId.get(fieldId);
15433
      }
15434
 
15435
      /**
15436
       * Find the _Fields constant that matches fieldId, throwing an exception
15437
       * if it is not found.
15438
       */
15439
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15440
        _Fields fields = findByThriftId(fieldId);
15441
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15442
        return fields;
15443
      }
15444
 
15445
      /**
15446
       * Find the _Fields constant that matches name, or null if its not found.
15447
       */
15448
      public static _Fields findByName(String name) {
15449
        return byName.get(name);
15450
      }
15451
 
15452
      private final short _thriftId;
15453
      private final String _fieldName;
15454
 
15455
      _Fields(short thriftId, String fieldName) {
15456
        _thriftId = thriftId;
15457
        _fieldName = fieldName;
15458
      }
15459
 
15460
      public short getThriftFieldId() {
15461
        return _thriftId;
15462
      }
15463
 
15464
      public String getFieldName() {
15465
        return _fieldName;
15466
      }
15467
    }
15468
 
15469
    // isset id assignments
15470
    private static final int __USERID_ISSET_ID = 0;
15471
    private BitSet __isset_bit_vector = new BitSet(1);
15472
 
15473
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15474
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15475
          new FieldValueMetaData(TType.I64)));
15476
    }});
15477
 
15478
    static {
15479
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
15480
    }
15481
 
15482
    public getDefaultAddressId_args() {
15483
    }
15484
 
15485
    public getDefaultAddressId_args(
15486
      long userId)
15487
    {
15488
      this();
15489
      this.userId = userId;
15490
      setUserIdIsSet(true);
15491
    }
15492
 
15493
    /**
15494
     * Performs a deep copy on <i>other</i>.
15495
     */
15496
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
15497
      __isset_bit_vector.clear();
15498
      __isset_bit_vector.or(other.__isset_bit_vector);
15499
      this.userId = other.userId;
15500
    }
15501
 
15502
    public getDefaultAddressId_args deepCopy() {
15503
      return new getDefaultAddressId_args(this);
15504
    }
15505
 
15506
    @Deprecated
15507
    public getDefaultAddressId_args clone() {
15508
      return new getDefaultAddressId_args(this);
15509
    }
15510
 
15511
    public long getUserId() {
15512
      return this.userId;
15513
    }
15514
 
15515
    public getDefaultAddressId_args setUserId(long userId) {
15516
      this.userId = userId;
15517
      setUserIdIsSet(true);
15518
      return this;
15519
    }
15520
 
15521
    public void unsetUserId() {
15522
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15523
    }
15524
 
15525
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15526
    public boolean isSetUserId() {
15527
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15528
    }
15529
 
15530
    public void setUserIdIsSet(boolean value) {
15531
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15532
    }
15533
 
15534
    public void setFieldValue(_Fields field, Object value) {
15535
      switch (field) {
15536
      case USER_ID:
15537
        if (value == null) {
15538
          unsetUserId();
15539
        } else {
15540
          setUserId((Long)value);
15541
        }
15542
        break;
15543
 
15544
      }
15545
    }
15546
 
15547
    public void setFieldValue(int fieldID, Object value) {
15548
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15549
    }
15550
 
15551
    public Object getFieldValue(_Fields field) {
15552
      switch (field) {
15553
      case USER_ID:
15554
        return new Long(getUserId());
15555
 
15556
      }
15557
      throw new IllegalStateException();
15558
    }
15559
 
15560
    public Object getFieldValue(int fieldId) {
15561
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15562
    }
15563
 
15564
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15565
    public boolean isSet(_Fields field) {
15566
      switch (field) {
15567
      case USER_ID:
15568
        return isSetUserId();
15569
      }
15570
      throw new IllegalStateException();
15571
    }
15572
 
15573
    public boolean isSet(int fieldID) {
15574
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15575
    }
15576
 
15577
    @Override
15578
    public boolean equals(Object that) {
15579
      if (that == null)
15580
        return false;
15581
      if (that instanceof getDefaultAddressId_args)
15582
        return this.equals((getDefaultAddressId_args)that);
15583
      return false;
15584
    }
15585
 
15586
    public boolean equals(getDefaultAddressId_args that) {
15587
      if (that == null)
15588
        return false;
15589
 
15590
      boolean this_present_userId = true;
15591
      boolean that_present_userId = true;
15592
      if (this_present_userId || that_present_userId) {
15593
        if (!(this_present_userId && that_present_userId))
15594
          return false;
15595
        if (this.userId != that.userId)
15596
          return false;
15597
      }
15598
 
15599
      return true;
15600
    }
15601
 
15602
    @Override
15603
    public int hashCode() {
15604
      return 0;
15605
    }
15606
 
15607
    public int compareTo(getDefaultAddressId_args other) {
15608
      if (!getClass().equals(other.getClass())) {
15609
        return getClass().getName().compareTo(other.getClass().getName());
15610
      }
15611
 
15612
      int lastComparison = 0;
15613
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
15614
 
15615
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15616
      if (lastComparison != 0) {
15617
        return lastComparison;
15618
      }
15619
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15620
      if (lastComparison != 0) {
15621
        return lastComparison;
15622
      }
15623
      return 0;
15624
    }
15625
 
15626
    public void read(TProtocol iprot) throws TException {
15627
      TField field;
15628
      iprot.readStructBegin();
15629
      while (true)
15630
      {
15631
        field = iprot.readFieldBegin();
15632
        if (field.type == TType.STOP) { 
15633
          break;
15634
        }
15635
        _Fields fieldId = _Fields.findByThriftId(field.id);
15636
        if (fieldId == null) {
15637
          TProtocolUtil.skip(iprot, field.type);
15638
        } else {
15639
          switch (fieldId) {
15640
            case USER_ID:
15641
              if (field.type == TType.I64) {
15642
                this.userId = iprot.readI64();
15643
                setUserIdIsSet(true);
15644
              } else { 
15645
                TProtocolUtil.skip(iprot, field.type);
15646
              }
15647
              break;
15648
          }
15649
          iprot.readFieldEnd();
15650
        }
15651
      }
15652
      iprot.readStructEnd();
15653
      validate();
15654
    }
15655
 
15656
    public void write(TProtocol oprot) throws TException {
15657
      validate();
15658
 
15659
      oprot.writeStructBegin(STRUCT_DESC);
15660
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15661
      oprot.writeI64(this.userId);
15662
      oprot.writeFieldEnd();
15663
      oprot.writeFieldStop();
15664
      oprot.writeStructEnd();
15665
    }
15666
 
15667
    @Override
15668
    public String toString() {
15669
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
15670
      boolean first = true;
15671
 
15672
      sb.append("userId:");
15673
      sb.append(this.userId);
15674
      first = false;
15675
      sb.append(")");
15676
      return sb.toString();
15677
    }
15678
 
15679
    public void validate() throws TException {
15680
      // check for required fields
15681
    }
15682
 
15683
  }
15684
 
15685
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
15686
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
15687
 
15688
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15689
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15690
 
15691
    private long success;
15692
    private UserContextException ucx;
15693
 
15694
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15695
    public enum _Fields implements TFieldIdEnum {
15696
      SUCCESS((short)0, "success"),
15697
      UCX((short)1, "ucx");
15698
 
15699
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15700
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15701
 
15702
      static {
15703
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15704
          byId.put((int)field._thriftId, field);
15705
          byName.put(field.getFieldName(), field);
15706
        }
15707
      }
15708
 
15709
      /**
15710
       * Find the _Fields constant that matches fieldId, or null if its not found.
15711
       */
15712
      public static _Fields findByThriftId(int fieldId) {
15713
        return byId.get(fieldId);
15714
      }
15715
 
15716
      /**
15717
       * Find the _Fields constant that matches fieldId, throwing an exception
15718
       * if it is not found.
15719
       */
15720
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15721
        _Fields fields = findByThriftId(fieldId);
15722
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15723
        return fields;
15724
      }
15725
 
15726
      /**
15727
       * Find the _Fields constant that matches name, or null if its not found.
15728
       */
15729
      public static _Fields findByName(String name) {
15730
        return byName.get(name);
15731
      }
15732
 
15733
      private final short _thriftId;
15734
      private final String _fieldName;
15735
 
15736
      _Fields(short thriftId, String fieldName) {
15737
        _thriftId = thriftId;
15738
        _fieldName = fieldName;
15739
      }
15740
 
15741
      public short getThriftFieldId() {
15742
        return _thriftId;
15743
      }
15744
 
15745
      public String getFieldName() {
15746
        return _fieldName;
15747
      }
15748
    }
15749
 
15750
    // isset id assignments
15751
    private static final int __SUCCESS_ISSET_ID = 0;
15752
    private BitSet __isset_bit_vector = new BitSet(1);
15753
 
15754
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15755
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15756
          new FieldValueMetaData(TType.I64)));
15757
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15758
          new FieldValueMetaData(TType.STRUCT)));
15759
    }});
15760
 
15761
    static {
15762
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
15763
    }
15764
 
15765
    public getDefaultAddressId_result() {
15766
    }
15767
 
15768
    public getDefaultAddressId_result(
15769
      long success,
15770
      UserContextException ucx)
15771
    {
15772
      this();
15773
      this.success = success;
15774
      setSuccessIsSet(true);
15775
      this.ucx = ucx;
15776
    }
15777
 
15778
    /**
15779
     * Performs a deep copy on <i>other</i>.
15780
     */
15781
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
15782
      __isset_bit_vector.clear();
15783
      __isset_bit_vector.or(other.__isset_bit_vector);
15784
      this.success = other.success;
15785
      if (other.isSetUcx()) {
15786
        this.ucx = new UserContextException(other.ucx);
15787
      }
15788
    }
15789
 
15790
    public getDefaultAddressId_result deepCopy() {
15791
      return new getDefaultAddressId_result(this);
15792
    }
15793
 
15794
    @Deprecated
15795
    public getDefaultAddressId_result clone() {
15796
      return new getDefaultAddressId_result(this);
15797
    }
15798
 
15799
    public long getSuccess() {
15800
      return this.success;
15801
    }
15802
 
15803
    public getDefaultAddressId_result setSuccess(long success) {
15804
      this.success = success;
15805
      setSuccessIsSet(true);
15806
      return this;
15807
    }
15808
 
15809
    public void unsetSuccess() {
15810
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15811
    }
15812
 
15813
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15814
    public boolean isSetSuccess() {
15815
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15816
    }
15817
 
15818
    public void setSuccessIsSet(boolean value) {
15819
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15820
    }
15821
 
15822
    public UserContextException getUcx() {
15823
      return this.ucx;
15824
    }
15825
 
15826
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
15827
      this.ucx = ucx;
15828
      return this;
15829
    }
15830
 
15831
    public void unsetUcx() {
15832
      this.ucx = null;
15833
    }
15834
 
15835
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15836
    public boolean isSetUcx() {
15837
      return this.ucx != null;
15838
    }
15839
 
15840
    public void setUcxIsSet(boolean value) {
15841
      if (!value) {
15842
        this.ucx = null;
15843
      }
15844
    }
15845
 
15846
    public void setFieldValue(_Fields field, Object value) {
15847
      switch (field) {
15848
      case SUCCESS:
15849
        if (value == null) {
15850
          unsetSuccess();
15851
        } else {
15852
          setSuccess((Long)value);
15853
        }
15854
        break;
15855
 
15856
      case UCX:
15857
        if (value == null) {
15858
          unsetUcx();
15859
        } else {
15860
          setUcx((UserContextException)value);
15861
        }
15862
        break;
15863
 
15864
      }
15865
    }
15866
 
15867
    public void setFieldValue(int fieldID, Object value) {
15868
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15869
    }
15870
 
15871
    public Object getFieldValue(_Fields field) {
15872
      switch (field) {
15873
      case SUCCESS:
15874
        return new Long(getSuccess());
15875
 
15876
      case UCX:
15877
        return getUcx();
15878
 
15879
      }
15880
      throw new IllegalStateException();
15881
    }
15882
 
15883
    public Object getFieldValue(int fieldId) {
15884
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15885
    }
15886
 
15887
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15888
    public boolean isSet(_Fields field) {
15889
      switch (field) {
15890
      case SUCCESS:
15891
        return isSetSuccess();
15892
      case UCX:
15893
        return isSetUcx();
15894
      }
15895
      throw new IllegalStateException();
15896
    }
15897
 
15898
    public boolean isSet(int fieldID) {
15899
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15900
    }
15901
 
15902
    @Override
15903
    public boolean equals(Object that) {
15904
      if (that == null)
15905
        return false;
15906
      if (that instanceof getDefaultAddressId_result)
15907
        return this.equals((getDefaultAddressId_result)that);
15908
      return false;
15909
    }
15910
 
15911
    public boolean equals(getDefaultAddressId_result that) {
15912
      if (that == null)
15913
        return false;
15914
 
15915
      boolean this_present_success = true;
15916
      boolean that_present_success = true;
15917
      if (this_present_success || that_present_success) {
15918
        if (!(this_present_success && that_present_success))
15919
          return false;
15920
        if (this.success != that.success)
15921
          return false;
15922
      }
15923
 
15924
      boolean this_present_ucx = true && this.isSetUcx();
15925
      boolean that_present_ucx = true && that.isSetUcx();
15926
      if (this_present_ucx || that_present_ucx) {
15927
        if (!(this_present_ucx && that_present_ucx))
15928
          return false;
15929
        if (!this.ucx.equals(that.ucx))
15930
          return false;
15931
      }
15932
 
15933
      return true;
15934
    }
15935
 
15936
    @Override
15937
    public int hashCode() {
15938
      return 0;
15939
    }
15940
 
15941
    public int compareTo(getDefaultAddressId_result other) {
15942
      if (!getClass().equals(other.getClass())) {
15943
        return getClass().getName().compareTo(other.getClass().getName());
15944
      }
15945
 
15946
      int lastComparison = 0;
15947
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
15948
 
15949
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15950
      if (lastComparison != 0) {
15951
        return lastComparison;
15952
      }
15953
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15954
      if (lastComparison != 0) {
15955
        return lastComparison;
15956
      }
15957
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15958
      if (lastComparison != 0) {
15959
        return lastComparison;
15960
      }
15961
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15962
      if (lastComparison != 0) {
15963
        return lastComparison;
15964
      }
15965
      return 0;
15966
    }
15967
 
15968
    public void read(TProtocol iprot) throws TException {
15969
      TField field;
15970
      iprot.readStructBegin();
15971
      while (true)
15972
      {
15973
        field = iprot.readFieldBegin();
15974
        if (field.type == TType.STOP) { 
15975
          break;
15976
        }
15977
        _Fields fieldId = _Fields.findByThriftId(field.id);
15978
        if (fieldId == null) {
15979
          TProtocolUtil.skip(iprot, field.type);
15980
        } else {
15981
          switch (fieldId) {
15982
            case SUCCESS:
15983
              if (field.type == TType.I64) {
15984
                this.success = iprot.readI64();
15985
                setSuccessIsSet(true);
15986
              } else { 
15987
                TProtocolUtil.skip(iprot, field.type);
15988
              }
15989
              break;
15990
            case UCX:
15991
              if (field.type == TType.STRUCT) {
15992
                this.ucx = new UserContextException();
15993
                this.ucx.read(iprot);
15994
              } else { 
15995
                TProtocolUtil.skip(iprot, field.type);
15996
              }
15997
              break;
15998
          }
15999
          iprot.readFieldEnd();
16000
        }
16001
      }
16002
      iprot.readStructEnd();
16003
      validate();
16004
    }
16005
 
16006
    public void write(TProtocol oprot) throws TException {
16007
      oprot.writeStructBegin(STRUCT_DESC);
16008
 
16009
      if (this.isSetSuccess()) {
16010
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16011
        oprot.writeI64(this.success);
16012
        oprot.writeFieldEnd();
16013
      } else if (this.isSetUcx()) {
16014
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16015
        this.ucx.write(oprot);
16016
        oprot.writeFieldEnd();
16017
      }
16018
      oprot.writeFieldStop();
16019
      oprot.writeStructEnd();
16020
    }
16021
 
16022
    @Override
16023
    public String toString() {
16024
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
16025
      boolean first = true;
16026
 
16027
      sb.append("success:");
16028
      sb.append(this.success);
16029
      first = false;
16030
      if (!first) sb.append(", ");
16031
      sb.append("ucx:");
16032
      if (this.ucx == null) {
16033
        sb.append("null");
16034
      } else {
16035
        sb.append(this.ucx);
16036
      }
16037
      first = false;
16038
      sb.append(")");
16039
      return sb.toString();
16040
    }
16041
 
16042
    public void validate() throws TException {
16043
      // check for required fields
16044
    }
16045
 
16046
  }
16047
 
784 rajveer 16048
  public static class getDefaultPincode_args implements TBase<getDefaultPincode_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_args>   {
16049
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_args");
16050
 
16051
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
16052
 
16053
    private long userId;
16054
 
16055
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16056
    public enum _Fields implements TFieldIdEnum {
16057
      USER_ID((short)1, "userId");
16058
 
16059
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16060
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16061
 
16062
      static {
16063
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16064
          byId.put((int)field._thriftId, field);
16065
          byName.put(field.getFieldName(), field);
16066
        }
16067
      }
16068
 
16069
      /**
16070
       * Find the _Fields constant that matches fieldId, or null if its not found.
16071
       */
16072
      public static _Fields findByThriftId(int fieldId) {
16073
        return byId.get(fieldId);
16074
      }
16075
 
16076
      /**
16077
       * Find the _Fields constant that matches fieldId, throwing an exception
16078
       * if it is not found.
16079
       */
16080
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16081
        _Fields fields = findByThriftId(fieldId);
16082
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16083
        return fields;
16084
      }
16085
 
16086
      /**
16087
       * Find the _Fields constant that matches name, or null if its not found.
16088
       */
16089
      public static _Fields findByName(String name) {
16090
        return byName.get(name);
16091
      }
16092
 
16093
      private final short _thriftId;
16094
      private final String _fieldName;
16095
 
16096
      _Fields(short thriftId, String fieldName) {
16097
        _thriftId = thriftId;
16098
        _fieldName = fieldName;
16099
      }
16100
 
16101
      public short getThriftFieldId() {
16102
        return _thriftId;
16103
      }
16104
 
16105
      public String getFieldName() {
16106
        return _fieldName;
16107
      }
16108
    }
16109
 
16110
    // isset id assignments
16111
    private static final int __USERID_ISSET_ID = 0;
16112
    private BitSet __isset_bit_vector = new BitSet(1);
16113
 
16114
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16115
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
16116
          new FieldValueMetaData(TType.I64)));
16117
    }});
16118
 
16119
    static {
16120
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_args.class, metaDataMap);
16121
    }
16122
 
16123
    public getDefaultPincode_args() {
16124
    }
16125
 
16126
    public getDefaultPincode_args(
16127
      long userId)
16128
    {
16129
      this();
16130
      this.userId = userId;
16131
      setUserIdIsSet(true);
16132
    }
16133
 
16134
    /**
16135
     * Performs a deep copy on <i>other</i>.
16136
     */
16137
    public getDefaultPincode_args(getDefaultPincode_args other) {
16138
      __isset_bit_vector.clear();
16139
      __isset_bit_vector.or(other.__isset_bit_vector);
16140
      this.userId = other.userId;
16141
    }
16142
 
16143
    public getDefaultPincode_args deepCopy() {
16144
      return new getDefaultPincode_args(this);
16145
    }
16146
 
16147
    @Deprecated
16148
    public getDefaultPincode_args clone() {
16149
      return new getDefaultPincode_args(this);
16150
    }
16151
 
16152
    public long getUserId() {
16153
      return this.userId;
16154
    }
16155
 
16156
    public getDefaultPincode_args setUserId(long userId) {
16157
      this.userId = userId;
16158
      setUserIdIsSet(true);
16159
      return this;
16160
    }
16161
 
16162
    public void unsetUserId() {
16163
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16164
    }
16165
 
16166
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16167
    public boolean isSetUserId() {
16168
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16169
    }
16170
 
16171
    public void setUserIdIsSet(boolean value) {
16172
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16173
    }
16174
 
16175
    public void setFieldValue(_Fields field, Object value) {
16176
      switch (field) {
16177
      case USER_ID:
16178
        if (value == null) {
16179
          unsetUserId();
16180
        } else {
16181
          setUserId((Long)value);
16182
        }
16183
        break;
16184
 
16185
      }
16186
    }
16187
 
16188
    public void setFieldValue(int fieldID, Object value) {
16189
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16190
    }
16191
 
16192
    public Object getFieldValue(_Fields field) {
16193
      switch (field) {
16194
      case USER_ID:
16195
        return new Long(getUserId());
16196
 
16197
      }
16198
      throw new IllegalStateException();
16199
    }
16200
 
16201
    public Object getFieldValue(int fieldId) {
16202
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16203
    }
16204
 
16205
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16206
    public boolean isSet(_Fields field) {
16207
      switch (field) {
16208
      case USER_ID:
16209
        return isSetUserId();
16210
      }
16211
      throw new IllegalStateException();
16212
    }
16213
 
16214
    public boolean isSet(int fieldID) {
16215
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16216
    }
16217
 
16218
    @Override
16219
    public boolean equals(Object that) {
16220
      if (that == null)
16221
        return false;
16222
      if (that instanceof getDefaultPincode_args)
16223
        return this.equals((getDefaultPincode_args)that);
16224
      return false;
16225
    }
16226
 
16227
    public boolean equals(getDefaultPincode_args that) {
16228
      if (that == null)
16229
        return false;
16230
 
16231
      boolean this_present_userId = true;
16232
      boolean that_present_userId = true;
16233
      if (this_present_userId || that_present_userId) {
16234
        if (!(this_present_userId && that_present_userId))
16235
          return false;
16236
        if (this.userId != that.userId)
16237
          return false;
16238
      }
16239
 
16240
      return true;
16241
    }
16242
 
16243
    @Override
16244
    public int hashCode() {
16245
      return 0;
16246
    }
16247
 
16248
    public int compareTo(getDefaultPincode_args other) {
16249
      if (!getClass().equals(other.getClass())) {
16250
        return getClass().getName().compareTo(other.getClass().getName());
16251
      }
16252
 
16253
      int lastComparison = 0;
16254
      getDefaultPincode_args typedOther = (getDefaultPincode_args)other;
16255
 
16256
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
16257
      if (lastComparison != 0) {
16258
        return lastComparison;
16259
      }
16260
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
16261
      if (lastComparison != 0) {
16262
        return lastComparison;
16263
      }
16264
      return 0;
16265
    }
16266
 
16267
    public void read(TProtocol iprot) throws TException {
16268
      TField field;
16269
      iprot.readStructBegin();
16270
      while (true)
16271
      {
16272
        field = iprot.readFieldBegin();
16273
        if (field.type == TType.STOP) { 
16274
          break;
16275
        }
16276
        _Fields fieldId = _Fields.findByThriftId(field.id);
16277
        if (fieldId == null) {
16278
          TProtocolUtil.skip(iprot, field.type);
16279
        } else {
16280
          switch (fieldId) {
16281
            case USER_ID:
16282
              if (field.type == TType.I64) {
16283
                this.userId = iprot.readI64();
16284
                setUserIdIsSet(true);
16285
              } else { 
16286
                TProtocolUtil.skip(iprot, field.type);
16287
              }
16288
              break;
16289
          }
16290
          iprot.readFieldEnd();
16291
        }
16292
      }
16293
      iprot.readStructEnd();
16294
      validate();
16295
    }
16296
 
16297
    public void write(TProtocol oprot) throws TException {
16298
      validate();
16299
 
16300
      oprot.writeStructBegin(STRUCT_DESC);
16301
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
16302
      oprot.writeI64(this.userId);
16303
      oprot.writeFieldEnd();
16304
      oprot.writeFieldStop();
16305
      oprot.writeStructEnd();
16306
    }
16307
 
16308
    @Override
16309
    public String toString() {
16310
      StringBuilder sb = new StringBuilder("getDefaultPincode_args(");
16311
      boolean first = true;
16312
 
16313
      sb.append("userId:");
16314
      sb.append(this.userId);
16315
      first = false;
16316
      sb.append(")");
16317
      return sb.toString();
16318
    }
16319
 
16320
    public void validate() throws TException {
16321
      // check for required fields
16322
    }
16323
 
16324
  }
16325
 
16326
  public static class getDefaultPincode_result implements TBase<getDefaultPincode_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_result>   {
16327
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_result");
16328
 
16329
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
16330
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16331
 
16332
    private String success;
16333
    private UserContextException ucx;
16334
 
16335
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16336
    public enum _Fields implements TFieldIdEnum {
16337
      SUCCESS((short)0, "success"),
16338
      UCX((short)1, "ucx");
16339
 
16340
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16341
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16342
 
16343
      static {
16344
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16345
          byId.put((int)field._thriftId, field);
16346
          byName.put(field.getFieldName(), field);
16347
        }
16348
      }
16349
 
16350
      /**
16351
       * Find the _Fields constant that matches fieldId, or null if its not found.
16352
       */
16353
      public static _Fields findByThriftId(int fieldId) {
16354
        return byId.get(fieldId);
16355
      }
16356
 
16357
      /**
16358
       * Find the _Fields constant that matches fieldId, throwing an exception
16359
       * if it is not found.
16360
       */
16361
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16362
        _Fields fields = findByThriftId(fieldId);
16363
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16364
        return fields;
16365
      }
16366
 
16367
      /**
16368
       * Find the _Fields constant that matches name, or null if its not found.
16369
       */
16370
      public static _Fields findByName(String name) {
16371
        return byName.get(name);
16372
      }
16373
 
16374
      private final short _thriftId;
16375
      private final String _fieldName;
16376
 
16377
      _Fields(short thriftId, String fieldName) {
16378
        _thriftId = thriftId;
16379
        _fieldName = fieldName;
16380
      }
16381
 
16382
      public short getThriftFieldId() {
16383
        return _thriftId;
16384
      }
16385
 
16386
      public String getFieldName() {
16387
        return _fieldName;
16388
      }
16389
    }
16390
 
16391
    // isset id assignments
16392
 
16393
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16394
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16395
          new FieldValueMetaData(TType.STRING)));
16396
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16397
          new FieldValueMetaData(TType.STRUCT)));
16398
    }});
16399
 
16400
    static {
16401
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_result.class, metaDataMap);
16402
    }
16403
 
16404
    public getDefaultPincode_result() {
16405
    }
16406
 
16407
    public getDefaultPincode_result(
16408
      String success,
16409
      UserContextException ucx)
16410
    {
16411
      this();
16412
      this.success = success;
16413
      this.ucx = ucx;
16414
    }
16415
 
16416
    /**
16417
     * Performs a deep copy on <i>other</i>.
16418
     */
16419
    public getDefaultPincode_result(getDefaultPincode_result other) {
16420
      if (other.isSetSuccess()) {
16421
        this.success = other.success;
16422
      }
16423
      if (other.isSetUcx()) {
16424
        this.ucx = new UserContextException(other.ucx);
16425
      }
16426
    }
16427
 
16428
    public getDefaultPincode_result deepCopy() {
16429
      return new getDefaultPincode_result(this);
16430
    }
16431
 
16432
    @Deprecated
16433
    public getDefaultPincode_result clone() {
16434
      return new getDefaultPincode_result(this);
16435
    }
16436
 
16437
    public String getSuccess() {
16438
      return this.success;
16439
    }
16440
 
16441
    public getDefaultPincode_result setSuccess(String success) {
16442
      this.success = success;
16443
      return this;
16444
    }
16445
 
16446
    public void unsetSuccess() {
16447
      this.success = null;
16448
    }
16449
 
16450
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16451
    public boolean isSetSuccess() {
16452
      return this.success != null;
16453
    }
16454
 
16455
    public void setSuccessIsSet(boolean value) {
16456
      if (!value) {
16457
        this.success = null;
16458
      }
16459
    }
16460
 
16461
    public UserContextException getUcx() {
16462
      return this.ucx;
16463
    }
16464
 
16465
    public getDefaultPincode_result setUcx(UserContextException ucx) {
16466
      this.ucx = ucx;
16467
      return this;
16468
    }
16469
 
16470
    public void unsetUcx() {
16471
      this.ucx = null;
16472
    }
16473
 
16474
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
16475
    public boolean isSetUcx() {
16476
      return this.ucx != null;
16477
    }
16478
 
16479
    public void setUcxIsSet(boolean value) {
16480
      if (!value) {
16481
        this.ucx = null;
16482
      }
16483
    }
16484
 
16485
    public void setFieldValue(_Fields field, Object value) {
16486
      switch (field) {
16487
      case SUCCESS:
16488
        if (value == null) {
16489
          unsetSuccess();
16490
        } else {
16491
          setSuccess((String)value);
16492
        }
16493
        break;
16494
 
16495
      case UCX:
16496
        if (value == null) {
16497
          unsetUcx();
16498
        } else {
16499
          setUcx((UserContextException)value);
16500
        }
16501
        break;
16502
 
16503
      }
16504
    }
16505
 
16506
    public void setFieldValue(int fieldID, Object value) {
16507
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16508
    }
16509
 
16510
    public Object getFieldValue(_Fields field) {
16511
      switch (field) {
16512
      case SUCCESS:
16513
        return getSuccess();
16514
 
16515
      case UCX:
16516
        return getUcx();
16517
 
16518
      }
16519
      throw new IllegalStateException();
16520
    }
16521
 
16522
    public Object getFieldValue(int fieldId) {
16523
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16524
    }
16525
 
16526
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16527
    public boolean isSet(_Fields field) {
16528
      switch (field) {
16529
      case SUCCESS:
16530
        return isSetSuccess();
16531
      case UCX:
16532
        return isSetUcx();
16533
      }
16534
      throw new IllegalStateException();
16535
    }
16536
 
16537
    public boolean isSet(int fieldID) {
16538
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16539
    }
16540
 
16541
    @Override
16542
    public boolean equals(Object that) {
16543
      if (that == null)
16544
        return false;
16545
      if (that instanceof getDefaultPincode_result)
16546
        return this.equals((getDefaultPincode_result)that);
16547
      return false;
16548
    }
16549
 
16550
    public boolean equals(getDefaultPincode_result that) {
16551
      if (that == null)
16552
        return false;
16553
 
16554
      boolean this_present_success = true && this.isSetSuccess();
16555
      boolean that_present_success = true && that.isSetSuccess();
16556
      if (this_present_success || that_present_success) {
16557
        if (!(this_present_success && that_present_success))
16558
          return false;
16559
        if (!this.success.equals(that.success))
16560
          return false;
16561
      }
16562
 
16563
      boolean this_present_ucx = true && this.isSetUcx();
16564
      boolean that_present_ucx = true && that.isSetUcx();
16565
      if (this_present_ucx || that_present_ucx) {
16566
        if (!(this_present_ucx && that_present_ucx))
16567
          return false;
16568
        if (!this.ucx.equals(that.ucx))
16569
          return false;
16570
      }
16571
 
16572
      return true;
16573
    }
16574
 
16575
    @Override
16576
    public int hashCode() {
16577
      return 0;
16578
    }
16579
 
16580
    public int compareTo(getDefaultPincode_result other) {
16581
      if (!getClass().equals(other.getClass())) {
16582
        return getClass().getName().compareTo(other.getClass().getName());
16583
      }
16584
 
16585
      int lastComparison = 0;
16586
      getDefaultPincode_result typedOther = (getDefaultPincode_result)other;
16587
 
16588
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16589
      if (lastComparison != 0) {
16590
        return lastComparison;
16591
      }
16592
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16593
      if (lastComparison != 0) {
16594
        return lastComparison;
16595
      }
16596
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16597
      if (lastComparison != 0) {
16598
        return lastComparison;
16599
      }
16600
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16601
      if (lastComparison != 0) {
16602
        return lastComparison;
16603
      }
16604
      return 0;
16605
    }
16606
 
16607
    public void read(TProtocol iprot) throws TException {
16608
      TField field;
16609
      iprot.readStructBegin();
16610
      while (true)
16611
      {
16612
        field = iprot.readFieldBegin();
16613
        if (field.type == TType.STOP) { 
16614
          break;
16615
        }
16616
        _Fields fieldId = _Fields.findByThriftId(field.id);
16617
        if (fieldId == null) {
16618
          TProtocolUtil.skip(iprot, field.type);
16619
        } else {
16620
          switch (fieldId) {
16621
            case SUCCESS:
16622
              if (field.type == TType.STRING) {
16623
                this.success = iprot.readString();
16624
              } else { 
16625
                TProtocolUtil.skip(iprot, field.type);
16626
              }
16627
              break;
16628
            case UCX:
16629
              if (field.type == TType.STRUCT) {
16630
                this.ucx = new UserContextException();
16631
                this.ucx.read(iprot);
16632
              } else { 
16633
                TProtocolUtil.skip(iprot, field.type);
16634
              }
16635
              break;
16636
          }
16637
          iprot.readFieldEnd();
16638
        }
16639
      }
16640
      iprot.readStructEnd();
16641
      validate();
16642
    }
16643
 
16644
    public void write(TProtocol oprot) throws TException {
16645
      oprot.writeStructBegin(STRUCT_DESC);
16646
 
16647
      if (this.isSetSuccess()) {
16648
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16649
        oprot.writeString(this.success);
16650
        oprot.writeFieldEnd();
16651
      } else if (this.isSetUcx()) {
16652
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16653
        this.ucx.write(oprot);
16654
        oprot.writeFieldEnd();
16655
      }
16656
      oprot.writeFieldStop();
16657
      oprot.writeStructEnd();
16658
    }
16659
 
16660
    @Override
16661
    public String toString() {
16662
      StringBuilder sb = new StringBuilder("getDefaultPincode_result(");
16663
      boolean first = true;
16664
 
16665
      sb.append("success:");
16666
      if (this.success == null) {
16667
        sb.append("null");
16668
      } else {
16669
        sb.append(this.success);
16670
      }
16671
      first = false;
16672
      if (!first) sb.append(", ");
16673
      sb.append("ucx:");
16674
      if (this.ucx == null) {
16675
        sb.append("null");
16676
      } else {
16677
        sb.append(this.ucx);
16678
      }
16679
      first = false;
16680
      sb.append(")");
16681
      return sb.toString();
16682
    }
16683
 
16684
    public void validate() throws TException {
16685
      // check for required fields
16686
    }
16687
 
16688
  }
16689
 
1177 varun.gupt 16690
  public static class saveUserCommunication_args implements TBase<saveUserCommunication_args._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_args>   {
16691
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_args");
16692
 
16693
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
16694
    private static final TField REPLY_TO_FIELD_DESC = new TField("replyTo", TType.STRING, (short)2);
16695
    private static final TField COMMUNICATION_TYPE_FIELD_DESC = new TField("communicationType", TType.I64, (short)3);
16696
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)4);
16697
    private static final TField AIRWAYBILL_NO_FIELD_DESC = new TField("airwaybillNo", TType.STRING, (short)5);
16698
    private static final TField PRODUCT_NAME_FIELD_DESC = new TField("productName", TType.STRING, (short)6);
16699
    private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)7);
16700
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)8);
16701
 
16702
    private long userId;
16703
    private String replyTo;
16704
    private long communicationType;
16705
    private long orderId;
16706
    private String airwaybillNo;
16707
    private String productName;
16708
    private String subject;
16709
    private String message;
16710
 
16711
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16712
    public enum _Fields implements TFieldIdEnum {
16713
      USER_ID((short)1, "userId"),
16714
      REPLY_TO((short)2, "replyTo"),
16715
      COMMUNICATION_TYPE((short)3, "communicationType"),
16716
      ORDER_ID((short)4, "orderId"),
16717
      AIRWAYBILL_NO((short)5, "airwaybillNo"),
16718
      PRODUCT_NAME((short)6, "productName"),
16719
      SUBJECT((short)7, "subject"),
16720
      MESSAGE((short)8, "message");
16721
 
16722
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16723
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16724
 
16725
      static {
16726
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16727
          byId.put((int)field._thriftId, field);
16728
          byName.put(field.getFieldName(), field);
16729
        }
16730
      }
16731
 
16732
      /**
16733
       * Find the _Fields constant that matches fieldId, or null if its not found.
16734
       */
16735
      public static _Fields findByThriftId(int fieldId) {
16736
        return byId.get(fieldId);
16737
      }
16738
 
16739
      /**
16740
       * Find the _Fields constant that matches fieldId, throwing an exception
16741
       * if it is not found.
16742
       */
16743
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16744
        _Fields fields = findByThriftId(fieldId);
16745
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16746
        return fields;
16747
      }
16748
 
16749
      /**
16750
       * Find the _Fields constant that matches name, or null if its not found.
16751
       */
16752
      public static _Fields findByName(String name) {
16753
        return byName.get(name);
16754
      }
16755
 
16756
      private final short _thriftId;
16757
      private final String _fieldName;
16758
 
16759
      _Fields(short thriftId, String fieldName) {
16760
        _thriftId = thriftId;
16761
        _fieldName = fieldName;
16762
      }
16763
 
16764
      public short getThriftFieldId() {
16765
        return _thriftId;
16766
      }
16767
 
16768
      public String getFieldName() {
16769
        return _fieldName;
16770
      }
16771
    }
16772
 
16773
    // isset id assignments
16774
    private static final int __USERID_ISSET_ID = 0;
16775
    private static final int __COMMUNICATIONTYPE_ISSET_ID = 1;
16776
    private static final int __ORDERID_ISSET_ID = 2;
16777
    private BitSet __isset_bit_vector = new BitSet(3);
16778
 
16779
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16780
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
16781
          new FieldValueMetaData(TType.I64)));
16782
      put(_Fields.REPLY_TO, new FieldMetaData("replyTo", TFieldRequirementType.DEFAULT, 
16783
          new FieldValueMetaData(TType.STRING)));
16784
      put(_Fields.COMMUNICATION_TYPE, new FieldMetaData("communicationType", TFieldRequirementType.DEFAULT, 
16785
          new FieldValueMetaData(TType.I64)));
16786
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
16787
          new FieldValueMetaData(TType.I64)));
16788
      put(_Fields.AIRWAYBILL_NO, new FieldMetaData("airwaybillNo", TFieldRequirementType.DEFAULT, 
16789
          new FieldValueMetaData(TType.STRING)));
16790
      put(_Fields.PRODUCT_NAME, new FieldMetaData("productName", TFieldRequirementType.DEFAULT, 
16791
          new FieldValueMetaData(TType.STRING)));
16792
      put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
16793
          new FieldValueMetaData(TType.STRING)));
16794
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
16795
          new FieldValueMetaData(TType.STRING)));
16796
    }});
16797
 
16798
    static {
16799
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_args.class, metaDataMap);
16800
    }
16801
 
16802
    public saveUserCommunication_args() {
16803
    }
16804
 
16805
    public saveUserCommunication_args(
16806
      long userId,
16807
      String replyTo,
16808
      long communicationType,
16809
      long orderId,
16810
      String airwaybillNo,
16811
      String productName,
16812
      String subject,
16813
      String message)
16814
    {
16815
      this();
16816
      this.userId = userId;
16817
      setUserIdIsSet(true);
16818
      this.replyTo = replyTo;
16819
      this.communicationType = communicationType;
16820
      setCommunicationTypeIsSet(true);
16821
      this.orderId = orderId;
16822
      setOrderIdIsSet(true);
16823
      this.airwaybillNo = airwaybillNo;
16824
      this.productName = productName;
16825
      this.subject = subject;
16826
      this.message = message;
16827
    }
16828
 
16829
    /**
16830
     * Performs a deep copy on <i>other</i>.
16831
     */
16832
    public saveUserCommunication_args(saveUserCommunication_args other) {
16833
      __isset_bit_vector.clear();
16834
      __isset_bit_vector.or(other.__isset_bit_vector);
16835
      this.userId = other.userId;
16836
      if (other.isSetReplyTo()) {
16837
        this.replyTo = other.replyTo;
16838
      }
16839
      this.communicationType = other.communicationType;
16840
      this.orderId = other.orderId;
16841
      if (other.isSetAirwaybillNo()) {
16842
        this.airwaybillNo = other.airwaybillNo;
16843
      }
16844
      if (other.isSetProductName()) {
16845
        this.productName = other.productName;
16846
      }
16847
      if (other.isSetSubject()) {
16848
        this.subject = other.subject;
16849
      }
16850
      if (other.isSetMessage()) {
16851
        this.message = other.message;
16852
      }
16853
    }
16854
 
16855
    public saveUserCommunication_args deepCopy() {
16856
      return new saveUserCommunication_args(this);
16857
    }
16858
 
16859
    @Deprecated
16860
    public saveUserCommunication_args clone() {
16861
      return new saveUserCommunication_args(this);
16862
    }
16863
 
16864
    public long getUserId() {
16865
      return this.userId;
16866
    }
16867
 
16868
    public saveUserCommunication_args setUserId(long userId) {
16869
      this.userId = userId;
16870
      setUserIdIsSet(true);
16871
      return this;
16872
    }
16873
 
16874
    public void unsetUserId() {
16875
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16876
    }
16877
 
16878
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16879
    public boolean isSetUserId() {
16880
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16881
    }
16882
 
16883
    public void setUserIdIsSet(boolean value) {
16884
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16885
    }
16886
 
16887
    public String getReplyTo() {
16888
      return this.replyTo;
16889
    }
16890
 
16891
    public saveUserCommunication_args setReplyTo(String replyTo) {
16892
      this.replyTo = replyTo;
16893
      return this;
16894
    }
16895
 
16896
    public void unsetReplyTo() {
16897
      this.replyTo = null;
16898
    }
16899
 
16900
    /** Returns true if field replyTo is set (has been asigned a value) and false otherwise */
16901
    public boolean isSetReplyTo() {
16902
      return this.replyTo != null;
16903
    }
16904
 
16905
    public void setReplyToIsSet(boolean value) {
16906
      if (!value) {
16907
        this.replyTo = null;
16908
      }
16909
    }
16910
 
16911
    public long getCommunicationType() {
16912
      return this.communicationType;
16913
    }
16914
 
16915
    public saveUserCommunication_args setCommunicationType(long communicationType) {
16916
      this.communicationType = communicationType;
16917
      setCommunicationTypeIsSet(true);
16918
      return this;
16919
    }
16920
 
16921
    public void unsetCommunicationType() {
16922
      __isset_bit_vector.clear(__COMMUNICATIONTYPE_ISSET_ID);
16923
    }
16924
 
16925
    /** Returns true if field communicationType is set (has been asigned a value) and false otherwise */
16926
    public boolean isSetCommunicationType() {
16927
      return __isset_bit_vector.get(__COMMUNICATIONTYPE_ISSET_ID);
16928
    }
16929
 
16930
    public void setCommunicationTypeIsSet(boolean value) {
16931
      __isset_bit_vector.set(__COMMUNICATIONTYPE_ISSET_ID, value);
16932
    }
16933
 
16934
    public long getOrderId() {
16935
      return this.orderId;
16936
    }
16937
 
16938
    public saveUserCommunication_args setOrderId(long orderId) {
16939
      this.orderId = orderId;
16940
      setOrderIdIsSet(true);
16941
      return this;
16942
    }
16943
 
16944
    public void unsetOrderId() {
16945
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
16946
    }
16947
 
16948
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
16949
    public boolean isSetOrderId() {
16950
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
16951
    }
16952
 
16953
    public void setOrderIdIsSet(boolean value) {
16954
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
16955
    }
16956
 
16957
    public String getAirwaybillNo() {
16958
      return this.airwaybillNo;
16959
    }
16960
 
16961
    public saveUserCommunication_args setAirwaybillNo(String airwaybillNo) {
16962
      this.airwaybillNo = airwaybillNo;
16963
      return this;
16964
    }
16965
 
16966
    public void unsetAirwaybillNo() {
16967
      this.airwaybillNo = null;
16968
    }
16969
 
16970
    /** Returns true if field airwaybillNo is set (has been asigned a value) and false otherwise */
16971
    public boolean isSetAirwaybillNo() {
16972
      return this.airwaybillNo != null;
16973
    }
16974
 
16975
    public void setAirwaybillNoIsSet(boolean value) {
16976
      if (!value) {
16977
        this.airwaybillNo = null;
16978
      }
16979
    }
16980
 
16981
    public String getProductName() {
16982
      return this.productName;
16983
    }
16984
 
16985
    public saveUserCommunication_args setProductName(String productName) {
16986
      this.productName = productName;
16987
      return this;
16988
    }
16989
 
16990
    public void unsetProductName() {
16991
      this.productName = null;
16992
    }
16993
 
16994
    /** Returns true if field productName is set (has been asigned a value) and false otherwise */
16995
    public boolean isSetProductName() {
16996
      return this.productName != null;
16997
    }
16998
 
16999
    public void setProductNameIsSet(boolean value) {
17000
      if (!value) {
17001
        this.productName = null;
17002
      }
17003
    }
17004
 
17005
    public String getSubject() {
17006
      return this.subject;
17007
    }
17008
 
17009
    public saveUserCommunication_args setSubject(String subject) {
17010
      this.subject = subject;
17011
      return this;
17012
    }
17013
 
17014
    public void unsetSubject() {
17015
      this.subject = null;
17016
    }
17017
 
17018
    /** Returns true if field subject is set (has been asigned a value) and false otherwise */
17019
    public boolean isSetSubject() {
17020
      return this.subject != null;
17021
    }
17022
 
17023
    public void setSubjectIsSet(boolean value) {
17024
      if (!value) {
17025
        this.subject = null;
17026
      }
17027
    }
17028
 
17029
    public String getMessage() {
17030
      return this.message;
17031
    }
17032
 
17033
    public saveUserCommunication_args setMessage(String message) {
17034
      this.message = message;
17035
      return this;
17036
    }
17037
 
17038
    public void unsetMessage() {
17039
      this.message = null;
17040
    }
17041
 
17042
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
17043
    public boolean isSetMessage() {
17044
      return this.message != null;
17045
    }
17046
 
17047
    public void setMessageIsSet(boolean value) {
17048
      if (!value) {
17049
        this.message = null;
17050
      }
17051
    }
17052
 
17053
    public void setFieldValue(_Fields field, Object value) {
17054
      switch (field) {
17055
      case USER_ID:
17056
        if (value == null) {
17057
          unsetUserId();
17058
        } else {
17059
          setUserId((Long)value);
17060
        }
17061
        break;
17062
 
17063
      case REPLY_TO:
17064
        if (value == null) {
17065
          unsetReplyTo();
17066
        } else {
17067
          setReplyTo((String)value);
17068
        }
17069
        break;
17070
 
17071
      case COMMUNICATION_TYPE:
17072
        if (value == null) {
17073
          unsetCommunicationType();
17074
        } else {
17075
          setCommunicationType((Long)value);
17076
        }
17077
        break;
17078
 
17079
      case ORDER_ID:
17080
        if (value == null) {
17081
          unsetOrderId();
17082
        } else {
17083
          setOrderId((Long)value);
17084
        }
17085
        break;
17086
 
17087
      case AIRWAYBILL_NO:
17088
        if (value == null) {
17089
          unsetAirwaybillNo();
17090
        } else {
17091
          setAirwaybillNo((String)value);
17092
        }
17093
        break;
17094
 
17095
      case PRODUCT_NAME:
17096
        if (value == null) {
17097
          unsetProductName();
17098
        } else {
17099
          setProductName((String)value);
17100
        }
17101
        break;
17102
 
17103
      case SUBJECT:
17104
        if (value == null) {
17105
          unsetSubject();
17106
        } else {
17107
          setSubject((String)value);
17108
        }
17109
        break;
17110
 
17111
      case MESSAGE:
17112
        if (value == null) {
17113
          unsetMessage();
17114
        } else {
17115
          setMessage((String)value);
17116
        }
17117
        break;
17118
 
17119
      }
17120
    }
17121
 
17122
    public void setFieldValue(int fieldID, Object value) {
17123
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17124
    }
17125
 
17126
    public Object getFieldValue(_Fields field) {
17127
      switch (field) {
17128
      case USER_ID:
17129
        return new Long(getUserId());
17130
 
17131
      case REPLY_TO:
17132
        return getReplyTo();
17133
 
17134
      case COMMUNICATION_TYPE:
17135
        return new Long(getCommunicationType());
17136
 
17137
      case ORDER_ID:
17138
        return new Long(getOrderId());
17139
 
17140
      case AIRWAYBILL_NO:
17141
        return getAirwaybillNo();
17142
 
17143
      case PRODUCT_NAME:
17144
        return getProductName();
17145
 
17146
      case SUBJECT:
17147
        return getSubject();
17148
 
17149
      case MESSAGE:
17150
        return getMessage();
17151
 
17152
      }
17153
      throw new IllegalStateException();
17154
    }
17155
 
17156
    public Object getFieldValue(int fieldId) {
17157
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17158
    }
17159
 
17160
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17161
    public boolean isSet(_Fields field) {
17162
      switch (field) {
17163
      case USER_ID:
17164
        return isSetUserId();
17165
      case REPLY_TO:
17166
        return isSetReplyTo();
17167
      case COMMUNICATION_TYPE:
17168
        return isSetCommunicationType();
17169
      case ORDER_ID:
17170
        return isSetOrderId();
17171
      case AIRWAYBILL_NO:
17172
        return isSetAirwaybillNo();
17173
      case PRODUCT_NAME:
17174
        return isSetProductName();
17175
      case SUBJECT:
17176
        return isSetSubject();
17177
      case MESSAGE:
17178
        return isSetMessage();
17179
      }
17180
      throw new IllegalStateException();
17181
    }
17182
 
17183
    public boolean isSet(int fieldID) {
17184
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17185
    }
17186
 
17187
    @Override
17188
    public boolean equals(Object that) {
17189
      if (that == null)
17190
        return false;
17191
      if (that instanceof saveUserCommunication_args)
17192
        return this.equals((saveUserCommunication_args)that);
17193
      return false;
17194
    }
17195
 
17196
    public boolean equals(saveUserCommunication_args that) {
17197
      if (that == null)
17198
        return false;
17199
 
17200
      boolean this_present_userId = true;
17201
      boolean that_present_userId = true;
17202
      if (this_present_userId || that_present_userId) {
17203
        if (!(this_present_userId && that_present_userId))
17204
          return false;
17205
        if (this.userId != that.userId)
17206
          return false;
17207
      }
17208
 
17209
      boolean this_present_replyTo = true && this.isSetReplyTo();
17210
      boolean that_present_replyTo = true && that.isSetReplyTo();
17211
      if (this_present_replyTo || that_present_replyTo) {
17212
        if (!(this_present_replyTo && that_present_replyTo))
17213
          return false;
17214
        if (!this.replyTo.equals(that.replyTo))
17215
          return false;
17216
      }
17217
 
17218
      boolean this_present_communicationType = true;
17219
      boolean that_present_communicationType = true;
17220
      if (this_present_communicationType || that_present_communicationType) {
17221
        if (!(this_present_communicationType && that_present_communicationType))
17222
          return false;
17223
        if (this.communicationType != that.communicationType)
17224
          return false;
17225
      }
17226
 
17227
      boolean this_present_orderId = true;
17228
      boolean that_present_orderId = true;
17229
      if (this_present_orderId || that_present_orderId) {
17230
        if (!(this_present_orderId && that_present_orderId))
17231
          return false;
17232
        if (this.orderId != that.orderId)
17233
          return false;
17234
      }
17235
 
17236
      boolean this_present_airwaybillNo = true && this.isSetAirwaybillNo();
17237
      boolean that_present_airwaybillNo = true && that.isSetAirwaybillNo();
17238
      if (this_present_airwaybillNo || that_present_airwaybillNo) {
17239
        if (!(this_present_airwaybillNo && that_present_airwaybillNo))
17240
          return false;
17241
        if (!this.airwaybillNo.equals(that.airwaybillNo))
17242
          return false;
17243
      }
17244
 
17245
      boolean this_present_productName = true && this.isSetProductName();
17246
      boolean that_present_productName = true && that.isSetProductName();
17247
      if (this_present_productName || that_present_productName) {
17248
        if (!(this_present_productName && that_present_productName))
17249
          return false;
17250
        if (!this.productName.equals(that.productName))
17251
          return false;
17252
      }
17253
 
17254
      boolean this_present_subject = true && this.isSetSubject();
17255
      boolean that_present_subject = true && that.isSetSubject();
17256
      if (this_present_subject || that_present_subject) {
17257
        if (!(this_present_subject && that_present_subject))
17258
          return false;
17259
        if (!this.subject.equals(that.subject))
17260
          return false;
17261
      }
17262
 
17263
      boolean this_present_message = true && this.isSetMessage();
17264
      boolean that_present_message = true && that.isSetMessage();
17265
      if (this_present_message || that_present_message) {
17266
        if (!(this_present_message && that_present_message))
17267
          return false;
17268
        if (!this.message.equals(that.message))
17269
          return false;
17270
      }
17271
 
17272
      return true;
17273
    }
17274
 
17275
    @Override
17276
    public int hashCode() {
17277
      return 0;
17278
    }
17279
 
17280
    public int compareTo(saveUserCommunication_args other) {
17281
      if (!getClass().equals(other.getClass())) {
17282
        return getClass().getName().compareTo(other.getClass().getName());
17283
      }
17284
 
17285
      int lastComparison = 0;
17286
      saveUserCommunication_args typedOther = (saveUserCommunication_args)other;
17287
 
17288
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
17289
      if (lastComparison != 0) {
17290
        return lastComparison;
17291
      }
17292
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
17293
      if (lastComparison != 0) {
17294
        return lastComparison;
17295
      }
17296
      lastComparison = Boolean.valueOf(isSetReplyTo()).compareTo(isSetReplyTo());
17297
      if (lastComparison != 0) {
17298
        return lastComparison;
17299
      }
17300
      lastComparison = TBaseHelper.compareTo(replyTo, typedOther.replyTo);
17301
      if (lastComparison != 0) {
17302
        return lastComparison;
17303
      }
17304
      lastComparison = Boolean.valueOf(isSetCommunicationType()).compareTo(isSetCommunicationType());
17305
      if (lastComparison != 0) {
17306
        return lastComparison;
17307
      }
17308
      lastComparison = TBaseHelper.compareTo(communicationType, typedOther.communicationType);
17309
      if (lastComparison != 0) {
17310
        return lastComparison;
17311
      }
17312
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
17313
      if (lastComparison != 0) {
17314
        return lastComparison;
17315
      }
17316
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
17317
      if (lastComparison != 0) {
17318
        return lastComparison;
17319
      }
17320
      lastComparison = Boolean.valueOf(isSetAirwaybillNo()).compareTo(isSetAirwaybillNo());
17321
      if (lastComparison != 0) {
17322
        return lastComparison;
17323
      }
17324
      lastComparison = TBaseHelper.compareTo(airwaybillNo, typedOther.airwaybillNo);
17325
      if (lastComparison != 0) {
17326
        return lastComparison;
17327
      }
17328
      lastComparison = Boolean.valueOf(isSetProductName()).compareTo(isSetProductName());
17329
      if (lastComparison != 0) {
17330
        return lastComparison;
17331
      }
17332
      lastComparison = TBaseHelper.compareTo(productName, typedOther.productName);
17333
      if (lastComparison != 0) {
17334
        return lastComparison;
17335
      }
17336
      lastComparison = Boolean.valueOf(isSetSubject()).compareTo(isSetSubject());
17337
      if (lastComparison != 0) {
17338
        return lastComparison;
17339
      }
17340
      lastComparison = TBaseHelper.compareTo(subject, typedOther.subject);
17341
      if (lastComparison != 0) {
17342
        return lastComparison;
17343
      }
17344
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
17345
      if (lastComparison != 0) {
17346
        return lastComparison;
17347
      }
17348
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
17349
      if (lastComparison != 0) {
17350
        return lastComparison;
17351
      }
17352
      return 0;
17353
    }
17354
 
17355
    public void read(TProtocol iprot) throws TException {
17356
      TField field;
17357
      iprot.readStructBegin();
17358
      while (true)
17359
      {
17360
        field = iprot.readFieldBegin();
17361
        if (field.type == TType.STOP) { 
17362
          break;
17363
        }
17364
        _Fields fieldId = _Fields.findByThriftId(field.id);
17365
        if (fieldId == null) {
17366
          TProtocolUtil.skip(iprot, field.type);
17367
        } else {
17368
          switch (fieldId) {
17369
            case USER_ID:
17370
              if (field.type == TType.I64) {
17371
                this.userId = iprot.readI64();
17372
                setUserIdIsSet(true);
17373
              } else { 
17374
                TProtocolUtil.skip(iprot, field.type);
17375
              }
17376
              break;
17377
            case REPLY_TO:
17378
              if (field.type == TType.STRING) {
17379
                this.replyTo = iprot.readString();
17380
              } else { 
17381
                TProtocolUtil.skip(iprot, field.type);
17382
              }
17383
              break;
17384
            case COMMUNICATION_TYPE:
17385
              if (field.type == TType.I64) {
17386
                this.communicationType = iprot.readI64();
17387
                setCommunicationTypeIsSet(true);
17388
              } else { 
17389
                TProtocolUtil.skip(iprot, field.type);
17390
              }
17391
              break;
17392
            case ORDER_ID:
17393
              if (field.type == TType.I64) {
17394
                this.orderId = iprot.readI64();
17395
                setOrderIdIsSet(true);
17396
              } else { 
17397
                TProtocolUtil.skip(iprot, field.type);
17398
              }
17399
              break;
17400
            case AIRWAYBILL_NO:
17401
              if (field.type == TType.STRING) {
17402
                this.airwaybillNo = iprot.readString();
17403
              } else { 
17404
                TProtocolUtil.skip(iprot, field.type);
17405
              }
17406
              break;
17407
            case PRODUCT_NAME:
17408
              if (field.type == TType.STRING) {
17409
                this.productName = iprot.readString();
17410
              } else { 
17411
                TProtocolUtil.skip(iprot, field.type);
17412
              }
17413
              break;
17414
            case SUBJECT:
17415
              if (field.type == TType.STRING) {
17416
                this.subject = iprot.readString();
17417
              } else { 
17418
                TProtocolUtil.skip(iprot, field.type);
17419
              }
17420
              break;
17421
            case MESSAGE:
17422
              if (field.type == TType.STRING) {
17423
                this.message = iprot.readString();
17424
              } else { 
17425
                TProtocolUtil.skip(iprot, field.type);
17426
              }
17427
              break;
17428
          }
17429
          iprot.readFieldEnd();
17430
        }
17431
      }
17432
      iprot.readStructEnd();
17433
      validate();
17434
    }
17435
 
17436
    public void write(TProtocol oprot) throws TException {
17437
      validate();
17438
 
17439
      oprot.writeStructBegin(STRUCT_DESC);
17440
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17441
      oprot.writeI64(this.userId);
17442
      oprot.writeFieldEnd();
17443
      if (this.replyTo != null) {
17444
        oprot.writeFieldBegin(REPLY_TO_FIELD_DESC);
17445
        oprot.writeString(this.replyTo);
17446
        oprot.writeFieldEnd();
17447
      }
17448
      oprot.writeFieldBegin(COMMUNICATION_TYPE_FIELD_DESC);
17449
      oprot.writeI64(this.communicationType);
17450
      oprot.writeFieldEnd();
17451
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
17452
      oprot.writeI64(this.orderId);
17453
      oprot.writeFieldEnd();
17454
      if (this.airwaybillNo != null) {
17455
        oprot.writeFieldBegin(AIRWAYBILL_NO_FIELD_DESC);
17456
        oprot.writeString(this.airwaybillNo);
17457
        oprot.writeFieldEnd();
17458
      }
17459
      if (this.productName != null) {
17460
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
17461
        oprot.writeString(this.productName);
17462
        oprot.writeFieldEnd();
17463
      }
17464
      if (this.subject != null) {
17465
        oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
17466
        oprot.writeString(this.subject);
17467
        oprot.writeFieldEnd();
17468
      }
17469
      if (this.message != null) {
17470
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
17471
        oprot.writeString(this.message);
17472
        oprot.writeFieldEnd();
17473
      }
17474
      oprot.writeFieldStop();
17475
      oprot.writeStructEnd();
17476
    }
17477
 
17478
    @Override
17479
    public String toString() {
17480
      StringBuilder sb = new StringBuilder("saveUserCommunication_args(");
17481
      boolean first = true;
17482
 
17483
      sb.append("userId:");
17484
      sb.append(this.userId);
17485
      first = false;
17486
      if (!first) sb.append(", ");
17487
      sb.append("replyTo:");
17488
      if (this.replyTo == null) {
17489
        sb.append("null");
17490
      } else {
17491
        sb.append(this.replyTo);
17492
      }
17493
      first = false;
17494
      if (!first) sb.append(", ");
17495
      sb.append("communicationType:");
17496
      sb.append(this.communicationType);
17497
      first = false;
17498
      if (!first) sb.append(", ");
17499
      sb.append("orderId:");
17500
      sb.append(this.orderId);
17501
      first = false;
17502
      if (!first) sb.append(", ");
17503
      sb.append("airwaybillNo:");
17504
      if (this.airwaybillNo == null) {
17505
        sb.append("null");
17506
      } else {
17507
        sb.append(this.airwaybillNo);
17508
      }
17509
      first = false;
17510
      if (!first) sb.append(", ");
17511
      sb.append("productName:");
17512
      if (this.productName == null) {
17513
        sb.append("null");
17514
      } else {
17515
        sb.append(this.productName);
17516
      }
17517
      first = false;
17518
      if (!first) sb.append(", ");
17519
      sb.append("subject:");
17520
      if (this.subject == null) {
17521
        sb.append("null");
17522
      } else {
17523
        sb.append(this.subject);
17524
      }
17525
      first = false;
17526
      if (!first) sb.append(", ");
17527
      sb.append("message:");
17528
      if (this.message == null) {
17529
        sb.append("null");
17530
      } else {
17531
        sb.append(this.message);
17532
      }
17533
      first = false;
17534
      sb.append(")");
17535
      return sb.toString();
17536
    }
17537
 
17538
    public void validate() throws TException {
17539
      // check for required fields
17540
    }
17541
 
17542
  }
17543
 
17544
  public static class saveUserCommunication_result implements TBase<saveUserCommunication_result._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_result>   {
17545
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_result");
17546
 
17547
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17548
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
17549
 
17550
    private boolean success;
17551
    private UserCommunicationException ucx;
17552
 
17553
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17554
    public enum _Fields implements TFieldIdEnum {
17555
      SUCCESS((short)0, "success"),
17556
      UCX((short)1, "ucx");
17557
 
17558
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17559
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17560
 
17561
      static {
17562
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17563
          byId.put((int)field._thriftId, field);
17564
          byName.put(field.getFieldName(), field);
17565
        }
17566
      }
17567
 
17568
      /**
17569
       * Find the _Fields constant that matches fieldId, or null if its not found.
17570
       */
17571
      public static _Fields findByThriftId(int fieldId) {
17572
        return byId.get(fieldId);
17573
      }
17574
 
17575
      /**
17576
       * Find the _Fields constant that matches fieldId, throwing an exception
17577
       * if it is not found.
17578
       */
17579
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17580
        _Fields fields = findByThriftId(fieldId);
17581
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17582
        return fields;
17583
      }
17584
 
17585
      /**
17586
       * Find the _Fields constant that matches name, or null if its not found.
17587
       */
17588
      public static _Fields findByName(String name) {
17589
        return byName.get(name);
17590
      }
17591
 
17592
      private final short _thriftId;
17593
      private final String _fieldName;
17594
 
17595
      _Fields(short thriftId, String fieldName) {
17596
        _thriftId = thriftId;
17597
        _fieldName = fieldName;
17598
      }
17599
 
17600
      public short getThriftFieldId() {
17601
        return _thriftId;
17602
      }
17603
 
17604
      public String getFieldName() {
17605
        return _fieldName;
17606
      }
17607
    }
17608
 
17609
    // isset id assignments
17610
    private static final int __SUCCESS_ISSET_ID = 0;
17611
    private BitSet __isset_bit_vector = new BitSet(1);
17612
 
17613
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17614
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17615
          new FieldValueMetaData(TType.BOOL)));
17616
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
17617
          new FieldValueMetaData(TType.STRUCT)));
17618
    }});
17619
 
17620
    static {
17621
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_result.class, metaDataMap);
17622
    }
17623
 
17624
    public saveUserCommunication_result() {
17625
    }
17626
 
17627
    public saveUserCommunication_result(
17628
      boolean success,
17629
      UserCommunicationException ucx)
17630
    {
17631
      this();
17632
      this.success = success;
17633
      setSuccessIsSet(true);
17634
      this.ucx = ucx;
17635
    }
17636
 
17637
    /**
17638
     * Performs a deep copy on <i>other</i>.
17639
     */
17640
    public saveUserCommunication_result(saveUserCommunication_result other) {
17641
      __isset_bit_vector.clear();
17642
      __isset_bit_vector.or(other.__isset_bit_vector);
17643
      this.success = other.success;
17644
      if (other.isSetUcx()) {
17645
        this.ucx = new UserCommunicationException(other.ucx);
17646
      }
17647
    }
17648
 
17649
    public saveUserCommunication_result deepCopy() {
17650
      return new saveUserCommunication_result(this);
17651
    }
17652
 
17653
    @Deprecated
17654
    public saveUserCommunication_result clone() {
17655
      return new saveUserCommunication_result(this);
17656
    }
17657
 
17658
    public boolean isSuccess() {
17659
      return this.success;
17660
    }
17661
 
17662
    public saveUserCommunication_result setSuccess(boolean success) {
17663
      this.success = success;
17664
      setSuccessIsSet(true);
17665
      return this;
17666
    }
17667
 
17668
    public void unsetSuccess() {
17669
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17670
    }
17671
 
17672
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17673
    public boolean isSetSuccess() {
17674
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17675
    }
17676
 
17677
    public void setSuccessIsSet(boolean value) {
17678
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17679
    }
17680
 
17681
    public UserCommunicationException getUcx() {
17682
      return this.ucx;
17683
    }
17684
 
17685
    public saveUserCommunication_result setUcx(UserCommunicationException ucx) {
17686
      this.ucx = ucx;
17687
      return this;
17688
    }
17689
 
17690
    public void unsetUcx() {
17691
      this.ucx = null;
17692
    }
17693
 
17694
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
17695
    public boolean isSetUcx() {
17696
      return this.ucx != null;
17697
    }
17698
 
17699
    public void setUcxIsSet(boolean value) {
17700
      if (!value) {
17701
        this.ucx = null;
17702
      }
17703
    }
17704
 
17705
    public void setFieldValue(_Fields field, Object value) {
17706
      switch (field) {
17707
      case SUCCESS:
17708
        if (value == null) {
17709
          unsetSuccess();
17710
        } else {
17711
          setSuccess((Boolean)value);
17712
        }
17713
        break;
17714
 
17715
      case UCX:
17716
        if (value == null) {
17717
          unsetUcx();
17718
        } else {
17719
          setUcx((UserCommunicationException)value);
17720
        }
17721
        break;
17722
 
17723
      }
17724
    }
17725
 
17726
    public void setFieldValue(int fieldID, Object value) {
17727
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17728
    }
17729
 
17730
    public Object getFieldValue(_Fields field) {
17731
      switch (field) {
17732
      case SUCCESS:
17733
        return new Boolean(isSuccess());
17734
 
17735
      case UCX:
17736
        return getUcx();
17737
 
17738
      }
17739
      throw new IllegalStateException();
17740
    }
17741
 
17742
    public Object getFieldValue(int fieldId) {
17743
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17744
    }
17745
 
17746
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17747
    public boolean isSet(_Fields field) {
17748
      switch (field) {
17749
      case SUCCESS:
17750
        return isSetSuccess();
17751
      case UCX:
17752
        return isSetUcx();
17753
      }
17754
      throw new IllegalStateException();
17755
    }
17756
 
17757
    public boolean isSet(int fieldID) {
17758
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17759
    }
17760
 
17761
    @Override
17762
    public boolean equals(Object that) {
17763
      if (that == null)
17764
        return false;
17765
      if (that instanceof saveUserCommunication_result)
17766
        return this.equals((saveUserCommunication_result)that);
17767
      return false;
17768
    }
17769
 
17770
    public boolean equals(saveUserCommunication_result that) {
17771
      if (that == null)
17772
        return false;
17773
 
17774
      boolean this_present_success = true;
17775
      boolean that_present_success = true;
17776
      if (this_present_success || that_present_success) {
17777
        if (!(this_present_success && that_present_success))
17778
          return false;
17779
        if (this.success != that.success)
17780
          return false;
17781
      }
17782
 
17783
      boolean this_present_ucx = true && this.isSetUcx();
17784
      boolean that_present_ucx = true && that.isSetUcx();
17785
      if (this_present_ucx || that_present_ucx) {
17786
        if (!(this_present_ucx && that_present_ucx))
17787
          return false;
17788
        if (!this.ucx.equals(that.ucx))
17789
          return false;
17790
      }
17791
 
17792
      return true;
17793
    }
17794
 
17795
    @Override
17796
    public int hashCode() {
17797
      return 0;
17798
    }
17799
 
17800
    public int compareTo(saveUserCommunication_result other) {
17801
      if (!getClass().equals(other.getClass())) {
17802
        return getClass().getName().compareTo(other.getClass().getName());
17803
      }
17804
 
17805
      int lastComparison = 0;
17806
      saveUserCommunication_result typedOther = (saveUserCommunication_result)other;
17807
 
17808
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17809
      if (lastComparison != 0) {
17810
        return lastComparison;
17811
      }
17812
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17813
      if (lastComparison != 0) {
17814
        return lastComparison;
17815
      }
17816
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
17817
      if (lastComparison != 0) {
17818
        return lastComparison;
17819
      }
17820
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
17821
      if (lastComparison != 0) {
17822
        return lastComparison;
17823
      }
17824
      return 0;
17825
    }
17826
 
17827
    public void read(TProtocol iprot) throws TException {
17828
      TField field;
17829
      iprot.readStructBegin();
17830
      while (true)
17831
      {
17832
        field = iprot.readFieldBegin();
17833
        if (field.type == TType.STOP) { 
17834
          break;
17835
        }
17836
        _Fields fieldId = _Fields.findByThriftId(field.id);
17837
        if (fieldId == null) {
17838
          TProtocolUtil.skip(iprot, field.type);
17839
        } else {
17840
          switch (fieldId) {
17841
            case SUCCESS:
17842
              if (field.type == TType.BOOL) {
17843
                this.success = iprot.readBool();
17844
                setSuccessIsSet(true);
17845
              } else { 
17846
                TProtocolUtil.skip(iprot, field.type);
17847
              }
17848
              break;
17849
            case UCX:
17850
              if (field.type == TType.STRUCT) {
17851
                this.ucx = new UserCommunicationException();
17852
                this.ucx.read(iprot);
17853
              } else { 
17854
                TProtocolUtil.skip(iprot, field.type);
17855
              }
17856
              break;
17857
          }
17858
          iprot.readFieldEnd();
17859
        }
17860
      }
17861
      iprot.readStructEnd();
17862
      validate();
17863
    }
17864
 
17865
    public void write(TProtocol oprot) throws TException {
17866
      oprot.writeStructBegin(STRUCT_DESC);
17867
 
17868
      if (this.isSetSuccess()) {
17869
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17870
        oprot.writeBool(this.success);
17871
        oprot.writeFieldEnd();
17872
      } else if (this.isSetUcx()) {
17873
        oprot.writeFieldBegin(UCX_FIELD_DESC);
17874
        this.ucx.write(oprot);
17875
        oprot.writeFieldEnd();
17876
      }
17877
      oprot.writeFieldStop();
17878
      oprot.writeStructEnd();
17879
    }
17880
 
17881
    @Override
17882
    public String toString() {
17883
      StringBuilder sb = new StringBuilder("saveUserCommunication_result(");
17884
      boolean first = true;
17885
 
17886
      sb.append("success:");
17887
      sb.append(this.success);
17888
      first = false;
17889
      if (!first) sb.append(", ");
17890
      sb.append("ucx:");
17891
      if (this.ucx == null) {
17892
        sb.append("null");
17893
      } else {
17894
        sb.append(this.ucx);
17895
      }
17896
      first = false;
17897
      sb.append(")");
17898
      return sb.toString();
17899
    }
17900
 
17901
    public void validate() throws TException {
17902
      // check for required fields
17903
    }
17904
 
17905
  }
17906
 
1590 varun.gupt 17907
  public static class getUserCommunicationById_args implements TBase<getUserCommunicationById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCommunicationById_args>   {
17908
    private static final TStruct STRUCT_DESC = new TStruct("getUserCommunicationById_args");
17909
 
17910
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
17911
 
17912
    private long id;
17913
 
17914
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17915
    public enum _Fields implements TFieldIdEnum {
17916
      ID((short)1, "id");
17917
 
17918
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17919
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17920
 
17921
      static {
17922
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17923
          byId.put((int)field._thriftId, field);
17924
          byName.put(field.getFieldName(), field);
17925
        }
17926
      }
17927
 
17928
      /**
17929
       * Find the _Fields constant that matches fieldId, or null if its not found.
17930
       */
17931
      public static _Fields findByThriftId(int fieldId) {
17932
        return byId.get(fieldId);
17933
      }
17934
 
17935
      /**
17936
       * Find the _Fields constant that matches fieldId, throwing an exception
17937
       * if it is not found.
17938
       */
17939
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17940
        _Fields fields = findByThriftId(fieldId);
17941
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17942
        return fields;
17943
      }
17944
 
17945
      /**
17946
       * Find the _Fields constant that matches name, or null if its not found.
17947
       */
17948
      public static _Fields findByName(String name) {
17949
        return byName.get(name);
17950
      }
17951
 
17952
      private final short _thriftId;
17953
      private final String _fieldName;
17954
 
17955
      _Fields(short thriftId, String fieldName) {
17956
        _thriftId = thriftId;
17957
        _fieldName = fieldName;
17958
      }
17959
 
17960
      public short getThriftFieldId() {
17961
        return _thriftId;
17962
      }
17963
 
17964
      public String getFieldName() {
17965
        return _fieldName;
17966
      }
17967
    }
17968
 
17969
    // isset id assignments
17970
    private static final int __ID_ISSET_ID = 0;
17971
    private BitSet __isset_bit_vector = new BitSet(1);
17972
 
17973
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17974
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
17975
          new FieldValueMetaData(TType.I64)));
17976
    }});
17977
 
17978
    static {
17979
      FieldMetaData.addStructMetaDataMap(getUserCommunicationById_args.class, metaDataMap);
17980
    }
17981
 
17982
    public getUserCommunicationById_args() {
17983
    }
17984
 
17985
    public getUserCommunicationById_args(
17986
      long id)
17987
    {
17988
      this();
17989
      this.id = id;
17990
      setIdIsSet(true);
17991
    }
17992
 
17993
    /**
17994
     * Performs a deep copy on <i>other</i>.
17995
     */
17996
    public getUserCommunicationById_args(getUserCommunicationById_args other) {
17997
      __isset_bit_vector.clear();
17998
      __isset_bit_vector.or(other.__isset_bit_vector);
17999
      this.id = other.id;
18000
    }
18001
 
18002
    public getUserCommunicationById_args deepCopy() {
18003
      return new getUserCommunicationById_args(this);
18004
    }
18005
 
18006
    @Deprecated
18007
    public getUserCommunicationById_args clone() {
18008
      return new getUserCommunicationById_args(this);
18009
    }
18010
 
18011
    public long getId() {
18012
      return this.id;
18013
    }
18014
 
18015
    public getUserCommunicationById_args setId(long id) {
18016
      this.id = id;
18017
      setIdIsSet(true);
18018
      return this;
18019
    }
18020
 
18021
    public void unsetId() {
18022
      __isset_bit_vector.clear(__ID_ISSET_ID);
18023
    }
18024
 
18025
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
18026
    public boolean isSetId() {
18027
      return __isset_bit_vector.get(__ID_ISSET_ID);
18028
    }
18029
 
18030
    public void setIdIsSet(boolean value) {
18031
      __isset_bit_vector.set(__ID_ISSET_ID, value);
18032
    }
18033
 
18034
    public void setFieldValue(_Fields field, Object value) {
18035
      switch (field) {
18036
      case ID:
18037
        if (value == null) {
18038
          unsetId();
18039
        } else {
18040
          setId((Long)value);
18041
        }
18042
        break;
18043
 
18044
      }
18045
    }
18046
 
18047
    public void setFieldValue(int fieldID, Object value) {
18048
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18049
    }
18050
 
18051
    public Object getFieldValue(_Fields field) {
18052
      switch (field) {
18053
      case ID:
18054
        return new Long(getId());
18055
 
18056
      }
18057
      throw new IllegalStateException();
18058
    }
18059
 
18060
    public Object getFieldValue(int fieldId) {
18061
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18062
    }
18063
 
18064
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18065
    public boolean isSet(_Fields field) {
18066
      switch (field) {
18067
      case ID:
18068
        return isSetId();
18069
      }
18070
      throw new IllegalStateException();
18071
    }
18072
 
18073
    public boolean isSet(int fieldID) {
18074
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18075
    }
18076
 
18077
    @Override
18078
    public boolean equals(Object that) {
18079
      if (that == null)
18080
        return false;
18081
      if (that instanceof getUserCommunicationById_args)
18082
        return this.equals((getUserCommunicationById_args)that);
18083
      return false;
18084
    }
18085
 
18086
    public boolean equals(getUserCommunicationById_args that) {
18087
      if (that == null)
18088
        return false;
18089
 
18090
      boolean this_present_id = true;
18091
      boolean that_present_id = true;
18092
      if (this_present_id || that_present_id) {
18093
        if (!(this_present_id && that_present_id))
18094
          return false;
18095
        if (this.id != that.id)
18096
          return false;
18097
      }
18098
 
18099
      return true;
18100
    }
18101
 
18102
    @Override
18103
    public int hashCode() {
18104
      return 0;
18105
    }
18106
 
18107
    public int compareTo(getUserCommunicationById_args other) {
18108
      if (!getClass().equals(other.getClass())) {
18109
        return getClass().getName().compareTo(other.getClass().getName());
18110
      }
18111
 
18112
      int lastComparison = 0;
18113
      getUserCommunicationById_args typedOther = (getUserCommunicationById_args)other;
18114
 
18115
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
18116
      if (lastComparison != 0) {
18117
        return lastComparison;
18118
      }
18119
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
18120
      if (lastComparison != 0) {
18121
        return lastComparison;
18122
      }
18123
      return 0;
18124
    }
18125
 
18126
    public void read(TProtocol iprot) throws TException {
18127
      TField field;
18128
      iprot.readStructBegin();
18129
      while (true)
18130
      {
18131
        field = iprot.readFieldBegin();
18132
        if (field.type == TType.STOP) { 
18133
          break;
18134
        }
18135
        _Fields fieldId = _Fields.findByThriftId(field.id);
18136
        if (fieldId == null) {
18137
          TProtocolUtil.skip(iprot, field.type);
18138
        } else {
18139
          switch (fieldId) {
18140
            case ID:
18141
              if (field.type == TType.I64) {
18142
                this.id = iprot.readI64();
18143
                setIdIsSet(true);
18144
              } else { 
18145
                TProtocolUtil.skip(iprot, field.type);
18146
              }
18147
              break;
18148
          }
18149
          iprot.readFieldEnd();
18150
        }
18151
      }
18152
      iprot.readStructEnd();
18153
      validate();
18154
    }
18155
 
18156
    public void write(TProtocol oprot) throws TException {
18157
      validate();
18158
 
18159
      oprot.writeStructBegin(STRUCT_DESC);
18160
      oprot.writeFieldBegin(ID_FIELD_DESC);
18161
      oprot.writeI64(this.id);
18162
      oprot.writeFieldEnd();
18163
      oprot.writeFieldStop();
18164
      oprot.writeStructEnd();
18165
    }
18166
 
18167
    @Override
18168
    public String toString() {
18169
      StringBuilder sb = new StringBuilder("getUserCommunicationById_args(");
18170
      boolean first = true;
18171
 
18172
      sb.append("id:");
18173
      sb.append(this.id);
18174
      first = false;
18175
      sb.append(")");
18176
      return sb.toString();
18177
    }
18178
 
18179
    public void validate() throws TException {
18180
      // check for required fields
18181
    }
18182
 
18183
  }
18184
 
18185
  public static class getUserCommunicationById_result implements TBase<getUserCommunicationById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCommunicationById_result>   {
18186
    private static final TStruct STRUCT_DESC = new TStruct("getUserCommunicationById_result");
18187
 
18188
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
18189
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
18190
 
18191
    private UserCommunication success;
18192
    private UserCommunicationException ucx;
18193
 
18194
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18195
    public enum _Fields implements TFieldIdEnum {
18196
      SUCCESS((short)0, "success"),
18197
      UCX((short)1, "ucx");
18198
 
18199
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18200
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18201
 
18202
      static {
18203
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18204
          byId.put((int)field._thriftId, field);
18205
          byName.put(field.getFieldName(), field);
18206
        }
18207
      }
18208
 
18209
      /**
18210
       * Find the _Fields constant that matches fieldId, or null if its not found.
18211
       */
18212
      public static _Fields findByThriftId(int fieldId) {
18213
        return byId.get(fieldId);
18214
      }
18215
 
18216
      /**
18217
       * Find the _Fields constant that matches fieldId, throwing an exception
18218
       * if it is not found.
18219
       */
18220
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18221
        _Fields fields = findByThriftId(fieldId);
18222
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18223
        return fields;
18224
      }
18225
 
18226
      /**
18227
       * Find the _Fields constant that matches name, or null if its not found.
18228
       */
18229
      public static _Fields findByName(String name) {
18230
        return byName.get(name);
18231
      }
18232
 
18233
      private final short _thriftId;
18234
      private final String _fieldName;
18235
 
18236
      _Fields(short thriftId, String fieldName) {
18237
        _thriftId = thriftId;
18238
        _fieldName = fieldName;
18239
      }
18240
 
18241
      public short getThriftFieldId() {
18242
        return _thriftId;
18243
      }
18244
 
18245
      public String getFieldName() {
18246
        return _fieldName;
18247
      }
18248
    }
18249
 
18250
    // isset id assignments
18251
 
18252
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18253
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18254
          new StructMetaData(TType.STRUCT, UserCommunication.class)));
18255
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
18256
          new FieldValueMetaData(TType.STRUCT)));
18257
    }});
18258
 
18259
    static {
18260
      FieldMetaData.addStructMetaDataMap(getUserCommunicationById_result.class, metaDataMap);
18261
    }
18262
 
18263
    public getUserCommunicationById_result() {
18264
    }
18265
 
18266
    public getUserCommunicationById_result(
18267
      UserCommunication success,
18268
      UserCommunicationException ucx)
18269
    {
18270
      this();
18271
      this.success = success;
18272
      this.ucx = ucx;
18273
    }
18274
 
18275
    /**
18276
     * Performs a deep copy on <i>other</i>.
18277
     */
18278
    public getUserCommunicationById_result(getUserCommunicationById_result other) {
18279
      if (other.isSetSuccess()) {
18280
        this.success = new UserCommunication(other.success);
18281
      }
18282
      if (other.isSetUcx()) {
18283
        this.ucx = new UserCommunicationException(other.ucx);
18284
      }
18285
    }
18286
 
18287
    public getUserCommunicationById_result deepCopy() {
18288
      return new getUserCommunicationById_result(this);
18289
    }
18290
 
18291
    @Deprecated
18292
    public getUserCommunicationById_result clone() {
18293
      return new getUserCommunicationById_result(this);
18294
    }
18295
 
18296
    public UserCommunication getSuccess() {
18297
      return this.success;
18298
    }
18299
 
18300
    public getUserCommunicationById_result setSuccess(UserCommunication success) {
18301
      this.success = success;
18302
      return this;
18303
    }
18304
 
18305
    public void unsetSuccess() {
18306
      this.success = null;
18307
    }
18308
 
18309
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18310
    public boolean isSetSuccess() {
18311
      return this.success != null;
18312
    }
18313
 
18314
    public void setSuccessIsSet(boolean value) {
18315
      if (!value) {
18316
        this.success = null;
18317
      }
18318
    }
18319
 
18320
    public UserCommunicationException getUcx() {
18321
      return this.ucx;
18322
    }
18323
 
18324
    public getUserCommunicationById_result setUcx(UserCommunicationException ucx) {
18325
      this.ucx = ucx;
18326
      return this;
18327
    }
18328
 
18329
    public void unsetUcx() {
18330
      this.ucx = null;
18331
    }
18332
 
18333
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
18334
    public boolean isSetUcx() {
18335
      return this.ucx != null;
18336
    }
18337
 
18338
    public void setUcxIsSet(boolean value) {
18339
      if (!value) {
18340
        this.ucx = null;
18341
      }
18342
    }
18343
 
18344
    public void setFieldValue(_Fields field, Object value) {
18345
      switch (field) {
18346
      case SUCCESS:
18347
        if (value == null) {
18348
          unsetSuccess();
18349
        } else {
18350
          setSuccess((UserCommunication)value);
18351
        }
18352
        break;
18353
 
18354
      case UCX:
18355
        if (value == null) {
18356
          unsetUcx();
18357
        } else {
18358
          setUcx((UserCommunicationException)value);
18359
        }
18360
        break;
18361
 
18362
      }
18363
    }
18364
 
18365
    public void setFieldValue(int fieldID, Object value) {
18366
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18367
    }
18368
 
18369
    public Object getFieldValue(_Fields field) {
18370
      switch (field) {
18371
      case SUCCESS:
18372
        return getSuccess();
18373
 
18374
      case UCX:
18375
        return getUcx();
18376
 
18377
      }
18378
      throw new IllegalStateException();
18379
    }
18380
 
18381
    public Object getFieldValue(int fieldId) {
18382
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18383
    }
18384
 
18385
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18386
    public boolean isSet(_Fields field) {
18387
      switch (field) {
18388
      case SUCCESS:
18389
        return isSetSuccess();
18390
      case UCX:
18391
        return isSetUcx();
18392
      }
18393
      throw new IllegalStateException();
18394
    }
18395
 
18396
    public boolean isSet(int fieldID) {
18397
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18398
    }
18399
 
18400
    @Override
18401
    public boolean equals(Object that) {
18402
      if (that == null)
18403
        return false;
18404
      if (that instanceof getUserCommunicationById_result)
18405
        return this.equals((getUserCommunicationById_result)that);
18406
      return false;
18407
    }
18408
 
18409
    public boolean equals(getUserCommunicationById_result that) {
18410
      if (that == null)
18411
        return false;
18412
 
18413
      boolean this_present_success = true && this.isSetSuccess();
18414
      boolean that_present_success = true && that.isSetSuccess();
18415
      if (this_present_success || that_present_success) {
18416
        if (!(this_present_success && that_present_success))
18417
          return false;
18418
        if (!this.success.equals(that.success))
18419
          return false;
18420
      }
18421
 
18422
      boolean this_present_ucx = true && this.isSetUcx();
18423
      boolean that_present_ucx = true && that.isSetUcx();
18424
      if (this_present_ucx || that_present_ucx) {
18425
        if (!(this_present_ucx && that_present_ucx))
18426
          return false;
18427
        if (!this.ucx.equals(that.ucx))
18428
          return false;
18429
      }
18430
 
18431
      return true;
18432
    }
18433
 
18434
    @Override
18435
    public int hashCode() {
18436
      return 0;
18437
    }
18438
 
18439
    public int compareTo(getUserCommunicationById_result other) {
18440
      if (!getClass().equals(other.getClass())) {
18441
        return getClass().getName().compareTo(other.getClass().getName());
18442
      }
18443
 
18444
      int lastComparison = 0;
18445
      getUserCommunicationById_result typedOther = (getUserCommunicationById_result)other;
18446
 
18447
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18448
      if (lastComparison != 0) {
18449
        return lastComparison;
18450
      }
18451
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18452
      if (lastComparison != 0) {
18453
        return lastComparison;
18454
      }
18455
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
18456
      if (lastComparison != 0) {
18457
        return lastComparison;
18458
      }
18459
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
18460
      if (lastComparison != 0) {
18461
        return lastComparison;
18462
      }
18463
      return 0;
18464
    }
18465
 
18466
    public void read(TProtocol iprot) throws TException {
18467
      TField field;
18468
      iprot.readStructBegin();
18469
      while (true)
18470
      {
18471
        field = iprot.readFieldBegin();
18472
        if (field.type == TType.STOP) { 
18473
          break;
18474
        }
18475
        _Fields fieldId = _Fields.findByThriftId(field.id);
18476
        if (fieldId == null) {
18477
          TProtocolUtil.skip(iprot, field.type);
18478
        } else {
18479
          switch (fieldId) {
18480
            case SUCCESS:
18481
              if (field.type == TType.STRUCT) {
18482
                this.success = new UserCommunication();
18483
                this.success.read(iprot);
18484
              } else { 
18485
                TProtocolUtil.skip(iprot, field.type);
18486
              }
18487
              break;
18488
            case UCX:
18489
              if (field.type == TType.STRUCT) {
18490
                this.ucx = new UserCommunicationException();
18491
                this.ucx.read(iprot);
18492
              } else { 
18493
                TProtocolUtil.skip(iprot, field.type);
18494
              }
18495
              break;
18496
          }
18497
          iprot.readFieldEnd();
18498
        }
18499
      }
18500
      iprot.readStructEnd();
18501
      validate();
18502
    }
18503
 
18504
    public void write(TProtocol oprot) throws TException {
18505
      oprot.writeStructBegin(STRUCT_DESC);
18506
 
18507
      if (this.isSetSuccess()) {
18508
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18509
        this.success.write(oprot);
18510
        oprot.writeFieldEnd();
18511
      } else if (this.isSetUcx()) {
18512
        oprot.writeFieldBegin(UCX_FIELD_DESC);
18513
        this.ucx.write(oprot);
18514
        oprot.writeFieldEnd();
18515
      }
18516
      oprot.writeFieldStop();
18517
      oprot.writeStructEnd();
18518
    }
18519
 
18520
    @Override
18521
    public String toString() {
18522
      StringBuilder sb = new StringBuilder("getUserCommunicationById_result(");
18523
      boolean first = true;
18524
 
18525
      sb.append("success:");
18526
      if (this.success == null) {
18527
        sb.append("null");
18528
      } else {
18529
        sb.append(this.success);
18530
      }
18531
      first = false;
18532
      if (!first) sb.append(", ");
18533
      sb.append("ucx:");
18534
      if (this.ucx == null) {
18535
        sb.append("null");
18536
      } else {
18537
        sb.append(this.ucx);
18538
      }
18539
      first = false;
18540
      sb.append(")");
18541
      return sb.toString();
18542
    }
18543
 
18544
    public void validate() throws TException {
18545
      // check for required fields
18546
    }
18547
 
18548
  }
18549
 
18550
  public static class getUserCommunicationByUser_args implements TBase<getUserCommunicationByUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCommunicationByUser_args>   {
18551
    private static final TStruct STRUCT_DESC = new TStruct("getUserCommunicationByUser_args");
18552
 
18553
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
18554
 
18555
    private long userId;
18556
 
18557
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18558
    public enum _Fields implements TFieldIdEnum {
18559
      USER_ID((short)1, "userId");
18560
 
18561
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18562
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18563
 
18564
      static {
18565
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18566
          byId.put((int)field._thriftId, field);
18567
          byName.put(field.getFieldName(), field);
18568
        }
18569
      }
18570
 
18571
      /**
18572
       * Find the _Fields constant that matches fieldId, or null if its not found.
18573
       */
18574
      public static _Fields findByThriftId(int fieldId) {
18575
        return byId.get(fieldId);
18576
      }
18577
 
18578
      /**
18579
       * Find the _Fields constant that matches fieldId, throwing an exception
18580
       * if it is not found.
18581
       */
18582
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18583
        _Fields fields = findByThriftId(fieldId);
18584
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18585
        return fields;
18586
      }
18587
 
18588
      /**
18589
       * Find the _Fields constant that matches name, or null if its not found.
18590
       */
18591
      public static _Fields findByName(String name) {
18592
        return byName.get(name);
18593
      }
18594
 
18595
      private final short _thriftId;
18596
      private final String _fieldName;
18597
 
18598
      _Fields(short thriftId, String fieldName) {
18599
        _thriftId = thriftId;
18600
        _fieldName = fieldName;
18601
      }
18602
 
18603
      public short getThriftFieldId() {
18604
        return _thriftId;
18605
      }
18606
 
18607
      public String getFieldName() {
18608
        return _fieldName;
18609
      }
18610
    }
18611
 
18612
    // isset id assignments
18613
    private static final int __USERID_ISSET_ID = 0;
18614
    private BitSet __isset_bit_vector = new BitSet(1);
18615
 
18616
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18617
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
18618
          new FieldValueMetaData(TType.I64)));
18619
    }});
18620
 
18621
    static {
18622
      FieldMetaData.addStructMetaDataMap(getUserCommunicationByUser_args.class, metaDataMap);
18623
    }
18624
 
18625
    public getUserCommunicationByUser_args() {
18626
    }
18627
 
18628
    public getUserCommunicationByUser_args(
18629
      long userId)
18630
    {
18631
      this();
18632
      this.userId = userId;
18633
      setUserIdIsSet(true);
18634
    }
18635
 
18636
    /**
18637
     * Performs a deep copy on <i>other</i>.
18638
     */
18639
    public getUserCommunicationByUser_args(getUserCommunicationByUser_args other) {
18640
      __isset_bit_vector.clear();
18641
      __isset_bit_vector.or(other.__isset_bit_vector);
18642
      this.userId = other.userId;
18643
    }
18644
 
18645
    public getUserCommunicationByUser_args deepCopy() {
18646
      return new getUserCommunicationByUser_args(this);
18647
    }
18648
 
18649
    @Deprecated
18650
    public getUserCommunicationByUser_args clone() {
18651
      return new getUserCommunicationByUser_args(this);
18652
    }
18653
 
18654
    public long getUserId() {
18655
      return this.userId;
18656
    }
18657
 
18658
    public getUserCommunicationByUser_args setUserId(long userId) {
18659
      this.userId = userId;
18660
      setUserIdIsSet(true);
18661
      return this;
18662
    }
18663
 
18664
    public void unsetUserId() {
18665
      __isset_bit_vector.clear(__USERID_ISSET_ID);
18666
    }
18667
 
18668
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
18669
    public boolean isSetUserId() {
18670
      return __isset_bit_vector.get(__USERID_ISSET_ID);
18671
    }
18672
 
18673
    public void setUserIdIsSet(boolean value) {
18674
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
18675
    }
18676
 
18677
    public void setFieldValue(_Fields field, Object value) {
18678
      switch (field) {
18679
      case USER_ID:
18680
        if (value == null) {
18681
          unsetUserId();
18682
        } else {
18683
          setUserId((Long)value);
18684
        }
18685
        break;
18686
 
18687
      }
18688
    }
18689
 
18690
    public void setFieldValue(int fieldID, Object value) {
18691
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18692
    }
18693
 
18694
    public Object getFieldValue(_Fields field) {
18695
      switch (field) {
18696
      case USER_ID:
18697
        return new Long(getUserId());
18698
 
18699
      }
18700
      throw new IllegalStateException();
18701
    }
18702
 
18703
    public Object getFieldValue(int fieldId) {
18704
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18705
    }
18706
 
18707
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18708
    public boolean isSet(_Fields field) {
18709
      switch (field) {
18710
      case USER_ID:
18711
        return isSetUserId();
18712
      }
18713
      throw new IllegalStateException();
18714
    }
18715
 
18716
    public boolean isSet(int fieldID) {
18717
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18718
    }
18719
 
18720
    @Override
18721
    public boolean equals(Object that) {
18722
      if (that == null)
18723
        return false;
18724
      if (that instanceof getUserCommunicationByUser_args)
18725
        return this.equals((getUserCommunicationByUser_args)that);
18726
      return false;
18727
    }
18728
 
18729
    public boolean equals(getUserCommunicationByUser_args that) {
18730
      if (that == null)
18731
        return false;
18732
 
18733
      boolean this_present_userId = true;
18734
      boolean that_present_userId = true;
18735
      if (this_present_userId || that_present_userId) {
18736
        if (!(this_present_userId && that_present_userId))
18737
          return false;
18738
        if (this.userId != that.userId)
18739
          return false;
18740
      }
18741
 
18742
      return true;
18743
    }
18744
 
18745
    @Override
18746
    public int hashCode() {
18747
      return 0;
18748
    }
18749
 
18750
    public int compareTo(getUserCommunicationByUser_args other) {
18751
      if (!getClass().equals(other.getClass())) {
18752
        return getClass().getName().compareTo(other.getClass().getName());
18753
      }
18754
 
18755
      int lastComparison = 0;
18756
      getUserCommunicationByUser_args typedOther = (getUserCommunicationByUser_args)other;
18757
 
18758
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
18759
      if (lastComparison != 0) {
18760
        return lastComparison;
18761
      }
18762
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
18763
      if (lastComparison != 0) {
18764
        return lastComparison;
18765
      }
18766
      return 0;
18767
    }
18768
 
18769
    public void read(TProtocol iprot) throws TException {
18770
      TField field;
18771
      iprot.readStructBegin();
18772
      while (true)
18773
      {
18774
        field = iprot.readFieldBegin();
18775
        if (field.type == TType.STOP) { 
18776
          break;
18777
        }
18778
        _Fields fieldId = _Fields.findByThriftId(field.id);
18779
        if (fieldId == null) {
18780
          TProtocolUtil.skip(iprot, field.type);
18781
        } else {
18782
          switch (fieldId) {
18783
            case USER_ID:
18784
              if (field.type == TType.I64) {
18785
                this.userId = iprot.readI64();
18786
                setUserIdIsSet(true);
18787
              } else { 
18788
                TProtocolUtil.skip(iprot, field.type);
18789
              }
18790
              break;
18791
          }
18792
          iprot.readFieldEnd();
18793
        }
18794
      }
18795
      iprot.readStructEnd();
18796
      validate();
18797
    }
18798
 
18799
    public void write(TProtocol oprot) throws TException {
18800
      validate();
18801
 
18802
      oprot.writeStructBegin(STRUCT_DESC);
18803
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
18804
      oprot.writeI64(this.userId);
18805
      oprot.writeFieldEnd();
18806
      oprot.writeFieldStop();
18807
      oprot.writeStructEnd();
18808
    }
18809
 
18810
    @Override
18811
    public String toString() {
18812
      StringBuilder sb = new StringBuilder("getUserCommunicationByUser_args(");
18813
      boolean first = true;
18814
 
18815
      sb.append("userId:");
18816
      sb.append(this.userId);
18817
      first = false;
18818
      sb.append(")");
18819
      return sb.toString();
18820
    }
18821
 
18822
    public void validate() throws TException {
18823
      // check for required fields
18824
    }
18825
 
18826
  }
18827
 
18828
  public static class getUserCommunicationByUser_result implements TBase<getUserCommunicationByUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserCommunicationByUser_result>   {
18829
    private static final TStruct STRUCT_DESC = new TStruct("getUserCommunicationByUser_result");
18830
 
18831
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18832
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
18833
 
18834
    private List<UserCommunication> success;
18835
    private UserCommunicationException ucx;
18836
 
18837
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18838
    public enum _Fields implements TFieldIdEnum {
18839
      SUCCESS((short)0, "success"),
18840
      UCX((short)1, "ucx");
18841
 
18842
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18844
 
18845
      static {
18846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18847
          byId.put((int)field._thriftId, field);
18848
          byName.put(field.getFieldName(), field);
18849
        }
18850
      }
18851
 
18852
      /**
18853
       * Find the _Fields constant that matches fieldId, or null if its not found.
18854
       */
18855
      public static _Fields findByThriftId(int fieldId) {
18856
        return byId.get(fieldId);
18857
      }
18858
 
18859
      /**
18860
       * Find the _Fields constant that matches fieldId, throwing an exception
18861
       * if it is not found.
18862
       */
18863
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18864
        _Fields fields = findByThriftId(fieldId);
18865
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18866
        return fields;
18867
      }
18868
 
18869
      /**
18870
       * Find the _Fields constant that matches name, or null if its not found.
18871
       */
18872
      public static _Fields findByName(String name) {
18873
        return byName.get(name);
18874
      }
18875
 
18876
      private final short _thriftId;
18877
      private final String _fieldName;
18878
 
18879
      _Fields(short thriftId, String fieldName) {
18880
        _thriftId = thriftId;
18881
        _fieldName = fieldName;
18882
      }
18883
 
18884
      public short getThriftFieldId() {
18885
        return _thriftId;
18886
      }
18887
 
18888
      public String getFieldName() {
18889
        return _fieldName;
18890
      }
18891
    }
18892
 
18893
    // isset id assignments
18894
 
18895
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18896
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18897
          new ListMetaData(TType.LIST, 
18898
              new StructMetaData(TType.STRUCT, UserCommunication.class))));
18899
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
18900
          new FieldValueMetaData(TType.STRUCT)));
18901
    }});
18902
 
18903
    static {
18904
      FieldMetaData.addStructMetaDataMap(getUserCommunicationByUser_result.class, metaDataMap);
18905
    }
18906
 
18907
    public getUserCommunicationByUser_result() {
18908
    }
18909
 
18910
    public getUserCommunicationByUser_result(
18911
      List<UserCommunication> success,
18912
      UserCommunicationException ucx)
18913
    {
18914
      this();
18915
      this.success = success;
18916
      this.ucx = ucx;
18917
    }
18918
 
18919
    /**
18920
     * Performs a deep copy on <i>other</i>.
18921
     */
18922
    public getUserCommunicationByUser_result(getUserCommunicationByUser_result other) {
18923
      if (other.isSetSuccess()) {
18924
        List<UserCommunication> __this__success = new ArrayList<UserCommunication>();
18925
        for (UserCommunication other_element : other.success) {
18926
          __this__success.add(new UserCommunication(other_element));
18927
        }
18928
        this.success = __this__success;
18929
      }
18930
      if (other.isSetUcx()) {
18931
        this.ucx = new UserCommunicationException(other.ucx);
18932
      }
18933
    }
18934
 
18935
    public getUserCommunicationByUser_result deepCopy() {
18936
      return new getUserCommunicationByUser_result(this);
18937
    }
18938
 
18939
    @Deprecated
18940
    public getUserCommunicationByUser_result clone() {
18941
      return new getUserCommunicationByUser_result(this);
18942
    }
18943
 
18944
    public int getSuccessSize() {
18945
      return (this.success == null) ? 0 : this.success.size();
18946
    }
18947
 
18948
    public java.util.Iterator<UserCommunication> getSuccessIterator() {
18949
      return (this.success == null) ? null : this.success.iterator();
18950
    }
18951
 
18952
    public void addToSuccess(UserCommunication elem) {
18953
      if (this.success == null) {
18954
        this.success = new ArrayList<UserCommunication>();
18955
      }
18956
      this.success.add(elem);
18957
    }
18958
 
18959
    public List<UserCommunication> getSuccess() {
18960
      return this.success;
18961
    }
18962
 
18963
    public getUserCommunicationByUser_result setSuccess(List<UserCommunication> success) {
18964
      this.success = success;
18965
      return this;
18966
    }
18967
 
18968
    public void unsetSuccess() {
18969
      this.success = null;
18970
    }
18971
 
18972
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18973
    public boolean isSetSuccess() {
18974
      return this.success != null;
18975
    }
18976
 
18977
    public void setSuccessIsSet(boolean value) {
18978
      if (!value) {
18979
        this.success = null;
18980
      }
18981
    }
18982
 
18983
    public UserCommunicationException getUcx() {
18984
      return this.ucx;
18985
    }
18986
 
18987
    public getUserCommunicationByUser_result setUcx(UserCommunicationException ucx) {
18988
      this.ucx = ucx;
18989
      return this;
18990
    }
18991
 
18992
    public void unsetUcx() {
18993
      this.ucx = null;
18994
    }
18995
 
18996
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
18997
    public boolean isSetUcx() {
18998
      return this.ucx != null;
18999
    }
19000
 
19001
    public void setUcxIsSet(boolean value) {
19002
      if (!value) {
19003
        this.ucx = null;
19004
      }
19005
    }
19006
 
19007
    public void setFieldValue(_Fields field, Object value) {
19008
      switch (field) {
19009
      case SUCCESS:
19010
        if (value == null) {
19011
          unsetSuccess();
19012
        } else {
19013
          setSuccess((List<UserCommunication>)value);
19014
        }
19015
        break;
19016
 
19017
      case UCX:
19018
        if (value == null) {
19019
          unsetUcx();
19020
        } else {
19021
          setUcx((UserCommunicationException)value);
19022
        }
19023
        break;
19024
 
19025
      }
19026
    }
19027
 
19028
    public void setFieldValue(int fieldID, Object value) {
19029
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19030
    }
19031
 
19032
    public Object getFieldValue(_Fields field) {
19033
      switch (field) {
19034
      case SUCCESS:
19035
        return getSuccess();
19036
 
19037
      case UCX:
19038
        return getUcx();
19039
 
19040
      }
19041
      throw new IllegalStateException();
19042
    }
19043
 
19044
    public Object getFieldValue(int fieldId) {
19045
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19046
    }
19047
 
19048
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19049
    public boolean isSet(_Fields field) {
19050
      switch (field) {
19051
      case SUCCESS:
19052
        return isSetSuccess();
19053
      case UCX:
19054
        return isSetUcx();
19055
      }
19056
      throw new IllegalStateException();
19057
    }
19058
 
19059
    public boolean isSet(int fieldID) {
19060
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19061
    }
19062
 
19063
    @Override
19064
    public boolean equals(Object that) {
19065
      if (that == null)
19066
        return false;
19067
      if (that instanceof getUserCommunicationByUser_result)
19068
        return this.equals((getUserCommunicationByUser_result)that);
19069
      return false;
19070
    }
19071
 
19072
    public boolean equals(getUserCommunicationByUser_result that) {
19073
      if (that == null)
19074
        return false;
19075
 
19076
      boolean this_present_success = true && this.isSetSuccess();
19077
      boolean that_present_success = true && that.isSetSuccess();
19078
      if (this_present_success || that_present_success) {
19079
        if (!(this_present_success && that_present_success))
19080
          return false;
19081
        if (!this.success.equals(that.success))
19082
          return false;
19083
      }
19084
 
19085
      boolean this_present_ucx = true && this.isSetUcx();
19086
      boolean that_present_ucx = true && that.isSetUcx();
19087
      if (this_present_ucx || that_present_ucx) {
19088
        if (!(this_present_ucx && that_present_ucx))
19089
          return false;
19090
        if (!this.ucx.equals(that.ucx))
19091
          return false;
19092
      }
19093
 
19094
      return true;
19095
    }
19096
 
19097
    @Override
19098
    public int hashCode() {
19099
      return 0;
19100
    }
19101
 
19102
    public int compareTo(getUserCommunicationByUser_result other) {
19103
      if (!getClass().equals(other.getClass())) {
19104
        return getClass().getName().compareTo(other.getClass().getName());
19105
      }
19106
 
19107
      int lastComparison = 0;
19108
      getUserCommunicationByUser_result typedOther = (getUserCommunicationByUser_result)other;
19109
 
19110
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19111
      if (lastComparison != 0) {
19112
        return lastComparison;
19113
      }
19114
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19115
      if (lastComparison != 0) {
19116
        return lastComparison;
19117
      }
19118
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
19119
      if (lastComparison != 0) {
19120
        return lastComparison;
19121
      }
19122
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
19123
      if (lastComparison != 0) {
19124
        return lastComparison;
19125
      }
19126
      return 0;
19127
    }
19128
 
19129
    public void read(TProtocol iprot) throws TException {
19130
      TField field;
19131
      iprot.readStructBegin();
19132
      while (true)
19133
      {
19134
        field = iprot.readFieldBegin();
19135
        if (field.type == TType.STOP) { 
19136
          break;
19137
        }
19138
        _Fields fieldId = _Fields.findByThriftId(field.id);
19139
        if (fieldId == null) {
19140
          TProtocolUtil.skip(iprot, field.type);
19141
        } else {
19142
          switch (fieldId) {
19143
            case SUCCESS:
19144
              if (field.type == TType.LIST) {
19145
                {
19146
                  TList _list20 = iprot.readListBegin();
19147
                  this.success = new ArrayList<UserCommunication>(_list20.size);
19148
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
19149
                  {
19150
                    UserCommunication _elem22;
19151
                    _elem22 = new UserCommunication();
19152
                    _elem22.read(iprot);
19153
                    this.success.add(_elem22);
19154
                  }
19155
                  iprot.readListEnd();
19156
                }
19157
              } else { 
19158
                TProtocolUtil.skip(iprot, field.type);
19159
              }
19160
              break;
19161
            case UCX:
19162
              if (field.type == TType.STRUCT) {
19163
                this.ucx = new UserCommunicationException();
19164
                this.ucx.read(iprot);
19165
              } else { 
19166
                TProtocolUtil.skip(iprot, field.type);
19167
              }
19168
              break;
19169
          }
19170
          iprot.readFieldEnd();
19171
        }
19172
      }
19173
      iprot.readStructEnd();
19174
      validate();
19175
    }
19176
 
19177
    public void write(TProtocol oprot) throws TException {
19178
      oprot.writeStructBegin(STRUCT_DESC);
19179
 
19180
      if (this.isSetSuccess()) {
19181
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19182
        {
19183
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
19184
          for (UserCommunication _iter23 : this.success)
19185
          {
19186
            _iter23.write(oprot);
19187
          }
19188
          oprot.writeListEnd();
19189
        }
19190
        oprot.writeFieldEnd();
19191
      } else if (this.isSetUcx()) {
19192
        oprot.writeFieldBegin(UCX_FIELD_DESC);
19193
        this.ucx.write(oprot);
19194
        oprot.writeFieldEnd();
19195
      }
19196
      oprot.writeFieldStop();
19197
      oprot.writeStructEnd();
19198
    }
19199
 
19200
    @Override
19201
    public String toString() {
19202
      StringBuilder sb = new StringBuilder("getUserCommunicationByUser_result(");
19203
      boolean first = true;
19204
 
19205
      sb.append("success:");
19206
      if (this.success == null) {
19207
        sb.append("null");
19208
      } else {
19209
        sb.append(this.success);
19210
      }
19211
      first = false;
19212
      if (!first) sb.append(", ");
19213
      sb.append("ucx:");
19214
      if (this.ucx == null) {
19215
        sb.append("null");
19216
      } else {
19217
        sb.append(this.ucx);
19218
      }
19219
      first = false;
19220
      sb.append(")");
19221
      return sb.toString();
19222
    }
19223
 
19224
    public void validate() throws TException {
19225
      // check for required fields
19226
    }
19227
 
19228
  }
19229
 
19230
  public static class getAllUserCommunications_args implements TBase<getAllUserCommunications_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUserCommunications_args>   {
19231
    private static final TStruct STRUCT_DESC = new TStruct("getAllUserCommunications_args");
19232
 
19233
 
19234
 
19235
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19236
    public enum _Fields implements TFieldIdEnum {
19237
;
19238
 
19239
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19240
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19241
 
19242
      static {
19243
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19244
          byId.put((int)field._thriftId, field);
19245
          byName.put(field.getFieldName(), field);
19246
        }
19247
      }
19248
 
19249
      /**
19250
       * Find the _Fields constant that matches fieldId, or null if its not found.
19251
       */
19252
      public static _Fields findByThriftId(int fieldId) {
19253
        return byId.get(fieldId);
19254
      }
19255
 
19256
      /**
19257
       * Find the _Fields constant that matches fieldId, throwing an exception
19258
       * if it is not found.
19259
       */
19260
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19261
        _Fields fields = findByThriftId(fieldId);
19262
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19263
        return fields;
19264
      }
19265
 
19266
      /**
19267
       * Find the _Fields constant that matches name, or null if its not found.
19268
       */
19269
      public static _Fields findByName(String name) {
19270
        return byName.get(name);
19271
      }
19272
 
19273
      private final short _thriftId;
19274
      private final String _fieldName;
19275
 
19276
      _Fields(short thriftId, String fieldName) {
19277
        _thriftId = thriftId;
19278
        _fieldName = fieldName;
19279
      }
19280
 
19281
      public short getThriftFieldId() {
19282
        return _thriftId;
19283
      }
19284
 
19285
      public String getFieldName() {
19286
        return _fieldName;
19287
      }
19288
    }
19289
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19290
    }});
19291
 
19292
    static {
19293
      FieldMetaData.addStructMetaDataMap(getAllUserCommunications_args.class, metaDataMap);
19294
    }
19295
 
19296
    public getAllUserCommunications_args() {
19297
    }
19298
 
19299
    /**
19300
     * Performs a deep copy on <i>other</i>.
19301
     */
19302
    public getAllUserCommunications_args(getAllUserCommunications_args other) {
19303
    }
19304
 
19305
    public getAllUserCommunications_args deepCopy() {
19306
      return new getAllUserCommunications_args(this);
19307
    }
19308
 
19309
    @Deprecated
19310
    public getAllUserCommunications_args clone() {
19311
      return new getAllUserCommunications_args(this);
19312
    }
19313
 
19314
    public void setFieldValue(_Fields field, Object value) {
19315
      switch (field) {
19316
      }
19317
    }
19318
 
19319
    public void setFieldValue(int fieldID, Object value) {
19320
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19321
    }
19322
 
19323
    public Object getFieldValue(_Fields field) {
19324
      switch (field) {
19325
      }
19326
      throw new IllegalStateException();
19327
    }
19328
 
19329
    public Object getFieldValue(int fieldId) {
19330
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19331
    }
19332
 
19333
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19334
    public boolean isSet(_Fields field) {
19335
      switch (field) {
19336
      }
19337
      throw new IllegalStateException();
19338
    }
19339
 
19340
    public boolean isSet(int fieldID) {
19341
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19342
    }
19343
 
19344
    @Override
19345
    public boolean equals(Object that) {
19346
      if (that == null)
19347
        return false;
19348
      if (that instanceof getAllUserCommunications_args)
19349
        return this.equals((getAllUserCommunications_args)that);
19350
      return false;
19351
    }
19352
 
19353
    public boolean equals(getAllUserCommunications_args that) {
19354
      if (that == null)
19355
        return false;
19356
 
19357
      return true;
19358
    }
19359
 
19360
    @Override
19361
    public int hashCode() {
19362
      return 0;
19363
    }
19364
 
19365
    public int compareTo(getAllUserCommunications_args other) {
19366
      if (!getClass().equals(other.getClass())) {
19367
        return getClass().getName().compareTo(other.getClass().getName());
19368
      }
19369
 
19370
      int lastComparison = 0;
19371
      getAllUserCommunications_args typedOther = (getAllUserCommunications_args)other;
19372
 
19373
      return 0;
19374
    }
19375
 
19376
    public void read(TProtocol iprot) throws TException {
19377
      TField field;
19378
      iprot.readStructBegin();
19379
      while (true)
19380
      {
19381
        field = iprot.readFieldBegin();
19382
        if (field.type == TType.STOP) { 
19383
          break;
19384
        }
19385
        _Fields fieldId = _Fields.findByThriftId(field.id);
19386
        if (fieldId == null) {
19387
          TProtocolUtil.skip(iprot, field.type);
19388
        } else {
19389
          switch (fieldId) {
19390
          }
19391
          iprot.readFieldEnd();
19392
        }
19393
      }
19394
      iprot.readStructEnd();
19395
      validate();
19396
    }
19397
 
19398
    public void write(TProtocol oprot) throws TException {
19399
      validate();
19400
 
19401
      oprot.writeStructBegin(STRUCT_DESC);
19402
      oprot.writeFieldStop();
19403
      oprot.writeStructEnd();
19404
    }
19405
 
19406
    @Override
19407
    public String toString() {
19408
      StringBuilder sb = new StringBuilder("getAllUserCommunications_args(");
19409
      boolean first = true;
19410
 
19411
      sb.append(")");
19412
      return sb.toString();
19413
    }
19414
 
19415
    public void validate() throws TException {
19416
      // check for required fields
19417
    }
19418
 
19419
  }
19420
 
19421
  public static class getAllUserCommunications_result implements TBase<getAllUserCommunications_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllUserCommunications_result>   {
19422
    private static final TStruct STRUCT_DESC = new TStruct("getAllUserCommunications_result");
19423
 
19424
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19425
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
19426
 
19427
    private List<UserCommunication> success;
19428
    private UserCommunicationException ucx;
19429
 
19430
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19431
    public enum _Fields implements TFieldIdEnum {
19432
      SUCCESS((short)0, "success"),
19433
      UCX((short)1, "ucx");
19434
 
19435
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19436
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19437
 
19438
      static {
19439
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19440
          byId.put((int)field._thriftId, field);
19441
          byName.put(field.getFieldName(), field);
19442
        }
19443
      }
19444
 
19445
      /**
19446
       * Find the _Fields constant that matches fieldId, or null if its not found.
19447
       */
19448
      public static _Fields findByThriftId(int fieldId) {
19449
        return byId.get(fieldId);
19450
      }
19451
 
19452
      /**
19453
       * Find the _Fields constant that matches fieldId, throwing an exception
19454
       * if it is not found.
19455
       */
19456
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19457
        _Fields fields = findByThriftId(fieldId);
19458
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19459
        return fields;
19460
      }
19461
 
19462
      /**
19463
       * Find the _Fields constant that matches name, or null if its not found.
19464
       */
19465
      public static _Fields findByName(String name) {
19466
        return byName.get(name);
19467
      }
19468
 
19469
      private final short _thriftId;
19470
      private final String _fieldName;
19471
 
19472
      _Fields(short thriftId, String fieldName) {
19473
        _thriftId = thriftId;
19474
        _fieldName = fieldName;
19475
      }
19476
 
19477
      public short getThriftFieldId() {
19478
        return _thriftId;
19479
      }
19480
 
19481
      public String getFieldName() {
19482
        return _fieldName;
19483
      }
19484
    }
19485
 
19486
    // isset id assignments
19487
 
19488
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19489
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19490
          new ListMetaData(TType.LIST, 
19491
              new StructMetaData(TType.STRUCT, UserCommunication.class))));
19492
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
19493
          new FieldValueMetaData(TType.STRUCT)));
19494
    }});
19495
 
19496
    static {
19497
      FieldMetaData.addStructMetaDataMap(getAllUserCommunications_result.class, metaDataMap);
19498
    }
19499
 
19500
    public getAllUserCommunications_result() {
19501
    }
19502
 
19503
    public getAllUserCommunications_result(
19504
      List<UserCommunication> success,
19505
      UserCommunicationException ucx)
19506
    {
19507
      this();
19508
      this.success = success;
19509
      this.ucx = ucx;
19510
    }
19511
 
19512
    /**
19513
     * Performs a deep copy on <i>other</i>.
19514
     */
19515
    public getAllUserCommunications_result(getAllUserCommunications_result other) {
19516
      if (other.isSetSuccess()) {
19517
        List<UserCommunication> __this__success = new ArrayList<UserCommunication>();
19518
        for (UserCommunication other_element : other.success) {
19519
          __this__success.add(new UserCommunication(other_element));
19520
        }
19521
        this.success = __this__success;
19522
      }
19523
      if (other.isSetUcx()) {
19524
        this.ucx = new UserCommunicationException(other.ucx);
19525
      }
19526
    }
19527
 
19528
    public getAllUserCommunications_result deepCopy() {
19529
      return new getAllUserCommunications_result(this);
19530
    }
19531
 
19532
    @Deprecated
19533
    public getAllUserCommunications_result clone() {
19534
      return new getAllUserCommunications_result(this);
19535
    }
19536
 
19537
    public int getSuccessSize() {
19538
      return (this.success == null) ? 0 : this.success.size();
19539
    }
19540
 
19541
    public java.util.Iterator<UserCommunication> getSuccessIterator() {
19542
      return (this.success == null) ? null : this.success.iterator();
19543
    }
19544
 
19545
    public void addToSuccess(UserCommunication elem) {
19546
      if (this.success == null) {
19547
        this.success = new ArrayList<UserCommunication>();
19548
      }
19549
      this.success.add(elem);
19550
    }
19551
 
19552
    public List<UserCommunication> getSuccess() {
19553
      return this.success;
19554
    }
19555
 
19556
    public getAllUserCommunications_result setSuccess(List<UserCommunication> success) {
19557
      this.success = success;
19558
      return this;
19559
    }
19560
 
19561
    public void unsetSuccess() {
19562
      this.success = null;
19563
    }
19564
 
19565
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19566
    public boolean isSetSuccess() {
19567
      return this.success != null;
19568
    }
19569
 
19570
    public void setSuccessIsSet(boolean value) {
19571
      if (!value) {
19572
        this.success = null;
19573
      }
19574
    }
19575
 
19576
    public UserCommunicationException getUcx() {
19577
      return this.ucx;
19578
    }
19579
 
19580
    public getAllUserCommunications_result setUcx(UserCommunicationException ucx) {
19581
      this.ucx = ucx;
19582
      return this;
19583
    }
19584
 
19585
    public void unsetUcx() {
19586
      this.ucx = null;
19587
    }
19588
 
19589
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
19590
    public boolean isSetUcx() {
19591
      return this.ucx != null;
19592
    }
19593
 
19594
    public void setUcxIsSet(boolean value) {
19595
      if (!value) {
19596
        this.ucx = null;
19597
      }
19598
    }
19599
 
19600
    public void setFieldValue(_Fields field, Object value) {
19601
      switch (field) {
19602
      case SUCCESS:
19603
        if (value == null) {
19604
          unsetSuccess();
19605
        } else {
19606
          setSuccess((List<UserCommunication>)value);
19607
        }
19608
        break;
19609
 
19610
      case UCX:
19611
        if (value == null) {
19612
          unsetUcx();
19613
        } else {
19614
          setUcx((UserCommunicationException)value);
19615
        }
19616
        break;
19617
 
19618
      }
19619
    }
19620
 
19621
    public void setFieldValue(int fieldID, Object value) {
19622
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19623
    }
19624
 
19625
    public Object getFieldValue(_Fields field) {
19626
      switch (field) {
19627
      case SUCCESS:
19628
        return getSuccess();
19629
 
19630
      case UCX:
19631
        return getUcx();
19632
 
19633
      }
19634
      throw new IllegalStateException();
19635
    }
19636
 
19637
    public Object getFieldValue(int fieldId) {
19638
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19639
    }
19640
 
19641
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19642
    public boolean isSet(_Fields field) {
19643
      switch (field) {
19644
      case SUCCESS:
19645
        return isSetSuccess();
19646
      case UCX:
19647
        return isSetUcx();
19648
      }
19649
      throw new IllegalStateException();
19650
    }
19651
 
19652
    public boolean isSet(int fieldID) {
19653
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19654
    }
19655
 
19656
    @Override
19657
    public boolean equals(Object that) {
19658
      if (that == null)
19659
        return false;
19660
      if (that instanceof getAllUserCommunications_result)
19661
        return this.equals((getAllUserCommunications_result)that);
19662
      return false;
19663
    }
19664
 
19665
    public boolean equals(getAllUserCommunications_result that) {
19666
      if (that == null)
19667
        return false;
19668
 
19669
      boolean this_present_success = true && this.isSetSuccess();
19670
      boolean that_present_success = true && that.isSetSuccess();
19671
      if (this_present_success || that_present_success) {
19672
        if (!(this_present_success && that_present_success))
19673
          return false;
19674
        if (!this.success.equals(that.success))
19675
          return false;
19676
      }
19677
 
19678
      boolean this_present_ucx = true && this.isSetUcx();
19679
      boolean that_present_ucx = true && that.isSetUcx();
19680
      if (this_present_ucx || that_present_ucx) {
19681
        if (!(this_present_ucx && that_present_ucx))
19682
          return false;
19683
        if (!this.ucx.equals(that.ucx))
19684
          return false;
19685
      }
19686
 
19687
      return true;
19688
    }
19689
 
19690
    @Override
19691
    public int hashCode() {
19692
      return 0;
19693
    }
19694
 
19695
    public int compareTo(getAllUserCommunications_result other) {
19696
      if (!getClass().equals(other.getClass())) {
19697
        return getClass().getName().compareTo(other.getClass().getName());
19698
      }
19699
 
19700
      int lastComparison = 0;
19701
      getAllUserCommunications_result typedOther = (getAllUserCommunications_result)other;
19702
 
19703
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19704
      if (lastComparison != 0) {
19705
        return lastComparison;
19706
      }
19707
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19708
      if (lastComparison != 0) {
19709
        return lastComparison;
19710
      }
19711
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
19712
      if (lastComparison != 0) {
19713
        return lastComparison;
19714
      }
19715
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
19716
      if (lastComparison != 0) {
19717
        return lastComparison;
19718
      }
19719
      return 0;
19720
    }
19721
 
19722
    public void read(TProtocol iprot) throws TException {
19723
      TField field;
19724
      iprot.readStructBegin();
19725
      while (true)
19726
      {
19727
        field = iprot.readFieldBegin();
19728
        if (field.type == TType.STOP) { 
19729
          break;
19730
        }
19731
        _Fields fieldId = _Fields.findByThriftId(field.id);
19732
        if (fieldId == null) {
19733
          TProtocolUtil.skip(iprot, field.type);
19734
        } else {
19735
          switch (fieldId) {
19736
            case SUCCESS:
19737
              if (field.type == TType.LIST) {
19738
                {
19739
                  TList _list24 = iprot.readListBegin();
19740
                  this.success = new ArrayList<UserCommunication>(_list24.size);
19741
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
19742
                  {
19743
                    UserCommunication _elem26;
19744
                    _elem26 = new UserCommunication();
19745
                    _elem26.read(iprot);
19746
                    this.success.add(_elem26);
19747
                  }
19748
                  iprot.readListEnd();
19749
                }
19750
              } else { 
19751
                TProtocolUtil.skip(iprot, field.type);
19752
              }
19753
              break;
19754
            case UCX:
19755
              if (field.type == TType.STRUCT) {
19756
                this.ucx = new UserCommunicationException();
19757
                this.ucx.read(iprot);
19758
              } else { 
19759
                TProtocolUtil.skip(iprot, field.type);
19760
              }
19761
              break;
19762
          }
19763
          iprot.readFieldEnd();
19764
        }
19765
      }
19766
      iprot.readStructEnd();
19767
      validate();
19768
    }
19769
 
19770
    public void write(TProtocol oprot) throws TException {
19771
      oprot.writeStructBegin(STRUCT_DESC);
19772
 
19773
      if (this.isSetSuccess()) {
19774
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19775
        {
19776
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
19777
          for (UserCommunication _iter27 : this.success)
19778
          {
19779
            _iter27.write(oprot);
19780
          }
19781
          oprot.writeListEnd();
19782
        }
19783
        oprot.writeFieldEnd();
19784
      } else if (this.isSetUcx()) {
19785
        oprot.writeFieldBegin(UCX_FIELD_DESC);
19786
        this.ucx.write(oprot);
19787
        oprot.writeFieldEnd();
19788
      }
19789
      oprot.writeFieldStop();
19790
      oprot.writeStructEnd();
19791
    }
19792
 
19793
    @Override
19794
    public String toString() {
19795
      StringBuilder sb = new StringBuilder("getAllUserCommunications_result(");
19796
      boolean first = true;
19797
 
19798
      sb.append("success:");
19799
      if (this.success == null) {
19800
        sb.append("null");
19801
      } else {
19802
        sb.append(this.success);
19803
      }
19804
      first = false;
19805
      if (!first) sb.append(", ");
19806
      sb.append("ucx:");
19807
      if (this.ucx == null) {
19808
        sb.append("null");
19809
      } else {
19810
        sb.append(this.ucx);
19811
      }
19812
      first = false;
19813
      sb.append(")");
19814
      return sb.toString();
19815
    }
19816
 
19817
    public void validate() throws TException {
19818
      // check for required fields
19819
    }
19820
 
19821
  }
19822
 
553 chandransh 19823
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
19824
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 19825
 
553 chandransh 19826
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 19827
 
553 chandransh 19828
    private long userId;
48 ashish 19829
 
19830
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19831
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19832
      USER_ID((short)1, "userId");
48 ashish 19833
 
19834
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19835
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19836
 
19837
      static {
19838
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19839
          byId.put((int)field._thriftId, field);
19840
          byName.put(field.getFieldName(), field);
19841
        }
19842
      }
19843
 
19844
      /**
19845
       * Find the _Fields constant that matches fieldId, or null if its not found.
19846
       */
19847
      public static _Fields findByThriftId(int fieldId) {
19848
        return byId.get(fieldId);
19849
      }
19850
 
19851
      /**
19852
       * Find the _Fields constant that matches fieldId, throwing an exception
19853
       * if it is not found.
19854
       */
19855
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19856
        _Fields fields = findByThriftId(fieldId);
19857
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19858
        return fields;
19859
      }
19860
 
19861
      /**
19862
       * Find the _Fields constant that matches name, or null if its not found.
19863
       */
19864
      public static _Fields findByName(String name) {
19865
        return byName.get(name);
19866
      }
19867
 
19868
      private final short _thriftId;
19869
      private final String _fieldName;
19870
 
19871
      _Fields(short thriftId, String fieldName) {
19872
        _thriftId = thriftId;
19873
        _fieldName = fieldName;
19874
      }
19875
 
19876
      public short getThriftFieldId() {
19877
        return _thriftId;
19878
      }
19879
 
19880
      public String getFieldName() {
19881
        return _fieldName;
19882
      }
19883
    }
19884
 
19885
    // isset id assignments
19886
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 19887
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 19888
 
19889
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19890
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 19891
          new FieldValueMetaData(TType.I64)));
19892
    }});
19893
 
19894
    static {
553 chandransh 19895
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 19896
    }
19897
 
553 chandransh 19898
    public createCart_args() {
48 ashish 19899
    }
19900
 
553 chandransh 19901
    public createCart_args(
19902
      long userId)
48 ashish 19903
    {
19904
      this();
553 chandransh 19905
      this.userId = userId;
19906
      setUserIdIsSet(true);
48 ashish 19907
    }
19908
 
19909
    /**
19910
     * Performs a deep copy on <i>other</i>.
19911
     */
553 chandransh 19912
    public createCart_args(createCart_args other) {
48 ashish 19913
      __isset_bit_vector.clear();
19914
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19915
      this.userId = other.userId;
48 ashish 19916
    }
19917
 
553 chandransh 19918
    public createCart_args deepCopy() {
19919
      return new createCart_args(this);
48 ashish 19920
    }
19921
 
19922
    @Deprecated
553 chandransh 19923
    public createCart_args clone() {
19924
      return new createCart_args(this);
48 ashish 19925
    }
19926
 
553 chandransh 19927
    public long getUserId() {
19928
      return this.userId;
48 ashish 19929
    }
19930
 
553 chandransh 19931
    public createCart_args setUserId(long userId) {
19932
      this.userId = userId;
19933
      setUserIdIsSet(true);
48 ashish 19934
      return this;
19935
    }
19936
 
553 chandransh 19937
    public void unsetUserId() {
48 ashish 19938
      __isset_bit_vector.clear(__USERID_ISSET_ID);
19939
    }
19940
 
553 chandransh 19941
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
19942
    public boolean isSetUserId() {
48 ashish 19943
      return __isset_bit_vector.get(__USERID_ISSET_ID);
19944
    }
19945
 
553 chandransh 19946
    public void setUserIdIsSet(boolean value) {
48 ashish 19947
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
19948
    }
19949
 
19950
    public void setFieldValue(_Fields field, Object value) {
19951
      switch (field) {
553 chandransh 19952
      case USER_ID:
48 ashish 19953
        if (value == null) {
553 chandransh 19954
          unsetUserId();
48 ashish 19955
        } else {
553 chandransh 19956
          setUserId((Long)value);
48 ashish 19957
        }
19958
        break;
19959
 
19960
      }
19961
    }
19962
 
19963
    public void setFieldValue(int fieldID, Object value) {
19964
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19965
    }
19966
 
19967
    public Object getFieldValue(_Fields field) {
19968
      switch (field) {
553 chandransh 19969
      case USER_ID:
19970
        return new Long(getUserId());
48 ashish 19971
 
19972
      }
19973
      throw new IllegalStateException();
19974
    }
19975
 
19976
    public Object getFieldValue(int fieldId) {
19977
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19978
    }
19979
 
19980
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19981
    public boolean isSet(_Fields field) {
19982
      switch (field) {
553 chandransh 19983
      case USER_ID:
19984
        return isSetUserId();
48 ashish 19985
      }
19986
      throw new IllegalStateException();
19987
    }
19988
 
19989
    public boolean isSet(int fieldID) {
19990
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19991
    }
19992
 
19993
    @Override
19994
    public boolean equals(Object that) {
19995
      if (that == null)
19996
        return false;
553 chandransh 19997
      if (that instanceof createCart_args)
19998
        return this.equals((createCart_args)that);
48 ashish 19999
      return false;
20000
    }
20001
 
553 chandransh 20002
    public boolean equals(createCart_args that) {
48 ashish 20003
      if (that == null)
20004
        return false;
20005
 
553 chandransh 20006
      boolean this_present_userId = true;
20007
      boolean that_present_userId = true;
20008
      if (this_present_userId || that_present_userId) {
20009
        if (!(this_present_userId && that_present_userId))
48 ashish 20010
          return false;
553 chandransh 20011
        if (this.userId != that.userId)
48 ashish 20012
          return false;
20013
      }
20014
 
20015
      return true;
20016
    }
20017
 
20018
    @Override
20019
    public int hashCode() {
20020
      return 0;
20021
    }
20022
 
553 chandransh 20023
    public int compareTo(createCart_args other) {
48 ashish 20024
      if (!getClass().equals(other.getClass())) {
20025
        return getClass().getName().compareTo(other.getClass().getName());
20026
      }
20027
 
20028
      int lastComparison = 0;
553 chandransh 20029
      createCart_args typedOther = (createCart_args)other;
48 ashish 20030
 
553 chandransh 20031
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 20032
      if (lastComparison != 0) {
20033
        return lastComparison;
20034
      }
553 chandransh 20035
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 20036
      if (lastComparison != 0) {
20037
        return lastComparison;
20038
      }
20039
      return 0;
20040
    }
20041
 
20042
    public void read(TProtocol iprot) throws TException {
20043
      TField field;
20044
      iprot.readStructBegin();
20045
      while (true)
20046
      {
20047
        field = iprot.readFieldBegin();
20048
        if (field.type == TType.STOP) { 
20049
          break;
20050
        }
20051
        _Fields fieldId = _Fields.findByThriftId(field.id);
20052
        if (fieldId == null) {
20053
          TProtocolUtil.skip(iprot, field.type);
20054
        } else {
20055
          switch (fieldId) {
553 chandransh 20056
            case USER_ID:
48 ashish 20057
              if (field.type == TType.I64) {
553 chandransh 20058
                this.userId = iprot.readI64();
20059
                setUserIdIsSet(true);
48 ashish 20060
              } else { 
20061
                TProtocolUtil.skip(iprot, field.type);
20062
              }
20063
              break;
20064
          }
20065
          iprot.readFieldEnd();
20066
        }
20067
      }
20068
      iprot.readStructEnd();
20069
      validate();
20070
    }
20071
 
20072
    public void write(TProtocol oprot) throws TException {
20073
      validate();
20074
 
20075
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 20076
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
20077
      oprot.writeI64(this.userId);
48 ashish 20078
      oprot.writeFieldEnd();
20079
      oprot.writeFieldStop();
20080
      oprot.writeStructEnd();
20081
    }
20082
 
20083
    @Override
20084
    public String toString() {
553 chandransh 20085
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 20086
      boolean first = true;
20087
 
553 chandransh 20088
      sb.append("userId:");
20089
      sb.append(this.userId);
48 ashish 20090
      first = false;
20091
      sb.append(")");
20092
      return sb.toString();
20093
    }
20094
 
20095
    public void validate() throws TException {
20096
      // check for required fields
20097
    }
20098
 
20099
  }
20100
 
553 chandransh 20101
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
20102
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 20103
 
553 chandransh 20104
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
20105
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20106
 
553 chandransh 20107
    private long success;
20108
    private ShoppingCartException scx;
48 ashish 20109
 
20110
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20111
    public enum _Fields implements TFieldIdEnum {
20112
      SUCCESS((short)0, "success"),
553 chandransh 20113
      SCX((short)1, "scx");
48 ashish 20114
 
20115
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20116
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20117
 
20118
      static {
20119
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20120
          byId.put((int)field._thriftId, field);
20121
          byName.put(field.getFieldName(), field);
20122
        }
20123
      }
20124
 
20125
      /**
20126
       * Find the _Fields constant that matches fieldId, or null if its not found.
20127
       */
20128
      public static _Fields findByThriftId(int fieldId) {
20129
        return byId.get(fieldId);
20130
      }
20131
 
20132
      /**
20133
       * Find the _Fields constant that matches fieldId, throwing an exception
20134
       * if it is not found.
20135
       */
20136
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20137
        _Fields fields = findByThriftId(fieldId);
20138
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20139
        return fields;
20140
      }
20141
 
20142
      /**
20143
       * Find the _Fields constant that matches name, or null if its not found.
20144
       */
20145
      public static _Fields findByName(String name) {
20146
        return byName.get(name);
20147
      }
20148
 
20149
      private final short _thriftId;
20150
      private final String _fieldName;
20151
 
20152
      _Fields(short thriftId, String fieldName) {
20153
        _thriftId = thriftId;
20154
        _fieldName = fieldName;
20155
      }
20156
 
20157
      public short getThriftFieldId() {
20158
        return _thriftId;
20159
      }
20160
 
20161
      public String getFieldName() {
20162
        return _fieldName;
20163
      }
20164
    }
20165
 
20166
    // isset id assignments
20167
    private static final int __SUCCESS_ISSET_ID = 0;
20168
    private BitSet __isset_bit_vector = new BitSet(1);
20169
 
20170
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20171
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 20172
          new FieldValueMetaData(TType.I64)));
20173
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 20174
          new FieldValueMetaData(TType.STRUCT)));
20175
    }});
20176
 
20177
    static {
553 chandransh 20178
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 20179
    }
20180
 
553 chandransh 20181
    public createCart_result() {
48 ashish 20182
    }
20183
 
553 chandransh 20184
    public createCart_result(
20185
      long success,
20186
      ShoppingCartException scx)
48 ashish 20187
    {
20188
      this();
20189
      this.success = success;
20190
      setSuccessIsSet(true);
553 chandransh 20191
      this.scx = scx;
48 ashish 20192
    }
20193
 
20194
    /**
20195
     * Performs a deep copy on <i>other</i>.
20196
     */
553 chandransh 20197
    public createCart_result(createCart_result other) {
48 ashish 20198
      __isset_bit_vector.clear();
20199
      __isset_bit_vector.or(other.__isset_bit_vector);
20200
      this.success = other.success;
553 chandransh 20201
      if (other.isSetScx()) {
20202
        this.scx = new ShoppingCartException(other.scx);
48 ashish 20203
      }
20204
    }
20205
 
553 chandransh 20206
    public createCart_result deepCopy() {
20207
      return new createCart_result(this);
48 ashish 20208
    }
20209
 
20210
    @Deprecated
553 chandransh 20211
    public createCart_result clone() {
20212
      return new createCart_result(this);
48 ashish 20213
    }
20214
 
553 chandransh 20215
    public long getSuccess() {
48 ashish 20216
      return this.success;
20217
    }
20218
 
553 chandransh 20219
    public createCart_result setSuccess(long success) {
48 ashish 20220
      this.success = success;
20221
      setSuccessIsSet(true);
20222
      return this;
20223
    }
20224
 
20225
    public void unsetSuccess() {
20226
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20227
    }
20228
 
20229
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20230
    public boolean isSetSuccess() {
20231
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20232
    }
20233
 
20234
    public void setSuccessIsSet(boolean value) {
20235
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20236
    }
20237
 
553 chandransh 20238
    public ShoppingCartException getScx() {
20239
      return this.scx;
48 ashish 20240
    }
20241
 
553 chandransh 20242
    public createCart_result setScx(ShoppingCartException scx) {
20243
      this.scx = scx;
48 ashish 20244
      return this;
20245
    }
20246
 
553 chandransh 20247
    public void unsetScx() {
20248
      this.scx = null;
48 ashish 20249
    }
20250
 
553 chandransh 20251
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20252
    public boolean isSetScx() {
20253
      return this.scx != null;
48 ashish 20254
    }
20255
 
553 chandransh 20256
    public void setScxIsSet(boolean value) {
48 ashish 20257
      if (!value) {
553 chandransh 20258
        this.scx = null;
48 ashish 20259
      }
20260
    }
20261
 
20262
    public void setFieldValue(_Fields field, Object value) {
20263
      switch (field) {
20264
      case SUCCESS:
20265
        if (value == null) {
20266
          unsetSuccess();
20267
        } else {
553 chandransh 20268
          setSuccess((Long)value);
48 ashish 20269
        }
20270
        break;
20271
 
553 chandransh 20272
      case SCX:
48 ashish 20273
        if (value == null) {
553 chandransh 20274
          unsetScx();
48 ashish 20275
        } else {
553 chandransh 20276
          setScx((ShoppingCartException)value);
48 ashish 20277
        }
20278
        break;
20279
 
20280
      }
20281
    }
20282
 
20283
    public void setFieldValue(int fieldID, Object value) {
20284
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20285
    }
20286
 
20287
    public Object getFieldValue(_Fields field) {
20288
      switch (field) {
20289
      case SUCCESS:
553 chandransh 20290
        return new Long(getSuccess());
48 ashish 20291
 
553 chandransh 20292
      case SCX:
20293
        return getScx();
48 ashish 20294
 
20295
      }
20296
      throw new IllegalStateException();
20297
    }
20298
 
20299
    public Object getFieldValue(int fieldId) {
20300
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20301
    }
20302
 
20303
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20304
    public boolean isSet(_Fields field) {
20305
      switch (field) {
20306
      case SUCCESS:
20307
        return isSetSuccess();
553 chandransh 20308
      case SCX:
20309
        return isSetScx();
48 ashish 20310
      }
20311
      throw new IllegalStateException();
20312
    }
20313
 
20314
    public boolean isSet(int fieldID) {
20315
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20316
    }
20317
 
20318
    @Override
20319
    public boolean equals(Object that) {
20320
      if (that == null)
20321
        return false;
553 chandransh 20322
      if (that instanceof createCart_result)
20323
        return this.equals((createCart_result)that);
48 ashish 20324
      return false;
20325
    }
20326
 
553 chandransh 20327
    public boolean equals(createCart_result that) {
48 ashish 20328
      if (that == null)
20329
        return false;
20330
 
20331
      boolean this_present_success = true;
20332
      boolean that_present_success = true;
20333
      if (this_present_success || that_present_success) {
20334
        if (!(this_present_success && that_present_success))
20335
          return false;
20336
        if (this.success != that.success)
20337
          return false;
20338
      }
20339
 
553 chandransh 20340
      boolean this_present_scx = true && this.isSetScx();
20341
      boolean that_present_scx = true && that.isSetScx();
20342
      if (this_present_scx || that_present_scx) {
20343
        if (!(this_present_scx && that_present_scx))
48 ashish 20344
          return false;
553 chandransh 20345
        if (!this.scx.equals(that.scx))
48 ashish 20346
          return false;
20347
      }
20348
 
20349
      return true;
20350
    }
20351
 
20352
    @Override
20353
    public int hashCode() {
20354
      return 0;
20355
    }
20356
 
553 chandransh 20357
    public int compareTo(createCart_result other) {
48 ashish 20358
      if (!getClass().equals(other.getClass())) {
20359
        return getClass().getName().compareTo(other.getClass().getName());
20360
      }
20361
 
20362
      int lastComparison = 0;
553 chandransh 20363
      createCart_result typedOther = (createCart_result)other;
48 ashish 20364
 
20365
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20366
      if (lastComparison != 0) {
20367
        return lastComparison;
20368
      }
20369
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20370
      if (lastComparison != 0) {
20371
        return lastComparison;
20372
      }
553 chandransh 20373
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 20374
      if (lastComparison != 0) {
20375
        return lastComparison;
20376
      }
553 chandransh 20377
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 20378
      if (lastComparison != 0) {
20379
        return lastComparison;
20380
      }
20381
      return 0;
20382
    }
20383
 
20384
    public void read(TProtocol iprot) throws TException {
20385
      TField field;
20386
      iprot.readStructBegin();
20387
      while (true)
20388
      {
20389
        field = iprot.readFieldBegin();
20390
        if (field.type == TType.STOP) { 
20391
          break;
20392
        }
20393
        _Fields fieldId = _Fields.findByThriftId(field.id);
20394
        if (fieldId == null) {
20395
          TProtocolUtil.skip(iprot, field.type);
20396
        } else {
20397
          switch (fieldId) {
20398
            case SUCCESS:
553 chandransh 20399
              if (field.type == TType.I64) {
20400
                this.success = iprot.readI64();
48 ashish 20401
                setSuccessIsSet(true);
20402
              } else { 
20403
                TProtocolUtil.skip(iprot, field.type);
20404
              }
20405
              break;
553 chandransh 20406
            case SCX:
48 ashish 20407
              if (field.type == TType.STRUCT) {
553 chandransh 20408
                this.scx = new ShoppingCartException();
20409
                this.scx.read(iprot);
48 ashish 20410
              } else { 
20411
                TProtocolUtil.skip(iprot, field.type);
20412
              }
20413
              break;
20414
          }
20415
          iprot.readFieldEnd();
20416
        }
20417
      }
20418
      iprot.readStructEnd();
20419
      validate();
20420
    }
20421
 
20422
    public void write(TProtocol oprot) throws TException {
20423
      oprot.writeStructBegin(STRUCT_DESC);
20424
 
20425
      if (this.isSetSuccess()) {
20426
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 20427
        oprot.writeI64(this.success);
48 ashish 20428
        oprot.writeFieldEnd();
553 chandransh 20429
      } else if (this.isSetScx()) {
20430
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20431
        this.scx.write(oprot);
48 ashish 20432
        oprot.writeFieldEnd();
20433
      }
20434
      oprot.writeFieldStop();
20435
      oprot.writeStructEnd();
20436
    }
20437
 
20438
    @Override
20439
    public String toString() {
553 chandransh 20440
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 20441
      boolean first = true;
20442
 
20443
      sb.append("success:");
20444
      sb.append(this.success);
20445
      first = false;
20446
      if (!first) sb.append(", ");
553 chandransh 20447
      sb.append("scx:");
20448
      if (this.scx == null) {
48 ashish 20449
        sb.append("null");
20450
      } else {
553 chandransh 20451
        sb.append(this.scx);
48 ashish 20452
      }
20453
      first = false;
20454
      sb.append(")");
20455
      return sb.toString();
20456
    }
20457
 
20458
    public void validate() throws TException {
20459
      // check for required fields
20460
    }
20461
 
20462
  }
20463
 
553 chandransh 20464
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
20465
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 20466
 
553 chandransh 20467
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 20468
 
553 chandransh 20469
    private long userId;
506 rajveer 20470
 
20471
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20472
    public enum _Fields implements TFieldIdEnum {
553 chandransh 20473
      USER_ID((short)1, "userId");
506 rajveer 20474
 
20475
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20476
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20477
 
20478
      static {
20479
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20480
          byId.put((int)field._thriftId, field);
20481
          byName.put(field.getFieldName(), field);
20482
        }
20483
      }
20484
 
20485
      /**
20486
       * Find the _Fields constant that matches fieldId, or null if its not found.
20487
       */
20488
      public static _Fields findByThriftId(int fieldId) {
20489
        return byId.get(fieldId);
20490
      }
20491
 
20492
      /**
20493
       * Find the _Fields constant that matches fieldId, throwing an exception
20494
       * if it is not found.
20495
       */
20496
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20497
        _Fields fields = findByThriftId(fieldId);
20498
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20499
        return fields;
20500
      }
20501
 
20502
      /**
20503
       * Find the _Fields constant that matches name, or null if its not found.
20504
       */
20505
      public static _Fields findByName(String name) {
20506
        return byName.get(name);
20507
      }
20508
 
20509
      private final short _thriftId;
20510
      private final String _fieldName;
20511
 
20512
      _Fields(short thriftId, String fieldName) {
20513
        _thriftId = thriftId;
20514
        _fieldName = fieldName;
20515
      }
20516
 
20517
      public short getThriftFieldId() {
20518
        return _thriftId;
20519
      }
20520
 
20521
      public String getFieldName() {
20522
        return _fieldName;
20523
      }
20524
    }
20525
 
20526
    // isset id assignments
20527
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 20528
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 20529
 
20530
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20531
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 20532
          new FieldValueMetaData(TType.I64)));
20533
    }});
20534
 
20535
    static {
553 chandransh 20536
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 20537
    }
20538
 
553 chandransh 20539
    public getCurrentCart_args() {
506 rajveer 20540
    }
20541
 
553 chandransh 20542
    public getCurrentCart_args(
20543
      long userId)
506 rajveer 20544
    {
20545
      this();
553 chandransh 20546
      this.userId = userId;
20547
      setUserIdIsSet(true);
506 rajveer 20548
    }
20549
 
20550
    /**
20551
     * Performs a deep copy on <i>other</i>.
20552
     */
553 chandransh 20553
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 20554
      __isset_bit_vector.clear();
20555
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20556
      this.userId = other.userId;
506 rajveer 20557
    }
20558
 
553 chandransh 20559
    public getCurrentCart_args deepCopy() {
20560
      return new getCurrentCart_args(this);
506 rajveer 20561
    }
20562
 
20563
    @Deprecated
553 chandransh 20564
    public getCurrentCart_args clone() {
20565
      return new getCurrentCart_args(this);
506 rajveer 20566
    }
20567
 
553 chandransh 20568
    public long getUserId() {
20569
      return this.userId;
506 rajveer 20570
    }
20571
 
553 chandransh 20572
    public getCurrentCart_args setUserId(long userId) {
20573
      this.userId = userId;
20574
      setUserIdIsSet(true);
506 rajveer 20575
      return this;
20576
    }
20577
 
553 chandransh 20578
    public void unsetUserId() {
506 rajveer 20579
      __isset_bit_vector.clear(__USERID_ISSET_ID);
20580
    }
20581
 
553 chandransh 20582
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
20583
    public boolean isSetUserId() {
506 rajveer 20584
      return __isset_bit_vector.get(__USERID_ISSET_ID);
20585
    }
20586
 
553 chandransh 20587
    public void setUserIdIsSet(boolean value) {
506 rajveer 20588
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
20589
    }
20590
 
553 chandransh 20591
    public void setFieldValue(_Fields field, Object value) {
20592
      switch (field) {
20593
      case USER_ID:
20594
        if (value == null) {
20595
          unsetUserId();
20596
        } else {
20597
          setUserId((Long)value);
20598
        }
20599
        break;
20600
 
20601
      }
506 rajveer 20602
    }
20603
 
553 chandransh 20604
    public void setFieldValue(int fieldID, Object value) {
20605
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20606
    }
20607
 
20608
    public Object getFieldValue(_Fields field) {
20609
      switch (field) {
20610
      case USER_ID:
20611
        return new Long(getUserId());
20612
 
20613
      }
20614
      throw new IllegalStateException();
20615
    }
20616
 
20617
    public Object getFieldValue(int fieldId) {
20618
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20619
    }
20620
 
20621
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20622
    public boolean isSet(_Fields field) {
20623
      switch (field) {
20624
      case USER_ID:
20625
        return isSetUserId();
20626
      }
20627
      throw new IllegalStateException();
20628
    }
20629
 
20630
    public boolean isSet(int fieldID) {
20631
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20632
    }
20633
 
20634
    @Override
20635
    public boolean equals(Object that) {
20636
      if (that == null)
20637
        return false;
20638
      if (that instanceof getCurrentCart_args)
20639
        return this.equals((getCurrentCart_args)that);
20640
      return false;
20641
    }
20642
 
20643
    public boolean equals(getCurrentCart_args that) {
20644
      if (that == null)
20645
        return false;
20646
 
20647
      boolean this_present_userId = true;
20648
      boolean that_present_userId = true;
20649
      if (this_present_userId || that_present_userId) {
20650
        if (!(this_present_userId && that_present_userId))
20651
          return false;
20652
        if (this.userId != that.userId)
20653
          return false;
20654
      }
20655
 
20656
      return true;
20657
    }
20658
 
20659
    @Override
20660
    public int hashCode() {
20661
      return 0;
20662
    }
20663
 
20664
    public int compareTo(getCurrentCart_args other) {
20665
      if (!getClass().equals(other.getClass())) {
20666
        return getClass().getName().compareTo(other.getClass().getName());
20667
      }
20668
 
20669
      int lastComparison = 0;
20670
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
20671
 
20672
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
20673
      if (lastComparison != 0) {
20674
        return lastComparison;
20675
      }
20676
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
20677
      if (lastComparison != 0) {
20678
        return lastComparison;
20679
      }
20680
      return 0;
20681
    }
20682
 
20683
    public void read(TProtocol iprot) throws TException {
20684
      TField field;
20685
      iprot.readStructBegin();
20686
      while (true)
20687
      {
20688
        field = iprot.readFieldBegin();
20689
        if (field.type == TType.STOP) { 
20690
          break;
20691
        }
20692
        _Fields fieldId = _Fields.findByThriftId(field.id);
20693
        if (fieldId == null) {
20694
          TProtocolUtil.skip(iprot, field.type);
20695
        } else {
20696
          switch (fieldId) {
20697
            case USER_ID:
20698
              if (field.type == TType.I64) {
20699
                this.userId = iprot.readI64();
20700
                setUserIdIsSet(true);
20701
              } else { 
20702
                TProtocolUtil.skip(iprot, field.type);
20703
              }
20704
              break;
20705
          }
20706
          iprot.readFieldEnd();
20707
        }
20708
      }
20709
      iprot.readStructEnd();
20710
      validate();
20711
    }
20712
 
20713
    public void write(TProtocol oprot) throws TException {
20714
      validate();
20715
 
20716
      oprot.writeStructBegin(STRUCT_DESC);
20717
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
20718
      oprot.writeI64(this.userId);
20719
      oprot.writeFieldEnd();
20720
      oprot.writeFieldStop();
20721
      oprot.writeStructEnd();
20722
    }
20723
 
20724
    @Override
20725
    public String toString() {
20726
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
20727
      boolean first = true;
20728
 
20729
      sb.append("userId:");
20730
      sb.append(this.userId);
20731
      first = false;
20732
      sb.append(")");
20733
      return sb.toString();
20734
    }
20735
 
20736
    public void validate() throws TException {
20737
      // check for required fields
20738
    }
20739
 
20740
  }
20741
 
20742
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
20743
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
20744
 
20745
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
20746
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20747
 
20748
    private Cart success;
20749
    private ShoppingCartException scx;
20750
 
20751
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20752
    public enum _Fields implements TFieldIdEnum {
20753
      SUCCESS((short)0, "success"),
20754
      SCX((short)1, "scx");
20755
 
20756
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20757
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20758
 
20759
      static {
20760
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20761
          byId.put((int)field._thriftId, field);
20762
          byName.put(field.getFieldName(), field);
20763
        }
20764
      }
20765
 
20766
      /**
20767
       * Find the _Fields constant that matches fieldId, or null if its not found.
20768
       */
20769
      public static _Fields findByThriftId(int fieldId) {
20770
        return byId.get(fieldId);
20771
      }
20772
 
20773
      /**
20774
       * Find the _Fields constant that matches fieldId, throwing an exception
20775
       * if it is not found.
20776
       */
20777
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20778
        _Fields fields = findByThriftId(fieldId);
20779
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20780
        return fields;
20781
      }
20782
 
20783
      /**
20784
       * Find the _Fields constant that matches name, or null if its not found.
20785
       */
20786
      public static _Fields findByName(String name) {
20787
        return byName.get(name);
20788
      }
20789
 
20790
      private final short _thriftId;
20791
      private final String _fieldName;
20792
 
20793
      _Fields(short thriftId, String fieldName) {
20794
        _thriftId = thriftId;
20795
        _fieldName = fieldName;
20796
      }
20797
 
20798
      public short getThriftFieldId() {
20799
        return _thriftId;
20800
      }
20801
 
20802
      public String getFieldName() {
20803
        return _fieldName;
20804
      }
20805
    }
20806
 
20807
    // isset id assignments
20808
 
20809
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20810
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20811
          new StructMetaData(TType.STRUCT, Cart.class)));
20812
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20813
          new FieldValueMetaData(TType.STRUCT)));
20814
    }});
20815
 
20816
    static {
20817
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
20818
    }
20819
 
20820
    public getCurrentCart_result() {
20821
    }
20822
 
20823
    public getCurrentCart_result(
20824
      Cart success,
20825
      ShoppingCartException scx)
20826
    {
20827
      this();
20828
      this.success = success;
20829
      this.scx = scx;
20830
    }
20831
 
20832
    /**
20833
     * Performs a deep copy on <i>other</i>.
20834
     */
20835
    public getCurrentCart_result(getCurrentCart_result other) {
20836
      if (other.isSetSuccess()) {
20837
        this.success = new Cart(other.success);
20838
      }
20839
      if (other.isSetScx()) {
20840
        this.scx = new ShoppingCartException(other.scx);
20841
      }
20842
    }
20843
 
20844
    public getCurrentCart_result deepCopy() {
20845
      return new getCurrentCart_result(this);
20846
    }
20847
 
20848
    @Deprecated
20849
    public getCurrentCart_result clone() {
20850
      return new getCurrentCart_result(this);
20851
    }
20852
 
20853
    public Cart getSuccess() {
20854
      return this.success;
20855
    }
20856
 
20857
    public getCurrentCart_result setSuccess(Cart success) {
20858
      this.success = success;
506 rajveer 20859
      return this;
20860
    }
20861
 
553 chandransh 20862
    public void unsetSuccess() {
20863
      this.success = null;
506 rajveer 20864
    }
20865
 
553 chandransh 20866
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20867
    public boolean isSetSuccess() {
20868
      return this.success != null;
506 rajveer 20869
    }
20870
 
553 chandransh 20871
    public void setSuccessIsSet(boolean value) {
20872
      if (!value) {
20873
        this.success = null;
20874
      }
506 rajveer 20875
    }
20876
 
553 chandransh 20877
    public ShoppingCartException getScx() {
20878
      return this.scx;
20879
    }
20880
 
20881
    public getCurrentCart_result setScx(ShoppingCartException scx) {
20882
      this.scx = scx;
20883
      return this;
20884
    }
20885
 
20886
    public void unsetScx() {
20887
      this.scx = null;
20888
    }
20889
 
20890
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20891
    public boolean isSetScx() {
20892
      return this.scx != null;
20893
    }
20894
 
20895
    public void setScxIsSet(boolean value) {
20896
      if (!value) {
20897
        this.scx = null;
20898
      }
20899
    }
20900
 
506 rajveer 20901
    public void setFieldValue(_Fields field, Object value) {
20902
      switch (field) {
553 chandransh 20903
      case SUCCESS:
506 rajveer 20904
        if (value == null) {
553 chandransh 20905
          unsetSuccess();
506 rajveer 20906
        } else {
553 chandransh 20907
          setSuccess((Cart)value);
506 rajveer 20908
        }
20909
        break;
20910
 
553 chandransh 20911
      case SCX:
506 rajveer 20912
        if (value == null) {
553 chandransh 20913
          unsetScx();
506 rajveer 20914
        } else {
553 chandransh 20915
          setScx((ShoppingCartException)value);
506 rajveer 20916
        }
20917
        break;
20918
 
20919
      }
20920
    }
20921
 
20922
    public void setFieldValue(int fieldID, Object value) {
20923
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20924
    }
20925
 
20926
    public Object getFieldValue(_Fields field) {
20927
      switch (field) {
553 chandransh 20928
      case SUCCESS:
20929
        return getSuccess();
506 rajveer 20930
 
553 chandransh 20931
      case SCX:
20932
        return getScx();
506 rajveer 20933
 
20934
      }
20935
      throw new IllegalStateException();
20936
    }
20937
 
20938
    public Object getFieldValue(int fieldId) {
20939
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20940
    }
20941
 
20942
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20943
    public boolean isSet(_Fields field) {
20944
      switch (field) {
553 chandransh 20945
      case SUCCESS:
20946
        return isSetSuccess();
20947
      case SCX:
20948
        return isSetScx();
506 rajveer 20949
      }
20950
      throw new IllegalStateException();
20951
    }
20952
 
20953
    public boolean isSet(int fieldID) {
20954
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20955
    }
20956
 
20957
    @Override
20958
    public boolean equals(Object that) {
20959
      if (that == null)
20960
        return false;
553 chandransh 20961
      if (that instanceof getCurrentCart_result)
20962
        return this.equals((getCurrentCart_result)that);
506 rajveer 20963
      return false;
20964
    }
20965
 
553 chandransh 20966
    public boolean equals(getCurrentCart_result that) {
506 rajveer 20967
      if (that == null)
20968
        return false;
20969
 
553 chandransh 20970
      boolean this_present_success = true && this.isSetSuccess();
20971
      boolean that_present_success = true && that.isSetSuccess();
20972
      if (this_present_success || that_present_success) {
20973
        if (!(this_present_success && that_present_success))
506 rajveer 20974
          return false;
553 chandransh 20975
        if (!this.success.equals(that.success))
506 rajveer 20976
          return false;
20977
      }
20978
 
553 chandransh 20979
      boolean this_present_scx = true && this.isSetScx();
20980
      boolean that_present_scx = true && that.isSetScx();
20981
      if (this_present_scx || that_present_scx) {
20982
        if (!(this_present_scx && that_present_scx))
506 rajveer 20983
          return false;
553 chandransh 20984
        if (!this.scx.equals(that.scx))
506 rajveer 20985
          return false;
20986
      }
20987
 
20988
      return true;
20989
    }
20990
 
20991
    @Override
20992
    public int hashCode() {
20993
      return 0;
20994
    }
20995
 
553 chandransh 20996
    public int compareTo(getCurrentCart_result other) {
506 rajveer 20997
      if (!getClass().equals(other.getClass())) {
20998
        return getClass().getName().compareTo(other.getClass().getName());
20999
      }
21000
 
21001
      int lastComparison = 0;
553 chandransh 21002
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 21003
 
553 chandransh 21004
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 21005
      if (lastComparison != 0) {
21006
        return lastComparison;
21007
      }
553 chandransh 21008
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 21009
      if (lastComparison != 0) {
21010
        return lastComparison;
21011
      }
553 chandransh 21012
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 21013
      if (lastComparison != 0) {
21014
        return lastComparison;
21015
      }
553 chandransh 21016
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 21017
      if (lastComparison != 0) {
21018
        return lastComparison;
21019
      }
21020
      return 0;
21021
    }
21022
 
21023
    public void read(TProtocol iprot) throws TException {
21024
      TField field;
21025
      iprot.readStructBegin();
21026
      while (true)
21027
      {
21028
        field = iprot.readFieldBegin();
21029
        if (field.type == TType.STOP) { 
21030
          break;
21031
        }
21032
        _Fields fieldId = _Fields.findByThriftId(field.id);
21033
        if (fieldId == null) {
21034
          TProtocolUtil.skip(iprot, field.type);
21035
        } else {
21036
          switch (fieldId) {
553 chandransh 21037
            case SUCCESS:
21038
              if (field.type == TType.STRUCT) {
21039
                this.success = new Cart();
21040
                this.success.read(iprot);
506 rajveer 21041
              } else { 
21042
                TProtocolUtil.skip(iprot, field.type);
21043
              }
21044
              break;
553 chandransh 21045
            case SCX:
21046
              if (field.type == TType.STRUCT) {
21047
                this.scx = new ShoppingCartException();
21048
                this.scx.read(iprot);
21049
              } else { 
21050
                TProtocolUtil.skip(iprot, field.type);
21051
              }
21052
              break;
21053
          }
21054
          iprot.readFieldEnd();
21055
        }
21056
      }
21057
      iprot.readStructEnd();
21058
      validate();
21059
    }
21060
 
21061
    public void write(TProtocol oprot) throws TException {
21062
      oprot.writeStructBegin(STRUCT_DESC);
21063
 
21064
      if (this.isSetSuccess()) {
21065
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21066
        this.success.write(oprot);
21067
        oprot.writeFieldEnd();
21068
      } else if (this.isSetScx()) {
21069
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21070
        this.scx.write(oprot);
21071
        oprot.writeFieldEnd();
21072
      }
21073
      oprot.writeFieldStop();
21074
      oprot.writeStructEnd();
21075
    }
21076
 
21077
    @Override
21078
    public String toString() {
21079
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
21080
      boolean first = true;
21081
 
21082
      sb.append("success:");
21083
      if (this.success == null) {
21084
        sb.append("null");
21085
      } else {
21086
        sb.append(this.success);
21087
      }
21088
      first = false;
21089
      if (!first) sb.append(", ");
21090
      sb.append("scx:");
21091
      if (this.scx == null) {
21092
        sb.append("null");
21093
      } else {
21094
        sb.append(this.scx);
21095
      }
21096
      first = false;
21097
      sb.append(")");
21098
      return sb.toString();
21099
    }
21100
 
21101
    public void validate() throws TException {
21102
      // check for required fields
21103
    }
21104
 
21105
  }
21106
 
21107
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
21108
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
21109
 
21110
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21111
 
21112
    private long cartId;
21113
 
21114
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21115
    public enum _Fields implements TFieldIdEnum {
21116
      CART_ID((short)1, "cartId");
21117
 
21118
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21119
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21120
 
21121
      static {
21122
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21123
          byId.put((int)field._thriftId, field);
21124
          byName.put(field.getFieldName(), field);
21125
        }
21126
      }
21127
 
21128
      /**
21129
       * Find the _Fields constant that matches fieldId, or null if its not found.
21130
       */
21131
      public static _Fields findByThriftId(int fieldId) {
21132
        return byId.get(fieldId);
21133
      }
21134
 
21135
      /**
21136
       * Find the _Fields constant that matches fieldId, throwing an exception
21137
       * if it is not found.
21138
       */
21139
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21140
        _Fields fields = findByThriftId(fieldId);
21141
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21142
        return fields;
21143
      }
21144
 
21145
      /**
21146
       * Find the _Fields constant that matches name, or null if its not found.
21147
       */
21148
      public static _Fields findByName(String name) {
21149
        return byName.get(name);
21150
      }
21151
 
21152
      private final short _thriftId;
21153
      private final String _fieldName;
21154
 
21155
      _Fields(short thriftId, String fieldName) {
21156
        _thriftId = thriftId;
21157
        _fieldName = fieldName;
21158
      }
21159
 
21160
      public short getThriftFieldId() {
21161
        return _thriftId;
21162
      }
21163
 
21164
      public String getFieldName() {
21165
        return _fieldName;
21166
      }
21167
    }
21168
 
21169
    // isset id assignments
21170
    private static final int __CARTID_ISSET_ID = 0;
21171
    private BitSet __isset_bit_vector = new BitSet(1);
21172
 
21173
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21174
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
21175
          new FieldValueMetaData(TType.I64)));
21176
    }});
21177
 
21178
    static {
21179
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
21180
    }
21181
 
21182
    public getCart_args() {
21183
    }
21184
 
21185
    public getCart_args(
21186
      long cartId)
21187
    {
21188
      this();
21189
      this.cartId = cartId;
21190
      setCartIdIsSet(true);
21191
    }
21192
 
21193
    /**
21194
     * Performs a deep copy on <i>other</i>.
21195
     */
21196
    public getCart_args(getCart_args other) {
21197
      __isset_bit_vector.clear();
21198
      __isset_bit_vector.or(other.__isset_bit_vector);
21199
      this.cartId = other.cartId;
21200
    }
21201
 
21202
    public getCart_args deepCopy() {
21203
      return new getCart_args(this);
21204
    }
21205
 
21206
    @Deprecated
21207
    public getCart_args clone() {
21208
      return new getCart_args(this);
21209
    }
21210
 
21211
    public long getCartId() {
21212
      return this.cartId;
21213
    }
21214
 
21215
    public getCart_args setCartId(long cartId) {
21216
      this.cartId = cartId;
21217
      setCartIdIsSet(true);
21218
      return this;
21219
    }
21220
 
21221
    public void unsetCartId() {
21222
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
21223
    }
21224
 
21225
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21226
    public boolean isSetCartId() {
21227
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
21228
    }
21229
 
21230
    public void setCartIdIsSet(boolean value) {
21231
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
21232
    }
21233
 
21234
    public void setFieldValue(_Fields field, Object value) {
21235
      switch (field) {
21236
      case CART_ID:
21237
        if (value == null) {
21238
          unsetCartId();
21239
        } else {
21240
          setCartId((Long)value);
21241
        }
21242
        break;
21243
 
21244
      }
21245
    }
21246
 
21247
    public void setFieldValue(int fieldID, Object value) {
21248
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21249
    }
21250
 
21251
    public Object getFieldValue(_Fields field) {
21252
      switch (field) {
21253
      case CART_ID:
21254
        return new Long(getCartId());
21255
 
21256
      }
21257
      throw new IllegalStateException();
21258
    }
21259
 
21260
    public Object getFieldValue(int fieldId) {
21261
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21262
    }
21263
 
21264
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21265
    public boolean isSet(_Fields field) {
21266
      switch (field) {
21267
      case CART_ID:
21268
        return isSetCartId();
21269
      }
21270
      throw new IllegalStateException();
21271
    }
21272
 
21273
    public boolean isSet(int fieldID) {
21274
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21275
    }
21276
 
21277
    @Override
21278
    public boolean equals(Object that) {
21279
      if (that == null)
21280
        return false;
21281
      if (that instanceof getCart_args)
21282
        return this.equals((getCart_args)that);
21283
      return false;
21284
    }
21285
 
21286
    public boolean equals(getCart_args that) {
21287
      if (that == null)
21288
        return false;
21289
 
21290
      boolean this_present_cartId = true;
21291
      boolean that_present_cartId = true;
21292
      if (this_present_cartId || that_present_cartId) {
21293
        if (!(this_present_cartId && that_present_cartId))
21294
          return false;
21295
        if (this.cartId != that.cartId)
21296
          return false;
21297
      }
21298
 
21299
      return true;
21300
    }
21301
 
21302
    @Override
21303
    public int hashCode() {
21304
      return 0;
21305
    }
21306
 
21307
    public int compareTo(getCart_args other) {
21308
      if (!getClass().equals(other.getClass())) {
21309
        return getClass().getName().compareTo(other.getClass().getName());
21310
      }
21311
 
21312
      int lastComparison = 0;
21313
      getCart_args typedOther = (getCart_args)other;
21314
 
21315
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
21316
      if (lastComparison != 0) {
21317
        return lastComparison;
21318
      }
21319
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
21320
      if (lastComparison != 0) {
21321
        return lastComparison;
21322
      }
21323
      return 0;
21324
    }
21325
 
21326
    public void read(TProtocol iprot) throws TException {
21327
      TField field;
21328
      iprot.readStructBegin();
21329
      while (true)
21330
      {
21331
        field = iprot.readFieldBegin();
21332
        if (field.type == TType.STOP) { 
21333
          break;
21334
        }
21335
        _Fields fieldId = _Fields.findByThriftId(field.id);
21336
        if (fieldId == null) {
21337
          TProtocolUtil.skip(iprot, field.type);
21338
        } else {
21339
          switch (fieldId) {
21340
            case CART_ID:
506 rajveer 21341
              if (field.type == TType.I64) {
553 chandransh 21342
                this.cartId = iprot.readI64();
21343
                setCartIdIsSet(true);
506 rajveer 21344
              } else { 
21345
                TProtocolUtil.skip(iprot, field.type);
21346
              }
21347
              break;
21348
          }
21349
          iprot.readFieldEnd();
21350
        }
21351
      }
21352
      iprot.readStructEnd();
21353
      validate();
21354
    }
21355
 
21356
    public void write(TProtocol oprot) throws TException {
21357
      validate();
21358
 
21359
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21360
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21361
      oprot.writeI64(this.cartId);
506 rajveer 21362
      oprot.writeFieldEnd();
21363
      oprot.writeFieldStop();
21364
      oprot.writeStructEnd();
21365
    }
21366
 
21367
    @Override
21368
    public String toString() {
553 chandransh 21369
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 21370
      boolean first = true;
21371
 
553 chandransh 21372
      sb.append("cartId:");
21373
      sb.append(this.cartId);
506 rajveer 21374
      first = false;
21375
      sb.append(")");
21376
      return sb.toString();
21377
    }
21378
 
21379
    public void validate() throws TException {
21380
      // check for required fields
21381
    }
21382
 
21383
  }
21384
 
553 chandransh 21385
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
21386
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 21387
 
553 chandransh 21388
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
21389
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 21390
 
553 chandransh 21391
    private Cart success;
21392
    private ShoppingCartException scx;
506 rajveer 21393
 
21394
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21395
    public enum _Fields implements TFieldIdEnum {
21396
      SUCCESS((short)0, "success"),
553 chandransh 21397
      SCX((short)1, "scx");
506 rajveer 21398
 
21399
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21400
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21401
 
21402
      static {
21403
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21404
          byId.put((int)field._thriftId, field);
21405
          byName.put(field.getFieldName(), field);
21406
        }
21407
      }
21408
 
21409
      /**
21410
       * Find the _Fields constant that matches fieldId, or null if its not found.
21411
       */
21412
      public static _Fields findByThriftId(int fieldId) {
21413
        return byId.get(fieldId);
21414
      }
21415
 
21416
      /**
21417
       * Find the _Fields constant that matches fieldId, throwing an exception
21418
       * if it is not found.
21419
       */
21420
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21421
        _Fields fields = findByThriftId(fieldId);
21422
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21423
        return fields;
21424
      }
21425
 
21426
      /**
21427
       * Find the _Fields constant that matches name, or null if its not found.
21428
       */
21429
      public static _Fields findByName(String name) {
21430
        return byName.get(name);
21431
      }
21432
 
21433
      private final short _thriftId;
21434
      private final String _fieldName;
21435
 
21436
      _Fields(short thriftId, String fieldName) {
21437
        _thriftId = thriftId;
21438
        _fieldName = fieldName;
21439
      }
21440
 
21441
      public short getThriftFieldId() {
21442
        return _thriftId;
21443
      }
21444
 
21445
      public String getFieldName() {
21446
        return _fieldName;
21447
      }
21448
    }
21449
 
21450
    // isset id assignments
21451
 
21452
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21453
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 21454
          new StructMetaData(TType.STRUCT, Cart.class)));
21455
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 21456
          new FieldValueMetaData(TType.STRUCT)));
21457
    }});
21458
 
21459
    static {
553 chandransh 21460
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 21461
    }
21462
 
553 chandransh 21463
    public getCart_result() {
506 rajveer 21464
    }
21465
 
553 chandransh 21466
    public getCart_result(
21467
      Cart success,
21468
      ShoppingCartException scx)
506 rajveer 21469
    {
21470
      this();
21471
      this.success = success;
553 chandransh 21472
      this.scx = scx;
506 rajveer 21473
    }
21474
 
21475
    /**
21476
     * Performs a deep copy on <i>other</i>.
21477
     */
553 chandransh 21478
    public getCart_result(getCart_result other) {
21479
      if (other.isSetSuccess()) {
21480
        this.success = new Cart(other.success);
506 rajveer 21481
      }
553 chandransh 21482
      if (other.isSetScx()) {
21483
        this.scx = new ShoppingCartException(other.scx);
21484
      }
506 rajveer 21485
    }
21486
 
553 chandransh 21487
    public getCart_result deepCopy() {
21488
      return new getCart_result(this);
506 rajveer 21489
    }
21490
 
21491
    @Deprecated
553 chandransh 21492
    public getCart_result clone() {
21493
      return new getCart_result(this);
506 rajveer 21494
    }
21495
 
553 chandransh 21496
    public Cart getSuccess() {
506 rajveer 21497
      return this.success;
21498
    }
21499
 
553 chandransh 21500
    public getCart_result setSuccess(Cart success) {
506 rajveer 21501
      this.success = success;
21502
      return this;
21503
    }
21504
 
21505
    public void unsetSuccess() {
553 chandransh 21506
      this.success = null;
506 rajveer 21507
    }
21508
 
21509
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21510
    public boolean isSetSuccess() {
553 chandransh 21511
      return this.success != null;
506 rajveer 21512
    }
21513
 
21514
    public void setSuccessIsSet(boolean value) {
553 chandransh 21515
      if (!value) {
21516
        this.success = null;
21517
      }
506 rajveer 21518
    }
21519
 
553 chandransh 21520
    public ShoppingCartException getScx() {
21521
      return this.scx;
506 rajveer 21522
    }
21523
 
553 chandransh 21524
    public getCart_result setScx(ShoppingCartException scx) {
21525
      this.scx = scx;
506 rajveer 21526
      return this;
21527
    }
21528
 
553 chandransh 21529
    public void unsetScx() {
21530
      this.scx = null;
506 rajveer 21531
    }
21532
 
553 chandransh 21533
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21534
    public boolean isSetScx() {
21535
      return this.scx != null;
506 rajveer 21536
    }
21537
 
553 chandransh 21538
    public void setScxIsSet(boolean value) {
506 rajveer 21539
      if (!value) {
553 chandransh 21540
        this.scx = null;
506 rajveer 21541
      }
21542
    }
21543
 
21544
    public void setFieldValue(_Fields field, Object value) {
21545
      switch (field) {
21546
      case SUCCESS:
21547
        if (value == null) {
21548
          unsetSuccess();
21549
        } else {
553 chandransh 21550
          setSuccess((Cart)value);
506 rajveer 21551
        }
21552
        break;
21553
 
553 chandransh 21554
      case SCX:
506 rajveer 21555
        if (value == null) {
553 chandransh 21556
          unsetScx();
506 rajveer 21557
        } else {
553 chandransh 21558
          setScx((ShoppingCartException)value);
506 rajveer 21559
        }
21560
        break;
21561
 
21562
      }
21563
    }
21564
 
21565
    public void setFieldValue(int fieldID, Object value) {
21566
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21567
    }
21568
 
21569
    public Object getFieldValue(_Fields field) {
21570
      switch (field) {
21571
      case SUCCESS:
553 chandransh 21572
        return getSuccess();
506 rajveer 21573
 
553 chandransh 21574
      case SCX:
21575
        return getScx();
506 rajveer 21576
 
21577
      }
21578
      throw new IllegalStateException();
21579
    }
21580
 
21581
    public Object getFieldValue(int fieldId) {
21582
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21583
    }
21584
 
21585
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21586
    public boolean isSet(_Fields field) {
21587
      switch (field) {
21588
      case SUCCESS:
21589
        return isSetSuccess();
553 chandransh 21590
      case SCX:
21591
        return isSetScx();
506 rajveer 21592
      }
21593
      throw new IllegalStateException();
21594
    }
21595
 
21596
    public boolean isSet(int fieldID) {
21597
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21598
    }
21599
 
21600
    @Override
21601
    public boolean equals(Object that) {
21602
      if (that == null)
21603
        return false;
553 chandransh 21604
      if (that instanceof getCart_result)
21605
        return this.equals((getCart_result)that);
506 rajveer 21606
      return false;
21607
    }
21608
 
553 chandransh 21609
    public boolean equals(getCart_result that) {
506 rajveer 21610
      if (that == null)
21611
        return false;
21612
 
553 chandransh 21613
      boolean this_present_success = true && this.isSetSuccess();
21614
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 21615
      if (this_present_success || that_present_success) {
21616
        if (!(this_present_success && that_present_success))
21617
          return false;
553 chandransh 21618
        if (!this.success.equals(that.success))
506 rajveer 21619
          return false;
21620
      }
21621
 
553 chandransh 21622
      boolean this_present_scx = true && this.isSetScx();
21623
      boolean that_present_scx = true && that.isSetScx();
21624
      if (this_present_scx || that_present_scx) {
21625
        if (!(this_present_scx && that_present_scx))
506 rajveer 21626
          return false;
553 chandransh 21627
        if (!this.scx.equals(that.scx))
506 rajveer 21628
          return false;
21629
      }
21630
 
21631
      return true;
21632
    }
21633
 
21634
    @Override
21635
    public int hashCode() {
21636
      return 0;
21637
    }
21638
 
553 chandransh 21639
    public int compareTo(getCart_result other) {
506 rajveer 21640
      if (!getClass().equals(other.getClass())) {
21641
        return getClass().getName().compareTo(other.getClass().getName());
21642
      }
21643
 
21644
      int lastComparison = 0;
553 chandransh 21645
      getCart_result typedOther = (getCart_result)other;
506 rajveer 21646
 
21647
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21648
      if (lastComparison != 0) {
21649
        return lastComparison;
21650
      }
21651
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21652
      if (lastComparison != 0) {
21653
        return lastComparison;
21654
      }
553 chandransh 21655
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 21656
      if (lastComparison != 0) {
21657
        return lastComparison;
21658
      }
553 chandransh 21659
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 21660
      if (lastComparison != 0) {
21661
        return lastComparison;
21662
      }
21663
      return 0;
21664
    }
21665
 
21666
    public void read(TProtocol iprot) throws TException {
21667
      TField field;
21668
      iprot.readStructBegin();
21669
      while (true)
21670
      {
21671
        field = iprot.readFieldBegin();
21672
        if (field.type == TType.STOP) { 
21673
          break;
21674
        }
21675
        _Fields fieldId = _Fields.findByThriftId(field.id);
21676
        if (fieldId == null) {
21677
          TProtocolUtil.skip(iprot, field.type);
21678
        } else {
21679
          switch (fieldId) {
21680
            case SUCCESS:
553 chandransh 21681
              if (field.type == TType.STRUCT) {
21682
                this.success = new Cart();
21683
                this.success.read(iprot);
506 rajveer 21684
              } else { 
21685
                TProtocolUtil.skip(iprot, field.type);
21686
              }
21687
              break;
553 chandransh 21688
            case SCX:
506 rajveer 21689
              if (field.type == TType.STRUCT) {
553 chandransh 21690
                this.scx = new ShoppingCartException();
21691
                this.scx.read(iprot);
506 rajveer 21692
              } else { 
21693
                TProtocolUtil.skip(iprot, field.type);
21694
              }
21695
              break;
21696
          }
21697
          iprot.readFieldEnd();
21698
        }
21699
      }
21700
      iprot.readStructEnd();
21701
      validate();
21702
    }
21703
 
21704
    public void write(TProtocol oprot) throws TException {
21705
      oprot.writeStructBegin(STRUCT_DESC);
21706
 
21707
      if (this.isSetSuccess()) {
21708
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 21709
        this.success.write(oprot);
506 rajveer 21710
        oprot.writeFieldEnd();
553 chandransh 21711
      } else if (this.isSetScx()) {
21712
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21713
        this.scx.write(oprot);
506 rajveer 21714
        oprot.writeFieldEnd();
21715
      }
21716
      oprot.writeFieldStop();
21717
      oprot.writeStructEnd();
21718
    }
21719
 
21720
    @Override
21721
    public String toString() {
553 chandransh 21722
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 21723
      boolean first = true;
21724
 
21725
      sb.append("success:");
553 chandransh 21726
      if (this.success == null) {
21727
        sb.append("null");
21728
      } else {
21729
        sb.append(this.success);
21730
      }
506 rajveer 21731
      first = false;
21732
      if (!first) sb.append(", ");
553 chandransh 21733
      sb.append("scx:");
21734
      if (this.scx == null) {
506 rajveer 21735
        sb.append("null");
21736
      } else {
553 chandransh 21737
        sb.append(this.scx);
506 rajveer 21738
      }
21739
      first = false;
21740
      sb.append(")");
21741
      return sb.toString();
21742
    }
21743
 
21744
    public void validate() throws TException {
21745
      // check for required fields
21746
    }
21747
 
21748
  }
21749
 
553 chandransh 21750
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
21751
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 21752
 
553 chandransh 21753
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
21754
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 21755
 
553 chandransh 21756
    private long userId;
21757
    private CartStatus status;
48 ashish 21758
 
21759
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21760
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21761
      USER_ID((short)1, "userId"),
21762
      /**
21763
       * 
21764
       * @see CartStatus
21765
       */
21766
      STATUS((short)2, "status");
48 ashish 21767
 
21768
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21769
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21770
 
21771
      static {
21772
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21773
          byId.put((int)field._thriftId, field);
21774
          byName.put(field.getFieldName(), field);
21775
        }
21776
      }
21777
 
21778
      /**
21779
       * Find the _Fields constant that matches fieldId, or null if its not found.
21780
       */
21781
      public static _Fields findByThriftId(int fieldId) {
21782
        return byId.get(fieldId);
21783
      }
21784
 
21785
      /**
21786
       * Find the _Fields constant that matches fieldId, throwing an exception
21787
       * if it is not found.
21788
       */
21789
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21790
        _Fields fields = findByThriftId(fieldId);
21791
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21792
        return fields;
21793
      }
21794
 
21795
      /**
21796
       * Find the _Fields constant that matches name, or null if its not found.
21797
       */
21798
      public static _Fields findByName(String name) {
21799
        return byName.get(name);
21800
      }
21801
 
21802
      private final short _thriftId;
21803
      private final String _fieldName;
21804
 
21805
      _Fields(short thriftId, String fieldName) {
21806
        _thriftId = thriftId;
21807
        _fieldName = fieldName;
21808
      }
21809
 
21810
      public short getThriftFieldId() {
21811
        return _thriftId;
21812
      }
21813
 
21814
      public String getFieldName() {
21815
        return _fieldName;
21816
      }
21817
    }
21818
 
21819
    // isset id assignments
21820
    private static final int __USERID_ISSET_ID = 0;
21821
    private BitSet __isset_bit_vector = new BitSet(1);
21822
 
21823
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21824
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 21825
          new FieldValueMetaData(TType.I64)));
553 chandransh 21826
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
21827
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 21828
    }});
21829
 
21830
    static {
553 chandransh 21831
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 21832
    }
21833
 
553 chandransh 21834
    public getCartsForUser_args() {
48 ashish 21835
    }
21836
 
553 chandransh 21837
    public getCartsForUser_args(
21838
      long userId,
21839
      CartStatus status)
48 ashish 21840
    {
21841
      this();
553 chandransh 21842
      this.userId = userId;
21843
      setUserIdIsSet(true);
21844
      this.status = status;
48 ashish 21845
    }
21846
 
21847
    /**
21848
     * Performs a deep copy on <i>other</i>.
21849
     */
553 chandransh 21850
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 21851
      __isset_bit_vector.clear();
21852
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21853
      this.userId = other.userId;
21854
      if (other.isSetStatus()) {
21855
        this.status = other.status;
48 ashish 21856
      }
21857
    }
21858
 
553 chandransh 21859
    public getCartsForUser_args deepCopy() {
21860
      return new getCartsForUser_args(this);
48 ashish 21861
    }
21862
 
21863
    @Deprecated
553 chandransh 21864
    public getCartsForUser_args clone() {
21865
      return new getCartsForUser_args(this);
48 ashish 21866
    }
21867
 
553 chandransh 21868
    public long getUserId() {
21869
      return this.userId;
48 ashish 21870
    }
21871
 
553 chandransh 21872
    public getCartsForUser_args setUserId(long userId) {
21873
      this.userId = userId;
21874
      setUserIdIsSet(true);
48 ashish 21875
      return this;
21876
    }
21877
 
553 chandransh 21878
    public void unsetUserId() {
48 ashish 21879
      __isset_bit_vector.clear(__USERID_ISSET_ID);
21880
    }
21881
 
553 chandransh 21882
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
21883
    public boolean isSetUserId() {
48 ashish 21884
      return __isset_bit_vector.get(__USERID_ISSET_ID);
21885
    }
21886
 
553 chandransh 21887
    public void setUserIdIsSet(boolean value) {
48 ashish 21888
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
21889
    }
21890
 
553 chandransh 21891
    /**
21892
     * 
21893
     * @see CartStatus
21894
     */
21895
    public CartStatus getStatus() {
21896
      return this.status;
48 ashish 21897
    }
21898
 
553 chandransh 21899
    /**
21900
     * 
21901
     * @see CartStatus
21902
     */
21903
    public getCartsForUser_args setStatus(CartStatus status) {
21904
      this.status = status;
48 ashish 21905
      return this;
21906
    }
21907
 
553 chandransh 21908
    public void unsetStatus() {
21909
      this.status = null;
48 ashish 21910
    }
21911
 
553 chandransh 21912
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
21913
    public boolean isSetStatus() {
21914
      return this.status != null;
48 ashish 21915
    }
21916
 
553 chandransh 21917
    public void setStatusIsSet(boolean value) {
48 ashish 21918
      if (!value) {
553 chandransh 21919
        this.status = null;
48 ashish 21920
      }
21921
    }
21922
 
21923
    public void setFieldValue(_Fields field, Object value) {
21924
      switch (field) {
553 chandransh 21925
      case USER_ID:
48 ashish 21926
        if (value == null) {
553 chandransh 21927
          unsetUserId();
48 ashish 21928
        } else {
553 chandransh 21929
          setUserId((Long)value);
48 ashish 21930
        }
21931
        break;
21932
 
553 chandransh 21933
      case STATUS:
48 ashish 21934
        if (value == null) {
553 chandransh 21935
          unsetStatus();
48 ashish 21936
        } else {
553 chandransh 21937
          setStatus((CartStatus)value);
48 ashish 21938
        }
21939
        break;
21940
 
21941
      }
21942
    }
21943
 
21944
    public void setFieldValue(int fieldID, Object value) {
21945
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21946
    }
21947
 
21948
    public Object getFieldValue(_Fields field) {
21949
      switch (field) {
553 chandransh 21950
      case USER_ID:
21951
        return new Long(getUserId());
48 ashish 21952
 
553 chandransh 21953
      case STATUS:
21954
        return getStatus();
48 ashish 21955
 
21956
      }
21957
      throw new IllegalStateException();
21958
    }
21959
 
21960
    public Object getFieldValue(int fieldId) {
21961
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21962
    }
21963
 
21964
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21965
    public boolean isSet(_Fields field) {
21966
      switch (field) {
553 chandransh 21967
      case USER_ID:
21968
        return isSetUserId();
21969
      case STATUS:
21970
        return isSetStatus();
48 ashish 21971
      }
21972
      throw new IllegalStateException();
21973
    }
21974
 
21975
    public boolean isSet(int fieldID) {
21976
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21977
    }
21978
 
21979
    @Override
21980
    public boolean equals(Object that) {
21981
      if (that == null)
21982
        return false;
553 chandransh 21983
      if (that instanceof getCartsForUser_args)
21984
        return this.equals((getCartsForUser_args)that);
48 ashish 21985
      return false;
21986
    }
21987
 
553 chandransh 21988
    public boolean equals(getCartsForUser_args that) {
48 ashish 21989
      if (that == null)
21990
        return false;
21991
 
553 chandransh 21992
      boolean this_present_userId = true;
21993
      boolean that_present_userId = true;
21994
      if (this_present_userId || that_present_userId) {
21995
        if (!(this_present_userId && that_present_userId))
48 ashish 21996
          return false;
553 chandransh 21997
        if (this.userId != that.userId)
48 ashish 21998
          return false;
21999
      }
22000
 
553 chandransh 22001
      boolean this_present_status = true && this.isSetStatus();
22002
      boolean that_present_status = true && that.isSetStatus();
22003
      if (this_present_status || that_present_status) {
22004
        if (!(this_present_status && that_present_status))
48 ashish 22005
          return false;
553 chandransh 22006
        if (!this.status.equals(that.status))
48 ashish 22007
          return false;
22008
      }
22009
 
22010
      return true;
22011
    }
22012
 
22013
    @Override
22014
    public int hashCode() {
22015
      return 0;
22016
    }
22017
 
553 chandransh 22018
    public int compareTo(getCartsForUser_args other) {
48 ashish 22019
      if (!getClass().equals(other.getClass())) {
22020
        return getClass().getName().compareTo(other.getClass().getName());
22021
      }
22022
 
22023
      int lastComparison = 0;
553 chandransh 22024
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 22025
 
553 chandransh 22026
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 22027
      if (lastComparison != 0) {
22028
        return lastComparison;
22029
      }
553 chandransh 22030
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 22031
      if (lastComparison != 0) {
22032
        return lastComparison;
22033
      }
553 chandransh 22034
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 22035
      if (lastComparison != 0) {
22036
        return lastComparison;
22037
      }
553 chandransh 22038
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 22039
      if (lastComparison != 0) {
22040
        return lastComparison;
22041
      }
22042
      return 0;
22043
    }
22044
 
22045
    public void read(TProtocol iprot) throws TException {
22046
      TField field;
22047
      iprot.readStructBegin();
22048
      while (true)
22049
      {
22050
        field = iprot.readFieldBegin();
22051
        if (field.type == TType.STOP) { 
22052
          break;
22053
        }
22054
        _Fields fieldId = _Fields.findByThriftId(field.id);
22055
        if (fieldId == null) {
22056
          TProtocolUtil.skip(iprot, field.type);
22057
        } else {
22058
          switch (fieldId) {
553 chandransh 22059
            case USER_ID:
48 ashish 22060
              if (field.type == TType.I64) {
553 chandransh 22061
                this.userId = iprot.readI64();
22062
                setUserIdIsSet(true);
48 ashish 22063
              } else { 
22064
                TProtocolUtil.skip(iprot, field.type);
22065
              }
22066
              break;
553 chandransh 22067
            case STATUS:
22068
              if (field.type == TType.I32) {
22069
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 22070
              } else { 
22071
                TProtocolUtil.skip(iprot, field.type);
22072
              }
22073
              break;
22074
          }
22075
          iprot.readFieldEnd();
22076
        }
22077
      }
22078
      iprot.readStructEnd();
22079
      validate();
22080
    }
22081
 
22082
    public void write(TProtocol oprot) throws TException {
22083
      validate();
22084
 
22085
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22086
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
22087
      oprot.writeI64(this.userId);
48 ashish 22088
      oprot.writeFieldEnd();
553 chandransh 22089
      if (this.status != null) {
22090
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
22091
        oprot.writeI32(this.status.getValue());
48 ashish 22092
        oprot.writeFieldEnd();
22093
      }
22094
      oprot.writeFieldStop();
22095
      oprot.writeStructEnd();
22096
    }
22097
 
22098
    @Override
22099
    public String toString() {
553 chandransh 22100
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 22101
      boolean first = true;
22102
 
553 chandransh 22103
      sb.append("userId:");
22104
      sb.append(this.userId);
48 ashish 22105
      first = false;
22106
      if (!first) sb.append(", ");
553 chandransh 22107
      sb.append("status:");
22108
      if (this.status == null) {
48 ashish 22109
        sb.append("null");
22110
      } else {
553 chandransh 22111
        String status_name = status.name();
22112
        if (status_name != null) {
22113
          sb.append(status_name);
22114
          sb.append(" (");
22115
        }
22116
        sb.append(this.status);
22117
        if (status_name != null) {
22118
          sb.append(")");
22119
        }
48 ashish 22120
      }
22121
      first = false;
22122
      sb.append(")");
22123
      return sb.toString();
22124
    }
22125
 
22126
    public void validate() throws TException {
22127
      // check for required fields
22128
    }
22129
 
22130
  }
22131
 
553 chandransh 22132
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
22133
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 22134
 
553 chandransh 22135
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
22136
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22137
 
553 chandransh 22138
    private List<Cart> success;
22139
    private ShoppingCartException scx;
48 ashish 22140
 
22141
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22142
    public enum _Fields implements TFieldIdEnum {
22143
      SUCCESS((short)0, "success"),
553 chandransh 22144
      SCX((short)1, "scx");
48 ashish 22145
 
22146
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22147
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22148
 
22149
      static {
22150
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22151
          byId.put((int)field._thriftId, field);
22152
          byName.put(field.getFieldName(), field);
22153
        }
22154
      }
22155
 
22156
      /**
22157
       * Find the _Fields constant that matches fieldId, or null if its not found.
22158
       */
22159
      public static _Fields findByThriftId(int fieldId) {
22160
        return byId.get(fieldId);
22161
      }
22162
 
22163
      /**
22164
       * Find the _Fields constant that matches fieldId, throwing an exception
22165
       * if it is not found.
22166
       */
22167
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22168
        _Fields fields = findByThriftId(fieldId);
22169
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22170
        return fields;
22171
      }
22172
 
22173
      /**
22174
       * Find the _Fields constant that matches name, or null if its not found.
22175
       */
22176
      public static _Fields findByName(String name) {
22177
        return byName.get(name);
22178
      }
22179
 
22180
      private final short _thriftId;
22181
      private final String _fieldName;
22182
 
22183
      _Fields(short thriftId, String fieldName) {
22184
        _thriftId = thriftId;
22185
        _fieldName = fieldName;
22186
      }
22187
 
22188
      public short getThriftFieldId() {
22189
        return _thriftId;
22190
      }
22191
 
22192
      public String getFieldName() {
22193
        return _fieldName;
22194
      }
22195
    }
22196
 
22197
    // isset id assignments
22198
 
22199
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22200
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 22201
          new ListMetaData(TType.LIST, 
22202
              new StructMetaData(TType.STRUCT, Cart.class))));
22203
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 22204
          new FieldValueMetaData(TType.STRUCT)));
22205
    }});
22206
 
22207
    static {
553 chandransh 22208
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 22209
    }
22210
 
553 chandransh 22211
    public getCartsForUser_result() {
48 ashish 22212
    }
22213
 
553 chandransh 22214
    public getCartsForUser_result(
22215
      List<Cart> success,
22216
      ShoppingCartException scx)
48 ashish 22217
    {
22218
      this();
22219
      this.success = success;
553 chandransh 22220
      this.scx = scx;
48 ashish 22221
    }
22222
 
22223
    /**
22224
     * Performs a deep copy on <i>other</i>.
22225
     */
553 chandransh 22226
    public getCartsForUser_result(getCartsForUser_result other) {
22227
      if (other.isSetSuccess()) {
22228
        List<Cart> __this__success = new ArrayList<Cart>();
22229
        for (Cart other_element : other.success) {
22230
          __this__success.add(new Cart(other_element));
22231
        }
22232
        this.success = __this__success;
48 ashish 22233
      }
553 chandransh 22234
      if (other.isSetScx()) {
22235
        this.scx = new ShoppingCartException(other.scx);
22236
      }
48 ashish 22237
    }
22238
 
553 chandransh 22239
    public getCartsForUser_result deepCopy() {
22240
      return new getCartsForUser_result(this);
48 ashish 22241
    }
22242
 
22243
    @Deprecated
553 chandransh 22244
    public getCartsForUser_result clone() {
22245
      return new getCartsForUser_result(this);
48 ashish 22246
    }
22247
 
553 chandransh 22248
    public int getSuccessSize() {
22249
      return (this.success == null) ? 0 : this.success.size();
22250
    }
22251
 
22252
    public java.util.Iterator<Cart> getSuccessIterator() {
22253
      return (this.success == null) ? null : this.success.iterator();
22254
    }
22255
 
22256
    public void addToSuccess(Cart elem) {
22257
      if (this.success == null) {
22258
        this.success = new ArrayList<Cart>();
22259
      }
22260
      this.success.add(elem);
22261
    }
22262
 
22263
    public List<Cart> getSuccess() {
48 ashish 22264
      return this.success;
22265
    }
22266
 
553 chandransh 22267
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 22268
      this.success = success;
22269
      return this;
22270
    }
22271
 
22272
    public void unsetSuccess() {
553 chandransh 22273
      this.success = null;
48 ashish 22274
    }
22275
 
22276
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22277
    public boolean isSetSuccess() {
553 chandransh 22278
      return this.success != null;
48 ashish 22279
    }
22280
 
22281
    public void setSuccessIsSet(boolean value) {
553 chandransh 22282
      if (!value) {
22283
        this.success = null;
22284
      }
48 ashish 22285
    }
22286
 
553 chandransh 22287
    public ShoppingCartException getScx() {
22288
      return this.scx;
48 ashish 22289
    }
22290
 
553 chandransh 22291
    public getCartsForUser_result setScx(ShoppingCartException scx) {
22292
      this.scx = scx;
48 ashish 22293
      return this;
22294
    }
22295
 
553 chandransh 22296
    public void unsetScx() {
22297
      this.scx = null;
48 ashish 22298
    }
22299
 
553 chandransh 22300
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22301
    public boolean isSetScx() {
22302
      return this.scx != null;
48 ashish 22303
    }
22304
 
553 chandransh 22305
    public void setScxIsSet(boolean value) {
48 ashish 22306
      if (!value) {
553 chandransh 22307
        this.scx = null;
48 ashish 22308
      }
22309
    }
22310
 
22311
    public void setFieldValue(_Fields field, Object value) {
22312
      switch (field) {
22313
      case SUCCESS:
22314
        if (value == null) {
22315
          unsetSuccess();
22316
        } else {
553 chandransh 22317
          setSuccess((List<Cart>)value);
48 ashish 22318
        }
22319
        break;
22320
 
553 chandransh 22321
      case SCX:
48 ashish 22322
        if (value == null) {
553 chandransh 22323
          unsetScx();
48 ashish 22324
        } else {
553 chandransh 22325
          setScx((ShoppingCartException)value);
48 ashish 22326
        }
22327
        break;
22328
 
22329
      }
22330
    }
22331
 
22332
    public void setFieldValue(int fieldID, Object value) {
22333
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22334
    }
22335
 
22336
    public Object getFieldValue(_Fields field) {
22337
      switch (field) {
22338
      case SUCCESS:
553 chandransh 22339
        return getSuccess();
48 ashish 22340
 
553 chandransh 22341
      case SCX:
22342
        return getScx();
48 ashish 22343
 
22344
      }
22345
      throw new IllegalStateException();
22346
    }
22347
 
22348
    public Object getFieldValue(int fieldId) {
22349
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22350
    }
22351
 
22352
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22353
    public boolean isSet(_Fields field) {
22354
      switch (field) {
22355
      case SUCCESS:
22356
        return isSetSuccess();
553 chandransh 22357
      case SCX:
22358
        return isSetScx();
48 ashish 22359
      }
22360
      throw new IllegalStateException();
22361
    }
22362
 
22363
    public boolean isSet(int fieldID) {
22364
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22365
    }
22366
 
22367
    @Override
22368
    public boolean equals(Object that) {
22369
      if (that == null)
22370
        return false;
553 chandransh 22371
      if (that instanceof getCartsForUser_result)
22372
        return this.equals((getCartsForUser_result)that);
48 ashish 22373
      return false;
22374
    }
22375
 
553 chandransh 22376
    public boolean equals(getCartsForUser_result that) {
48 ashish 22377
      if (that == null)
22378
        return false;
22379
 
553 chandransh 22380
      boolean this_present_success = true && this.isSetSuccess();
22381
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 22382
      if (this_present_success || that_present_success) {
22383
        if (!(this_present_success && that_present_success))
22384
          return false;
553 chandransh 22385
        if (!this.success.equals(that.success))
48 ashish 22386
          return false;
22387
      }
22388
 
553 chandransh 22389
      boolean this_present_scx = true && this.isSetScx();
22390
      boolean that_present_scx = true && that.isSetScx();
22391
      if (this_present_scx || that_present_scx) {
22392
        if (!(this_present_scx && that_present_scx))
48 ashish 22393
          return false;
553 chandransh 22394
        if (!this.scx.equals(that.scx))
48 ashish 22395
          return false;
22396
      }
22397
 
22398
      return true;
22399
    }
22400
 
22401
    @Override
22402
    public int hashCode() {
22403
      return 0;
22404
    }
22405
 
553 chandransh 22406
    public int compareTo(getCartsForUser_result other) {
48 ashish 22407
      if (!getClass().equals(other.getClass())) {
22408
        return getClass().getName().compareTo(other.getClass().getName());
22409
      }
22410
 
22411
      int lastComparison = 0;
553 chandransh 22412
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 22413
 
22414
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22415
      if (lastComparison != 0) {
22416
        return lastComparison;
22417
      }
22418
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22419
      if (lastComparison != 0) {
22420
        return lastComparison;
22421
      }
553 chandransh 22422
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 22423
      if (lastComparison != 0) {
22424
        return lastComparison;
22425
      }
553 chandransh 22426
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 22427
      if (lastComparison != 0) {
22428
        return lastComparison;
22429
      }
22430
      return 0;
22431
    }
22432
 
22433
    public void read(TProtocol iprot) throws TException {
22434
      TField field;
22435
      iprot.readStructBegin();
22436
      while (true)
22437
      {
22438
        field = iprot.readFieldBegin();
22439
        if (field.type == TType.STOP) { 
22440
          break;
22441
        }
22442
        _Fields fieldId = _Fields.findByThriftId(field.id);
22443
        if (fieldId == null) {
22444
          TProtocolUtil.skip(iprot, field.type);
22445
        } else {
22446
          switch (fieldId) {
22447
            case SUCCESS:
553 chandransh 22448
              if (field.type == TType.LIST) {
22449
                {
1590 varun.gupt 22450
                  TList _list28 = iprot.readListBegin();
22451
                  this.success = new ArrayList<Cart>(_list28.size);
22452
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
553 chandransh 22453
                  {
1590 varun.gupt 22454
                    Cart _elem30;
22455
                    _elem30 = new Cart();
22456
                    _elem30.read(iprot);
22457
                    this.success.add(_elem30);
553 chandransh 22458
                  }
22459
                  iprot.readListEnd();
22460
                }
48 ashish 22461
              } else { 
22462
                TProtocolUtil.skip(iprot, field.type);
22463
              }
22464
              break;
553 chandransh 22465
            case SCX:
48 ashish 22466
              if (field.type == TType.STRUCT) {
553 chandransh 22467
                this.scx = new ShoppingCartException();
22468
                this.scx.read(iprot);
48 ashish 22469
              } else { 
22470
                TProtocolUtil.skip(iprot, field.type);
22471
              }
22472
              break;
22473
          }
22474
          iprot.readFieldEnd();
22475
        }
22476
      }
22477
      iprot.readStructEnd();
22478
      validate();
22479
    }
22480
 
22481
    public void write(TProtocol oprot) throws TException {
22482
      oprot.writeStructBegin(STRUCT_DESC);
22483
 
22484
      if (this.isSetSuccess()) {
22485
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 22486
        {
22487
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1590 varun.gupt 22488
          for (Cart _iter31 : this.success)
553 chandransh 22489
          {
1590 varun.gupt 22490
            _iter31.write(oprot);
553 chandransh 22491
          }
22492
          oprot.writeListEnd();
22493
        }
48 ashish 22494
        oprot.writeFieldEnd();
553 chandransh 22495
      } else if (this.isSetScx()) {
22496
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22497
        this.scx.write(oprot);
48 ashish 22498
        oprot.writeFieldEnd();
22499
      }
22500
      oprot.writeFieldStop();
22501
      oprot.writeStructEnd();
22502
    }
22503
 
22504
    @Override
22505
    public String toString() {
553 chandransh 22506
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 22507
      boolean first = true;
22508
 
22509
      sb.append("success:");
553 chandransh 22510
      if (this.success == null) {
22511
        sb.append("null");
22512
      } else {
22513
        sb.append(this.success);
22514
      }
48 ashish 22515
      first = false;
22516
      if (!first) sb.append(", ");
553 chandransh 22517
      sb.append("scx:");
22518
      if (this.scx == null) {
48 ashish 22519
        sb.append("null");
22520
      } else {
553 chandransh 22521
        sb.append(this.scx);
48 ashish 22522
      }
22523
      first = false;
22524
      sb.append(")");
22525
      return sb.toString();
22526
    }
22527
 
22528
    public void validate() throws TException {
22529
      // check for required fields
22530
    }
22531
 
22532
  }
22533
 
553 chandransh 22534
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
22535
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 22536
 
553 chandransh 22537
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 22538
 
553 chandransh 22539
    private CartStatus status;
48 ashish 22540
 
22541
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22542
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22543
      /**
22544
       * 
22545
       * @see CartStatus
22546
       */
22547
      STATUS((short)1, "status");
48 ashish 22548
 
22549
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22550
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22551
 
22552
      static {
22553
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22554
          byId.put((int)field._thriftId, field);
22555
          byName.put(field.getFieldName(), field);
22556
        }
22557
      }
22558
 
22559
      /**
22560
       * Find the _Fields constant that matches fieldId, or null if its not found.
22561
       */
22562
      public static _Fields findByThriftId(int fieldId) {
22563
        return byId.get(fieldId);
22564
      }
22565
 
22566
      /**
22567
       * Find the _Fields constant that matches fieldId, throwing an exception
22568
       * if it is not found.
22569
       */
22570
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22571
        _Fields fields = findByThriftId(fieldId);
22572
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22573
        return fields;
22574
      }
22575
 
22576
      /**
22577
       * Find the _Fields constant that matches name, or null if its not found.
22578
       */
22579
      public static _Fields findByName(String name) {
22580
        return byName.get(name);
22581
      }
22582
 
22583
      private final short _thriftId;
22584
      private final String _fieldName;
22585
 
22586
      _Fields(short thriftId, String fieldName) {
22587
        _thriftId = thriftId;
22588
        _fieldName = fieldName;
22589
      }
22590
 
22591
      public short getThriftFieldId() {
22592
        return _thriftId;
22593
      }
22594
 
22595
      public String getFieldName() {
22596
        return _fieldName;
22597
      }
22598
    }
22599
 
22600
    // isset id assignments
553 chandransh 22601
 
22602
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22603
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
22604
          new EnumMetaData(TType.ENUM, CartStatus.class)));
22605
    }});
22606
 
22607
    static {
22608
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
22609
    }
22610
 
22611
    public getCartsByStatus_args() {
22612
    }
22613
 
22614
    public getCartsByStatus_args(
22615
      CartStatus status)
22616
    {
22617
      this();
22618
      this.status = status;
22619
    }
22620
 
22621
    /**
22622
     * Performs a deep copy on <i>other</i>.
22623
     */
22624
    public getCartsByStatus_args(getCartsByStatus_args other) {
22625
      if (other.isSetStatus()) {
22626
        this.status = other.status;
22627
      }
22628
    }
22629
 
22630
    public getCartsByStatus_args deepCopy() {
22631
      return new getCartsByStatus_args(this);
22632
    }
22633
 
22634
    @Deprecated
22635
    public getCartsByStatus_args clone() {
22636
      return new getCartsByStatus_args(this);
22637
    }
22638
 
22639
    /**
22640
     * 
22641
     * @see CartStatus
22642
     */
22643
    public CartStatus getStatus() {
22644
      return this.status;
22645
    }
22646
 
22647
    /**
22648
     * 
22649
     * @see CartStatus
22650
     */
22651
    public getCartsByStatus_args setStatus(CartStatus status) {
22652
      this.status = status;
22653
      return this;
22654
    }
22655
 
22656
    public void unsetStatus() {
22657
      this.status = null;
22658
    }
22659
 
22660
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
22661
    public boolean isSetStatus() {
22662
      return this.status != null;
22663
    }
22664
 
22665
    public void setStatusIsSet(boolean value) {
22666
      if (!value) {
22667
        this.status = null;
22668
      }
22669
    }
22670
 
22671
    public void setFieldValue(_Fields field, Object value) {
22672
      switch (field) {
22673
      case STATUS:
22674
        if (value == null) {
22675
          unsetStatus();
22676
        } else {
22677
          setStatus((CartStatus)value);
22678
        }
22679
        break;
22680
 
22681
      }
22682
    }
22683
 
22684
    public void setFieldValue(int fieldID, Object value) {
22685
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22686
    }
22687
 
22688
    public Object getFieldValue(_Fields field) {
22689
      switch (field) {
22690
      case STATUS:
22691
        return getStatus();
22692
 
22693
      }
22694
      throw new IllegalStateException();
22695
    }
22696
 
22697
    public Object getFieldValue(int fieldId) {
22698
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22699
    }
22700
 
22701
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22702
    public boolean isSet(_Fields field) {
22703
      switch (field) {
22704
      case STATUS:
22705
        return isSetStatus();
22706
      }
22707
      throw new IllegalStateException();
22708
    }
22709
 
22710
    public boolean isSet(int fieldID) {
22711
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22712
    }
22713
 
22714
    @Override
22715
    public boolean equals(Object that) {
22716
      if (that == null)
22717
        return false;
22718
      if (that instanceof getCartsByStatus_args)
22719
        return this.equals((getCartsByStatus_args)that);
22720
      return false;
22721
    }
22722
 
22723
    public boolean equals(getCartsByStatus_args that) {
22724
      if (that == null)
22725
        return false;
22726
 
22727
      boolean this_present_status = true && this.isSetStatus();
22728
      boolean that_present_status = true && that.isSetStatus();
22729
      if (this_present_status || that_present_status) {
22730
        if (!(this_present_status && that_present_status))
22731
          return false;
22732
        if (!this.status.equals(that.status))
22733
          return false;
22734
      }
22735
 
22736
      return true;
22737
    }
22738
 
22739
    @Override
22740
    public int hashCode() {
22741
      return 0;
22742
    }
22743
 
22744
    public int compareTo(getCartsByStatus_args other) {
22745
      if (!getClass().equals(other.getClass())) {
22746
        return getClass().getName().compareTo(other.getClass().getName());
22747
      }
22748
 
22749
      int lastComparison = 0;
22750
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
22751
 
22752
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
22753
      if (lastComparison != 0) {
22754
        return lastComparison;
22755
      }
22756
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
22757
      if (lastComparison != 0) {
22758
        return lastComparison;
22759
      }
22760
      return 0;
22761
    }
22762
 
22763
    public void read(TProtocol iprot) throws TException {
22764
      TField field;
22765
      iprot.readStructBegin();
22766
      while (true)
22767
      {
22768
        field = iprot.readFieldBegin();
22769
        if (field.type == TType.STOP) { 
22770
          break;
22771
        }
22772
        _Fields fieldId = _Fields.findByThriftId(field.id);
22773
        if (fieldId == null) {
22774
          TProtocolUtil.skip(iprot, field.type);
22775
        } else {
22776
          switch (fieldId) {
22777
            case STATUS:
22778
              if (field.type == TType.I32) {
22779
                this.status = CartStatus.findByValue(iprot.readI32());
22780
              } else { 
22781
                TProtocolUtil.skip(iprot, field.type);
22782
              }
22783
              break;
22784
          }
22785
          iprot.readFieldEnd();
22786
        }
22787
      }
22788
      iprot.readStructEnd();
22789
      validate();
22790
    }
22791
 
22792
    public void write(TProtocol oprot) throws TException {
22793
      validate();
22794
 
22795
      oprot.writeStructBegin(STRUCT_DESC);
22796
      if (this.status != null) {
22797
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
22798
        oprot.writeI32(this.status.getValue());
22799
        oprot.writeFieldEnd();
22800
      }
22801
      oprot.writeFieldStop();
22802
      oprot.writeStructEnd();
22803
    }
22804
 
22805
    @Override
22806
    public String toString() {
22807
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
22808
      boolean first = true;
22809
 
22810
      sb.append("status:");
22811
      if (this.status == null) {
22812
        sb.append("null");
22813
      } else {
22814
        String status_name = status.name();
22815
        if (status_name != null) {
22816
          sb.append(status_name);
22817
          sb.append(" (");
22818
        }
22819
        sb.append(this.status);
22820
        if (status_name != null) {
22821
          sb.append(")");
22822
        }
22823
      }
22824
      first = false;
22825
      sb.append(")");
22826
      return sb.toString();
22827
    }
22828
 
22829
    public void validate() throws TException {
22830
      // check for required fields
22831
    }
22832
 
22833
  }
22834
 
22835
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
22836
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
22837
 
22838
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
22839
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
22840
 
22841
    private List<Cart> success;
22842
    private ShoppingCartException scx;
22843
 
22844
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22845
    public enum _Fields implements TFieldIdEnum {
22846
      SUCCESS((short)0, "success"),
22847
      SCX((short)1, "scx");
22848
 
22849
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22850
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22851
 
22852
      static {
22853
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22854
          byId.put((int)field._thriftId, field);
22855
          byName.put(field.getFieldName(), field);
22856
        }
22857
      }
22858
 
22859
      /**
22860
       * Find the _Fields constant that matches fieldId, or null if its not found.
22861
       */
22862
      public static _Fields findByThriftId(int fieldId) {
22863
        return byId.get(fieldId);
22864
      }
22865
 
22866
      /**
22867
       * Find the _Fields constant that matches fieldId, throwing an exception
22868
       * if it is not found.
22869
       */
22870
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22871
        _Fields fields = findByThriftId(fieldId);
22872
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22873
        return fields;
22874
      }
22875
 
22876
      /**
22877
       * Find the _Fields constant that matches name, or null if its not found.
22878
       */
22879
      public static _Fields findByName(String name) {
22880
        return byName.get(name);
22881
      }
22882
 
22883
      private final short _thriftId;
22884
      private final String _fieldName;
22885
 
22886
      _Fields(short thriftId, String fieldName) {
22887
        _thriftId = thriftId;
22888
        _fieldName = fieldName;
22889
      }
22890
 
22891
      public short getThriftFieldId() {
22892
        return _thriftId;
22893
      }
22894
 
22895
      public String getFieldName() {
22896
        return _fieldName;
22897
      }
22898
    }
22899
 
22900
    // isset id assignments
22901
 
22902
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22903
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
22904
          new ListMetaData(TType.LIST, 
22905
              new StructMetaData(TType.STRUCT, Cart.class))));
22906
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22907
          new FieldValueMetaData(TType.STRUCT)));
22908
    }});
22909
 
22910
    static {
22911
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
22912
    }
22913
 
22914
    public getCartsByStatus_result() {
22915
    }
22916
 
22917
    public getCartsByStatus_result(
22918
      List<Cart> success,
22919
      ShoppingCartException scx)
22920
    {
22921
      this();
22922
      this.success = success;
22923
      this.scx = scx;
22924
    }
22925
 
22926
    /**
22927
     * Performs a deep copy on <i>other</i>.
22928
     */
22929
    public getCartsByStatus_result(getCartsByStatus_result other) {
22930
      if (other.isSetSuccess()) {
22931
        List<Cart> __this__success = new ArrayList<Cart>();
22932
        for (Cart other_element : other.success) {
22933
          __this__success.add(new Cart(other_element));
22934
        }
22935
        this.success = __this__success;
22936
      }
22937
      if (other.isSetScx()) {
22938
        this.scx = new ShoppingCartException(other.scx);
22939
      }
22940
    }
22941
 
22942
    public getCartsByStatus_result deepCopy() {
22943
      return new getCartsByStatus_result(this);
22944
    }
22945
 
22946
    @Deprecated
22947
    public getCartsByStatus_result clone() {
22948
      return new getCartsByStatus_result(this);
22949
    }
22950
 
22951
    public int getSuccessSize() {
22952
      return (this.success == null) ? 0 : this.success.size();
22953
    }
22954
 
22955
    public java.util.Iterator<Cart> getSuccessIterator() {
22956
      return (this.success == null) ? null : this.success.iterator();
22957
    }
22958
 
22959
    public void addToSuccess(Cart elem) {
22960
      if (this.success == null) {
22961
        this.success = new ArrayList<Cart>();
22962
      }
22963
      this.success.add(elem);
22964
    }
22965
 
22966
    public List<Cart> getSuccess() {
22967
      return this.success;
22968
    }
22969
 
22970
    public getCartsByStatus_result setSuccess(List<Cart> success) {
22971
      this.success = success;
22972
      return this;
22973
    }
22974
 
22975
    public void unsetSuccess() {
22976
      this.success = null;
22977
    }
22978
 
22979
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22980
    public boolean isSetSuccess() {
22981
      return this.success != null;
22982
    }
22983
 
22984
    public void setSuccessIsSet(boolean value) {
22985
      if (!value) {
22986
        this.success = null;
22987
      }
22988
    }
22989
 
22990
    public ShoppingCartException getScx() {
22991
      return this.scx;
22992
    }
22993
 
22994
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
22995
      this.scx = scx;
22996
      return this;
22997
    }
22998
 
22999
    public void unsetScx() {
23000
      this.scx = null;
23001
    }
23002
 
23003
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23004
    public boolean isSetScx() {
23005
      return this.scx != null;
23006
    }
23007
 
23008
    public void setScxIsSet(boolean value) {
23009
      if (!value) {
23010
        this.scx = null;
23011
      }
23012
    }
23013
 
23014
    public void setFieldValue(_Fields field, Object value) {
23015
      switch (field) {
23016
      case SUCCESS:
23017
        if (value == null) {
23018
          unsetSuccess();
23019
        } else {
23020
          setSuccess((List<Cart>)value);
23021
        }
23022
        break;
23023
 
23024
      case SCX:
23025
        if (value == null) {
23026
          unsetScx();
23027
        } else {
23028
          setScx((ShoppingCartException)value);
23029
        }
23030
        break;
23031
 
23032
      }
23033
    }
23034
 
23035
    public void setFieldValue(int fieldID, Object value) {
23036
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23037
    }
23038
 
23039
    public Object getFieldValue(_Fields field) {
23040
      switch (field) {
23041
      case SUCCESS:
23042
        return getSuccess();
23043
 
23044
      case SCX:
23045
        return getScx();
23046
 
23047
      }
23048
      throw new IllegalStateException();
23049
    }
23050
 
23051
    public Object getFieldValue(int fieldId) {
23052
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23053
    }
23054
 
23055
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23056
    public boolean isSet(_Fields field) {
23057
      switch (field) {
23058
      case SUCCESS:
23059
        return isSetSuccess();
23060
      case SCX:
23061
        return isSetScx();
23062
      }
23063
      throw new IllegalStateException();
23064
    }
23065
 
23066
    public boolean isSet(int fieldID) {
23067
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23068
    }
23069
 
23070
    @Override
23071
    public boolean equals(Object that) {
23072
      if (that == null)
23073
        return false;
23074
      if (that instanceof getCartsByStatus_result)
23075
        return this.equals((getCartsByStatus_result)that);
23076
      return false;
23077
    }
23078
 
23079
    public boolean equals(getCartsByStatus_result that) {
23080
      if (that == null)
23081
        return false;
23082
 
23083
      boolean this_present_success = true && this.isSetSuccess();
23084
      boolean that_present_success = true && that.isSetSuccess();
23085
      if (this_present_success || that_present_success) {
23086
        if (!(this_present_success && that_present_success))
23087
          return false;
23088
        if (!this.success.equals(that.success))
23089
          return false;
23090
      }
23091
 
23092
      boolean this_present_scx = true && this.isSetScx();
23093
      boolean that_present_scx = true && that.isSetScx();
23094
      if (this_present_scx || that_present_scx) {
23095
        if (!(this_present_scx && that_present_scx))
23096
          return false;
23097
        if (!this.scx.equals(that.scx))
23098
          return false;
23099
      }
23100
 
23101
      return true;
23102
    }
23103
 
23104
    @Override
23105
    public int hashCode() {
23106
      return 0;
23107
    }
23108
 
23109
    public int compareTo(getCartsByStatus_result other) {
23110
      if (!getClass().equals(other.getClass())) {
23111
        return getClass().getName().compareTo(other.getClass().getName());
23112
      }
23113
 
23114
      int lastComparison = 0;
23115
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
23116
 
23117
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23118
      if (lastComparison != 0) {
23119
        return lastComparison;
23120
      }
23121
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23122
      if (lastComparison != 0) {
23123
        return lastComparison;
23124
      }
23125
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23126
      if (lastComparison != 0) {
23127
        return lastComparison;
23128
      }
23129
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23130
      if (lastComparison != 0) {
23131
        return lastComparison;
23132
      }
23133
      return 0;
23134
    }
23135
 
23136
    public void read(TProtocol iprot) throws TException {
23137
      TField field;
23138
      iprot.readStructBegin();
23139
      while (true)
23140
      {
23141
        field = iprot.readFieldBegin();
23142
        if (field.type == TType.STOP) { 
23143
          break;
23144
        }
23145
        _Fields fieldId = _Fields.findByThriftId(field.id);
23146
        if (fieldId == null) {
23147
          TProtocolUtil.skip(iprot, field.type);
23148
        } else {
23149
          switch (fieldId) {
23150
            case SUCCESS:
23151
              if (field.type == TType.LIST) {
23152
                {
1590 varun.gupt 23153
                  TList _list32 = iprot.readListBegin();
23154
                  this.success = new ArrayList<Cart>(_list32.size);
23155
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
553 chandransh 23156
                  {
1590 varun.gupt 23157
                    Cart _elem34;
23158
                    _elem34 = new Cart();
23159
                    _elem34.read(iprot);
23160
                    this.success.add(_elem34);
553 chandransh 23161
                  }
23162
                  iprot.readListEnd();
23163
                }
23164
              } else { 
23165
                TProtocolUtil.skip(iprot, field.type);
23166
              }
23167
              break;
23168
            case SCX:
23169
              if (field.type == TType.STRUCT) {
23170
                this.scx = new ShoppingCartException();
23171
                this.scx.read(iprot);
23172
              } else { 
23173
                TProtocolUtil.skip(iprot, field.type);
23174
              }
23175
              break;
23176
          }
23177
          iprot.readFieldEnd();
23178
        }
23179
      }
23180
      iprot.readStructEnd();
23181
      validate();
23182
    }
23183
 
23184
    public void write(TProtocol oprot) throws TException {
23185
      oprot.writeStructBegin(STRUCT_DESC);
23186
 
23187
      if (this.isSetSuccess()) {
23188
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
23189
        {
23190
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1590 varun.gupt 23191
          for (Cart _iter35 : this.success)
553 chandransh 23192
          {
1590 varun.gupt 23193
            _iter35.write(oprot);
553 chandransh 23194
          }
23195
          oprot.writeListEnd();
23196
        }
23197
        oprot.writeFieldEnd();
23198
      } else if (this.isSetScx()) {
23199
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23200
        this.scx.write(oprot);
23201
        oprot.writeFieldEnd();
23202
      }
23203
      oprot.writeFieldStop();
23204
      oprot.writeStructEnd();
23205
    }
23206
 
23207
    @Override
23208
    public String toString() {
23209
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
23210
      boolean first = true;
23211
 
23212
      sb.append("success:");
23213
      if (this.success == null) {
23214
        sb.append("null");
23215
      } else {
23216
        sb.append(this.success);
23217
      }
23218
      first = false;
23219
      if (!first) sb.append(", ");
23220
      sb.append("scx:");
23221
      if (this.scx == null) {
23222
        sb.append("null");
23223
      } else {
23224
        sb.append(this.scx);
23225
      }
23226
      first = false;
23227
      sb.append(")");
23228
      return sb.toString();
23229
    }
23230
 
23231
    public void validate() throws TException {
23232
      // check for required fields
23233
    }
23234
 
23235
  }
23236
 
23237
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
23238
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
23239
 
23240
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
23241
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
23242
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
23243
 
23244
    private long from_time;
23245
    private long to_time;
23246
    private CartStatus status;
23247
 
23248
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23249
    public enum _Fields implements TFieldIdEnum {
23250
      FROM_TIME((short)1, "from_time"),
23251
      TO_TIME((short)2, "to_time"),
23252
      /**
23253
       * 
23254
       * @see CartStatus
23255
       */
23256
      STATUS((short)3, "status");
23257
 
23258
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23260
 
23261
      static {
23262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23263
          byId.put((int)field._thriftId, field);
23264
          byName.put(field.getFieldName(), field);
23265
        }
23266
      }
23267
 
23268
      /**
23269
       * Find the _Fields constant that matches fieldId, or null if its not found.
23270
       */
23271
      public static _Fields findByThriftId(int fieldId) {
23272
        return byId.get(fieldId);
23273
      }
23274
 
23275
      /**
23276
       * Find the _Fields constant that matches fieldId, throwing an exception
23277
       * if it is not found.
23278
       */
23279
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23280
        _Fields fields = findByThriftId(fieldId);
23281
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23282
        return fields;
23283
      }
23284
 
23285
      /**
23286
       * Find the _Fields constant that matches name, or null if its not found.
23287
       */
23288
      public static _Fields findByName(String name) {
23289
        return byName.get(name);
23290
      }
23291
 
23292
      private final short _thriftId;
23293
      private final String _fieldName;
23294
 
23295
      _Fields(short thriftId, String fieldName) {
23296
        _thriftId = thriftId;
23297
        _fieldName = fieldName;
23298
      }
23299
 
23300
      public short getThriftFieldId() {
23301
        return _thriftId;
23302
      }
23303
 
23304
      public String getFieldName() {
23305
        return _fieldName;
23306
      }
23307
    }
23308
 
23309
    // isset id assignments
23310
    private static final int __FROM_TIME_ISSET_ID = 0;
23311
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 23312
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 23313
 
23314
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23315
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 23316
          new FieldValueMetaData(TType.I64)));
553 chandransh 23317
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
23318
          new FieldValueMetaData(TType.I64)));
23319
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
23320
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 23321
    }});
23322
 
23323
    static {
553 chandransh 23324
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 23325
    }
23326
 
553 chandransh 23327
    public getCartsByTime_args() {
48 ashish 23328
    }
23329
 
553 chandransh 23330
    public getCartsByTime_args(
23331
      long from_time,
23332
      long to_time,
23333
      CartStatus status)
48 ashish 23334
    {
23335
      this();
553 chandransh 23336
      this.from_time = from_time;
23337
      setFrom_timeIsSet(true);
23338
      this.to_time = to_time;
23339
      setTo_timeIsSet(true);
23340
      this.status = status;
48 ashish 23341
    }
23342
 
23343
    /**
23344
     * Performs a deep copy on <i>other</i>.
23345
     */
553 chandransh 23346
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 23347
      __isset_bit_vector.clear();
23348
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 23349
      this.from_time = other.from_time;
23350
      this.to_time = other.to_time;
23351
      if (other.isSetStatus()) {
23352
        this.status = other.status;
23353
      }
48 ashish 23354
    }
23355
 
553 chandransh 23356
    public getCartsByTime_args deepCopy() {
23357
      return new getCartsByTime_args(this);
48 ashish 23358
    }
23359
 
23360
    @Deprecated
553 chandransh 23361
    public getCartsByTime_args clone() {
23362
      return new getCartsByTime_args(this);
48 ashish 23363
    }
23364
 
553 chandransh 23365
    public long getFrom_time() {
23366
      return this.from_time;
48 ashish 23367
    }
23368
 
553 chandransh 23369
    public getCartsByTime_args setFrom_time(long from_time) {
23370
      this.from_time = from_time;
23371
      setFrom_timeIsSet(true);
48 ashish 23372
      return this;
23373
    }
23374
 
553 chandransh 23375
    public void unsetFrom_time() {
23376
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 23377
    }
23378
 
553 chandransh 23379
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
23380
    public boolean isSetFrom_time() {
23381
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 23382
    }
23383
 
553 chandransh 23384
    public void setFrom_timeIsSet(boolean value) {
23385
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 23386
    }
23387
 
553 chandransh 23388
    public long getTo_time() {
23389
      return this.to_time;
123 ashish 23390
    }
23391
 
553 chandransh 23392
    public getCartsByTime_args setTo_time(long to_time) {
23393
      this.to_time = to_time;
23394
      setTo_timeIsSet(true);
123 ashish 23395
      return this;
23396
    }
23397
 
553 chandransh 23398
    public void unsetTo_time() {
23399
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 23400
    }
23401
 
553 chandransh 23402
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
23403
    public boolean isSetTo_time() {
23404
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 23405
    }
23406
 
553 chandransh 23407
    public void setTo_timeIsSet(boolean value) {
23408
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 23409
    }
23410
 
553 chandransh 23411
    /**
23412
     * 
23413
     * @see CartStatus
23414
     */
23415
    public CartStatus getStatus() {
23416
      return this.status;
23417
    }
23418
 
23419
    /**
23420
     * 
23421
     * @see CartStatus
23422
     */
23423
    public getCartsByTime_args setStatus(CartStatus status) {
23424
      this.status = status;
23425
      return this;
23426
    }
23427
 
23428
    public void unsetStatus() {
23429
      this.status = null;
23430
    }
23431
 
23432
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
23433
    public boolean isSetStatus() {
23434
      return this.status != null;
23435
    }
23436
 
23437
    public void setStatusIsSet(boolean value) {
23438
      if (!value) {
23439
        this.status = null;
23440
      }
23441
    }
23442
 
48 ashish 23443
    public void setFieldValue(_Fields field, Object value) {
23444
      switch (field) {
553 chandransh 23445
      case FROM_TIME:
48 ashish 23446
        if (value == null) {
553 chandransh 23447
          unsetFrom_time();
48 ashish 23448
        } else {
553 chandransh 23449
          setFrom_time((Long)value);
48 ashish 23450
        }
23451
        break;
23452
 
553 chandransh 23453
      case TO_TIME:
123 ashish 23454
        if (value == null) {
553 chandransh 23455
          unsetTo_time();
123 ashish 23456
        } else {
553 chandransh 23457
          setTo_time((Long)value);
123 ashish 23458
        }
23459
        break;
23460
 
553 chandransh 23461
      case STATUS:
23462
        if (value == null) {
23463
          unsetStatus();
23464
        } else {
23465
          setStatus((CartStatus)value);
23466
        }
23467
        break;
23468
 
48 ashish 23469
      }
23470
    }
23471
 
23472
    public void setFieldValue(int fieldID, Object value) {
23473
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23474
    }
23475
 
23476
    public Object getFieldValue(_Fields field) {
23477
      switch (field) {
553 chandransh 23478
      case FROM_TIME:
23479
        return new Long(getFrom_time());
48 ashish 23480
 
553 chandransh 23481
      case TO_TIME:
23482
        return new Long(getTo_time());
123 ashish 23483
 
553 chandransh 23484
      case STATUS:
23485
        return getStatus();
23486
 
48 ashish 23487
      }
23488
      throw new IllegalStateException();
23489
    }
23490
 
23491
    public Object getFieldValue(int fieldId) {
23492
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23493
    }
23494
 
23495
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23496
    public boolean isSet(_Fields field) {
23497
      switch (field) {
553 chandransh 23498
      case FROM_TIME:
23499
        return isSetFrom_time();
23500
      case TO_TIME:
23501
        return isSetTo_time();
23502
      case STATUS:
23503
        return isSetStatus();
48 ashish 23504
      }
23505
      throw new IllegalStateException();
23506
    }
23507
 
23508
    public boolean isSet(int fieldID) {
23509
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23510
    }
23511
 
23512
    @Override
23513
    public boolean equals(Object that) {
23514
      if (that == null)
23515
        return false;
553 chandransh 23516
      if (that instanceof getCartsByTime_args)
23517
        return this.equals((getCartsByTime_args)that);
48 ashish 23518
      return false;
23519
    }
23520
 
553 chandransh 23521
    public boolean equals(getCartsByTime_args that) {
48 ashish 23522
      if (that == null)
23523
        return false;
23524
 
553 chandransh 23525
      boolean this_present_from_time = true;
23526
      boolean that_present_from_time = true;
23527
      if (this_present_from_time || that_present_from_time) {
23528
        if (!(this_present_from_time && that_present_from_time))
48 ashish 23529
          return false;
553 chandransh 23530
        if (this.from_time != that.from_time)
48 ashish 23531
          return false;
23532
      }
23533
 
553 chandransh 23534
      boolean this_present_to_time = true;
23535
      boolean that_present_to_time = true;
23536
      if (this_present_to_time || that_present_to_time) {
23537
        if (!(this_present_to_time && that_present_to_time))
123 ashish 23538
          return false;
553 chandransh 23539
        if (this.to_time != that.to_time)
123 ashish 23540
          return false;
23541
      }
23542
 
553 chandransh 23543
      boolean this_present_status = true && this.isSetStatus();
23544
      boolean that_present_status = true && that.isSetStatus();
23545
      if (this_present_status || that_present_status) {
23546
        if (!(this_present_status && that_present_status))
23547
          return false;
23548
        if (!this.status.equals(that.status))
23549
          return false;
23550
      }
23551
 
48 ashish 23552
      return true;
23553
    }
23554
 
23555
    @Override
23556
    public int hashCode() {
23557
      return 0;
23558
    }
23559
 
553 chandransh 23560
    public int compareTo(getCartsByTime_args other) {
48 ashish 23561
      if (!getClass().equals(other.getClass())) {
23562
        return getClass().getName().compareTo(other.getClass().getName());
23563
      }
23564
 
23565
      int lastComparison = 0;
553 chandransh 23566
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 23567
 
553 chandransh 23568
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 23569
      if (lastComparison != 0) {
23570
        return lastComparison;
23571
      }
553 chandransh 23572
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 23573
      if (lastComparison != 0) {
23574
        return lastComparison;
23575
      }
553 chandransh 23576
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 23577
      if (lastComparison != 0) {
23578
        return lastComparison;
23579
      }
553 chandransh 23580
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 23581
      if (lastComparison != 0) {
23582
        return lastComparison;
23583
      }
553 chandransh 23584
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
23585
      if (lastComparison != 0) {
23586
        return lastComparison;
23587
      }
23588
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
23589
      if (lastComparison != 0) {
23590
        return lastComparison;
23591
      }
48 ashish 23592
      return 0;
23593
    }
23594
 
23595
    public void read(TProtocol iprot) throws TException {
23596
      TField field;
23597
      iprot.readStructBegin();
23598
      while (true)
23599
      {
23600
        field = iprot.readFieldBegin();
23601
        if (field.type == TType.STOP) { 
23602
          break;
23603
        }
23604
        _Fields fieldId = _Fields.findByThriftId(field.id);
23605
        if (fieldId == null) {
23606
          TProtocolUtil.skip(iprot, field.type);
23607
        } else {
23608
          switch (fieldId) {
553 chandransh 23609
            case FROM_TIME:
48 ashish 23610
              if (field.type == TType.I64) {
553 chandransh 23611
                this.from_time = iprot.readI64();
23612
                setFrom_timeIsSet(true);
48 ashish 23613
              } else { 
23614
                TProtocolUtil.skip(iprot, field.type);
23615
              }
23616
              break;
553 chandransh 23617
            case TO_TIME:
23618
              if (field.type == TType.I64) {
23619
                this.to_time = iprot.readI64();
23620
                setTo_timeIsSet(true);
123 ashish 23621
              } else { 
23622
                TProtocolUtil.skip(iprot, field.type);
23623
              }
23624
              break;
553 chandransh 23625
            case STATUS:
23626
              if (field.type == TType.I32) {
23627
                this.status = CartStatus.findByValue(iprot.readI32());
23628
              } else { 
23629
                TProtocolUtil.skip(iprot, field.type);
23630
              }
23631
              break;
48 ashish 23632
          }
23633
          iprot.readFieldEnd();
23634
        }
23635
      }
23636
      iprot.readStructEnd();
23637
      validate();
23638
    }
23639
 
23640
    public void write(TProtocol oprot) throws TException {
23641
      validate();
23642
 
23643
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 23644
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
23645
      oprot.writeI64(this.from_time);
48 ashish 23646
      oprot.writeFieldEnd();
553 chandransh 23647
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
23648
      oprot.writeI64(this.to_time);
123 ashish 23649
      oprot.writeFieldEnd();
553 chandransh 23650
      if (this.status != null) {
23651
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
23652
        oprot.writeI32(this.status.getValue());
23653
        oprot.writeFieldEnd();
23654
      }
48 ashish 23655
      oprot.writeFieldStop();
23656
      oprot.writeStructEnd();
23657
    }
23658
 
23659
    @Override
23660
    public String toString() {
553 chandransh 23661
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 23662
      boolean first = true;
23663
 
553 chandransh 23664
      sb.append("from_time:");
23665
      sb.append(this.from_time);
48 ashish 23666
      first = false;
123 ashish 23667
      if (!first) sb.append(", ");
553 chandransh 23668
      sb.append("to_time:");
23669
      sb.append(this.to_time);
123 ashish 23670
      first = false;
553 chandransh 23671
      if (!first) sb.append(", ");
23672
      sb.append("status:");
23673
      if (this.status == null) {
23674
        sb.append("null");
23675
      } else {
23676
        String status_name = status.name();
23677
        if (status_name != null) {
23678
          sb.append(status_name);
23679
          sb.append(" (");
23680
        }
23681
        sb.append(this.status);
23682
        if (status_name != null) {
23683
          sb.append(")");
23684
        }
23685
      }
23686
      first = false;
48 ashish 23687
      sb.append(")");
23688
      return sb.toString();
23689
    }
23690
 
23691
    public void validate() throws TException {
23692
      // check for required fields
23693
    }
23694
 
23695
  }
23696
 
553 chandransh 23697
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
23698
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 23699
 
553 chandransh 23700
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
23701
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 23702
 
553 chandransh 23703
    private List<Cart> success;
23704
    private ShoppingCartException scx;
48 ashish 23705
 
23706
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23707
    public enum _Fields implements TFieldIdEnum {
23708
      SUCCESS((short)0, "success"),
553 chandransh 23709
      SCX((short)1, "scx");
48 ashish 23710
 
23711
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23713
 
23714
      static {
23715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23716
          byId.put((int)field._thriftId, field);
23717
          byName.put(field.getFieldName(), field);
23718
        }
23719
      }
23720
 
23721
      /**
23722
       * Find the _Fields constant that matches fieldId, or null if its not found.
23723
       */
23724
      public static _Fields findByThriftId(int fieldId) {
23725
        return byId.get(fieldId);
23726
      }
23727
 
23728
      /**
23729
       * Find the _Fields constant that matches fieldId, throwing an exception
23730
       * if it is not found.
23731
       */
23732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23733
        _Fields fields = findByThriftId(fieldId);
23734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23735
        return fields;
23736
      }
23737
 
23738
      /**
23739
       * Find the _Fields constant that matches name, or null if its not found.
23740
       */
23741
      public static _Fields findByName(String name) {
23742
        return byName.get(name);
23743
      }
23744
 
23745
      private final short _thriftId;
23746
      private final String _fieldName;
23747
 
23748
      _Fields(short thriftId, String fieldName) {
23749
        _thriftId = thriftId;
23750
        _fieldName = fieldName;
23751
      }
23752
 
23753
      public short getThriftFieldId() {
23754
        return _thriftId;
23755
      }
23756
 
23757
      public String getFieldName() {
23758
        return _fieldName;
23759
      }
23760
    }
23761
 
23762
    // isset id assignments
23763
 
23764
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23765
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 23766
          new ListMetaData(TType.LIST, 
23767
              new StructMetaData(TType.STRUCT, Cart.class))));
23768
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 23769
          new FieldValueMetaData(TType.STRUCT)));
23770
    }});
23771
 
23772
    static {
553 chandransh 23773
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 23774
    }
23775
 
553 chandransh 23776
    public getCartsByTime_result() {
48 ashish 23777
    }
23778
 
553 chandransh 23779
    public getCartsByTime_result(
23780
      List<Cart> success,
23781
      ShoppingCartException scx)
48 ashish 23782
    {
23783
      this();
23784
      this.success = success;
553 chandransh 23785
      this.scx = scx;
48 ashish 23786
    }
23787
 
23788
    /**
23789
     * Performs a deep copy on <i>other</i>.
23790
     */
553 chandransh 23791
    public getCartsByTime_result(getCartsByTime_result other) {
23792
      if (other.isSetSuccess()) {
23793
        List<Cart> __this__success = new ArrayList<Cart>();
23794
        for (Cart other_element : other.success) {
23795
          __this__success.add(new Cart(other_element));
23796
        }
23797
        this.success = __this__success;
48 ashish 23798
      }
553 chandransh 23799
      if (other.isSetScx()) {
23800
        this.scx = new ShoppingCartException(other.scx);
23801
      }
48 ashish 23802
    }
23803
 
553 chandransh 23804
    public getCartsByTime_result deepCopy() {
23805
      return new getCartsByTime_result(this);
48 ashish 23806
    }
23807
 
23808
    @Deprecated
553 chandransh 23809
    public getCartsByTime_result clone() {
23810
      return new getCartsByTime_result(this);
48 ashish 23811
    }
23812
 
553 chandransh 23813
    public int getSuccessSize() {
23814
      return (this.success == null) ? 0 : this.success.size();
23815
    }
23816
 
23817
    public java.util.Iterator<Cart> getSuccessIterator() {
23818
      return (this.success == null) ? null : this.success.iterator();
23819
    }
23820
 
23821
    public void addToSuccess(Cart elem) {
23822
      if (this.success == null) {
23823
        this.success = new ArrayList<Cart>();
23824
      }
23825
      this.success.add(elem);
23826
    }
23827
 
23828
    public List<Cart> getSuccess() {
48 ashish 23829
      return this.success;
23830
    }
23831
 
553 chandransh 23832
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 23833
      this.success = success;
23834
      return this;
23835
    }
23836
 
23837
    public void unsetSuccess() {
553 chandransh 23838
      this.success = null;
48 ashish 23839
    }
23840
 
23841
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23842
    public boolean isSetSuccess() {
553 chandransh 23843
      return this.success != null;
48 ashish 23844
    }
23845
 
23846
    public void setSuccessIsSet(boolean value) {
553 chandransh 23847
      if (!value) {
23848
        this.success = null;
23849
      }
48 ashish 23850
    }
23851
 
553 chandransh 23852
    public ShoppingCartException getScx() {
23853
      return this.scx;
48 ashish 23854
    }
23855
 
553 chandransh 23856
    public getCartsByTime_result setScx(ShoppingCartException scx) {
23857
      this.scx = scx;
48 ashish 23858
      return this;
23859
    }
23860
 
553 chandransh 23861
    public void unsetScx() {
23862
      this.scx = null;
48 ashish 23863
    }
23864
 
553 chandransh 23865
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23866
    public boolean isSetScx() {
23867
      return this.scx != null;
48 ashish 23868
    }
23869
 
553 chandransh 23870
    public void setScxIsSet(boolean value) {
48 ashish 23871
      if (!value) {
553 chandransh 23872
        this.scx = null;
48 ashish 23873
      }
23874
    }
23875
 
23876
    public void setFieldValue(_Fields field, Object value) {
23877
      switch (field) {
23878
      case SUCCESS:
23879
        if (value == null) {
23880
          unsetSuccess();
23881
        } else {
553 chandransh 23882
          setSuccess((List<Cart>)value);
48 ashish 23883
        }
23884
        break;
23885
 
553 chandransh 23886
      case SCX:
48 ashish 23887
        if (value == null) {
553 chandransh 23888
          unsetScx();
48 ashish 23889
        } else {
553 chandransh 23890
          setScx((ShoppingCartException)value);
48 ashish 23891
        }
23892
        break;
23893
 
23894
      }
23895
    }
23896
 
23897
    public void setFieldValue(int fieldID, Object value) {
23898
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23899
    }
23900
 
23901
    public Object getFieldValue(_Fields field) {
23902
      switch (field) {
23903
      case SUCCESS:
553 chandransh 23904
        return getSuccess();
48 ashish 23905
 
553 chandransh 23906
      case SCX:
23907
        return getScx();
48 ashish 23908
 
23909
      }
23910
      throw new IllegalStateException();
23911
    }
23912
 
23913
    public Object getFieldValue(int fieldId) {
23914
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23915
    }
23916
 
23917
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23918
    public boolean isSet(_Fields field) {
23919
      switch (field) {
23920
      case SUCCESS:
23921
        return isSetSuccess();
553 chandransh 23922
      case SCX:
23923
        return isSetScx();
48 ashish 23924
      }
23925
      throw new IllegalStateException();
23926
    }
23927
 
23928
    public boolean isSet(int fieldID) {
23929
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23930
    }
23931
 
23932
    @Override
23933
    public boolean equals(Object that) {
23934
      if (that == null)
23935
        return false;
553 chandransh 23936
      if (that instanceof getCartsByTime_result)
23937
        return this.equals((getCartsByTime_result)that);
48 ashish 23938
      return false;
23939
    }
23940
 
553 chandransh 23941
    public boolean equals(getCartsByTime_result that) {
48 ashish 23942
      if (that == null)
23943
        return false;
23944
 
553 chandransh 23945
      boolean this_present_success = true && this.isSetSuccess();
23946
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 23947
      if (this_present_success || that_present_success) {
23948
        if (!(this_present_success && that_present_success))
23949
          return false;
553 chandransh 23950
        if (!this.success.equals(that.success))
48 ashish 23951
          return false;
23952
      }
23953
 
553 chandransh 23954
      boolean this_present_scx = true && this.isSetScx();
23955
      boolean that_present_scx = true && that.isSetScx();
23956
      if (this_present_scx || that_present_scx) {
23957
        if (!(this_present_scx && that_present_scx))
48 ashish 23958
          return false;
553 chandransh 23959
        if (!this.scx.equals(that.scx))
48 ashish 23960
          return false;
23961
      }
23962
 
23963
      return true;
23964
    }
23965
 
23966
    @Override
23967
    public int hashCode() {
23968
      return 0;
23969
    }
23970
 
553 chandransh 23971
    public int compareTo(getCartsByTime_result other) {
48 ashish 23972
      if (!getClass().equals(other.getClass())) {
23973
        return getClass().getName().compareTo(other.getClass().getName());
23974
      }
23975
 
23976
      int lastComparison = 0;
553 chandransh 23977
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 23978
 
23979
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23980
      if (lastComparison != 0) {
23981
        return lastComparison;
23982
      }
23983
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23984
      if (lastComparison != 0) {
23985
        return lastComparison;
23986
      }
553 chandransh 23987
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 23988
      if (lastComparison != 0) {
23989
        return lastComparison;
23990
      }
553 chandransh 23991
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 23992
      if (lastComparison != 0) {
23993
        return lastComparison;
23994
      }
23995
      return 0;
23996
    }
23997
 
23998
    public void read(TProtocol iprot) throws TException {
23999
      TField field;
24000
      iprot.readStructBegin();
24001
      while (true)
24002
      {
24003
        field = iprot.readFieldBegin();
24004
        if (field.type == TType.STOP) { 
24005
          break;
24006
        }
24007
        _Fields fieldId = _Fields.findByThriftId(field.id);
24008
        if (fieldId == null) {
24009
          TProtocolUtil.skip(iprot, field.type);
24010
        } else {
24011
          switch (fieldId) {
24012
            case SUCCESS:
553 chandransh 24013
              if (field.type == TType.LIST) {
24014
                {
1590 varun.gupt 24015
                  TList _list36 = iprot.readListBegin();
24016
                  this.success = new ArrayList<Cart>(_list36.size);
24017
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
553 chandransh 24018
                  {
1590 varun.gupt 24019
                    Cart _elem38;
24020
                    _elem38 = new Cart();
24021
                    _elem38.read(iprot);
24022
                    this.success.add(_elem38);
553 chandransh 24023
                  }
24024
                  iprot.readListEnd();
24025
                }
48 ashish 24026
              } else { 
24027
                TProtocolUtil.skip(iprot, field.type);
24028
              }
24029
              break;
553 chandransh 24030
            case SCX:
48 ashish 24031
              if (field.type == TType.STRUCT) {
553 chandransh 24032
                this.scx = new ShoppingCartException();
24033
                this.scx.read(iprot);
48 ashish 24034
              } else { 
24035
                TProtocolUtil.skip(iprot, field.type);
24036
              }
24037
              break;
24038
          }
24039
          iprot.readFieldEnd();
24040
        }
24041
      }
24042
      iprot.readStructEnd();
24043
      validate();
24044
    }
24045
 
24046
    public void write(TProtocol oprot) throws TException {
24047
      oprot.writeStructBegin(STRUCT_DESC);
24048
 
24049
      if (this.isSetSuccess()) {
24050
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 24051
        {
24052
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1590 varun.gupt 24053
          for (Cart _iter39 : this.success)
553 chandransh 24054
          {
1590 varun.gupt 24055
            _iter39.write(oprot);
553 chandransh 24056
          }
24057
          oprot.writeListEnd();
24058
        }
48 ashish 24059
        oprot.writeFieldEnd();
553 chandransh 24060
      } else if (this.isSetScx()) {
24061
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24062
        this.scx.write(oprot);
48 ashish 24063
        oprot.writeFieldEnd();
24064
      }
24065
      oprot.writeFieldStop();
24066
      oprot.writeStructEnd();
24067
    }
24068
 
24069
    @Override
24070
    public String toString() {
553 chandransh 24071
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 24072
      boolean first = true;
24073
 
24074
      sb.append("success:");
553 chandransh 24075
      if (this.success == null) {
24076
        sb.append("null");
24077
      } else {
24078
        sb.append(this.success);
24079
      }
48 ashish 24080
      first = false;
24081
      if (!first) sb.append(", ");
553 chandransh 24082
      sb.append("scx:");
24083
      if (this.scx == null) {
48 ashish 24084
        sb.append("null");
24085
      } else {
553 chandransh 24086
        sb.append(this.scx);
48 ashish 24087
      }
24088
      first = false;
24089
      sb.append(")");
24090
      return sb.toString();
24091
    }
24092
 
24093
    public void validate() throws TException {
24094
      // check for required fields
24095
    }
24096
 
24097
  }
24098
 
553 chandransh 24099
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
24100
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 24101
 
553 chandransh 24102
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24103
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 24104
 
553 chandransh 24105
    private long cartId;
24106
    private CartStatus status;
48 ashish 24107
 
24108
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24109
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24110
      CART_ID((short)1, "cartId"),
24111
      /**
24112
       * 
24113
       * @see CartStatus
24114
       */
24115
      STATUS((short)2, "status");
48 ashish 24116
 
24117
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24118
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24119
 
24120
      static {
24121
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24122
          byId.put((int)field._thriftId, field);
24123
          byName.put(field.getFieldName(), field);
24124
        }
24125
      }
24126
 
24127
      /**
24128
       * Find the _Fields constant that matches fieldId, or null if its not found.
24129
       */
24130
      public static _Fields findByThriftId(int fieldId) {
24131
        return byId.get(fieldId);
24132
      }
24133
 
24134
      /**
24135
       * Find the _Fields constant that matches fieldId, throwing an exception
24136
       * if it is not found.
24137
       */
24138
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24139
        _Fields fields = findByThriftId(fieldId);
24140
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24141
        return fields;
24142
      }
24143
 
24144
      /**
24145
       * Find the _Fields constant that matches name, or null if its not found.
24146
       */
24147
      public static _Fields findByName(String name) {
24148
        return byName.get(name);
24149
      }
24150
 
24151
      private final short _thriftId;
24152
      private final String _fieldName;
24153
 
24154
      _Fields(short thriftId, String fieldName) {
24155
        _thriftId = thriftId;
24156
        _fieldName = fieldName;
24157
      }
24158
 
24159
      public short getThriftFieldId() {
24160
        return _thriftId;
24161
      }
24162
 
24163
      public String getFieldName() {
24164
        return _fieldName;
24165
      }
24166
    }
24167
 
24168
    // isset id assignments
553 chandransh 24169
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 24170
    private BitSet __isset_bit_vector = new BitSet(1);
24171
 
24172
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24173
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24174
          new FieldValueMetaData(TType.I64)));
553 chandransh 24175
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
24176
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 24177
    }});
24178
 
24179
    static {
553 chandransh 24180
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 24181
    }
24182
 
553 chandransh 24183
    public changeCartStatus_args() {
48 ashish 24184
    }
24185
 
553 chandransh 24186
    public changeCartStatus_args(
24187
      long cartId,
24188
      CartStatus status)
48 ashish 24189
    {
24190
      this();
553 chandransh 24191
      this.cartId = cartId;
24192
      setCartIdIsSet(true);
24193
      this.status = status;
48 ashish 24194
    }
24195
 
24196
    /**
24197
     * Performs a deep copy on <i>other</i>.
24198
     */
553 chandransh 24199
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 24200
      __isset_bit_vector.clear();
24201
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24202
      this.cartId = other.cartId;
24203
      if (other.isSetStatus()) {
24204
        this.status = other.status;
24205
      }
48 ashish 24206
    }
24207
 
553 chandransh 24208
    public changeCartStatus_args deepCopy() {
24209
      return new changeCartStatus_args(this);
48 ashish 24210
    }
24211
 
24212
    @Deprecated
553 chandransh 24213
    public changeCartStatus_args clone() {
24214
      return new changeCartStatus_args(this);
48 ashish 24215
    }
24216
 
553 chandransh 24217
    public long getCartId() {
24218
      return this.cartId;
48 ashish 24219
    }
24220
 
553 chandransh 24221
    public changeCartStatus_args setCartId(long cartId) {
24222
      this.cartId = cartId;
24223
      setCartIdIsSet(true);
48 ashish 24224
      return this;
24225
    }
24226
 
553 chandransh 24227
    public void unsetCartId() {
24228
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24229
    }
24230
 
553 chandransh 24231
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24232
    public boolean isSetCartId() {
24233
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24234
    }
24235
 
553 chandransh 24236
    public void setCartIdIsSet(boolean value) {
24237
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24238
    }
24239
 
553 chandransh 24240
    /**
24241
     * 
24242
     * @see CartStatus
24243
     */
24244
    public CartStatus getStatus() {
24245
      return this.status;
24246
    }
24247
 
24248
    /**
24249
     * 
24250
     * @see CartStatus
24251
     */
24252
    public changeCartStatus_args setStatus(CartStatus status) {
24253
      this.status = status;
24254
      return this;
24255
    }
24256
 
24257
    public void unsetStatus() {
24258
      this.status = null;
24259
    }
24260
 
24261
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
24262
    public boolean isSetStatus() {
24263
      return this.status != null;
24264
    }
24265
 
24266
    public void setStatusIsSet(boolean value) {
24267
      if (!value) {
24268
        this.status = null;
24269
      }
24270
    }
24271
 
48 ashish 24272
    public void setFieldValue(_Fields field, Object value) {
24273
      switch (field) {
553 chandransh 24274
      case CART_ID:
48 ashish 24275
        if (value == null) {
553 chandransh 24276
          unsetCartId();
48 ashish 24277
        } else {
553 chandransh 24278
          setCartId((Long)value);
48 ashish 24279
        }
24280
        break;
24281
 
553 chandransh 24282
      case STATUS:
24283
        if (value == null) {
24284
          unsetStatus();
24285
        } else {
24286
          setStatus((CartStatus)value);
24287
        }
24288
        break;
24289
 
48 ashish 24290
      }
24291
    }
24292
 
24293
    public void setFieldValue(int fieldID, Object value) {
24294
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24295
    }
24296
 
24297
    public Object getFieldValue(_Fields field) {
24298
      switch (field) {
553 chandransh 24299
      case CART_ID:
24300
        return new Long(getCartId());
48 ashish 24301
 
553 chandransh 24302
      case STATUS:
24303
        return getStatus();
24304
 
48 ashish 24305
      }
24306
      throw new IllegalStateException();
24307
    }
24308
 
24309
    public Object getFieldValue(int fieldId) {
24310
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24311
    }
24312
 
24313
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24314
    public boolean isSet(_Fields field) {
24315
      switch (field) {
553 chandransh 24316
      case CART_ID:
24317
        return isSetCartId();
24318
      case STATUS:
24319
        return isSetStatus();
48 ashish 24320
      }
24321
      throw new IllegalStateException();
24322
    }
24323
 
24324
    public boolean isSet(int fieldID) {
24325
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24326
    }
24327
 
24328
    @Override
24329
    public boolean equals(Object that) {
24330
      if (that == null)
24331
        return false;
553 chandransh 24332
      if (that instanceof changeCartStatus_args)
24333
        return this.equals((changeCartStatus_args)that);
48 ashish 24334
      return false;
24335
    }
24336
 
553 chandransh 24337
    public boolean equals(changeCartStatus_args that) {
48 ashish 24338
      if (that == null)
24339
        return false;
24340
 
553 chandransh 24341
      boolean this_present_cartId = true;
24342
      boolean that_present_cartId = true;
24343
      if (this_present_cartId || that_present_cartId) {
24344
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24345
          return false;
553 chandransh 24346
        if (this.cartId != that.cartId)
48 ashish 24347
          return false;
24348
      }
24349
 
553 chandransh 24350
      boolean this_present_status = true && this.isSetStatus();
24351
      boolean that_present_status = true && that.isSetStatus();
24352
      if (this_present_status || that_present_status) {
24353
        if (!(this_present_status && that_present_status))
24354
          return false;
24355
        if (!this.status.equals(that.status))
24356
          return false;
24357
      }
24358
 
48 ashish 24359
      return true;
24360
    }
24361
 
24362
    @Override
24363
    public int hashCode() {
24364
      return 0;
24365
    }
24366
 
553 chandransh 24367
    public int compareTo(changeCartStatus_args other) {
48 ashish 24368
      if (!getClass().equals(other.getClass())) {
24369
        return getClass().getName().compareTo(other.getClass().getName());
24370
      }
24371
 
24372
      int lastComparison = 0;
553 chandransh 24373
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 24374
 
553 chandransh 24375
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24376
      if (lastComparison != 0) {
24377
        return lastComparison;
24378
      }
553 chandransh 24379
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24380
      if (lastComparison != 0) {
24381
        return lastComparison;
24382
      }
553 chandransh 24383
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
24384
      if (lastComparison != 0) {
24385
        return lastComparison;
24386
      }
24387
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
24388
      if (lastComparison != 0) {
24389
        return lastComparison;
24390
      }
48 ashish 24391
      return 0;
24392
    }
24393
 
24394
    public void read(TProtocol iprot) throws TException {
24395
      TField field;
24396
      iprot.readStructBegin();
24397
      while (true)
24398
      {
24399
        field = iprot.readFieldBegin();
24400
        if (field.type == TType.STOP) { 
24401
          break;
24402
        }
24403
        _Fields fieldId = _Fields.findByThriftId(field.id);
24404
        if (fieldId == null) {
24405
          TProtocolUtil.skip(iprot, field.type);
24406
        } else {
24407
          switch (fieldId) {
553 chandransh 24408
            case CART_ID:
48 ashish 24409
              if (field.type == TType.I64) {
553 chandransh 24410
                this.cartId = iprot.readI64();
24411
                setCartIdIsSet(true);
48 ashish 24412
              } else { 
24413
                TProtocolUtil.skip(iprot, field.type);
24414
              }
24415
              break;
553 chandransh 24416
            case STATUS:
24417
              if (field.type == TType.I32) {
24418
                this.status = CartStatus.findByValue(iprot.readI32());
24419
              } else { 
24420
                TProtocolUtil.skip(iprot, field.type);
24421
              }
24422
              break;
48 ashish 24423
          }
24424
          iprot.readFieldEnd();
24425
        }
24426
      }
24427
      iprot.readStructEnd();
24428
      validate();
24429
    }
24430
 
24431
    public void write(TProtocol oprot) throws TException {
24432
      validate();
24433
 
24434
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24435
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24436
      oprot.writeI64(this.cartId);
48 ashish 24437
      oprot.writeFieldEnd();
553 chandransh 24438
      if (this.status != null) {
24439
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
24440
        oprot.writeI32(this.status.getValue());
24441
        oprot.writeFieldEnd();
24442
      }
48 ashish 24443
      oprot.writeFieldStop();
24444
      oprot.writeStructEnd();
24445
    }
24446
 
24447
    @Override
24448
    public String toString() {
553 chandransh 24449
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 24450
      boolean first = true;
24451
 
553 chandransh 24452
      sb.append("cartId:");
24453
      sb.append(this.cartId);
48 ashish 24454
      first = false;
553 chandransh 24455
      if (!first) sb.append(", ");
24456
      sb.append("status:");
24457
      if (this.status == null) {
24458
        sb.append("null");
24459
      } else {
24460
        String status_name = status.name();
24461
        if (status_name != null) {
24462
          sb.append(status_name);
24463
          sb.append(" (");
24464
        }
24465
        sb.append(this.status);
24466
        if (status_name != null) {
24467
          sb.append(")");
24468
        }
24469
      }
24470
      first = false;
48 ashish 24471
      sb.append(")");
24472
      return sb.toString();
24473
    }
24474
 
24475
    public void validate() throws TException {
24476
      // check for required fields
24477
    }
24478
 
24479
  }
24480
 
553 chandransh 24481
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
24482
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 24483
 
553 chandransh 24484
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 24485
 
553 chandransh 24486
    private ShoppingCartException scx;
48 ashish 24487
 
24488
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24489
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24490
      SCX((short)1, "scx");
48 ashish 24491
 
24492
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24493
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24494
 
24495
      static {
24496
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24497
          byId.put((int)field._thriftId, field);
24498
          byName.put(field.getFieldName(), field);
24499
        }
24500
      }
24501
 
24502
      /**
24503
       * Find the _Fields constant that matches fieldId, or null if its not found.
24504
       */
24505
      public static _Fields findByThriftId(int fieldId) {
24506
        return byId.get(fieldId);
24507
      }
24508
 
24509
      /**
24510
       * Find the _Fields constant that matches fieldId, throwing an exception
24511
       * if it is not found.
24512
       */
24513
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24514
        _Fields fields = findByThriftId(fieldId);
24515
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24516
        return fields;
24517
      }
24518
 
24519
      /**
24520
       * Find the _Fields constant that matches name, or null if its not found.
24521
       */
24522
      public static _Fields findByName(String name) {
24523
        return byName.get(name);
24524
      }
24525
 
24526
      private final short _thriftId;
24527
      private final String _fieldName;
24528
 
24529
      _Fields(short thriftId, String fieldName) {
24530
        _thriftId = thriftId;
24531
        _fieldName = fieldName;
24532
      }
24533
 
24534
      public short getThriftFieldId() {
24535
        return _thriftId;
24536
      }
24537
 
24538
      public String getFieldName() {
24539
        return _fieldName;
24540
      }
24541
    }
24542
 
24543
    // isset id assignments
24544
 
24545
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24546
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 24547
          new FieldValueMetaData(TType.STRUCT)));
24548
    }});
24549
 
24550
    static {
553 chandransh 24551
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 24552
    }
24553
 
553 chandransh 24554
    public changeCartStatus_result() {
48 ashish 24555
    }
24556
 
553 chandransh 24557
    public changeCartStatus_result(
24558
      ShoppingCartException scx)
48 ashish 24559
    {
24560
      this();
553 chandransh 24561
      this.scx = scx;
48 ashish 24562
    }
24563
 
24564
    /**
24565
     * Performs a deep copy on <i>other</i>.
24566
     */
553 chandransh 24567
    public changeCartStatus_result(changeCartStatus_result other) {
24568
      if (other.isSetScx()) {
24569
        this.scx = new ShoppingCartException(other.scx);
24570
      }
24571
    }
24572
 
24573
    public changeCartStatus_result deepCopy() {
24574
      return new changeCartStatus_result(this);
24575
    }
24576
 
24577
    @Deprecated
24578
    public changeCartStatus_result clone() {
24579
      return new changeCartStatus_result(this);
24580
    }
24581
 
24582
    public ShoppingCartException getScx() {
24583
      return this.scx;
24584
    }
24585
 
24586
    public changeCartStatus_result setScx(ShoppingCartException scx) {
24587
      this.scx = scx;
24588
      return this;
24589
    }
24590
 
24591
    public void unsetScx() {
24592
      this.scx = null;
24593
    }
24594
 
24595
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24596
    public boolean isSetScx() {
24597
      return this.scx != null;
24598
    }
24599
 
24600
    public void setScxIsSet(boolean value) {
24601
      if (!value) {
24602
        this.scx = null;
24603
      }
24604
    }
24605
 
24606
    public void setFieldValue(_Fields field, Object value) {
24607
      switch (field) {
24608
      case SCX:
24609
        if (value == null) {
24610
          unsetScx();
24611
        } else {
24612
          setScx((ShoppingCartException)value);
24613
        }
24614
        break;
24615
 
24616
      }
24617
    }
24618
 
24619
    public void setFieldValue(int fieldID, Object value) {
24620
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24621
    }
24622
 
24623
    public Object getFieldValue(_Fields field) {
24624
      switch (field) {
24625
      case SCX:
24626
        return getScx();
24627
 
24628
      }
24629
      throw new IllegalStateException();
24630
    }
24631
 
24632
    public Object getFieldValue(int fieldId) {
24633
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24634
    }
24635
 
24636
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24637
    public boolean isSet(_Fields field) {
24638
      switch (field) {
24639
      case SCX:
24640
        return isSetScx();
24641
      }
24642
      throw new IllegalStateException();
24643
    }
24644
 
24645
    public boolean isSet(int fieldID) {
24646
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24647
    }
24648
 
24649
    @Override
24650
    public boolean equals(Object that) {
24651
      if (that == null)
24652
        return false;
24653
      if (that instanceof changeCartStatus_result)
24654
        return this.equals((changeCartStatus_result)that);
24655
      return false;
24656
    }
24657
 
24658
    public boolean equals(changeCartStatus_result that) {
24659
      if (that == null)
24660
        return false;
24661
 
24662
      boolean this_present_scx = true && this.isSetScx();
24663
      boolean that_present_scx = true && that.isSetScx();
24664
      if (this_present_scx || that_present_scx) {
24665
        if (!(this_present_scx && that_present_scx))
24666
          return false;
24667
        if (!this.scx.equals(that.scx))
24668
          return false;
24669
      }
24670
 
24671
      return true;
24672
    }
24673
 
24674
    @Override
24675
    public int hashCode() {
24676
      return 0;
24677
    }
24678
 
24679
    public int compareTo(changeCartStatus_result other) {
24680
      if (!getClass().equals(other.getClass())) {
24681
        return getClass().getName().compareTo(other.getClass().getName());
24682
      }
24683
 
24684
      int lastComparison = 0;
24685
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
24686
 
24687
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24688
      if (lastComparison != 0) {
24689
        return lastComparison;
24690
      }
24691
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24692
      if (lastComparison != 0) {
24693
        return lastComparison;
24694
      }
24695
      return 0;
24696
    }
24697
 
24698
    public void read(TProtocol iprot) throws TException {
24699
      TField field;
24700
      iprot.readStructBegin();
24701
      while (true)
24702
      {
24703
        field = iprot.readFieldBegin();
24704
        if (field.type == TType.STOP) { 
24705
          break;
24706
        }
24707
        _Fields fieldId = _Fields.findByThriftId(field.id);
24708
        if (fieldId == null) {
24709
          TProtocolUtil.skip(iprot, field.type);
24710
        } else {
24711
          switch (fieldId) {
24712
            case SCX:
24713
              if (field.type == TType.STRUCT) {
24714
                this.scx = new ShoppingCartException();
24715
                this.scx.read(iprot);
24716
              } else { 
24717
                TProtocolUtil.skip(iprot, field.type);
24718
              }
24719
              break;
24720
          }
24721
          iprot.readFieldEnd();
24722
        }
24723
      }
24724
      iprot.readStructEnd();
24725
      validate();
24726
    }
24727
 
24728
    public void write(TProtocol oprot) throws TException {
24729
      oprot.writeStructBegin(STRUCT_DESC);
24730
 
24731
      if (this.isSetScx()) {
24732
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24733
        this.scx.write(oprot);
24734
        oprot.writeFieldEnd();
24735
      }
24736
      oprot.writeFieldStop();
24737
      oprot.writeStructEnd();
24738
    }
24739
 
24740
    @Override
24741
    public String toString() {
24742
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
24743
      boolean first = true;
24744
 
24745
      sb.append("scx:");
24746
      if (this.scx == null) {
24747
        sb.append("null");
24748
      } else {
24749
        sb.append(this.scx);
24750
      }
24751
      first = false;
24752
      sb.append(")");
24753
      return sb.toString();
24754
    }
24755
 
24756
    public void validate() throws TException {
24757
      // check for required fields
24758
    }
24759
 
24760
  }
24761
 
24762
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
24763
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
24764
 
24765
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24766
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
24767
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
24768
 
24769
    private long cartId;
24770
    private long itemId;
24771
    private long quantity;
24772
 
24773
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24774
    public enum _Fields implements TFieldIdEnum {
24775
      CART_ID((short)1, "cartId"),
24776
      ITEM_ID((short)2, "itemId"),
24777
      QUANTITY((short)3, "quantity");
24778
 
24779
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24780
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24781
 
24782
      static {
24783
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24784
          byId.put((int)field._thriftId, field);
24785
          byName.put(field.getFieldName(), field);
24786
        }
24787
      }
24788
 
24789
      /**
24790
       * Find the _Fields constant that matches fieldId, or null if its not found.
24791
       */
24792
      public static _Fields findByThriftId(int fieldId) {
24793
        return byId.get(fieldId);
24794
      }
24795
 
24796
      /**
24797
       * Find the _Fields constant that matches fieldId, throwing an exception
24798
       * if it is not found.
24799
       */
24800
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24801
        _Fields fields = findByThriftId(fieldId);
24802
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24803
        return fields;
24804
      }
24805
 
24806
      /**
24807
       * Find the _Fields constant that matches name, or null if its not found.
24808
       */
24809
      public static _Fields findByName(String name) {
24810
        return byName.get(name);
24811
      }
24812
 
24813
      private final short _thriftId;
24814
      private final String _fieldName;
24815
 
24816
      _Fields(short thriftId, String fieldName) {
24817
        _thriftId = thriftId;
24818
        _fieldName = fieldName;
24819
      }
24820
 
24821
      public short getThriftFieldId() {
24822
        return _thriftId;
24823
      }
24824
 
24825
      public String getFieldName() {
24826
        return _fieldName;
24827
      }
24828
    }
24829
 
24830
    // isset id assignments
24831
    private static final int __CARTID_ISSET_ID = 0;
24832
    private static final int __ITEMID_ISSET_ID = 1;
24833
    private static final int __QUANTITY_ISSET_ID = 2;
24834
    private BitSet __isset_bit_vector = new BitSet(3);
24835
 
24836
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24837
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
24838
          new FieldValueMetaData(TType.I64)));
24839
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
24840
          new FieldValueMetaData(TType.I64)));
24841
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
24842
          new FieldValueMetaData(TType.I64)));
24843
    }});
24844
 
24845
    static {
24846
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
24847
    }
24848
 
24849
    public addItemToCart_args() {
24850
    }
24851
 
24852
    public addItemToCart_args(
24853
      long cartId,
24854
      long itemId,
24855
      long quantity)
24856
    {
24857
      this();
24858
      this.cartId = cartId;
24859
      setCartIdIsSet(true);
24860
      this.itemId = itemId;
24861
      setItemIdIsSet(true);
24862
      this.quantity = quantity;
24863
      setQuantityIsSet(true);
24864
    }
24865
 
24866
    /**
24867
     * Performs a deep copy on <i>other</i>.
24868
     */
24869
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 24870
      __isset_bit_vector.clear();
24871
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24872
      this.cartId = other.cartId;
24873
      this.itemId = other.itemId;
24874
      this.quantity = other.quantity;
48 ashish 24875
    }
24876
 
553 chandransh 24877
    public addItemToCart_args deepCopy() {
24878
      return new addItemToCart_args(this);
48 ashish 24879
    }
24880
 
24881
    @Deprecated
553 chandransh 24882
    public addItemToCart_args clone() {
24883
      return new addItemToCart_args(this);
48 ashish 24884
    }
24885
 
553 chandransh 24886
    public long getCartId() {
24887
      return this.cartId;
48 ashish 24888
    }
24889
 
553 chandransh 24890
    public addItemToCart_args setCartId(long cartId) {
24891
      this.cartId = cartId;
24892
      setCartIdIsSet(true);
48 ashish 24893
      return this;
24894
    }
24895
 
553 chandransh 24896
    public void unsetCartId() {
24897
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24898
    }
24899
 
553 chandransh 24900
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24901
    public boolean isSetCartId() {
24902
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24903
    }
24904
 
553 chandransh 24905
    public void setCartIdIsSet(boolean value) {
24906
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24907
    }
24908
 
553 chandransh 24909
    public long getItemId() {
24910
      return this.itemId;
48 ashish 24911
    }
24912
 
553 chandransh 24913
    public addItemToCart_args setItemId(long itemId) {
24914
      this.itemId = itemId;
24915
      setItemIdIsSet(true);
48 ashish 24916
      return this;
24917
    }
24918
 
553 chandransh 24919
    public void unsetItemId() {
24920
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 24921
    }
24922
 
553 chandransh 24923
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
24924
    public boolean isSetItemId() {
24925
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 24926
    }
24927
 
553 chandransh 24928
    public void setItemIdIsSet(boolean value) {
24929
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
24930
    }
24931
 
24932
    public long getQuantity() {
24933
      return this.quantity;
24934
    }
24935
 
24936
    public addItemToCart_args setQuantity(long quantity) {
24937
      this.quantity = quantity;
24938
      setQuantityIsSet(true);
24939
      return this;
24940
    }
24941
 
24942
    public void unsetQuantity() {
24943
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
24944
    }
24945
 
24946
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
24947
    public boolean isSetQuantity() {
24948
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
24949
    }
24950
 
24951
    public void setQuantityIsSet(boolean value) {
24952
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
24953
    }
24954
 
24955
    public void setFieldValue(_Fields field, Object value) {
24956
      switch (field) {
24957
      case CART_ID:
24958
        if (value == null) {
24959
          unsetCartId();
24960
        } else {
24961
          setCartId((Long)value);
24962
        }
24963
        break;
24964
 
24965
      case ITEM_ID:
24966
        if (value == null) {
24967
          unsetItemId();
24968
        } else {
24969
          setItemId((Long)value);
24970
        }
24971
        break;
24972
 
24973
      case QUANTITY:
24974
        if (value == null) {
24975
          unsetQuantity();
24976
        } else {
24977
          setQuantity((Long)value);
24978
        }
24979
        break;
24980
 
24981
      }
24982
    }
24983
 
24984
    public void setFieldValue(int fieldID, Object value) {
24985
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24986
    }
24987
 
24988
    public Object getFieldValue(_Fields field) {
24989
      switch (field) {
24990
      case CART_ID:
24991
        return new Long(getCartId());
24992
 
24993
      case ITEM_ID:
24994
        return new Long(getItemId());
24995
 
24996
      case QUANTITY:
24997
        return new Long(getQuantity());
24998
 
24999
      }
25000
      throw new IllegalStateException();
25001
    }
25002
 
25003
    public Object getFieldValue(int fieldId) {
25004
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25005
    }
25006
 
25007
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25008
    public boolean isSet(_Fields field) {
25009
      switch (field) {
25010
      case CART_ID:
25011
        return isSetCartId();
25012
      case ITEM_ID:
25013
        return isSetItemId();
25014
      case QUANTITY:
25015
        return isSetQuantity();
25016
      }
25017
      throw new IllegalStateException();
25018
    }
25019
 
25020
    public boolean isSet(int fieldID) {
25021
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25022
    }
25023
 
25024
    @Override
25025
    public boolean equals(Object that) {
25026
      if (that == null)
25027
        return false;
25028
      if (that instanceof addItemToCart_args)
25029
        return this.equals((addItemToCart_args)that);
25030
      return false;
25031
    }
25032
 
25033
    public boolean equals(addItemToCart_args that) {
25034
      if (that == null)
25035
        return false;
25036
 
25037
      boolean this_present_cartId = true;
25038
      boolean that_present_cartId = true;
25039
      if (this_present_cartId || that_present_cartId) {
25040
        if (!(this_present_cartId && that_present_cartId))
25041
          return false;
25042
        if (this.cartId != that.cartId)
25043
          return false;
25044
      }
25045
 
25046
      boolean this_present_itemId = true;
25047
      boolean that_present_itemId = true;
25048
      if (this_present_itemId || that_present_itemId) {
25049
        if (!(this_present_itemId && that_present_itemId))
25050
          return false;
25051
        if (this.itemId != that.itemId)
25052
          return false;
25053
      }
25054
 
25055
      boolean this_present_quantity = true;
25056
      boolean that_present_quantity = true;
25057
      if (this_present_quantity || that_present_quantity) {
25058
        if (!(this_present_quantity && that_present_quantity))
25059
          return false;
25060
        if (this.quantity != that.quantity)
25061
          return false;
25062
      }
25063
 
25064
      return true;
25065
    }
25066
 
25067
    @Override
25068
    public int hashCode() {
25069
      return 0;
25070
    }
25071
 
25072
    public int compareTo(addItemToCart_args other) {
25073
      if (!getClass().equals(other.getClass())) {
25074
        return getClass().getName().compareTo(other.getClass().getName());
25075
      }
25076
 
25077
      int lastComparison = 0;
25078
      addItemToCart_args typedOther = (addItemToCart_args)other;
25079
 
25080
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
25081
      if (lastComparison != 0) {
25082
        return lastComparison;
25083
      }
25084
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
25085
      if (lastComparison != 0) {
25086
        return lastComparison;
25087
      }
25088
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
25089
      if (lastComparison != 0) {
25090
        return lastComparison;
25091
      }
25092
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
25093
      if (lastComparison != 0) {
25094
        return lastComparison;
25095
      }
25096
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
25097
      if (lastComparison != 0) {
25098
        return lastComparison;
25099
      }
25100
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
25101
      if (lastComparison != 0) {
25102
        return lastComparison;
25103
      }
25104
      return 0;
25105
    }
25106
 
25107
    public void read(TProtocol iprot) throws TException {
25108
      TField field;
25109
      iprot.readStructBegin();
25110
      while (true)
25111
      {
25112
        field = iprot.readFieldBegin();
25113
        if (field.type == TType.STOP) { 
25114
          break;
25115
        }
25116
        _Fields fieldId = _Fields.findByThriftId(field.id);
25117
        if (fieldId == null) {
25118
          TProtocolUtil.skip(iprot, field.type);
25119
        } else {
25120
          switch (fieldId) {
25121
            case CART_ID:
25122
              if (field.type == TType.I64) {
25123
                this.cartId = iprot.readI64();
25124
                setCartIdIsSet(true);
25125
              } else { 
25126
                TProtocolUtil.skip(iprot, field.type);
25127
              }
25128
              break;
25129
            case ITEM_ID:
25130
              if (field.type == TType.I64) {
25131
                this.itemId = iprot.readI64();
25132
                setItemIdIsSet(true);
25133
              } else { 
25134
                TProtocolUtil.skip(iprot, field.type);
25135
              }
25136
              break;
25137
            case QUANTITY:
25138
              if (field.type == TType.I64) {
25139
                this.quantity = iprot.readI64();
25140
                setQuantityIsSet(true);
25141
              } else { 
25142
                TProtocolUtil.skip(iprot, field.type);
25143
              }
25144
              break;
25145
          }
25146
          iprot.readFieldEnd();
25147
        }
25148
      }
25149
      iprot.readStructEnd();
25150
      validate();
25151
    }
25152
 
25153
    public void write(TProtocol oprot) throws TException {
25154
      validate();
25155
 
25156
      oprot.writeStructBegin(STRUCT_DESC);
25157
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25158
      oprot.writeI64(this.cartId);
25159
      oprot.writeFieldEnd();
25160
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
25161
      oprot.writeI64(this.itemId);
25162
      oprot.writeFieldEnd();
25163
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
25164
      oprot.writeI64(this.quantity);
25165
      oprot.writeFieldEnd();
25166
      oprot.writeFieldStop();
25167
      oprot.writeStructEnd();
25168
    }
25169
 
25170
    @Override
25171
    public String toString() {
25172
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
25173
      boolean first = true;
25174
 
25175
      sb.append("cartId:");
25176
      sb.append(this.cartId);
25177
      first = false;
25178
      if (!first) sb.append(", ");
25179
      sb.append("itemId:");
25180
      sb.append(this.itemId);
25181
      first = false;
25182
      if (!first) sb.append(", ");
25183
      sb.append("quantity:");
25184
      sb.append(this.quantity);
25185
      first = false;
25186
      sb.append(")");
25187
      return sb.toString();
25188
    }
25189
 
25190
    public void validate() throws TException {
25191
      // check for required fields
25192
    }
25193
 
25194
  }
25195
 
25196
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
25197
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
25198
 
25199
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
25200
 
25201
    private ShoppingCartException scx;
25202
 
25203
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25204
    public enum _Fields implements TFieldIdEnum {
25205
      SCX((short)1, "scx");
25206
 
25207
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25208
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25209
 
25210
      static {
25211
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25212
          byId.put((int)field._thriftId, field);
25213
          byName.put(field.getFieldName(), field);
25214
        }
25215
      }
25216
 
25217
      /**
25218
       * Find the _Fields constant that matches fieldId, or null if its not found.
25219
       */
25220
      public static _Fields findByThriftId(int fieldId) {
25221
        return byId.get(fieldId);
25222
      }
25223
 
25224
      /**
25225
       * Find the _Fields constant that matches fieldId, throwing an exception
25226
       * if it is not found.
25227
       */
25228
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25229
        _Fields fields = findByThriftId(fieldId);
25230
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25231
        return fields;
25232
      }
25233
 
25234
      /**
25235
       * Find the _Fields constant that matches name, or null if its not found.
25236
       */
25237
      public static _Fields findByName(String name) {
25238
        return byName.get(name);
25239
      }
25240
 
25241
      private final short _thriftId;
25242
      private final String _fieldName;
25243
 
25244
      _Fields(short thriftId, String fieldName) {
25245
        _thriftId = thriftId;
25246
        _fieldName = fieldName;
25247
      }
25248
 
25249
      public short getThriftFieldId() {
25250
        return _thriftId;
25251
      }
25252
 
25253
      public String getFieldName() {
25254
        return _fieldName;
25255
      }
25256
    }
25257
 
25258
    // isset id assignments
25259
 
25260
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25261
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25262
          new FieldValueMetaData(TType.STRUCT)));
25263
    }});
25264
 
25265
    static {
25266
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
25267
    }
25268
 
25269
    public addItemToCart_result() {
25270
    }
25271
 
25272
    public addItemToCart_result(
25273
      ShoppingCartException scx)
25274
    {
25275
      this();
25276
      this.scx = scx;
25277
    }
25278
 
25279
    /**
25280
     * Performs a deep copy on <i>other</i>.
25281
     */
25282
    public addItemToCart_result(addItemToCart_result other) {
25283
      if (other.isSetScx()) {
25284
        this.scx = new ShoppingCartException(other.scx);
25285
      }
25286
    }
25287
 
25288
    public addItemToCart_result deepCopy() {
25289
      return new addItemToCart_result(this);
25290
    }
25291
 
25292
    @Deprecated
25293
    public addItemToCart_result clone() {
25294
      return new addItemToCart_result(this);
25295
    }
25296
 
25297
    public ShoppingCartException getScx() {
25298
      return this.scx;
25299
    }
25300
 
25301
    public addItemToCart_result setScx(ShoppingCartException scx) {
25302
      this.scx = scx;
25303
      return this;
25304
    }
25305
 
25306
    public void unsetScx() {
25307
      this.scx = null;
25308
    }
25309
 
25310
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25311
    public boolean isSetScx() {
25312
      return this.scx != null;
25313
    }
25314
 
25315
    public void setScxIsSet(boolean value) {
48 ashish 25316
      if (!value) {
553 chandransh 25317
        this.scx = null;
48 ashish 25318
      }
25319
    }
25320
 
25321
    public void setFieldValue(_Fields field, Object value) {
25322
      switch (field) {
553 chandransh 25323
      case SCX:
48 ashish 25324
        if (value == null) {
553 chandransh 25325
          unsetScx();
48 ashish 25326
        } else {
553 chandransh 25327
          setScx((ShoppingCartException)value);
48 ashish 25328
        }
25329
        break;
25330
 
553 chandransh 25331
      }
25332
    }
25333
 
25334
    public void setFieldValue(int fieldID, Object value) {
25335
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25336
    }
25337
 
25338
    public Object getFieldValue(_Fields field) {
25339
      switch (field) {
25340
      case SCX:
25341
        return getScx();
25342
 
25343
      }
25344
      throw new IllegalStateException();
25345
    }
25346
 
25347
    public Object getFieldValue(int fieldId) {
25348
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25349
    }
25350
 
25351
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25352
    public boolean isSet(_Fields field) {
25353
      switch (field) {
25354
      case SCX:
25355
        return isSetScx();
25356
      }
25357
      throw new IllegalStateException();
25358
    }
25359
 
25360
    public boolean isSet(int fieldID) {
25361
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25362
    }
25363
 
25364
    @Override
25365
    public boolean equals(Object that) {
25366
      if (that == null)
25367
        return false;
25368
      if (that instanceof addItemToCart_result)
25369
        return this.equals((addItemToCart_result)that);
25370
      return false;
25371
    }
25372
 
25373
    public boolean equals(addItemToCart_result that) {
25374
      if (that == null)
25375
        return false;
25376
 
25377
      boolean this_present_scx = true && this.isSetScx();
25378
      boolean that_present_scx = true && that.isSetScx();
25379
      if (this_present_scx || that_present_scx) {
25380
        if (!(this_present_scx && that_present_scx))
25381
          return false;
25382
        if (!this.scx.equals(that.scx))
25383
          return false;
25384
      }
25385
 
25386
      return true;
25387
    }
25388
 
25389
    @Override
25390
    public int hashCode() {
25391
      return 0;
25392
    }
25393
 
25394
    public int compareTo(addItemToCart_result other) {
25395
      if (!getClass().equals(other.getClass())) {
25396
        return getClass().getName().compareTo(other.getClass().getName());
25397
      }
25398
 
25399
      int lastComparison = 0;
25400
      addItemToCart_result typedOther = (addItemToCart_result)other;
25401
 
25402
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
25403
      if (lastComparison != 0) {
25404
        return lastComparison;
25405
      }
25406
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
25407
      if (lastComparison != 0) {
25408
        return lastComparison;
25409
      }
25410
      return 0;
25411
    }
25412
 
25413
    public void read(TProtocol iprot) throws TException {
25414
      TField field;
25415
      iprot.readStructBegin();
25416
      while (true)
25417
      {
25418
        field = iprot.readFieldBegin();
25419
        if (field.type == TType.STOP) { 
25420
          break;
25421
        }
25422
        _Fields fieldId = _Fields.findByThriftId(field.id);
25423
        if (fieldId == null) {
25424
          TProtocolUtil.skip(iprot, field.type);
25425
        } else {
25426
          switch (fieldId) {
25427
            case SCX:
25428
              if (field.type == TType.STRUCT) {
25429
                this.scx = new ShoppingCartException();
25430
                this.scx.read(iprot);
25431
              } else { 
25432
                TProtocolUtil.skip(iprot, field.type);
25433
              }
25434
              break;
25435
          }
25436
          iprot.readFieldEnd();
25437
        }
25438
      }
25439
      iprot.readStructEnd();
25440
      validate();
25441
    }
25442
 
25443
    public void write(TProtocol oprot) throws TException {
25444
      oprot.writeStructBegin(STRUCT_DESC);
25445
 
25446
      if (this.isSetScx()) {
25447
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25448
        this.scx.write(oprot);
25449
        oprot.writeFieldEnd();
25450
      }
25451
      oprot.writeFieldStop();
25452
      oprot.writeStructEnd();
25453
    }
25454
 
25455
    @Override
25456
    public String toString() {
25457
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
25458
      boolean first = true;
25459
 
25460
      sb.append("scx:");
25461
      if (this.scx == null) {
25462
        sb.append("null");
25463
      } else {
25464
        sb.append(this.scx);
25465
      }
25466
      first = false;
25467
      sb.append(")");
25468
      return sb.toString();
25469
    }
25470
 
25471
    public void validate() throws TException {
25472
      // check for required fields
25473
    }
25474
 
25475
  }
25476
 
25477
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
25478
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
25479
 
25480
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25481
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
25482
 
25483
    private long cartId;
25484
    private long itemId;
25485
 
25486
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25487
    public enum _Fields implements TFieldIdEnum {
25488
      CART_ID((short)1, "cartId"),
25489
      ITEM_ID((short)2, "itemId");
25490
 
25491
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25492
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25493
 
25494
      static {
25495
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25496
          byId.put((int)field._thriftId, field);
25497
          byName.put(field.getFieldName(), field);
25498
        }
25499
      }
25500
 
25501
      /**
25502
       * Find the _Fields constant that matches fieldId, or null if its not found.
25503
       */
25504
      public static _Fields findByThriftId(int fieldId) {
25505
        return byId.get(fieldId);
25506
      }
25507
 
25508
      /**
25509
       * Find the _Fields constant that matches fieldId, throwing an exception
25510
       * if it is not found.
25511
       */
25512
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25513
        _Fields fields = findByThriftId(fieldId);
25514
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25515
        return fields;
25516
      }
25517
 
25518
      /**
25519
       * Find the _Fields constant that matches name, or null if its not found.
25520
       */
25521
      public static _Fields findByName(String name) {
25522
        return byName.get(name);
25523
      }
25524
 
25525
      private final short _thriftId;
25526
      private final String _fieldName;
25527
 
25528
      _Fields(short thriftId, String fieldName) {
25529
        _thriftId = thriftId;
25530
        _fieldName = fieldName;
25531
      }
25532
 
25533
      public short getThriftFieldId() {
25534
        return _thriftId;
25535
      }
25536
 
25537
      public String getFieldName() {
25538
        return _fieldName;
25539
      }
25540
    }
25541
 
25542
    // isset id assignments
25543
    private static final int __CARTID_ISSET_ID = 0;
25544
    private static final int __ITEMID_ISSET_ID = 1;
25545
    private BitSet __isset_bit_vector = new BitSet(2);
25546
 
25547
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25548
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25549
          new FieldValueMetaData(TType.I64)));
25550
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
25551
          new FieldValueMetaData(TType.I64)));
25552
    }});
25553
 
25554
    static {
25555
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
25556
    }
25557
 
25558
    public deleteItemFromCart_args() {
25559
    }
25560
 
25561
    public deleteItemFromCart_args(
25562
      long cartId,
25563
      long itemId)
25564
    {
25565
      this();
25566
      this.cartId = cartId;
25567
      setCartIdIsSet(true);
25568
      this.itemId = itemId;
25569
      setItemIdIsSet(true);
25570
    }
25571
 
25572
    /**
25573
     * Performs a deep copy on <i>other</i>.
25574
     */
25575
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
25576
      __isset_bit_vector.clear();
25577
      __isset_bit_vector.or(other.__isset_bit_vector);
25578
      this.cartId = other.cartId;
25579
      this.itemId = other.itemId;
25580
    }
25581
 
25582
    public deleteItemFromCart_args deepCopy() {
25583
      return new deleteItemFromCart_args(this);
25584
    }
25585
 
25586
    @Deprecated
25587
    public deleteItemFromCart_args clone() {
25588
      return new deleteItemFromCart_args(this);
25589
    }
25590
 
25591
    public long getCartId() {
25592
      return this.cartId;
25593
    }
25594
 
25595
    public deleteItemFromCart_args setCartId(long cartId) {
25596
      this.cartId = cartId;
25597
      setCartIdIsSet(true);
25598
      return this;
25599
    }
25600
 
25601
    public void unsetCartId() {
25602
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
25603
    }
25604
 
25605
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25606
    public boolean isSetCartId() {
25607
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
25608
    }
25609
 
25610
    public void setCartIdIsSet(boolean value) {
25611
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
25612
    }
25613
 
25614
    public long getItemId() {
25615
      return this.itemId;
25616
    }
25617
 
25618
    public deleteItemFromCart_args setItemId(long itemId) {
25619
      this.itemId = itemId;
25620
      setItemIdIsSet(true);
25621
      return this;
25622
    }
25623
 
25624
    public void unsetItemId() {
25625
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
25626
    }
25627
 
25628
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
25629
    public boolean isSetItemId() {
25630
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
25631
    }
25632
 
25633
    public void setItemIdIsSet(boolean value) {
25634
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
25635
    }
25636
 
25637
    public void setFieldValue(_Fields field, Object value) {
25638
      switch (field) {
25639
      case CART_ID:
48 ashish 25640
        if (value == null) {
553 chandransh 25641
          unsetCartId();
48 ashish 25642
        } else {
553 chandransh 25643
          setCartId((Long)value);
48 ashish 25644
        }
25645
        break;
25646
 
553 chandransh 25647
      case ITEM_ID:
25648
        if (value == null) {
25649
          unsetItemId();
25650
        } else {
25651
          setItemId((Long)value);
25652
        }
25653
        break;
25654
 
48 ashish 25655
      }
25656
    }
25657
 
25658
    public void setFieldValue(int fieldID, Object value) {
25659
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25660
    }
25661
 
25662
    public Object getFieldValue(_Fields field) {
25663
      switch (field) {
553 chandransh 25664
      case CART_ID:
25665
        return new Long(getCartId());
48 ashish 25666
 
553 chandransh 25667
      case ITEM_ID:
25668
        return new Long(getItemId());
48 ashish 25669
 
25670
      }
25671
      throw new IllegalStateException();
25672
    }
25673
 
25674
    public Object getFieldValue(int fieldId) {
25675
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25676
    }
25677
 
25678
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25679
    public boolean isSet(_Fields field) {
25680
      switch (field) {
553 chandransh 25681
      case CART_ID:
25682
        return isSetCartId();
25683
      case ITEM_ID:
25684
        return isSetItemId();
48 ashish 25685
      }
25686
      throw new IllegalStateException();
25687
    }
25688
 
25689
    public boolean isSet(int fieldID) {
25690
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25691
    }
25692
 
25693
    @Override
25694
    public boolean equals(Object that) {
25695
      if (that == null)
25696
        return false;
553 chandransh 25697
      if (that instanceof deleteItemFromCart_args)
25698
        return this.equals((deleteItemFromCart_args)that);
48 ashish 25699
      return false;
25700
    }
25701
 
553 chandransh 25702
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 25703
      if (that == null)
25704
        return false;
25705
 
553 chandransh 25706
      boolean this_present_cartId = true;
25707
      boolean that_present_cartId = true;
25708
      if (this_present_cartId || that_present_cartId) {
25709
        if (!(this_present_cartId && that_present_cartId))
48 ashish 25710
          return false;
553 chandransh 25711
        if (this.cartId != that.cartId)
48 ashish 25712
          return false;
25713
      }
25714
 
553 chandransh 25715
      boolean this_present_itemId = true;
25716
      boolean that_present_itemId = true;
25717
      if (this_present_itemId || that_present_itemId) {
25718
        if (!(this_present_itemId && that_present_itemId))
48 ashish 25719
          return false;
553 chandransh 25720
        if (this.itemId != that.itemId)
48 ashish 25721
          return false;
25722
      }
25723
 
25724
      return true;
25725
    }
25726
 
25727
    @Override
25728
    public int hashCode() {
25729
      return 0;
25730
    }
25731
 
553 chandransh 25732
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 25733
      if (!getClass().equals(other.getClass())) {
25734
        return getClass().getName().compareTo(other.getClass().getName());
25735
      }
25736
 
25737
      int lastComparison = 0;
553 chandransh 25738
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 25739
 
553 chandransh 25740
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 25741
      if (lastComparison != 0) {
25742
        return lastComparison;
25743
      }
553 chandransh 25744
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 25745
      if (lastComparison != 0) {
25746
        return lastComparison;
25747
      }
553 chandransh 25748
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 25749
      if (lastComparison != 0) {
25750
        return lastComparison;
25751
      }
553 chandransh 25752
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 25753
      if (lastComparison != 0) {
25754
        return lastComparison;
25755
      }
25756
      return 0;
25757
    }
25758
 
25759
    public void read(TProtocol iprot) throws TException {
25760
      TField field;
25761
      iprot.readStructBegin();
25762
      while (true)
25763
      {
25764
        field = iprot.readFieldBegin();
25765
        if (field.type == TType.STOP) { 
25766
          break;
25767
        }
25768
        _Fields fieldId = _Fields.findByThriftId(field.id);
25769
        if (fieldId == null) {
25770
          TProtocolUtil.skip(iprot, field.type);
25771
        } else {
25772
          switch (fieldId) {
553 chandransh 25773
            case CART_ID:
25774
              if (field.type == TType.I64) {
25775
                this.cartId = iprot.readI64();
25776
                setCartIdIsSet(true);
48 ashish 25777
              } else { 
25778
                TProtocolUtil.skip(iprot, field.type);
25779
              }
25780
              break;
553 chandransh 25781
            case ITEM_ID:
25782
              if (field.type == TType.I64) {
25783
                this.itemId = iprot.readI64();
25784
                setItemIdIsSet(true);
25785
              } else { 
25786
                TProtocolUtil.skip(iprot, field.type);
25787
              }
25788
              break;
25789
          }
25790
          iprot.readFieldEnd();
25791
        }
25792
      }
25793
      iprot.readStructEnd();
25794
      validate();
25795
    }
25796
 
25797
    public void write(TProtocol oprot) throws TException {
25798
      validate();
25799
 
25800
      oprot.writeStructBegin(STRUCT_DESC);
25801
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25802
      oprot.writeI64(this.cartId);
25803
      oprot.writeFieldEnd();
25804
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
25805
      oprot.writeI64(this.itemId);
25806
      oprot.writeFieldEnd();
25807
      oprot.writeFieldStop();
25808
      oprot.writeStructEnd();
25809
    }
25810
 
25811
    @Override
25812
    public String toString() {
25813
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
25814
      boolean first = true;
25815
 
25816
      sb.append("cartId:");
25817
      sb.append(this.cartId);
25818
      first = false;
25819
      if (!first) sb.append(", ");
25820
      sb.append("itemId:");
25821
      sb.append(this.itemId);
25822
      first = false;
25823
      sb.append(")");
25824
      return sb.toString();
25825
    }
25826
 
25827
    public void validate() throws TException {
25828
      // check for required fields
25829
    }
25830
 
25831
  }
25832
 
25833
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
25834
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
25835
 
25836
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
25837
 
25838
    private ShoppingCartException scx;
25839
 
25840
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25841
    public enum _Fields implements TFieldIdEnum {
25842
      SCX((short)1, "scx");
25843
 
25844
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25845
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25846
 
25847
      static {
25848
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25849
          byId.put((int)field._thriftId, field);
25850
          byName.put(field.getFieldName(), field);
25851
        }
25852
      }
25853
 
25854
      /**
25855
       * Find the _Fields constant that matches fieldId, or null if its not found.
25856
       */
25857
      public static _Fields findByThriftId(int fieldId) {
25858
        return byId.get(fieldId);
25859
      }
25860
 
25861
      /**
25862
       * Find the _Fields constant that matches fieldId, throwing an exception
25863
       * if it is not found.
25864
       */
25865
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25866
        _Fields fields = findByThriftId(fieldId);
25867
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25868
        return fields;
25869
      }
25870
 
25871
      /**
25872
       * Find the _Fields constant that matches name, or null if its not found.
25873
       */
25874
      public static _Fields findByName(String name) {
25875
        return byName.get(name);
25876
      }
25877
 
25878
      private final short _thriftId;
25879
      private final String _fieldName;
25880
 
25881
      _Fields(short thriftId, String fieldName) {
25882
        _thriftId = thriftId;
25883
        _fieldName = fieldName;
25884
      }
25885
 
25886
      public short getThriftFieldId() {
25887
        return _thriftId;
25888
      }
25889
 
25890
      public String getFieldName() {
25891
        return _fieldName;
25892
      }
25893
    }
25894
 
25895
    // isset id assignments
25896
 
25897
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25898
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25899
          new FieldValueMetaData(TType.STRUCT)));
25900
    }});
25901
 
25902
    static {
25903
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
25904
    }
25905
 
25906
    public deleteItemFromCart_result() {
25907
    }
25908
 
25909
    public deleteItemFromCart_result(
25910
      ShoppingCartException scx)
25911
    {
25912
      this();
25913
      this.scx = scx;
25914
    }
25915
 
25916
    /**
25917
     * Performs a deep copy on <i>other</i>.
25918
     */
25919
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
25920
      if (other.isSetScx()) {
25921
        this.scx = new ShoppingCartException(other.scx);
25922
      }
25923
    }
25924
 
25925
    public deleteItemFromCart_result deepCopy() {
25926
      return new deleteItemFromCart_result(this);
25927
    }
25928
 
25929
    @Deprecated
25930
    public deleteItemFromCart_result clone() {
25931
      return new deleteItemFromCart_result(this);
25932
    }
25933
 
25934
    public ShoppingCartException getScx() {
25935
      return this.scx;
25936
    }
25937
 
25938
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
25939
      this.scx = scx;
25940
      return this;
25941
    }
25942
 
25943
    public void unsetScx() {
25944
      this.scx = null;
25945
    }
25946
 
25947
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25948
    public boolean isSetScx() {
25949
      return this.scx != null;
25950
    }
25951
 
25952
    public void setScxIsSet(boolean value) {
25953
      if (!value) {
25954
        this.scx = null;
25955
      }
25956
    }
25957
 
25958
    public void setFieldValue(_Fields field, Object value) {
25959
      switch (field) {
25960
      case SCX:
25961
        if (value == null) {
25962
          unsetScx();
25963
        } else {
25964
          setScx((ShoppingCartException)value);
25965
        }
25966
        break;
25967
 
25968
      }
25969
    }
25970
 
25971
    public void setFieldValue(int fieldID, Object value) {
25972
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25973
    }
25974
 
25975
    public Object getFieldValue(_Fields field) {
25976
      switch (field) {
25977
      case SCX:
25978
        return getScx();
25979
 
25980
      }
25981
      throw new IllegalStateException();
25982
    }
25983
 
25984
    public Object getFieldValue(int fieldId) {
25985
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25986
    }
25987
 
25988
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25989
    public boolean isSet(_Fields field) {
25990
      switch (field) {
25991
      case SCX:
25992
        return isSetScx();
25993
      }
25994
      throw new IllegalStateException();
25995
    }
25996
 
25997
    public boolean isSet(int fieldID) {
25998
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25999
    }
26000
 
26001
    @Override
26002
    public boolean equals(Object that) {
26003
      if (that == null)
26004
        return false;
26005
      if (that instanceof deleteItemFromCart_result)
26006
        return this.equals((deleteItemFromCart_result)that);
26007
      return false;
26008
    }
26009
 
26010
    public boolean equals(deleteItemFromCart_result that) {
26011
      if (that == null)
26012
        return false;
26013
 
26014
      boolean this_present_scx = true && this.isSetScx();
26015
      boolean that_present_scx = true && that.isSetScx();
26016
      if (this_present_scx || that_present_scx) {
26017
        if (!(this_present_scx && that_present_scx))
26018
          return false;
26019
        if (!this.scx.equals(that.scx))
26020
          return false;
26021
      }
26022
 
26023
      return true;
26024
    }
26025
 
26026
    @Override
26027
    public int hashCode() {
26028
      return 0;
26029
    }
26030
 
26031
    public int compareTo(deleteItemFromCart_result other) {
26032
      if (!getClass().equals(other.getClass())) {
26033
        return getClass().getName().compareTo(other.getClass().getName());
26034
      }
26035
 
26036
      int lastComparison = 0;
26037
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
26038
 
26039
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26040
      if (lastComparison != 0) {
26041
        return lastComparison;
26042
      }
26043
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26044
      if (lastComparison != 0) {
26045
        return lastComparison;
26046
      }
26047
      return 0;
26048
    }
26049
 
26050
    public void read(TProtocol iprot) throws TException {
26051
      TField field;
26052
      iprot.readStructBegin();
26053
      while (true)
26054
      {
26055
        field = iprot.readFieldBegin();
26056
        if (field.type == TType.STOP) { 
26057
          break;
26058
        }
26059
        _Fields fieldId = _Fields.findByThriftId(field.id);
26060
        if (fieldId == null) {
26061
          TProtocolUtil.skip(iprot, field.type);
26062
        } else {
26063
          switch (fieldId) {
26064
            case SCX:
48 ashish 26065
              if (field.type == TType.STRUCT) {
553 chandransh 26066
                this.scx = new ShoppingCartException();
26067
                this.scx.read(iprot);
48 ashish 26068
              } else { 
26069
                TProtocolUtil.skip(iprot, field.type);
26070
              }
26071
              break;
26072
          }
26073
          iprot.readFieldEnd();
26074
        }
26075
      }
26076
      iprot.readStructEnd();
26077
      validate();
26078
    }
26079
 
26080
    public void write(TProtocol oprot) throws TException {
26081
      oprot.writeStructBegin(STRUCT_DESC);
26082
 
553 chandransh 26083
      if (this.isSetScx()) {
26084
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26085
        this.scx.write(oprot);
48 ashish 26086
        oprot.writeFieldEnd();
26087
      }
26088
      oprot.writeFieldStop();
26089
      oprot.writeStructEnd();
26090
    }
26091
 
26092
    @Override
26093
    public String toString() {
553 chandransh 26094
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 26095
      boolean first = true;
26096
 
553 chandransh 26097
      sb.append("scx:");
26098
      if (this.scx == null) {
48 ashish 26099
        sb.append("null");
26100
      } else {
553 chandransh 26101
        sb.append(this.scx);
48 ashish 26102
      }
26103
      first = false;
26104
      sb.append(")");
26105
      return sb.toString();
26106
    }
26107
 
26108
    public void validate() throws TException {
26109
      // check for required fields
26110
    }
26111
 
26112
  }
26113
 
553 chandransh 26114
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
26115
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 26116
 
553 chandransh 26117
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
26118
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
26119
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 26120
 
553 chandransh 26121
    private long cartId;
26122
    private long itemId;
26123
    private long quantity;
48 ashish 26124
 
26125
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26126
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26127
      CART_ID((short)1, "cartId"),
26128
      ITEM_ID((short)2, "itemId"),
26129
      QUANTITY((short)3, "quantity");
48 ashish 26130
 
26131
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26132
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26133
 
26134
      static {
26135
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26136
          byId.put((int)field._thriftId, field);
26137
          byName.put(field.getFieldName(), field);
26138
        }
26139
      }
26140
 
26141
      /**
26142
       * Find the _Fields constant that matches fieldId, or null if its not found.
26143
       */
26144
      public static _Fields findByThriftId(int fieldId) {
26145
        return byId.get(fieldId);
26146
      }
26147
 
26148
      /**
26149
       * Find the _Fields constant that matches fieldId, throwing an exception
26150
       * if it is not found.
26151
       */
26152
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26153
        _Fields fields = findByThriftId(fieldId);
26154
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26155
        return fields;
26156
      }
26157
 
26158
      /**
26159
       * Find the _Fields constant that matches name, or null if its not found.
26160
       */
26161
      public static _Fields findByName(String name) {
26162
        return byName.get(name);
26163
      }
26164
 
26165
      private final short _thriftId;
26166
      private final String _fieldName;
26167
 
26168
      _Fields(short thriftId, String fieldName) {
26169
        _thriftId = thriftId;
26170
        _fieldName = fieldName;
26171
      }
26172
 
26173
      public short getThriftFieldId() {
26174
        return _thriftId;
26175
      }
26176
 
26177
      public String getFieldName() {
26178
        return _fieldName;
26179
      }
26180
    }
26181
 
26182
    // isset id assignments
553 chandransh 26183
    private static final int __CARTID_ISSET_ID = 0;
26184
    private static final int __ITEMID_ISSET_ID = 1;
26185
    private static final int __QUANTITY_ISSET_ID = 2;
26186
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 26187
 
26188
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26189
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 26190
          new FieldValueMetaData(TType.I64)));
553 chandransh 26191
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
26192
          new FieldValueMetaData(TType.I64)));
26193
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
26194
          new FieldValueMetaData(TType.I64)));
48 ashish 26195
    }});
26196
 
26197
    static {
553 chandransh 26198
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 26199
    }
26200
 
553 chandransh 26201
    public changeQuantity_args() {
48 ashish 26202
    }
26203
 
553 chandransh 26204
    public changeQuantity_args(
26205
      long cartId,
26206
      long itemId,
26207
      long quantity)
48 ashish 26208
    {
26209
      this();
553 chandransh 26210
      this.cartId = cartId;
26211
      setCartIdIsSet(true);
26212
      this.itemId = itemId;
26213
      setItemIdIsSet(true);
26214
      this.quantity = quantity;
26215
      setQuantityIsSet(true);
48 ashish 26216
    }
26217
 
26218
    /**
26219
     * Performs a deep copy on <i>other</i>.
26220
     */
553 chandransh 26221
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 26222
      __isset_bit_vector.clear();
26223
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 26224
      this.cartId = other.cartId;
26225
      this.itemId = other.itemId;
26226
      this.quantity = other.quantity;
48 ashish 26227
    }
26228
 
553 chandransh 26229
    public changeQuantity_args deepCopy() {
26230
      return new changeQuantity_args(this);
48 ashish 26231
    }
26232
 
26233
    @Deprecated
553 chandransh 26234
    public changeQuantity_args clone() {
26235
      return new changeQuantity_args(this);
48 ashish 26236
    }
26237
 
553 chandransh 26238
    public long getCartId() {
26239
      return this.cartId;
48 ashish 26240
    }
26241
 
553 chandransh 26242
    public changeQuantity_args setCartId(long cartId) {
26243
      this.cartId = cartId;
26244
      setCartIdIsSet(true);
48 ashish 26245
      return this;
26246
    }
26247
 
553 chandransh 26248
    public void unsetCartId() {
26249
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26250
    }
26251
 
553 chandransh 26252
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26253
    public boolean isSetCartId() {
26254
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26255
    }
26256
 
553 chandransh 26257
    public void setCartIdIsSet(boolean value) {
26258
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 26259
    }
26260
 
553 chandransh 26261
    public long getItemId() {
26262
      return this.itemId;
26263
    }
26264
 
26265
    public changeQuantity_args setItemId(long itemId) {
26266
      this.itemId = itemId;
26267
      setItemIdIsSet(true);
26268
      return this;
26269
    }
26270
 
26271
    public void unsetItemId() {
26272
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
26273
    }
26274
 
26275
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
26276
    public boolean isSetItemId() {
26277
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
26278
    }
26279
 
26280
    public void setItemIdIsSet(boolean value) {
26281
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
26282
    }
26283
 
26284
    public long getQuantity() {
26285
      return this.quantity;
26286
    }
26287
 
26288
    public changeQuantity_args setQuantity(long quantity) {
26289
      this.quantity = quantity;
26290
      setQuantityIsSet(true);
26291
      return this;
26292
    }
26293
 
26294
    public void unsetQuantity() {
26295
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
26296
    }
26297
 
26298
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
26299
    public boolean isSetQuantity() {
26300
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
26301
    }
26302
 
26303
    public void setQuantityIsSet(boolean value) {
26304
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
26305
    }
26306
 
48 ashish 26307
    public void setFieldValue(_Fields field, Object value) {
26308
      switch (field) {
553 chandransh 26309
      case CART_ID:
48 ashish 26310
        if (value == null) {
553 chandransh 26311
          unsetCartId();
48 ashish 26312
        } else {
553 chandransh 26313
          setCartId((Long)value);
48 ashish 26314
        }
26315
        break;
26316
 
553 chandransh 26317
      case ITEM_ID:
26318
        if (value == null) {
26319
          unsetItemId();
26320
        } else {
26321
          setItemId((Long)value);
26322
        }
26323
        break;
26324
 
26325
      case QUANTITY:
26326
        if (value == null) {
26327
          unsetQuantity();
26328
        } else {
26329
          setQuantity((Long)value);
26330
        }
26331
        break;
26332
 
48 ashish 26333
      }
26334
    }
26335
 
26336
    public void setFieldValue(int fieldID, Object value) {
26337
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26338
    }
26339
 
26340
    public Object getFieldValue(_Fields field) {
26341
      switch (field) {
553 chandransh 26342
      case CART_ID:
26343
        return new Long(getCartId());
48 ashish 26344
 
553 chandransh 26345
      case ITEM_ID:
26346
        return new Long(getItemId());
26347
 
26348
      case QUANTITY:
26349
        return new Long(getQuantity());
26350
 
48 ashish 26351
      }
26352
      throw new IllegalStateException();
26353
    }
26354
 
26355
    public Object getFieldValue(int fieldId) {
26356
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26357
    }
26358
 
26359
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26360
    public boolean isSet(_Fields field) {
26361
      switch (field) {
553 chandransh 26362
      case CART_ID:
26363
        return isSetCartId();
26364
      case ITEM_ID:
26365
        return isSetItemId();
26366
      case QUANTITY:
26367
        return isSetQuantity();
48 ashish 26368
      }
26369
      throw new IllegalStateException();
26370
    }
26371
 
26372
    public boolean isSet(int fieldID) {
26373
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26374
    }
26375
 
26376
    @Override
26377
    public boolean equals(Object that) {
26378
      if (that == null)
26379
        return false;
553 chandransh 26380
      if (that instanceof changeQuantity_args)
26381
        return this.equals((changeQuantity_args)that);
48 ashish 26382
      return false;
26383
    }
26384
 
553 chandransh 26385
    public boolean equals(changeQuantity_args that) {
48 ashish 26386
      if (that == null)
26387
        return false;
26388
 
553 chandransh 26389
      boolean this_present_cartId = true;
26390
      boolean that_present_cartId = true;
26391
      if (this_present_cartId || that_present_cartId) {
26392
        if (!(this_present_cartId && that_present_cartId))
48 ashish 26393
          return false;
553 chandransh 26394
        if (this.cartId != that.cartId)
48 ashish 26395
          return false;
26396
      }
26397
 
553 chandransh 26398
      boolean this_present_itemId = true;
26399
      boolean that_present_itemId = true;
26400
      if (this_present_itemId || that_present_itemId) {
26401
        if (!(this_present_itemId && that_present_itemId))
26402
          return false;
26403
        if (this.itemId != that.itemId)
26404
          return false;
26405
      }
26406
 
26407
      boolean this_present_quantity = true;
26408
      boolean that_present_quantity = true;
26409
      if (this_present_quantity || that_present_quantity) {
26410
        if (!(this_present_quantity && that_present_quantity))
26411
          return false;
26412
        if (this.quantity != that.quantity)
26413
          return false;
26414
      }
26415
 
48 ashish 26416
      return true;
26417
    }
26418
 
26419
    @Override
26420
    public int hashCode() {
26421
      return 0;
26422
    }
26423
 
553 chandransh 26424
    public int compareTo(changeQuantity_args other) {
48 ashish 26425
      if (!getClass().equals(other.getClass())) {
26426
        return getClass().getName().compareTo(other.getClass().getName());
26427
      }
26428
 
26429
      int lastComparison = 0;
553 chandransh 26430
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 26431
 
553 chandransh 26432
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 26433
      if (lastComparison != 0) {
26434
        return lastComparison;
26435
      }
553 chandransh 26436
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 26437
      if (lastComparison != 0) {
26438
        return lastComparison;
26439
      }
553 chandransh 26440
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
26441
      if (lastComparison != 0) {
26442
        return lastComparison;
26443
      }
26444
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
26445
      if (lastComparison != 0) {
26446
        return lastComparison;
26447
      }
26448
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
26449
      if (lastComparison != 0) {
26450
        return lastComparison;
26451
      }
26452
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
26453
      if (lastComparison != 0) {
26454
        return lastComparison;
26455
      }
48 ashish 26456
      return 0;
26457
    }
26458
 
26459
    public void read(TProtocol iprot) throws TException {
26460
      TField field;
26461
      iprot.readStructBegin();
26462
      while (true)
26463
      {
26464
        field = iprot.readFieldBegin();
26465
        if (field.type == TType.STOP) { 
26466
          break;
26467
        }
26468
        _Fields fieldId = _Fields.findByThriftId(field.id);
26469
        if (fieldId == null) {
26470
          TProtocolUtil.skip(iprot, field.type);
26471
        } else {
26472
          switch (fieldId) {
553 chandransh 26473
            case CART_ID:
48 ashish 26474
              if (field.type == TType.I64) {
553 chandransh 26475
                this.cartId = iprot.readI64();
26476
                setCartIdIsSet(true);
48 ashish 26477
              } else { 
26478
                TProtocolUtil.skip(iprot, field.type);
26479
              }
26480
              break;
553 chandransh 26481
            case ITEM_ID:
26482
              if (field.type == TType.I64) {
26483
                this.itemId = iprot.readI64();
26484
                setItemIdIsSet(true);
26485
              } else { 
26486
                TProtocolUtil.skip(iprot, field.type);
26487
              }
26488
              break;
26489
            case QUANTITY:
26490
              if (field.type == TType.I64) {
26491
                this.quantity = iprot.readI64();
26492
                setQuantityIsSet(true);
26493
              } else { 
26494
                TProtocolUtil.skip(iprot, field.type);
26495
              }
26496
              break;
48 ashish 26497
          }
26498
          iprot.readFieldEnd();
26499
        }
26500
      }
26501
      iprot.readStructEnd();
26502
      validate();
26503
    }
26504
 
26505
    public void write(TProtocol oprot) throws TException {
26506
      validate();
26507
 
26508
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 26509
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26510
      oprot.writeI64(this.cartId);
48 ashish 26511
      oprot.writeFieldEnd();
553 chandransh 26512
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
26513
      oprot.writeI64(this.itemId);
26514
      oprot.writeFieldEnd();
26515
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
26516
      oprot.writeI64(this.quantity);
26517
      oprot.writeFieldEnd();
48 ashish 26518
      oprot.writeFieldStop();
26519
      oprot.writeStructEnd();
26520
    }
26521
 
26522
    @Override
26523
    public String toString() {
553 chandransh 26524
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 26525
      boolean first = true;
26526
 
553 chandransh 26527
      sb.append("cartId:");
26528
      sb.append(this.cartId);
48 ashish 26529
      first = false;
553 chandransh 26530
      if (!first) sb.append(", ");
26531
      sb.append("itemId:");
26532
      sb.append(this.itemId);
26533
      first = false;
26534
      if (!first) sb.append(", ");
26535
      sb.append("quantity:");
26536
      sb.append(this.quantity);
26537
      first = false;
48 ashish 26538
      sb.append(")");
26539
      return sb.toString();
26540
    }
26541
 
26542
    public void validate() throws TException {
26543
      // check for required fields
26544
    }
26545
 
26546
  }
26547
 
553 chandransh 26548
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
26549
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 26550
 
553 chandransh 26551
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 26552
 
553 chandransh 26553
    private ShoppingCartException scx;
48 ashish 26554
 
26555
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26556
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26557
      SCX((short)1, "scx");
48 ashish 26558
 
26559
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26560
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26561
 
26562
      static {
26563
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26564
          byId.put((int)field._thriftId, field);
26565
          byName.put(field.getFieldName(), field);
26566
        }
26567
      }
26568
 
26569
      /**
26570
       * Find the _Fields constant that matches fieldId, or null if its not found.
26571
       */
26572
      public static _Fields findByThriftId(int fieldId) {
26573
        return byId.get(fieldId);
26574
      }
26575
 
26576
      /**
26577
       * Find the _Fields constant that matches fieldId, throwing an exception
26578
       * if it is not found.
26579
       */
26580
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26581
        _Fields fields = findByThriftId(fieldId);
26582
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26583
        return fields;
26584
      }
26585
 
26586
      /**
26587
       * Find the _Fields constant that matches name, or null if its not found.
26588
       */
26589
      public static _Fields findByName(String name) {
26590
        return byName.get(name);
26591
      }
26592
 
26593
      private final short _thriftId;
26594
      private final String _fieldName;
26595
 
26596
      _Fields(short thriftId, String fieldName) {
26597
        _thriftId = thriftId;
26598
        _fieldName = fieldName;
26599
      }
26600
 
26601
      public short getThriftFieldId() {
26602
        return _thriftId;
26603
      }
26604
 
26605
      public String getFieldName() {
26606
        return _fieldName;
26607
      }
26608
    }
26609
 
26610
    // isset id assignments
26611
 
26612
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26613
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 26614
          new FieldValueMetaData(TType.STRUCT)));
26615
    }});
26616
 
26617
    static {
553 chandransh 26618
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 26619
    }
26620
 
553 chandransh 26621
    public changeQuantity_result() {
48 ashish 26622
    }
26623
 
553 chandransh 26624
    public changeQuantity_result(
26625
      ShoppingCartException scx)
48 ashish 26626
    {
26627
      this();
553 chandransh 26628
      this.scx = scx;
48 ashish 26629
    }
26630
 
26631
    /**
26632
     * Performs a deep copy on <i>other</i>.
26633
     */
553 chandransh 26634
    public changeQuantity_result(changeQuantity_result other) {
26635
      if (other.isSetScx()) {
26636
        this.scx = new ShoppingCartException(other.scx);
26637
      }
26638
    }
26639
 
26640
    public changeQuantity_result deepCopy() {
26641
      return new changeQuantity_result(this);
26642
    }
26643
 
26644
    @Deprecated
26645
    public changeQuantity_result clone() {
26646
      return new changeQuantity_result(this);
26647
    }
26648
 
26649
    public ShoppingCartException getScx() {
26650
      return this.scx;
26651
    }
26652
 
26653
    public changeQuantity_result setScx(ShoppingCartException scx) {
26654
      this.scx = scx;
26655
      return this;
26656
    }
26657
 
26658
    public void unsetScx() {
26659
      this.scx = null;
26660
    }
26661
 
26662
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26663
    public boolean isSetScx() {
26664
      return this.scx != null;
26665
    }
26666
 
26667
    public void setScxIsSet(boolean value) {
26668
      if (!value) {
26669
        this.scx = null;
26670
      }
26671
    }
26672
 
26673
    public void setFieldValue(_Fields field, Object value) {
26674
      switch (field) {
26675
      case SCX:
26676
        if (value == null) {
26677
          unsetScx();
26678
        } else {
26679
          setScx((ShoppingCartException)value);
26680
        }
26681
        break;
26682
 
26683
      }
26684
    }
26685
 
26686
    public void setFieldValue(int fieldID, Object value) {
26687
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26688
    }
26689
 
26690
    public Object getFieldValue(_Fields field) {
26691
      switch (field) {
26692
      case SCX:
26693
        return getScx();
26694
 
26695
      }
26696
      throw new IllegalStateException();
26697
    }
26698
 
26699
    public Object getFieldValue(int fieldId) {
26700
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26701
    }
26702
 
26703
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26704
    public boolean isSet(_Fields field) {
26705
      switch (field) {
26706
      case SCX:
26707
        return isSetScx();
26708
      }
26709
      throw new IllegalStateException();
26710
    }
26711
 
26712
    public boolean isSet(int fieldID) {
26713
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26714
    }
26715
 
26716
    @Override
26717
    public boolean equals(Object that) {
26718
      if (that == null)
26719
        return false;
26720
      if (that instanceof changeQuantity_result)
26721
        return this.equals((changeQuantity_result)that);
26722
      return false;
26723
    }
26724
 
26725
    public boolean equals(changeQuantity_result that) {
26726
      if (that == null)
26727
        return false;
26728
 
26729
      boolean this_present_scx = true && this.isSetScx();
26730
      boolean that_present_scx = true && that.isSetScx();
26731
      if (this_present_scx || that_present_scx) {
26732
        if (!(this_present_scx && that_present_scx))
26733
          return false;
26734
        if (!this.scx.equals(that.scx))
26735
          return false;
26736
      }
26737
 
26738
      return true;
26739
    }
26740
 
26741
    @Override
26742
    public int hashCode() {
26743
      return 0;
26744
    }
26745
 
26746
    public int compareTo(changeQuantity_result other) {
26747
      if (!getClass().equals(other.getClass())) {
26748
        return getClass().getName().compareTo(other.getClass().getName());
26749
      }
26750
 
26751
      int lastComparison = 0;
26752
      changeQuantity_result typedOther = (changeQuantity_result)other;
26753
 
26754
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26755
      if (lastComparison != 0) {
26756
        return lastComparison;
26757
      }
26758
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26759
      if (lastComparison != 0) {
26760
        return lastComparison;
26761
      }
26762
      return 0;
26763
    }
26764
 
26765
    public void read(TProtocol iprot) throws TException {
26766
      TField field;
26767
      iprot.readStructBegin();
26768
      while (true)
26769
      {
26770
        field = iprot.readFieldBegin();
26771
        if (field.type == TType.STOP) { 
26772
          break;
26773
        }
26774
        _Fields fieldId = _Fields.findByThriftId(field.id);
26775
        if (fieldId == null) {
26776
          TProtocolUtil.skip(iprot, field.type);
26777
        } else {
26778
          switch (fieldId) {
26779
            case SCX:
26780
              if (field.type == TType.STRUCT) {
26781
                this.scx = new ShoppingCartException();
26782
                this.scx.read(iprot);
26783
              } else { 
26784
                TProtocolUtil.skip(iprot, field.type);
26785
              }
26786
              break;
26787
          }
26788
          iprot.readFieldEnd();
26789
        }
26790
      }
26791
      iprot.readStructEnd();
26792
      validate();
26793
    }
26794
 
26795
    public void write(TProtocol oprot) throws TException {
26796
      oprot.writeStructBegin(STRUCT_DESC);
26797
 
26798
      if (this.isSetScx()) {
26799
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26800
        this.scx.write(oprot);
26801
        oprot.writeFieldEnd();
26802
      }
26803
      oprot.writeFieldStop();
26804
      oprot.writeStructEnd();
26805
    }
26806
 
26807
    @Override
26808
    public String toString() {
26809
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
26810
      boolean first = true;
26811
 
26812
      sb.append("scx:");
26813
      if (this.scx == null) {
26814
        sb.append("null");
26815
      } else {
26816
        sb.append(this.scx);
26817
      }
26818
      first = false;
26819
      sb.append(")");
26820
      return sb.toString();
26821
    }
26822
 
26823
    public void validate() throws TException {
26824
      // check for required fields
26825
    }
26826
 
26827
  }
26828
 
26829
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
26830
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
26831
 
26832
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
26833
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
26834
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
26835
 
26836
    private long cartId;
26837
    private long itemId;
26838
    private LineStatus status;
26839
 
26840
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26841
    public enum _Fields implements TFieldIdEnum {
26842
      CART_ID((short)1, "cartId"),
26843
      ITEM_ID((short)2, "itemId"),
26844
      /**
26845
       * 
26846
       * @see LineStatus
26847
       */
26848
      STATUS((short)3, "status");
26849
 
26850
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26851
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26852
 
26853
      static {
26854
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26855
          byId.put((int)field._thriftId, field);
26856
          byName.put(field.getFieldName(), field);
26857
        }
26858
      }
26859
 
26860
      /**
26861
       * Find the _Fields constant that matches fieldId, or null if its not found.
26862
       */
26863
      public static _Fields findByThriftId(int fieldId) {
26864
        return byId.get(fieldId);
26865
      }
26866
 
26867
      /**
26868
       * Find the _Fields constant that matches fieldId, throwing an exception
26869
       * if it is not found.
26870
       */
26871
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26872
        _Fields fields = findByThriftId(fieldId);
26873
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26874
        return fields;
26875
      }
26876
 
26877
      /**
26878
       * Find the _Fields constant that matches name, or null if its not found.
26879
       */
26880
      public static _Fields findByName(String name) {
26881
        return byName.get(name);
26882
      }
26883
 
26884
      private final short _thriftId;
26885
      private final String _fieldName;
26886
 
26887
      _Fields(short thriftId, String fieldName) {
26888
        _thriftId = thriftId;
26889
        _fieldName = fieldName;
26890
      }
26891
 
26892
      public short getThriftFieldId() {
26893
        return _thriftId;
26894
      }
26895
 
26896
      public String getFieldName() {
26897
        return _fieldName;
26898
      }
26899
    }
26900
 
26901
    // isset id assignments
26902
    private static final int __CARTID_ISSET_ID = 0;
26903
    private static final int __ITEMID_ISSET_ID = 1;
26904
    private BitSet __isset_bit_vector = new BitSet(2);
26905
 
26906
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26907
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
26908
          new FieldValueMetaData(TType.I64)));
26909
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
26910
          new FieldValueMetaData(TType.I64)));
26911
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
26912
          new EnumMetaData(TType.ENUM, LineStatus.class)));
26913
    }});
26914
 
26915
    static {
26916
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
26917
    }
26918
 
26919
    public changeItemStatus_args() {
26920
    }
26921
 
26922
    public changeItemStatus_args(
26923
      long cartId,
26924
      long itemId,
26925
      LineStatus status)
26926
    {
26927
      this();
26928
      this.cartId = cartId;
26929
      setCartIdIsSet(true);
26930
      this.itemId = itemId;
26931
      setItemIdIsSet(true);
26932
      this.status = status;
26933
    }
26934
 
26935
    /**
26936
     * Performs a deep copy on <i>other</i>.
26937
     */
26938
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 26939
      __isset_bit_vector.clear();
26940
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 26941
      this.cartId = other.cartId;
26942
      this.itemId = other.itemId;
26943
      if (other.isSetStatus()) {
26944
        this.status = other.status;
48 ashish 26945
      }
26946
    }
26947
 
553 chandransh 26948
    public changeItemStatus_args deepCopy() {
26949
      return new changeItemStatus_args(this);
48 ashish 26950
    }
26951
 
26952
    @Deprecated
553 chandransh 26953
    public changeItemStatus_args clone() {
26954
      return new changeItemStatus_args(this);
48 ashish 26955
    }
26956
 
553 chandransh 26957
    public long getCartId() {
26958
      return this.cartId;
48 ashish 26959
    }
26960
 
553 chandransh 26961
    public changeItemStatus_args setCartId(long cartId) {
26962
      this.cartId = cartId;
26963
      setCartIdIsSet(true);
48 ashish 26964
      return this;
26965
    }
26966
 
553 chandransh 26967
    public void unsetCartId() {
26968
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26969
    }
26970
 
553 chandransh 26971
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26972
    public boolean isSetCartId() {
26973
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26974
    }
26975
 
553 chandransh 26976
    public void setCartIdIsSet(boolean value) {
26977
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 26978
    }
26979
 
553 chandransh 26980
    public long getItemId() {
26981
      return this.itemId;
48 ashish 26982
    }
26983
 
553 chandransh 26984
    public changeItemStatus_args setItemId(long itemId) {
26985
      this.itemId = itemId;
26986
      setItemIdIsSet(true);
48 ashish 26987
      return this;
26988
    }
26989
 
553 chandransh 26990
    public void unsetItemId() {
26991
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 26992
    }
26993
 
553 chandransh 26994
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
26995
    public boolean isSetItemId() {
26996
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 26997
    }
26998
 
553 chandransh 26999
    public void setItemIdIsSet(boolean value) {
27000
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
27001
    }
27002
 
27003
    /**
27004
     * 
27005
     * @see LineStatus
27006
     */
27007
    public LineStatus getStatus() {
27008
      return this.status;
27009
    }
27010
 
27011
    /**
27012
     * 
27013
     * @see LineStatus
27014
     */
27015
    public changeItemStatus_args setStatus(LineStatus status) {
27016
      this.status = status;
27017
      return this;
27018
    }
27019
 
27020
    public void unsetStatus() {
27021
      this.status = null;
27022
    }
27023
 
27024
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
27025
    public boolean isSetStatus() {
27026
      return this.status != null;
27027
    }
27028
 
27029
    public void setStatusIsSet(boolean value) {
48 ashish 27030
      if (!value) {
553 chandransh 27031
        this.status = null;
48 ashish 27032
      }
27033
    }
27034
 
27035
    public void setFieldValue(_Fields field, Object value) {
27036
      switch (field) {
553 chandransh 27037
      case CART_ID:
48 ashish 27038
        if (value == null) {
553 chandransh 27039
          unsetCartId();
48 ashish 27040
        } else {
553 chandransh 27041
          setCartId((Long)value);
48 ashish 27042
        }
27043
        break;
27044
 
553 chandransh 27045
      case ITEM_ID:
48 ashish 27046
        if (value == null) {
553 chandransh 27047
          unsetItemId();
48 ashish 27048
        } else {
553 chandransh 27049
          setItemId((Long)value);
48 ashish 27050
        }
27051
        break;
27052
 
553 chandransh 27053
      case STATUS:
27054
        if (value == null) {
27055
          unsetStatus();
27056
        } else {
27057
          setStatus((LineStatus)value);
27058
        }
27059
        break;
27060
 
48 ashish 27061
      }
27062
    }
27063
 
27064
    public void setFieldValue(int fieldID, Object value) {
27065
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27066
    }
27067
 
27068
    public Object getFieldValue(_Fields field) {
27069
      switch (field) {
553 chandransh 27070
      case CART_ID:
27071
        return new Long(getCartId());
48 ashish 27072
 
553 chandransh 27073
      case ITEM_ID:
27074
        return new Long(getItemId());
48 ashish 27075
 
553 chandransh 27076
      case STATUS:
27077
        return getStatus();
27078
 
48 ashish 27079
      }
27080
      throw new IllegalStateException();
27081
    }
27082
 
27083
    public Object getFieldValue(int fieldId) {
27084
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27085
    }
27086
 
27087
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27088
    public boolean isSet(_Fields field) {
27089
      switch (field) {
553 chandransh 27090
      case CART_ID:
27091
        return isSetCartId();
27092
      case ITEM_ID:
27093
        return isSetItemId();
27094
      case STATUS:
27095
        return isSetStatus();
48 ashish 27096
      }
27097
      throw new IllegalStateException();
27098
    }
27099
 
27100
    public boolean isSet(int fieldID) {
27101
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27102
    }
27103
 
27104
    @Override
27105
    public boolean equals(Object that) {
27106
      if (that == null)
27107
        return false;
553 chandransh 27108
      if (that instanceof changeItemStatus_args)
27109
        return this.equals((changeItemStatus_args)that);
48 ashish 27110
      return false;
27111
    }
27112
 
553 chandransh 27113
    public boolean equals(changeItemStatus_args that) {
48 ashish 27114
      if (that == null)
27115
        return false;
27116
 
553 chandransh 27117
      boolean this_present_cartId = true;
27118
      boolean that_present_cartId = true;
27119
      if (this_present_cartId || that_present_cartId) {
27120
        if (!(this_present_cartId && that_present_cartId))
48 ashish 27121
          return false;
553 chandransh 27122
        if (this.cartId != that.cartId)
48 ashish 27123
          return false;
27124
      }
27125
 
553 chandransh 27126
      boolean this_present_itemId = true;
27127
      boolean that_present_itemId = true;
27128
      if (this_present_itemId || that_present_itemId) {
27129
        if (!(this_present_itemId && that_present_itemId))
48 ashish 27130
          return false;
553 chandransh 27131
        if (this.itemId != that.itemId)
48 ashish 27132
          return false;
27133
      }
27134
 
553 chandransh 27135
      boolean this_present_status = true && this.isSetStatus();
27136
      boolean that_present_status = true && that.isSetStatus();
27137
      if (this_present_status || that_present_status) {
27138
        if (!(this_present_status && that_present_status))
27139
          return false;
27140
        if (!this.status.equals(that.status))
27141
          return false;
27142
      }
27143
 
48 ashish 27144
      return true;
27145
    }
27146
 
27147
    @Override
27148
    public int hashCode() {
27149
      return 0;
27150
    }
27151
 
553 chandransh 27152
    public int compareTo(changeItemStatus_args other) {
48 ashish 27153
      if (!getClass().equals(other.getClass())) {
27154
        return getClass().getName().compareTo(other.getClass().getName());
27155
      }
27156
 
27157
      int lastComparison = 0;
553 chandransh 27158
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 27159
 
553 chandransh 27160
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 27161
      if (lastComparison != 0) {
27162
        return lastComparison;
27163
      }
553 chandransh 27164
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 27165
      if (lastComparison != 0) {
27166
        return lastComparison;
27167
      }
553 chandransh 27168
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 27169
      if (lastComparison != 0) {
27170
        return lastComparison;
27171
      }
553 chandransh 27172
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 27173
      if (lastComparison != 0) {
27174
        return lastComparison;
27175
      }
553 chandransh 27176
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
27177
      if (lastComparison != 0) {
27178
        return lastComparison;
27179
      }
27180
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
27181
      if (lastComparison != 0) {
27182
        return lastComparison;
27183
      }
48 ashish 27184
      return 0;
27185
    }
27186
 
27187
    public void read(TProtocol iprot) throws TException {
27188
      TField field;
27189
      iprot.readStructBegin();
27190
      while (true)
27191
      {
27192
        field = iprot.readFieldBegin();
27193
        if (field.type == TType.STOP) { 
27194
          break;
27195
        }
27196
        _Fields fieldId = _Fields.findByThriftId(field.id);
27197
        if (fieldId == null) {
27198
          TProtocolUtil.skip(iprot, field.type);
27199
        } else {
27200
          switch (fieldId) {
553 chandransh 27201
            case CART_ID:
27202
              if (field.type == TType.I64) {
27203
                this.cartId = iprot.readI64();
27204
                setCartIdIsSet(true);
48 ashish 27205
              } else { 
27206
                TProtocolUtil.skip(iprot, field.type);
27207
              }
27208
              break;
553 chandransh 27209
            case ITEM_ID:
27210
              if (field.type == TType.I64) {
27211
                this.itemId = iprot.readI64();
27212
                setItemIdIsSet(true);
48 ashish 27213
              } else { 
27214
                TProtocolUtil.skip(iprot, field.type);
27215
              }
27216
              break;
553 chandransh 27217
            case STATUS:
27218
              if (field.type == TType.I32) {
27219
                this.status = LineStatus.findByValue(iprot.readI32());
27220
              } else { 
27221
                TProtocolUtil.skip(iprot, field.type);
27222
              }
27223
              break;
48 ashish 27224
          }
27225
          iprot.readFieldEnd();
27226
        }
27227
      }
27228
      iprot.readStructEnd();
27229
      validate();
27230
    }
27231
 
27232
    public void write(TProtocol oprot) throws TException {
553 chandransh 27233
      validate();
27234
 
48 ashish 27235
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 27236
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
27237
      oprot.writeI64(this.cartId);
27238
      oprot.writeFieldEnd();
27239
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
27240
      oprot.writeI64(this.itemId);
27241
      oprot.writeFieldEnd();
27242
      if (this.status != null) {
27243
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
27244
        oprot.writeI32(this.status.getValue());
48 ashish 27245
        oprot.writeFieldEnd();
27246
      }
27247
      oprot.writeFieldStop();
27248
      oprot.writeStructEnd();
27249
    }
27250
 
27251
    @Override
27252
    public String toString() {
553 chandransh 27253
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 27254
      boolean first = true;
27255
 
553 chandransh 27256
      sb.append("cartId:");
27257
      sb.append(this.cartId);
48 ashish 27258
      first = false;
27259
      if (!first) sb.append(", ");
553 chandransh 27260
      sb.append("itemId:");
27261
      sb.append(this.itemId);
27262
      first = false;
27263
      if (!first) sb.append(", ");
27264
      sb.append("status:");
27265
      if (this.status == null) {
48 ashish 27266
        sb.append("null");
27267
      } else {
553 chandransh 27268
        String status_name = status.name();
27269
        if (status_name != null) {
27270
          sb.append(status_name);
27271
          sb.append(" (");
27272
        }
27273
        sb.append(this.status);
27274
        if (status_name != null) {
27275
          sb.append(")");
27276
        }
48 ashish 27277
      }
27278
      first = false;
27279
      sb.append(")");
27280
      return sb.toString();
27281
    }
27282
 
27283
    public void validate() throws TException {
27284
      // check for required fields
27285
    }
27286
 
27287
  }
27288
 
553 chandransh 27289
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
27290
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 27291
 
553 chandransh 27292
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 27293
 
553 chandransh 27294
    private ShoppingCartException scx;
48 ashish 27295
 
27296
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27297
    public enum _Fields implements TFieldIdEnum {
553 chandransh 27298
      SCX((short)1, "scx");
48 ashish 27299
 
27300
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27301
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27302
 
27303
      static {
27304
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27305
          byId.put((int)field._thriftId, field);
27306
          byName.put(field.getFieldName(), field);
27307
        }
27308
      }
27309
 
27310
      /**
27311
       * Find the _Fields constant that matches fieldId, or null if its not found.
27312
       */
27313
      public static _Fields findByThriftId(int fieldId) {
27314
        return byId.get(fieldId);
27315
      }
27316
 
27317
      /**
27318
       * Find the _Fields constant that matches fieldId, throwing an exception
27319
       * if it is not found.
27320
       */
27321
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27322
        _Fields fields = findByThriftId(fieldId);
27323
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27324
        return fields;
27325
      }
27326
 
27327
      /**
27328
       * Find the _Fields constant that matches name, or null if its not found.
27329
       */
27330
      public static _Fields findByName(String name) {
27331
        return byName.get(name);
27332
      }
27333
 
27334
      private final short _thriftId;
27335
      private final String _fieldName;
27336
 
27337
      _Fields(short thriftId, String fieldName) {
27338
        _thriftId = thriftId;
27339
        _fieldName = fieldName;
27340
      }
27341
 
27342
      public short getThriftFieldId() {
27343
        return _thriftId;
27344
      }
27345
 
27346
      public String getFieldName() {
27347
        return _fieldName;
27348
      }
27349
    }
27350
 
27351
    // isset id assignments
553 chandransh 27352
 
27353
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27354
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27355
          new FieldValueMetaData(TType.STRUCT)));
27356
    }});
27357
 
27358
    static {
27359
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
27360
    }
27361
 
27362
    public changeItemStatus_result() {
27363
    }
27364
 
27365
    public changeItemStatus_result(
27366
      ShoppingCartException scx)
27367
    {
27368
      this();
27369
      this.scx = scx;
27370
    }
27371
 
27372
    /**
27373
     * Performs a deep copy on <i>other</i>.
27374
     */
27375
    public changeItemStatus_result(changeItemStatus_result other) {
27376
      if (other.isSetScx()) {
27377
        this.scx = new ShoppingCartException(other.scx);
27378
      }
27379
    }
27380
 
27381
    public changeItemStatus_result deepCopy() {
27382
      return new changeItemStatus_result(this);
27383
    }
27384
 
27385
    @Deprecated
27386
    public changeItemStatus_result clone() {
27387
      return new changeItemStatus_result(this);
27388
    }
27389
 
27390
    public ShoppingCartException getScx() {
27391
      return this.scx;
27392
    }
27393
 
27394
    public changeItemStatus_result setScx(ShoppingCartException scx) {
27395
      this.scx = scx;
27396
      return this;
27397
    }
27398
 
27399
    public void unsetScx() {
27400
      this.scx = null;
27401
    }
27402
 
27403
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27404
    public boolean isSetScx() {
27405
      return this.scx != null;
27406
    }
27407
 
27408
    public void setScxIsSet(boolean value) {
27409
      if (!value) {
27410
        this.scx = null;
27411
      }
27412
    }
27413
 
27414
    public void setFieldValue(_Fields field, Object value) {
27415
      switch (field) {
27416
      case SCX:
27417
        if (value == null) {
27418
          unsetScx();
27419
        } else {
27420
          setScx((ShoppingCartException)value);
27421
        }
27422
        break;
27423
 
27424
      }
27425
    }
27426
 
27427
    public void setFieldValue(int fieldID, Object value) {
27428
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27429
    }
27430
 
27431
    public Object getFieldValue(_Fields field) {
27432
      switch (field) {
27433
      case SCX:
27434
        return getScx();
27435
 
27436
      }
27437
      throw new IllegalStateException();
27438
    }
27439
 
27440
    public Object getFieldValue(int fieldId) {
27441
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27442
    }
27443
 
27444
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27445
    public boolean isSet(_Fields field) {
27446
      switch (field) {
27447
      case SCX:
27448
        return isSetScx();
27449
      }
27450
      throw new IllegalStateException();
27451
    }
27452
 
27453
    public boolean isSet(int fieldID) {
27454
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27455
    }
27456
 
27457
    @Override
27458
    public boolean equals(Object that) {
27459
      if (that == null)
27460
        return false;
27461
      if (that instanceof changeItemStatus_result)
27462
        return this.equals((changeItemStatus_result)that);
27463
      return false;
27464
    }
27465
 
27466
    public boolean equals(changeItemStatus_result that) {
27467
      if (that == null)
27468
        return false;
27469
 
27470
      boolean this_present_scx = true && this.isSetScx();
27471
      boolean that_present_scx = true && that.isSetScx();
27472
      if (this_present_scx || that_present_scx) {
27473
        if (!(this_present_scx && that_present_scx))
27474
          return false;
27475
        if (!this.scx.equals(that.scx))
27476
          return false;
27477
      }
27478
 
27479
      return true;
27480
    }
27481
 
27482
    @Override
27483
    public int hashCode() {
27484
      return 0;
27485
    }
27486
 
27487
    public int compareTo(changeItemStatus_result other) {
27488
      if (!getClass().equals(other.getClass())) {
27489
        return getClass().getName().compareTo(other.getClass().getName());
27490
      }
27491
 
27492
      int lastComparison = 0;
27493
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
27494
 
27495
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
27496
      if (lastComparison != 0) {
27497
        return lastComparison;
27498
      }
27499
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
27500
      if (lastComparison != 0) {
27501
        return lastComparison;
27502
      }
27503
      return 0;
27504
    }
27505
 
27506
    public void read(TProtocol iprot) throws TException {
27507
      TField field;
27508
      iprot.readStructBegin();
27509
      while (true)
27510
      {
27511
        field = iprot.readFieldBegin();
27512
        if (field.type == TType.STOP) { 
27513
          break;
27514
        }
27515
        _Fields fieldId = _Fields.findByThriftId(field.id);
27516
        if (fieldId == null) {
27517
          TProtocolUtil.skip(iprot, field.type);
27518
        } else {
27519
          switch (fieldId) {
27520
            case SCX:
27521
              if (field.type == TType.STRUCT) {
27522
                this.scx = new ShoppingCartException();
27523
                this.scx.read(iprot);
27524
              } else { 
27525
                TProtocolUtil.skip(iprot, field.type);
27526
              }
27527
              break;
27528
          }
27529
          iprot.readFieldEnd();
27530
        }
27531
      }
27532
      iprot.readStructEnd();
27533
      validate();
27534
    }
27535
 
27536
    public void write(TProtocol oprot) throws TException {
27537
      oprot.writeStructBegin(STRUCT_DESC);
27538
 
27539
      if (this.isSetScx()) {
27540
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27541
        this.scx.write(oprot);
27542
        oprot.writeFieldEnd();
27543
      }
27544
      oprot.writeFieldStop();
27545
      oprot.writeStructEnd();
27546
    }
27547
 
27548
    @Override
27549
    public String toString() {
27550
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
27551
      boolean first = true;
27552
 
27553
      sb.append("scx:");
27554
      if (this.scx == null) {
27555
        sb.append("null");
27556
      } else {
27557
        sb.append(this.scx);
27558
      }
27559
      first = false;
27560
      sb.append(")");
27561
      return sb.toString();
27562
    }
27563
 
27564
    public void validate() throws TException {
27565
      // check for required fields
27566
    }
27567
 
27568
  }
27569
 
27570
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
27571
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
27572
 
27573
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
27574
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
27575
 
27576
    private long cartId;
27577
    private long addressId;
27578
 
27579
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27580
    public enum _Fields implements TFieldIdEnum {
27581
      CART_ID((short)1, "cartId"),
27582
      ADDRESS_ID((short)2, "addressId");
27583
 
27584
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27585
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27586
 
27587
      static {
27588
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27589
          byId.put((int)field._thriftId, field);
27590
          byName.put(field.getFieldName(), field);
27591
        }
27592
      }
27593
 
27594
      /**
27595
       * Find the _Fields constant that matches fieldId, or null if its not found.
27596
       */
27597
      public static _Fields findByThriftId(int fieldId) {
27598
        return byId.get(fieldId);
27599
      }
27600
 
27601
      /**
27602
       * Find the _Fields constant that matches fieldId, throwing an exception
27603
       * if it is not found.
27604
       */
27605
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27606
        _Fields fields = findByThriftId(fieldId);
27607
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27608
        return fields;
27609
      }
27610
 
27611
      /**
27612
       * Find the _Fields constant that matches name, or null if its not found.
27613
       */
27614
      public static _Fields findByName(String name) {
27615
        return byName.get(name);
27616
      }
27617
 
27618
      private final short _thriftId;
27619
      private final String _fieldName;
27620
 
27621
      _Fields(short thriftId, String fieldName) {
27622
        _thriftId = thriftId;
27623
        _fieldName = fieldName;
27624
      }
27625
 
27626
      public short getThriftFieldId() {
27627
        return _thriftId;
27628
      }
27629
 
27630
      public String getFieldName() {
27631
        return _fieldName;
27632
      }
27633
    }
27634
 
27635
    // isset id assignments
27636
    private static final int __CARTID_ISSET_ID = 0;
27637
    private static final int __ADDRESSID_ISSET_ID = 1;
27638
    private BitSet __isset_bit_vector = new BitSet(2);
27639
 
27640
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27641
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
27642
          new FieldValueMetaData(TType.I64)));
27643
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
27644
          new FieldValueMetaData(TType.I64)));
27645
    }});
27646
 
27647
    static {
27648
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
27649
    }
27650
 
27651
    public addAddressToCart_args() {
27652
    }
27653
 
27654
    public addAddressToCart_args(
27655
      long cartId,
27656
      long addressId)
27657
    {
27658
      this();
27659
      this.cartId = cartId;
27660
      setCartIdIsSet(true);
27661
      this.addressId = addressId;
27662
      setAddressIdIsSet(true);
27663
    }
27664
 
27665
    /**
27666
     * Performs a deep copy on <i>other</i>.
27667
     */
27668
    public addAddressToCart_args(addAddressToCart_args other) {
27669
      __isset_bit_vector.clear();
27670
      __isset_bit_vector.or(other.__isset_bit_vector);
27671
      this.cartId = other.cartId;
27672
      this.addressId = other.addressId;
27673
    }
27674
 
27675
    public addAddressToCart_args deepCopy() {
27676
      return new addAddressToCart_args(this);
27677
    }
27678
 
27679
    @Deprecated
27680
    public addAddressToCart_args clone() {
27681
      return new addAddressToCart_args(this);
27682
    }
27683
 
27684
    public long getCartId() {
27685
      return this.cartId;
27686
    }
27687
 
27688
    public addAddressToCart_args setCartId(long cartId) {
27689
      this.cartId = cartId;
27690
      setCartIdIsSet(true);
27691
      return this;
27692
    }
27693
 
27694
    public void unsetCartId() {
27695
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
27696
    }
27697
 
27698
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
27699
    public boolean isSetCartId() {
27700
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
27701
    }
27702
 
27703
    public void setCartIdIsSet(boolean value) {
27704
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
27705
    }
27706
 
27707
    public long getAddressId() {
27708
      return this.addressId;
27709
    }
27710
 
27711
    public addAddressToCart_args setAddressId(long addressId) {
27712
      this.addressId = addressId;
27713
      setAddressIdIsSet(true);
27714
      return this;
27715
    }
27716
 
27717
    public void unsetAddressId() {
27718
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
27719
    }
27720
 
27721
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
27722
    public boolean isSetAddressId() {
27723
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
27724
    }
27725
 
27726
    public void setAddressIdIsSet(boolean value) {
27727
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
27728
    }
27729
 
27730
    public void setFieldValue(_Fields field, Object value) {
27731
      switch (field) {
27732
      case CART_ID:
27733
        if (value == null) {
27734
          unsetCartId();
27735
        } else {
27736
          setCartId((Long)value);
27737
        }
27738
        break;
27739
 
27740
      case ADDRESS_ID:
27741
        if (value == null) {
27742
          unsetAddressId();
27743
        } else {
27744
          setAddressId((Long)value);
27745
        }
27746
        break;
27747
 
27748
      }
27749
    }
27750
 
27751
    public void setFieldValue(int fieldID, Object value) {
27752
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27753
    }
27754
 
27755
    public Object getFieldValue(_Fields field) {
27756
      switch (field) {
27757
      case CART_ID:
27758
        return new Long(getCartId());
27759
 
27760
      case ADDRESS_ID:
27761
        return new Long(getAddressId());
27762
 
27763
      }
27764
      throw new IllegalStateException();
27765
    }
27766
 
27767
    public Object getFieldValue(int fieldId) {
27768
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27769
    }
27770
 
27771
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27772
    public boolean isSet(_Fields field) {
27773
      switch (field) {
27774
      case CART_ID:
27775
        return isSetCartId();
27776
      case ADDRESS_ID:
27777
        return isSetAddressId();
27778
      }
27779
      throw new IllegalStateException();
27780
    }
27781
 
27782
    public boolean isSet(int fieldID) {
27783
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27784
    }
27785
 
27786
    @Override
27787
    public boolean equals(Object that) {
27788
      if (that == null)
27789
        return false;
27790
      if (that instanceof addAddressToCart_args)
27791
        return this.equals((addAddressToCart_args)that);
27792
      return false;
27793
    }
27794
 
27795
    public boolean equals(addAddressToCart_args that) {
27796
      if (that == null)
27797
        return false;
27798
 
27799
      boolean this_present_cartId = true;
27800
      boolean that_present_cartId = true;
27801
      if (this_present_cartId || that_present_cartId) {
27802
        if (!(this_present_cartId && that_present_cartId))
27803
          return false;
27804
        if (this.cartId != that.cartId)
27805
          return false;
27806
      }
27807
 
27808
      boolean this_present_addressId = true;
27809
      boolean that_present_addressId = true;
27810
      if (this_present_addressId || that_present_addressId) {
27811
        if (!(this_present_addressId && that_present_addressId))
27812
          return false;
27813
        if (this.addressId != that.addressId)
27814
          return false;
27815
      }
27816
 
27817
      return true;
27818
    }
27819
 
27820
    @Override
27821
    public int hashCode() {
27822
      return 0;
27823
    }
27824
 
27825
    public int compareTo(addAddressToCart_args other) {
27826
      if (!getClass().equals(other.getClass())) {
27827
        return getClass().getName().compareTo(other.getClass().getName());
27828
      }
27829
 
27830
      int lastComparison = 0;
27831
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
27832
 
27833
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
27834
      if (lastComparison != 0) {
27835
        return lastComparison;
27836
      }
27837
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
27838
      if (lastComparison != 0) {
27839
        return lastComparison;
27840
      }
27841
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
27842
      if (lastComparison != 0) {
27843
        return lastComparison;
27844
      }
27845
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
27846
      if (lastComparison != 0) {
27847
        return lastComparison;
27848
      }
27849
      return 0;
27850
    }
27851
 
27852
    public void read(TProtocol iprot) throws TException {
27853
      TField field;
27854
      iprot.readStructBegin();
27855
      while (true)
27856
      {
27857
        field = iprot.readFieldBegin();
27858
        if (field.type == TType.STOP) { 
27859
          break;
27860
        }
27861
        _Fields fieldId = _Fields.findByThriftId(field.id);
27862
        if (fieldId == null) {
27863
          TProtocolUtil.skip(iprot, field.type);
27864
        } else {
27865
          switch (fieldId) {
27866
            case CART_ID:
27867
              if (field.type == TType.I64) {
27868
                this.cartId = iprot.readI64();
27869
                setCartIdIsSet(true);
27870
              } else { 
27871
                TProtocolUtil.skip(iprot, field.type);
27872
              }
27873
              break;
27874
            case ADDRESS_ID:
27875
              if (field.type == TType.I64) {
27876
                this.addressId = iprot.readI64();
27877
                setAddressIdIsSet(true);
27878
              } else { 
27879
                TProtocolUtil.skip(iprot, field.type);
27880
              }
27881
              break;
27882
          }
27883
          iprot.readFieldEnd();
27884
        }
27885
      }
27886
      iprot.readStructEnd();
27887
      validate();
27888
    }
27889
 
27890
    public void write(TProtocol oprot) throws TException {
27891
      validate();
27892
 
27893
      oprot.writeStructBegin(STRUCT_DESC);
27894
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
27895
      oprot.writeI64(this.cartId);
27896
      oprot.writeFieldEnd();
27897
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
27898
      oprot.writeI64(this.addressId);
27899
      oprot.writeFieldEnd();
27900
      oprot.writeFieldStop();
27901
      oprot.writeStructEnd();
27902
    }
27903
 
27904
    @Override
27905
    public String toString() {
27906
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
27907
      boolean first = true;
27908
 
27909
      sb.append("cartId:");
27910
      sb.append(this.cartId);
27911
      first = false;
27912
      if (!first) sb.append(", ");
27913
      sb.append("addressId:");
27914
      sb.append(this.addressId);
27915
      first = false;
27916
      sb.append(")");
27917
      return sb.toString();
27918
    }
27919
 
27920
    public void validate() throws TException {
27921
      // check for required fields
27922
    }
27923
 
27924
  }
27925
 
27926
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
27927
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
27928
 
578 chandransh 27929
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 27930
 
578 chandransh 27931
    private ShoppingCartException scx;
553 chandransh 27932
 
27933
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27934
    public enum _Fields implements TFieldIdEnum {
578 chandransh 27935
      SCX((short)1, "scx");
553 chandransh 27936
 
27937
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27938
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27939
 
27940
      static {
27941
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27942
          byId.put((int)field._thriftId, field);
27943
          byName.put(field.getFieldName(), field);
27944
        }
27945
      }
27946
 
27947
      /**
27948
       * Find the _Fields constant that matches fieldId, or null if its not found.
27949
       */
27950
      public static _Fields findByThriftId(int fieldId) {
27951
        return byId.get(fieldId);
27952
      }
27953
 
27954
      /**
27955
       * Find the _Fields constant that matches fieldId, throwing an exception
27956
       * if it is not found.
27957
       */
27958
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27959
        _Fields fields = findByThriftId(fieldId);
27960
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27961
        return fields;
27962
      }
27963
 
27964
      /**
27965
       * Find the _Fields constant that matches name, or null if its not found.
27966
       */
27967
      public static _Fields findByName(String name) {
27968
        return byName.get(name);
27969
      }
27970
 
27971
      private final short _thriftId;
27972
      private final String _fieldName;
27973
 
27974
      _Fields(short thriftId, String fieldName) {
27975
        _thriftId = thriftId;
27976
        _fieldName = fieldName;
27977
      }
27978
 
27979
      public short getThriftFieldId() {
27980
        return _thriftId;
27981
      }
27982
 
27983
      public String getFieldName() {
27984
        return _fieldName;
27985
      }
27986
    }
578 chandransh 27987
 
27988
    // isset id assignments
27989
 
553 chandransh 27990
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 27991
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
27992
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 27993
    }});
27994
 
27995
    static {
27996
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
27997
    }
27998
 
27999
    public addAddressToCart_result() {
28000
    }
28001
 
578 chandransh 28002
    public addAddressToCart_result(
28003
      ShoppingCartException scx)
28004
    {
28005
      this();
28006
      this.scx = scx;
28007
    }
28008
 
553 chandransh 28009
    /**
28010
     * Performs a deep copy on <i>other</i>.
28011
     */
28012
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 28013
      if (other.isSetScx()) {
28014
        this.scx = new ShoppingCartException(other.scx);
28015
      }
553 chandransh 28016
    }
28017
 
28018
    public addAddressToCart_result deepCopy() {
28019
      return new addAddressToCart_result(this);
28020
    }
28021
 
28022
    @Deprecated
28023
    public addAddressToCart_result clone() {
28024
      return new addAddressToCart_result(this);
28025
    }
28026
 
578 chandransh 28027
    public ShoppingCartException getScx() {
28028
      return this.scx;
28029
    }
28030
 
28031
    public addAddressToCart_result setScx(ShoppingCartException scx) {
28032
      this.scx = scx;
28033
      return this;
28034
    }
28035
 
28036
    public void unsetScx() {
28037
      this.scx = null;
28038
    }
28039
 
28040
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28041
    public boolean isSetScx() {
28042
      return this.scx != null;
28043
    }
28044
 
28045
    public void setScxIsSet(boolean value) {
28046
      if (!value) {
28047
        this.scx = null;
28048
      }
28049
    }
28050
 
553 chandransh 28051
    public void setFieldValue(_Fields field, Object value) {
28052
      switch (field) {
578 chandransh 28053
      case SCX:
28054
        if (value == null) {
28055
          unsetScx();
28056
        } else {
28057
          setScx((ShoppingCartException)value);
28058
        }
28059
        break;
28060
 
553 chandransh 28061
      }
28062
    }
28063
 
28064
    public void setFieldValue(int fieldID, Object value) {
28065
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28066
    }
28067
 
28068
    public Object getFieldValue(_Fields field) {
28069
      switch (field) {
578 chandransh 28070
      case SCX:
28071
        return getScx();
28072
 
553 chandransh 28073
      }
28074
      throw new IllegalStateException();
28075
    }
28076
 
28077
    public Object getFieldValue(int fieldId) {
28078
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28079
    }
28080
 
28081
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28082
    public boolean isSet(_Fields field) {
28083
      switch (field) {
578 chandransh 28084
      case SCX:
28085
        return isSetScx();
553 chandransh 28086
      }
28087
      throw new IllegalStateException();
28088
    }
28089
 
28090
    public boolean isSet(int fieldID) {
28091
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28092
    }
28093
 
28094
    @Override
28095
    public boolean equals(Object that) {
28096
      if (that == null)
28097
        return false;
28098
      if (that instanceof addAddressToCart_result)
28099
        return this.equals((addAddressToCart_result)that);
28100
      return false;
28101
    }
28102
 
28103
    public boolean equals(addAddressToCart_result that) {
28104
      if (that == null)
28105
        return false;
28106
 
578 chandransh 28107
      boolean this_present_scx = true && this.isSetScx();
28108
      boolean that_present_scx = true && that.isSetScx();
28109
      if (this_present_scx || that_present_scx) {
28110
        if (!(this_present_scx && that_present_scx))
28111
          return false;
28112
        if (!this.scx.equals(that.scx))
28113
          return false;
28114
      }
28115
 
553 chandransh 28116
      return true;
28117
    }
28118
 
28119
    @Override
28120
    public int hashCode() {
28121
      return 0;
28122
    }
28123
 
28124
    public int compareTo(addAddressToCart_result other) {
28125
      if (!getClass().equals(other.getClass())) {
28126
        return getClass().getName().compareTo(other.getClass().getName());
28127
      }
28128
 
28129
      int lastComparison = 0;
28130
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
28131
 
578 chandransh 28132
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28133
      if (lastComparison != 0) {
28134
        return lastComparison;
28135
      }
28136
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28137
      if (lastComparison != 0) {
28138
        return lastComparison;
28139
      }
553 chandransh 28140
      return 0;
28141
    }
28142
 
28143
    public void read(TProtocol iprot) throws TException {
28144
      TField field;
28145
      iprot.readStructBegin();
28146
      while (true)
28147
      {
28148
        field = iprot.readFieldBegin();
28149
        if (field.type == TType.STOP) { 
28150
          break;
28151
        }
28152
        _Fields fieldId = _Fields.findByThriftId(field.id);
28153
        if (fieldId == null) {
28154
          TProtocolUtil.skip(iprot, field.type);
28155
        } else {
28156
          switch (fieldId) {
578 chandransh 28157
            case SCX:
28158
              if (field.type == TType.STRUCT) {
28159
                this.scx = new ShoppingCartException();
28160
                this.scx.read(iprot);
28161
              } else { 
28162
                TProtocolUtil.skip(iprot, field.type);
28163
              }
28164
              break;
553 chandransh 28165
          }
28166
          iprot.readFieldEnd();
28167
        }
28168
      }
28169
      iprot.readStructEnd();
28170
      validate();
28171
    }
28172
 
28173
    public void write(TProtocol oprot) throws TException {
28174
      oprot.writeStructBegin(STRUCT_DESC);
28175
 
578 chandransh 28176
      if (this.isSetScx()) {
28177
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28178
        this.scx.write(oprot);
28179
        oprot.writeFieldEnd();
28180
      }
553 chandransh 28181
      oprot.writeFieldStop();
28182
      oprot.writeStructEnd();
28183
    }
28184
 
28185
    @Override
28186
    public String toString() {
28187
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
28188
      boolean first = true;
28189
 
578 chandransh 28190
      sb.append("scx:");
28191
      if (this.scx == null) {
28192
        sb.append("null");
28193
      } else {
28194
        sb.append(this.scx);
28195
      }
28196
      first = false;
553 chandransh 28197
      sb.append(")");
28198
      return sb.toString();
28199
    }
28200
 
28201
    public void validate() throws TException {
28202
      // check for required fields
28203
    }
28204
 
28205
  }
28206
 
688 chandransh 28207
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
28208
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 28209
 
28210
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
28211
 
28212
    private long cartId;
28213
 
28214
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28215
    public enum _Fields implements TFieldIdEnum {
28216
      CART_ID((short)1, "cartId");
28217
 
28218
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28219
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28220
 
28221
      static {
28222
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28223
          byId.put((int)field._thriftId, field);
28224
          byName.put(field.getFieldName(), field);
28225
        }
28226
      }
28227
 
28228
      /**
28229
       * Find the _Fields constant that matches fieldId, or null if its not found.
28230
       */
28231
      public static _Fields findByThriftId(int fieldId) {
28232
        return byId.get(fieldId);
28233
      }
28234
 
28235
      /**
28236
       * Find the _Fields constant that matches fieldId, throwing an exception
28237
       * if it is not found.
28238
       */
28239
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28240
        _Fields fields = findByThriftId(fieldId);
28241
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28242
        return fields;
28243
      }
28244
 
28245
      /**
28246
       * Find the _Fields constant that matches name, or null if its not found.
28247
       */
28248
      public static _Fields findByName(String name) {
28249
        return byName.get(name);
28250
      }
28251
 
28252
      private final short _thriftId;
28253
      private final String _fieldName;
28254
 
28255
      _Fields(short thriftId, String fieldName) {
28256
        _thriftId = thriftId;
28257
        _fieldName = fieldName;
28258
      }
28259
 
28260
      public short getThriftFieldId() {
28261
        return _thriftId;
28262
      }
28263
 
28264
      public String getFieldName() {
28265
        return _fieldName;
28266
      }
28267
    }
28268
 
28269
    // isset id assignments
28270
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 28271
    private BitSet __isset_bit_vector = new BitSet(1);
28272
 
28273
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 28274
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 28275
          new FieldValueMetaData(TType.I64)));
28276
    }});
28277
 
28278
    static {
688 chandransh 28279
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 28280
    }
28281
 
688 chandransh 28282
    public createOrders_args() {
48 ashish 28283
    }
28284
 
688 chandransh 28285
    public createOrders_args(
553 chandransh 28286
      long cartId)
48 ashish 28287
    {
28288
      this();
553 chandransh 28289
      this.cartId = cartId;
28290
      setCartIdIsSet(true);
48 ashish 28291
    }
28292
 
28293
    /**
28294
     * Performs a deep copy on <i>other</i>.
28295
     */
688 chandransh 28296
    public createOrders_args(createOrders_args other) {
48 ashish 28297
      __isset_bit_vector.clear();
28298
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 28299
      this.cartId = other.cartId;
48 ashish 28300
    }
28301
 
688 chandransh 28302
    public createOrders_args deepCopy() {
28303
      return new createOrders_args(this);
48 ashish 28304
    }
28305
 
28306
    @Deprecated
688 chandransh 28307
    public createOrders_args clone() {
28308
      return new createOrders_args(this);
48 ashish 28309
    }
28310
 
553 chandransh 28311
    public long getCartId() {
28312
      return this.cartId;
48 ashish 28313
    }
28314
 
688 chandransh 28315
    public createOrders_args setCartId(long cartId) {
553 chandransh 28316
      this.cartId = cartId;
28317
      setCartIdIsSet(true);
48 ashish 28318
      return this;
28319
    }
28320
 
553 chandransh 28321
    public void unsetCartId() {
28322
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 28323
    }
28324
 
553 chandransh 28325
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
28326
    public boolean isSetCartId() {
28327
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 28328
    }
28329
 
553 chandransh 28330
    public void setCartIdIsSet(boolean value) {
28331
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 28332
    }
28333
 
28334
    public void setFieldValue(_Fields field, Object value) {
28335
      switch (field) {
553 chandransh 28336
      case CART_ID:
48 ashish 28337
        if (value == null) {
553 chandransh 28338
          unsetCartId();
48 ashish 28339
        } else {
553 chandransh 28340
          setCartId((Long)value);
48 ashish 28341
        }
28342
        break;
28343
 
28344
      }
28345
    }
28346
 
28347
    public void setFieldValue(int fieldID, Object value) {
28348
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28349
    }
28350
 
28351
    public Object getFieldValue(_Fields field) {
28352
      switch (field) {
553 chandransh 28353
      case CART_ID:
28354
        return new Long(getCartId());
48 ashish 28355
 
28356
      }
28357
      throw new IllegalStateException();
28358
    }
28359
 
28360
    public Object getFieldValue(int fieldId) {
28361
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28362
    }
28363
 
28364
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28365
    public boolean isSet(_Fields field) {
28366
      switch (field) {
553 chandransh 28367
      case CART_ID:
28368
        return isSetCartId();
48 ashish 28369
      }
28370
      throw new IllegalStateException();
28371
    }
28372
 
28373
    public boolean isSet(int fieldID) {
28374
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28375
    }
28376
 
28377
    @Override
28378
    public boolean equals(Object that) {
28379
      if (that == null)
28380
        return false;
688 chandransh 28381
      if (that instanceof createOrders_args)
28382
        return this.equals((createOrders_args)that);
48 ashish 28383
      return false;
28384
    }
28385
 
688 chandransh 28386
    public boolean equals(createOrders_args that) {
48 ashish 28387
      if (that == null)
28388
        return false;
28389
 
553 chandransh 28390
      boolean this_present_cartId = true;
28391
      boolean that_present_cartId = true;
28392
      if (this_present_cartId || that_present_cartId) {
28393
        if (!(this_present_cartId && that_present_cartId))
48 ashish 28394
          return false;
553 chandransh 28395
        if (this.cartId != that.cartId)
48 ashish 28396
          return false;
28397
      }
28398
 
28399
      return true;
28400
    }
28401
 
28402
    @Override
28403
    public int hashCode() {
28404
      return 0;
28405
    }
28406
 
688 chandransh 28407
    public int compareTo(createOrders_args other) {
48 ashish 28408
      if (!getClass().equals(other.getClass())) {
28409
        return getClass().getName().compareTo(other.getClass().getName());
28410
      }
28411
 
28412
      int lastComparison = 0;
688 chandransh 28413
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 28414
 
553 chandransh 28415
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 28416
      if (lastComparison != 0) {
28417
        return lastComparison;
28418
      }
553 chandransh 28419
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 28420
      if (lastComparison != 0) {
28421
        return lastComparison;
28422
      }
28423
      return 0;
28424
    }
28425
 
28426
    public void read(TProtocol iprot) throws TException {
28427
      TField field;
28428
      iprot.readStructBegin();
28429
      while (true)
28430
      {
28431
        field = iprot.readFieldBegin();
28432
        if (field.type == TType.STOP) { 
28433
          break;
28434
        }
28435
        _Fields fieldId = _Fields.findByThriftId(field.id);
28436
        if (fieldId == null) {
28437
          TProtocolUtil.skip(iprot, field.type);
28438
        } else {
28439
          switch (fieldId) {
553 chandransh 28440
            case CART_ID:
48 ashish 28441
              if (field.type == TType.I64) {
553 chandransh 28442
                this.cartId = iprot.readI64();
28443
                setCartIdIsSet(true);
48 ashish 28444
              } else { 
28445
                TProtocolUtil.skip(iprot, field.type);
28446
              }
28447
              break;
28448
          }
28449
          iprot.readFieldEnd();
28450
        }
28451
      }
28452
      iprot.readStructEnd();
28453
      validate();
28454
    }
28455
 
28456
    public void write(TProtocol oprot) throws TException {
28457
      validate();
28458
 
28459
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 28460
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
28461
      oprot.writeI64(this.cartId);
48 ashish 28462
      oprot.writeFieldEnd();
28463
      oprot.writeFieldStop();
28464
      oprot.writeStructEnd();
28465
    }
28466
 
28467
    @Override
28468
    public String toString() {
688 chandransh 28469
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 28470
      boolean first = true;
28471
 
553 chandransh 28472
      sb.append("cartId:");
28473
      sb.append(this.cartId);
48 ashish 28474
      first = false;
28475
      sb.append(")");
28476
      return sb.toString();
28477
    }
28478
 
28479
    public void validate() throws TException {
28480
      // check for required fields
28481
    }
28482
 
28483
  }
28484
 
688 chandransh 28485
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
28486
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 28487
 
578 chandransh 28488
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 28489
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 28490
 
578 chandransh 28491
    private long success;
553 chandransh 28492
    private ShoppingCartException scx;
48 ashish 28493
 
28494
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28495
    public enum _Fields implements TFieldIdEnum {
28496
      SUCCESS((short)0, "success"),
553 chandransh 28497
      SCX((short)1, "scx");
48 ashish 28498
 
28499
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28500
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28501
 
28502
      static {
28503
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28504
          byId.put((int)field._thriftId, field);
28505
          byName.put(field.getFieldName(), field);
28506
        }
28507
      }
28508
 
28509
      /**
28510
       * Find the _Fields constant that matches fieldId, or null if its not found.
28511
       */
28512
      public static _Fields findByThriftId(int fieldId) {
28513
        return byId.get(fieldId);
28514
      }
28515
 
28516
      /**
28517
       * Find the _Fields constant that matches fieldId, throwing an exception
28518
       * if it is not found.
28519
       */
28520
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28521
        _Fields fields = findByThriftId(fieldId);
28522
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28523
        return fields;
28524
      }
28525
 
28526
      /**
28527
       * Find the _Fields constant that matches name, or null if its not found.
28528
       */
28529
      public static _Fields findByName(String name) {
28530
        return byName.get(name);
28531
      }
28532
 
28533
      private final short _thriftId;
28534
      private final String _fieldName;
28535
 
28536
      _Fields(short thriftId, String fieldName) {
28537
        _thriftId = thriftId;
28538
        _fieldName = fieldName;
28539
      }
28540
 
28541
      public short getThriftFieldId() {
28542
        return _thriftId;
28543
      }
28544
 
28545
      public String getFieldName() {
28546
        return _fieldName;
28547
      }
28548
    }
28549
 
28550
    // isset id assignments
28551
    private static final int __SUCCESS_ISSET_ID = 0;
28552
    private BitSet __isset_bit_vector = new BitSet(1);
28553
 
28554
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28555
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 28556
          new FieldValueMetaData(TType.I64)));
553 chandransh 28557
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 28558
          new FieldValueMetaData(TType.STRUCT)));
28559
    }});
28560
 
28561
    static {
688 chandransh 28562
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 28563
    }
28564
 
688 chandransh 28565
    public createOrders_result() {
48 ashish 28566
    }
28567
 
688 chandransh 28568
    public createOrders_result(
578 chandransh 28569
      long success,
553 chandransh 28570
      ShoppingCartException scx)
48 ashish 28571
    {
28572
      this();
28573
      this.success = success;
28574
      setSuccessIsSet(true);
553 chandransh 28575
      this.scx = scx;
48 ashish 28576
    }
28577
 
28578
    /**
28579
     * Performs a deep copy on <i>other</i>.
28580
     */
688 chandransh 28581
    public createOrders_result(createOrders_result other) {
48 ashish 28582
      __isset_bit_vector.clear();
28583
      __isset_bit_vector.or(other.__isset_bit_vector);
28584
      this.success = other.success;
553 chandransh 28585
      if (other.isSetScx()) {
28586
        this.scx = new ShoppingCartException(other.scx);
48 ashish 28587
      }
28588
    }
28589
 
688 chandransh 28590
    public createOrders_result deepCopy() {
28591
      return new createOrders_result(this);
48 ashish 28592
    }
28593
 
28594
    @Deprecated
688 chandransh 28595
    public createOrders_result clone() {
28596
      return new createOrders_result(this);
48 ashish 28597
    }
28598
 
578 chandransh 28599
    public long getSuccess() {
48 ashish 28600
      return this.success;
28601
    }
28602
 
688 chandransh 28603
    public createOrders_result setSuccess(long success) {
48 ashish 28604
      this.success = success;
28605
      setSuccessIsSet(true);
28606
      return this;
28607
    }
28608
 
28609
    public void unsetSuccess() {
28610
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
28611
    }
28612
 
28613
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28614
    public boolean isSetSuccess() {
28615
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
28616
    }
28617
 
28618
    public void setSuccessIsSet(boolean value) {
28619
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
28620
    }
28621
 
553 chandransh 28622
    public ShoppingCartException getScx() {
28623
      return this.scx;
48 ashish 28624
    }
28625
 
688 chandransh 28626
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 28627
      this.scx = scx;
48 ashish 28628
      return this;
28629
    }
28630
 
553 chandransh 28631
    public void unsetScx() {
28632
      this.scx = null;
48 ashish 28633
    }
28634
 
553 chandransh 28635
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28636
    public boolean isSetScx() {
28637
      return this.scx != null;
48 ashish 28638
    }
28639
 
553 chandransh 28640
    public void setScxIsSet(boolean value) {
48 ashish 28641
      if (!value) {
553 chandransh 28642
        this.scx = null;
48 ashish 28643
      }
28644
    }
28645
 
28646
    public void setFieldValue(_Fields field, Object value) {
28647
      switch (field) {
28648
      case SUCCESS:
28649
        if (value == null) {
28650
          unsetSuccess();
28651
        } else {
578 chandransh 28652
          setSuccess((Long)value);
48 ashish 28653
        }
28654
        break;
28655
 
553 chandransh 28656
      case SCX:
48 ashish 28657
        if (value == null) {
553 chandransh 28658
          unsetScx();
48 ashish 28659
        } else {
553 chandransh 28660
          setScx((ShoppingCartException)value);
48 ashish 28661
        }
28662
        break;
28663
 
28664
      }
28665
    }
28666
 
28667
    public void setFieldValue(int fieldID, Object value) {
28668
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28669
    }
28670
 
28671
    public Object getFieldValue(_Fields field) {
28672
      switch (field) {
28673
      case SUCCESS:
578 chandransh 28674
        return new Long(getSuccess());
48 ashish 28675
 
553 chandransh 28676
      case SCX:
28677
        return getScx();
48 ashish 28678
 
28679
      }
28680
      throw new IllegalStateException();
28681
    }
28682
 
28683
    public Object getFieldValue(int fieldId) {
28684
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28685
    }
28686
 
28687
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28688
    public boolean isSet(_Fields field) {
28689
      switch (field) {
28690
      case SUCCESS:
28691
        return isSetSuccess();
553 chandransh 28692
      case SCX:
28693
        return isSetScx();
48 ashish 28694
      }
28695
      throw new IllegalStateException();
28696
    }
28697
 
28698
    public boolean isSet(int fieldID) {
28699
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28700
    }
28701
 
28702
    @Override
28703
    public boolean equals(Object that) {
28704
      if (that == null)
28705
        return false;
688 chandransh 28706
      if (that instanceof createOrders_result)
28707
        return this.equals((createOrders_result)that);
48 ashish 28708
      return false;
28709
    }
28710
 
688 chandransh 28711
    public boolean equals(createOrders_result that) {
48 ashish 28712
      if (that == null)
28713
        return false;
28714
 
28715
      boolean this_present_success = true;
28716
      boolean that_present_success = true;
28717
      if (this_present_success || that_present_success) {
28718
        if (!(this_present_success && that_present_success))
28719
          return false;
28720
        if (this.success != that.success)
28721
          return false;
28722
      }
28723
 
553 chandransh 28724
      boolean this_present_scx = true && this.isSetScx();
28725
      boolean that_present_scx = true && that.isSetScx();
28726
      if (this_present_scx || that_present_scx) {
28727
        if (!(this_present_scx && that_present_scx))
48 ashish 28728
          return false;
553 chandransh 28729
        if (!this.scx.equals(that.scx))
48 ashish 28730
          return false;
28731
      }
28732
 
28733
      return true;
28734
    }
28735
 
28736
    @Override
28737
    public int hashCode() {
28738
      return 0;
28739
    }
28740
 
688 chandransh 28741
    public int compareTo(createOrders_result other) {
48 ashish 28742
      if (!getClass().equals(other.getClass())) {
28743
        return getClass().getName().compareTo(other.getClass().getName());
28744
      }
28745
 
28746
      int lastComparison = 0;
688 chandransh 28747
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 28748
 
28749
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28750
      if (lastComparison != 0) {
28751
        return lastComparison;
28752
      }
28753
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28754
      if (lastComparison != 0) {
28755
        return lastComparison;
28756
      }
553 chandransh 28757
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 28758
      if (lastComparison != 0) {
28759
        return lastComparison;
28760
      }
553 chandransh 28761
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 28762
      if (lastComparison != 0) {
28763
        return lastComparison;
28764
      }
28765
      return 0;
28766
    }
28767
 
28768
    public void read(TProtocol iprot) throws TException {
28769
      TField field;
28770
      iprot.readStructBegin();
28771
      while (true)
28772
      {
28773
        field = iprot.readFieldBegin();
28774
        if (field.type == TType.STOP) { 
28775
          break;
28776
        }
28777
        _Fields fieldId = _Fields.findByThriftId(field.id);
28778
        if (fieldId == null) {
28779
          TProtocolUtil.skip(iprot, field.type);
28780
        } else {
28781
          switch (fieldId) {
28782
            case SUCCESS:
578 chandransh 28783
              if (field.type == TType.I64) {
28784
                this.success = iprot.readI64();
48 ashish 28785
                setSuccessIsSet(true);
28786
              } else { 
28787
                TProtocolUtil.skip(iprot, field.type);
28788
              }
28789
              break;
553 chandransh 28790
            case SCX:
48 ashish 28791
              if (field.type == TType.STRUCT) {
553 chandransh 28792
                this.scx = new ShoppingCartException();
28793
                this.scx.read(iprot);
48 ashish 28794
              } else { 
28795
                TProtocolUtil.skip(iprot, field.type);
28796
              }
28797
              break;
28798
          }
28799
          iprot.readFieldEnd();
28800
        }
28801
      }
28802
      iprot.readStructEnd();
28803
      validate();
28804
    }
28805
 
28806
    public void write(TProtocol oprot) throws TException {
28807
      oprot.writeStructBegin(STRUCT_DESC);
28808
 
28809
      if (this.isSetSuccess()) {
28810
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 28811
        oprot.writeI64(this.success);
48 ashish 28812
        oprot.writeFieldEnd();
553 chandransh 28813
      } else if (this.isSetScx()) {
28814
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28815
        this.scx.write(oprot);
48 ashish 28816
        oprot.writeFieldEnd();
28817
      }
28818
      oprot.writeFieldStop();
28819
      oprot.writeStructEnd();
28820
    }
28821
 
28822
    @Override
28823
    public String toString() {
688 chandransh 28824
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 28825
      boolean first = true;
28826
 
28827
      sb.append("success:");
28828
      sb.append(this.success);
28829
      first = false;
28830
      if (!first) sb.append(", ");
553 chandransh 28831
      sb.append("scx:");
28832
      if (this.scx == null) {
48 ashish 28833
        sb.append("null");
28834
      } else {
553 chandransh 28835
        sb.append(this.scx);
48 ashish 28836
      }
28837
      first = false;
28838
      sb.append(")");
28839
      return sb.toString();
28840
    }
28841
 
28842
    public void validate() throws TException {
28843
      // check for required fields
28844
    }
28845
 
28846
  }
28847
 
553 chandransh 28848
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
28849
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 28850
 
553 chandransh 28851
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 28852
 
553 chandransh 28853
    private long cartId;
48 ashish 28854
 
28855
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28856
    public enum _Fields implements TFieldIdEnum {
553 chandransh 28857
      CART_ID((short)1, "cartId");
48 ashish 28858
 
28859
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28860
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28861
 
28862
      static {
28863
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28864
          byId.put((int)field._thriftId, field);
28865
          byName.put(field.getFieldName(), field);
28866
        }
28867
      }
28868
 
28869
      /**
28870
       * Find the _Fields constant that matches fieldId, or null if its not found.
28871
       */
28872
      public static _Fields findByThriftId(int fieldId) {
28873
        return byId.get(fieldId);
28874
      }
28875
 
28876
      /**
28877
       * Find the _Fields constant that matches fieldId, throwing an exception
28878
       * if it is not found.
28879
       */
28880
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28881
        _Fields fields = findByThriftId(fieldId);
28882
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28883
        return fields;
28884
      }
28885
 
28886
      /**
28887
       * Find the _Fields constant that matches name, or null if its not found.
28888
       */
28889
      public static _Fields findByName(String name) {
28890
        return byName.get(name);
28891
      }
28892
 
28893
      private final short _thriftId;
28894
      private final String _fieldName;
28895
 
28896
      _Fields(short thriftId, String fieldName) {
28897
        _thriftId = thriftId;
28898
        _fieldName = fieldName;
28899
      }
28900
 
28901
      public short getThriftFieldId() {
28902
        return _thriftId;
28903
      }
28904
 
28905
      public String getFieldName() {
28906
        return _fieldName;
28907
      }
28908
    }
28909
 
28910
    // isset id assignments
553 chandransh 28911
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 28912
    private BitSet __isset_bit_vector = new BitSet(1);
28913
 
28914
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 28915
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 28916
          new FieldValueMetaData(TType.I64)));
28917
    }});
28918
 
28919
    static {
553 chandransh 28920
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 28921
    }
28922
 
553 chandransh 28923
    public validateCart_args() {
48 ashish 28924
    }
28925
 
553 chandransh 28926
    public validateCart_args(
28927
      long cartId)
48 ashish 28928
    {
28929
      this();
553 chandransh 28930
      this.cartId = cartId;
28931
      setCartIdIsSet(true);
48 ashish 28932
    }
28933
 
28934
    /**
28935
     * Performs a deep copy on <i>other</i>.
28936
     */
553 chandransh 28937
    public validateCart_args(validateCart_args other) {
48 ashish 28938
      __isset_bit_vector.clear();
28939
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 28940
      this.cartId = other.cartId;
48 ashish 28941
    }
28942
 
553 chandransh 28943
    public validateCart_args deepCopy() {
28944
      return new validateCart_args(this);
48 ashish 28945
    }
28946
 
28947
    @Deprecated
553 chandransh 28948
    public validateCart_args clone() {
28949
      return new validateCart_args(this);
48 ashish 28950
    }
28951
 
553 chandransh 28952
    public long getCartId() {
28953
      return this.cartId;
48 ashish 28954
    }
28955
 
553 chandransh 28956
    public validateCart_args setCartId(long cartId) {
28957
      this.cartId = cartId;
28958
      setCartIdIsSet(true);
48 ashish 28959
      return this;
28960
    }
28961
 
553 chandransh 28962
    public void unsetCartId() {
28963
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 28964
    }
28965
 
553 chandransh 28966
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
28967
    public boolean isSetCartId() {
28968
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 28969
    }
28970
 
553 chandransh 28971
    public void setCartIdIsSet(boolean value) {
28972
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 28973
    }
28974
 
28975
    public void setFieldValue(_Fields field, Object value) {
28976
      switch (field) {
553 chandransh 28977
      case CART_ID:
48 ashish 28978
        if (value == null) {
553 chandransh 28979
          unsetCartId();
48 ashish 28980
        } else {
553 chandransh 28981
          setCartId((Long)value);
48 ashish 28982
        }
28983
        break;
28984
 
28985
      }
28986
    }
28987
 
28988
    public void setFieldValue(int fieldID, Object value) {
28989
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28990
    }
28991
 
28992
    public Object getFieldValue(_Fields field) {
28993
      switch (field) {
553 chandransh 28994
      case CART_ID:
28995
        return new Long(getCartId());
48 ashish 28996
 
28997
      }
28998
      throw new IllegalStateException();
28999
    }
29000
 
29001
    public Object getFieldValue(int fieldId) {
29002
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29003
    }
29004
 
29005
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29006
    public boolean isSet(_Fields field) {
29007
      switch (field) {
553 chandransh 29008
      case CART_ID:
29009
        return isSetCartId();
48 ashish 29010
      }
29011
      throw new IllegalStateException();
29012
    }
29013
 
29014
    public boolean isSet(int fieldID) {
29015
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29016
    }
29017
 
29018
    @Override
29019
    public boolean equals(Object that) {
29020
      if (that == null)
29021
        return false;
553 chandransh 29022
      if (that instanceof validateCart_args)
29023
        return this.equals((validateCart_args)that);
48 ashish 29024
      return false;
29025
    }
29026
 
553 chandransh 29027
    public boolean equals(validateCart_args that) {
48 ashish 29028
      if (that == null)
29029
        return false;
29030
 
553 chandransh 29031
      boolean this_present_cartId = true;
29032
      boolean that_present_cartId = true;
29033
      if (this_present_cartId || that_present_cartId) {
29034
        if (!(this_present_cartId && that_present_cartId))
48 ashish 29035
          return false;
553 chandransh 29036
        if (this.cartId != that.cartId)
48 ashish 29037
          return false;
29038
      }
29039
 
29040
      return true;
29041
    }
29042
 
29043
    @Override
29044
    public int hashCode() {
29045
      return 0;
29046
    }
29047
 
553 chandransh 29048
    public int compareTo(validateCart_args other) {
48 ashish 29049
      if (!getClass().equals(other.getClass())) {
29050
        return getClass().getName().compareTo(other.getClass().getName());
29051
      }
29052
 
29053
      int lastComparison = 0;
553 chandransh 29054
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 29055
 
553 chandransh 29056
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 29057
      if (lastComparison != 0) {
29058
        return lastComparison;
29059
      }
553 chandransh 29060
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 29061
      if (lastComparison != 0) {
29062
        return lastComparison;
29063
      }
29064
      return 0;
29065
    }
29066
 
29067
    public void read(TProtocol iprot) throws TException {
29068
      TField field;
29069
      iprot.readStructBegin();
29070
      while (true)
29071
      {
29072
        field = iprot.readFieldBegin();
29073
        if (field.type == TType.STOP) { 
29074
          break;
29075
        }
29076
        _Fields fieldId = _Fields.findByThriftId(field.id);
29077
        if (fieldId == null) {
29078
          TProtocolUtil.skip(iprot, field.type);
29079
        } else {
29080
          switch (fieldId) {
553 chandransh 29081
            case CART_ID:
48 ashish 29082
              if (field.type == TType.I64) {
553 chandransh 29083
                this.cartId = iprot.readI64();
29084
                setCartIdIsSet(true);
48 ashish 29085
              } else { 
29086
                TProtocolUtil.skip(iprot, field.type);
29087
              }
29088
              break;
29089
          }
29090
          iprot.readFieldEnd();
29091
        }
29092
      }
29093
      iprot.readStructEnd();
29094
      validate();
29095
    }
29096
 
29097
    public void write(TProtocol oprot) throws TException {
29098
      validate();
29099
 
29100
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 29101
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
29102
      oprot.writeI64(this.cartId);
48 ashish 29103
      oprot.writeFieldEnd();
29104
      oprot.writeFieldStop();
29105
      oprot.writeStructEnd();
29106
    }
29107
 
29108
    @Override
29109
    public String toString() {
553 chandransh 29110
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 29111
      boolean first = true;
29112
 
553 chandransh 29113
      sb.append("cartId:");
29114
      sb.append(this.cartId);
48 ashish 29115
      first = false;
29116
      sb.append(")");
29117
      return sb.toString();
29118
    }
29119
 
29120
    public void validate() throws TException {
29121
      // check for required fields
29122
    }
29123
 
29124
  }
29125
 
553 chandransh 29126
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
29127
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 29128
 
1466 ankur.sing 29129
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
578 chandransh 29130
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 29131
 
1466 ankur.sing 29132
    private String success;
578 chandransh 29133
    private ShoppingCartException scex;
48 ashish 29134
 
29135
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29136
    public enum _Fields implements TFieldIdEnum {
578 chandransh 29137
      SUCCESS((short)0, "success"),
29138
      SCEX((short)1, "scex");
48 ashish 29139
 
29140
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29141
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29142
 
29143
      static {
29144
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29145
          byId.put((int)field._thriftId, field);
29146
          byName.put(field.getFieldName(), field);
29147
        }
29148
      }
29149
 
29150
      /**
29151
       * Find the _Fields constant that matches fieldId, or null if its not found.
29152
       */
29153
      public static _Fields findByThriftId(int fieldId) {
29154
        return byId.get(fieldId);
29155
      }
29156
 
29157
      /**
29158
       * Find the _Fields constant that matches fieldId, throwing an exception
29159
       * if it is not found.
29160
       */
29161
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29162
        _Fields fields = findByThriftId(fieldId);
29163
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29164
        return fields;
29165
      }
29166
 
29167
      /**
29168
       * Find the _Fields constant that matches name, or null if its not found.
29169
       */
29170
      public static _Fields findByName(String name) {
29171
        return byName.get(name);
29172
      }
29173
 
29174
      private final short _thriftId;
29175
      private final String _fieldName;
29176
 
29177
      _Fields(short thriftId, String fieldName) {
29178
        _thriftId = thriftId;
29179
        _fieldName = fieldName;
29180
      }
29181
 
29182
      public short getThriftFieldId() {
29183
        return _thriftId;
29184
      }
29185
 
29186
      public String getFieldName() {
29187
        return _fieldName;
29188
      }
29189
    }
29190
 
29191
    // isset id assignments
29192
 
29193
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29194
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1466 ankur.sing 29195
          new FieldValueMetaData(TType.STRING)));
578 chandransh 29196
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
29197
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 29198
    }});
29199
 
29200
    static {
553 chandransh 29201
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 29202
    }
29203
 
553 chandransh 29204
    public validateCart_result() {
48 ashish 29205
    }
29206
 
553 chandransh 29207
    public validateCart_result(
1466 ankur.sing 29208
      String success,
578 chandransh 29209
      ShoppingCartException scex)
48 ashish 29210
    {
29211
      this();
29212
      this.success = success;
578 chandransh 29213
      this.scex = scex;
48 ashish 29214
    }
29215
 
29216
    /**
29217
     * Performs a deep copy on <i>other</i>.
29218
     */
553 chandransh 29219
    public validateCart_result(validateCart_result other) {
1466 ankur.sing 29220
      if (other.isSetSuccess()) {
29221
        this.success = other.success;
29222
      }
578 chandransh 29223
      if (other.isSetScex()) {
29224
        this.scex = new ShoppingCartException(other.scex);
29225
      }
48 ashish 29226
    }
29227
 
553 chandransh 29228
    public validateCart_result deepCopy() {
29229
      return new validateCart_result(this);
48 ashish 29230
    }
29231
 
29232
    @Deprecated
553 chandransh 29233
    public validateCart_result clone() {
29234
      return new validateCart_result(this);
48 ashish 29235
    }
29236
 
1466 ankur.sing 29237
    public String getSuccess() {
48 ashish 29238
      return this.success;
29239
    }
29240
 
1466 ankur.sing 29241
    public validateCart_result setSuccess(String success) {
48 ashish 29242
      this.success = success;
29243
      return this;
29244
    }
29245
 
29246
    public void unsetSuccess() {
1466 ankur.sing 29247
      this.success = null;
48 ashish 29248
    }
29249
 
29250
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29251
    public boolean isSetSuccess() {
1466 ankur.sing 29252
      return this.success != null;
48 ashish 29253
    }
29254
 
29255
    public void setSuccessIsSet(boolean value) {
1466 ankur.sing 29256
      if (!value) {
29257
        this.success = null;
29258
      }
48 ashish 29259
    }
29260
 
578 chandransh 29261
    public ShoppingCartException getScex() {
29262
      return this.scex;
29263
    }
29264
 
29265
    public validateCart_result setScex(ShoppingCartException scex) {
29266
      this.scex = scex;
29267
      return this;
29268
    }
29269
 
29270
    public void unsetScex() {
29271
      this.scex = null;
29272
    }
29273
 
29274
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
29275
    public boolean isSetScex() {
29276
      return this.scex != null;
29277
    }
29278
 
29279
    public void setScexIsSet(boolean value) {
29280
      if (!value) {
29281
        this.scex = null;
29282
      }
29283
    }
29284
 
553 chandransh 29285
    public void setFieldValue(_Fields field, Object value) {
29286
      switch (field) {
29287
      case SUCCESS:
29288
        if (value == null) {
29289
          unsetSuccess();
29290
        } else {
1466 ankur.sing 29291
          setSuccess((String)value);
553 chandransh 29292
        }
29293
        break;
29294
 
578 chandransh 29295
      case SCEX:
29296
        if (value == null) {
29297
          unsetScex();
29298
        } else {
29299
          setScex((ShoppingCartException)value);
29300
        }
29301
        break;
29302
 
553 chandransh 29303
      }
48 ashish 29304
    }
29305
 
553 chandransh 29306
    public void setFieldValue(int fieldID, Object value) {
29307
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29308
    }
29309
 
29310
    public Object getFieldValue(_Fields field) {
29311
      switch (field) {
29312
      case SUCCESS:
1466 ankur.sing 29313
        return getSuccess();
553 chandransh 29314
 
578 chandransh 29315
      case SCEX:
29316
        return getScex();
29317
 
553 chandransh 29318
      }
29319
      throw new IllegalStateException();
29320
    }
29321
 
29322
    public Object getFieldValue(int fieldId) {
29323
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29324
    }
29325
 
29326
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29327
    public boolean isSet(_Fields field) {
29328
      switch (field) {
29329
      case SUCCESS:
29330
        return isSetSuccess();
578 chandransh 29331
      case SCEX:
29332
        return isSetScex();
553 chandransh 29333
      }
29334
      throw new IllegalStateException();
29335
    }
29336
 
29337
    public boolean isSet(int fieldID) {
29338
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29339
    }
29340
 
29341
    @Override
29342
    public boolean equals(Object that) {
29343
      if (that == null)
29344
        return false;
29345
      if (that instanceof validateCart_result)
29346
        return this.equals((validateCart_result)that);
29347
      return false;
29348
    }
29349
 
29350
    public boolean equals(validateCart_result that) {
29351
      if (that == null)
29352
        return false;
29353
 
1466 ankur.sing 29354
      boolean this_present_success = true && this.isSetSuccess();
29355
      boolean that_present_success = true && that.isSetSuccess();
553 chandransh 29356
      if (this_present_success || that_present_success) {
29357
        if (!(this_present_success && that_present_success))
29358
          return false;
1466 ankur.sing 29359
        if (!this.success.equals(that.success))
553 chandransh 29360
          return false;
29361
      }
29362
 
578 chandransh 29363
      boolean this_present_scex = true && this.isSetScex();
29364
      boolean that_present_scex = true && that.isSetScex();
29365
      if (this_present_scex || that_present_scex) {
29366
        if (!(this_present_scex && that_present_scex))
29367
          return false;
29368
        if (!this.scex.equals(that.scex))
29369
          return false;
29370
      }
29371
 
553 chandransh 29372
      return true;
29373
    }
29374
 
29375
    @Override
29376
    public int hashCode() {
29377
      return 0;
29378
    }
29379
 
29380
    public int compareTo(validateCart_result other) {
29381
      if (!getClass().equals(other.getClass())) {
29382
        return getClass().getName().compareTo(other.getClass().getName());
29383
      }
29384
 
29385
      int lastComparison = 0;
29386
      validateCart_result typedOther = (validateCart_result)other;
29387
 
29388
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29389
      if (lastComparison != 0) {
29390
        return lastComparison;
29391
      }
29392
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29393
      if (lastComparison != 0) {
29394
        return lastComparison;
29395
      }
578 chandransh 29396
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
29397
      if (lastComparison != 0) {
29398
        return lastComparison;
29399
      }
29400
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
29401
      if (lastComparison != 0) {
29402
        return lastComparison;
29403
      }
553 chandransh 29404
      return 0;
29405
    }
29406
 
29407
    public void read(TProtocol iprot) throws TException {
29408
      TField field;
29409
      iprot.readStructBegin();
29410
      while (true)
29411
      {
29412
        field = iprot.readFieldBegin();
29413
        if (field.type == TType.STOP) { 
29414
          break;
29415
        }
29416
        _Fields fieldId = _Fields.findByThriftId(field.id);
29417
        if (fieldId == null) {
29418
          TProtocolUtil.skip(iprot, field.type);
29419
        } else {
29420
          switch (fieldId) {
29421
            case SUCCESS:
1466 ankur.sing 29422
              if (field.type == TType.STRING) {
29423
                this.success = iprot.readString();
553 chandransh 29424
              } else { 
29425
                TProtocolUtil.skip(iprot, field.type);
29426
              }
29427
              break;
578 chandransh 29428
            case SCEX:
29429
              if (field.type == TType.STRUCT) {
29430
                this.scex = new ShoppingCartException();
29431
                this.scex.read(iprot);
29432
              } else { 
29433
                TProtocolUtil.skip(iprot, field.type);
29434
              }
29435
              break;
553 chandransh 29436
          }
29437
          iprot.readFieldEnd();
29438
        }
29439
      }
29440
      iprot.readStructEnd();
29441
      validate();
29442
    }
29443
 
29444
    public void write(TProtocol oprot) throws TException {
29445
      oprot.writeStructBegin(STRUCT_DESC);
29446
 
29447
      if (this.isSetSuccess()) {
29448
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1466 ankur.sing 29449
        oprot.writeString(this.success);
553 chandransh 29450
        oprot.writeFieldEnd();
578 chandransh 29451
      } else if (this.isSetScex()) {
29452
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
29453
        this.scex.write(oprot);
29454
        oprot.writeFieldEnd();
553 chandransh 29455
      }
29456
      oprot.writeFieldStop();
29457
      oprot.writeStructEnd();
29458
    }
29459
 
29460
    @Override
29461
    public String toString() {
29462
      StringBuilder sb = new StringBuilder("validateCart_result(");
29463
      boolean first = true;
29464
 
29465
      sb.append("success:");
1466 ankur.sing 29466
      if (this.success == null) {
29467
        sb.append("null");
29468
      } else {
29469
        sb.append(this.success);
29470
      }
553 chandransh 29471
      first = false;
578 chandransh 29472
      if (!first) sb.append(", ");
29473
      sb.append("scex:");
29474
      if (this.scex == null) {
29475
        sb.append("null");
29476
      } else {
29477
        sb.append(this.scex);
29478
      }
29479
      first = false;
553 chandransh 29480
      sb.append(")");
29481
      return sb.toString();
29482
    }
29483
 
29484
    public void validate() throws TException {
29485
      // check for required fields
29486
    }
29487
 
29488
  }
29489
 
688 chandransh 29490
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
29491
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
578 chandransh 29492
 
688 chandransh 29493
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
29494
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
29495
 
29496
    private long fromCartId;
29497
    private long toCartId;
29498
 
29499
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29500
    public enum _Fields implements TFieldIdEnum {
29501
      FROM_CART_ID((short)1, "fromCartId"),
29502
      TO_CART_ID((short)2, "toCartId");
29503
 
29504
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29505
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29506
 
29507
      static {
29508
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29509
          byId.put((int)field._thriftId, field);
29510
          byName.put(field.getFieldName(), field);
29511
        }
29512
      }
29513
 
29514
      /**
29515
       * Find the _Fields constant that matches fieldId, or null if its not found.
29516
       */
29517
      public static _Fields findByThriftId(int fieldId) {
29518
        return byId.get(fieldId);
29519
      }
29520
 
29521
      /**
29522
       * Find the _Fields constant that matches fieldId, throwing an exception
29523
       * if it is not found.
29524
       */
29525
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29526
        _Fields fields = findByThriftId(fieldId);
29527
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29528
        return fields;
29529
      }
29530
 
29531
      /**
29532
       * Find the _Fields constant that matches name, or null if its not found.
29533
       */
29534
      public static _Fields findByName(String name) {
29535
        return byName.get(name);
29536
      }
29537
 
29538
      private final short _thriftId;
29539
      private final String _fieldName;
29540
 
29541
      _Fields(short thriftId, String fieldName) {
29542
        _thriftId = thriftId;
29543
        _fieldName = fieldName;
29544
      }
29545
 
29546
      public short getThriftFieldId() {
29547
        return _thriftId;
29548
      }
29549
 
29550
      public String getFieldName() {
29551
        return _fieldName;
29552
      }
29553
    }
29554
 
29555
    // isset id assignments
29556
    private static final int __FROMCARTID_ISSET_ID = 0;
29557
    private static final int __TOCARTID_ISSET_ID = 1;
29558
    private BitSet __isset_bit_vector = new BitSet(2);
29559
 
29560
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29561
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
29562
          new FieldValueMetaData(TType.I64)));
29563
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
29564
          new FieldValueMetaData(TType.I64)));
29565
    }});
29566
 
29567
    static {
29568
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
29569
    }
29570
 
29571
    public mergeCart_args() {
29572
    }
29573
 
29574
    public mergeCart_args(
29575
      long fromCartId,
29576
      long toCartId)
29577
    {
29578
      this();
29579
      this.fromCartId = fromCartId;
29580
      setFromCartIdIsSet(true);
29581
      this.toCartId = toCartId;
29582
      setToCartIdIsSet(true);
29583
    }
29584
 
29585
    /**
29586
     * Performs a deep copy on <i>other</i>.
29587
     */
29588
    public mergeCart_args(mergeCart_args other) {
29589
      __isset_bit_vector.clear();
29590
      __isset_bit_vector.or(other.__isset_bit_vector);
29591
      this.fromCartId = other.fromCartId;
29592
      this.toCartId = other.toCartId;
29593
    }
29594
 
29595
    public mergeCart_args deepCopy() {
29596
      return new mergeCart_args(this);
29597
    }
29598
 
29599
    @Deprecated
29600
    public mergeCart_args clone() {
29601
      return new mergeCart_args(this);
29602
    }
29603
 
29604
    public long getFromCartId() {
29605
      return this.fromCartId;
29606
    }
29607
 
29608
    public mergeCart_args setFromCartId(long fromCartId) {
29609
      this.fromCartId = fromCartId;
29610
      setFromCartIdIsSet(true);
29611
      return this;
29612
    }
29613
 
29614
    public void unsetFromCartId() {
29615
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
29616
    }
29617
 
29618
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
29619
    public boolean isSetFromCartId() {
29620
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
29621
    }
29622
 
29623
    public void setFromCartIdIsSet(boolean value) {
29624
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
29625
    }
29626
 
29627
    public long getToCartId() {
29628
      return this.toCartId;
29629
    }
29630
 
29631
    public mergeCart_args setToCartId(long toCartId) {
29632
      this.toCartId = toCartId;
29633
      setToCartIdIsSet(true);
29634
      return this;
29635
    }
29636
 
29637
    public void unsetToCartId() {
29638
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
29639
    }
29640
 
29641
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
29642
    public boolean isSetToCartId() {
29643
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
29644
    }
29645
 
29646
    public void setToCartIdIsSet(boolean value) {
29647
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
29648
    }
29649
 
29650
    public void setFieldValue(_Fields field, Object value) {
29651
      switch (field) {
29652
      case FROM_CART_ID:
29653
        if (value == null) {
29654
          unsetFromCartId();
29655
        } else {
29656
          setFromCartId((Long)value);
29657
        }
29658
        break;
29659
 
29660
      case TO_CART_ID:
29661
        if (value == null) {
29662
          unsetToCartId();
29663
        } else {
29664
          setToCartId((Long)value);
29665
        }
29666
        break;
29667
 
29668
      }
29669
    }
29670
 
29671
    public void setFieldValue(int fieldID, Object value) {
29672
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29673
    }
29674
 
29675
    public Object getFieldValue(_Fields field) {
29676
      switch (field) {
29677
      case FROM_CART_ID:
29678
        return new Long(getFromCartId());
29679
 
29680
      case TO_CART_ID:
29681
        return new Long(getToCartId());
29682
 
29683
      }
29684
      throw new IllegalStateException();
29685
    }
29686
 
29687
    public Object getFieldValue(int fieldId) {
29688
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29689
    }
29690
 
29691
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29692
    public boolean isSet(_Fields field) {
29693
      switch (field) {
29694
      case FROM_CART_ID:
29695
        return isSetFromCartId();
29696
      case TO_CART_ID:
29697
        return isSetToCartId();
29698
      }
29699
      throw new IllegalStateException();
29700
    }
29701
 
29702
    public boolean isSet(int fieldID) {
29703
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29704
    }
29705
 
29706
    @Override
29707
    public boolean equals(Object that) {
29708
      if (that == null)
29709
        return false;
29710
      if (that instanceof mergeCart_args)
29711
        return this.equals((mergeCart_args)that);
29712
      return false;
29713
    }
29714
 
29715
    public boolean equals(mergeCart_args that) {
29716
      if (that == null)
29717
        return false;
29718
 
29719
      boolean this_present_fromCartId = true;
29720
      boolean that_present_fromCartId = true;
29721
      if (this_present_fromCartId || that_present_fromCartId) {
29722
        if (!(this_present_fromCartId && that_present_fromCartId))
29723
          return false;
29724
        if (this.fromCartId != that.fromCartId)
29725
          return false;
29726
      }
29727
 
29728
      boolean this_present_toCartId = true;
29729
      boolean that_present_toCartId = true;
29730
      if (this_present_toCartId || that_present_toCartId) {
29731
        if (!(this_present_toCartId && that_present_toCartId))
29732
          return false;
29733
        if (this.toCartId != that.toCartId)
29734
          return false;
29735
      }
29736
 
29737
      return true;
29738
    }
29739
 
29740
    @Override
29741
    public int hashCode() {
29742
      return 0;
29743
    }
29744
 
29745
    public int compareTo(mergeCart_args other) {
29746
      if (!getClass().equals(other.getClass())) {
29747
        return getClass().getName().compareTo(other.getClass().getName());
29748
      }
29749
 
29750
      int lastComparison = 0;
29751
      mergeCart_args typedOther = (mergeCart_args)other;
29752
 
29753
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
29754
      if (lastComparison != 0) {
29755
        return lastComparison;
29756
      }
29757
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
29758
      if (lastComparison != 0) {
29759
        return lastComparison;
29760
      }
29761
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
29762
      if (lastComparison != 0) {
29763
        return lastComparison;
29764
      }
29765
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
29766
      if (lastComparison != 0) {
29767
        return lastComparison;
29768
      }
29769
      return 0;
29770
    }
29771
 
29772
    public void read(TProtocol iprot) throws TException {
29773
      TField field;
29774
      iprot.readStructBegin();
29775
      while (true)
29776
      {
29777
        field = iprot.readFieldBegin();
29778
        if (field.type == TType.STOP) { 
29779
          break;
29780
        }
29781
        _Fields fieldId = _Fields.findByThriftId(field.id);
29782
        if (fieldId == null) {
29783
          TProtocolUtil.skip(iprot, field.type);
29784
        } else {
29785
          switch (fieldId) {
29786
            case FROM_CART_ID:
29787
              if (field.type == TType.I64) {
29788
                this.fromCartId = iprot.readI64();
29789
                setFromCartIdIsSet(true);
29790
              } else { 
29791
                TProtocolUtil.skip(iprot, field.type);
29792
              }
29793
              break;
29794
            case TO_CART_ID:
29795
              if (field.type == TType.I64) {
29796
                this.toCartId = iprot.readI64();
29797
                setToCartIdIsSet(true);
29798
              } else { 
29799
                TProtocolUtil.skip(iprot, field.type);
29800
              }
29801
              break;
29802
          }
29803
          iprot.readFieldEnd();
29804
        }
29805
      }
29806
      iprot.readStructEnd();
29807
      validate();
29808
    }
29809
 
29810
    public void write(TProtocol oprot) throws TException {
29811
      validate();
29812
 
29813
      oprot.writeStructBegin(STRUCT_DESC);
29814
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
29815
      oprot.writeI64(this.fromCartId);
29816
      oprot.writeFieldEnd();
29817
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
29818
      oprot.writeI64(this.toCartId);
29819
      oprot.writeFieldEnd();
29820
      oprot.writeFieldStop();
29821
      oprot.writeStructEnd();
29822
    }
29823
 
29824
    @Override
29825
    public String toString() {
29826
      StringBuilder sb = new StringBuilder("mergeCart_args(");
29827
      boolean first = true;
29828
 
29829
      sb.append("fromCartId:");
29830
      sb.append(this.fromCartId);
29831
      first = false;
29832
      if (!first) sb.append(", ");
29833
      sb.append("toCartId:");
29834
      sb.append(this.toCartId);
29835
      first = false;
29836
      sb.append(")");
29837
      return sb.toString();
29838
    }
29839
 
29840
    public void validate() throws TException {
29841
      // check for required fields
29842
    }
29843
 
29844
  }
29845
 
29846
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
29847
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
29848
 
29849
 
29850
 
29851
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29852
    public enum _Fields implements TFieldIdEnum {
29853
;
29854
 
29855
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29856
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29857
 
29858
      static {
29859
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29860
          byId.put((int)field._thriftId, field);
29861
          byName.put(field.getFieldName(), field);
29862
        }
29863
      }
29864
 
29865
      /**
29866
       * Find the _Fields constant that matches fieldId, or null if its not found.
29867
       */
29868
      public static _Fields findByThriftId(int fieldId) {
29869
        return byId.get(fieldId);
29870
      }
29871
 
29872
      /**
29873
       * Find the _Fields constant that matches fieldId, throwing an exception
29874
       * if it is not found.
29875
       */
29876
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29877
        _Fields fields = findByThriftId(fieldId);
29878
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29879
        return fields;
29880
      }
29881
 
29882
      /**
29883
       * Find the _Fields constant that matches name, or null if its not found.
29884
       */
29885
      public static _Fields findByName(String name) {
29886
        return byName.get(name);
29887
      }
29888
 
29889
      private final short _thriftId;
29890
      private final String _fieldName;
29891
 
29892
      _Fields(short thriftId, String fieldName) {
29893
        _thriftId = thriftId;
29894
        _fieldName = fieldName;
29895
      }
29896
 
29897
      public short getThriftFieldId() {
29898
        return _thriftId;
29899
      }
29900
 
29901
      public String getFieldName() {
29902
        return _fieldName;
29903
      }
29904
    }
29905
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29906
    }});
29907
 
29908
    static {
29909
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
29910
    }
29911
 
29912
    public mergeCart_result() {
29913
    }
29914
 
29915
    /**
29916
     * Performs a deep copy on <i>other</i>.
29917
     */
29918
    public mergeCart_result(mergeCart_result other) {
29919
    }
29920
 
29921
    public mergeCart_result deepCopy() {
29922
      return new mergeCart_result(this);
29923
    }
29924
 
29925
    @Deprecated
29926
    public mergeCart_result clone() {
29927
      return new mergeCart_result(this);
29928
    }
29929
 
29930
    public void setFieldValue(_Fields field, Object value) {
29931
      switch (field) {
29932
      }
29933
    }
29934
 
29935
    public void setFieldValue(int fieldID, Object value) {
29936
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29937
    }
29938
 
29939
    public Object getFieldValue(_Fields field) {
29940
      switch (field) {
29941
      }
29942
      throw new IllegalStateException();
29943
    }
29944
 
29945
    public Object getFieldValue(int fieldId) {
29946
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29947
    }
29948
 
29949
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29950
    public boolean isSet(_Fields field) {
29951
      switch (field) {
29952
      }
29953
      throw new IllegalStateException();
29954
    }
29955
 
29956
    public boolean isSet(int fieldID) {
29957
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29958
    }
29959
 
29960
    @Override
29961
    public boolean equals(Object that) {
29962
      if (that == null)
29963
        return false;
29964
      if (that instanceof mergeCart_result)
29965
        return this.equals((mergeCart_result)that);
29966
      return false;
29967
    }
29968
 
29969
    public boolean equals(mergeCart_result that) {
29970
      if (that == null)
29971
        return false;
29972
 
29973
      return true;
29974
    }
29975
 
29976
    @Override
29977
    public int hashCode() {
29978
      return 0;
29979
    }
29980
 
29981
    public int compareTo(mergeCart_result other) {
29982
      if (!getClass().equals(other.getClass())) {
29983
        return getClass().getName().compareTo(other.getClass().getName());
29984
      }
29985
 
29986
      int lastComparison = 0;
29987
      mergeCart_result typedOther = (mergeCart_result)other;
29988
 
29989
      return 0;
29990
    }
29991
 
29992
    public void read(TProtocol iprot) throws TException {
29993
      TField field;
29994
      iprot.readStructBegin();
29995
      while (true)
29996
      {
29997
        field = iprot.readFieldBegin();
29998
        if (field.type == TType.STOP) { 
29999
          break;
30000
        }
30001
        _Fields fieldId = _Fields.findByThriftId(field.id);
30002
        if (fieldId == null) {
30003
          TProtocolUtil.skip(iprot, field.type);
30004
        } else {
30005
          switch (fieldId) {
30006
          }
30007
          iprot.readFieldEnd();
30008
        }
30009
      }
30010
      iprot.readStructEnd();
30011
      validate();
30012
    }
30013
 
30014
    public void write(TProtocol oprot) throws TException {
30015
      oprot.writeStructBegin(STRUCT_DESC);
30016
 
30017
      oprot.writeFieldStop();
30018
      oprot.writeStructEnd();
30019
    }
30020
 
30021
    @Override
30022
    public String toString() {
30023
      StringBuilder sb = new StringBuilder("mergeCart_result(");
30024
      boolean first = true;
30025
 
30026
      sb.append(")");
30027
      return sb.toString();
30028
    }
30029
 
30030
    public void validate() throws TException {
30031
      // check for required fields
30032
    }
30033
 
30034
  }
30035
 
30036
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
30037
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
30038
 
578 chandransh 30039
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
30040
 
30041
    private long cartId;
30042
 
30043
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30044
    public enum _Fields implements TFieldIdEnum {
30045
      CART_ID((short)1, "cartId");
30046
 
30047
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30048
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30049
 
30050
      static {
30051
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30052
          byId.put((int)field._thriftId, field);
30053
          byName.put(field.getFieldName(), field);
30054
        }
30055
      }
30056
 
30057
      /**
30058
       * Find the _Fields constant that matches fieldId, or null if its not found.
30059
       */
30060
      public static _Fields findByThriftId(int fieldId) {
30061
        return byId.get(fieldId);
30062
      }
30063
 
30064
      /**
30065
       * Find the _Fields constant that matches fieldId, throwing an exception
30066
       * if it is not found.
30067
       */
30068
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30069
        _Fields fields = findByThriftId(fieldId);
30070
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30071
        return fields;
30072
      }
30073
 
30074
      /**
30075
       * Find the _Fields constant that matches name, or null if its not found.
30076
       */
30077
      public static _Fields findByName(String name) {
30078
        return byName.get(name);
30079
      }
30080
 
30081
      private final short _thriftId;
30082
      private final String _fieldName;
30083
 
30084
      _Fields(short thriftId, String fieldName) {
30085
        _thriftId = thriftId;
30086
        _fieldName = fieldName;
30087
      }
30088
 
30089
      public short getThriftFieldId() {
30090
        return _thriftId;
30091
      }
30092
 
30093
      public String getFieldName() {
30094
        return _fieldName;
30095
      }
30096
    }
30097
 
30098
    // isset id assignments
30099
    private static final int __CARTID_ISSET_ID = 0;
30100
    private BitSet __isset_bit_vector = new BitSet(1);
30101
 
30102
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30103
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
30104
          new FieldValueMetaData(TType.I64)));
30105
    }});
30106
 
30107
    static {
688 chandransh 30108
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
578 chandransh 30109
    }
30110
 
688 chandransh 30111
    public checkOut_args() {
578 chandransh 30112
    }
30113
 
688 chandransh 30114
    public checkOut_args(
578 chandransh 30115
      long cartId)
30116
    {
30117
      this();
30118
      this.cartId = cartId;
30119
      setCartIdIsSet(true);
30120
    }
30121
 
30122
    /**
30123
     * Performs a deep copy on <i>other</i>.
30124
     */
688 chandransh 30125
    public checkOut_args(checkOut_args other) {
578 chandransh 30126
      __isset_bit_vector.clear();
30127
      __isset_bit_vector.or(other.__isset_bit_vector);
30128
      this.cartId = other.cartId;
30129
    }
30130
 
688 chandransh 30131
    public checkOut_args deepCopy() {
30132
      return new checkOut_args(this);
578 chandransh 30133
    }
30134
 
30135
    @Deprecated
688 chandransh 30136
    public checkOut_args clone() {
30137
      return new checkOut_args(this);
578 chandransh 30138
    }
30139
 
30140
    public long getCartId() {
30141
      return this.cartId;
30142
    }
30143
 
688 chandransh 30144
    public checkOut_args setCartId(long cartId) {
578 chandransh 30145
      this.cartId = cartId;
30146
      setCartIdIsSet(true);
30147
      return this;
30148
    }
30149
 
30150
    public void unsetCartId() {
30151
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
30152
    }
30153
 
30154
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
30155
    public boolean isSetCartId() {
30156
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
30157
    }
30158
 
30159
    public void setCartIdIsSet(boolean value) {
30160
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
30161
    }
30162
 
30163
    public void setFieldValue(_Fields field, Object value) {
30164
      switch (field) {
30165
      case CART_ID:
30166
        if (value == null) {
30167
          unsetCartId();
30168
        } else {
30169
          setCartId((Long)value);
30170
        }
30171
        break;
30172
 
30173
      }
30174
    }
30175
 
30176
    public void setFieldValue(int fieldID, Object value) {
30177
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30178
    }
30179
 
30180
    public Object getFieldValue(_Fields field) {
30181
      switch (field) {
30182
      case CART_ID:
30183
        return new Long(getCartId());
30184
 
30185
      }
30186
      throw new IllegalStateException();
30187
    }
30188
 
30189
    public Object getFieldValue(int fieldId) {
30190
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30191
    }
30192
 
30193
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30194
    public boolean isSet(_Fields field) {
30195
      switch (field) {
30196
      case CART_ID:
30197
        return isSetCartId();
30198
      }
30199
      throw new IllegalStateException();
30200
    }
30201
 
30202
    public boolean isSet(int fieldID) {
30203
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30204
    }
30205
 
30206
    @Override
30207
    public boolean equals(Object that) {
30208
      if (that == null)
30209
        return false;
688 chandransh 30210
      if (that instanceof checkOut_args)
30211
        return this.equals((checkOut_args)that);
578 chandransh 30212
      return false;
30213
    }
30214
 
688 chandransh 30215
    public boolean equals(checkOut_args that) {
578 chandransh 30216
      if (that == null)
30217
        return false;
30218
 
30219
      boolean this_present_cartId = true;
30220
      boolean that_present_cartId = true;
30221
      if (this_present_cartId || that_present_cartId) {
30222
        if (!(this_present_cartId && that_present_cartId))
30223
          return false;
30224
        if (this.cartId != that.cartId)
30225
          return false;
30226
      }
30227
 
30228
      return true;
30229
    }
30230
 
30231
    @Override
30232
    public int hashCode() {
30233
      return 0;
30234
    }
30235
 
688 chandransh 30236
    public int compareTo(checkOut_args other) {
578 chandransh 30237
      if (!getClass().equals(other.getClass())) {
30238
        return getClass().getName().compareTo(other.getClass().getName());
30239
      }
30240
 
30241
      int lastComparison = 0;
688 chandransh 30242
      checkOut_args typedOther = (checkOut_args)other;
578 chandransh 30243
 
30244
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
30245
      if (lastComparison != 0) {
30246
        return lastComparison;
30247
      }
30248
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
30249
      if (lastComparison != 0) {
30250
        return lastComparison;
30251
      }
30252
      return 0;
30253
    }
30254
 
30255
    public void read(TProtocol iprot) throws TException {
30256
      TField field;
30257
      iprot.readStructBegin();
30258
      while (true)
30259
      {
30260
        field = iprot.readFieldBegin();
30261
        if (field.type == TType.STOP) { 
30262
          break;
30263
        }
30264
        _Fields fieldId = _Fields.findByThriftId(field.id);
30265
        if (fieldId == null) {
30266
          TProtocolUtil.skip(iprot, field.type);
30267
        } else {
30268
          switch (fieldId) {
30269
            case CART_ID:
30270
              if (field.type == TType.I64) {
30271
                this.cartId = iprot.readI64();
30272
                setCartIdIsSet(true);
30273
              } else { 
30274
                TProtocolUtil.skip(iprot, field.type);
30275
              }
30276
              break;
30277
          }
30278
          iprot.readFieldEnd();
30279
        }
30280
      }
30281
      iprot.readStructEnd();
30282
      validate();
30283
    }
30284
 
30285
    public void write(TProtocol oprot) throws TException {
30286
      validate();
30287
 
30288
      oprot.writeStructBegin(STRUCT_DESC);
30289
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
30290
      oprot.writeI64(this.cartId);
30291
      oprot.writeFieldEnd();
30292
      oprot.writeFieldStop();
30293
      oprot.writeStructEnd();
30294
    }
30295
 
30296
    @Override
30297
    public String toString() {
688 chandransh 30298
      StringBuilder sb = new StringBuilder("checkOut_args(");
578 chandransh 30299
      boolean first = true;
30300
 
30301
      sb.append("cartId:");
30302
      sb.append(this.cartId);
30303
      first = false;
30304
      sb.append(")");
30305
      return sb.toString();
30306
    }
30307
 
30308
    public void validate() throws TException {
30309
      // check for required fields
30310
    }
30311
 
30312
  }
30313
 
688 chandransh 30314
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
30315
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
578 chandransh 30316
 
30317
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
30318
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
30319
 
30320
    private boolean success;
30321
    private ShoppingCartException scex;
30322
 
30323
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30324
    public enum _Fields implements TFieldIdEnum {
30325
      SUCCESS((short)0, "success"),
30326
      SCEX((short)1, "scex");
30327
 
30328
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30329
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30330
 
30331
      static {
30332
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30333
          byId.put((int)field._thriftId, field);
30334
          byName.put(field.getFieldName(), field);
30335
        }
30336
      }
30337
 
30338
      /**
30339
       * Find the _Fields constant that matches fieldId, or null if its not found.
30340
       */
30341
      public static _Fields findByThriftId(int fieldId) {
30342
        return byId.get(fieldId);
30343
      }
30344
 
30345
      /**
30346
       * Find the _Fields constant that matches fieldId, throwing an exception
30347
       * if it is not found.
30348
       */
30349
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30350
        _Fields fields = findByThriftId(fieldId);
30351
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30352
        return fields;
30353
      }
30354
 
30355
      /**
30356
       * Find the _Fields constant that matches name, or null if its not found.
30357
       */
30358
      public static _Fields findByName(String name) {
30359
        return byName.get(name);
30360
      }
30361
 
30362
      private final short _thriftId;
30363
      private final String _fieldName;
30364
 
30365
      _Fields(short thriftId, String fieldName) {
30366
        _thriftId = thriftId;
30367
        _fieldName = fieldName;
30368
      }
30369
 
30370
      public short getThriftFieldId() {
30371
        return _thriftId;
30372
      }
30373
 
30374
      public String getFieldName() {
30375
        return _fieldName;
30376
      }
30377
    }
30378
 
30379
    // isset id assignments
30380
    private static final int __SUCCESS_ISSET_ID = 0;
30381
    private BitSet __isset_bit_vector = new BitSet(1);
30382
 
30383
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30384
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30385
          new FieldValueMetaData(TType.BOOL)));
30386
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
30387
          new FieldValueMetaData(TType.STRUCT)));
30388
    }});
30389
 
30390
    static {
688 chandransh 30391
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
578 chandransh 30392
    }
30393
 
688 chandransh 30394
    public checkOut_result() {
578 chandransh 30395
    }
30396
 
688 chandransh 30397
    public checkOut_result(
578 chandransh 30398
      boolean success,
30399
      ShoppingCartException scex)
30400
    {
30401
      this();
30402
      this.success = success;
30403
      setSuccessIsSet(true);
30404
      this.scex = scex;
30405
    }
30406
 
30407
    /**
30408
     * Performs a deep copy on <i>other</i>.
30409
     */
688 chandransh 30410
    public checkOut_result(checkOut_result other) {
578 chandransh 30411
      __isset_bit_vector.clear();
30412
      __isset_bit_vector.or(other.__isset_bit_vector);
30413
      this.success = other.success;
30414
      if (other.isSetScex()) {
30415
        this.scex = new ShoppingCartException(other.scex);
30416
      }
30417
    }
30418
 
688 chandransh 30419
    public checkOut_result deepCopy() {
30420
      return new checkOut_result(this);
578 chandransh 30421
    }
30422
 
30423
    @Deprecated
688 chandransh 30424
    public checkOut_result clone() {
30425
      return new checkOut_result(this);
578 chandransh 30426
    }
30427
 
30428
    public boolean isSuccess() {
30429
      return this.success;
30430
    }
30431
 
688 chandransh 30432
    public checkOut_result setSuccess(boolean success) {
578 chandransh 30433
      this.success = success;
30434
      setSuccessIsSet(true);
30435
      return this;
30436
    }
30437
 
30438
    public void unsetSuccess() {
30439
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
30440
    }
30441
 
30442
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30443
    public boolean isSetSuccess() {
30444
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
30445
    }
30446
 
30447
    public void setSuccessIsSet(boolean value) {
30448
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
30449
    }
30450
 
30451
    public ShoppingCartException getScex() {
30452
      return this.scex;
30453
    }
30454
 
688 chandransh 30455
    public checkOut_result setScex(ShoppingCartException scex) {
578 chandransh 30456
      this.scex = scex;
30457
      return this;
30458
    }
30459
 
30460
    public void unsetScex() {
30461
      this.scex = null;
30462
    }
30463
 
30464
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
30465
    public boolean isSetScex() {
30466
      return this.scex != null;
30467
    }
30468
 
30469
    public void setScexIsSet(boolean value) {
30470
      if (!value) {
30471
        this.scex = null;
30472
      }
30473
    }
30474
 
30475
    public void setFieldValue(_Fields field, Object value) {
30476
      switch (field) {
30477
      case SUCCESS:
30478
        if (value == null) {
30479
          unsetSuccess();
30480
        } else {
30481
          setSuccess((Boolean)value);
30482
        }
30483
        break;
30484
 
30485
      case SCEX:
30486
        if (value == null) {
30487
          unsetScex();
30488
        } else {
30489
          setScex((ShoppingCartException)value);
30490
        }
30491
        break;
30492
 
30493
      }
30494
    }
30495
 
30496
    public void setFieldValue(int fieldID, Object value) {
30497
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30498
    }
30499
 
30500
    public Object getFieldValue(_Fields field) {
30501
      switch (field) {
30502
      case SUCCESS:
30503
        return new Boolean(isSuccess());
30504
 
30505
      case SCEX:
30506
        return getScex();
30507
 
30508
      }
30509
      throw new IllegalStateException();
30510
    }
30511
 
30512
    public Object getFieldValue(int fieldId) {
30513
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30514
    }
30515
 
30516
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30517
    public boolean isSet(_Fields field) {
30518
      switch (field) {
30519
      case SUCCESS:
30520
        return isSetSuccess();
30521
      case SCEX:
30522
        return isSetScex();
30523
      }
30524
      throw new IllegalStateException();
30525
    }
30526
 
30527
    public boolean isSet(int fieldID) {
30528
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30529
    }
30530
 
30531
    @Override
30532
    public boolean equals(Object that) {
30533
      if (that == null)
30534
        return false;
688 chandransh 30535
      if (that instanceof checkOut_result)
30536
        return this.equals((checkOut_result)that);
578 chandransh 30537
      return false;
30538
    }
30539
 
688 chandransh 30540
    public boolean equals(checkOut_result that) {
578 chandransh 30541
      if (that == null)
30542
        return false;
30543
 
30544
      boolean this_present_success = true;
30545
      boolean that_present_success = true;
30546
      if (this_present_success || that_present_success) {
30547
        if (!(this_present_success && that_present_success))
30548
          return false;
30549
        if (this.success != that.success)
30550
          return false;
30551
      }
30552
 
30553
      boolean this_present_scex = true && this.isSetScex();
30554
      boolean that_present_scex = true && that.isSetScex();
30555
      if (this_present_scex || that_present_scex) {
30556
        if (!(this_present_scex && that_present_scex))
30557
          return false;
30558
        if (!this.scex.equals(that.scex))
30559
          return false;
30560
      }
30561
 
30562
      return true;
30563
    }
30564
 
30565
    @Override
30566
    public int hashCode() {
30567
      return 0;
30568
    }
30569
 
688 chandransh 30570
    public int compareTo(checkOut_result other) {
578 chandransh 30571
      if (!getClass().equals(other.getClass())) {
30572
        return getClass().getName().compareTo(other.getClass().getName());
30573
      }
30574
 
30575
      int lastComparison = 0;
688 chandransh 30576
      checkOut_result typedOther = (checkOut_result)other;
578 chandransh 30577
 
30578
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30579
      if (lastComparison != 0) {
30580
        return lastComparison;
30581
      }
30582
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30583
      if (lastComparison != 0) {
30584
        return lastComparison;
30585
      }
30586
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
30587
      if (lastComparison != 0) {
30588
        return lastComparison;
30589
      }
30590
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
30591
      if (lastComparison != 0) {
30592
        return lastComparison;
30593
      }
30594
      return 0;
30595
    }
30596
 
30597
    public void read(TProtocol iprot) throws TException {
30598
      TField field;
30599
      iprot.readStructBegin();
30600
      while (true)
30601
      {
30602
        field = iprot.readFieldBegin();
30603
        if (field.type == TType.STOP) { 
30604
          break;
30605
        }
30606
        _Fields fieldId = _Fields.findByThriftId(field.id);
30607
        if (fieldId == null) {
30608
          TProtocolUtil.skip(iprot, field.type);
30609
        } else {
30610
          switch (fieldId) {
30611
            case SUCCESS:
30612
              if (field.type == TType.BOOL) {
30613
                this.success = iprot.readBool();
30614
                setSuccessIsSet(true);
30615
              } else { 
30616
                TProtocolUtil.skip(iprot, field.type);
30617
              }
30618
              break;
30619
            case SCEX:
30620
              if (field.type == TType.STRUCT) {
30621
                this.scex = new ShoppingCartException();
30622
                this.scex.read(iprot);
30623
              } else { 
30624
                TProtocolUtil.skip(iprot, field.type);
30625
              }
30626
              break;
30627
          }
30628
          iprot.readFieldEnd();
30629
        }
30630
      }
30631
      iprot.readStructEnd();
30632
      validate();
30633
    }
30634
 
30635
    public void write(TProtocol oprot) throws TException {
30636
      oprot.writeStructBegin(STRUCT_DESC);
30637
 
30638
      if (this.isSetSuccess()) {
30639
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30640
        oprot.writeBool(this.success);
30641
        oprot.writeFieldEnd();
30642
      } else if (this.isSetScex()) {
30643
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
30644
        this.scex.write(oprot);
30645
        oprot.writeFieldEnd();
30646
      }
30647
      oprot.writeFieldStop();
30648
      oprot.writeStructEnd();
30649
    }
30650
 
30651
    @Override
30652
    public String toString() {
688 chandransh 30653
      StringBuilder sb = new StringBuilder("checkOut_result(");
578 chandransh 30654
      boolean first = true;
30655
 
30656
      sb.append("success:");
30657
      sb.append(this.success);
30658
      first = false;
30659
      if (!first) sb.append(", ");
30660
      sb.append("scex:");
30661
      if (this.scex == null) {
30662
        sb.append("null");
30663
      } else {
30664
        sb.append(this.scex);
30665
      }
30666
      first = false;
30667
      sb.append(")");
30668
      return sb.toString();
30669
    }
30670
 
30671
    public void validate() throws TException {
30672
      // check for required fields
30673
    }
30674
 
30675
  }
30676
 
688 chandransh 30677
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
30678
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
553 chandransh 30679
 
688 chandransh 30680
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
30681
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
553 chandransh 30682
 
688 chandransh 30683
    private long cartId;
708 rajveer 30684
    private Map<Long,Double> items;
553 chandransh 30685
 
30686
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30687
    public enum _Fields implements TFieldIdEnum {
688 chandransh 30688
      CART_ID((short)1, "cartId"),
30689
      ITEMS((short)2, "items");
553 chandransh 30690
 
30691
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30692
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30693
 
30694
      static {
30695
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30696
          byId.put((int)field._thriftId, field);
30697
          byName.put(field.getFieldName(), field);
30698
        }
30699
      }
30700
 
30701
      /**
30702
       * Find the _Fields constant that matches fieldId, or null if its not found.
30703
       */
30704
      public static _Fields findByThriftId(int fieldId) {
30705
        return byId.get(fieldId);
30706
      }
30707
 
30708
      /**
30709
       * Find the _Fields constant that matches fieldId, throwing an exception
30710
       * if it is not found.
30711
       */
30712
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30713
        _Fields fields = findByThriftId(fieldId);
30714
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30715
        return fields;
30716
      }
30717
 
30718
      /**
30719
       * Find the _Fields constant that matches name, or null if its not found.
30720
       */
30721
      public static _Fields findByName(String name) {
30722
        return byName.get(name);
30723
      }
30724
 
30725
      private final short _thriftId;
30726
      private final String _fieldName;
30727
 
30728
      _Fields(short thriftId, String fieldName) {
30729
        _thriftId = thriftId;
30730
        _fieldName = fieldName;
30731
      }
30732
 
30733
      public short getThriftFieldId() {
30734
        return _thriftId;
30735
      }
30736
 
30737
      public String getFieldName() {
30738
        return _fieldName;
30739
      }
30740
    }
30741
 
30742
    // isset id assignments
688 chandransh 30743
    private static final int __CARTID_ISSET_ID = 0;
30744
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 30745
 
30746
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 30747
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
553 chandransh 30748
          new FieldValueMetaData(TType.I64)));
688 chandransh 30749
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
30750
          new MapMetaData(TType.MAP, 
30751
              new FieldValueMetaData(TType.I64), 
708 rajveer 30752
              new FieldValueMetaData(TType.DOUBLE))));
553 chandransh 30753
    }});
30754
 
30755
    static {
688 chandransh 30756
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
553 chandransh 30757
    }
30758
 
688 chandransh 30759
    public resetCart_args() {
553 chandransh 30760
    }
30761
 
688 chandransh 30762
    public resetCart_args(
30763
      long cartId,
708 rajveer 30764
      Map<Long,Double> items)
553 chandransh 30765
    {
30766
      this();
688 chandransh 30767
      this.cartId = cartId;
30768
      setCartIdIsSet(true);
30769
      this.items = items;
553 chandransh 30770
    }
30771
 
30772
    /**
30773
     * Performs a deep copy on <i>other</i>.
30774
     */
688 chandransh 30775
    public resetCart_args(resetCart_args other) {
553 chandransh 30776
      __isset_bit_vector.clear();
30777
      __isset_bit_vector.or(other.__isset_bit_vector);
688 chandransh 30778
      this.cartId = other.cartId;
30779
      if (other.isSetItems()) {
708 rajveer 30780
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
30781
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {
688 chandransh 30782
 
30783
          Long other_element_key = other_element.getKey();
708 rajveer 30784
          Double other_element_value = other_element.getValue();
688 chandransh 30785
 
30786
          Long __this__items_copy_key = other_element_key;
30787
 
708 rajveer 30788
          Double __this__items_copy_value = other_element_value;
688 chandransh 30789
 
30790
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
30791
        }
30792
        this.items = __this__items;
30793
      }
553 chandransh 30794
    }
30795
 
688 chandransh 30796
    public resetCart_args deepCopy() {
30797
      return new resetCart_args(this);
553 chandransh 30798
    }
30799
 
30800
    @Deprecated
688 chandransh 30801
    public resetCart_args clone() {
30802
      return new resetCart_args(this);
553 chandransh 30803
    }
30804
 
688 chandransh 30805
    public long getCartId() {
30806
      return this.cartId;
553 chandransh 30807
    }
30808
 
688 chandransh 30809
    public resetCart_args setCartId(long cartId) {
30810
      this.cartId = cartId;
30811
      setCartIdIsSet(true);
48 ashish 30812
      return this;
30813
    }
30814
 
688 chandransh 30815
    public void unsetCartId() {
30816
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 30817
    }
30818
 
688 chandransh 30819
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
30820
    public boolean isSetCartId() {
30821
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 30822
    }
30823
 
688 chandransh 30824
    public void setCartIdIsSet(boolean value) {
30825
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 30826
    }
30827
 
688 chandransh 30828
    public int getItemsSize() {
30829
      return (this.items == null) ? 0 : this.items.size();
553 chandransh 30830
    }
30831
 
708 rajveer 30832
    public void putToItems(long key, double val) {
688 chandransh 30833
      if (this.items == null) {
708 rajveer 30834
        this.items = new HashMap<Long,Double>();
688 chandransh 30835
      }
30836
      this.items.put(key, val);
30837
    }
30838
 
708 rajveer 30839
    public Map<Long,Double> getItems() {
688 chandransh 30840
      return this.items;
30841
    }
30842
 
708 rajveer 30843
    public resetCart_args setItems(Map<Long,Double> items) {
688 chandransh 30844
      this.items = items;
553 chandransh 30845
      return this;
30846
    }
30847
 
688 chandransh 30848
    public void unsetItems() {
30849
      this.items = null;
553 chandransh 30850
    }
30851
 
688 chandransh 30852
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
30853
    public boolean isSetItems() {
30854
      return this.items != null;
553 chandransh 30855
    }
30856
 
688 chandransh 30857
    public void setItemsIsSet(boolean value) {
30858
      if (!value) {
30859
        this.items = null;
30860
      }
553 chandransh 30861
    }
30862
 
30863
    public void setFieldValue(_Fields field, Object value) {
30864
      switch (field) {
688 chandransh 30865
      case CART_ID:
553 chandransh 30866
        if (value == null) {
688 chandransh 30867
          unsetCartId();
553 chandransh 30868
        } else {
688 chandransh 30869
          setCartId((Long)value);
553 chandransh 30870
        }
30871
        break;
30872
 
688 chandransh 30873
      case ITEMS:
553 chandransh 30874
        if (value == null) {
688 chandransh 30875
          unsetItems();
553 chandransh 30876
        } else {
708 rajveer 30877
          setItems((Map<Long,Double>)value);
553 chandransh 30878
        }
30879
        break;
30880
 
30881
      }
30882
    }
30883
 
30884
    public void setFieldValue(int fieldID, Object value) {
30885
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30886
    }
30887
 
30888
    public Object getFieldValue(_Fields field) {
30889
      switch (field) {
688 chandransh 30890
      case CART_ID:
30891
        return new Long(getCartId());
553 chandransh 30892
 
688 chandransh 30893
      case ITEMS:
30894
        return getItems();
553 chandransh 30895
 
30896
      }
30897
      throw new IllegalStateException();
30898
    }
30899
 
30900
    public Object getFieldValue(int fieldId) {
30901
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30902
    }
30903
 
30904
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30905
    public boolean isSet(_Fields field) {
30906
      switch (field) {
688 chandransh 30907
      case CART_ID:
30908
        return isSetCartId();
30909
      case ITEMS:
30910
        return isSetItems();
553 chandransh 30911
      }
30912
      throw new IllegalStateException();
30913
    }
30914
 
30915
    public boolean isSet(int fieldID) {
30916
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30917
    }
30918
 
30919
    @Override
30920
    public boolean equals(Object that) {
30921
      if (that == null)
30922
        return false;
688 chandransh 30923
      if (that instanceof resetCart_args)
30924
        return this.equals((resetCart_args)that);
553 chandransh 30925
      return false;
30926
    }
30927
 
688 chandransh 30928
    public boolean equals(resetCart_args that) {
553 chandransh 30929
      if (that == null)
30930
        return false;
30931
 
688 chandransh 30932
      boolean this_present_cartId = true;
30933
      boolean that_present_cartId = true;
30934
      if (this_present_cartId || that_present_cartId) {
30935
        if (!(this_present_cartId && that_present_cartId))
553 chandransh 30936
          return false;
688 chandransh 30937
        if (this.cartId != that.cartId)
553 chandransh 30938
          return false;
30939
      }
30940
 
688 chandransh 30941
      boolean this_present_items = true && this.isSetItems();
30942
      boolean that_present_items = true && that.isSetItems();
30943
      if (this_present_items || that_present_items) {
30944
        if (!(this_present_items && that_present_items))
553 chandransh 30945
          return false;
688 chandransh 30946
        if (!this.items.equals(that.items))
553 chandransh 30947
          return false;
30948
      }
30949
 
30950
      return true;
30951
    }
30952
 
30953
    @Override
30954
    public int hashCode() {
30955
      return 0;
30956
    }
30957
 
30958
    public void read(TProtocol iprot) throws TException {
30959
      TField field;
30960
      iprot.readStructBegin();
30961
      while (true)
30962
      {
30963
        field = iprot.readFieldBegin();
30964
        if (field.type == TType.STOP) { 
30965
          break;
30966
        }
30967
        _Fields fieldId = _Fields.findByThriftId(field.id);
30968
        if (fieldId == null) {
30969
          TProtocolUtil.skip(iprot, field.type);
30970
        } else {
30971
          switch (fieldId) {
688 chandransh 30972
            case CART_ID:
553 chandransh 30973
              if (field.type == TType.I64) {
688 chandransh 30974
                this.cartId = iprot.readI64();
30975
                setCartIdIsSet(true);
553 chandransh 30976
              } else { 
30977
                TProtocolUtil.skip(iprot, field.type);
30978
              }
30979
              break;
688 chandransh 30980
            case ITEMS:
30981
              if (field.type == TType.MAP) {
30982
                {
1590 varun.gupt 30983
                  TMap _map40 = iprot.readMapBegin();
30984
                  this.items = new HashMap<Long,Double>(2*_map40.size);
30985
                  for (int _i41 = 0; _i41 < _map40.size; ++_i41)
688 chandransh 30986
                  {
1590 varun.gupt 30987
                    long _key42;
30988
                    double _val43;
30989
                    _key42 = iprot.readI64();
30990
                    _val43 = iprot.readDouble();
30991
                    this.items.put(_key42, _val43);
688 chandransh 30992
                  }
30993
                  iprot.readMapEnd();
30994
                }
553 chandransh 30995
              } else { 
30996
                TProtocolUtil.skip(iprot, field.type);
30997
              }
30998
              break;
30999
          }
31000
          iprot.readFieldEnd();
31001
        }
31002
      }
31003
      iprot.readStructEnd();
31004
      validate();
31005
    }
31006
 
31007
    public void write(TProtocol oprot) throws TException {
31008
      validate();
31009
 
31010
      oprot.writeStructBegin(STRUCT_DESC);
688 chandransh 31011
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
31012
      oprot.writeI64(this.cartId);
553 chandransh 31013
      oprot.writeFieldEnd();
688 chandransh 31014
      if (this.items != null) {
31015
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
31016
        {
708 rajveer 31017
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
1590 varun.gupt 31018
          for (Map.Entry<Long, Double> _iter44 : this.items.entrySet())
688 chandransh 31019
          {
1590 varun.gupt 31020
            oprot.writeI64(_iter44.getKey());
31021
            oprot.writeDouble(_iter44.getValue());
688 chandransh 31022
          }
31023
          oprot.writeMapEnd();
31024
        }
31025
        oprot.writeFieldEnd();
31026
      }
553 chandransh 31027
      oprot.writeFieldStop();
31028
      oprot.writeStructEnd();
31029
    }
31030
 
31031
    @Override
31032
    public String toString() {
688 chandransh 31033
      StringBuilder sb = new StringBuilder("resetCart_args(");
553 chandransh 31034
      boolean first = true;
31035
 
688 chandransh 31036
      sb.append("cartId:");
31037
      sb.append(this.cartId);
553 chandransh 31038
      first = false;
31039
      if (!first) sb.append(", ");
688 chandransh 31040
      sb.append("items:");
31041
      if (this.items == null) {
31042
        sb.append("null");
31043
      } else {
31044
        sb.append(this.items);
31045
      }
553 chandransh 31046
      first = false;
31047
      sb.append(")");
31048
      return sb.toString();
31049
    }
31050
 
31051
    public void validate() throws TException {
31052
      // check for required fields
31053
    }
31054
 
31055
  }
31056
 
688 chandransh 31057
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
31058
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
553 chandransh 31059
 
688 chandransh 31060
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
31061
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
553 chandransh 31062
 
688 chandransh 31063
    private boolean success;
31064
    private ShoppingCartException scex;
553 chandransh 31065
 
31066
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31067
    public enum _Fields implements TFieldIdEnum {
688 chandransh 31068
      SUCCESS((short)0, "success"),
31069
      SCEX((short)1, "scex");
553 chandransh 31070
 
31071
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31072
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31073
 
31074
      static {
31075
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31076
          byId.put((int)field._thriftId, field);
31077
          byName.put(field.getFieldName(), field);
31078
        }
31079
      }
31080
 
31081
      /**
31082
       * Find the _Fields constant that matches fieldId, or null if its not found.
31083
       */
31084
      public static _Fields findByThriftId(int fieldId) {
31085
        return byId.get(fieldId);
31086
      }
31087
 
31088
      /**
31089
       * Find the _Fields constant that matches fieldId, throwing an exception
31090
       * if it is not found.
31091
       */
31092
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31093
        _Fields fields = findByThriftId(fieldId);
31094
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31095
        return fields;
31096
      }
31097
 
31098
      /**
31099
       * Find the _Fields constant that matches name, or null if its not found.
31100
       */
31101
      public static _Fields findByName(String name) {
31102
        return byName.get(name);
31103
      }
31104
 
31105
      private final short _thriftId;
31106
      private final String _fieldName;
31107
 
31108
      _Fields(short thriftId, String fieldName) {
31109
        _thriftId = thriftId;
31110
        _fieldName = fieldName;
31111
      }
31112
 
31113
      public short getThriftFieldId() {
31114
        return _thriftId;
31115
      }
31116
 
31117
      public String getFieldName() {
31118
        return _fieldName;
31119
      }
31120
    }
688 chandransh 31121
 
31122
    // isset id assignments
31123
    private static final int __SUCCESS_ISSET_ID = 0;
31124
    private BitSet __isset_bit_vector = new BitSet(1);
31125
 
553 chandransh 31126
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 31127
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31128
          new FieldValueMetaData(TType.BOOL)));
31129
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
31130
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 31131
    }});
31132
 
31133
    static {
688 chandransh 31134
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
553 chandransh 31135
    }
31136
 
688 chandransh 31137
    public resetCart_result() {
553 chandransh 31138
    }
31139
 
688 chandransh 31140
    public resetCart_result(
31141
      boolean success,
31142
      ShoppingCartException scex)
31143
    {
31144
      this();
31145
      this.success = success;
31146
      setSuccessIsSet(true);
31147
      this.scex = scex;
31148
    }
31149
 
553 chandransh 31150
    /**
31151
     * Performs a deep copy on <i>other</i>.
31152
     */
688 chandransh 31153
    public resetCart_result(resetCart_result other) {
31154
      __isset_bit_vector.clear();
31155
      __isset_bit_vector.or(other.__isset_bit_vector);
31156
      this.success = other.success;
31157
      if (other.isSetScex()) {
31158
        this.scex = new ShoppingCartException(other.scex);
31159
      }
553 chandransh 31160
    }
31161
 
688 chandransh 31162
    public resetCart_result deepCopy() {
31163
      return new resetCart_result(this);
553 chandransh 31164
    }
31165
 
31166
    @Deprecated
688 chandransh 31167
    public resetCart_result clone() {
31168
      return new resetCart_result(this);
553 chandransh 31169
    }
31170
 
688 chandransh 31171
    public boolean isSuccess() {
31172
      return this.success;
31173
    }
31174
 
31175
    public resetCart_result setSuccess(boolean success) {
31176
      this.success = success;
31177
      setSuccessIsSet(true);
31178
      return this;
31179
    }
31180
 
31181
    public void unsetSuccess() {
31182
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
31183
    }
31184
 
31185
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31186
    public boolean isSetSuccess() {
31187
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
31188
    }
31189
 
31190
    public void setSuccessIsSet(boolean value) {
31191
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
31192
    }
31193
 
31194
    public ShoppingCartException getScex() {
31195
      return this.scex;
31196
    }
31197
 
31198
    public resetCart_result setScex(ShoppingCartException scex) {
31199
      this.scex = scex;
31200
      return this;
31201
    }
31202
 
31203
    public void unsetScex() {
31204
      this.scex = null;
31205
    }
31206
 
31207
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
31208
    public boolean isSetScex() {
31209
      return this.scex != null;
31210
    }
31211
 
31212
    public void setScexIsSet(boolean value) {
31213
      if (!value) {
31214
        this.scex = null;
31215
      }
31216
    }
31217
 
553 chandransh 31218
    public void setFieldValue(_Fields field, Object value) {
31219
      switch (field) {
688 chandransh 31220
      case SUCCESS:
31221
        if (value == null) {
31222
          unsetSuccess();
31223
        } else {
31224
          setSuccess((Boolean)value);
31225
        }
31226
        break;
31227
 
31228
      case SCEX:
31229
        if (value == null) {
31230
          unsetScex();
31231
        } else {
31232
          setScex((ShoppingCartException)value);
31233
        }
31234
        break;
31235
 
553 chandransh 31236
      }
31237
    }
31238
 
31239
    public void setFieldValue(int fieldID, Object value) {
31240
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31241
    }
31242
 
31243
    public Object getFieldValue(_Fields field) {
31244
      switch (field) {
688 chandransh 31245
      case SUCCESS:
31246
        return new Boolean(isSuccess());
31247
 
31248
      case SCEX:
31249
        return getScex();
31250
 
553 chandransh 31251
      }
31252
      throw new IllegalStateException();
31253
    }
31254
 
31255
    public Object getFieldValue(int fieldId) {
31256
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31257
    }
31258
 
31259
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31260
    public boolean isSet(_Fields field) {
31261
      switch (field) {
688 chandransh 31262
      case SUCCESS:
31263
        return isSetSuccess();
31264
      case SCEX:
31265
        return isSetScex();
553 chandransh 31266
      }
31267
      throw new IllegalStateException();
31268
    }
31269
 
31270
    public boolean isSet(int fieldID) {
31271
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31272
    }
31273
 
31274
    @Override
31275
    public boolean equals(Object that) {
31276
      if (that == null)
31277
        return false;
688 chandransh 31278
      if (that instanceof resetCart_result)
31279
        return this.equals((resetCart_result)that);
553 chandransh 31280
      return false;
31281
    }
31282
 
688 chandransh 31283
    public boolean equals(resetCart_result that) {
553 chandransh 31284
      if (that == null)
31285
        return false;
31286
 
688 chandransh 31287
      boolean this_present_success = true;
31288
      boolean that_present_success = true;
31289
      if (this_present_success || that_present_success) {
31290
        if (!(this_present_success && that_present_success))
31291
          return false;
31292
        if (this.success != that.success)
31293
          return false;
31294
      }
31295
 
31296
      boolean this_present_scex = true && this.isSetScex();
31297
      boolean that_present_scex = true && that.isSetScex();
31298
      if (this_present_scex || that_present_scex) {
31299
        if (!(this_present_scex && that_present_scex))
31300
          return false;
31301
        if (!this.scex.equals(that.scex))
31302
          return false;
31303
      }
31304
 
553 chandransh 31305
      return true;
31306
    }
31307
 
31308
    @Override
31309
    public int hashCode() {
31310
      return 0;
31311
    }
31312
 
688 chandransh 31313
    public int compareTo(resetCart_result other) {
553 chandransh 31314
      if (!getClass().equals(other.getClass())) {
31315
        return getClass().getName().compareTo(other.getClass().getName());
31316
      }
31317
 
31318
      int lastComparison = 0;
688 chandransh 31319
      resetCart_result typedOther = (resetCart_result)other;
553 chandransh 31320
 
688 chandransh 31321
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31322
      if (lastComparison != 0) {
31323
        return lastComparison;
31324
      }
31325
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31326
      if (lastComparison != 0) {
31327
        return lastComparison;
31328
      }
31329
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
31330
      if (lastComparison != 0) {
31331
        return lastComparison;
31332
      }
31333
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
31334
      if (lastComparison != 0) {
31335
        return lastComparison;
31336
      }
553 chandransh 31337
      return 0;
31338
    }
31339
 
31340
    public void read(TProtocol iprot) throws TException {
31341
      TField field;
31342
      iprot.readStructBegin();
31343
      while (true)
31344
      {
31345
        field = iprot.readFieldBegin();
31346
        if (field.type == TType.STOP) { 
31347
          break;
31348
        }
31349
        _Fields fieldId = _Fields.findByThriftId(field.id);
31350
        if (fieldId == null) {
31351
          TProtocolUtil.skip(iprot, field.type);
31352
        } else {
31353
          switch (fieldId) {
688 chandransh 31354
            case SUCCESS:
31355
              if (field.type == TType.BOOL) {
31356
                this.success = iprot.readBool();
31357
                setSuccessIsSet(true);
31358
              } else { 
31359
                TProtocolUtil.skip(iprot, field.type);
31360
              }
31361
              break;
31362
            case SCEX:
31363
              if (field.type == TType.STRUCT) {
31364
                this.scex = new ShoppingCartException();
31365
                this.scex.read(iprot);
31366
              } else { 
31367
                TProtocolUtil.skip(iprot, field.type);
31368
              }
31369
              break;
553 chandransh 31370
          }
31371
          iprot.readFieldEnd();
31372
        }
31373
      }
31374
      iprot.readStructEnd();
31375
      validate();
31376
    }
31377
 
31378
    public void write(TProtocol oprot) throws TException {
31379
      oprot.writeStructBegin(STRUCT_DESC);
31380
 
688 chandransh 31381
      if (this.isSetSuccess()) {
31382
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31383
        oprot.writeBool(this.success);
31384
        oprot.writeFieldEnd();
31385
      } else if (this.isSetScex()) {
31386
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
31387
        this.scex.write(oprot);
31388
        oprot.writeFieldEnd();
31389
      }
553 chandransh 31390
      oprot.writeFieldStop();
31391
      oprot.writeStructEnd();
31392
    }
31393
 
31394
    @Override
31395
    public String toString() {
688 chandransh 31396
      StringBuilder sb = new StringBuilder("resetCart_result(");
553 chandransh 31397
      boolean first = true;
31398
 
688 chandransh 31399
      sb.append("success:");
31400
      sb.append(this.success);
31401
      first = false;
31402
      if (!first) sb.append(", ");
31403
      sb.append("scex:");
31404
      if (this.scex == null) {
31405
        sb.append("null");
31406
      } else {
31407
        sb.append(this.scex);
31408
      }
31409
      first = false;
553 chandransh 31410
      sb.append(")");
31411
      return sb.toString();
31412
    }
31413
 
31414
    public void validate() throws TException {
31415
      // check for required fields
31416
    }
31417
 
31418
  }
31419
 
771 rajveer 31420
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
31421
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
553 chandransh 31422
 
771 rajveer 31423
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 31424
 
31425
    private long userId;
31426
 
31427
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31428
    public enum _Fields implements TFieldIdEnum {
771 rajveer 31429
      USER_ID((short)1, "userId");
553 chandransh 31430
 
31431
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31432
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31433
 
31434
      static {
31435
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31436
          byId.put((int)field._thriftId, field);
31437
          byName.put(field.getFieldName(), field);
31438
        }
31439
      }
31440
 
31441
      /**
31442
       * Find the _Fields constant that matches fieldId, or null if its not found.
31443
       */
31444
      public static _Fields findByThriftId(int fieldId) {
31445
        return byId.get(fieldId);
31446
      }
31447
 
31448
      /**
31449
       * Find the _Fields constant that matches fieldId, throwing an exception
31450
       * if it is not found.
31451
       */
31452
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31453
        _Fields fields = findByThriftId(fieldId);
31454
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31455
        return fields;
31456
      }
31457
 
31458
      /**
31459
       * Find the _Fields constant that matches name, or null if its not found.
31460
       */
31461
      public static _Fields findByName(String name) {
31462
        return byName.get(name);
31463
      }
31464
 
31465
      private final short _thriftId;
31466
      private final String _fieldName;
31467
 
31468
      _Fields(short thriftId, String fieldName) {
31469
        _thriftId = thriftId;
31470
        _fieldName = fieldName;
31471
      }
31472
 
31473
      public short getThriftFieldId() {
31474
        return _thriftId;
31475
      }
31476
 
31477
      public String getFieldName() {
31478
        return _fieldName;
31479
      }
31480
    }
31481
 
31482
    // isset id assignments
31483
    private static final int __USERID_ISSET_ID = 0;
771 rajveer 31484
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 31485
 
31486
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31487
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
31488
          new FieldValueMetaData(TType.I64)));
31489
    }});
31490
 
31491
    static {
771 rajveer 31492
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
553 chandransh 31493
    }
31494
 
771 rajveer 31495
    public getMyResearch_args() {
553 chandransh 31496
    }
31497
 
771 rajveer 31498
    public getMyResearch_args(
31499
      long userId)
553 chandransh 31500
    {
31501
      this();
31502
      this.userId = userId;
31503
      setUserIdIsSet(true);
31504
    }
31505
 
31506
    /**
31507
     * Performs a deep copy on <i>other</i>.
31508
     */
771 rajveer 31509
    public getMyResearch_args(getMyResearch_args other) {
553 chandransh 31510
      __isset_bit_vector.clear();
31511
      __isset_bit_vector.or(other.__isset_bit_vector);
31512
      this.userId = other.userId;
31513
    }
31514
 
771 rajveer 31515
    public getMyResearch_args deepCopy() {
31516
      return new getMyResearch_args(this);
553 chandransh 31517
    }
31518
 
31519
    @Deprecated
771 rajveer 31520
    public getMyResearch_args clone() {
31521
      return new getMyResearch_args(this);
553 chandransh 31522
    }
31523
 
31524
    public long getUserId() {
31525
      return this.userId;
31526
    }
31527
 
771 rajveer 31528
    public getMyResearch_args setUserId(long userId) {
553 chandransh 31529
      this.userId = userId;
31530
      setUserIdIsSet(true);
31531
      return this;
31532
    }
31533
 
31534
    public void unsetUserId() {
31535
      __isset_bit_vector.clear(__USERID_ISSET_ID);
31536
    }
31537
 
31538
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
31539
    public boolean isSetUserId() {
31540
      return __isset_bit_vector.get(__USERID_ISSET_ID);
31541
    }
31542
 
31543
    public void setUserIdIsSet(boolean value) {
31544
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
31545
    }
31546
 
48 ashish 31547
    public void setFieldValue(_Fields field, Object value) {
31548
      switch (field) {
553 chandransh 31549
      case USER_ID:
48 ashish 31550
        if (value == null) {
553 chandransh 31551
          unsetUserId();
48 ashish 31552
        } else {
553 chandransh 31553
          setUserId((Long)value);
48 ashish 31554
        }
31555
        break;
31556
 
31557
      }
31558
    }
31559
 
31560
    public void setFieldValue(int fieldID, Object value) {
31561
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31562
    }
31563
 
31564
    public Object getFieldValue(_Fields field) {
31565
      switch (field) {
553 chandransh 31566
      case USER_ID:
31567
        return new Long(getUserId());
48 ashish 31568
 
31569
      }
31570
      throw new IllegalStateException();
31571
    }
31572
 
31573
    public Object getFieldValue(int fieldId) {
31574
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31575
    }
31576
 
31577
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31578
    public boolean isSet(_Fields field) {
31579
      switch (field) {
553 chandransh 31580
      case USER_ID:
31581
        return isSetUserId();
48 ashish 31582
      }
31583
      throw new IllegalStateException();
31584
    }
31585
 
31586
    public boolean isSet(int fieldID) {
31587
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31588
    }
31589
 
31590
    @Override
31591
    public boolean equals(Object that) {
31592
      if (that == null)
31593
        return false;
771 rajveer 31594
      if (that instanceof getMyResearch_args)
31595
        return this.equals((getMyResearch_args)that);
48 ashish 31596
      return false;
31597
    }
31598
 
771 rajveer 31599
    public boolean equals(getMyResearch_args that) {
48 ashish 31600
      if (that == null)
31601
        return false;
31602
 
553 chandransh 31603
      boolean this_present_userId = true;
31604
      boolean that_present_userId = true;
31605
      if (this_present_userId || that_present_userId) {
31606
        if (!(this_present_userId && that_present_userId))
48 ashish 31607
          return false;
553 chandransh 31608
        if (this.userId != that.userId)
48 ashish 31609
          return false;
31610
      }
31611
 
31612
      return true;
31613
    }
31614
 
31615
    @Override
31616
    public int hashCode() {
31617
      return 0;
31618
    }
31619
 
771 rajveer 31620
    public int compareTo(getMyResearch_args other) {
48 ashish 31621
      if (!getClass().equals(other.getClass())) {
31622
        return getClass().getName().compareTo(other.getClass().getName());
31623
      }
31624
 
31625
      int lastComparison = 0;
771 rajveer 31626
      getMyResearch_args typedOther = (getMyResearch_args)other;
48 ashish 31627
 
553 chandransh 31628
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 31629
      if (lastComparison != 0) {
31630
        return lastComparison;
31631
      }
553 chandransh 31632
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 31633
      if (lastComparison != 0) {
31634
        return lastComparison;
31635
      }
31636
      return 0;
31637
    }
31638
 
31639
    public void read(TProtocol iprot) throws TException {
31640
      TField field;
31641
      iprot.readStructBegin();
31642
      while (true)
31643
      {
31644
        field = iprot.readFieldBegin();
31645
        if (field.type == TType.STOP) { 
31646
          break;
31647
        }
31648
        _Fields fieldId = _Fields.findByThriftId(field.id);
31649
        if (fieldId == null) {
31650
          TProtocolUtil.skip(iprot, field.type);
31651
        } else {
31652
          switch (fieldId) {
553 chandransh 31653
            case USER_ID:
31654
              if (field.type == TType.I64) {
31655
                this.userId = iprot.readI64();
31656
                setUserIdIsSet(true);
48 ashish 31657
              } else { 
31658
                TProtocolUtil.skip(iprot, field.type);
31659
              }
31660
              break;
31661
          }
31662
          iprot.readFieldEnd();
31663
        }
31664
      }
31665
      iprot.readStructEnd();
31666
      validate();
31667
    }
31668
 
31669
    public void write(TProtocol oprot) throws TException {
31670
      validate();
31671
 
31672
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 31673
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
31674
      oprot.writeI64(this.userId);
31675
      oprot.writeFieldEnd();
31676
      oprot.writeFieldStop();
31677
      oprot.writeStructEnd();
31678
    }
31679
 
31680
    @Override
31681
    public String toString() {
771 rajveer 31682
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
553 chandransh 31683
      boolean first = true;
31684
 
31685
      sb.append("userId:");
31686
      sb.append(this.userId);
31687
      first = false;
31688
      sb.append(")");
31689
      return sb.toString();
31690
    }
31691
 
31692
    public void validate() throws TException {
31693
      // check for required fields
31694
    }
31695
 
31696
  }
31697
 
31698
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
31699
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
31700
 
31701
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
31702
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
31703
 
31704
    private Widget success;
31705
    private WidgetException scx;
31706
 
31707
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31708
    public enum _Fields implements TFieldIdEnum {
31709
      SUCCESS((short)0, "success"),
31710
      SCX((short)1, "scx");
31711
 
31712
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31713
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31714
 
31715
      static {
31716
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31717
          byId.put((int)field._thriftId, field);
31718
          byName.put(field.getFieldName(), field);
31719
        }
31720
      }
31721
 
31722
      /**
31723
       * Find the _Fields constant that matches fieldId, or null if its not found.
31724
       */
31725
      public static _Fields findByThriftId(int fieldId) {
31726
        return byId.get(fieldId);
31727
      }
31728
 
31729
      /**
31730
       * Find the _Fields constant that matches fieldId, throwing an exception
31731
       * if it is not found.
31732
       */
31733
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31734
        _Fields fields = findByThriftId(fieldId);
31735
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31736
        return fields;
31737
      }
31738
 
31739
      /**
31740
       * Find the _Fields constant that matches name, or null if its not found.
31741
       */
31742
      public static _Fields findByName(String name) {
31743
        return byName.get(name);
31744
      }
31745
 
31746
      private final short _thriftId;
31747
      private final String _fieldName;
31748
 
31749
      _Fields(short thriftId, String fieldName) {
31750
        _thriftId = thriftId;
31751
        _fieldName = fieldName;
31752
      }
31753
 
31754
      public short getThriftFieldId() {
31755
        return _thriftId;
31756
      }
31757
 
31758
      public String getFieldName() {
31759
        return _fieldName;
31760
      }
31761
    }
31762
 
31763
    // isset id assignments
31764
 
31765
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 31766
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 31767
          new StructMetaData(TType.STRUCT, Widget.class)));
31768
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 31769
          new FieldValueMetaData(TType.STRUCT)));
31770
    }});
31771
 
31772
    static {
553 chandransh 31773
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 31774
    }
31775
 
553 chandransh 31776
    public getMyResearch_result() {
48 ashish 31777
    }
31778
 
553 chandransh 31779
    public getMyResearch_result(
31780
      Widget success,
31781
      WidgetException scx)
48 ashish 31782
    {
31783
      this();
31784
      this.success = success;
553 chandransh 31785
      this.scx = scx;
48 ashish 31786
    }
31787
 
31788
    /**
31789
     * Performs a deep copy on <i>other</i>.
31790
     */
553 chandransh 31791
    public getMyResearch_result(getMyResearch_result other) {
31792
      if (other.isSetSuccess()) {
31793
        this.success = new Widget(other.success);
48 ashish 31794
      }
553 chandransh 31795
      if (other.isSetScx()) {
31796
        this.scx = new WidgetException(other.scx);
31797
      }
48 ashish 31798
    }
31799
 
553 chandransh 31800
    public getMyResearch_result deepCopy() {
31801
      return new getMyResearch_result(this);
48 ashish 31802
    }
31803
 
31804
    @Deprecated
553 chandransh 31805
    public getMyResearch_result clone() {
31806
      return new getMyResearch_result(this);
48 ashish 31807
    }
31808
 
553 chandransh 31809
    public Widget getSuccess() {
48 ashish 31810
      return this.success;
31811
    }
31812
 
553 chandransh 31813
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 31814
      this.success = success;
31815
      return this;
31816
    }
31817
 
31818
    public void unsetSuccess() {
553 chandransh 31819
      this.success = null;
48 ashish 31820
    }
31821
 
31822
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31823
    public boolean isSetSuccess() {
553 chandransh 31824
      return this.success != null;
48 ashish 31825
    }
31826
 
31827
    public void setSuccessIsSet(boolean value) {
553 chandransh 31828
      if (!value) {
31829
        this.success = null;
31830
      }
48 ashish 31831
    }
31832
 
553 chandransh 31833
    public WidgetException getScx() {
31834
      return this.scx;
48 ashish 31835
    }
31836
 
553 chandransh 31837
    public getMyResearch_result setScx(WidgetException scx) {
31838
      this.scx = scx;
48 ashish 31839
      return this;
31840
    }
31841
 
553 chandransh 31842
    public void unsetScx() {
31843
      this.scx = null;
48 ashish 31844
    }
31845
 
553 chandransh 31846
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
31847
    public boolean isSetScx() {
31848
      return this.scx != null;
48 ashish 31849
    }
31850
 
553 chandransh 31851
    public void setScxIsSet(boolean value) {
48 ashish 31852
      if (!value) {
553 chandransh 31853
        this.scx = null;
48 ashish 31854
      }
31855
    }
31856
 
31857
    public void setFieldValue(_Fields field, Object value) {
31858
      switch (field) {
31859
      case SUCCESS:
31860
        if (value == null) {
31861
          unsetSuccess();
31862
        } else {
553 chandransh 31863
          setSuccess((Widget)value);
48 ashish 31864
        }
31865
        break;
31866
 
553 chandransh 31867
      case SCX:
48 ashish 31868
        if (value == null) {
553 chandransh 31869
          unsetScx();
48 ashish 31870
        } else {
553 chandransh 31871
          setScx((WidgetException)value);
48 ashish 31872
        }
31873
        break;
31874
 
31875
      }
31876
    }
31877
 
31878
    public void setFieldValue(int fieldID, Object value) {
31879
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31880
    }
31881
 
31882
    public Object getFieldValue(_Fields field) {
31883
      switch (field) {
31884
      case SUCCESS:
553 chandransh 31885
        return getSuccess();
48 ashish 31886
 
553 chandransh 31887
      case SCX:
31888
        return getScx();
48 ashish 31889
 
31890
      }
31891
      throw new IllegalStateException();
31892
    }
31893
 
31894
    public Object getFieldValue(int fieldId) {
31895
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31896
    }
31897
 
31898
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31899
    public boolean isSet(_Fields field) {
31900
      switch (field) {
31901
      case SUCCESS:
31902
        return isSetSuccess();
553 chandransh 31903
      case SCX:
31904
        return isSetScx();
48 ashish 31905
      }
31906
      throw new IllegalStateException();
31907
    }
31908
 
31909
    public boolean isSet(int fieldID) {
31910
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31911
    }
31912
 
31913
    @Override
31914
    public boolean equals(Object that) {
31915
      if (that == null)
31916
        return false;
553 chandransh 31917
      if (that instanceof getMyResearch_result)
31918
        return this.equals((getMyResearch_result)that);
48 ashish 31919
      return false;
31920
    }
31921
 
553 chandransh 31922
    public boolean equals(getMyResearch_result that) {
48 ashish 31923
      if (that == null)
31924
        return false;
31925
 
553 chandransh 31926
      boolean this_present_success = true && this.isSetSuccess();
31927
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 31928
      if (this_present_success || that_present_success) {
31929
        if (!(this_present_success && that_present_success))
31930
          return false;
553 chandransh 31931
        if (!this.success.equals(that.success))
48 ashish 31932
          return false;
31933
      }
31934
 
553 chandransh 31935
      boolean this_present_scx = true && this.isSetScx();
31936
      boolean that_present_scx = true && that.isSetScx();
31937
      if (this_present_scx || that_present_scx) {
31938
        if (!(this_present_scx && that_present_scx))
48 ashish 31939
          return false;
553 chandransh 31940
        if (!this.scx.equals(that.scx))
48 ashish 31941
          return false;
31942
      }
31943
 
31944
      return true;
31945
    }
31946
 
31947
    @Override
31948
    public int hashCode() {
31949
      return 0;
31950
    }
31951
 
553 chandransh 31952
    public int compareTo(getMyResearch_result other) {
48 ashish 31953
      if (!getClass().equals(other.getClass())) {
31954
        return getClass().getName().compareTo(other.getClass().getName());
31955
      }
31956
 
31957
      int lastComparison = 0;
553 chandransh 31958
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 31959
 
31960
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31961
      if (lastComparison != 0) {
31962
        return lastComparison;
31963
      }
31964
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31965
      if (lastComparison != 0) {
31966
        return lastComparison;
31967
      }
553 chandransh 31968
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 31969
      if (lastComparison != 0) {
31970
        return lastComparison;
31971
      }
553 chandransh 31972
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 31973
      if (lastComparison != 0) {
31974
        return lastComparison;
31975
      }
31976
      return 0;
31977
    }
31978
 
31979
    public void read(TProtocol iprot) throws TException {
31980
      TField field;
31981
      iprot.readStructBegin();
31982
      while (true)
31983
      {
31984
        field = iprot.readFieldBegin();
31985
        if (field.type == TType.STOP) { 
31986
          break;
31987
        }
31988
        _Fields fieldId = _Fields.findByThriftId(field.id);
31989
        if (fieldId == null) {
31990
          TProtocolUtil.skip(iprot, field.type);
31991
        } else {
31992
          switch (fieldId) {
31993
            case SUCCESS:
553 chandransh 31994
              if (field.type == TType.STRUCT) {
31995
                this.success = new Widget();
31996
                this.success.read(iprot);
48 ashish 31997
              } else { 
31998
                TProtocolUtil.skip(iprot, field.type);
31999
              }
32000
              break;
553 chandransh 32001
            case SCX:
48 ashish 32002
              if (field.type == TType.STRUCT) {
553 chandransh 32003
                this.scx = new WidgetException();
32004
                this.scx.read(iprot);
48 ashish 32005
              } else { 
32006
                TProtocolUtil.skip(iprot, field.type);
32007
              }
32008
              break;
32009
          }
32010
          iprot.readFieldEnd();
32011
        }
32012
      }
32013
      iprot.readStructEnd();
32014
      validate();
32015
    }
32016
 
32017
    public void write(TProtocol oprot) throws TException {
32018
      oprot.writeStructBegin(STRUCT_DESC);
32019
 
32020
      if (this.isSetSuccess()) {
32021
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 32022
        this.success.write(oprot);
48 ashish 32023
        oprot.writeFieldEnd();
553 chandransh 32024
      } else if (this.isSetScx()) {
32025
        oprot.writeFieldBegin(SCX_FIELD_DESC);
32026
        this.scx.write(oprot);
48 ashish 32027
        oprot.writeFieldEnd();
32028
      }
32029
      oprot.writeFieldStop();
32030
      oprot.writeStructEnd();
32031
    }
32032
 
32033
    @Override
32034
    public String toString() {
553 chandransh 32035
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 32036
      boolean first = true;
32037
 
32038
      sb.append("success:");
553 chandransh 32039
      if (this.success == null) {
32040
        sb.append("null");
32041
      } else {
32042
        sb.append(this.success);
32043
      }
48 ashish 32044
      first = false;
32045
      if (!first) sb.append(", ");
553 chandransh 32046
      sb.append("scx:");
32047
      if (this.scx == null) {
48 ashish 32048
        sb.append("null");
32049
      } else {
553 chandransh 32050
        sb.append(this.scx);
48 ashish 32051
      }
32052
      first = false;
32053
      sb.append(")");
32054
      return sb.toString();
32055
    }
32056
 
32057
    public void validate() throws TException {
32058
      // check for required fields
32059
    }
32060
 
32061
  }
32062
 
553 chandransh 32063
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
32064
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 32065
 
771 rajveer 32066
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
32067
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 32068
 
771 rajveer 32069
    private long userId;
32070
    private long itemId;
130 ashish 32071
 
32072
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32073
    public enum _Fields implements TFieldIdEnum {
771 rajveer 32074
      USER_ID((short)1, "userId"),
32075
      ITEM_ID((short)2, "itemId");
130 ashish 32076
 
32077
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32078
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32079
 
32080
      static {
32081
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32082
          byId.put((int)field._thriftId, field);
32083
          byName.put(field.getFieldName(), field);
32084
        }
32085
      }
32086
 
32087
      /**
32088
       * Find the _Fields constant that matches fieldId, or null if its not found.
32089
       */
32090
      public static _Fields findByThriftId(int fieldId) {
32091
        return byId.get(fieldId);
32092
      }
32093
 
32094
      /**
32095
       * Find the _Fields constant that matches fieldId, throwing an exception
32096
       * if it is not found.
32097
       */
32098
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32099
        _Fields fields = findByThriftId(fieldId);
32100
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32101
        return fields;
32102
      }
32103
 
32104
      /**
32105
       * Find the _Fields constant that matches name, or null if its not found.
32106
       */
32107
      public static _Fields findByName(String name) {
32108
        return byName.get(name);
32109
      }
32110
 
32111
      private final short _thriftId;
32112
      private final String _fieldName;
32113
 
32114
      _Fields(short thriftId, String fieldName) {
32115
        _thriftId = thriftId;
32116
        _fieldName = fieldName;
32117
      }
32118
 
32119
      public short getThriftFieldId() {
32120
        return _thriftId;
32121
      }
32122
 
32123
      public String getFieldName() {
32124
        return _fieldName;
32125
      }
32126
    }
32127
 
32128
    // isset id assignments
771 rajveer 32129
    private static final int __USERID_ISSET_ID = 0;
32130
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 32131
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 32132
 
32133
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 32134
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
130 ashish 32135
          new FieldValueMetaData(TType.I64)));
771 rajveer 32136
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 32137
          new FieldValueMetaData(TType.I64)));
130 ashish 32138
    }});
32139
 
32140
    static {
553 chandransh 32141
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 32142
    }
32143
 
553 chandransh 32144
    public updateMyResearch_args() {
130 ashish 32145
    }
32146
 
553 chandransh 32147
    public updateMyResearch_args(
771 rajveer 32148
      long userId,
32149
      long itemId)
130 ashish 32150
    {
32151
      this();
771 rajveer 32152
      this.userId = userId;
32153
      setUserIdIsSet(true);
32154
      this.itemId = itemId;
32155
      setItemIdIsSet(true);
130 ashish 32156
    }
32157
 
32158
    /**
32159
     * Performs a deep copy on <i>other</i>.
32160
     */
553 chandransh 32161
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 32162
      __isset_bit_vector.clear();
32163
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 32164
      this.userId = other.userId;
32165
      this.itemId = other.itemId;
130 ashish 32166
    }
32167
 
553 chandransh 32168
    public updateMyResearch_args deepCopy() {
32169
      return new updateMyResearch_args(this);
130 ashish 32170
    }
32171
 
32172
    @Deprecated
553 chandransh 32173
    public updateMyResearch_args clone() {
32174
      return new updateMyResearch_args(this);
130 ashish 32175
    }
32176
 
771 rajveer 32177
    public long getUserId() {
32178
      return this.userId;
130 ashish 32179
    }
32180
 
771 rajveer 32181
    public updateMyResearch_args setUserId(long userId) {
32182
      this.userId = userId;
32183
      setUserIdIsSet(true);
130 ashish 32184
      return this;
32185
    }
32186
 
771 rajveer 32187
    public void unsetUserId() {
32188
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 32189
    }
32190
 
771 rajveer 32191
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
32192
    public boolean isSetUserId() {
32193
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 32194
    }
32195
 
771 rajveer 32196
    public void setUserIdIsSet(boolean value) {
32197
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 32198
    }
32199
 
771 rajveer 32200
    public long getItemId() {
32201
      return this.itemId;
553 chandransh 32202
    }
32203
 
771 rajveer 32204
    public updateMyResearch_args setItemId(long itemId) {
32205
      this.itemId = itemId;
32206
      setItemIdIsSet(true);
553 chandransh 32207
      return this;
32208
    }
32209
 
771 rajveer 32210
    public void unsetItemId() {
32211
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 32212
    }
32213
 
771 rajveer 32214
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
32215
    public boolean isSetItemId() {
32216
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 32217
    }
32218
 
771 rajveer 32219
    public void setItemIdIsSet(boolean value) {
32220
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 32221
    }
32222
 
130 ashish 32223
    public void setFieldValue(_Fields field, Object value) {
32224
      switch (field) {
553 chandransh 32225
      case USER_ID:
130 ashish 32226
        if (value == null) {
771 rajveer 32227
          unsetUserId();
130 ashish 32228
        } else {
771 rajveer 32229
          setUserId((Long)value);
130 ashish 32230
        }
32231
        break;
32232
 
553 chandransh 32233
      case ITEM_ID:
32234
        if (value == null) {
771 rajveer 32235
          unsetItemId();
553 chandransh 32236
        } else {
771 rajveer 32237
          setItemId((Long)value);
553 chandransh 32238
        }
32239
        break;
32240
 
130 ashish 32241
      }
32242
    }
32243
 
32244
    public void setFieldValue(int fieldID, Object value) {
32245
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32246
    }
32247
 
32248
    public Object getFieldValue(_Fields field) {
32249
      switch (field) {
553 chandransh 32250
      case USER_ID:
771 rajveer 32251
        return new Long(getUserId());
130 ashish 32252
 
553 chandransh 32253
      case ITEM_ID:
771 rajveer 32254
        return new Long(getItemId());
553 chandransh 32255
 
130 ashish 32256
      }
32257
      throw new IllegalStateException();
32258
    }
32259
 
32260
    public Object getFieldValue(int fieldId) {
32261
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32262
    }
32263
 
32264
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32265
    public boolean isSet(_Fields field) {
32266
      switch (field) {
553 chandransh 32267
      case USER_ID:
771 rajveer 32268
        return isSetUserId();
553 chandransh 32269
      case ITEM_ID:
771 rajveer 32270
        return isSetItemId();
130 ashish 32271
      }
32272
      throw new IllegalStateException();
32273
    }
32274
 
32275
    public boolean isSet(int fieldID) {
32276
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32277
    }
32278
 
32279
    @Override
32280
    public boolean equals(Object that) {
32281
      if (that == null)
32282
        return false;
553 chandransh 32283
      if (that instanceof updateMyResearch_args)
32284
        return this.equals((updateMyResearch_args)that);
130 ashish 32285
      return false;
32286
    }
32287
 
553 chandransh 32288
    public boolean equals(updateMyResearch_args that) {
130 ashish 32289
      if (that == null)
32290
        return false;
32291
 
771 rajveer 32292
      boolean this_present_userId = true;
32293
      boolean that_present_userId = true;
32294
      if (this_present_userId || that_present_userId) {
32295
        if (!(this_present_userId && that_present_userId))
130 ashish 32296
          return false;
771 rajveer 32297
        if (this.userId != that.userId)
130 ashish 32298
          return false;
32299
      }
32300
 
771 rajveer 32301
      boolean this_present_itemId = true;
32302
      boolean that_present_itemId = true;
32303
      if (this_present_itemId || that_present_itemId) {
32304
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 32305
          return false;
771 rajveer 32306
        if (this.itemId != that.itemId)
553 chandransh 32307
          return false;
32308
      }
32309
 
130 ashish 32310
      return true;
32311
    }
32312
 
32313
    @Override
32314
    public int hashCode() {
32315
      return 0;
32316
    }
32317
 
553 chandransh 32318
    public int compareTo(updateMyResearch_args other) {
130 ashish 32319
      if (!getClass().equals(other.getClass())) {
32320
        return getClass().getName().compareTo(other.getClass().getName());
32321
      }
32322
 
32323
      int lastComparison = 0;
553 chandransh 32324
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 32325
 
771 rajveer 32326
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 32327
      if (lastComparison != 0) {
32328
        return lastComparison;
32329
      }
771 rajveer 32330
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 32331
      if (lastComparison != 0) {
32332
        return lastComparison;
32333
      }
771 rajveer 32334
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 32335
      if (lastComparison != 0) {
32336
        return lastComparison;
32337
      }
771 rajveer 32338
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 32339
      if (lastComparison != 0) {
32340
        return lastComparison;
32341
      }
130 ashish 32342
      return 0;
32343
    }
32344
 
32345
    public void read(TProtocol iprot) throws TException {
32346
      TField field;
32347
      iprot.readStructBegin();
32348
      while (true)
32349
      {
32350
        field = iprot.readFieldBegin();
32351
        if (field.type == TType.STOP) { 
32352
          break;
32353
        }
32354
        _Fields fieldId = _Fields.findByThriftId(field.id);
32355
        if (fieldId == null) {
32356
          TProtocolUtil.skip(iprot, field.type);
32357
        } else {
32358
          switch (fieldId) {
553 chandransh 32359
            case USER_ID:
130 ashish 32360
              if (field.type == TType.I64) {
771 rajveer 32361
                this.userId = iprot.readI64();
32362
                setUserIdIsSet(true);
130 ashish 32363
              } else { 
32364
                TProtocolUtil.skip(iprot, field.type);
32365
              }
32366
              break;
553 chandransh 32367
            case ITEM_ID:
32368
              if (field.type == TType.I64) {
771 rajveer 32369
                this.itemId = iprot.readI64();
32370
                setItemIdIsSet(true);
553 chandransh 32371
              } else { 
32372
                TProtocolUtil.skip(iprot, field.type);
32373
              }
32374
              break;
130 ashish 32375
          }
32376
          iprot.readFieldEnd();
32377
        }
32378
      }
32379
      iprot.readStructEnd();
32380
      validate();
32381
    }
32382
 
32383
    public void write(TProtocol oprot) throws TException {
32384
      validate();
32385
 
32386
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 32387
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 32388
      oprot.writeI64(this.userId);
130 ashish 32389
      oprot.writeFieldEnd();
553 chandransh 32390
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 32391
      oprot.writeI64(this.itemId);
553 chandransh 32392
      oprot.writeFieldEnd();
130 ashish 32393
      oprot.writeFieldStop();
32394
      oprot.writeStructEnd();
32395
    }
32396
 
32397
    @Override
32398
    public String toString() {
553 chandransh 32399
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 32400
      boolean first = true;
32401
 
771 rajveer 32402
      sb.append("userId:");
32403
      sb.append(this.userId);
130 ashish 32404
      first = false;
553 chandransh 32405
      if (!first) sb.append(", ");
771 rajveer 32406
      sb.append("itemId:");
32407
      sb.append(this.itemId);
553 chandransh 32408
      first = false;
130 ashish 32409
      sb.append(")");
32410
      return sb.toString();
32411
    }
32412
 
32413
    public void validate() throws TException {
32414
      // check for required fields
32415
    }
32416
 
32417
  }
32418
 
553 chandransh 32419
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
32420
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 32421
 
32422
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 32423
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 32424
 
32425
    private boolean success;
553 chandransh 32426
    private WidgetException scx;
130 ashish 32427
 
32428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32429
    public enum _Fields implements TFieldIdEnum {
32430
      SUCCESS((short)0, "success"),
553 chandransh 32431
      SCX((short)1, "scx");
130 ashish 32432
 
32433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32435
 
32436
      static {
32437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32438
          byId.put((int)field._thriftId, field);
32439
          byName.put(field.getFieldName(), field);
32440
        }
32441
      }
32442
 
32443
      /**
32444
       * Find the _Fields constant that matches fieldId, or null if its not found.
32445
       */
32446
      public static _Fields findByThriftId(int fieldId) {
32447
        return byId.get(fieldId);
32448
      }
32449
 
32450
      /**
32451
       * Find the _Fields constant that matches fieldId, throwing an exception
32452
       * if it is not found.
32453
       */
32454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32455
        _Fields fields = findByThriftId(fieldId);
32456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32457
        return fields;
32458
      }
32459
 
32460
      /**
32461
       * Find the _Fields constant that matches name, or null if its not found.
32462
       */
32463
      public static _Fields findByName(String name) {
32464
        return byName.get(name);
32465
      }
32466
 
32467
      private final short _thriftId;
32468
      private final String _fieldName;
32469
 
32470
      _Fields(short thriftId, String fieldName) {
32471
        _thriftId = thriftId;
32472
        _fieldName = fieldName;
32473
      }
32474
 
32475
      public short getThriftFieldId() {
32476
        return _thriftId;
32477
      }
32478
 
32479
      public String getFieldName() {
32480
        return _fieldName;
32481
      }
32482
    }
32483
 
32484
    // isset id assignments
32485
    private static final int __SUCCESS_ISSET_ID = 0;
32486
    private BitSet __isset_bit_vector = new BitSet(1);
32487
 
32488
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32489
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
32490
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 32491
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 32492
          new FieldValueMetaData(TType.STRUCT)));
32493
    }});
32494
 
32495
    static {
553 chandransh 32496
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 32497
    }
32498
 
553 chandransh 32499
    public updateMyResearch_result() {
130 ashish 32500
    }
32501
 
553 chandransh 32502
    public updateMyResearch_result(
130 ashish 32503
      boolean success,
553 chandransh 32504
      WidgetException scx)
130 ashish 32505
    {
32506
      this();
32507
      this.success = success;
32508
      setSuccessIsSet(true);
553 chandransh 32509
      this.scx = scx;
130 ashish 32510
    }
32511
 
32512
    /**
32513
     * Performs a deep copy on <i>other</i>.
32514
     */
553 chandransh 32515
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 32516
      __isset_bit_vector.clear();
32517
      __isset_bit_vector.or(other.__isset_bit_vector);
32518
      this.success = other.success;
553 chandransh 32519
      if (other.isSetScx()) {
32520
        this.scx = new WidgetException(other.scx);
130 ashish 32521
      }
32522
    }
32523
 
553 chandransh 32524
    public updateMyResearch_result deepCopy() {
32525
      return new updateMyResearch_result(this);
130 ashish 32526
    }
32527
 
32528
    @Deprecated
553 chandransh 32529
    public updateMyResearch_result clone() {
32530
      return new updateMyResearch_result(this);
130 ashish 32531
    }
32532
 
32533
    public boolean isSuccess() {
32534
      return this.success;
32535
    }
32536
 
553 chandransh 32537
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 32538
      this.success = success;
32539
      setSuccessIsSet(true);
32540
      return this;
32541
    }
32542
 
32543
    public void unsetSuccess() {
32544
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
32545
    }
32546
 
32547
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32548
    public boolean isSetSuccess() {
32549
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
32550
    }
32551
 
32552
    public void setSuccessIsSet(boolean value) {
32553
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
32554
    }
32555
 
553 chandransh 32556
    public WidgetException getScx() {
32557
      return this.scx;
130 ashish 32558
    }
32559
 
553 chandransh 32560
    public updateMyResearch_result setScx(WidgetException scx) {
32561
      this.scx = scx;
130 ashish 32562
      return this;
32563
    }
32564
 
553 chandransh 32565
    public void unsetScx() {
32566
      this.scx = null;
130 ashish 32567
    }
32568
 
553 chandransh 32569
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
32570
    public boolean isSetScx() {
32571
      return this.scx != null;
130 ashish 32572
    }
32573
 
553 chandransh 32574
    public void setScxIsSet(boolean value) {
130 ashish 32575
      if (!value) {
553 chandransh 32576
        this.scx = null;
130 ashish 32577
      }
32578
    }
32579
 
32580
    public void setFieldValue(_Fields field, Object value) {
32581
      switch (field) {
32582
      case SUCCESS:
32583
        if (value == null) {
32584
          unsetSuccess();
32585
        } else {
32586
          setSuccess((Boolean)value);
32587
        }
32588
        break;
32589
 
553 chandransh 32590
      case SCX:
130 ashish 32591
        if (value == null) {
553 chandransh 32592
          unsetScx();
130 ashish 32593
        } else {
553 chandransh 32594
          setScx((WidgetException)value);
130 ashish 32595
        }
32596
        break;
32597
 
32598
      }
32599
    }
32600
 
32601
    public void setFieldValue(int fieldID, Object value) {
32602
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32603
    }
32604
 
32605
    public Object getFieldValue(_Fields field) {
32606
      switch (field) {
32607
      case SUCCESS:
32608
        return new Boolean(isSuccess());
32609
 
553 chandransh 32610
      case SCX:
32611
        return getScx();
130 ashish 32612
 
32613
      }
32614
      throw new IllegalStateException();
32615
    }
32616
 
32617
    public Object getFieldValue(int fieldId) {
32618
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32619
    }
32620
 
32621
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32622
    public boolean isSet(_Fields field) {
32623
      switch (field) {
32624
      case SUCCESS:
32625
        return isSetSuccess();
553 chandransh 32626
      case SCX:
32627
        return isSetScx();
130 ashish 32628
      }
32629
      throw new IllegalStateException();
32630
    }
32631
 
32632
    public boolean isSet(int fieldID) {
32633
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32634
    }
32635
 
32636
    @Override
32637
    public boolean equals(Object that) {
32638
      if (that == null)
32639
        return false;
553 chandransh 32640
      if (that instanceof updateMyResearch_result)
32641
        return this.equals((updateMyResearch_result)that);
130 ashish 32642
      return false;
32643
    }
32644
 
553 chandransh 32645
    public boolean equals(updateMyResearch_result that) {
130 ashish 32646
      if (that == null)
32647
        return false;
32648
 
32649
      boolean this_present_success = true;
32650
      boolean that_present_success = true;
32651
      if (this_present_success || that_present_success) {
32652
        if (!(this_present_success && that_present_success))
32653
          return false;
32654
        if (this.success != that.success)
32655
          return false;
32656
      }
32657
 
553 chandransh 32658
      boolean this_present_scx = true && this.isSetScx();
32659
      boolean that_present_scx = true && that.isSetScx();
32660
      if (this_present_scx || that_present_scx) {
32661
        if (!(this_present_scx && that_present_scx))
130 ashish 32662
          return false;
553 chandransh 32663
        if (!this.scx.equals(that.scx))
130 ashish 32664
          return false;
32665
      }
32666
 
32667
      return true;
32668
    }
32669
 
32670
    @Override
32671
    public int hashCode() {
32672
      return 0;
32673
    }
32674
 
553 chandransh 32675
    public int compareTo(updateMyResearch_result other) {
130 ashish 32676
      if (!getClass().equals(other.getClass())) {
32677
        return getClass().getName().compareTo(other.getClass().getName());
32678
      }
32679
 
32680
      int lastComparison = 0;
553 chandransh 32681
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 32682
 
32683
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32684
      if (lastComparison != 0) {
32685
        return lastComparison;
32686
      }
32687
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32688
      if (lastComparison != 0) {
32689
        return lastComparison;
32690
      }
553 chandransh 32691
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 32692
      if (lastComparison != 0) {
32693
        return lastComparison;
32694
      }
553 chandransh 32695
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 32696
      if (lastComparison != 0) {
32697
        return lastComparison;
32698
      }
32699
      return 0;
32700
    }
32701
 
32702
    public void read(TProtocol iprot) throws TException {
32703
      TField field;
32704
      iprot.readStructBegin();
32705
      while (true)
32706
      {
32707
        field = iprot.readFieldBegin();
32708
        if (field.type == TType.STOP) { 
32709
          break;
32710
        }
32711
        _Fields fieldId = _Fields.findByThriftId(field.id);
32712
        if (fieldId == null) {
32713
          TProtocolUtil.skip(iprot, field.type);
32714
        } else {
32715
          switch (fieldId) {
32716
            case SUCCESS:
32717
              if (field.type == TType.BOOL) {
32718
                this.success = iprot.readBool();
32719
                setSuccessIsSet(true);
32720
              } else { 
32721
                TProtocolUtil.skip(iprot, field.type);
32722
              }
32723
              break;
553 chandransh 32724
            case SCX:
130 ashish 32725
              if (field.type == TType.STRUCT) {
553 chandransh 32726
                this.scx = new WidgetException();
32727
                this.scx.read(iprot);
130 ashish 32728
              } else { 
32729
                TProtocolUtil.skip(iprot, field.type);
32730
              }
32731
              break;
32732
          }
32733
          iprot.readFieldEnd();
32734
        }
32735
      }
32736
      iprot.readStructEnd();
32737
      validate();
32738
    }
32739
 
32740
    public void write(TProtocol oprot) throws TException {
32741
      oprot.writeStructBegin(STRUCT_DESC);
32742
 
32743
      if (this.isSetSuccess()) {
32744
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32745
        oprot.writeBool(this.success);
32746
        oprot.writeFieldEnd();
553 chandransh 32747
      } else if (this.isSetScx()) {
32748
        oprot.writeFieldBegin(SCX_FIELD_DESC);
32749
        this.scx.write(oprot);
130 ashish 32750
        oprot.writeFieldEnd();
32751
      }
32752
      oprot.writeFieldStop();
32753
      oprot.writeStructEnd();
32754
    }
32755
 
32756
    @Override
32757
    public String toString() {
553 chandransh 32758
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 32759
      boolean first = true;
32760
 
32761
      sb.append("success:");
32762
      sb.append(this.success);
32763
      first = false;
32764
      if (!first) sb.append(", ");
553 chandransh 32765
      sb.append("scx:");
32766
      if (this.scx == null) {
130 ashish 32767
        sb.append("null");
32768
      } else {
553 chandransh 32769
        sb.append(this.scx);
130 ashish 32770
      }
32771
      first = false;
32772
      sb.append(")");
32773
      return sb.toString();
32774
    }
32775
 
32776
    public void validate() throws TException {
32777
      // check for required fields
32778
    }
32779
 
32780
  }
32781
 
553 chandransh 32782
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
32783
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 32784
 
771 rajveer 32785
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
32786
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 32787
 
771 rajveer 32788
    private long userId;
32789
    private long itemId;
130 ashish 32790
 
32791
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32792
    public enum _Fields implements TFieldIdEnum {
771 rajveer 32793
      USER_ID((short)1, "userId"),
32794
      ITEM_ID((short)2, "itemId");
130 ashish 32795
 
32796
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32797
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32798
 
32799
      static {
32800
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32801
          byId.put((int)field._thriftId, field);
32802
          byName.put(field.getFieldName(), field);
32803
        }
32804
      }
32805
 
32806
      /**
32807
       * Find the _Fields constant that matches fieldId, or null if its not found.
32808
       */
32809
      public static _Fields findByThriftId(int fieldId) {
32810
        return byId.get(fieldId);
32811
      }
32812
 
32813
      /**
32814
       * Find the _Fields constant that matches fieldId, throwing an exception
32815
       * if it is not found.
32816
       */
32817
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32818
        _Fields fields = findByThriftId(fieldId);
32819
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32820
        return fields;
32821
      }
32822
 
32823
      /**
32824
       * Find the _Fields constant that matches name, or null if its not found.
32825
       */
32826
      public static _Fields findByName(String name) {
32827
        return byName.get(name);
32828
      }
32829
 
32830
      private final short _thriftId;
32831
      private final String _fieldName;
32832
 
32833
      _Fields(short thriftId, String fieldName) {
32834
        _thriftId = thriftId;
32835
        _fieldName = fieldName;
32836
      }
32837
 
32838
      public short getThriftFieldId() {
32839
        return _thriftId;
32840
      }
32841
 
32842
      public String getFieldName() {
32843
        return _fieldName;
32844
      }
32845
    }
32846
 
32847
    // isset id assignments
771 rajveer 32848
    private static final int __USERID_ISSET_ID = 0;
32849
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 32850
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 32851
 
32852
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 32853
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 32854
          new FieldValueMetaData(TType.I64)));
771 rajveer 32855
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 32856
          new FieldValueMetaData(TType.I64)));
130 ashish 32857
    }});
32858
 
32859
    static {
553 chandransh 32860
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 32861
    }
32862
 
553 chandransh 32863
    public deleteItemFromMyResearch_args() {
130 ashish 32864
    }
32865
 
553 chandransh 32866
    public deleteItemFromMyResearch_args(
771 rajveer 32867
      long userId,
32868
      long itemId)
130 ashish 32869
    {
32870
      this();
771 rajveer 32871
      this.userId = userId;
32872
      setUserIdIsSet(true);
32873
      this.itemId = itemId;
32874
      setItemIdIsSet(true);
130 ashish 32875
    }
32876
 
32877
    /**
32878
     * Performs a deep copy on <i>other</i>.
32879
     */
553 chandransh 32880
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 32881
      __isset_bit_vector.clear();
32882
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 32883
      this.userId = other.userId;
32884
      this.itemId = other.itemId;
553 chandransh 32885
    }
32886
 
32887
    public deleteItemFromMyResearch_args deepCopy() {
32888
      return new deleteItemFromMyResearch_args(this);
32889
    }
32890
 
32891
    @Deprecated
32892
    public deleteItemFromMyResearch_args clone() {
32893
      return new deleteItemFromMyResearch_args(this);
32894
    }
32895
 
771 rajveer 32896
    public long getUserId() {
32897
      return this.userId;
553 chandransh 32898
    }
32899
 
771 rajveer 32900
    public deleteItemFromMyResearch_args setUserId(long userId) {
32901
      this.userId = userId;
32902
      setUserIdIsSet(true);
553 chandransh 32903
      return this;
32904
    }
32905
 
771 rajveer 32906
    public void unsetUserId() {
32907
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 32908
    }
32909
 
771 rajveer 32910
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
32911
    public boolean isSetUserId() {
32912
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 32913
    }
32914
 
771 rajveer 32915
    public void setUserIdIsSet(boolean value) {
32916
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 32917
    }
32918
 
771 rajveer 32919
    public long getItemId() {
32920
      return this.itemId;
553 chandransh 32921
    }
32922
 
771 rajveer 32923
    public deleteItemFromMyResearch_args setItemId(long itemId) {
32924
      this.itemId = itemId;
32925
      setItemIdIsSet(true);
553 chandransh 32926
      return this;
32927
    }
32928
 
771 rajveer 32929
    public void unsetItemId() {
32930
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 32931
    }
32932
 
771 rajveer 32933
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
32934
    public boolean isSetItemId() {
32935
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 32936
    }
32937
 
771 rajveer 32938
    public void setItemIdIsSet(boolean value) {
32939
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 32940
    }
32941
 
32942
    public void setFieldValue(_Fields field, Object value) {
32943
      switch (field) {
32944
      case USER_ID:
32945
        if (value == null) {
771 rajveer 32946
          unsetUserId();
553 chandransh 32947
        } else {
771 rajveer 32948
          setUserId((Long)value);
553 chandransh 32949
        }
32950
        break;
32951
 
32952
      case ITEM_ID:
32953
        if (value == null) {
771 rajveer 32954
          unsetItemId();
553 chandransh 32955
        } else {
771 rajveer 32956
          setItemId((Long)value);
553 chandransh 32957
        }
32958
        break;
32959
 
130 ashish 32960
      }
32961
    }
32962
 
553 chandransh 32963
    public void setFieldValue(int fieldID, Object value) {
32964
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 32965
    }
32966
 
553 chandransh 32967
    public Object getFieldValue(_Fields field) {
32968
      switch (field) {
32969
      case USER_ID:
771 rajveer 32970
        return new Long(getUserId());
553 chandransh 32971
 
32972
      case ITEM_ID:
771 rajveer 32973
        return new Long(getItemId());
553 chandransh 32974
 
32975
      }
32976
      throw new IllegalStateException();
32977
    }
32978
 
32979
    public Object getFieldValue(int fieldId) {
32980
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32981
    }
32982
 
32983
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32984
    public boolean isSet(_Fields field) {
32985
      switch (field) {
32986
      case USER_ID:
771 rajveer 32987
        return isSetUserId();
553 chandransh 32988
      case ITEM_ID:
771 rajveer 32989
        return isSetItemId();
553 chandransh 32990
      }
32991
      throw new IllegalStateException();
32992
    }
32993
 
32994
    public boolean isSet(int fieldID) {
32995
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32996
    }
32997
 
32998
    @Override
32999
    public boolean equals(Object that) {
33000
      if (that == null)
33001
        return false;
33002
      if (that instanceof deleteItemFromMyResearch_args)
33003
        return this.equals((deleteItemFromMyResearch_args)that);
33004
      return false;
33005
    }
33006
 
33007
    public boolean equals(deleteItemFromMyResearch_args that) {
33008
      if (that == null)
33009
        return false;
33010
 
771 rajveer 33011
      boolean this_present_userId = true;
33012
      boolean that_present_userId = true;
33013
      if (this_present_userId || that_present_userId) {
33014
        if (!(this_present_userId && that_present_userId))
553 chandransh 33015
          return false;
771 rajveer 33016
        if (this.userId != that.userId)
553 chandransh 33017
          return false;
33018
      }
33019
 
771 rajveer 33020
      boolean this_present_itemId = true;
33021
      boolean that_present_itemId = true;
33022
      if (this_present_itemId || that_present_itemId) {
33023
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 33024
          return false;
771 rajveer 33025
        if (this.itemId != that.itemId)
553 chandransh 33026
          return false;
33027
      }
33028
 
33029
      return true;
33030
    }
33031
 
33032
    @Override
33033
    public int hashCode() {
33034
      return 0;
33035
    }
33036
 
33037
    public int compareTo(deleteItemFromMyResearch_args other) {
33038
      if (!getClass().equals(other.getClass())) {
33039
        return getClass().getName().compareTo(other.getClass().getName());
33040
      }
33041
 
33042
      int lastComparison = 0;
33043
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
33044
 
771 rajveer 33045
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 33046
      if (lastComparison != 0) {
33047
        return lastComparison;
33048
      }
771 rajveer 33049
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 33050
      if (lastComparison != 0) {
33051
        return lastComparison;
33052
      }
771 rajveer 33053
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 33054
      if (lastComparison != 0) {
33055
        return lastComparison;
33056
      }
771 rajveer 33057
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 33058
      if (lastComparison != 0) {
33059
        return lastComparison;
33060
      }
33061
      return 0;
33062
    }
33063
 
33064
    public void read(TProtocol iprot) throws TException {
33065
      TField field;
33066
      iprot.readStructBegin();
33067
      while (true)
33068
      {
33069
        field = iprot.readFieldBegin();
33070
        if (field.type == TType.STOP) { 
33071
          break;
33072
        }
33073
        _Fields fieldId = _Fields.findByThriftId(field.id);
33074
        if (fieldId == null) {
33075
          TProtocolUtil.skip(iprot, field.type);
33076
        } else {
33077
          switch (fieldId) {
33078
            case USER_ID:
33079
              if (field.type == TType.I64) {
771 rajveer 33080
                this.userId = iprot.readI64();
33081
                setUserIdIsSet(true);
553 chandransh 33082
              } else { 
33083
                TProtocolUtil.skip(iprot, field.type);
33084
              }
33085
              break;
33086
            case ITEM_ID:
33087
              if (field.type == TType.I64) {
771 rajveer 33088
                this.itemId = iprot.readI64();
33089
                setItemIdIsSet(true);
553 chandransh 33090
              } else { 
33091
                TProtocolUtil.skip(iprot, field.type);
33092
              }
33093
              break;
33094
          }
33095
          iprot.readFieldEnd();
33096
        }
33097
      }
33098
      iprot.readStructEnd();
33099
      validate();
33100
    }
33101
 
33102
    public void write(TProtocol oprot) throws TException {
33103
      validate();
33104
 
33105
      oprot.writeStructBegin(STRUCT_DESC);
33106
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 33107
      oprot.writeI64(this.userId);
553 chandransh 33108
      oprot.writeFieldEnd();
33109
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 33110
      oprot.writeI64(this.itemId);
553 chandransh 33111
      oprot.writeFieldEnd();
33112
      oprot.writeFieldStop();
33113
      oprot.writeStructEnd();
33114
    }
33115
 
33116
    @Override
33117
    public String toString() {
33118
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
33119
      boolean first = true;
33120
 
771 rajveer 33121
      sb.append("userId:");
33122
      sb.append(this.userId);
553 chandransh 33123
      first = false;
33124
      if (!first) sb.append(", ");
771 rajveer 33125
      sb.append("itemId:");
33126
      sb.append(this.itemId);
553 chandransh 33127
      first = false;
33128
      sb.append(")");
33129
      return sb.toString();
33130
    }
33131
 
33132
    public void validate() throws TException {
33133
      // check for required fields
33134
    }
33135
 
33136
  }
33137
 
33138
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
33139
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
33140
 
33141
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
33142
 
33143
    private WidgetException scx;
33144
 
33145
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33146
    public enum _Fields implements TFieldIdEnum {
33147
      SCX((short)1, "scx");
33148
 
33149
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33150
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33151
 
33152
      static {
33153
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33154
          byId.put((int)field._thriftId, field);
33155
          byName.put(field.getFieldName(), field);
33156
        }
33157
      }
33158
 
33159
      /**
33160
       * Find the _Fields constant that matches fieldId, or null if its not found.
33161
       */
33162
      public static _Fields findByThriftId(int fieldId) {
33163
        return byId.get(fieldId);
33164
      }
33165
 
33166
      /**
33167
       * Find the _Fields constant that matches fieldId, throwing an exception
33168
       * if it is not found.
33169
       */
33170
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33171
        _Fields fields = findByThriftId(fieldId);
33172
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33173
        return fields;
33174
      }
33175
 
33176
      /**
33177
       * Find the _Fields constant that matches name, or null if its not found.
33178
       */
33179
      public static _Fields findByName(String name) {
33180
        return byName.get(name);
33181
      }
33182
 
33183
      private final short _thriftId;
33184
      private final String _fieldName;
33185
 
33186
      _Fields(short thriftId, String fieldName) {
33187
        _thriftId = thriftId;
33188
        _fieldName = fieldName;
33189
      }
33190
 
33191
      public short getThriftFieldId() {
33192
        return _thriftId;
33193
      }
33194
 
33195
      public String getFieldName() {
33196
        return _fieldName;
33197
      }
33198
    }
33199
 
33200
    // isset id assignments
33201
 
33202
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33203
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
33204
          new FieldValueMetaData(TType.STRUCT)));
33205
    }});
33206
 
33207
    static {
33208
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
33209
    }
33210
 
33211
    public deleteItemFromMyResearch_result() {
33212
    }
33213
 
33214
    public deleteItemFromMyResearch_result(
33215
      WidgetException scx)
33216
    {
33217
      this();
33218
      this.scx = scx;
33219
    }
33220
 
33221
    /**
33222
     * Performs a deep copy on <i>other</i>.
33223
     */
33224
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
33225
      if (other.isSetScx()) {
33226
        this.scx = new WidgetException(other.scx);
33227
      }
33228
    }
33229
 
33230
    public deleteItemFromMyResearch_result deepCopy() {
33231
      return new deleteItemFromMyResearch_result(this);
33232
    }
33233
 
130 ashish 33234
    @Deprecated
553 chandransh 33235
    public deleteItemFromMyResearch_result clone() {
33236
      return new deleteItemFromMyResearch_result(this);
130 ashish 33237
    }
33238
 
553 chandransh 33239
    public WidgetException getScx() {
33240
      return this.scx;
130 ashish 33241
    }
33242
 
553 chandransh 33243
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
33244
      this.scx = scx;
130 ashish 33245
      return this;
33246
    }
33247
 
553 chandransh 33248
    public void unsetScx() {
33249
      this.scx = null;
130 ashish 33250
    }
33251
 
553 chandransh 33252
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
33253
    public boolean isSetScx() {
33254
      return this.scx != null;
130 ashish 33255
    }
33256
 
553 chandransh 33257
    public void setScxIsSet(boolean value) {
130 ashish 33258
      if (!value) {
553 chandransh 33259
        this.scx = null;
130 ashish 33260
      }
33261
    }
33262
 
553 chandransh 33263
    public void setFieldValue(_Fields field, Object value) {
33264
      switch (field) {
33265
      case SCX:
33266
        if (value == null) {
33267
          unsetScx();
33268
        } else {
33269
          setScx((WidgetException)value);
33270
        }
33271
        break;
33272
 
33273
      }
130 ashish 33274
    }
33275
 
553 chandransh 33276
    public void setFieldValue(int fieldID, Object value) {
33277
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33278
    }
33279
 
33280
    public Object getFieldValue(_Fields field) {
33281
      switch (field) {
33282
      case SCX:
33283
        return getScx();
33284
 
33285
      }
33286
      throw new IllegalStateException();
33287
    }
33288
 
33289
    public Object getFieldValue(int fieldId) {
33290
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33291
    }
33292
 
33293
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33294
    public boolean isSet(_Fields field) {
33295
      switch (field) {
33296
      case SCX:
33297
        return isSetScx();
33298
      }
33299
      throw new IllegalStateException();
33300
    }
33301
 
33302
    public boolean isSet(int fieldID) {
33303
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33304
    }
33305
 
33306
    @Override
33307
    public boolean equals(Object that) {
33308
      if (that == null)
33309
        return false;
33310
      if (that instanceof deleteItemFromMyResearch_result)
33311
        return this.equals((deleteItemFromMyResearch_result)that);
33312
      return false;
33313
    }
33314
 
33315
    public boolean equals(deleteItemFromMyResearch_result that) {
33316
      if (that == null)
33317
        return false;
33318
 
33319
      boolean this_present_scx = true && this.isSetScx();
33320
      boolean that_present_scx = true && that.isSetScx();
33321
      if (this_present_scx || that_present_scx) {
33322
        if (!(this_present_scx && that_present_scx))
33323
          return false;
33324
        if (!this.scx.equals(that.scx))
33325
          return false;
33326
      }
33327
 
33328
      return true;
33329
    }
33330
 
33331
    @Override
33332
    public int hashCode() {
33333
      return 0;
33334
    }
33335
 
33336
    public int compareTo(deleteItemFromMyResearch_result other) {
33337
      if (!getClass().equals(other.getClass())) {
33338
        return getClass().getName().compareTo(other.getClass().getName());
33339
      }
33340
 
33341
      int lastComparison = 0;
33342
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
33343
 
33344
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
33345
      if (lastComparison != 0) {
33346
        return lastComparison;
33347
      }
33348
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
33349
      if (lastComparison != 0) {
33350
        return lastComparison;
33351
      }
33352
      return 0;
33353
    }
33354
 
33355
    public void read(TProtocol iprot) throws TException {
33356
      TField field;
33357
      iprot.readStructBegin();
33358
      while (true)
33359
      {
33360
        field = iprot.readFieldBegin();
33361
        if (field.type == TType.STOP) { 
33362
          break;
33363
        }
33364
        _Fields fieldId = _Fields.findByThriftId(field.id);
33365
        if (fieldId == null) {
33366
          TProtocolUtil.skip(iprot, field.type);
33367
        } else {
33368
          switch (fieldId) {
33369
            case SCX:
33370
              if (field.type == TType.STRUCT) {
33371
                this.scx = new WidgetException();
33372
                this.scx.read(iprot);
33373
              } else { 
33374
                TProtocolUtil.skip(iprot, field.type);
33375
              }
33376
              break;
33377
          }
33378
          iprot.readFieldEnd();
33379
        }
33380
      }
33381
      iprot.readStructEnd();
33382
      validate();
33383
    }
33384
 
33385
    public void write(TProtocol oprot) throws TException {
33386
      oprot.writeStructBegin(STRUCT_DESC);
33387
 
33388
      if (this.isSetScx()) {
33389
        oprot.writeFieldBegin(SCX_FIELD_DESC);
33390
        this.scx.write(oprot);
33391
        oprot.writeFieldEnd();
33392
      }
33393
      oprot.writeFieldStop();
33394
      oprot.writeStructEnd();
33395
    }
33396
 
33397
    @Override
33398
    public String toString() {
33399
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
33400
      boolean first = true;
33401
 
33402
      sb.append("scx:");
33403
      if (this.scx == null) {
33404
        sb.append("null");
33405
      } else {
33406
        sb.append(this.scx);
33407
      }
33408
      first = false;
33409
      sb.append(")");
33410
      return sb.toString();
33411
    }
33412
 
33413
    public void validate() throws TException {
33414
      // check for required fields
33415
    }
33416
 
33417
  }
33418
 
771 rajveer 33419
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
33420
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
553 chandransh 33421
 
771 rajveer 33422
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
33423
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
553 chandransh 33424
 
771 rajveer 33425
    private long userId;
33426
    private long itemId;
553 chandransh 33427
 
33428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33429
    public enum _Fields implements TFieldIdEnum {
771 rajveer 33430
      USER_ID((short)1, "userId"),
33431
      ITEM_ID((short)2, "itemId");
553 chandransh 33432
 
33433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33435
 
33436
      static {
33437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33438
          byId.put((int)field._thriftId, field);
33439
          byName.put(field.getFieldName(), field);
33440
        }
33441
      }
33442
 
33443
      /**
33444
       * Find the _Fields constant that matches fieldId, or null if its not found.
33445
       */
33446
      public static _Fields findByThriftId(int fieldId) {
33447
        return byId.get(fieldId);
33448
      }
33449
 
33450
      /**
33451
       * Find the _Fields constant that matches fieldId, throwing an exception
33452
       * if it is not found.
33453
       */
33454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33455
        _Fields fields = findByThriftId(fieldId);
33456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33457
        return fields;
33458
      }
33459
 
33460
      /**
33461
       * Find the _Fields constant that matches name, or null if its not found.
33462
       */
33463
      public static _Fields findByName(String name) {
33464
        return byName.get(name);
33465
      }
33466
 
33467
      private final short _thriftId;
33468
      private final String _fieldName;
33469
 
33470
      _Fields(short thriftId, String fieldName) {
33471
        _thriftId = thriftId;
33472
        _fieldName = fieldName;
33473
      }
33474
 
33475
      public short getThriftFieldId() {
33476
        return _thriftId;
33477
      }
33478
 
33479
      public String getFieldName() {
33480
        return _fieldName;
33481
      }
33482
    }
33483
 
33484
    // isset id assignments
771 rajveer 33485
    private static final int __USERID_ISSET_ID = 0;
33486
    private static final int __ITEMID_ISSET_ID = 1;
33487
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 33488
 
33489
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 33490
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 33491
          new FieldValueMetaData(TType.I64)));
771 rajveer 33492
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 33493
          new FieldValueMetaData(TType.I64)));
33494
    }});
33495
 
33496
    static {
771 rajveer 33497
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
553 chandransh 33498
    }
33499
 
771 rajveer 33500
    public updateBrowseHistory_args() {
553 chandransh 33501
    }
33502
 
771 rajveer 33503
    public updateBrowseHistory_args(
33504
      long userId,
33505
      long itemId)
553 chandransh 33506
    {
33507
      this();
771 rajveer 33508
      this.userId = userId;
33509
      setUserIdIsSet(true);
33510
      this.itemId = itemId;
33511
      setItemIdIsSet(true);
553 chandransh 33512
    }
33513
 
33514
    /**
33515
     * Performs a deep copy on <i>other</i>.
33516
     */
771 rajveer 33517
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
553 chandransh 33518
      __isset_bit_vector.clear();
33519
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 33520
      this.userId = other.userId;
33521
      this.itemId = other.itemId;
553 chandransh 33522
    }
33523
 
771 rajveer 33524
    public updateBrowseHistory_args deepCopy() {
33525
      return new updateBrowseHistory_args(this);
553 chandransh 33526
    }
33527
 
33528
    @Deprecated
771 rajveer 33529
    public updateBrowseHistory_args clone() {
33530
      return new updateBrowseHistory_args(this);
553 chandransh 33531
    }
33532
 
771 rajveer 33533
    public long getUserId() {
33534
      return this.userId;
553 chandransh 33535
    }
33536
 
771 rajveer 33537
    public updateBrowseHistory_args setUserId(long userId) {
33538
      this.userId = userId;
33539
      setUserIdIsSet(true);
130 ashish 33540
      return this;
33541
    }
33542
 
771 rajveer 33543
    public void unsetUserId() {
33544
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 33545
    }
33546
 
771 rajveer 33547
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
33548
    public boolean isSetUserId() {
33549
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 33550
    }
33551
 
771 rajveer 33552
    public void setUserIdIsSet(boolean value) {
33553
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 33554
    }
33555
 
771 rajveer 33556
    public long getItemId() {
33557
      return this.itemId;
553 chandransh 33558
    }
33559
 
771 rajveer 33560
    public updateBrowseHistory_args setItemId(long itemId) {
33561
      this.itemId = itemId;
33562
      setItemIdIsSet(true);
553 chandransh 33563
      return this;
33564
    }
33565
 
771 rajveer 33566
    public void unsetItemId() {
33567
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 33568
    }
33569
 
771 rajveer 33570
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
33571
    public boolean isSetItemId() {
33572
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 33573
    }
33574
 
771 rajveer 33575
    public void setItemIdIsSet(boolean value) {
33576
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 33577
    }
33578
 
130 ashish 33579
    public void setFieldValue(_Fields field, Object value) {
33580
      switch (field) {
771 rajveer 33581
      case USER_ID:
130 ashish 33582
        if (value == null) {
771 rajveer 33583
          unsetUserId();
130 ashish 33584
        } else {
771 rajveer 33585
          setUserId((Long)value);
130 ashish 33586
        }
33587
        break;
33588
 
771 rajveer 33589
      case ITEM_ID:
130 ashish 33590
        if (value == null) {
771 rajveer 33591
          unsetItemId();
130 ashish 33592
        } else {
771 rajveer 33593
          setItemId((Long)value);
130 ashish 33594
        }
33595
        break;
33596
 
33597
      }
33598
    }
33599
 
33600
    public void setFieldValue(int fieldID, Object value) {
33601
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33602
    }
33603
 
33604
    public Object getFieldValue(_Fields field) {
33605
      switch (field) {
771 rajveer 33606
      case USER_ID:
33607
        return new Long(getUserId());
33608
 
553 chandransh 33609
      case ITEM_ID:
771 rajveer 33610
        return new Long(getItemId());
130 ashish 33611
 
33612
      }
33613
      throw new IllegalStateException();
33614
    }
33615
 
33616
    public Object getFieldValue(int fieldId) {
33617
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33618
    }
33619
 
33620
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33621
    public boolean isSet(_Fields field) {
33622
      switch (field) {
771 rajveer 33623
      case USER_ID:
33624
        return isSetUserId();
553 chandransh 33625
      case ITEM_ID:
771 rajveer 33626
        return isSetItemId();
130 ashish 33627
      }
33628
      throw new IllegalStateException();
33629
    }
33630
 
33631
    public boolean isSet(int fieldID) {
33632
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33633
    }
33634
 
33635
    @Override
33636
    public boolean equals(Object that) {
33637
      if (that == null)
33638
        return false;
771 rajveer 33639
      if (that instanceof updateBrowseHistory_args)
33640
        return this.equals((updateBrowseHistory_args)that);
130 ashish 33641
      return false;
33642
    }
33643
 
771 rajveer 33644
    public boolean equals(updateBrowseHistory_args that) {
130 ashish 33645
      if (that == null)
33646
        return false;
33647
 
771 rajveer 33648
      boolean this_present_userId = true;
33649
      boolean that_present_userId = true;
33650
      if (this_present_userId || that_present_userId) {
33651
        if (!(this_present_userId && that_present_userId))
130 ashish 33652
          return false;
771 rajveer 33653
        if (this.userId != that.userId)
130 ashish 33654
          return false;
33655
      }
33656
 
771 rajveer 33657
      boolean this_present_itemId = true;
33658
      boolean that_present_itemId = true;
33659
      if (this_present_itemId || that_present_itemId) {
33660
        if (!(this_present_itemId && that_present_itemId))
130 ashish 33661
          return false;
771 rajveer 33662
        if (this.itemId != that.itemId)
130 ashish 33663
          return false;
33664
      }
33665
 
33666
      return true;
33667
    }
33668
 
33669
    @Override
33670
    public int hashCode() {
33671
      return 0;
33672
    }
33673
 
771 rajveer 33674
    public int compareTo(updateBrowseHistory_args other) {
130 ashish 33675
      if (!getClass().equals(other.getClass())) {
33676
        return getClass().getName().compareTo(other.getClass().getName());
33677
      }
33678
 
33679
      int lastComparison = 0;
771 rajveer 33680
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
130 ashish 33681
 
771 rajveer 33682
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 33683
      if (lastComparison != 0) {
33684
        return lastComparison;
33685
      }
771 rajveer 33686
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 33687
      if (lastComparison != 0) {
33688
        return lastComparison;
33689
      }
771 rajveer 33690
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
130 ashish 33691
      if (lastComparison != 0) {
33692
        return lastComparison;
33693
      }
771 rajveer 33694
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
130 ashish 33695
      if (lastComparison != 0) {
33696
        return lastComparison;
33697
      }
33698
      return 0;
33699
    }
33700
 
33701
    public void read(TProtocol iprot) throws TException {
33702
      TField field;
33703
      iprot.readStructBegin();
33704
      while (true)
33705
      {
33706
        field = iprot.readFieldBegin();
33707
        if (field.type == TType.STOP) { 
33708
          break;
33709
        }
33710
        _Fields fieldId = _Fields.findByThriftId(field.id);
33711
        if (fieldId == null) {
33712
          TProtocolUtil.skip(iprot, field.type);
33713
        } else {
33714
          switch (fieldId) {
771 rajveer 33715
            case USER_ID:
553 chandransh 33716
              if (field.type == TType.I64) {
771 rajveer 33717
                this.userId = iprot.readI64();
33718
                setUserIdIsSet(true);
130 ashish 33719
              } else { 
33720
                TProtocolUtil.skip(iprot, field.type);
33721
              }
33722
              break;
771 rajveer 33723
            case ITEM_ID:
553 chandransh 33724
              if (field.type == TType.I64) {
771 rajveer 33725
                this.itemId = iprot.readI64();
33726
                setItemIdIsSet(true);
553 chandransh 33727
              } else { 
33728
                TProtocolUtil.skip(iprot, field.type);
33729
              }
33730
              break;
130 ashish 33731
          }
33732
          iprot.readFieldEnd();
33733
        }
33734
      }
33735
      iprot.readStructEnd();
33736
      validate();
33737
    }
33738
 
33739
    public void write(TProtocol oprot) throws TException {
33740
      validate();
33741
 
33742
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 33743
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
33744
      oprot.writeI64(this.userId);
33745
      oprot.writeFieldEnd();
553 chandransh 33746
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 33747
      oprot.writeI64(this.itemId);
553 chandransh 33748
      oprot.writeFieldEnd();
130 ashish 33749
      oprot.writeFieldStop();
33750
      oprot.writeStructEnd();
33751
    }
33752
 
33753
    @Override
33754
    public String toString() {
771 rajveer 33755
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
130 ashish 33756
      boolean first = true;
33757
 
771 rajveer 33758
      sb.append("userId:");
33759
      sb.append(this.userId);
553 chandransh 33760
      first = false;
33761
      if (!first) sb.append(", ");
771 rajveer 33762
      sb.append("itemId:");
33763
      sb.append(this.itemId);
130 ashish 33764
      first = false;
33765
      sb.append(")");
33766
      return sb.toString();
33767
    }
33768
 
33769
    public void validate() throws TException {
33770
      // check for required fields
33771
    }
33772
 
33773
  }
33774
 
771 rajveer 33775
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
33776
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
130 ashish 33777
 
33778
 
33779
 
33780
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33781
    public enum _Fields implements TFieldIdEnum {
553 chandransh 33782
;
33783
 
33784
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33785
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33786
 
33787
      static {
33788
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33789
          byId.put((int)field._thriftId, field);
33790
          byName.put(field.getFieldName(), field);
33791
        }
33792
      }
33793
 
33794
      /**
33795
       * Find the _Fields constant that matches fieldId, or null if its not found.
33796
       */
33797
      public static _Fields findByThriftId(int fieldId) {
33798
        return byId.get(fieldId);
33799
      }
33800
 
33801
      /**
33802
       * Find the _Fields constant that matches fieldId, throwing an exception
33803
       * if it is not found.
33804
       */
33805
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33806
        _Fields fields = findByThriftId(fieldId);
33807
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
33808
        return fields;
33809
      }
33810
 
33811
      /**
33812
       * Find the _Fields constant that matches name, or null if its not found.
33813
       */
33814
      public static _Fields findByName(String name) {
33815
        return byName.get(name);
33816
      }
33817
 
33818
      private final short _thriftId;
33819
      private final String _fieldName;
33820
 
33821
      _Fields(short thriftId, String fieldName) {
33822
        _thriftId = thriftId;
33823
        _fieldName = fieldName;
33824
      }
33825
 
33826
      public short getThriftFieldId() {
33827
        return _thriftId;
33828
      }
33829
 
33830
      public String getFieldName() {
33831
        return _fieldName;
33832
      }
33833
    }
33834
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
33835
    }});
33836
 
33837
    static {
771 rajveer 33838
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
553 chandransh 33839
    }
33840
 
771 rajveer 33841
    public updateBrowseHistory_result() {
553 chandransh 33842
    }
33843
 
33844
    /**
33845
     * Performs a deep copy on <i>other</i>.
33846
     */
771 rajveer 33847
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
553 chandransh 33848
    }
33849
 
771 rajveer 33850
    public updateBrowseHistory_result deepCopy() {
33851
      return new updateBrowseHistory_result(this);
553 chandransh 33852
    }
33853
 
33854
    @Deprecated
771 rajveer 33855
    public updateBrowseHistory_result clone() {
33856
      return new updateBrowseHistory_result(this);
553 chandransh 33857
    }
33858
 
33859
    public void setFieldValue(_Fields field, Object value) {
33860
      switch (field) {
33861
      }
33862
    }
33863
 
33864
    public void setFieldValue(int fieldID, Object value) {
33865
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
33866
    }
33867
 
33868
    public Object getFieldValue(_Fields field) {
33869
      switch (field) {
33870
      }
33871
      throw new IllegalStateException();
33872
    }
33873
 
33874
    public Object getFieldValue(int fieldId) {
33875
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
33876
    }
33877
 
33878
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
33879
    public boolean isSet(_Fields field) {
33880
      switch (field) {
33881
      }
33882
      throw new IllegalStateException();
33883
    }
33884
 
33885
    public boolean isSet(int fieldID) {
33886
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
33887
    }
33888
 
33889
    @Override
33890
    public boolean equals(Object that) {
33891
      if (that == null)
33892
        return false;
771 rajveer 33893
      if (that instanceof updateBrowseHistory_result)
33894
        return this.equals((updateBrowseHistory_result)that);
553 chandransh 33895
      return false;
33896
    }
33897
 
771 rajveer 33898
    public boolean equals(updateBrowseHistory_result that) {
553 chandransh 33899
      if (that == null)
33900
        return false;
33901
 
33902
      return true;
33903
    }
33904
 
33905
    @Override
33906
    public int hashCode() {
33907
      return 0;
33908
    }
33909
 
771 rajveer 33910
    public int compareTo(updateBrowseHistory_result other) {
553 chandransh 33911
      if (!getClass().equals(other.getClass())) {
33912
        return getClass().getName().compareTo(other.getClass().getName());
33913
      }
33914
 
33915
      int lastComparison = 0;
771 rajveer 33916
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
553 chandransh 33917
 
33918
      return 0;
33919
    }
33920
 
33921
    public void read(TProtocol iprot) throws TException {
33922
      TField field;
33923
      iprot.readStructBegin();
33924
      while (true)
33925
      {
33926
        field = iprot.readFieldBegin();
33927
        if (field.type == TType.STOP) { 
33928
          break;
33929
        }
33930
        _Fields fieldId = _Fields.findByThriftId(field.id);
33931
        if (fieldId == null) {
33932
          TProtocolUtil.skip(iprot, field.type);
33933
        } else {
33934
          switch (fieldId) {
33935
          }
33936
          iprot.readFieldEnd();
33937
        }
33938
      }
33939
      iprot.readStructEnd();
33940
      validate();
33941
    }
33942
 
33943
    public void write(TProtocol oprot) throws TException {
33944
      oprot.writeStructBegin(STRUCT_DESC);
33945
 
33946
      oprot.writeFieldStop();
33947
      oprot.writeStructEnd();
33948
    }
33949
 
33950
    @Override
33951
    public String toString() {
771 rajveer 33952
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
553 chandransh 33953
      boolean first = true;
33954
 
33955
      sb.append(")");
33956
      return sb.toString();
33957
    }
33958
 
33959
    public void validate() throws TException {
33960
      // check for required fields
33961
    }
33962
 
33963
  }
33964
 
771 rajveer 33965
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
33966
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
553 chandransh 33967
 
771 rajveer 33968
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 33969
 
771 rajveer 33970
    private long userId;
553 chandransh 33971
 
33972
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
33973
    public enum _Fields implements TFieldIdEnum {
771 rajveer 33974
      USER_ID((short)1, "userId");
553 chandransh 33975
 
33976
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
33977
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
33978
 
33979
      static {
33980
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
33981
          byId.put((int)field._thriftId, field);
33982
          byName.put(field.getFieldName(), field);
33983
        }
33984
      }
33985
 
33986
      /**
33987
       * Find the _Fields constant that matches fieldId, or null if its not found.
33988
       */
33989
      public static _Fields findByThriftId(int fieldId) {
33990
        return byId.get(fieldId);
33991
      }
33992
 
33993
      /**
33994
       * Find the _Fields constant that matches fieldId, throwing an exception
33995
       * if it is not found.
33996
       */
33997
      public static _Fields findByThriftIdOrThrow(int fieldId) {
33998
        _Fields fields = findByThriftId(fieldId);
33999
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34000
        return fields;
34001
      }
34002
 
34003
      /**
34004
       * Find the _Fields constant that matches name, or null if its not found.
34005
       */
34006
      public static _Fields findByName(String name) {
34007
        return byName.get(name);
34008
      }
34009
 
34010
      private final short _thriftId;
34011
      private final String _fieldName;
34012
 
34013
      _Fields(short thriftId, String fieldName) {
34014
        _thriftId = thriftId;
34015
        _fieldName = fieldName;
34016
      }
34017
 
34018
      public short getThriftFieldId() {
34019
        return _thriftId;
34020
      }
34021
 
34022
      public String getFieldName() {
34023
        return _fieldName;
34024
      }
34025
    }
34026
 
34027
    // isset id assignments
771 rajveer 34028
    private static final int __USERID_ISSET_ID = 0;
34029
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 34030
 
34031
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 34032
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 34033
          new FieldValueMetaData(TType.I64)));
34034
    }});
34035
 
34036
    static {
771 rajveer 34037
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
553 chandransh 34038
    }
34039
 
771 rajveer 34040
    public getBrowseHistory_args() {
553 chandransh 34041
    }
34042
 
771 rajveer 34043
    public getBrowseHistory_args(
34044
      long userId)
553 chandransh 34045
    {
34046
      this();
771 rajveer 34047
      this.userId = userId;
34048
      setUserIdIsSet(true);
553 chandransh 34049
    }
34050
 
34051
    /**
34052
     * Performs a deep copy on <i>other</i>.
34053
     */
771 rajveer 34054
    public getBrowseHistory_args(getBrowseHistory_args other) {
553 chandransh 34055
      __isset_bit_vector.clear();
34056
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 34057
      this.userId = other.userId;
553 chandransh 34058
    }
34059
 
771 rajveer 34060
    public getBrowseHistory_args deepCopy() {
34061
      return new getBrowseHistory_args(this);
553 chandransh 34062
    }
34063
 
34064
    @Deprecated
771 rajveer 34065
    public getBrowseHistory_args clone() {
34066
      return new getBrowseHistory_args(this);
553 chandransh 34067
    }
34068
 
771 rajveer 34069
    public long getUserId() {
34070
      return this.userId;
553 chandransh 34071
    }
34072
 
771 rajveer 34073
    public getBrowseHistory_args setUserId(long userId) {
34074
      this.userId = userId;
34075
      setUserIdIsSet(true);
553 chandransh 34076
      return this;
34077
    }
34078
 
771 rajveer 34079
    public void unsetUserId() {
34080
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 34081
    }
34082
 
771 rajveer 34083
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
34084
    public boolean isSetUserId() {
34085
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 34086
    }
34087
 
771 rajveer 34088
    public void setUserIdIsSet(boolean value) {
34089
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 34090
    }
34091
 
34092
    public void setFieldValue(_Fields field, Object value) {
34093
      switch (field) {
34094
      case USER_ID:
34095
        if (value == null) {
771 rajveer 34096
          unsetUserId();
553 chandransh 34097
        } else {
771 rajveer 34098
          setUserId((Long)value);
553 chandransh 34099
        }
34100
        break;
34101
 
34102
      }
34103
    }
34104
 
34105
    public void setFieldValue(int fieldID, Object value) {
34106
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34107
    }
34108
 
34109
    public Object getFieldValue(_Fields field) {
34110
      switch (field) {
34111
      case USER_ID:
771 rajveer 34112
        return new Long(getUserId());
553 chandransh 34113
 
34114
      }
34115
      throw new IllegalStateException();
34116
    }
34117
 
34118
    public Object getFieldValue(int fieldId) {
34119
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34120
    }
34121
 
34122
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34123
    public boolean isSet(_Fields field) {
34124
      switch (field) {
34125
      case USER_ID:
771 rajveer 34126
        return isSetUserId();
553 chandransh 34127
      }
34128
      throw new IllegalStateException();
34129
    }
34130
 
34131
    public boolean isSet(int fieldID) {
34132
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34133
    }
34134
 
34135
    @Override
34136
    public boolean equals(Object that) {
34137
      if (that == null)
34138
        return false;
771 rajveer 34139
      if (that instanceof getBrowseHistory_args)
34140
        return this.equals((getBrowseHistory_args)that);
553 chandransh 34141
      return false;
34142
    }
34143
 
771 rajveer 34144
    public boolean equals(getBrowseHistory_args that) {
553 chandransh 34145
      if (that == null)
34146
        return false;
34147
 
771 rajveer 34148
      boolean this_present_userId = true;
34149
      boolean that_present_userId = true;
34150
      if (this_present_userId || that_present_userId) {
34151
        if (!(this_present_userId && that_present_userId))
553 chandransh 34152
          return false;
771 rajveer 34153
        if (this.userId != that.userId)
553 chandransh 34154
          return false;
34155
      }
34156
 
34157
      return true;
34158
    }
34159
 
34160
    @Override
34161
    public int hashCode() {
34162
      return 0;
34163
    }
34164
 
771 rajveer 34165
    public int compareTo(getBrowseHistory_args other) {
553 chandransh 34166
      if (!getClass().equals(other.getClass())) {
34167
        return getClass().getName().compareTo(other.getClass().getName());
34168
      }
34169
 
34170
      int lastComparison = 0;
771 rajveer 34171
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
553 chandransh 34172
 
771 rajveer 34173
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 34174
      if (lastComparison != 0) {
34175
        return lastComparison;
34176
      }
771 rajveer 34177
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 34178
      if (lastComparison != 0) {
34179
        return lastComparison;
34180
      }
34181
      return 0;
34182
    }
34183
 
34184
    public void read(TProtocol iprot) throws TException {
34185
      TField field;
34186
      iprot.readStructBegin();
34187
      while (true)
34188
      {
34189
        field = iprot.readFieldBegin();
34190
        if (field.type == TType.STOP) { 
34191
          break;
34192
        }
34193
        _Fields fieldId = _Fields.findByThriftId(field.id);
34194
        if (fieldId == null) {
34195
          TProtocolUtil.skip(iprot, field.type);
34196
        } else {
34197
          switch (fieldId) {
34198
            case USER_ID:
34199
              if (field.type == TType.I64) {
771 rajveer 34200
                this.userId = iprot.readI64();
34201
                setUserIdIsSet(true);
553 chandransh 34202
              } else { 
34203
                TProtocolUtil.skip(iprot, field.type);
34204
              }
34205
              break;
34206
          }
34207
          iprot.readFieldEnd();
34208
        }
34209
      }
34210
      iprot.readStructEnd();
34211
      validate();
34212
    }
34213
 
34214
    public void write(TProtocol oprot) throws TException {
34215
      validate();
34216
 
34217
      oprot.writeStructBegin(STRUCT_DESC);
34218
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 34219
      oprot.writeI64(this.userId);
553 chandransh 34220
      oprot.writeFieldEnd();
34221
      oprot.writeFieldStop();
34222
      oprot.writeStructEnd();
34223
    }
34224
 
34225
    @Override
34226
    public String toString() {
771 rajveer 34227
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
553 chandransh 34228
      boolean first = true;
34229
 
771 rajveer 34230
      sb.append("userId:");
34231
      sb.append(this.userId);
553 chandransh 34232
      first = false;
34233
      sb.append(")");
34234
      return sb.toString();
34235
    }
34236
 
34237
    public void validate() throws TException {
34238
      // check for required fields
34239
    }
34240
 
34241
  }
34242
 
771 rajveer 34243
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
34244
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
553 chandransh 34245
 
34246
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
34247
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
34248
 
771 rajveer 34249
    private Widget success;
553 chandransh 34250
    private WidgetException scx;
34251
 
34252
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34253
    public enum _Fields implements TFieldIdEnum {
130 ashish 34254
      SUCCESS((short)0, "success"),
553 chandransh 34255
      SCX((short)1, "scx");
130 ashish 34256
 
34257
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34258
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34259
 
34260
      static {
34261
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34262
          byId.put((int)field._thriftId, field);
34263
          byName.put(field.getFieldName(), field);
34264
        }
34265
      }
34266
 
34267
      /**
34268
       * Find the _Fields constant that matches fieldId, or null if its not found.
34269
       */
34270
      public static _Fields findByThriftId(int fieldId) {
34271
        return byId.get(fieldId);
34272
      }
34273
 
34274
      /**
34275
       * Find the _Fields constant that matches fieldId, throwing an exception
34276
       * if it is not found.
34277
       */
34278
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34279
        _Fields fields = findByThriftId(fieldId);
34280
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34281
        return fields;
34282
      }
34283
 
34284
      /**
34285
       * Find the _Fields constant that matches name, or null if its not found.
34286
       */
34287
      public static _Fields findByName(String name) {
34288
        return byName.get(name);
34289
      }
34290
 
34291
      private final short _thriftId;
34292
      private final String _fieldName;
34293
 
34294
      _Fields(short thriftId, String fieldName) {
34295
        _thriftId = thriftId;
34296
        _fieldName = fieldName;
34297
      }
34298
 
34299
      public short getThriftFieldId() {
34300
        return _thriftId;
34301
      }
34302
 
34303
      public String getFieldName() {
34304
        return _fieldName;
34305
      }
34306
    }
34307
 
34308
    // isset id assignments
34309
 
34310
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
34311
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
771 rajveer 34312
          new StructMetaData(TType.STRUCT, Widget.class)));
553 chandransh 34313
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 34314
          new FieldValueMetaData(TType.STRUCT)));
34315
    }});
34316
 
34317
    static {
771 rajveer 34318
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
130 ashish 34319
    }
34320
 
771 rajveer 34321
    public getBrowseHistory_result() {
130 ashish 34322
    }
34323
 
771 rajveer 34324
    public getBrowseHistory_result(
34325
      Widget success,
553 chandransh 34326
      WidgetException scx)
130 ashish 34327
    {
34328
      this();
34329
      this.success = success;
553 chandransh 34330
      this.scx = scx;
130 ashish 34331
    }
34332
 
34333
    /**
34334
     * Performs a deep copy on <i>other</i>.
34335
     */
771 rajveer 34336
    public getBrowseHistory_result(getBrowseHistory_result other) {
553 chandransh 34337
      if (other.isSetSuccess()) {
771 rajveer 34338
        this.success = new Widget(other.success);
553 chandransh 34339
      }
34340
      if (other.isSetScx()) {
34341
        this.scx = new WidgetException(other.scx);
34342
      }
34343
    }
34344
 
771 rajveer 34345
    public getBrowseHistory_result deepCopy() {
34346
      return new getBrowseHistory_result(this);
553 chandransh 34347
    }
34348
 
34349
    @Deprecated
771 rajveer 34350
    public getBrowseHistory_result clone() {
34351
      return new getBrowseHistory_result(this);
553 chandransh 34352
    }
34353
 
771 rajveer 34354
    public Widget getSuccess() {
553 chandransh 34355
      return this.success;
34356
    }
34357
 
771 rajveer 34358
    public getBrowseHistory_result setSuccess(Widget success) {
553 chandransh 34359
      this.success = success;
34360
      return this;
34361
    }
34362
 
34363
    public void unsetSuccess() {
34364
      this.success = null;
34365
    }
34366
 
34367
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
34368
    public boolean isSetSuccess() {
34369
      return this.success != null;
34370
    }
34371
 
34372
    public void setSuccessIsSet(boolean value) {
34373
      if (!value) {
34374
        this.success = null;
34375
      }
34376
    }
34377
 
34378
    public WidgetException getScx() {
34379
      return this.scx;
34380
    }
34381
 
771 rajveer 34382
    public getBrowseHistory_result setScx(WidgetException scx) {
553 chandransh 34383
      this.scx = scx;
34384
      return this;
34385
    }
34386
 
34387
    public void unsetScx() {
34388
      this.scx = null;
34389
    }
34390
 
34391
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
34392
    public boolean isSetScx() {
34393
      return this.scx != null;
34394
    }
34395
 
34396
    public void setScxIsSet(boolean value) {
34397
      if (!value) {
34398
        this.scx = null;
34399
      }
34400
    }
34401
 
34402
    public void setFieldValue(_Fields field, Object value) {
34403
      switch (field) {
34404
      case SUCCESS:
34405
        if (value == null) {
34406
          unsetSuccess();
34407
        } else {
771 rajveer 34408
          setSuccess((Widget)value);
553 chandransh 34409
        }
34410
        break;
34411
 
34412
      case SCX:
34413
        if (value == null) {
34414
          unsetScx();
34415
        } else {
34416
          setScx((WidgetException)value);
34417
        }
34418
        break;
34419
 
34420
      }
34421
    }
34422
 
34423
    public void setFieldValue(int fieldID, Object value) {
34424
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
34425
    }
34426
 
34427
    public Object getFieldValue(_Fields field) {
34428
      switch (field) {
34429
      case SUCCESS:
34430
        return getSuccess();
34431
 
34432
      case SCX:
34433
        return getScx();
34434
 
34435
      }
34436
      throw new IllegalStateException();
34437
    }
34438
 
34439
    public Object getFieldValue(int fieldId) {
34440
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34441
    }
34442
 
34443
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34444
    public boolean isSet(_Fields field) {
34445
      switch (field) {
34446
      case SUCCESS:
34447
        return isSetSuccess();
34448
      case SCX:
34449
        return isSetScx();
34450
      }
34451
      throw new IllegalStateException();
34452
    }
34453
 
34454
    public boolean isSet(int fieldID) {
34455
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34456
    }
34457
 
34458
    @Override
34459
    public boolean equals(Object that) {
34460
      if (that == null)
34461
        return false;
771 rajveer 34462
      if (that instanceof getBrowseHistory_result)
34463
        return this.equals((getBrowseHistory_result)that);
553 chandransh 34464
      return false;
34465
    }
34466
 
771 rajveer 34467
    public boolean equals(getBrowseHistory_result that) {
553 chandransh 34468
      if (that == null)
34469
        return false;
34470
 
34471
      boolean this_present_success = true && this.isSetSuccess();
34472
      boolean that_present_success = true && that.isSetSuccess();
34473
      if (this_present_success || that_present_success) {
34474
        if (!(this_present_success && that_present_success))
34475
          return false;
34476
        if (!this.success.equals(that.success))
34477
          return false;
34478
      }
34479
 
34480
      boolean this_present_scx = true && this.isSetScx();
34481
      boolean that_present_scx = true && that.isSetScx();
34482
      if (this_present_scx || that_present_scx) {
34483
        if (!(this_present_scx && that_present_scx))
34484
          return false;
34485
        if (!this.scx.equals(that.scx))
34486
          return false;
34487
      }
34488
 
34489
      return true;
34490
    }
34491
 
34492
    @Override
34493
    public int hashCode() {
34494
      return 0;
34495
    }
34496
 
771 rajveer 34497
    public int compareTo(getBrowseHistory_result other) {
34498
      if (!getClass().equals(other.getClass())) {
34499
        return getClass().getName().compareTo(other.getClass().getName());
34500
      }
34501
 
34502
      int lastComparison = 0;
34503
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
34504
 
34505
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
34506
      if (lastComparison != 0) {
34507
        return lastComparison;
34508
      }
34509
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
34510
      if (lastComparison != 0) {
34511
        return lastComparison;
34512
      }
34513
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
34514
      if (lastComparison != 0) {
34515
        return lastComparison;
34516
      }
34517
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
34518
      if (lastComparison != 0) {
34519
        return lastComparison;
34520
      }
34521
      return 0;
34522
    }
34523
 
553 chandransh 34524
    public void read(TProtocol iprot) throws TException {
34525
      TField field;
34526
      iprot.readStructBegin();
34527
      while (true)
34528
      {
34529
        field = iprot.readFieldBegin();
34530
        if (field.type == TType.STOP) { 
34531
          break;
34532
        }
34533
        _Fields fieldId = _Fields.findByThriftId(field.id);
34534
        if (fieldId == null) {
34535
          TProtocolUtil.skip(iprot, field.type);
34536
        } else {
34537
          switch (fieldId) {
34538
            case SUCCESS:
34539
              if (field.type == TType.STRUCT) {
771 rajveer 34540
                this.success = new Widget();
553 chandransh 34541
                this.success.read(iprot);
34542
              } else { 
34543
                TProtocolUtil.skip(iprot, field.type);
34544
              }
34545
              break;
34546
            case SCX:
34547
              if (field.type == TType.STRUCT) {
34548
                this.scx = new WidgetException();
34549
                this.scx.read(iprot);
34550
              } else { 
34551
                TProtocolUtil.skip(iprot, field.type);
34552
              }
34553
              break;
34554
          }
34555
          iprot.readFieldEnd();
34556
        }
34557
      }
34558
      iprot.readStructEnd();
34559
      validate();
34560
    }
34561
 
34562
    public void write(TProtocol oprot) throws TException {
34563
      oprot.writeStructBegin(STRUCT_DESC);
34564
 
34565
      if (this.isSetSuccess()) {
34566
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
34567
        this.success.write(oprot);
34568
        oprot.writeFieldEnd();
34569
      } else if (this.isSetScx()) {
34570
        oprot.writeFieldBegin(SCX_FIELD_DESC);
34571
        this.scx.write(oprot);
34572
        oprot.writeFieldEnd();
34573
      }
34574
      oprot.writeFieldStop();
34575
      oprot.writeStructEnd();
34576
    }
34577
 
34578
    @Override
34579
    public String toString() {
771 rajveer 34580
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
553 chandransh 34581
      boolean first = true;
34582
 
34583
      sb.append("success:");
34584
      if (this.success == null) {
34585
        sb.append("null");
34586
      } else {
34587
        sb.append(this.success);
34588
      }
34589
      first = false;
34590
      if (!first) sb.append(", ");
34591
      sb.append("scx:");
34592
      if (this.scx == null) {
34593
        sb.append("null");
34594
      } else {
34595
        sb.append(this.scx);
34596
      }
34597
      first = false;
34598
      sb.append(")");
34599
      return sb.toString();
34600
    }
34601
 
34602
    public void validate() throws TException {
34603
      // check for required fields
34604
    }
34605
 
34606
  }
34607
 
771 rajveer 34608
  public static class mergeBrowseHistory_args implements TBase<mergeBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_args>   {
34609
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_args");
553 chandransh 34610
 
771 rajveer 34611
    private static final TField FROM_USER_ID_FIELD_DESC = new TField("fromUserId", TType.I64, (short)1);
34612
    private static final TField TO_USER_ID_FIELD_DESC = new TField("toUserId", TType.I64, (short)2);
553 chandransh 34613
 
771 rajveer 34614
    private long fromUserId;
34615
    private long toUserId;
553 chandransh 34616
 
34617
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34618
    public enum _Fields implements TFieldIdEnum {
771 rajveer 34619
      FROM_USER_ID((short)1, "fromUserId"),
34620
      TO_USER_ID((short)2, "toUserId");
553 chandransh 34621
 
34622
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34623
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34624
 
34625
      static {
34626
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34627
          byId.put((int)field._thriftId, field);
34628
          byName.put(field.getFieldName(), field);
34629
        }
34630
      }
34631
 
34632
      /**
34633
       * Find the _Fields constant that matches fieldId, or null if its not found.
34634
       */
34635
      public static _Fields findByThriftId(int fieldId) {
34636
        return byId.get(fieldId);
34637
      }
34638
 
34639
      /**
34640
       * Find the _Fields constant that matches fieldId, throwing an exception
34641
       * if it is not found.
34642
       */
34643
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34644
        _Fields fields = findByThriftId(fieldId);
34645
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34646
        return fields;
34647
      }
34648
 
34649
      /**
34650
       * Find the _Fields constant that matches name, or null if its not found.
34651
       */
34652
      public static _Fields findByName(String name) {
34653
        return byName.get(name);
34654
      }
34655
 
34656
      private final short _thriftId;
34657
      private final String _fieldName;
34658
 
34659
      _Fields(short thriftId, String fieldName) {
34660
        _thriftId = thriftId;
34661
        _fieldName = fieldName;
34662
      }
34663
 
34664
      public short getThriftFieldId() {
34665
        return _thriftId;
34666
      }
34667
 
34668
      public String getFieldName() {
34669
        return _fieldName;
34670
      }
34671
    }
34672
 
34673
    // isset id assignments
771 rajveer 34674
    private static final int __FROMUSERID_ISSET_ID = 0;
34675
    private static final int __TOUSERID_ISSET_ID = 1;
34676
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 34677
 
34678
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 34679
      put(_Fields.FROM_USER_ID, new FieldMetaData("fromUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 34680
          new FieldValueMetaData(TType.I64)));
771 rajveer 34681
      put(_Fields.TO_USER_ID, new FieldMetaData("toUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 34682
          new FieldValueMetaData(TType.I64)));
34683
    }});
34684
 
34685
    static {
771 rajveer 34686
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_args.class, metaDataMap);
553 chandransh 34687
    }
34688
 
771 rajveer 34689
    public mergeBrowseHistory_args() {
553 chandransh 34690
    }
34691
 
771 rajveer 34692
    public mergeBrowseHistory_args(
34693
      long fromUserId,
34694
      long toUserId)
553 chandransh 34695
    {
34696
      this();
771 rajveer 34697
      this.fromUserId = fromUserId;
34698
      setFromUserIdIsSet(true);
34699
      this.toUserId = toUserId;
34700
      setToUserIdIsSet(true);
553 chandransh 34701
    }
34702
 
34703
    /**
34704
     * Performs a deep copy on <i>other</i>.
34705
     */
771 rajveer 34706
    public mergeBrowseHistory_args(mergeBrowseHistory_args other) {
130 ashish 34707
      __isset_bit_vector.clear();
34708
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 34709
      this.fromUserId = other.fromUserId;
34710
      this.toUserId = other.toUserId;
553 chandransh 34711
    }
34712
 
771 rajveer 34713
    public mergeBrowseHistory_args deepCopy() {
34714
      return new mergeBrowseHistory_args(this);
553 chandransh 34715
    }
34716
 
34717
    @Deprecated
771 rajveer 34718
    public mergeBrowseHistory_args clone() {
34719
      return new mergeBrowseHistory_args(this);
553 chandransh 34720
    }
34721
 
771 rajveer 34722
    public long getFromUserId() {
34723
      return this.fromUserId;
553 chandransh 34724
    }
34725
 
771 rajveer 34726
    public mergeBrowseHistory_args setFromUserId(long fromUserId) {
34727
      this.fromUserId = fromUserId;
34728
      setFromUserIdIsSet(true);
553 chandransh 34729
      return this;
34730
    }
34731
 
771 rajveer 34732
    public void unsetFromUserId() {
34733
      __isset_bit_vector.clear(__FROMUSERID_ISSET_ID);
553 chandransh 34734
    }
34735
 
771 rajveer 34736
    /** Returns true if field fromUserId is set (has been asigned a value) and false otherwise */
34737
    public boolean isSetFromUserId() {
34738
      return __isset_bit_vector.get(__FROMUSERID_ISSET_ID);
553 chandransh 34739
    }
34740
 
771 rajveer 34741
    public void setFromUserIdIsSet(boolean value) {
34742
      __isset_bit_vector.set(__FROMUSERID_ISSET_ID, value);
553 chandransh 34743
    }
34744
 
771 rajveer 34745
    public long getToUserId() {
34746
      return this.toUserId;
553 chandransh 34747
    }
34748
 
771 rajveer 34749
    public mergeBrowseHistory_args setToUserId(long toUserId) {
34750
      this.toUserId = toUserId;
34751
      setToUserIdIsSet(true);
553 chandransh 34752
      return this;
34753
    }
34754
 
771 rajveer 34755
    public void unsetToUserId() {
34756
      __isset_bit_vector.clear(__TOUSERID_ISSET_ID);
553 chandransh 34757
    }
34758
 
771 rajveer 34759
    /** Returns true if field toUserId is set (has been asigned a value) and false otherwise */
34760
    public boolean isSetToUserId() {
34761
      return __isset_bit_vector.get(__TOUSERID_ISSET_ID);
553 chandransh 34762
    }
34763
 
771 rajveer 34764
    public void setToUserIdIsSet(boolean value) {
34765
      __isset_bit_vector.set(__TOUSERID_ISSET_ID, value);
553 chandransh 34766
    }
34767
 
34768
    public void setFieldValue(_Fields field, Object value) {
34769
      switch (field) {
771 rajveer 34770
      case FROM_USER_ID:
553 chandransh 34771
        if (value == null) {
771 rajveer 34772
          unsetFromUserId();
553 chandransh 34773
        } else {
771 rajveer 34774
          setFromUserId((Long)value);
553 chandransh 34775
        }
34776
        break;
34777
 
771 rajveer 34778
      case TO_USER_ID:
553 chandransh 34779
        if (value == null) {
771 rajveer 34780
          unsetToUserId();
553 chandransh 34781
        } else {
771 rajveer 34782
          setToUserId((Long)value);
553 chandransh 34783
        }
34784
        break;
34785
 
130 ashish 34786
      }
34787
    }
34788
 
553 chandransh 34789
    public void setFieldValue(int fieldID, Object value) {
34790
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 34791
    }
34792
 
553 chandransh 34793
    public Object getFieldValue(_Fields field) {
34794
      switch (field) {
771 rajveer 34795
      case FROM_USER_ID:
34796
        return new Long(getFromUserId());
553 chandransh 34797
 
771 rajveer 34798
      case TO_USER_ID:
34799
        return new Long(getToUserId());
553 chandransh 34800
 
34801
      }
34802
      throw new IllegalStateException();
34803
    }
34804
 
34805
    public Object getFieldValue(int fieldId) {
34806
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
34807
    }
34808
 
34809
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
34810
    public boolean isSet(_Fields field) {
34811
      switch (field) {
771 rajveer 34812
      case FROM_USER_ID:
34813
        return isSetFromUserId();
34814
      case TO_USER_ID:
34815
        return isSetToUserId();
553 chandransh 34816
      }
34817
      throw new IllegalStateException();
34818
    }
34819
 
34820
    public boolean isSet(int fieldID) {
34821
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
34822
    }
34823
 
34824
    @Override
34825
    public boolean equals(Object that) {
34826
      if (that == null)
34827
        return false;
771 rajveer 34828
      if (that instanceof mergeBrowseHistory_args)
34829
        return this.equals((mergeBrowseHistory_args)that);
553 chandransh 34830
      return false;
34831
    }
34832
 
771 rajveer 34833
    public boolean equals(mergeBrowseHistory_args that) {
553 chandransh 34834
      if (that == null)
34835
        return false;
34836
 
771 rajveer 34837
      boolean this_present_fromUserId = true;
34838
      boolean that_present_fromUserId = true;
34839
      if (this_present_fromUserId || that_present_fromUserId) {
34840
        if (!(this_present_fromUserId && that_present_fromUserId))
553 chandransh 34841
          return false;
771 rajveer 34842
        if (this.fromUserId != that.fromUserId)
553 chandransh 34843
          return false;
34844
      }
34845
 
771 rajveer 34846
      boolean this_present_toUserId = true;
34847
      boolean that_present_toUserId = true;
34848
      if (this_present_toUserId || that_present_toUserId) {
34849
        if (!(this_present_toUserId && that_present_toUserId))
553 chandransh 34850
          return false;
771 rajveer 34851
        if (this.toUserId != that.toUserId)
553 chandransh 34852
          return false;
34853
      }
34854
 
34855
      return true;
34856
    }
34857
 
34858
    @Override
34859
    public int hashCode() {
34860
      return 0;
34861
    }
34862
 
771 rajveer 34863
    public int compareTo(mergeBrowseHistory_args other) {
553 chandransh 34864
      if (!getClass().equals(other.getClass())) {
34865
        return getClass().getName().compareTo(other.getClass().getName());
34866
      }
34867
 
34868
      int lastComparison = 0;
771 rajveer 34869
      mergeBrowseHistory_args typedOther = (mergeBrowseHistory_args)other;
553 chandransh 34870
 
771 rajveer 34871
      lastComparison = Boolean.valueOf(isSetFromUserId()).compareTo(isSetFromUserId());
553 chandransh 34872
      if (lastComparison != 0) {
34873
        return lastComparison;
34874
      }
771 rajveer 34875
      lastComparison = TBaseHelper.compareTo(fromUserId, typedOther.fromUserId);
553 chandransh 34876
      if (lastComparison != 0) {
34877
        return lastComparison;
34878
      }
771 rajveer 34879
      lastComparison = Boolean.valueOf(isSetToUserId()).compareTo(isSetToUserId());
553 chandransh 34880
      if (lastComparison != 0) {
34881
        return lastComparison;
34882
      }
771 rajveer 34883
      lastComparison = TBaseHelper.compareTo(toUserId, typedOther.toUserId);
553 chandransh 34884
      if (lastComparison != 0) {
34885
        return lastComparison;
34886
      }
34887
      return 0;
34888
    }
34889
 
34890
    public void read(TProtocol iprot) throws TException {
34891
      TField field;
34892
      iprot.readStructBegin();
34893
      while (true)
34894
      {
34895
        field = iprot.readFieldBegin();
34896
        if (field.type == TType.STOP) { 
34897
          break;
34898
        }
34899
        _Fields fieldId = _Fields.findByThriftId(field.id);
34900
        if (fieldId == null) {
34901
          TProtocolUtil.skip(iprot, field.type);
34902
        } else {
34903
          switch (fieldId) {
771 rajveer 34904
            case FROM_USER_ID:
553 chandransh 34905
              if (field.type == TType.I64) {
771 rajveer 34906
                this.fromUserId = iprot.readI64();
34907
                setFromUserIdIsSet(true);
553 chandransh 34908
              } else { 
34909
                TProtocolUtil.skip(iprot, field.type);
34910
              }
34911
              break;
771 rajveer 34912
            case TO_USER_ID:
553 chandransh 34913
              if (field.type == TType.I64) {
771 rajveer 34914
                this.toUserId = iprot.readI64();
34915
                setToUserIdIsSet(true);
553 chandransh 34916
              } else { 
34917
                TProtocolUtil.skip(iprot, field.type);
34918
              }
34919
              break;
34920
          }
34921
          iprot.readFieldEnd();
34922
        }
34923
      }
34924
      iprot.readStructEnd();
34925
      validate();
34926
    }
34927
 
34928
    public void write(TProtocol oprot) throws TException {
34929
      validate();
34930
 
34931
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 34932
      oprot.writeFieldBegin(FROM_USER_ID_FIELD_DESC);
34933
      oprot.writeI64(this.fromUserId);
553 chandransh 34934
      oprot.writeFieldEnd();
771 rajveer 34935
      oprot.writeFieldBegin(TO_USER_ID_FIELD_DESC);
34936
      oprot.writeI64(this.toUserId);
553 chandransh 34937
      oprot.writeFieldEnd();
34938
      oprot.writeFieldStop();
34939
      oprot.writeStructEnd();
34940
    }
34941
 
34942
    @Override
34943
    public String toString() {
771 rajveer 34944
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_args(");
553 chandransh 34945
      boolean first = true;
34946
 
771 rajveer 34947
      sb.append("fromUserId:");
34948
      sb.append(this.fromUserId);
553 chandransh 34949
      first = false;
34950
      if (!first) sb.append(", ");
771 rajveer 34951
      sb.append("toUserId:");
34952
      sb.append(this.toUserId);
553 chandransh 34953
      first = false;
34954
      sb.append(")");
34955
      return sb.toString();
34956
    }
34957
 
34958
    public void validate() throws TException {
34959
      // check for required fields
34960
    }
34961
 
34962
  }
34963
 
771 rajveer 34964
  public static class mergeBrowseHistory_result implements TBase<mergeBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_result>   {
34965
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_result");
553 chandransh 34966
 
34967
 
34968
 
34969
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
34970
    public enum _Fields implements TFieldIdEnum {
34971
;
34972
 
34973
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
34974
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
34975
 
34976
      static {
34977
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
34978
          byId.put((int)field._thriftId, field);
34979
          byName.put(field.getFieldName(), field);
34980
        }
34981
      }
34982
 
34983
      /**
34984
       * Find the _Fields constant that matches fieldId, or null if its not found.
34985
       */
34986
      public static _Fields findByThriftId(int fieldId) {
34987
        return byId.get(fieldId);
34988
      }
34989
 
34990
      /**
34991
       * Find the _Fields constant that matches fieldId, throwing an exception
34992
       * if it is not found.
34993
       */
34994
      public static _Fields findByThriftIdOrThrow(int fieldId) {
34995
        _Fields fields = findByThriftId(fieldId);
34996
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
34997
        return fields;
34998
      }
34999
 
35000
      /**
35001
       * Find the _Fields constant that matches name, or null if its not found.
35002
       */
35003
      public static _Fields findByName(String name) {
35004
        return byName.get(name);
35005
      }
35006
 
35007
      private final short _thriftId;
35008
      private final String _fieldName;
35009
 
35010
      _Fields(short thriftId, String fieldName) {
35011
        _thriftId = thriftId;
35012
        _fieldName = fieldName;
35013
      }
35014
 
35015
      public short getThriftFieldId() {
35016
        return _thriftId;
35017
      }
35018
 
35019
      public String getFieldName() {
35020
        return _fieldName;
35021
      }
35022
    }
35023
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
35024
    }});
35025
 
35026
    static {
771 rajveer 35027
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_result.class, metaDataMap);
553 chandransh 35028
    }
35029
 
771 rajveer 35030
    public mergeBrowseHistory_result() {
553 chandransh 35031
    }
35032
 
35033
    /**
35034
     * Performs a deep copy on <i>other</i>.
35035
     */
771 rajveer 35036
    public mergeBrowseHistory_result(mergeBrowseHistory_result other) {
553 chandransh 35037
    }
35038
 
771 rajveer 35039
    public mergeBrowseHistory_result deepCopy() {
35040
      return new mergeBrowseHistory_result(this);
553 chandransh 35041
    }
35042
 
130 ashish 35043
    @Deprecated
771 rajveer 35044
    public mergeBrowseHistory_result clone() {
35045
      return new mergeBrowseHistory_result(this);
130 ashish 35046
    }
35047
 
553 chandransh 35048
    public void setFieldValue(_Fields field, Object value) {
35049
      switch (field) {
35050
      }
35051
    }
35052
 
35053
    public void setFieldValue(int fieldID, Object value) {
35054
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
35055
    }
35056
 
35057
    public Object getFieldValue(_Fields field) {
35058
      switch (field) {
35059
      }
35060
      throw new IllegalStateException();
35061
    }
35062
 
35063
    public Object getFieldValue(int fieldId) {
35064
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
35065
    }
35066
 
35067
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
35068
    public boolean isSet(_Fields field) {
35069
      switch (field) {
35070
      }
35071
      throw new IllegalStateException();
35072
    }
35073
 
35074
    public boolean isSet(int fieldID) {
35075
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
35076
    }
35077
 
35078
    @Override
35079
    public boolean equals(Object that) {
35080
      if (that == null)
35081
        return false;
771 rajveer 35082
      if (that instanceof mergeBrowseHistory_result)
35083
        return this.equals((mergeBrowseHistory_result)that);
553 chandransh 35084
      return false;
35085
    }
35086
 
771 rajveer 35087
    public boolean equals(mergeBrowseHistory_result that) {
553 chandransh 35088
      if (that == null)
35089
        return false;
35090
 
35091
      return true;
35092
    }
35093
 
35094
    @Override
35095
    public int hashCode() {
35096
      return 0;
35097
    }
35098
 
771 rajveer 35099
    public int compareTo(mergeBrowseHistory_result other) {
553 chandransh 35100
      if (!getClass().equals(other.getClass())) {
35101
        return getClass().getName().compareTo(other.getClass().getName());
35102
      }
35103
 
35104
      int lastComparison = 0;
771 rajveer 35105
      mergeBrowseHistory_result typedOther = (mergeBrowseHistory_result)other;
553 chandransh 35106
 
35107
      return 0;
35108
    }
35109
 
35110
    public void read(TProtocol iprot) throws TException {
35111
      TField field;
35112
      iprot.readStructBegin();
35113
      while (true)
35114
      {
35115
        field = iprot.readFieldBegin();
35116
        if (field.type == TType.STOP) { 
35117
          break;
35118
        }
35119
        _Fields fieldId = _Fields.findByThriftId(field.id);
35120
        if (fieldId == null) {
35121
          TProtocolUtil.skip(iprot, field.type);
35122
        } else {
35123
          switch (fieldId) {
35124
          }
35125
          iprot.readFieldEnd();
35126
        }
35127
      }
35128
      iprot.readStructEnd();
35129
      validate();
35130
    }
35131
 
35132
    public void write(TProtocol oprot) throws TException {
35133
      oprot.writeStructBegin(STRUCT_DESC);
35134
 
35135
      oprot.writeFieldStop();
35136
      oprot.writeStructEnd();
35137
    }
35138
 
35139
    @Override
35140
    public String toString() {
771 rajveer 35141
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_result(");
553 chandransh 35142
      boolean first = true;
35143
 
35144
      sb.append(")");
35145
      return sb.toString();
35146
    }
35147
 
35148
    public void validate() throws TException {
35149
      // check for required fields
35150
    }
35151
 
35152
  }
35153
 
48 ashish 35154
}