Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
48 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class UserContextService {
27
 
28
  /**
29
   * service
30
   */
31
  public interface Iface {
32
 
764 rajveer 33
    /**
34
     * For closing the open session in sqlalchemy
35
     */
36
    public void closeSession() throws TException;
37
 
553 chandransh 38
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException;
48 ashish 39
 
553 chandransh 40
    public User getUserById(long userId) throws UserContextException, TException;
48 ashish 41
 
553 chandransh 42
    public User createUser(User user) throws UserContextException, TException;
48 ashish 43
 
553 chandransh 44
    public User updateUser(User user) throws UserContextException, TException;
48 ashish 45
 
553 chandransh 46
    public boolean deleteUser(long userId) throws UserContextException, TException;
48 ashish 47
 
553 chandransh 48
    public UserState getUserState(long userId) throws UserContextException, TException;
48 ashish 49
 
553 chandransh 50
    public User authenticateUser(String email, String password) throws AuthenticationException, TException;
48 ashish 51
 
52
    public boolean userExists(String email) throws UserContextException, TException;
53
 
571 rajveer 54
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException;
48 ashish 55
 
56
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
57
 
58
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
59
 
60
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
61
 
506 rajveer 62
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
63
 
593 rajveer 64
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException;
48 ashish 65
 
582 rajveer 66
    public boolean forgotPassword(String email) throws UserContextException, TException;
67
 
593 rajveer 68
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
69
 
70
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
71
 
784 rajveer 72
    public String getDefaultPincode(long userId) throws UserContextException, TException;
73
 
553 chandransh 74
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 75
 
553 chandransh 76
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 77
 
553 chandransh 78
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 79
 
553 chandransh 80
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 81
 
553 chandransh 82
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 83
 
553 chandransh 84
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 85
 
553 chandransh 86
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 87
 
553 chandransh 88
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 89
 
553 chandransh 90
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
91
 
92
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
93
 
94
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
95
 
578 chandransh 96
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 97
 
688 chandransh 98
    /**
99
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
100
     * 
101
     * @param cartId
102
     */
103
    public long createOrders(long cartId) throws ShoppingCartException, TException;
553 chandransh 104
 
688 chandransh 105
    /**
106
     * Validates that:
107
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
108
     * 2. None of the lines in the cart for an inactive item.
109
     * 3. The estimate for any of the lines in cart doesn't change.
110
     * Returns true only if all three hold.
111
     * 
112
     * @param cartId
113
     */
578 chandransh 114
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 115
 
688 chandransh 116
    /**
117
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
118
     * 
119
     * @param fromCartId
120
     * @param toCartId
121
     */
553 chandransh 122
    public void mergeCart(long fromCartId, long toCartId) throws TException;
123
 
688 chandransh 124
    /**
125
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
126
     * 
127
     * @param cartId
128
     */
129
    public boolean checkOut(long cartId) throws ShoppingCartException, TException;
130
 
131
    /**
132
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
133
     * This methods removes the specified quantiry of the specified item from the cart.
134
     * 
135
     * @param cartId
136
     * @param items
137
     */
708 rajveer 138
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException;
688 chandransh 139
 
771 rajveer 140
    /**
141
     * Widgets
142
     * 
143
     * @param userId
144
     */
145
    public Widget getMyResearch(long userId) throws WidgetException, TException;
553 chandransh 146
 
771 rajveer 147
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 148
 
771 rajveer 149
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 150
 
771 rajveer 151
    public void updateBrowseHistory(long userId, long itemId) throws TException;
553 chandransh 152
 
771 rajveer 153
    public Widget getBrowseHistory(long userId) throws WidgetException, TException;
553 chandransh 154
 
771 rajveer 155
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException;
553 chandransh 156
 
48 ashish 157
  }
158
 
159
  public static class Client implements Iface {
160
    public Client(TProtocol prot)
161
    {
162
      this(prot, prot);
163
    }
164
 
165
    public Client(TProtocol iprot, TProtocol oprot)
166
    {
167
      iprot_ = iprot;
168
      oprot_ = oprot;
169
    }
170
 
171
    protected TProtocol iprot_;
172
    protected TProtocol oprot_;
173
 
174
    protected int seqid_;
175
 
176
    public TProtocol getInputProtocol()
177
    {
178
      return this.iprot_;
179
    }
180
 
181
    public TProtocol getOutputProtocol()
182
    {
183
      return this.oprot_;
184
    }
185
 
764 rajveer 186
    public void closeSession() throws TException
187
    {
188
      send_closeSession();
189
      recv_closeSession();
190
    }
191
 
192
    public void send_closeSession() throws TException
193
    {
194
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
195
      closeSession_args args = new closeSession_args();
196
      args.write(oprot_);
197
      oprot_.writeMessageEnd();
198
      oprot_.getTransport().flush();
199
    }
200
 
201
    public void recv_closeSession() throws TException
202
    {
203
      TMessage msg = iprot_.readMessageBegin();
204
      if (msg.type == TMessageType.EXCEPTION) {
205
        TApplicationException x = TApplicationException.read(iprot_);
206
        iprot_.readMessageEnd();
207
        throw x;
208
      }
209
      closeSession_result result = new closeSession_result();
210
      result.read(iprot_);
211
      iprot_.readMessageEnd();
212
      return;
213
    }
214
 
553 chandransh 215
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 216
    {
553 chandransh 217
      send_createAnonymousUser(jsessionId);
218
      return recv_createAnonymousUser();
48 ashish 219
    }
220
 
553 chandransh 221
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 222
    {
553 chandransh 223
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
224
      createAnonymousUser_args args = new createAnonymousUser_args();
225
      args.jsessionId = jsessionId;
48 ashish 226
      args.write(oprot_);
227
      oprot_.writeMessageEnd();
228
      oprot_.getTransport().flush();
229
    }
230
 
553 chandransh 231
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 232
    {
233
      TMessage msg = iprot_.readMessageBegin();
234
      if (msg.type == TMessageType.EXCEPTION) {
235
        TApplicationException x = TApplicationException.read(iprot_);
236
        iprot_.readMessageEnd();
237
        throw x;
238
      }
553 chandransh 239
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 240
      result.read(iprot_);
241
      iprot_.readMessageEnd();
242
      if (result.isSetSuccess()) {
243
        return result.success;
244
      }
553 chandransh 245
      if (result.ucex != null) {
246
        throw result.ucex;
48 ashish 247
      }
553 chandransh 248
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 249
    }
250
 
553 chandransh 251
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 252
    {
553 chandransh 253
      send_getUserById(userId);
254
      return recv_getUserById();
48 ashish 255
    }
256
 
553 chandransh 257
    public void send_getUserById(long userId) throws TException
48 ashish 258
    {
553 chandransh 259
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
260
      getUserById_args args = new getUserById_args();
48 ashish 261
      args.userId = userId;
262
      args.write(oprot_);
263
      oprot_.writeMessageEnd();
264
      oprot_.getTransport().flush();
265
    }
266
 
553 chandransh 267
    public User recv_getUserById() throws UserContextException, TException
48 ashish 268
    {
269
      TMessage msg = iprot_.readMessageBegin();
270
      if (msg.type == TMessageType.EXCEPTION) {
271
        TApplicationException x = TApplicationException.read(iprot_);
272
        iprot_.readMessageEnd();
273
        throw x;
274
      }
553 chandransh 275
      getUserById_result result = new getUserById_result();
48 ashish 276
      result.read(iprot_);
277
      iprot_.readMessageEnd();
278
      if (result.isSetSuccess()) {
279
        return result.success;
280
      }
553 chandransh 281
      if (result.ucex != null) {
282
        throw result.ucex;
48 ashish 283
      }
553 chandransh 284
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 285
    }
286
 
553 chandransh 287
    public User createUser(User user) throws UserContextException, TException
48 ashish 288
    {
553 chandransh 289
      send_createUser(user);
290
      return recv_createUser();
48 ashish 291
    }
292
 
553 chandransh 293
    public void send_createUser(User user) throws TException
48 ashish 294
    {
553 chandransh 295
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
296
      createUser_args args = new createUser_args();
297
      args.user = user;
48 ashish 298
      args.write(oprot_);
299
      oprot_.writeMessageEnd();
300
      oprot_.getTransport().flush();
301
    }
302
 
553 chandransh 303
    public User recv_createUser() throws UserContextException, TException
48 ashish 304
    {
305
      TMessage msg = iprot_.readMessageBegin();
306
      if (msg.type == TMessageType.EXCEPTION) {
307
        TApplicationException x = TApplicationException.read(iprot_);
308
        iprot_.readMessageEnd();
309
        throw x;
310
      }
553 chandransh 311
      createUser_result result = new createUser_result();
48 ashish 312
      result.read(iprot_);
313
      iprot_.readMessageEnd();
314
      if (result.isSetSuccess()) {
315
        return result.success;
316
      }
553 chandransh 317
      if (result.ucex != null) {
318
        throw result.ucex;
48 ashish 319
      }
553 chandransh 320
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 321
    }
322
 
553 chandransh 323
    public User updateUser(User user) throws UserContextException, TException
48 ashish 324
    {
553 chandransh 325
      send_updateUser(user);
326
      return recv_updateUser();
48 ashish 327
    }
328
 
553 chandransh 329
    public void send_updateUser(User user) throws TException
48 ashish 330
    {
553 chandransh 331
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
332
      updateUser_args args = new updateUser_args();
333
      args.user = user;
48 ashish 334
      args.write(oprot_);
335
      oprot_.writeMessageEnd();
336
      oprot_.getTransport().flush();
337
    }
338
 
553 chandransh 339
    public User recv_updateUser() throws UserContextException, TException
48 ashish 340
    {
341
      TMessage msg = iprot_.readMessageBegin();
342
      if (msg.type == TMessageType.EXCEPTION) {
343
        TApplicationException x = TApplicationException.read(iprot_);
344
        iprot_.readMessageEnd();
345
        throw x;
346
      }
553 chandransh 347
      updateUser_result result = new updateUser_result();
48 ashish 348
      result.read(iprot_);
349
      iprot_.readMessageEnd();
350
      if (result.isSetSuccess()) {
351
        return result.success;
352
      }
553 chandransh 353
      if (result.ucex != null) {
354
        throw result.ucex;
48 ashish 355
      }
553 chandransh 356
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 357
    }
358
 
553 chandransh 359
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 360
    {
553 chandransh 361
      send_deleteUser(userId);
362
      return recv_deleteUser();
48 ashish 363
    }
364
 
553 chandransh 365
    public void send_deleteUser(long userId) throws TException
48 ashish 366
    {
553 chandransh 367
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
368
      deleteUser_args args = new deleteUser_args();
48 ashish 369
      args.userId = userId;
370
      args.write(oprot_);
371
      oprot_.writeMessageEnd();
372
      oprot_.getTransport().flush();
373
    }
374
 
553 chandransh 375
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 376
    {
377
      TMessage msg = iprot_.readMessageBegin();
378
      if (msg.type == TMessageType.EXCEPTION) {
379
        TApplicationException x = TApplicationException.read(iprot_);
380
        iprot_.readMessageEnd();
381
        throw x;
382
      }
553 chandransh 383
      deleteUser_result result = new deleteUser_result();
48 ashish 384
      result.read(iprot_);
385
      iprot_.readMessageEnd();
386
      if (result.isSetSuccess()) {
387
        return result.success;
388
      }
553 chandransh 389
      if (result.ucex != null) {
390
        throw result.ucex;
48 ashish 391
      }
553 chandransh 392
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 393
    }
394
 
553 chandransh 395
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 396
    {
553 chandransh 397
      send_getUserState(userId);
398
      return recv_getUserState();
48 ashish 399
    }
400
 
553 chandransh 401
    public void send_getUserState(long userId) throws TException
48 ashish 402
    {
553 chandransh 403
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
404
      getUserState_args args = new getUserState_args();
48 ashish 405
      args.userId = userId;
406
      args.write(oprot_);
407
      oprot_.writeMessageEnd();
408
      oprot_.getTransport().flush();
409
    }
410
 
553 chandransh 411
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 412
    {
413
      TMessage msg = iprot_.readMessageBegin();
414
      if (msg.type == TMessageType.EXCEPTION) {
415
        TApplicationException x = TApplicationException.read(iprot_);
416
        iprot_.readMessageEnd();
417
        throw x;
418
      }
553 chandransh 419
      getUserState_result result = new getUserState_result();
48 ashish 420
      result.read(iprot_);
421
      iprot_.readMessageEnd();
422
      if (result.isSetSuccess()) {
423
        return result.success;
424
      }
553 chandransh 425
      if (result.ucex != null) {
426
        throw result.ucex;
48 ashish 427
      }
553 chandransh 428
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 429
    }
430
 
553 chandransh 431
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 432
    {
553 chandransh 433
      send_authenticateUser(email, password);
123 ashish 434
      return recv_authenticateUser();
435
    }
436
 
553 chandransh 437
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 438
    {
439
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
440
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 441
      args.email = email;
123 ashish 442
      args.password = password;
443
      args.write(oprot_);
444
      oprot_.writeMessageEnd();
445
      oprot_.getTransport().flush();
446
    }
447
 
553 chandransh 448
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 449
    {
450
      TMessage msg = iprot_.readMessageBegin();
451
      if (msg.type == TMessageType.EXCEPTION) {
452
        TApplicationException x = TApplicationException.read(iprot_);
453
        iprot_.readMessageEnd();
454
        throw x;
455
      }
456
      authenticateUser_result result = new authenticateUser_result();
457
      result.read(iprot_);
458
      iprot_.readMessageEnd();
459
      if (result.isSetSuccess()) {
460
        return result.success;
461
      }
553 chandransh 462
      if (result.auex != null) {
463
        throw result.auex;
123 ashish 464
      }
465
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
466
    }
467
 
48 ashish 468
    public boolean userExists(String email) throws UserContextException, TException
469
    {
470
      send_userExists(email);
471
      return recv_userExists();
472
    }
473
 
474
    public void send_userExists(String email) throws TException
475
    {
476
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
477
      userExists_args args = new userExists_args();
478
      args.email = email;
479
      args.write(oprot_);
480
      oprot_.writeMessageEnd();
481
      oprot_.getTransport().flush();
482
    }
483
 
484
    public boolean recv_userExists() throws UserContextException, TException
485
    {
486
      TMessage msg = iprot_.readMessageBegin();
487
      if (msg.type == TMessageType.EXCEPTION) {
488
        TApplicationException x = TApplicationException.read(iprot_);
489
        iprot_.readMessageEnd();
490
        throw x;
491
      }
492
      userExists_result result = new userExists_result();
493
      result.read(iprot_);
494
      iprot_.readMessageEnd();
495
      if (result.isSetSuccess()) {
496
        return result.success;
497
      }
498
      if (result.ucx != null) {
499
        throw result.ucx;
500
      }
501
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
502
    }
503
 
571 rajveer 504
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 505
    {
571 rajveer 506
      send_addAddressForUser(userId, address, setDefault);
48 ashish 507
      return recv_addAddressForUser();
508
    }
509
 
571 rajveer 510
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 511
    {
512
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
513
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 514
      args.userId = userId;
48 ashish 515
      args.address = address;
513 rajveer 516
      args.setDefault = setDefault;
48 ashish 517
      args.write(oprot_);
518
      oprot_.writeMessageEnd();
519
      oprot_.getTransport().flush();
520
    }
521
 
571 rajveer 522
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 523
    {
524
      TMessage msg = iprot_.readMessageBegin();
525
      if (msg.type == TMessageType.EXCEPTION) {
526
        TApplicationException x = TApplicationException.read(iprot_);
527
        iprot_.readMessageEnd();
528
        throw x;
529
      }
530
      addAddressForUser_result result = new addAddressForUser_result();
531
      result.read(iprot_);
532
      iprot_.readMessageEnd();
533
      if (result.isSetSuccess()) {
534
        return result.success;
535
      }
536
      if (result.ucx != null) {
537
        throw result.ucx;
538
      }
539
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
540
    }
541
 
542
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
543
    {
544
      send_removeAddressForUser(userid, addressId);
545
      return recv_removeAddressForUser();
546
    }
547
 
548
    public void send_removeAddressForUser(long userid, long addressId) throws TException
549
    {
550
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
551
      removeAddressForUser_args args = new removeAddressForUser_args();
552
      args.userid = userid;
553
      args.addressId = addressId;
554
      args.write(oprot_);
555
      oprot_.writeMessageEnd();
556
      oprot_.getTransport().flush();
557
    }
558
 
559
    public boolean recv_removeAddressForUser() throws UserContextException, TException
560
    {
561
      TMessage msg = iprot_.readMessageBegin();
562
      if (msg.type == TMessageType.EXCEPTION) {
563
        TApplicationException x = TApplicationException.read(iprot_);
564
        iprot_.readMessageEnd();
565
        throw x;
566
      }
567
      removeAddressForUser_result result = new removeAddressForUser_result();
568
      result.read(iprot_);
569
      iprot_.readMessageEnd();
570
      if (result.isSetSuccess()) {
571
        return result.success;
572
      }
573
      if (result.ucx != null) {
574
        throw result.ucx;
575
      }
576
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
577
    }
578
 
579
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
580
    {
581
      send_setUserAsLoggedIn(userId, timestamp);
582
      return recv_setUserAsLoggedIn();
583
    }
584
 
585
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
586
    {
587
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
588
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
589
      args.userId = userId;
590
      args.timestamp = timestamp;
591
      args.write(oprot_);
592
      oprot_.writeMessageEnd();
593
      oprot_.getTransport().flush();
594
    }
595
 
596
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
597
    {
598
      TMessage msg = iprot_.readMessageBegin();
599
      if (msg.type == TMessageType.EXCEPTION) {
600
        TApplicationException x = TApplicationException.read(iprot_);
601
        iprot_.readMessageEnd();
602
        throw x;
603
      }
604
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
605
      result.read(iprot_);
606
      iprot_.readMessageEnd();
607
      if (result.isSetSuccess()) {
608
        return result.success;
609
      }
610
      if (result.ucx != null) {
611
        throw result.ucx;
612
      }
613
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
614
    }
615
 
616
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
617
    {
618
      send_setUserAsLoggedOut(userid, timestamp);
619
      return recv_setUserAsLoggedOut();
620
    }
621
 
622
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
623
    {
624
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
625
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
626
      args.userid = userid;
627
      args.timestamp = timestamp;
628
      args.write(oprot_);
629
      oprot_.writeMessageEnd();
630
      oprot_.getTransport().flush();
631
    }
632
 
633
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
634
    {
635
      TMessage msg = iprot_.readMessageBegin();
636
      if (msg.type == TMessageType.EXCEPTION) {
637
        TApplicationException x = TApplicationException.read(iprot_);
638
        iprot_.readMessageEnd();
639
        throw x;
640
      }
641
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
642
      result.read(iprot_);
643
      iprot_.readMessageEnd();
644
      if (result.isSetSuccess()) {
645
        return result.success;
646
      }
647
      if (result.ucx != null) {
648
        throw result.ucx;
649
      }
650
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
651
    }
652
 
506 rajveer 653
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
654
    {
655
      send_setDefaultAddress(userid, addressId);
656
      return recv_setDefaultAddress();
657
    }
658
 
659
    public void send_setDefaultAddress(long userid, long addressId) throws TException
660
    {
661
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
662
      setDefaultAddress_args args = new setDefaultAddress_args();
663
      args.userid = userid;
664
      args.addressId = addressId;
665
      args.write(oprot_);
666
      oprot_.writeMessageEnd();
667
      oprot_.getTransport().flush();
668
    }
669
 
670
    public boolean recv_setDefaultAddress() throws UserContextException, TException
671
    {
672
      TMessage msg = iprot_.readMessageBegin();
673
      if (msg.type == TMessageType.EXCEPTION) {
674
        TApplicationException x = TApplicationException.read(iprot_);
675
        iprot_.readMessageEnd();
676
        throw x;
677
      }
678
      setDefaultAddress_result result = new setDefaultAddress_result();
679
      result.read(iprot_);
680
      iprot_.readMessageEnd();
681
      if (result.isSetSuccess()) {
682
        return result.success;
683
      }
684
      if (result.ucx != null) {
685
        throw result.ucx;
686
      }
687
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
688
    }
689
 
593 rajveer 690
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 691
    {
593 rajveer 692
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 693
      return recv_updatePassword();
694
    }
695
 
593 rajveer 696
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 697
    {
698
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
699
      updatePassword_args args = new updatePassword_args();
700
      args.userid = userid;
593 rajveer 701
      args.oldPassword = oldPassword;
702
      args.newPassword = newPassword;
48 ashish 703
      args.write(oprot_);
704
      oprot_.writeMessageEnd();
705
      oprot_.getTransport().flush();
706
    }
707
 
708
    public boolean recv_updatePassword() throws UserContextException, TException
709
    {
710
      TMessage msg = iprot_.readMessageBegin();
711
      if (msg.type == TMessageType.EXCEPTION) {
712
        TApplicationException x = TApplicationException.read(iprot_);
713
        iprot_.readMessageEnd();
714
        throw x;
715
      }
716
      updatePassword_result result = new updatePassword_result();
717
      result.read(iprot_);
718
      iprot_.readMessageEnd();
719
      if (result.isSetSuccess()) {
720
        return result.success;
721
      }
722
      if (result.ucx != null) {
723
        throw result.ucx;
724
      }
725
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
726
    }
727
 
582 rajveer 728
    public boolean forgotPassword(String email) throws UserContextException, TException
729
    {
730
      send_forgotPassword(email);
731
      return recv_forgotPassword();
732
    }
733
 
734
    public void send_forgotPassword(String email) throws TException
735
    {
736
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
737
      forgotPassword_args args = new forgotPassword_args();
738
      args.email = email;
739
      args.write(oprot_);
740
      oprot_.writeMessageEnd();
741
      oprot_.getTransport().flush();
742
    }
743
 
744
    public boolean recv_forgotPassword() throws UserContextException, TException
745
    {
746
      TMessage msg = iprot_.readMessageBegin();
747
      if (msg.type == TMessageType.EXCEPTION) {
748
        TApplicationException x = TApplicationException.read(iprot_);
749
        iprot_.readMessageEnd();
750
        throw x;
751
      }
752
      forgotPassword_result result = new forgotPassword_result();
753
      result.read(iprot_);
754
      iprot_.readMessageEnd();
755
      if (result.isSetSuccess()) {
756
        return result.success;
757
      }
758
      if (result.ucx != null) {
759
        throw result.ucx;
760
      }
761
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
762
    }
763
 
593 rajveer 764
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
765
    {
766
      send_getAllAddressesForUser(userId);
767
      return recv_getAllAddressesForUser();
768
    }
769
 
770
    public void send_getAllAddressesForUser(long userId) throws TException
771
    {
772
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
773
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
774
      args.userId = userId;
775
      args.write(oprot_);
776
      oprot_.writeMessageEnd();
777
      oprot_.getTransport().flush();
778
    }
779
 
780
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
781
    {
782
      TMessage msg = iprot_.readMessageBegin();
783
      if (msg.type == TMessageType.EXCEPTION) {
784
        TApplicationException x = TApplicationException.read(iprot_);
785
        iprot_.readMessageEnd();
786
        throw x;
787
      }
788
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
789
      result.read(iprot_);
790
      iprot_.readMessageEnd();
791
      if (result.isSetSuccess()) {
792
        return result.success;
793
      }
794
      if (result.ucx != null) {
795
        throw result.ucx;
796
      }
797
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
798
    }
799
 
800
    public long getDefaultAddressId(long userId) throws UserContextException, TException
801
    {
802
      send_getDefaultAddressId(userId);
803
      return recv_getDefaultAddressId();
804
    }
805
 
806
    public void send_getDefaultAddressId(long userId) throws TException
807
    {
808
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
809
      getDefaultAddressId_args args = new getDefaultAddressId_args();
810
      args.userId = userId;
811
      args.write(oprot_);
812
      oprot_.writeMessageEnd();
813
      oprot_.getTransport().flush();
814
    }
815
 
816
    public long recv_getDefaultAddressId() throws UserContextException, TException
817
    {
818
      TMessage msg = iprot_.readMessageBegin();
819
      if (msg.type == TMessageType.EXCEPTION) {
820
        TApplicationException x = TApplicationException.read(iprot_);
821
        iprot_.readMessageEnd();
822
        throw x;
823
      }
824
      getDefaultAddressId_result result = new getDefaultAddressId_result();
825
      result.read(iprot_);
826
      iprot_.readMessageEnd();
827
      if (result.isSetSuccess()) {
828
        return result.success;
829
      }
830
      if (result.ucx != null) {
831
        throw result.ucx;
832
      }
833
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
834
    }
835
 
784 rajveer 836
    public String getDefaultPincode(long userId) throws UserContextException, TException
837
    {
838
      send_getDefaultPincode(userId);
839
      return recv_getDefaultPincode();
840
    }
841
 
842
    public void send_getDefaultPincode(long userId) throws TException
843
    {
844
      oprot_.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.CALL, seqid_));
845
      getDefaultPincode_args args = new getDefaultPincode_args();
846
      args.userId = userId;
847
      args.write(oprot_);
848
      oprot_.writeMessageEnd();
849
      oprot_.getTransport().flush();
850
    }
851
 
852
    public String recv_getDefaultPincode() throws UserContextException, TException
853
    {
854
      TMessage msg = iprot_.readMessageBegin();
855
      if (msg.type == TMessageType.EXCEPTION) {
856
        TApplicationException x = TApplicationException.read(iprot_);
857
        iprot_.readMessageEnd();
858
        throw x;
859
      }
860
      getDefaultPincode_result result = new getDefaultPincode_result();
861
      result.read(iprot_);
862
      iprot_.readMessageEnd();
863
      if (result.isSetSuccess()) {
864
        return result.success;
865
      }
866
      if (result.ucx != null) {
867
        throw result.ucx;
868
      }
869
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
870
    }
871
 
553 chandransh 872
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 873
    {
553 chandransh 874
      send_createCart(userId);
875
      return recv_createCart();
48 ashish 876
    }
877
 
553 chandransh 878
    public void send_createCart(long userId) throws TException
48 ashish 879
    {
553 chandransh 880
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
881
      createCart_args args = new createCart_args();
882
      args.userId = userId;
48 ashish 883
      args.write(oprot_);
884
      oprot_.writeMessageEnd();
885
      oprot_.getTransport().flush();
886
    }
887
 
553 chandransh 888
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 889
    {
890
      TMessage msg = iprot_.readMessageBegin();
891
      if (msg.type == TMessageType.EXCEPTION) {
892
        TApplicationException x = TApplicationException.read(iprot_);
893
        iprot_.readMessageEnd();
894
        throw x;
895
      }
553 chandransh 896
      createCart_result result = new createCart_result();
48 ashish 897
      result.read(iprot_);
898
      iprot_.readMessageEnd();
899
      if (result.isSetSuccess()) {
900
        return result.success;
901
      }
553 chandransh 902
      if (result.scx != null) {
903
        throw result.scx;
48 ashish 904
      }
553 chandransh 905
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 906
    }
907
 
553 chandransh 908
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 909
    {
553 chandransh 910
      send_getCurrentCart(userId);
911
      return recv_getCurrentCart();
48 ashish 912
    }
913
 
553 chandransh 914
    public void send_getCurrentCart(long userId) throws TException
48 ashish 915
    {
553 chandransh 916
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
917
      getCurrentCart_args args = new getCurrentCart_args();
918
      args.userId = userId;
48 ashish 919
      args.write(oprot_);
920
      oprot_.writeMessageEnd();
921
      oprot_.getTransport().flush();
922
    }
923
 
553 chandransh 924
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 925
    {
926
      TMessage msg = iprot_.readMessageBegin();
927
      if (msg.type == TMessageType.EXCEPTION) {
928
        TApplicationException x = TApplicationException.read(iprot_);
929
        iprot_.readMessageEnd();
930
        throw x;
931
      }
553 chandransh 932
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 933
      result.read(iprot_);
934
      iprot_.readMessageEnd();
935
      if (result.isSetSuccess()) {
936
        return result.success;
937
      }
553 chandransh 938
      if (result.scx != null) {
939
        throw result.scx;
48 ashish 940
      }
553 chandransh 941
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 942
    }
943
 
553 chandransh 944
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 945
    {
553 chandransh 946
      send_getCart(cartId);
947
      return recv_getCart();
48 ashish 948
    }
949
 
553 chandransh 950
    public void send_getCart(long cartId) throws TException
48 ashish 951
    {
553 chandransh 952
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
953
      getCart_args args = new getCart_args();
954
      args.cartId = cartId;
48 ashish 955
      args.write(oprot_);
956
      oprot_.writeMessageEnd();
957
      oprot_.getTransport().flush();
958
    }
959
 
553 chandransh 960
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 961
    {
962
      TMessage msg = iprot_.readMessageBegin();
963
      if (msg.type == TMessageType.EXCEPTION) {
964
        TApplicationException x = TApplicationException.read(iprot_);
965
        iprot_.readMessageEnd();
966
        throw x;
967
      }
553 chandransh 968
      getCart_result result = new getCart_result();
48 ashish 969
      result.read(iprot_);
970
      iprot_.readMessageEnd();
971
      if (result.isSetSuccess()) {
972
        return result.success;
973
      }
553 chandransh 974
      if (result.scx != null) {
975
        throw result.scx;
48 ashish 976
      }
553 chandransh 977
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 978
    }
979
 
553 chandransh 980
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 981
    {
553 chandransh 982
      send_getCartsForUser(userId, status);
983
      return recv_getCartsForUser();
48 ashish 984
    }
985
 
553 chandransh 986
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 987
    {
553 chandransh 988
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
989
      getCartsForUser_args args = new getCartsForUser_args();
990
      args.userId = userId;
991
      args.status = status;
48 ashish 992
      args.write(oprot_);
993
      oprot_.writeMessageEnd();
994
      oprot_.getTransport().flush();
995
    }
996
 
553 chandransh 997
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 998
    {
999
      TMessage msg = iprot_.readMessageBegin();
1000
      if (msg.type == TMessageType.EXCEPTION) {
1001
        TApplicationException x = TApplicationException.read(iprot_);
1002
        iprot_.readMessageEnd();
1003
        throw x;
1004
      }
553 chandransh 1005
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 1006
      result.read(iprot_);
1007
      iprot_.readMessageEnd();
1008
      if (result.isSetSuccess()) {
1009
        return result.success;
1010
      }
553 chandransh 1011
      if (result.scx != null) {
1012
        throw result.scx;
48 ashish 1013
      }
553 chandransh 1014
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 1015
    }
1016
 
553 chandransh 1017
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 1018
    {
553 chandransh 1019
      send_getCartsByStatus(status);
1020
      return recv_getCartsByStatus();
48 ashish 1021
    }
1022
 
553 chandransh 1023
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 1024
    {
553 chandransh 1025
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
1026
      getCartsByStatus_args args = new getCartsByStatus_args();
1027
      args.status = status;
48 ashish 1028
      args.write(oprot_);
1029
      oprot_.writeMessageEnd();
1030
      oprot_.getTransport().flush();
1031
    }
1032
 
553 chandransh 1033
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 1034
    {
1035
      TMessage msg = iprot_.readMessageBegin();
1036
      if (msg.type == TMessageType.EXCEPTION) {
1037
        TApplicationException x = TApplicationException.read(iprot_);
1038
        iprot_.readMessageEnd();
1039
        throw x;
1040
      }
553 chandransh 1041
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 1042
      result.read(iprot_);
1043
      iprot_.readMessageEnd();
1044
      if (result.isSetSuccess()) {
1045
        return result.success;
1046
      }
553 chandransh 1047
      if (result.scx != null) {
1048
        throw result.scx;
48 ashish 1049
      }
553 chandransh 1050
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 1051
    }
1052
 
553 chandransh 1053
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 1054
    {
553 chandransh 1055
      send_getCartsByTime(from_time, to_time, status);
1056
      return recv_getCartsByTime();
48 ashish 1057
    }
1058
 
553 chandransh 1059
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 1060
    {
553 chandransh 1061
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
1062
      getCartsByTime_args args = new getCartsByTime_args();
1063
      args.from_time = from_time;
1064
      args.to_time = to_time;
1065
      args.status = status;
48 ashish 1066
      args.write(oprot_);
1067
      oprot_.writeMessageEnd();
1068
      oprot_.getTransport().flush();
1069
    }
1070
 
553 chandransh 1071
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 1072
    {
1073
      TMessage msg = iprot_.readMessageBegin();
1074
      if (msg.type == TMessageType.EXCEPTION) {
1075
        TApplicationException x = TApplicationException.read(iprot_);
1076
        iprot_.readMessageEnd();
1077
        throw x;
1078
      }
553 chandransh 1079
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 1080
      result.read(iprot_);
1081
      iprot_.readMessageEnd();
1082
      if (result.isSetSuccess()) {
1083
        return result.success;
1084
      }
553 chandransh 1085
      if (result.scx != null) {
1086
        throw result.scx;
48 ashish 1087
      }
553 chandransh 1088
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 1089
    }
1090
 
553 chandransh 1091
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 1092
    {
553 chandransh 1093
      send_changeCartStatus(cartId, status);
1094
      recv_changeCartStatus();
130 ashish 1095
    }
1096
 
553 chandransh 1097
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1098
    {
553 chandransh 1099
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1100
      changeCartStatus_args args = new changeCartStatus_args();
1101
      args.cartId = cartId;
1102
      args.status = status;
130 ashish 1103
      args.write(oprot_);
1104
      oprot_.writeMessageEnd();
1105
      oprot_.getTransport().flush();
1106
    }
1107
 
553 chandransh 1108
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 1109
    {
1110
      TMessage msg = iprot_.readMessageBegin();
1111
      if (msg.type == TMessageType.EXCEPTION) {
1112
        TApplicationException x = TApplicationException.read(iprot_);
1113
        iprot_.readMessageEnd();
1114
        throw x;
1115
      }
553 chandransh 1116
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1117
      result.read(iprot_);
1118
      iprot_.readMessageEnd();
553 chandransh 1119
      if (result.scx != null) {
1120
        throw result.scx;
1121
      }
1122
      return;
1123
    }
1124
 
1125
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1126
    {
1127
      send_addItemToCart(cartId, itemId, quantity);
1128
      recv_addItemToCart();
1129
    }
1130
 
1131
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1132
    {
1133
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1134
      addItemToCart_args args = new addItemToCart_args();
1135
      args.cartId = cartId;
1136
      args.itemId = itemId;
1137
      args.quantity = quantity;
1138
      args.write(oprot_);
1139
      oprot_.writeMessageEnd();
1140
      oprot_.getTransport().flush();
1141
    }
1142
 
1143
    public void recv_addItemToCart() throws ShoppingCartException, TException
1144
    {
1145
      TMessage msg = iprot_.readMessageBegin();
1146
      if (msg.type == TMessageType.EXCEPTION) {
1147
        TApplicationException x = TApplicationException.read(iprot_);
1148
        iprot_.readMessageEnd();
1149
        throw x;
1150
      }
1151
      addItemToCart_result result = new addItemToCart_result();
1152
      result.read(iprot_);
1153
      iprot_.readMessageEnd();
1154
      if (result.scx != null) {
1155
        throw result.scx;
1156
      }
1157
      return;
1158
    }
1159
 
1160
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1161
    {
1162
      send_deleteItemFromCart(cartId, itemId);
1163
      recv_deleteItemFromCart();
1164
    }
1165
 
1166
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1167
    {
1168
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1169
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1170
      args.cartId = cartId;
1171
      args.itemId = itemId;
1172
      args.write(oprot_);
1173
      oprot_.writeMessageEnd();
1174
      oprot_.getTransport().flush();
1175
    }
1176
 
1177
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1178
    {
1179
      TMessage msg = iprot_.readMessageBegin();
1180
      if (msg.type == TMessageType.EXCEPTION) {
1181
        TApplicationException x = TApplicationException.read(iprot_);
1182
        iprot_.readMessageEnd();
1183
        throw x;
1184
      }
1185
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1186
      result.read(iprot_);
1187
      iprot_.readMessageEnd();
1188
      if (result.scx != null) {
1189
        throw result.scx;
1190
      }
1191
      return;
1192
    }
1193
 
1194
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1195
    {
1196
      send_changeQuantity(cartId, itemId, quantity);
1197
      recv_changeQuantity();
1198
    }
1199
 
1200
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1201
    {
1202
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1203
      changeQuantity_args args = new changeQuantity_args();
1204
      args.cartId = cartId;
1205
      args.itemId = itemId;
1206
      args.quantity = quantity;
1207
      args.write(oprot_);
1208
      oprot_.writeMessageEnd();
1209
      oprot_.getTransport().flush();
1210
    }
1211
 
1212
    public void recv_changeQuantity() throws ShoppingCartException, TException
1213
    {
1214
      TMessage msg = iprot_.readMessageBegin();
1215
      if (msg.type == TMessageType.EXCEPTION) {
1216
        TApplicationException x = TApplicationException.read(iprot_);
1217
        iprot_.readMessageEnd();
1218
        throw x;
1219
      }
1220
      changeQuantity_result result = new changeQuantity_result();
1221
      result.read(iprot_);
1222
      iprot_.readMessageEnd();
1223
      if (result.scx != null) {
1224
        throw result.scx;
1225
      }
1226
      return;
1227
    }
1228
 
1229
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1230
    {
1231
      send_changeItemStatus(cartId, itemId, status);
1232
      recv_changeItemStatus();
1233
    }
1234
 
1235
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1236
    {
1237
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1238
      changeItemStatus_args args = new changeItemStatus_args();
1239
      args.cartId = cartId;
1240
      args.itemId = itemId;
1241
      args.status = status;
1242
      args.write(oprot_);
1243
      oprot_.writeMessageEnd();
1244
      oprot_.getTransport().flush();
1245
    }
1246
 
1247
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1248
    {
1249
      TMessage msg = iprot_.readMessageBegin();
1250
      if (msg.type == TMessageType.EXCEPTION) {
1251
        TApplicationException x = TApplicationException.read(iprot_);
1252
        iprot_.readMessageEnd();
1253
        throw x;
1254
      }
1255
      changeItemStatus_result result = new changeItemStatus_result();
1256
      result.read(iprot_);
1257
      iprot_.readMessageEnd();
1258
      if (result.scx != null) {
1259
        throw result.scx;
1260
      }
1261
      return;
1262
    }
1263
 
578 chandransh 1264
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1265
    {
1266
      send_addAddressToCart(cartId, addressId);
1267
      recv_addAddressToCart();
1268
    }
1269
 
1270
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1271
    {
1272
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1273
      addAddressToCart_args args = new addAddressToCart_args();
1274
      args.cartId = cartId;
1275
      args.addressId = addressId;
1276
      args.write(oprot_);
1277
      oprot_.writeMessageEnd();
1278
      oprot_.getTransport().flush();
1279
    }
1280
 
578 chandransh 1281
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1282
    {
1283
      TMessage msg = iprot_.readMessageBegin();
1284
      if (msg.type == TMessageType.EXCEPTION) {
1285
        TApplicationException x = TApplicationException.read(iprot_);
1286
        iprot_.readMessageEnd();
1287
        throw x;
1288
      }
1289
      addAddressToCart_result result = new addAddressToCart_result();
1290
      result.read(iprot_);
1291
      iprot_.readMessageEnd();
578 chandransh 1292
      if (result.scx != null) {
1293
        throw result.scx;
1294
      }
553 chandransh 1295
      return;
1296
    }
1297
 
688 chandransh 1298
    public long createOrders(long cartId) throws ShoppingCartException, TException
553 chandransh 1299
    {
688 chandransh 1300
      send_createOrders(cartId);
1301
      return recv_createOrders();
553 chandransh 1302
    }
1303
 
688 chandransh 1304
    public void send_createOrders(long cartId) throws TException
553 chandransh 1305
    {
688 chandransh 1306
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1307
      createOrders_args args = new createOrders_args();
553 chandransh 1308
      args.cartId = cartId;
1309
      args.write(oprot_);
1310
      oprot_.writeMessageEnd();
1311
      oprot_.getTransport().flush();
1312
    }
1313
 
688 chandransh 1314
    public long recv_createOrders() throws ShoppingCartException, TException
553 chandransh 1315
    {
1316
      TMessage msg = iprot_.readMessageBegin();
1317
      if (msg.type == TMessageType.EXCEPTION) {
1318
        TApplicationException x = TApplicationException.read(iprot_);
1319
        iprot_.readMessageEnd();
1320
        throw x;
1321
      }
688 chandransh 1322
      createOrders_result result = new createOrders_result();
553 chandransh 1323
      result.read(iprot_);
1324
      iprot_.readMessageEnd();
130 ashish 1325
      if (result.isSetSuccess()) {
1326
        return result.success;
1327
      }
553 chandransh 1328
      if (result.scx != null) {
1329
        throw result.scx;
130 ashish 1330
      }
688 chandransh 1331
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
130 ashish 1332
    }
1333
 
578 chandransh 1334
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1335
    {
553 chandransh 1336
      send_validateCart(cartId);
1337
      return recv_validateCart();
130 ashish 1338
    }
1339
 
553 chandransh 1340
    public void send_validateCart(long cartId) throws TException
130 ashish 1341
    {
553 chandransh 1342
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1343
      validateCart_args args = new validateCart_args();
1344
      args.cartId = cartId;
130 ashish 1345
      args.write(oprot_);
1346
      oprot_.writeMessageEnd();
1347
      oprot_.getTransport().flush();
1348
    }
1349
 
578 chandransh 1350
    public boolean recv_validateCart() throws ShoppingCartException, TException
130 ashish 1351
    {
1352
      TMessage msg = iprot_.readMessageBegin();
1353
      if (msg.type == TMessageType.EXCEPTION) {
1354
        TApplicationException x = TApplicationException.read(iprot_);
1355
        iprot_.readMessageEnd();
1356
        throw x;
1357
      }
553 chandransh 1358
      validateCart_result result = new validateCart_result();
130 ashish 1359
      result.read(iprot_);
1360
      iprot_.readMessageEnd();
1361
      if (result.isSetSuccess()) {
1362
        return result.success;
1363
      }
578 chandransh 1364
      if (result.scex != null) {
1365
        throw result.scex;
1366
      }
553 chandransh 1367
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1368
    }
1369
 
688 chandransh 1370
    public void mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1371
    {
688 chandransh 1372
      send_mergeCart(fromCartId, toCartId);
1373
      recv_mergeCart();
578 chandransh 1374
    }
1375
 
688 chandransh 1376
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1377
    {
688 chandransh 1378
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1379
      mergeCart_args args = new mergeCart_args();
1380
      args.fromCartId = fromCartId;
1381
      args.toCartId = toCartId;
1382
      args.write(oprot_);
1383
      oprot_.writeMessageEnd();
1384
      oprot_.getTransport().flush();
1385
    }
1386
 
1387
    public void recv_mergeCart() throws TException
1388
    {
1389
      TMessage msg = iprot_.readMessageBegin();
1390
      if (msg.type == TMessageType.EXCEPTION) {
1391
        TApplicationException x = TApplicationException.read(iprot_);
1392
        iprot_.readMessageEnd();
1393
        throw x;
1394
      }
1395
      mergeCart_result result = new mergeCart_result();
1396
      result.read(iprot_);
1397
      iprot_.readMessageEnd();
1398
      return;
1399
    }
1400
 
1401
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1402
    {
1403
      send_checkOut(cartId);
1404
      return recv_checkOut();
1405
    }
1406
 
1407
    public void send_checkOut(long cartId) throws TException
1408
    {
1409
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1410
      checkOut_args args = new checkOut_args();
578 chandransh 1411
      args.cartId = cartId;
1412
      args.write(oprot_);
1413
      oprot_.writeMessageEnd();
1414
      oprot_.getTransport().flush();
1415
    }
1416
 
688 chandransh 1417
    public boolean recv_checkOut() throws ShoppingCartException, TException
578 chandransh 1418
    {
1419
      TMessage msg = iprot_.readMessageBegin();
1420
      if (msg.type == TMessageType.EXCEPTION) {
1421
        TApplicationException x = TApplicationException.read(iprot_);
1422
        iprot_.readMessageEnd();
1423
        throw x;
1424
      }
688 chandransh 1425
      checkOut_result result = new checkOut_result();
578 chandransh 1426
      result.read(iprot_);
1427
      iprot_.readMessageEnd();
1428
      if (result.isSetSuccess()) {
1429
        return result.success;
1430
      }
1431
      if (result.scex != null) {
1432
        throw result.scex;
1433
      }
688 chandransh 1434
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
578 chandransh 1435
    }
1436
 
708 rajveer 1437
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException
553 chandransh 1438
    {
688 chandransh 1439
      send_resetCart(cartId, items);
1440
      return recv_resetCart();
553 chandransh 1441
    }
1442
 
708 rajveer 1443
    public void send_resetCart(long cartId, Map<Long,Double> items) throws TException
553 chandransh 1444
    {
688 chandransh 1445
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1446
      resetCart_args args = new resetCart_args();
1447
      args.cartId = cartId;
1448
      args.items = items;
553 chandransh 1449
      args.write(oprot_);
1450
      oprot_.writeMessageEnd();
1451
      oprot_.getTransport().flush();
1452
    }
1453
 
688 chandransh 1454
    public boolean recv_resetCart() throws ShoppingCartException, TException
553 chandransh 1455
    {
1456
      TMessage msg = iprot_.readMessageBegin();
1457
      if (msg.type == TMessageType.EXCEPTION) {
1458
        TApplicationException x = TApplicationException.read(iprot_);
1459
        iprot_.readMessageEnd();
1460
        throw x;
130 ashish 1461
      }
688 chandransh 1462
      resetCart_result result = new resetCart_result();
553 chandransh 1463
      result.read(iprot_);
1464
      iprot_.readMessageEnd();
688 chandransh 1465
      if (result.isSetSuccess()) {
1466
        return result.success;
1467
      }
1468
      if (result.scex != null) {
1469
        throw result.scex;
1470
      }
1471
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
130 ashish 1472
    }
1473
 
771 rajveer 1474
    public Widget getMyResearch(long userId) throws WidgetException, TException
553 chandransh 1475
    {
771 rajveer 1476
      send_getMyResearch(userId);
553 chandransh 1477
      return recv_getMyResearch();
1478
    }
1479
 
771 rajveer 1480
    public void send_getMyResearch(long userId) throws TException
553 chandransh 1481
    {
1482
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1483
      getMyResearch_args args = new getMyResearch_args();
771 rajveer 1484
      args.userId = userId;
553 chandransh 1485
      args.write(oprot_);
1486
      oprot_.writeMessageEnd();
1487
      oprot_.getTransport().flush();
1488
    }
1489
 
1490
    public Widget recv_getMyResearch() throws WidgetException, TException
1491
    {
1492
      TMessage msg = iprot_.readMessageBegin();
1493
      if (msg.type == TMessageType.EXCEPTION) {
1494
        TApplicationException x = TApplicationException.read(iprot_);
1495
        iprot_.readMessageEnd();
1496
        throw x;
1497
      }
1498
      getMyResearch_result result = new getMyResearch_result();
1499
      result.read(iprot_);
1500
      iprot_.readMessageEnd();
1501
      if (result.isSetSuccess()) {
1502
        return result.success;
1503
      }
1504
      if (result.scx != null) {
1505
        throw result.scx;
1506
      }
1507
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1508
    }
1509
 
771 rajveer 1510
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1511
    {
771 rajveer 1512
      send_updateMyResearch(userId, itemId);
553 chandransh 1513
      return recv_updateMyResearch();
1514
    }
1515
 
771 rajveer 1516
    public void send_updateMyResearch(long userId, long itemId) throws TException
553 chandransh 1517
    {
1518
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1519
      updateMyResearch_args args = new updateMyResearch_args();
771 rajveer 1520
      args.userId = userId;
1521
      args.itemId = itemId;
553 chandransh 1522
      args.write(oprot_);
1523
      oprot_.writeMessageEnd();
1524
      oprot_.getTransport().flush();
1525
    }
1526
 
1527
    public boolean recv_updateMyResearch() throws WidgetException, TException
1528
    {
1529
      TMessage msg = iprot_.readMessageBegin();
1530
      if (msg.type == TMessageType.EXCEPTION) {
1531
        TApplicationException x = TApplicationException.read(iprot_);
1532
        iprot_.readMessageEnd();
1533
        throw x;
1534
      }
1535
      updateMyResearch_result result = new updateMyResearch_result();
1536
      result.read(iprot_);
1537
      iprot_.readMessageEnd();
1538
      if (result.isSetSuccess()) {
1539
        return result.success;
1540
      }
1541
      if (result.scx != null) {
1542
        throw result.scx;
1543
      }
1544
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1545
    }
1546
 
771 rajveer 1547
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1548
    {
771 rajveer 1549
      send_deleteItemFromMyResearch(userId, itemId);
553 chandransh 1550
      recv_deleteItemFromMyResearch();
1551
    }
1552
 
771 rajveer 1553
    public void send_deleteItemFromMyResearch(long userId, long itemId) throws TException
553 chandransh 1554
    {
1555
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1556
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
771 rajveer 1557
      args.userId = userId;
1558
      args.itemId = itemId;
553 chandransh 1559
      args.write(oprot_);
1560
      oprot_.writeMessageEnd();
1561
      oprot_.getTransport().flush();
1562
    }
1563
 
1564
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1565
    {
1566
      TMessage msg = iprot_.readMessageBegin();
1567
      if (msg.type == TMessageType.EXCEPTION) {
1568
        TApplicationException x = TApplicationException.read(iprot_);
1569
        iprot_.readMessageEnd();
1570
        throw x;
1571
      }
1572
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1573
      result.read(iprot_);
1574
      iprot_.readMessageEnd();
1575
      if (result.scx != null) {
1576
        throw result.scx;
1577
      }
1578
      return;
1579
    }
1580
 
771 rajveer 1581
    public void updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1582
    {
771 rajveer 1583
      send_updateBrowseHistory(userId, itemId);
1584
      recv_updateBrowseHistory();
553 chandransh 1585
    }
1586
 
771 rajveer 1587
    public void send_updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1588
    {
771 rajveer 1589
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1590
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1591
      args.userId = userId;
1592
      args.itemId = itemId;
553 chandransh 1593
      args.write(oprot_);
1594
      oprot_.writeMessageEnd();
1595
      oprot_.getTransport().flush();
1596
    }
1597
 
771 rajveer 1598
    public void recv_updateBrowseHistory() throws TException
553 chandransh 1599
    {
1600
      TMessage msg = iprot_.readMessageBegin();
1601
      if (msg.type == TMessageType.EXCEPTION) {
1602
        TApplicationException x = TApplicationException.read(iprot_);
1603
        iprot_.readMessageEnd();
1604
        throw x;
1605
      }
771 rajveer 1606
      updateBrowseHistory_result result = new updateBrowseHistory_result();
553 chandransh 1607
      result.read(iprot_);
1608
      iprot_.readMessageEnd();
1609
      return;
1610
    }
1611
 
771 rajveer 1612
    public Widget getBrowseHistory(long userId) throws WidgetException, TException
553 chandransh 1613
    {
771 rajveer 1614
      send_getBrowseHistory(userId);
1615
      return recv_getBrowseHistory();
553 chandransh 1616
    }
1617
 
771 rajveer 1618
    public void send_getBrowseHistory(long userId) throws TException
553 chandransh 1619
    {
771 rajveer 1620
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1621
      getBrowseHistory_args args = new getBrowseHistory_args();
1622
      args.userId = userId;
553 chandransh 1623
      args.write(oprot_);
1624
      oprot_.writeMessageEnd();
1625
      oprot_.getTransport().flush();
1626
    }
1627
 
771 rajveer 1628
    public Widget recv_getBrowseHistory() throws WidgetException, TException
553 chandransh 1629
    {
1630
      TMessage msg = iprot_.readMessageBegin();
1631
      if (msg.type == TMessageType.EXCEPTION) {
1632
        TApplicationException x = TApplicationException.read(iprot_);
1633
        iprot_.readMessageEnd();
1634
        throw x;
1635
      }
771 rajveer 1636
      getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 1637
      result.read(iprot_);
1638
      iprot_.readMessageEnd();
1639
      if (result.isSetSuccess()) {
1640
        return result.success;
1641
      }
1642
      if (result.scx != null) {
1643
        throw result.scx;
1644
      }
771 rajveer 1645
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
553 chandransh 1646
    }
1647
 
771 rajveer 1648
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1649
    {
771 rajveer 1650
      send_mergeBrowseHistory(fromUserId, toUserId);
1651
      recv_mergeBrowseHistory();
553 chandransh 1652
    }
1653
 
771 rajveer 1654
    public void send_mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1655
    {
771 rajveer 1656
      oprot_.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.CALL, seqid_));
1657
      mergeBrowseHistory_args args = new mergeBrowseHistory_args();
1658
      args.fromUserId = fromUserId;
1659
      args.toUserId = toUserId;
553 chandransh 1660
      args.write(oprot_);
1661
      oprot_.writeMessageEnd();
1662
      oprot_.getTransport().flush();
1663
    }
1664
 
771 rajveer 1665
    public void recv_mergeBrowseHistory() throws TException
553 chandransh 1666
    {
1667
      TMessage msg = iprot_.readMessageBegin();
1668
      if (msg.type == TMessageType.EXCEPTION) {
1669
        TApplicationException x = TApplicationException.read(iprot_);
1670
        iprot_.readMessageEnd();
1671
        throw x;
1672
      }
771 rajveer 1673
      mergeBrowseHistory_result result = new mergeBrowseHistory_result();
553 chandransh 1674
      result.read(iprot_);
1675
      iprot_.readMessageEnd();
1676
      return;
1677
    }
1678
 
48 ashish 1679
  }
1680
  public static class Processor implements TProcessor {
1681
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1682
    public Processor(Iface iface)
1683
    {
1684
      iface_ = iface;
764 rajveer 1685
      processMap_.put("closeSession", new closeSession());
553 chandransh 1686
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1687
      processMap_.put("getUserById", new getUserById());
1688
      processMap_.put("createUser", new createUser());
1689
      processMap_.put("updateUser", new updateUser());
1690
      processMap_.put("deleteUser", new deleteUser());
1691
      processMap_.put("getUserState", new getUserState());
123 ashish 1692
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1693
      processMap_.put("userExists", new userExists());
1694
      processMap_.put("addAddressForUser", new addAddressForUser());
1695
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1696
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1697
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1698
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1699
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1700
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1701
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1702
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
784 rajveer 1703
      processMap_.put("getDefaultPincode", new getDefaultPincode());
553 chandransh 1704
      processMap_.put("createCart", new createCart());
1705
      processMap_.put("getCurrentCart", new getCurrentCart());
1706
      processMap_.put("getCart", new getCart());
1707
      processMap_.put("getCartsForUser", new getCartsForUser());
1708
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1709
      processMap_.put("getCartsByTime", new getCartsByTime());
1710
      processMap_.put("changeCartStatus", new changeCartStatus());
1711
      processMap_.put("addItemToCart", new addItemToCart());
1712
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1713
      processMap_.put("changeQuantity", new changeQuantity());
1714
      processMap_.put("changeItemStatus", new changeItemStatus());
1715
      processMap_.put("addAddressToCart", new addAddressToCart());
688 chandransh 1716
      processMap_.put("createOrders", new createOrders());
553 chandransh 1717
      processMap_.put("validateCart", new validateCart());
1718
      processMap_.put("mergeCart", new mergeCart());
688 chandransh 1719
      processMap_.put("checkOut", new checkOut());
1720
      processMap_.put("resetCart", new resetCart());
553 chandransh 1721
      processMap_.put("getMyResearch", new getMyResearch());
1722
      processMap_.put("updateMyResearch", new updateMyResearch());
1723
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1724
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1725
      processMap_.put("getBrowseHistory", new getBrowseHistory());
771 rajveer 1726
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
48 ashish 1727
    }
1728
 
1729
    protected static interface ProcessFunction {
1730
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1731
    }
1732
 
1733
    private Iface iface_;
1734
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1735
 
1736
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1737
    {
1738
      TMessage msg = iprot.readMessageBegin();
1739
      ProcessFunction fn = processMap_.get(msg.name);
1740
      if (fn == null) {
1741
        TProtocolUtil.skip(iprot, TType.STRUCT);
1742
        iprot.readMessageEnd();
1743
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1744
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1745
        x.write(oprot);
1746
        oprot.writeMessageEnd();
1747
        oprot.getTransport().flush();
1748
        return true;
1749
      }
1750
      fn.process(msg.seqid, iprot, oprot);
1751
      return true;
1752
    }
1753
 
764 rajveer 1754
    private class closeSession implements ProcessFunction {
1755
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1756
      {
1757
        closeSession_args args = new closeSession_args();
1758
        args.read(iprot);
1759
        iprot.readMessageEnd();
1760
        closeSession_result result = new closeSession_result();
1761
        iface_.closeSession();
1762
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1763
        result.write(oprot);
1764
        oprot.writeMessageEnd();
1765
        oprot.getTransport().flush();
1766
      }
1767
 
1768
    }
1769
 
553 chandransh 1770
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1771
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1772
      {
553 chandransh 1773
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1774
        args.read(iprot);
1775
        iprot.readMessageEnd();
553 chandransh 1776
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1777
        try {
553 chandransh 1778
          result.success = iface_.createAnonymousUser(args.jsessionId);
1779
        } catch (UserContextException ucex) {
1780
          result.ucex = ucex;
48 ashish 1781
        } catch (Throwable th) {
553 chandransh 1782
          LOGGER.error("Internal error processing createAnonymousUser", th);
1783
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1784
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1785
          x.write(oprot);
1786
          oprot.writeMessageEnd();
1787
          oprot.getTransport().flush();
1788
          return;
1789
        }
553 chandransh 1790
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1791
        result.write(oprot);
1792
        oprot.writeMessageEnd();
1793
        oprot.getTransport().flush();
1794
      }
1795
 
1796
    }
1797
 
553 chandransh 1798
    private class getUserById implements ProcessFunction {
48 ashish 1799
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1800
      {
553 chandransh 1801
        getUserById_args args = new getUserById_args();
48 ashish 1802
        args.read(iprot);
1803
        iprot.readMessageEnd();
553 chandransh 1804
        getUserById_result result = new getUserById_result();
48 ashish 1805
        try {
553 chandransh 1806
          result.success = iface_.getUserById(args.userId);
1807
        } catch (UserContextException ucex) {
1808
          result.ucex = ucex;
48 ashish 1809
        } catch (Throwable th) {
553 chandransh 1810
          LOGGER.error("Internal error processing getUserById", th);
1811
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1812
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1813
          x.write(oprot);
1814
          oprot.writeMessageEnd();
1815
          oprot.getTransport().flush();
1816
          return;
1817
        }
553 chandransh 1818
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1819
        result.write(oprot);
1820
        oprot.writeMessageEnd();
1821
        oprot.getTransport().flush();
1822
      }
1823
 
1824
    }
1825
 
553 chandransh 1826
    private class createUser implements ProcessFunction {
48 ashish 1827
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1828
      {
553 chandransh 1829
        createUser_args args = new createUser_args();
48 ashish 1830
        args.read(iprot);
1831
        iprot.readMessageEnd();
553 chandransh 1832
        createUser_result result = new createUser_result();
48 ashish 1833
        try {
553 chandransh 1834
          result.success = iface_.createUser(args.user);
1835
        } catch (UserContextException ucex) {
1836
          result.ucex = ucex;
48 ashish 1837
        } catch (Throwable th) {
553 chandransh 1838
          LOGGER.error("Internal error processing createUser", th);
1839
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
1840
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 1841
          x.write(oprot);
1842
          oprot.writeMessageEnd();
1843
          oprot.getTransport().flush();
1844
          return;
1845
        }
553 chandransh 1846
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 1847
        result.write(oprot);
1848
        oprot.writeMessageEnd();
1849
        oprot.getTransport().flush();
1850
      }
1851
 
1852
    }
1853
 
553 chandransh 1854
    private class updateUser implements ProcessFunction {
48 ashish 1855
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1856
      {
553 chandransh 1857
        updateUser_args args = new updateUser_args();
48 ashish 1858
        args.read(iprot);
1859
        iprot.readMessageEnd();
553 chandransh 1860
        updateUser_result result = new updateUser_result();
48 ashish 1861
        try {
553 chandransh 1862
          result.success = iface_.updateUser(args.user);
1863
        } catch (UserContextException ucex) {
1864
          result.ucex = ucex;
48 ashish 1865
        } catch (Throwable th) {
553 chandransh 1866
          LOGGER.error("Internal error processing updateUser", th);
1867
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
1868
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 1869
          x.write(oprot);
1870
          oprot.writeMessageEnd();
1871
          oprot.getTransport().flush();
1872
          return;
1873
        }
553 chandransh 1874
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 1875
        result.write(oprot);
1876
        oprot.writeMessageEnd();
1877
        oprot.getTransport().flush();
1878
      }
1879
 
1880
    }
1881
 
553 chandransh 1882
    private class deleteUser implements ProcessFunction {
48 ashish 1883
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1884
      {
553 chandransh 1885
        deleteUser_args args = new deleteUser_args();
48 ashish 1886
        args.read(iprot);
1887
        iprot.readMessageEnd();
553 chandransh 1888
        deleteUser_result result = new deleteUser_result();
48 ashish 1889
        try {
553 chandransh 1890
          result.success = iface_.deleteUser(args.userId);
1891
          result.setSuccessIsSet(true);
1892
        } catch (UserContextException ucex) {
1893
          result.ucex = ucex;
48 ashish 1894
        } catch (Throwable th) {
553 chandransh 1895
          LOGGER.error("Internal error processing deleteUser", th);
1896
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1897
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 1898
          x.write(oprot);
1899
          oprot.writeMessageEnd();
1900
          oprot.getTransport().flush();
1901
          return;
1902
        }
553 chandransh 1903
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 1904
        result.write(oprot);
1905
        oprot.writeMessageEnd();
1906
        oprot.getTransport().flush();
1907
      }
1908
 
1909
    }
1910
 
553 chandransh 1911
    private class getUserState implements ProcessFunction {
48 ashish 1912
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1913
      {
553 chandransh 1914
        getUserState_args args = new getUserState_args();
48 ashish 1915
        args.read(iprot);
1916
        iprot.readMessageEnd();
553 chandransh 1917
        getUserState_result result = new getUserState_result();
48 ashish 1918
        try {
553 chandransh 1919
          result.success = iface_.getUserState(args.userId);
1920
        } catch (UserContextException ucex) {
1921
          result.ucex = ucex;
48 ashish 1922
        } catch (Throwable th) {
553 chandransh 1923
          LOGGER.error("Internal error processing getUserState", th);
1924
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
1925
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 1926
          x.write(oprot);
1927
          oprot.writeMessageEnd();
1928
          oprot.getTransport().flush();
1929
          return;
1930
        }
553 chandransh 1931
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 1932
        result.write(oprot);
1933
        oprot.writeMessageEnd();
1934
        oprot.getTransport().flush();
1935
      }
1936
 
1937
    }
1938
 
123 ashish 1939
    private class authenticateUser implements ProcessFunction {
1940
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1941
      {
1942
        authenticateUser_args args = new authenticateUser_args();
1943
        args.read(iprot);
1944
        iprot.readMessageEnd();
1945
        authenticateUser_result result = new authenticateUser_result();
1946
        try {
553 chandransh 1947
          result.success = iface_.authenticateUser(args.email, args.password);
1948
        } catch (AuthenticationException auex) {
1949
          result.auex = auex;
123 ashish 1950
        } catch (Throwable th) {
1951
          LOGGER.error("Internal error processing authenticateUser", th);
1952
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1953
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1954
          x.write(oprot);
1955
          oprot.writeMessageEnd();
1956
          oprot.getTransport().flush();
1957
          return;
1958
        }
1959
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1960
        result.write(oprot);
1961
        oprot.writeMessageEnd();
1962
        oprot.getTransport().flush();
1963
      }
1964
 
1965
    }
1966
 
48 ashish 1967
    private class userExists implements ProcessFunction {
1968
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1969
      {
1970
        userExists_args args = new userExists_args();
1971
        args.read(iprot);
1972
        iprot.readMessageEnd();
1973
        userExists_result result = new userExists_result();
1974
        try {
1975
          result.success = iface_.userExists(args.email);
1976
          result.setSuccessIsSet(true);
1977
        } catch (UserContextException ucx) {
1978
          result.ucx = ucx;
1979
        } catch (Throwable th) {
1980
          LOGGER.error("Internal error processing userExists", th);
1981
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1982
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1983
          x.write(oprot);
1984
          oprot.writeMessageEnd();
1985
          oprot.getTransport().flush();
1986
          return;
1987
        }
1988
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1989
        result.write(oprot);
1990
        oprot.writeMessageEnd();
1991
        oprot.getTransport().flush();
1992
      }
1993
 
1994
    }
1995
 
1996
    private class addAddressForUser implements ProcessFunction {
1997
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1998
      {
1999
        addAddressForUser_args args = new addAddressForUser_args();
2000
        args.read(iprot);
2001
        iprot.readMessageEnd();
2002
        addAddressForUser_result result = new addAddressForUser_result();
2003
        try {
571 rajveer 2004
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2005
          result.setSuccessIsSet(true);
2006
        } catch (UserContextException ucx) {
2007
          result.ucx = ucx;
2008
        } catch (Throwable th) {
2009
          LOGGER.error("Internal error processing addAddressForUser", th);
2010
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2011
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2012
          x.write(oprot);
2013
          oprot.writeMessageEnd();
2014
          oprot.getTransport().flush();
2015
          return;
2016
        }
2017
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2018
        result.write(oprot);
2019
        oprot.writeMessageEnd();
2020
        oprot.getTransport().flush();
2021
      }
2022
 
2023
    }
2024
 
2025
    private class removeAddressForUser implements ProcessFunction {
2026
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2027
      {
2028
        removeAddressForUser_args args = new removeAddressForUser_args();
2029
        args.read(iprot);
2030
        iprot.readMessageEnd();
2031
        removeAddressForUser_result result = new removeAddressForUser_result();
2032
        try {
2033
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2034
          result.setSuccessIsSet(true);
2035
        } catch (UserContextException ucx) {
2036
          result.ucx = ucx;
2037
        } catch (Throwable th) {
2038
          LOGGER.error("Internal error processing removeAddressForUser", th);
2039
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2040
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2041
          x.write(oprot);
2042
          oprot.writeMessageEnd();
2043
          oprot.getTransport().flush();
2044
          return;
2045
        }
2046
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2047
        result.write(oprot);
2048
        oprot.writeMessageEnd();
2049
        oprot.getTransport().flush();
2050
      }
2051
 
2052
    }
2053
 
2054
    private class setUserAsLoggedIn implements ProcessFunction {
2055
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2056
      {
2057
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2058
        args.read(iprot);
2059
        iprot.readMessageEnd();
2060
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2061
        try {
2062
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2063
          result.setSuccessIsSet(true);
2064
        } catch (UserContextException ucx) {
2065
          result.ucx = ucx;
2066
        } catch (Throwable th) {
2067
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2068
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2069
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2070
          x.write(oprot);
2071
          oprot.writeMessageEnd();
2072
          oprot.getTransport().flush();
2073
          return;
2074
        }
2075
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2076
        result.write(oprot);
2077
        oprot.writeMessageEnd();
2078
        oprot.getTransport().flush();
2079
      }
2080
 
2081
    }
2082
 
2083
    private class setUserAsLoggedOut implements ProcessFunction {
2084
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2085
      {
2086
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2087
        args.read(iprot);
2088
        iprot.readMessageEnd();
2089
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2090
        try {
2091
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2092
          result.setSuccessIsSet(true);
2093
        } catch (UserContextException ucx) {
2094
          result.ucx = ucx;
2095
        } catch (Throwable th) {
2096
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2097
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2098
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2099
          x.write(oprot);
2100
          oprot.writeMessageEnd();
2101
          oprot.getTransport().flush();
2102
          return;
2103
        }
2104
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2105
        result.write(oprot);
2106
        oprot.writeMessageEnd();
2107
        oprot.getTransport().flush();
2108
      }
2109
 
2110
    }
2111
 
506 rajveer 2112
    private class setDefaultAddress implements ProcessFunction {
2113
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2114
      {
2115
        setDefaultAddress_args args = new setDefaultAddress_args();
2116
        args.read(iprot);
2117
        iprot.readMessageEnd();
2118
        setDefaultAddress_result result = new setDefaultAddress_result();
2119
        try {
2120
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2121
          result.setSuccessIsSet(true);
2122
        } catch (UserContextException ucx) {
2123
          result.ucx = ucx;
2124
        } catch (Throwable th) {
2125
          LOGGER.error("Internal error processing setDefaultAddress", th);
2126
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2127
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2128
          x.write(oprot);
2129
          oprot.writeMessageEnd();
2130
          oprot.getTransport().flush();
2131
          return;
2132
        }
2133
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2134
        result.write(oprot);
2135
        oprot.writeMessageEnd();
2136
        oprot.getTransport().flush();
2137
      }
2138
 
2139
    }
2140
 
48 ashish 2141
    private class updatePassword implements ProcessFunction {
2142
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2143
      {
2144
        updatePassword_args args = new updatePassword_args();
2145
        args.read(iprot);
2146
        iprot.readMessageEnd();
2147
        updatePassword_result result = new updatePassword_result();
2148
        try {
593 rajveer 2149
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2150
          result.setSuccessIsSet(true);
2151
        } catch (UserContextException ucx) {
2152
          result.ucx = ucx;
2153
        } catch (Throwable th) {
2154
          LOGGER.error("Internal error processing updatePassword", th);
2155
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2156
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2157
          x.write(oprot);
2158
          oprot.writeMessageEnd();
2159
          oprot.getTransport().flush();
2160
          return;
2161
        }
2162
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2163
        result.write(oprot);
2164
        oprot.writeMessageEnd();
2165
        oprot.getTransport().flush();
2166
      }
2167
 
2168
    }
2169
 
582 rajveer 2170
    private class forgotPassword implements ProcessFunction {
2171
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2172
      {
2173
        forgotPassword_args args = new forgotPassword_args();
2174
        args.read(iprot);
2175
        iprot.readMessageEnd();
2176
        forgotPassword_result result = new forgotPassword_result();
2177
        try {
2178
          result.success = iface_.forgotPassword(args.email);
2179
          result.setSuccessIsSet(true);
2180
        } catch (UserContextException ucx) {
2181
          result.ucx = ucx;
2182
        } catch (Throwable th) {
2183
          LOGGER.error("Internal error processing forgotPassword", th);
2184
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2185
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2186
          x.write(oprot);
2187
          oprot.writeMessageEnd();
2188
          oprot.getTransport().flush();
2189
          return;
2190
        }
2191
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2192
        result.write(oprot);
2193
        oprot.writeMessageEnd();
2194
        oprot.getTransport().flush();
2195
      }
2196
 
2197
    }
2198
 
593 rajveer 2199
    private class getAllAddressesForUser implements ProcessFunction {
2200
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2201
      {
2202
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2203
        args.read(iprot);
2204
        iprot.readMessageEnd();
2205
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2206
        try {
2207
          result.success = iface_.getAllAddressesForUser(args.userId);
2208
        } catch (UserContextException ucx) {
2209
          result.ucx = ucx;
2210
        } catch (Throwable th) {
2211
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2212
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2213
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2214
          x.write(oprot);
2215
          oprot.writeMessageEnd();
2216
          oprot.getTransport().flush();
2217
          return;
2218
        }
2219
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2220
        result.write(oprot);
2221
        oprot.writeMessageEnd();
2222
        oprot.getTransport().flush();
2223
      }
2224
 
2225
    }
2226
 
2227
    private class getDefaultAddressId implements ProcessFunction {
2228
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2229
      {
2230
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2231
        args.read(iprot);
2232
        iprot.readMessageEnd();
2233
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2234
        try {
2235
          result.success = iface_.getDefaultAddressId(args.userId);
2236
          result.setSuccessIsSet(true);
2237
        } catch (UserContextException ucx) {
2238
          result.ucx = ucx;
2239
        } catch (Throwable th) {
2240
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2241
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2242
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2243
          x.write(oprot);
2244
          oprot.writeMessageEnd();
2245
          oprot.getTransport().flush();
2246
          return;
2247
        }
2248
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2249
        result.write(oprot);
2250
        oprot.writeMessageEnd();
2251
        oprot.getTransport().flush();
2252
      }
2253
 
2254
    }
2255
 
784 rajveer 2256
    private class getDefaultPincode implements ProcessFunction {
2257
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2258
      {
2259
        getDefaultPincode_args args = new getDefaultPincode_args();
2260
        args.read(iprot);
2261
        iprot.readMessageEnd();
2262
        getDefaultPincode_result result = new getDefaultPincode_result();
2263
        try {
2264
          result.success = iface_.getDefaultPincode(args.userId);
2265
        } catch (UserContextException ucx) {
2266
          result.ucx = ucx;
2267
        } catch (Throwable th) {
2268
          LOGGER.error("Internal error processing getDefaultPincode", th);
2269
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultPincode");
2270
          oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.EXCEPTION, seqid));
2271
          x.write(oprot);
2272
          oprot.writeMessageEnd();
2273
          oprot.getTransport().flush();
2274
          return;
2275
        }
2276
        oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.REPLY, seqid));
2277
        result.write(oprot);
2278
        oprot.writeMessageEnd();
2279
        oprot.getTransport().flush();
2280
      }
2281
 
2282
    }
2283
 
553 chandransh 2284
    private class createCart implements ProcessFunction {
48 ashish 2285
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2286
      {
553 chandransh 2287
        createCart_args args = new createCart_args();
48 ashish 2288
        args.read(iprot);
2289
        iprot.readMessageEnd();
553 chandransh 2290
        createCart_result result = new createCart_result();
48 ashish 2291
        try {
553 chandransh 2292
          result.success = iface_.createCart(args.userId);
48 ashish 2293
          result.setSuccessIsSet(true);
553 chandransh 2294
        } catch (ShoppingCartException scx) {
2295
          result.scx = scx;
48 ashish 2296
        } catch (Throwable th) {
553 chandransh 2297
          LOGGER.error("Internal error processing createCart", th);
2298
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2299
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2300
          x.write(oprot);
2301
          oprot.writeMessageEnd();
2302
          oprot.getTransport().flush();
2303
          return;
2304
        }
553 chandransh 2305
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2306
        result.write(oprot);
2307
        oprot.writeMessageEnd();
2308
        oprot.getTransport().flush();
2309
      }
2310
 
2311
    }
2312
 
553 chandransh 2313
    private class getCurrentCart implements ProcessFunction {
48 ashish 2314
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2315
      {
553 chandransh 2316
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2317
        args.read(iprot);
2318
        iprot.readMessageEnd();
553 chandransh 2319
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2320
        try {
553 chandransh 2321
          result.success = iface_.getCurrentCart(args.userId);
2322
        } catch (ShoppingCartException scx) {
2323
          result.scx = scx;
48 ashish 2324
        } catch (Throwable th) {
553 chandransh 2325
          LOGGER.error("Internal error processing getCurrentCart", th);
2326
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2327
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2328
          x.write(oprot);
2329
          oprot.writeMessageEnd();
2330
          oprot.getTransport().flush();
2331
          return;
2332
        }
553 chandransh 2333
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2334
        result.write(oprot);
2335
        oprot.writeMessageEnd();
2336
        oprot.getTransport().flush();
2337
      }
2338
 
2339
    }
2340
 
553 chandransh 2341
    private class getCart implements ProcessFunction {
48 ashish 2342
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2343
      {
553 chandransh 2344
        getCart_args args = new getCart_args();
48 ashish 2345
        args.read(iprot);
2346
        iprot.readMessageEnd();
553 chandransh 2347
        getCart_result result = new getCart_result();
48 ashish 2348
        try {
553 chandransh 2349
          result.success = iface_.getCart(args.cartId);
2350
        } catch (ShoppingCartException scx) {
2351
          result.scx = scx;
48 ashish 2352
        } catch (Throwable th) {
553 chandransh 2353
          LOGGER.error("Internal error processing getCart", th);
2354
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2355
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2356
          x.write(oprot);
2357
          oprot.writeMessageEnd();
2358
          oprot.getTransport().flush();
2359
          return;
2360
        }
553 chandransh 2361
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2362
        result.write(oprot);
2363
        oprot.writeMessageEnd();
2364
        oprot.getTransport().flush();
2365
      }
2366
 
2367
    }
2368
 
553 chandransh 2369
    private class getCartsForUser implements ProcessFunction {
48 ashish 2370
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2371
      {
553 chandransh 2372
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2373
        args.read(iprot);
2374
        iprot.readMessageEnd();
553 chandransh 2375
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2376
        try {
553 chandransh 2377
          result.success = iface_.getCartsForUser(args.userId, args.status);
2378
        } catch (ShoppingCartException scx) {
2379
          result.scx = scx;
48 ashish 2380
        } catch (Throwable th) {
553 chandransh 2381
          LOGGER.error("Internal error processing getCartsForUser", th);
2382
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2383
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2384
          x.write(oprot);
2385
          oprot.writeMessageEnd();
2386
          oprot.getTransport().flush();
2387
          return;
2388
        }
553 chandransh 2389
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2390
        result.write(oprot);
2391
        oprot.writeMessageEnd();
2392
        oprot.getTransport().flush();
2393
      }
2394
 
2395
    }
2396
 
553 chandransh 2397
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2398
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2399
      {
553 chandransh 2400
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2401
        args.read(iprot);
2402
        iprot.readMessageEnd();
553 chandransh 2403
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2404
        try {
553 chandransh 2405
          result.success = iface_.getCartsByStatus(args.status);
2406
        } catch (ShoppingCartException scx) {
2407
          result.scx = scx;
48 ashish 2408
        } catch (Throwable th) {
553 chandransh 2409
          LOGGER.error("Internal error processing getCartsByStatus", th);
2410
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2411
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2412
          x.write(oprot);
2413
          oprot.writeMessageEnd();
2414
          oprot.getTransport().flush();
2415
          return;
2416
        }
553 chandransh 2417
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2418
        result.write(oprot);
2419
        oprot.writeMessageEnd();
2420
        oprot.getTransport().flush();
2421
      }
2422
 
2423
    }
2424
 
553 chandransh 2425
    private class getCartsByTime implements ProcessFunction {
48 ashish 2426
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2427
      {
553 chandransh 2428
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2429
        args.read(iprot);
2430
        iprot.readMessageEnd();
553 chandransh 2431
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2432
        try {
553 chandransh 2433
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2434
        } catch (ShoppingCartException scx) {
2435
          result.scx = scx;
48 ashish 2436
        } catch (Throwable th) {
553 chandransh 2437
          LOGGER.error("Internal error processing getCartsByTime", th);
2438
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2439
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2440
          x.write(oprot);
2441
          oprot.writeMessageEnd();
2442
          oprot.getTransport().flush();
2443
          return;
2444
        }
553 chandransh 2445
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2446
        result.write(oprot);
2447
        oprot.writeMessageEnd();
2448
        oprot.getTransport().flush();
2449
      }
2450
 
2451
    }
2452
 
553 chandransh 2453
    private class changeCartStatus implements ProcessFunction {
130 ashish 2454
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2455
      {
553 chandransh 2456
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2457
        args.read(iprot);
2458
        iprot.readMessageEnd();
553 chandransh 2459
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2460
        try {
553 chandransh 2461
          iface_.changeCartStatus(args.cartId, args.status);
2462
        } catch (ShoppingCartException scx) {
2463
          result.scx = scx;
2464
        } catch (Throwable th) {
2465
          LOGGER.error("Internal error processing changeCartStatus", th);
2466
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2467
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2468
          x.write(oprot);
2469
          oprot.writeMessageEnd();
2470
          oprot.getTransport().flush();
2471
          return;
2472
        }
2473
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2474
        result.write(oprot);
2475
        oprot.writeMessageEnd();
2476
        oprot.getTransport().flush();
2477
      }
2478
 
2479
    }
2480
 
2481
    private class addItemToCart implements ProcessFunction {
2482
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2483
      {
2484
        addItemToCart_args args = new addItemToCart_args();
2485
        args.read(iprot);
2486
        iprot.readMessageEnd();
2487
        addItemToCart_result result = new addItemToCart_result();
2488
        try {
2489
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2490
        } catch (ShoppingCartException scx) {
2491
          result.scx = scx;
2492
        } catch (Throwable th) {
2493
          LOGGER.error("Internal error processing addItemToCart", th);
2494
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2495
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2496
          x.write(oprot);
2497
          oprot.writeMessageEnd();
2498
          oprot.getTransport().flush();
2499
          return;
2500
        }
2501
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2502
        result.write(oprot);
2503
        oprot.writeMessageEnd();
2504
        oprot.getTransport().flush();
2505
      }
2506
 
2507
    }
2508
 
2509
    private class deleteItemFromCart implements ProcessFunction {
2510
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2511
      {
2512
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2513
        args.read(iprot);
2514
        iprot.readMessageEnd();
2515
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2516
        try {
2517
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2518
        } catch (ShoppingCartException scx) {
2519
          result.scx = scx;
2520
        } catch (Throwable th) {
2521
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2522
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2523
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2524
          x.write(oprot);
2525
          oprot.writeMessageEnd();
2526
          oprot.getTransport().flush();
2527
          return;
2528
        }
2529
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2530
        result.write(oprot);
2531
        oprot.writeMessageEnd();
2532
        oprot.getTransport().flush();
2533
      }
2534
 
2535
    }
2536
 
2537
    private class changeQuantity implements ProcessFunction {
2538
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2539
      {
2540
        changeQuantity_args args = new changeQuantity_args();
2541
        args.read(iprot);
2542
        iprot.readMessageEnd();
2543
        changeQuantity_result result = new changeQuantity_result();
2544
        try {
2545
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2546
        } catch (ShoppingCartException scx) {
2547
          result.scx = scx;
2548
        } catch (Throwable th) {
2549
          LOGGER.error("Internal error processing changeQuantity", th);
2550
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2551
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2552
          x.write(oprot);
2553
          oprot.writeMessageEnd();
2554
          oprot.getTransport().flush();
2555
          return;
2556
        }
2557
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2558
        result.write(oprot);
2559
        oprot.writeMessageEnd();
2560
        oprot.getTransport().flush();
2561
      }
2562
 
2563
    }
2564
 
2565
    private class changeItemStatus implements ProcessFunction {
2566
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2567
      {
2568
        changeItemStatus_args args = new changeItemStatus_args();
2569
        args.read(iprot);
2570
        iprot.readMessageEnd();
2571
        changeItemStatus_result result = new changeItemStatus_result();
2572
        try {
2573
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2574
        } catch (ShoppingCartException scx) {
2575
          result.scx = scx;
2576
        } catch (Throwable th) {
2577
          LOGGER.error("Internal error processing changeItemStatus", th);
2578
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2579
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2580
          x.write(oprot);
2581
          oprot.writeMessageEnd();
2582
          oprot.getTransport().flush();
2583
          return;
2584
        }
2585
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2586
        result.write(oprot);
2587
        oprot.writeMessageEnd();
2588
        oprot.getTransport().flush();
2589
      }
2590
 
2591
    }
2592
 
2593
    private class addAddressToCart implements ProcessFunction {
2594
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2595
      {
2596
        addAddressToCart_args args = new addAddressToCart_args();
2597
        args.read(iprot);
2598
        iprot.readMessageEnd();
2599
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2600
        try {
2601
          iface_.addAddressToCart(args.cartId, args.addressId);
2602
        } catch (ShoppingCartException scx) {
2603
          result.scx = scx;
2604
        } catch (Throwable th) {
2605
          LOGGER.error("Internal error processing addAddressToCart", th);
2606
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2607
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2608
          x.write(oprot);
2609
          oprot.writeMessageEnd();
2610
          oprot.getTransport().flush();
2611
          return;
2612
        }
553 chandransh 2613
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2614
        result.write(oprot);
2615
        oprot.writeMessageEnd();
2616
        oprot.getTransport().flush();
2617
      }
2618
 
2619
    }
2620
 
688 chandransh 2621
    private class createOrders implements ProcessFunction {
553 chandransh 2622
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2623
      {
688 chandransh 2624
        createOrders_args args = new createOrders_args();
553 chandransh 2625
        args.read(iprot);
2626
        iprot.readMessageEnd();
688 chandransh 2627
        createOrders_result result = new createOrders_result();
553 chandransh 2628
        try {
688 chandransh 2629
          result.success = iface_.createOrders(args.cartId);
130 ashish 2630
          result.setSuccessIsSet(true);
553 chandransh 2631
        } catch (ShoppingCartException scx) {
2632
          result.scx = scx;
130 ashish 2633
        } catch (Throwable th) {
688 chandransh 2634
          LOGGER.error("Internal error processing createOrders", th);
2635
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
2636
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
130 ashish 2637
          x.write(oprot);
2638
          oprot.writeMessageEnd();
2639
          oprot.getTransport().flush();
2640
          return;
2641
        }
688 chandransh 2642
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
130 ashish 2643
        result.write(oprot);
2644
        oprot.writeMessageEnd();
2645
        oprot.getTransport().flush();
2646
      }
2647
 
2648
    }
2649
 
553 chandransh 2650
    private class validateCart implements ProcessFunction {
130 ashish 2651
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2652
      {
553 chandransh 2653
        validateCart_args args = new validateCart_args();
130 ashish 2654
        args.read(iprot);
2655
        iprot.readMessageEnd();
553 chandransh 2656
        validateCart_result result = new validateCart_result();
578 chandransh 2657
        try {
2658
          result.success = iface_.validateCart(args.cartId);
2659
          result.setSuccessIsSet(true);
2660
        } catch (ShoppingCartException scex) {
2661
          result.scex = scex;
2662
        } catch (Throwable th) {
2663
          LOGGER.error("Internal error processing validateCart", th);
2664
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2665
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2666
          x.write(oprot);
2667
          oprot.writeMessageEnd();
2668
          oprot.getTransport().flush();
2669
          return;
2670
        }
553 chandransh 2671
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2672
        result.write(oprot);
2673
        oprot.writeMessageEnd();
2674
        oprot.getTransport().flush();
2675
      }
2676
 
2677
    }
2678
 
688 chandransh 2679
    private class mergeCart implements ProcessFunction {
578 chandransh 2680
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2681
      {
688 chandransh 2682
        mergeCart_args args = new mergeCart_args();
578 chandransh 2683
        args.read(iprot);
2684
        iprot.readMessageEnd();
688 chandransh 2685
        mergeCart_result result = new mergeCart_result();
2686
        iface_.mergeCart(args.fromCartId, args.toCartId);
2687
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2688
        result.write(oprot);
2689
        oprot.writeMessageEnd();
2690
        oprot.getTransport().flush();
2691
      }
2692
 
2693
    }
2694
 
2695
    private class checkOut implements ProcessFunction {
2696
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2697
      {
2698
        checkOut_args args = new checkOut_args();
2699
        args.read(iprot);
2700
        iprot.readMessageEnd();
2701
        checkOut_result result = new checkOut_result();
578 chandransh 2702
        try {
688 chandransh 2703
          result.success = iface_.checkOut(args.cartId);
578 chandransh 2704
          result.setSuccessIsSet(true);
2705
        } catch (ShoppingCartException scex) {
2706
          result.scex = scex;
2707
        } catch (Throwable th) {
688 chandransh 2708
          LOGGER.error("Internal error processing checkOut", th);
2709
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
2710
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 2711
          x.write(oprot);
2712
          oprot.writeMessageEnd();
2713
          oprot.getTransport().flush();
2714
          return;
2715
        }
688 chandransh 2716
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 2717
        result.write(oprot);
2718
        oprot.writeMessageEnd();
2719
        oprot.getTransport().flush();
2720
      }
2721
 
2722
    }
2723
 
688 chandransh 2724
    private class resetCart implements ProcessFunction {
553 chandransh 2725
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2726
      {
688 chandransh 2727
        resetCart_args args = new resetCart_args();
553 chandransh 2728
        args.read(iprot);
2729
        iprot.readMessageEnd();
688 chandransh 2730
        resetCart_result result = new resetCart_result();
2731
        try {
2732
          result.success = iface_.resetCart(args.cartId, args.items);
2733
          result.setSuccessIsSet(true);
2734
        } catch (ShoppingCartException scex) {
2735
          result.scex = scex;
2736
        } catch (Throwable th) {
2737
          LOGGER.error("Internal error processing resetCart", th);
2738
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
2739
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
2740
          x.write(oprot);
2741
          oprot.writeMessageEnd();
2742
          oprot.getTransport().flush();
2743
          return;
2744
        }
2745
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 2746
        result.write(oprot);
2747
        oprot.writeMessageEnd();
2748
        oprot.getTransport().flush();
2749
      }
2750
 
2751
    }
2752
 
2753
    private class getMyResearch implements ProcessFunction {
2754
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2755
      {
2756
        getMyResearch_args args = new getMyResearch_args();
2757
        args.read(iprot);
2758
        iprot.readMessageEnd();
2759
        getMyResearch_result result = new getMyResearch_result();
2760
        try {
771 rajveer 2761
          result.success = iface_.getMyResearch(args.userId);
553 chandransh 2762
        } catch (WidgetException scx) {
2763
          result.scx = scx;
2764
        } catch (Throwable th) {
2765
          LOGGER.error("Internal error processing getMyResearch", th);
2766
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2767
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2768
          x.write(oprot);
2769
          oprot.writeMessageEnd();
2770
          oprot.getTransport().flush();
2771
          return;
2772
        }
2773
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2774
        result.write(oprot);
2775
        oprot.writeMessageEnd();
2776
        oprot.getTransport().flush();
2777
      }
2778
 
2779
    }
2780
 
2781
    private class updateMyResearch implements ProcessFunction {
2782
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2783
      {
2784
        updateMyResearch_args args = new updateMyResearch_args();
2785
        args.read(iprot);
2786
        iprot.readMessageEnd();
2787
        updateMyResearch_result result = new updateMyResearch_result();
2788
        try {
771 rajveer 2789
          result.success = iface_.updateMyResearch(args.userId, args.itemId);
130 ashish 2790
          result.setSuccessIsSet(true);
553 chandransh 2791
        } catch (WidgetException scx) {
2792
          result.scx = scx;
130 ashish 2793
        } catch (Throwable th) {
553 chandransh 2794
          LOGGER.error("Internal error processing updateMyResearch", th);
2795
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
2796
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 2797
          x.write(oprot);
2798
          oprot.writeMessageEnd();
2799
          oprot.getTransport().flush();
2800
          return;
2801
        }
553 chandransh 2802
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 2803
        result.write(oprot);
2804
        oprot.writeMessageEnd();
2805
        oprot.getTransport().flush();
2806
      }
2807
 
2808
    }
2809
 
553 chandransh 2810
    private class deleteItemFromMyResearch implements ProcessFunction {
2811
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2812
      {
2813
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
2814
        args.read(iprot);
2815
        iprot.readMessageEnd();
2816
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
2817
        try {
771 rajveer 2818
          iface_.deleteItemFromMyResearch(args.userId, args.itemId);
553 chandransh 2819
        } catch (WidgetException scx) {
2820
          result.scx = scx;
2821
        } catch (Throwable th) {
2822
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
2823
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
2824
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
2825
          x.write(oprot);
2826
          oprot.writeMessageEnd();
2827
          oprot.getTransport().flush();
2828
          return;
2829
        }
2830
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
2831
        result.write(oprot);
2832
        oprot.writeMessageEnd();
2833
        oprot.getTransport().flush();
2834
      }
2835
 
2836
    }
2837
 
771 rajveer 2838
    private class updateBrowseHistory implements ProcessFunction {
553 chandransh 2839
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2840
      {
771 rajveer 2841
        updateBrowseHistory_args args = new updateBrowseHistory_args();
553 chandransh 2842
        args.read(iprot);
2843
        iprot.readMessageEnd();
771 rajveer 2844
        updateBrowseHistory_result result = new updateBrowseHistory_result();
2845
        iface_.updateBrowseHistory(args.userId, args.itemId);
2846
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2847
        result.write(oprot);
2848
        oprot.writeMessageEnd();
2849
        oprot.getTransport().flush();
2850
      }
2851
 
2852
    }
2853
 
771 rajveer 2854
    private class getBrowseHistory implements ProcessFunction {
553 chandransh 2855
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2856
      {
771 rajveer 2857
        getBrowseHistory_args args = new getBrowseHistory_args();
553 chandransh 2858
        args.read(iprot);
2859
        iprot.readMessageEnd();
771 rajveer 2860
        getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 2861
        try {
771 rajveer 2862
          result.success = iface_.getBrowseHistory(args.userId);
553 chandransh 2863
        } catch (WidgetException scx) {
2864
          result.scx = scx;
2865
        } catch (Throwable th) {
771 rajveer 2866
          LOGGER.error("Internal error processing getBrowseHistory", th);
2867
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
2868
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
553 chandransh 2869
          x.write(oprot);
2870
          oprot.writeMessageEnd();
2871
          oprot.getTransport().flush();
2872
          return;
2873
        }
771 rajveer 2874
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2875
        result.write(oprot);
2876
        oprot.writeMessageEnd();
2877
        oprot.getTransport().flush();
2878
      }
2879
 
2880
    }
2881
 
771 rajveer 2882
    private class mergeBrowseHistory implements ProcessFunction {
553 chandransh 2883
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2884
      {
771 rajveer 2885
        mergeBrowseHistory_args args = new mergeBrowseHistory_args();
553 chandransh 2886
        args.read(iprot);
2887
        iprot.readMessageEnd();
771 rajveer 2888
        mergeBrowseHistory_result result = new mergeBrowseHistory_result();
2889
        iface_.mergeBrowseHistory(args.fromUserId, args.toUserId);
2890
        oprot.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2891
        result.write(oprot);
2892
        oprot.writeMessageEnd();
2893
        oprot.getTransport().flush();
2894
      }
2895
 
2896
    }
2897
 
48 ashish 2898
  }
2899
 
764 rajveer 2900
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2901
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2902
 
2903
 
2904
 
2905
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2906
    public enum _Fields implements TFieldIdEnum {
2907
;
2908
 
2909
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2910
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2911
 
2912
      static {
2913
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2914
          byId.put((int)field._thriftId, field);
2915
          byName.put(field.getFieldName(), field);
2916
        }
2917
      }
2918
 
2919
      /**
2920
       * Find the _Fields constant that matches fieldId, or null if its not found.
2921
       */
2922
      public static _Fields findByThriftId(int fieldId) {
2923
        return byId.get(fieldId);
2924
      }
2925
 
2926
      /**
2927
       * Find the _Fields constant that matches fieldId, throwing an exception
2928
       * if it is not found.
2929
       */
2930
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2931
        _Fields fields = findByThriftId(fieldId);
2932
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2933
        return fields;
2934
      }
2935
 
2936
      /**
2937
       * Find the _Fields constant that matches name, or null if its not found.
2938
       */
2939
      public static _Fields findByName(String name) {
2940
        return byName.get(name);
2941
      }
2942
 
2943
      private final short _thriftId;
2944
      private final String _fieldName;
2945
 
2946
      _Fields(short thriftId, String fieldName) {
2947
        _thriftId = thriftId;
2948
        _fieldName = fieldName;
2949
      }
2950
 
2951
      public short getThriftFieldId() {
2952
        return _thriftId;
2953
      }
2954
 
2955
      public String getFieldName() {
2956
        return _fieldName;
2957
      }
2958
    }
2959
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2960
    }});
2961
 
2962
    static {
2963
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2964
    }
2965
 
2966
    public closeSession_args() {
2967
    }
2968
 
2969
    /**
2970
     * Performs a deep copy on <i>other</i>.
2971
     */
2972
    public closeSession_args(closeSession_args other) {
2973
    }
2974
 
2975
    public closeSession_args deepCopy() {
2976
      return new closeSession_args(this);
2977
    }
2978
 
2979
    @Deprecated
2980
    public closeSession_args clone() {
2981
      return new closeSession_args(this);
2982
    }
2983
 
2984
    public void setFieldValue(_Fields field, Object value) {
2985
      switch (field) {
2986
      }
2987
    }
2988
 
2989
    public void setFieldValue(int fieldID, Object value) {
2990
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2991
    }
2992
 
2993
    public Object getFieldValue(_Fields field) {
2994
      switch (field) {
2995
      }
2996
      throw new IllegalStateException();
2997
    }
2998
 
2999
    public Object getFieldValue(int fieldId) {
3000
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3001
    }
3002
 
3003
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3004
    public boolean isSet(_Fields field) {
3005
      switch (field) {
3006
      }
3007
      throw new IllegalStateException();
3008
    }
3009
 
3010
    public boolean isSet(int fieldID) {
3011
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3012
    }
3013
 
3014
    @Override
3015
    public boolean equals(Object that) {
3016
      if (that == null)
3017
        return false;
3018
      if (that instanceof closeSession_args)
3019
        return this.equals((closeSession_args)that);
3020
      return false;
3021
    }
3022
 
3023
    public boolean equals(closeSession_args that) {
3024
      if (that == null)
3025
        return false;
3026
 
3027
      return true;
3028
    }
3029
 
3030
    @Override
3031
    public int hashCode() {
3032
      return 0;
3033
    }
3034
 
3035
    public int compareTo(closeSession_args other) {
3036
      if (!getClass().equals(other.getClass())) {
3037
        return getClass().getName().compareTo(other.getClass().getName());
3038
      }
3039
 
3040
      int lastComparison = 0;
3041
      closeSession_args typedOther = (closeSession_args)other;
3042
 
3043
      return 0;
3044
    }
3045
 
3046
    public void read(TProtocol iprot) throws TException {
3047
      TField field;
3048
      iprot.readStructBegin();
3049
      while (true)
3050
      {
3051
        field = iprot.readFieldBegin();
3052
        if (field.type == TType.STOP) { 
3053
          break;
3054
        }
3055
        _Fields fieldId = _Fields.findByThriftId(field.id);
3056
        if (fieldId == null) {
3057
          TProtocolUtil.skip(iprot, field.type);
3058
        } else {
3059
          switch (fieldId) {
3060
          }
3061
          iprot.readFieldEnd();
3062
        }
3063
      }
3064
      iprot.readStructEnd();
3065
      validate();
3066
    }
3067
 
3068
    public void write(TProtocol oprot) throws TException {
3069
      validate();
3070
 
3071
      oprot.writeStructBegin(STRUCT_DESC);
3072
      oprot.writeFieldStop();
3073
      oprot.writeStructEnd();
3074
    }
3075
 
3076
    @Override
3077
    public String toString() {
3078
      StringBuilder sb = new StringBuilder("closeSession_args(");
3079
      boolean first = true;
3080
 
3081
      sb.append(")");
3082
      return sb.toString();
3083
    }
3084
 
3085
    public void validate() throws TException {
3086
      // check for required fields
3087
    }
3088
 
3089
  }
3090
 
3091
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3092
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3093
 
3094
 
3095
 
3096
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3097
    public enum _Fields implements TFieldIdEnum {
3098
;
3099
 
3100
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3101
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3102
 
3103
      static {
3104
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3105
          byId.put((int)field._thriftId, field);
3106
          byName.put(field.getFieldName(), field);
3107
        }
3108
      }
3109
 
3110
      /**
3111
       * Find the _Fields constant that matches fieldId, or null if its not found.
3112
       */
3113
      public static _Fields findByThriftId(int fieldId) {
3114
        return byId.get(fieldId);
3115
      }
3116
 
3117
      /**
3118
       * Find the _Fields constant that matches fieldId, throwing an exception
3119
       * if it is not found.
3120
       */
3121
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3122
        _Fields fields = findByThriftId(fieldId);
3123
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3124
        return fields;
3125
      }
3126
 
3127
      /**
3128
       * Find the _Fields constant that matches name, or null if its not found.
3129
       */
3130
      public static _Fields findByName(String name) {
3131
        return byName.get(name);
3132
      }
3133
 
3134
      private final short _thriftId;
3135
      private final String _fieldName;
3136
 
3137
      _Fields(short thriftId, String fieldName) {
3138
        _thriftId = thriftId;
3139
        _fieldName = fieldName;
3140
      }
3141
 
3142
      public short getThriftFieldId() {
3143
        return _thriftId;
3144
      }
3145
 
3146
      public String getFieldName() {
3147
        return _fieldName;
3148
      }
3149
    }
3150
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3151
    }});
3152
 
3153
    static {
3154
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3155
    }
3156
 
3157
    public closeSession_result() {
3158
    }
3159
 
3160
    /**
3161
     * Performs a deep copy on <i>other</i>.
3162
     */
3163
    public closeSession_result(closeSession_result other) {
3164
    }
3165
 
3166
    public closeSession_result deepCopy() {
3167
      return new closeSession_result(this);
3168
    }
3169
 
3170
    @Deprecated
3171
    public closeSession_result clone() {
3172
      return new closeSession_result(this);
3173
    }
3174
 
3175
    public void setFieldValue(_Fields field, Object value) {
3176
      switch (field) {
3177
      }
3178
    }
3179
 
3180
    public void setFieldValue(int fieldID, Object value) {
3181
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3182
    }
3183
 
3184
    public Object getFieldValue(_Fields field) {
3185
      switch (field) {
3186
      }
3187
      throw new IllegalStateException();
3188
    }
3189
 
3190
    public Object getFieldValue(int fieldId) {
3191
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3192
    }
3193
 
3194
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3195
    public boolean isSet(_Fields field) {
3196
      switch (field) {
3197
      }
3198
      throw new IllegalStateException();
3199
    }
3200
 
3201
    public boolean isSet(int fieldID) {
3202
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3203
    }
3204
 
3205
    @Override
3206
    public boolean equals(Object that) {
3207
      if (that == null)
3208
        return false;
3209
      if (that instanceof closeSession_result)
3210
        return this.equals((closeSession_result)that);
3211
      return false;
3212
    }
3213
 
3214
    public boolean equals(closeSession_result that) {
3215
      if (that == null)
3216
        return false;
3217
 
3218
      return true;
3219
    }
3220
 
3221
    @Override
3222
    public int hashCode() {
3223
      return 0;
3224
    }
3225
 
3226
    public int compareTo(closeSession_result other) {
3227
      if (!getClass().equals(other.getClass())) {
3228
        return getClass().getName().compareTo(other.getClass().getName());
3229
      }
3230
 
3231
      int lastComparison = 0;
3232
      closeSession_result typedOther = (closeSession_result)other;
3233
 
3234
      return 0;
3235
    }
3236
 
3237
    public void read(TProtocol iprot) throws TException {
3238
      TField field;
3239
      iprot.readStructBegin();
3240
      while (true)
3241
      {
3242
        field = iprot.readFieldBegin();
3243
        if (field.type == TType.STOP) { 
3244
          break;
3245
        }
3246
        _Fields fieldId = _Fields.findByThriftId(field.id);
3247
        if (fieldId == null) {
3248
          TProtocolUtil.skip(iprot, field.type);
3249
        } else {
3250
          switch (fieldId) {
3251
          }
3252
          iprot.readFieldEnd();
3253
        }
3254
      }
3255
      iprot.readStructEnd();
3256
      validate();
3257
    }
3258
 
3259
    public void write(TProtocol oprot) throws TException {
3260
      oprot.writeStructBegin(STRUCT_DESC);
3261
 
3262
      oprot.writeFieldStop();
3263
      oprot.writeStructEnd();
3264
    }
3265
 
3266
    @Override
3267
    public String toString() {
3268
      StringBuilder sb = new StringBuilder("closeSession_result(");
3269
      boolean first = true;
3270
 
3271
      sb.append(")");
3272
      return sb.toString();
3273
    }
3274
 
3275
    public void validate() throws TException {
3276
      // check for required fields
3277
    }
3278
 
3279
  }
3280
 
553 chandransh 3281
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3282
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3283
 
553 chandransh 3284
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3285
 
553 chandransh 3286
    private String jsessionId;
48 ashish 3287
 
3288
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3289
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3290
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3291
 
3292
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3293
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3294
 
3295
      static {
3296
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3297
          byId.put((int)field._thriftId, field);
3298
          byName.put(field.getFieldName(), field);
3299
        }
3300
      }
3301
 
3302
      /**
3303
       * Find the _Fields constant that matches fieldId, or null if its not found.
3304
       */
3305
      public static _Fields findByThriftId(int fieldId) {
3306
        return byId.get(fieldId);
3307
      }
3308
 
3309
      /**
3310
       * Find the _Fields constant that matches fieldId, throwing an exception
3311
       * if it is not found.
3312
       */
3313
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3314
        _Fields fields = findByThriftId(fieldId);
3315
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3316
        return fields;
3317
      }
3318
 
3319
      /**
3320
       * Find the _Fields constant that matches name, or null if its not found.
3321
       */
3322
      public static _Fields findByName(String name) {
3323
        return byName.get(name);
3324
      }
3325
 
3326
      private final short _thriftId;
3327
      private final String _fieldName;
3328
 
3329
      _Fields(short thriftId, String fieldName) {
3330
        _thriftId = thriftId;
3331
        _fieldName = fieldName;
3332
      }
3333
 
3334
      public short getThriftFieldId() {
3335
        return _thriftId;
3336
      }
3337
 
3338
      public String getFieldName() {
3339
        return _fieldName;
3340
      }
3341
    }
3342
 
3343
    // isset id assignments
3344
 
3345
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3346
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3347
          new FieldValueMetaData(TType.STRING)));
48 ashish 3348
    }});
3349
 
3350
    static {
553 chandransh 3351
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3352
    }
3353
 
553 chandransh 3354
    public createAnonymousUser_args() {
48 ashish 3355
    }
3356
 
553 chandransh 3357
    public createAnonymousUser_args(
3358
      String jsessionId)
48 ashish 3359
    {
3360
      this();
553 chandransh 3361
      this.jsessionId = jsessionId;
48 ashish 3362
    }
3363
 
3364
    /**
3365
     * Performs a deep copy on <i>other</i>.
3366
     */
553 chandransh 3367
    public createAnonymousUser_args(createAnonymousUser_args other) {
3368
      if (other.isSetJsessionId()) {
3369
        this.jsessionId = other.jsessionId;
48 ashish 3370
      }
3371
    }
3372
 
553 chandransh 3373
    public createAnonymousUser_args deepCopy() {
3374
      return new createAnonymousUser_args(this);
48 ashish 3375
    }
3376
 
3377
    @Deprecated
553 chandransh 3378
    public createAnonymousUser_args clone() {
3379
      return new createAnonymousUser_args(this);
48 ashish 3380
    }
3381
 
553 chandransh 3382
    public String getJsessionId() {
3383
      return this.jsessionId;
48 ashish 3384
    }
3385
 
553 chandransh 3386
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3387
      this.jsessionId = jsessionId;
48 ashish 3388
      return this;
3389
    }
3390
 
553 chandransh 3391
    public void unsetJsessionId() {
3392
      this.jsessionId = null;
48 ashish 3393
    }
3394
 
553 chandransh 3395
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3396
    public boolean isSetJsessionId() {
3397
      return this.jsessionId != null;
48 ashish 3398
    }
3399
 
553 chandransh 3400
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3401
      if (!value) {
553 chandransh 3402
        this.jsessionId = null;
48 ashish 3403
      }
3404
    }
3405
 
3406
    public void setFieldValue(_Fields field, Object value) {
3407
      switch (field) {
553 chandransh 3408
      case JSESSION_ID:
48 ashish 3409
        if (value == null) {
553 chandransh 3410
          unsetJsessionId();
48 ashish 3411
        } else {
553 chandransh 3412
          setJsessionId((String)value);
48 ashish 3413
        }
3414
        break;
3415
 
3416
      }
3417
    }
3418
 
3419
    public void setFieldValue(int fieldID, Object value) {
3420
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3421
    }
3422
 
3423
    public Object getFieldValue(_Fields field) {
3424
      switch (field) {
553 chandransh 3425
      case JSESSION_ID:
3426
        return getJsessionId();
48 ashish 3427
 
3428
      }
3429
      throw new IllegalStateException();
3430
    }
3431
 
3432
    public Object getFieldValue(int fieldId) {
3433
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3434
    }
3435
 
3436
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3437
    public boolean isSet(_Fields field) {
3438
      switch (field) {
553 chandransh 3439
      case JSESSION_ID:
3440
        return isSetJsessionId();
48 ashish 3441
      }
3442
      throw new IllegalStateException();
3443
    }
3444
 
3445
    public boolean isSet(int fieldID) {
3446
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3447
    }
3448
 
3449
    @Override
3450
    public boolean equals(Object that) {
3451
      if (that == null)
3452
        return false;
553 chandransh 3453
      if (that instanceof createAnonymousUser_args)
3454
        return this.equals((createAnonymousUser_args)that);
48 ashish 3455
      return false;
3456
    }
3457
 
553 chandransh 3458
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3459
      if (that == null)
3460
        return false;
3461
 
553 chandransh 3462
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3463
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3464
      if (this_present_jsessionId || that_present_jsessionId) {
3465
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3466
          return false;
553 chandransh 3467
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3468
          return false;
3469
      }
3470
 
3471
      return true;
3472
    }
3473
 
3474
    @Override
3475
    public int hashCode() {
3476
      return 0;
3477
    }
3478
 
553 chandransh 3479
    public int compareTo(createAnonymousUser_args other) {
3480
      if (!getClass().equals(other.getClass())) {
3481
        return getClass().getName().compareTo(other.getClass().getName());
3482
      }
3483
 
3484
      int lastComparison = 0;
3485
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3486
 
3487
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3488
      if (lastComparison != 0) {
3489
        return lastComparison;
3490
      }
3491
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3492
      if (lastComparison != 0) {
3493
        return lastComparison;
3494
      }
3495
      return 0;
3496
    }
3497
 
48 ashish 3498
    public void read(TProtocol iprot) throws TException {
3499
      TField field;
3500
      iprot.readStructBegin();
3501
      while (true)
3502
      {
3503
        field = iprot.readFieldBegin();
3504
        if (field.type == TType.STOP) { 
3505
          break;
3506
        }
3507
        _Fields fieldId = _Fields.findByThriftId(field.id);
3508
        if (fieldId == null) {
3509
          TProtocolUtil.skip(iprot, field.type);
3510
        } else {
3511
          switch (fieldId) {
553 chandransh 3512
            case JSESSION_ID:
3513
              if (field.type == TType.STRING) {
3514
                this.jsessionId = iprot.readString();
48 ashish 3515
              } else { 
3516
                TProtocolUtil.skip(iprot, field.type);
3517
              }
3518
              break;
3519
          }
3520
          iprot.readFieldEnd();
3521
        }
3522
      }
3523
      iprot.readStructEnd();
3524
      validate();
3525
    }
3526
 
3527
    public void write(TProtocol oprot) throws TException {
3528
      validate();
3529
 
3530
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3531
      if (this.jsessionId != null) {
3532
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3533
        oprot.writeString(this.jsessionId);
48 ashish 3534
        oprot.writeFieldEnd();
3535
      }
3536
      oprot.writeFieldStop();
3537
      oprot.writeStructEnd();
3538
    }
3539
 
3540
    @Override
3541
    public String toString() {
553 chandransh 3542
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3543
      boolean first = true;
3544
 
553 chandransh 3545
      sb.append("jsessionId:");
3546
      if (this.jsessionId == null) {
48 ashish 3547
        sb.append("null");
3548
      } else {
553 chandransh 3549
        sb.append(this.jsessionId);
48 ashish 3550
      }
3551
      first = false;
3552
      sb.append(")");
3553
      return sb.toString();
3554
    }
3555
 
3556
    public void validate() throws TException {
3557
      // check for required fields
3558
    }
3559
 
3560
  }
3561
 
571 rajveer 3562
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3563
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3564
 
3565
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3566
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3567
 
553 chandransh 3568
    private User success;
3569
    private UserContextException ucex;
48 ashish 3570
 
3571
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3572
    public enum _Fields implements TFieldIdEnum {
3573
      SUCCESS((short)0, "success"),
553 chandransh 3574
      UCEX((short)1, "ucex");
48 ashish 3575
 
3576
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3577
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3578
 
3579
      static {
3580
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3581
          byId.put((int)field._thriftId, field);
3582
          byName.put(field.getFieldName(), field);
3583
        }
3584
      }
3585
 
3586
      /**
3587
       * Find the _Fields constant that matches fieldId, or null if its not found.
3588
       */
3589
      public static _Fields findByThriftId(int fieldId) {
3590
        return byId.get(fieldId);
3591
      }
3592
 
3593
      /**
3594
       * Find the _Fields constant that matches fieldId, throwing an exception
3595
       * if it is not found.
3596
       */
3597
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3598
        _Fields fields = findByThriftId(fieldId);
3599
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3600
        return fields;
3601
      }
3602
 
3603
      /**
3604
       * Find the _Fields constant that matches name, or null if its not found.
3605
       */
3606
      public static _Fields findByName(String name) {
3607
        return byName.get(name);
3608
      }
3609
 
3610
      private final short _thriftId;
3611
      private final String _fieldName;
3612
 
3613
      _Fields(short thriftId, String fieldName) {
3614
        _thriftId = thriftId;
3615
        _fieldName = fieldName;
3616
      }
3617
 
3618
      public short getThriftFieldId() {
3619
        return _thriftId;
3620
      }
3621
 
3622
      public String getFieldName() {
3623
        return _fieldName;
3624
      }
3625
    }
3626
 
3627
    // isset id assignments
3628
 
3629
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3630
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3631
          new StructMetaData(TType.STRUCT, User.class)));
3632
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3633
          new FieldValueMetaData(TType.STRUCT)));
3634
    }});
3635
 
3636
    static {
553 chandransh 3637
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3638
    }
3639
 
553 chandransh 3640
    public createAnonymousUser_result() {
48 ashish 3641
    }
3642
 
553 chandransh 3643
    public createAnonymousUser_result(
3644
      User success,
3645
      UserContextException ucex)
48 ashish 3646
    {
3647
      this();
3648
      this.success = success;
553 chandransh 3649
      this.ucex = ucex;
48 ashish 3650
    }
3651
 
3652
    /**
3653
     * Performs a deep copy on <i>other</i>.
3654
     */
553 chandransh 3655
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3656
      if (other.isSetSuccess()) {
553 chandransh 3657
        this.success = new User(other.success);
48 ashish 3658
      }
553 chandransh 3659
      if (other.isSetUcex()) {
3660
        this.ucex = new UserContextException(other.ucex);
48 ashish 3661
      }
3662
    }
3663
 
553 chandransh 3664
    public createAnonymousUser_result deepCopy() {
3665
      return new createAnonymousUser_result(this);
48 ashish 3666
    }
3667
 
3668
    @Deprecated
553 chandransh 3669
    public createAnonymousUser_result clone() {
3670
      return new createAnonymousUser_result(this);
48 ashish 3671
    }
3672
 
553 chandransh 3673
    public User getSuccess() {
48 ashish 3674
      return this.success;
3675
    }
3676
 
553 chandransh 3677
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3678
      this.success = success;
3679
      return this;
3680
    }
3681
 
3682
    public void unsetSuccess() {
3683
      this.success = null;
3684
    }
3685
 
3686
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3687
    public boolean isSetSuccess() {
3688
      return this.success != null;
3689
    }
3690
 
3691
    public void setSuccessIsSet(boolean value) {
3692
      if (!value) {
3693
        this.success = null;
3694
      }
3695
    }
3696
 
553 chandransh 3697
    public UserContextException getUcex() {
3698
      return this.ucex;
48 ashish 3699
    }
3700
 
553 chandransh 3701
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3702
      this.ucex = ucex;
48 ashish 3703
      return this;
3704
    }
3705
 
553 chandransh 3706
    public void unsetUcex() {
3707
      this.ucex = null;
48 ashish 3708
    }
3709
 
553 chandransh 3710
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3711
    public boolean isSetUcex() {
3712
      return this.ucex != null;
48 ashish 3713
    }
3714
 
553 chandransh 3715
    public void setUcexIsSet(boolean value) {
48 ashish 3716
      if (!value) {
553 chandransh 3717
        this.ucex = null;
48 ashish 3718
      }
3719
    }
3720
 
3721
    public void setFieldValue(_Fields field, Object value) {
3722
      switch (field) {
3723
      case SUCCESS:
3724
        if (value == null) {
3725
          unsetSuccess();
3726
        } else {
553 chandransh 3727
          setSuccess((User)value);
48 ashish 3728
        }
3729
        break;
3730
 
553 chandransh 3731
      case UCEX:
48 ashish 3732
        if (value == null) {
553 chandransh 3733
          unsetUcex();
48 ashish 3734
        } else {
553 chandransh 3735
          setUcex((UserContextException)value);
48 ashish 3736
        }
3737
        break;
3738
 
3739
      }
3740
    }
3741
 
3742
    public void setFieldValue(int fieldID, Object value) {
3743
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3744
    }
3745
 
3746
    public Object getFieldValue(_Fields field) {
3747
      switch (field) {
3748
      case SUCCESS:
3749
        return getSuccess();
3750
 
553 chandransh 3751
      case UCEX:
3752
        return getUcex();
48 ashish 3753
 
3754
      }
3755
      throw new IllegalStateException();
3756
    }
3757
 
3758
    public Object getFieldValue(int fieldId) {
3759
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3760
    }
3761
 
3762
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3763
    public boolean isSet(_Fields field) {
3764
      switch (field) {
3765
      case SUCCESS:
3766
        return isSetSuccess();
553 chandransh 3767
      case UCEX:
3768
        return isSetUcex();
48 ashish 3769
      }
3770
      throw new IllegalStateException();
3771
    }
3772
 
3773
    public boolean isSet(int fieldID) {
3774
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3775
    }
3776
 
3777
    @Override
3778
    public boolean equals(Object that) {
3779
      if (that == null)
3780
        return false;
553 chandransh 3781
      if (that instanceof createAnonymousUser_result)
3782
        return this.equals((createAnonymousUser_result)that);
48 ashish 3783
      return false;
3784
    }
3785
 
553 chandransh 3786
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3787
      if (that == null)
3788
        return false;
3789
 
3790
      boolean this_present_success = true && this.isSetSuccess();
3791
      boolean that_present_success = true && that.isSetSuccess();
3792
      if (this_present_success || that_present_success) {
3793
        if (!(this_present_success && that_present_success))
3794
          return false;
3795
        if (!this.success.equals(that.success))
3796
          return false;
3797
      }
3798
 
553 chandransh 3799
      boolean this_present_ucex = true && this.isSetUcex();
3800
      boolean that_present_ucex = true && that.isSetUcex();
3801
      if (this_present_ucex || that_present_ucex) {
3802
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3803
          return false;
553 chandransh 3804
        if (!this.ucex.equals(that.ucex))
48 ashish 3805
          return false;
3806
      }
3807
 
3808
      return true;
3809
    }
3810
 
3811
    @Override
3812
    public int hashCode() {
3813
      return 0;
3814
    }
3815
 
571 rajveer 3816
    public int compareTo(createAnonymousUser_result other) {
3817
      if (!getClass().equals(other.getClass())) {
3818
        return getClass().getName().compareTo(other.getClass().getName());
3819
      }
3820
 
3821
      int lastComparison = 0;
3822
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3823
 
3824
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3825
      if (lastComparison != 0) {
3826
        return lastComparison;
3827
      }
3828
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3829
      if (lastComparison != 0) {
3830
        return lastComparison;
3831
      }
3832
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3833
      if (lastComparison != 0) {
3834
        return lastComparison;
3835
      }
3836
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3837
      if (lastComparison != 0) {
3838
        return lastComparison;
3839
      }
3840
      return 0;
3841
    }
3842
 
48 ashish 3843
    public void read(TProtocol iprot) throws TException {
3844
      TField field;
3845
      iprot.readStructBegin();
3846
      while (true)
3847
      {
3848
        field = iprot.readFieldBegin();
3849
        if (field.type == TType.STOP) { 
3850
          break;
3851
        }
3852
        _Fields fieldId = _Fields.findByThriftId(field.id);
3853
        if (fieldId == null) {
3854
          TProtocolUtil.skip(iprot, field.type);
3855
        } else {
3856
          switch (fieldId) {
3857
            case SUCCESS:
3858
              if (field.type == TType.STRUCT) {
553 chandransh 3859
                this.success = new User();
48 ashish 3860
                this.success.read(iprot);
3861
              } else { 
3862
                TProtocolUtil.skip(iprot, field.type);
3863
              }
3864
              break;
553 chandransh 3865
            case UCEX:
48 ashish 3866
              if (field.type == TType.STRUCT) {
553 chandransh 3867
                this.ucex = new UserContextException();
3868
                this.ucex.read(iprot);
48 ashish 3869
              } else { 
3870
                TProtocolUtil.skip(iprot, field.type);
3871
              }
3872
              break;
3873
          }
3874
          iprot.readFieldEnd();
3875
        }
3876
      }
3877
      iprot.readStructEnd();
3878
      validate();
3879
    }
3880
 
3881
    public void write(TProtocol oprot) throws TException {
3882
      oprot.writeStructBegin(STRUCT_DESC);
3883
 
3884
      if (this.isSetSuccess()) {
3885
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3886
        this.success.write(oprot);
3887
        oprot.writeFieldEnd();
553 chandransh 3888
      } else if (this.isSetUcex()) {
3889
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3890
        this.ucex.write(oprot);
48 ashish 3891
        oprot.writeFieldEnd();
3892
      }
3893
      oprot.writeFieldStop();
3894
      oprot.writeStructEnd();
3895
    }
3896
 
3897
    @Override
3898
    public String toString() {
553 chandransh 3899
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3900
      boolean first = true;
3901
 
3902
      sb.append("success:");
3903
      if (this.success == null) {
3904
        sb.append("null");
3905
      } else {
3906
        sb.append(this.success);
3907
      }
3908
      first = false;
3909
      if (!first) sb.append(", ");
553 chandransh 3910
      sb.append("ucex:");
3911
      if (this.ucex == null) {
48 ashish 3912
        sb.append("null");
3913
      } else {
553 chandransh 3914
        sb.append(this.ucex);
48 ashish 3915
      }
3916
      first = false;
3917
      sb.append(")");
3918
      return sb.toString();
3919
    }
3920
 
3921
    public void validate() throws TException {
3922
      // check for required fields
3923
    }
3924
 
3925
  }
3926
 
553 chandransh 3927
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
3928
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 3929
 
3930
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
3931
 
3932
    private long userId;
3933
 
3934
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3935
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3936
      USER_ID((short)1, "userId");
48 ashish 3937
 
3938
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3940
 
3941
      static {
3942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3943
          byId.put((int)field._thriftId, field);
3944
          byName.put(field.getFieldName(), field);
3945
        }
3946
      }
3947
 
3948
      /**
3949
       * Find the _Fields constant that matches fieldId, or null if its not found.
3950
       */
3951
      public static _Fields findByThriftId(int fieldId) {
3952
        return byId.get(fieldId);
3953
      }
3954
 
3955
      /**
3956
       * Find the _Fields constant that matches fieldId, throwing an exception
3957
       * if it is not found.
3958
       */
3959
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3960
        _Fields fields = findByThriftId(fieldId);
3961
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3962
        return fields;
3963
      }
3964
 
3965
      /**
3966
       * Find the _Fields constant that matches name, or null if its not found.
3967
       */
3968
      public static _Fields findByName(String name) {
3969
        return byName.get(name);
3970
      }
3971
 
3972
      private final short _thriftId;
3973
      private final String _fieldName;
3974
 
3975
      _Fields(short thriftId, String fieldName) {
3976
        _thriftId = thriftId;
3977
        _fieldName = fieldName;
3978
      }
3979
 
3980
      public short getThriftFieldId() {
3981
        return _thriftId;
3982
      }
3983
 
3984
      public String getFieldName() {
3985
        return _fieldName;
3986
      }
3987
    }
3988
 
3989
    // isset id assignments
3990
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 3991
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 3992
 
3993
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3994
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3995
          new FieldValueMetaData(TType.I64)));
3996
    }});
3997
 
3998
    static {
553 chandransh 3999
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 4000
    }
4001
 
553 chandransh 4002
    public getUserById_args() {
48 ashish 4003
    }
4004
 
553 chandransh 4005
    public getUserById_args(
4006
      long userId)
48 ashish 4007
    {
4008
      this();
4009
      this.userId = userId;
4010
      setUserIdIsSet(true);
4011
    }
4012
 
4013
    /**
4014
     * Performs a deep copy on <i>other</i>.
4015
     */
553 chandransh 4016
    public getUserById_args(getUserById_args other) {
48 ashish 4017
      __isset_bit_vector.clear();
4018
      __isset_bit_vector.or(other.__isset_bit_vector);
4019
      this.userId = other.userId;
4020
    }
4021
 
553 chandransh 4022
    public getUserById_args deepCopy() {
4023
      return new getUserById_args(this);
48 ashish 4024
    }
4025
 
4026
    @Deprecated
553 chandransh 4027
    public getUserById_args clone() {
4028
      return new getUserById_args(this);
48 ashish 4029
    }
4030
 
4031
    public long getUserId() {
4032
      return this.userId;
4033
    }
4034
 
553 chandransh 4035
    public getUserById_args setUserId(long userId) {
48 ashish 4036
      this.userId = userId;
4037
      setUserIdIsSet(true);
4038
      return this;
4039
    }
4040
 
4041
    public void unsetUserId() {
4042
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4043
    }
4044
 
4045
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4046
    public boolean isSetUserId() {
4047
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4048
    }
4049
 
4050
    public void setUserIdIsSet(boolean value) {
4051
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4052
    }
4053
 
4054
    public void setFieldValue(_Fields field, Object value) {
4055
      switch (field) {
4056
      case USER_ID:
4057
        if (value == null) {
4058
          unsetUserId();
4059
        } else {
4060
          setUserId((Long)value);
4061
        }
4062
        break;
4063
 
4064
      }
4065
    }
4066
 
4067
    public void setFieldValue(int fieldID, Object value) {
4068
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4069
    }
4070
 
4071
    public Object getFieldValue(_Fields field) {
4072
      switch (field) {
4073
      case USER_ID:
4074
        return new Long(getUserId());
4075
 
4076
      }
4077
      throw new IllegalStateException();
4078
    }
4079
 
4080
    public Object getFieldValue(int fieldId) {
4081
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4082
    }
4083
 
4084
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4085
    public boolean isSet(_Fields field) {
4086
      switch (field) {
4087
      case USER_ID:
4088
        return isSetUserId();
4089
      }
4090
      throw new IllegalStateException();
4091
    }
4092
 
4093
    public boolean isSet(int fieldID) {
4094
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4095
    }
4096
 
4097
    @Override
4098
    public boolean equals(Object that) {
4099
      if (that == null)
4100
        return false;
553 chandransh 4101
      if (that instanceof getUserById_args)
4102
        return this.equals((getUserById_args)that);
48 ashish 4103
      return false;
4104
    }
4105
 
553 chandransh 4106
    public boolean equals(getUserById_args that) {
48 ashish 4107
      if (that == null)
4108
        return false;
4109
 
4110
      boolean this_present_userId = true;
4111
      boolean that_present_userId = true;
4112
      if (this_present_userId || that_present_userId) {
4113
        if (!(this_present_userId && that_present_userId))
4114
          return false;
4115
        if (this.userId != that.userId)
4116
          return false;
4117
      }
4118
 
4119
      return true;
4120
    }
4121
 
4122
    @Override
4123
    public int hashCode() {
4124
      return 0;
4125
    }
4126
 
553 chandransh 4127
    public int compareTo(getUserById_args other) {
48 ashish 4128
      if (!getClass().equals(other.getClass())) {
4129
        return getClass().getName().compareTo(other.getClass().getName());
4130
      }
4131
 
4132
      int lastComparison = 0;
553 chandransh 4133
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4134
 
4135
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4136
      if (lastComparison != 0) {
4137
        return lastComparison;
4138
      }
4139
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4140
      if (lastComparison != 0) {
4141
        return lastComparison;
4142
      }
4143
      return 0;
4144
    }
4145
 
4146
    public void read(TProtocol iprot) throws TException {
4147
      TField field;
4148
      iprot.readStructBegin();
4149
      while (true)
4150
      {
4151
        field = iprot.readFieldBegin();
4152
        if (field.type == TType.STOP) { 
4153
          break;
4154
        }
4155
        _Fields fieldId = _Fields.findByThriftId(field.id);
4156
        if (fieldId == null) {
4157
          TProtocolUtil.skip(iprot, field.type);
4158
        } else {
4159
          switch (fieldId) {
4160
            case USER_ID:
4161
              if (field.type == TType.I64) {
4162
                this.userId = iprot.readI64();
4163
                setUserIdIsSet(true);
4164
              } else { 
4165
                TProtocolUtil.skip(iprot, field.type);
4166
              }
4167
              break;
4168
          }
4169
          iprot.readFieldEnd();
4170
        }
4171
      }
4172
      iprot.readStructEnd();
4173
      validate();
4174
    }
4175
 
4176
    public void write(TProtocol oprot) throws TException {
4177
      validate();
4178
 
4179
      oprot.writeStructBegin(STRUCT_DESC);
4180
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4181
      oprot.writeI64(this.userId);
4182
      oprot.writeFieldEnd();
4183
      oprot.writeFieldStop();
4184
      oprot.writeStructEnd();
4185
    }
4186
 
4187
    @Override
4188
    public String toString() {
553 chandransh 4189
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4190
      boolean first = true;
4191
 
4192
      sb.append("userId:");
4193
      sb.append(this.userId);
4194
      first = false;
4195
      sb.append(")");
4196
      return sb.toString();
4197
    }
4198
 
4199
    public void validate() throws TException {
4200
      // check for required fields
4201
    }
4202
 
4203
  }
4204
 
571 rajveer 4205
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4206
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4207
 
4208
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4209
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4210
 
553 chandransh 4211
    private User success;
4212
    private UserContextException ucex;
48 ashish 4213
 
4214
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4215
    public enum _Fields implements TFieldIdEnum {
4216
      SUCCESS((short)0, "success"),
553 chandransh 4217
      UCEX((short)1, "ucex");
48 ashish 4218
 
4219
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4220
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4221
 
4222
      static {
4223
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4224
          byId.put((int)field._thriftId, field);
4225
          byName.put(field.getFieldName(), field);
4226
        }
4227
      }
4228
 
4229
      /**
4230
       * Find the _Fields constant that matches fieldId, or null if its not found.
4231
       */
4232
      public static _Fields findByThriftId(int fieldId) {
4233
        return byId.get(fieldId);
4234
      }
4235
 
4236
      /**
4237
       * Find the _Fields constant that matches fieldId, throwing an exception
4238
       * if it is not found.
4239
       */
4240
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4241
        _Fields fields = findByThriftId(fieldId);
4242
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4243
        return fields;
4244
      }
4245
 
4246
      /**
4247
       * Find the _Fields constant that matches name, or null if its not found.
4248
       */
4249
      public static _Fields findByName(String name) {
4250
        return byName.get(name);
4251
      }
4252
 
4253
      private final short _thriftId;
4254
      private final String _fieldName;
4255
 
4256
      _Fields(short thriftId, String fieldName) {
4257
        _thriftId = thriftId;
4258
        _fieldName = fieldName;
4259
      }
4260
 
4261
      public short getThriftFieldId() {
4262
        return _thriftId;
4263
      }
4264
 
4265
      public String getFieldName() {
4266
        return _fieldName;
4267
      }
4268
    }
4269
 
4270
    // isset id assignments
4271
 
4272
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4273
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4274
          new StructMetaData(TType.STRUCT, User.class)));
4275
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4276
          new FieldValueMetaData(TType.STRUCT)));
4277
    }});
4278
 
4279
    static {
553 chandransh 4280
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4281
    }
4282
 
553 chandransh 4283
    public getUserById_result() {
48 ashish 4284
    }
4285
 
553 chandransh 4286
    public getUserById_result(
4287
      User success,
4288
      UserContextException ucex)
48 ashish 4289
    {
4290
      this();
4291
      this.success = success;
553 chandransh 4292
      this.ucex = ucex;
48 ashish 4293
    }
4294
 
4295
    /**
4296
     * Performs a deep copy on <i>other</i>.
4297
     */
553 chandransh 4298
    public getUserById_result(getUserById_result other) {
48 ashish 4299
      if (other.isSetSuccess()) {
553 chandransh 4300
        this.success = new User(other.success);
48 ashish 4301
      }
553 chandransh 4302
      if (other.isSetUcex()) {
4303
        this.ucex = new UserContextException(other.ucex);
48 ashish 4304
      }
4305
    }
4306
 
553 chandransh 4307
    public getUserById_result deepCopy() {
4308
      return new getUserById_result(this);
48 ashish 4309
    }
4310
 
4311
    @Deprecated
553 chandransh 4312
    public getUserById_result clone() {
4313
      return new getUserById_result(this);
48 ashish 4314
    }
4315
 
553 chandransh 4316
    public User getSuccess() {
48 ashish 4317
      return this.success;
4318
    }
4319
 
553 chandransh 4320
    public getUserById_result setSuccess(User success) {
48 ashish 4321
      this.success = success;
4322
      return this;
4323
    }
4324
 
4325
    public void unsetSuccess() {
4326
      this.success = null;
4327
    }
4328
 
4329
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4330
    public boolean isSetSuccess() {
4331
      return this.success != null;
4332
    }
4333
 
4334
    public void setSuccessIsSet(boolean value) {
4335
      if (!value) {
4336
        this.success = null;
4337
      }
4338
    }
4339
 
553 chandransh 4340
    public UserContextException getUcex() {
4341
      return this.ucex;
48 ashish 4342
    }
4343
 
553 chandransh 4344
    public getUserById_result setUcex(UserContextException ucex) {
4345
      this.ucex = ucex;
48 ashish 4346
      return this;
4347
    }
4348
 
553 chandransh 4349
    public void unsetUcex() {
4350
      this.ucex = null;
48 ashish 4351
    }
4352
 
553 chandransh 4353
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4354
    public boolean isSetUcex() {
4355
      return this.ucex != null;
48 ashish 4356
    }
4357
 
553 chandransh 4358
    public void setUcexIsSet(boolean value) {
48 ashish 4359
      if (!value) {
553 chandransh 4360
        this.ucex = null;
48 ashish 4361
      }
4362
    }
4363
 
4364
    public void setFieldValue(_Fields field, Object value) {
4365
      switch (field) {
4366
      case SUCCESS:
4367
        if (value == null) {
4368
          unsetSuccess();
4369
        } else {
553 chandransh 4370
          setSuccess((User)value);
48 ashish 4371
        }
4372
        break;
4373
 
553 chandransh 4374
      case UCEX:
48 ashish 4375
        if (value == null) {
553 chandransh 4376
          unsetUcex();
48 ashish 4377
        } else {
553 chandransh 4378
          setUcex((UserContextException)value);
48 ashish 4379
        }
4380
        break;
4381
 
4382
      }
4383
    }
4384
 
4385
    public void setFieldValue(int fieldID, Object value) {
4386
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4387
    }
4388
 
4389
    public Object getFieldValue(_Fields field) {
4390
      switch (field) {
4391
      case SUCCESS:
4392
        return getSuccess();
4393
 
553 chandransh 4394
      case UCEX:
4395
        return getUcex();
48 ashish 4396
 
4397
      }
4398
      throw new IllegalStateException();
4399
    }
4400
 
4401
    public Object getFieldValue(int fieldId) {
4402
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4403
    }
4404
 
4405
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4406
    public boolean isSet(_Fields field) {
4407
      switch (field) {
4408
      case SUCCESS:
4409
        return isSetSuccess();
553 chandransh 4410
      case UCEX:
4411
        return isSetUcex();
48 ashish 4412
      }
4413
      throw new IllegalStateException();
4414
    }
4415
 
4416
    public boolean isSet(int fieldID) {
4417
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4418
    }
4419
 
4420
    @Override
4421
    public boolean equals(Object that) {
4422
      if (that == null)
4423
        return false;
553 chandransh 4424
      if (that instanceof getUserById_result)
4425
        return this.equals((getUserById_result)that);
48 ashish 4426
      return false;
4427
    }
4428
 
553 chandransh 4429
    public boolean equals(getUserById_result that) {
48 ashish 4430
      if (that == null)
4431
        return false;
4432
 
4433
      boolean this_present_success = true && this.isSetSuccess();
4434
      boolean that_present_success = true && that.isSetSuccess();
4435
      if (this_present_success || that_present_success) {
4436
        if (!(this_present_success && that_present_success))
4437
          return false;
4438
        if (!this.success.equals(that.success))
4439
          return false;
4440
      }
4441
 
553 chandransh 4442
      boolean this_present_ucex = true && this.isSetUcex();
4443
      boolean that_present_ucex = true && that.isSetUcex();
4444
      if (this_present_ucex || that_present_ucex) {
4445
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4446
          return false;
553 chandransh 4447
        if (!this.ucex.equals(that.ucex))
48 ashish 4448
          return false;
4449
      }
4450
 
4451
      return true;
4452
    }
4453
 
4454
    @Override
4455
    public int hashCode() {
4456
      return 0;
4457
    }
4458
 
571 rajveer 4459
    public int compareTo(getUserById_result other) {
4460
      if (!getClass().equals(other.getClass())) {
4461
        return getClass().getName().compareTo(other.getClass().getName());
4462
      }
4463
 
4464
      int lastComparison = 0;
4465
      getUserById_result typedOther = (getUserById_result)other;
4466
 
4467
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4468
      if (lastComparison != 0) {
4469
        return lastComparison;
4470
      }
4471
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4472
      if (lastComparison != 0) {
4473
        return lastComparison;
4474
      }
4475
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4476
      if (lastComparison != 0) {
4477
        return lastComparison;
4478
      }
4479
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4480
      if (lastComparison != 0) {
4481
        return lastComparison;
4482
      }
4483
      return 0;
4484
    }
4485
 
48 ashish 4486
    public void read(TProtocol iprot) throws TException {
4487
      TField field;
4488
      iprot.readStructBegin();
4489
      while (true)
4490
      {
4491
        field = iprot.readFieldBegin();
4492
        if (field.type == TType.STOP) { 
4493
          break;
4494
        }
4495
        _Fields fieldId = _Fields.findByThriftId(field.id);
4496
        if (fieldId == null) {
4497
          TProtocolUtil.skip(iprot, field.type);
4498
        } else {
4499
          switch (fieldId) {
4500
            case SUCCESS:
4501
              if (field.type == TType.STRUCT) {
553 chandransh 4502
                this.success = new User();
48 ashish 4503
                this.success.read(iprot);
4504
              } else { 
4505
                TProtocolUtil.skip(iprot, field.type);
4506
              }
4507
              break;
553 chandransh 4508
            case UCEX:
48 ashish 4509
              if (field.type == TType.STRUCT) {
553 chandransh 4510
                this.ucex = new UserContextException();
4511
                this.ucex.read(iprot);
48 ashish 4512
              } else { 
4513
                TProtocolUtil.skip(iprot, field.type);
4514
              }
4515
              break;
4516
          }
4517
          iprot.readFieldEnd();
4518
        }
4519
      }
4520
      iprot.readStructEnd();
4521
      validate();
4522
    }
4523
 
4524
    public void write(TProtocol oprot) throws TException {
4525
      oprot.writeStructBegin(STRUCT_DESC);
4526
 
4527
      if (this.isSetSuccess()) {
4528
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4529
        this.success.write(oprot);
4530
        oprot.writeFieldEnd();
553 chandransh 4531
      } else if (this.isSetUcex()) {
4532
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4533
        this.ucex.write(oprot);
48 ashish 4534
        oprot.writeFieldEnd();
4535
      }
4536
      oprot.writeFieldStop();
4537
      oprot.writeStructEnd();
4538
    }
4539
 
4540
    @Override
4541
    public String toString() {
553 chandransh 4542
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4543
      boolean first = true;
4544
 
4545
      sb.append("success:");
4546
      if (this.success == null) {
4547
        sb.append("null");
4548
      } else {
4549
        sb.append(this.success);
4550
      }
4551
      first = false;
4552
      if (!first) sb.append(", ");
553 chandransh 4553
      sb.append("ucex:");
4554
      if (this.ucex == null) {
48 ashish 4555
        sb.append("null");
4556
      } else {
553 chandransh 4557
        sb.append(this.ucex);
48 ashish 4558
      }
4559
      first = false;
4560
      sb.append(")");
4561
      return sb.toString();
4562
    }
4563
 
4564
    public void validate() throws TException {
4565
      // check for required fields
4566
    }
4567
 
4568
  }
4569
 
571 rajveer 4570
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4571
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4572
 
553 chandransh 4573
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4574
 
553 chandransh 4575
    private User user;
48 ashish 4576
 
4577
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4578
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4579
      USER((short)1, "user");
48 ashish 4580
 
4581
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4582
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4583
 
4584
      static {
4585
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4586
          byId.put((int)field._thriftId, field);
4587
          byName.put(field.getFieldName(), field);
4588
        }
4589
      }
4590
 
4591
      /**
4592
       * Find the _Fields constant that matches fieldId, or null if its not found.
4593
       */
4594
      public static _Fields findByThriftId(int fieldId) {
4595
        return byId.get(fieldId);
4596
      }
4597
 
4598
      /**
4599
       * Find the _Fields constant that matches fieldId, throwing an exception
4600
       * if it is not found.
4601
       */
4602
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4603
        _Fields fields = findByThriftId(fieldId);
4604
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4605
        return fields;
4606
      }
4607
 
4608
      /**
4609
       * Find the _Fields constant that matches name, or null if its not found.
4610
       */
4611
      public static _Fields findByName(String name) {
4612
        return byName.get(name);
4613
      }
4614
 
4615
      private final short _thriftId;
4616
      private final String _fieldName;
4617
 
4618
      _Fields(short thriftId, String fieldName) {
4619
        _thriftId = thriftId;
4620
        _fieldName = fieldName;
4621
      }
4622
 
4623
      public short getThriftFieldId() {
4624
        return _thriftId;
4625
      }
4626
 
4627
      public String getFieldName() {
4628
        return _fieldName;
4629
      }
4630
    }
4631
 
4632
    // isset id assignments
4633
 
4634
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4635
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4636
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4637
    }});
4638
 
4639
    static {
553 chandransh 4640
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4641
    }
4642
 
553 chandransh 4643
    public createUser_args() {
48 ashish 4644
    }
4645
 
553 chandransh 4646
    public createUser_args(
4647
      User user)
48 ashish 4648
    {
4649
      this();
553 chandransh 4650
      this.user = user;
48 ashish 4651
    }
4652
 
4653
    /**
4654
     * Performs a deep copy on <i>other</i>.
4655
     */
553 chandransh 4656
    public createUser_args(createUser_args other) {
4657
      if (other.isSetUser()) {
4658
        this.user = new User(other.user);
48 ashish 4659
      }
4660
    }
4661
 
553 chandransh 4662
    public createUser_args deepCopy() {
4663
      return new createUser_args(this);
48 ashish 4664
    }
4665
 
4666
    @Deprecated
553 chandransh 4667
    public createUser_args clone() {
4668
      return new createUser_args(this);
48 ashish 4669
    }
4670
 
553 chandransh 4671
    public User getUser() {
4672
      return this.user;
48 ashish 4673
    }
4674
 
553 chandransh 4675
    public createUser_args setUser(User user) {
4676
      this.user = user;
48 ashish 4677
      return this;
4678
    }
4679
 
553 chandransh 4680
    public void unsetUser() {
4681
      this.user = null;
48 ashish 4682
    }
4683
 
553 chandransh 4684
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4685
    public boolean isSetUser() {
4686
      return this.user != null;
48 ashish 4687
    }
4688
 
553 chandransh 4689
    public void setUserIsSet(boolean value) {
48 ashish 4690
      if (!value) {
553 chandransh 4691
        this.user = null;
48 ashish 4692
      }
4693
    }
4694
 
4695
    public void setFieldValue(_Fields field, Object value) {
4696
      switch (field) {
553 chandransh 4697
      case USER:
48 ashish 4698
        if (value == null) {
553 chandransh 4699
          unsetUser();
48 ashish 4700
        } else {
553 chandransh 4701
          setUser((User)value);
48 ashish 4702
        }
4703
        break;
4704
 
4705
      }
4706
    }
4707
 
4708
    public void setFieldValue(int fieldID, Object value) {
4709
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4710
    }
4711
 
4712
    public Object getFieldValue(_Fields field) {
4713
      switch (field) {
553 chandransh 4714
      case USER:
4715
        return getUser();
48 ashish 4716
 
4717
      }
4718
      throw new IllegalStateException();
4719
    }
4720
 
4721
    public Object getFieldValue(int fieldId) {
4722
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4723
    }
4724
 
4725
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4726
    public boolean isSet(_Fields field) {
4727
      switch (field) {
553 chandransh 4728
      case USER:
4729
        return isSetUser();
48 ashish 4730
      }
4731
      throw new IllegalStateException();
4732
    }
4733
 
4734
    public boolean isSet(int fieldID) {
4735
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4736
    }
4737
 
4738
    @Override
4739
    public boolean equals(Object that) {
4740
      if (that == null)
4741
        return false;
553 chandransh 4742
      if (that instanceof createUser_args)
4743
        return this.equals((createUser_args)that);
48 ashish 4744
      return false;
4745
    }
4746
 
553 chandransh 4747
    public boolean equals(createUser_args that) {
48 ashish 4748
      if (that == null)
4749
        return false;
4750
 
553 chandransh 4751
      boolean this_present_user = true && this.isSetUser();
4752
      boolean that_present_user = true && that.isSetUser();
4753
      if (this_present_user || that_present_user) {
4754
        if (!(this_present_user && that_present_user))
48 ashish 4755
          return false;
553 chandransh 4756
        if (!this.user.equals(that.user))
48 ashish 4757
          return false;
4758
      }
4759
 
4760
      return true;
4761
    }
4762
 
4763
    @Override
4764
    public int hashCode() {
4765
      return 0;
4766
    }
4767
 
571 rajveer 4768
    public int compareTo(createUser_args other) {
4769
      if (!getClass().equals(other.getClass())) {
4770
        return getClass().getName().compareTo(other.getClass().getName());
4771
      }
4772
 
4773
      int lastComparison = 0;
4774
      createUser_args typedOther = (createUser_args)other;
4775
 
4776
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4777
      if (lastComparison != 0) {
4778
        return lastComparison;
4779
      }
4780
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4781
      if (lastComparison != 0) {
4782
        return lastComparison;
4783
      }
4784
      return 0;
4785
    }
4786
 
48 ashish 4787
    public void read(TProtocol iprot) throws TException {
4788
      TField field;
4789
      iprot.readStructBegin();
4790
      while (true)
4791
      {
4792
        field = iprot.readFieldBegin();
4793
        if (field.type == TType.STOP) { 
4794
          break;
4795
        }
4796
        _Fields fieldId = _Fields.findByThriftId(field.id);
4797
        if (fieldId == null) {
4798
          TProtocolUtil.skip(iprot, field.type);
4799
        } else {
4800
          switch (fieldId) {
553 chandransh 4801
            case USER:
4802
              if (field.type == TType.STRUCT) {
4803
                this.user = new User();
4804
                this.user.read(iprot);
48 ashish 4805
              } else { 
4806
                TProtocolUtil.skip(iprot, field.type);
4807
              }
4808
              break;
4809
          }
4810
          iprot.readFieldEnd();
4811
        }
4812
      }
4813
      iprot.readStructEnd();
4814
      validate();
4815
    }
4816
 
4817
    public void write(TProtocol oprot) throws TException {
4818
      validate();
4819
 
4820
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4821
      if (this.user != null) {
4822
        oprot.writeFieldBegin(USER_FIELD_DESC);
4823
        this.user.write(oprot);
48 ashish 4824
        oprot.writeFieldEnd();
4825
      }
4826
      oprot.writeFieldStop();
4827
      oprot.writeStructEnd();
4828
    }
4829
 
4830
    @Override
4831
    public String toString() {
553 chandransh 4832
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4833
      boolean first = true;
4834
 
553 chandransh 4835
      sb.append("user:");
4836
      if (this.user == null) {
48 ashish 4837
        sb.append("null");
4838
      } else {
553 chandransh 4839
        sb.append(this.user);
48 ashish 4840
      }
4841
      first = false;
4842
      sb.append(")");
4843
      return sb.toString();
4844
    }
4845
 
4846
    public void validate() throws TException {
4847
      // check for required fields
4848
    }
4849
 
4850
  }
4851
 
571 rajveer 4852
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 4853
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4854
 
4855
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4856
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4857
 
553 chandransh 4858
    private User success;
4859
    private UserContextException ucex;
48 ashish 4860
 
4861
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4862
    public enum _Fields implements TFieldIdEnum {
4863
      SUCCESS((short)0, "success"),
553 chandransh 4864
      UCEX((short)1, "ucex");
48 ashish 4865
 
4866
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4867
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4868
 
4869
      static {
4870
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4871
          byId.put((int)field._thriftId, field);
4872
          byName.put(field.getFieldName(), field);
4873
        }
4874
      }
4875
 
4876
      /**
4877
       * Find the _Fields constant that matches fieldId, or null if its not found.
4878
       */
4879
      public static _Fields findByThriftId(int fieldId) {
4880
        return byId.get(fieldId);
4881
      }
4882
 
4883
      /**
4884
       * Find the _Fields constant that matches fieldId, throwing an exception
4885
       * if it is not found.
4886
       */
4887
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4888
        _Fields fields = findByThriftId(fieldId);
4889
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4890
        return fields;
4891
      }
4892
 
4893
      /**
4894
       * Find the _Fields constant that matches name, or null if its not found.
4895
       */
4896
      public static _Fields findByName(String name) {
4897
        return byName.get(name);
4898
      }
4899
 
4900
      private final short _thriftId;
4901
      private final String _fieldName;
4902
 
4903
      _Fields(short thriftId, String fieldName) {
4904
        _thriftId = thriftId;
4905
        _fieldName = fieldName;
4906
      }
4907
 
4908
      public short getThriftFieldId() {
4909
        return _thriftId;
4910
      }
4911
 
4912
      public String getFieldName() {
4913
        return _fieldName;
4914
      }
4915
    }
4916
 
4917
    // isset id assignments
4918
 
4919
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4920
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4921
          new StructMetaData(TType.STRUCT, User.class)));
4922
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4923
          new FieldValueMetaData(TType.STRUCT)));
4924
    }});
4925
 
4926
    static {
553 chandransh 4927
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 4928
    }
4929
 
553 chandransh 4930
    public createUser_result() {
48 ashish 4931
    }
4932
 
553 chandransh 4933
    public createUser_result(
4934
      User success,
4935
      UserContextException ucex)
48 ashish 4936
    {
4937
      this();
4938
      this.success = success;
553 chandransh 4939
      this.ucex = ucex;
48 ashish 4940
    }
4941
 
4942
    /**
4943
     * Performs a deep copy on <i>other</i>.
4944
     */
553 chandransh 4945
    public createUser_result(createUser_result other) {
48 ashish 4946
      if (other.isSetSuccess()) {
553 chandransh 4947
        this.success = new User(other.success);
48 ashish 4948
      }
553 chandransh 4949
      if (other.isSetUcex()) {
4950
        this.ucex = new UserContextException(other.ucex);
48 ashish 4951
      }
4952
    }
4953
 
553 chandransh 4954
    public createUser_result deepCopy() {
4955
      return new createUser_result(this);
48 ashish 4956
    }
4957
 
4958
    @Deprecated
553 chandransh 4959
    public createUser_result clone() {
4960
      return new createUser_result(this);
48 ashish 4961
    }
4962
 
553 chandransh 4963
    public User getSuccess() {
48 ashish 4964
      return this.success;
4965
    }
4966
 
553 chandransh 4967
    public createUser_result setSuccess(User success) {
48 ashish 4968
      this.success = success;
4969
      return this;
4970
    }
4971
 
4972
    public void unsetSuccess() {
4973
      this.success = null;
4974
    }
4975
 
4976
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4977
    public boolean isSetSuccess() {
4978
      return this.success != null;
4979
    }
4980
 
4981
    public void setSuccessIsSet(boolean value) {
4982
      if (!value) {
4983
        this.success = null;
4984
      }
4985
    }
4986
 
553 chandransh 4987
    public UserContextException getUcex() {
4988
      return this.ucex;
48 ashish 4989
    }
4990
 
553 chandransh 4991
    public createUser_result setUcex(UserContextException ucex) {
4992
      this.ucex = ucex;
48 ashish 4993
      return this;
4994
    }
4995
 
553 chandransh 4996
    public void unsetUcex() {
4997
      this.ucex = null;
48 ashish 4998
    }
4999
 
553 chandransh 5000
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5001
    public boolean isSetUcex() {
5002
      return this.ucex != null;
48 ashish 5003
    }
5004
 
553 chandransh 5005
    public void setUcexIsSet(boolean value) {
48 ashish 5006
      if (!value) {
553 chandransh 5007
        this.ucex = null;
48 ashish 5008
      }
5009
    }
5010
 
5011
    public void setFieldValue(_Fields field, Object value) {
5012
      switch (field) {
5013
      case SUCCESS:
5014
        if (value == null) {
5015
          unsetSuccess();
5016
        } else {
553 chandransh 5017
          setSuccess((User)value);
48 ashish 5018
        }
5019
        break;
5020
 
553 chandransh 5021
      case UCEX:
48 ashish 5022
        if (value == null) {
553 chandransh 5023
          unsetUcex();
48 ashish 5024
        } else {
553 chandransh 5025
          setUcex((UserContextException)value);
48 ashish 5026
        }
5027
        break;
5028
 
5029
      }
5030
    }
5031
 
5032
    public void setFieldValue(int fieldID, Object value) {
5033
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5034
    }
5035
 
5036
    public Object getFieldValue(_Fields field) {
5037
      switch (field) {
5038
      case SUCCESS:
5039
        return getSuccess();
5040
 
553 chandransh 5041
      case UCEX:
5042
        return getUcex();
48 ashish 5043
 
5044
      }
5045
      throw new IllegalStateException();
5046
    }
5047
 
5048
    public Object getFieldValue(int fieldId) {
5049
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5050
    }
5051
 
5052
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5053
    public boolean isSet(_Fields field) {
5054
      switch (field) {
5055
      case SUCCESS:
5056
        return isSetSuccess();
553 chandransh 5057
      case UCEX:
5058
        return isSetUcex();
48 ashish 5059
      }
5060
      throw new IllegalStateException();
5061
    }
5062
 
5063
    public boolean isSet(int fieldID) {
5064
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5065
    }
5066
 
5067
    @Override
5068
    public boolean equals(Object that) {
5069
      if (that == null)
5070
        return false;
553 chandransh 5071
      if (that instanceof createUser_result)
5072
        return this.equals((createUser_result)that);
48 ashish 5073
      return false;
5074
    }
5075
 
553 chandransh 5076
    public boolean equals(createUser_result that) {
48 ashish 5077
      if (that == null)
5078
        return false;
5079
 
5080
      boolean this_present_success = true && this.isSetSuccess();
5081
      boolean that_present_success = true && that.isSetSuccess();
5082
      if (this_present_success || that_present_success) {
5083
        if (!(this_present_success && that_present_success))
5084
          return false;
5085
        if (!this.success.equals(that.success))
5086
          return false;
5087
      }
5088
 
553 chandransh 5089
      boolean this_present_ucex = true && this.isSetUcex();
5090
      boolean that_present_ucex = true && that.isSetUcex();
5091
      if (this_present_ucex || that_present_ucex) {
5092
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5093
          return false;
553 chandransh 5094
        if (!this.ucex.equals(that.ucex))
48 ashish 5095
          return false;
5096
      }
5097
 
5098
      return true;
5099
    }
5100
 
5101
    @Override
5102
    public int hashCode() {
5103
      return 0;
5104
    }
5105
 
571 rajveer 5106
    public int compareTo(createUser_result other) {
5107
      if (!getClass().equals(other.getClass())) {
5108
        return getClass().getName().compareTo(other.getClass().getName());
5109
      }
5110
 
5111
      int lastComparison = 0;
5112
      createUser_result typedOther = (createUser_result)other;
5113
 
5114
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5115
      if (lastComparison != 0) {
5116
        return lastComparison;
5117
      }
5118
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5119
      if (lastComparison != 0) {
5120
        return lastComparison;
5121
      }
5122
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5123
      if (lastComparison != 0) {
5124
        return lastComparison;
5125
      }
5126
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5127
      if (lastComparison != 0) {
5128
        return lastComparison;
5129
      }
5130
      return 0;
5131
    }
5132
 
48 ashish 5133
    public void read(TProtocol iprot) throws TException {
5134
      TField field;
5135
      iprot.readStructBegin();
5136
      while (true)
5137
      {
5138
        field = iprot.readFieldBegin();
5139
        if (field.type == TType.STOP) { 
5140
          break;
5141
        }
5142
        _Fields fieldId = _Fields.findByThriftId(field.id);
5143
        if (fieldId == null) {
5144
          TProtocolUtil.skip(iprot, field.type);
5145
        } else {
5146
          switch (fieldId) {
5147
            case SUCCESS:
5148
              if (field.type == TType.STRUCT) {
553 chandransh 5149
                this.success = new User();
48 ashish 5150
                this.success.read(iprot);
5151
              } else { 
5152
                TProtocolUtil.skip(iprot, field.type);
5153
              }
5154
              break;
553 chandransh 5155
            case UCEX:
48 ashish 5156
              if (field.type == TType.STRUCT) {
553 chandransh 5157
                this.ucex = new UserContextException();
5158
                this.ucex.read(iprot);
48 ashish 5159
              } else { 
5160
                TProtocolUtil.skip(iprot, field.type);
5161
              }
5162
              break;
5163
          }
5164
          iprot.readFieldEnd();
5165
        }
5166
      }
5167
      iprot.readStructEnd();
5168
      validate();
5169
    }
5170
 
5171
    public void write(TProtocol oprot) throws TException {
5172
      oprot.writeStructBegin(STRUCT_DESC);
5173
 
5174
      if (this.isSetSuccess()) {
5175
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5176
        this.success.write(oprot);
5177
        oprot.writeFieldEnd();
553 chandransh 5178
      } else if (this.isSetUcex()) {
5179
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5180
        this.ucex.write(oprot);
48 ashish 5181
        oprot.writeFieldEnd();
5182
      }
5183
      oprot.writeFieldStop();
5184
      oprot.writeStructEnd();
5185
    }
5186
 
5187
    @Override
5188
    public String toString() {
553 chandransh 5189
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 5190
      boolean first = true;
5191
 
5192
      sb.append("success:");
5193
      if (this.success == null) {
5194
        sb.append("null");
5195
      } else {
5196
        sb.append(this.success);
5197
      }
5198
      first = false;
5199
      if (!first) sb.append(", ");
553 chandransh 5200
      sb.append("ucex:");
5201
      if (this.ucex == null) {
48 ashish 5202
        sb.append("null");
5203
      } else {
553 chandransh 5204
        sb.append(this.ucex);
48 ashish 5205
      }
5206
      first = false;
5207
      sb.append(")");
5208
      return sb.toString();
5209
    }
5210
 
5211
    public void validate() throws TException {
5212
      // check for required fields
5213
    }
5214
 
5215
  }
5216
 
571 rajveer 5217
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 5218
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 5219
 
553 chandransh 5220
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5221
 
553 chandransh 5222
    private User user;
48 ashish 5223
 
5224
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5225
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5226
      USER((short)1, "user");
48 ashish 5227
 
5228
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5229
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5230
 
5231
      static {
5232
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5233
          byId.put((int)field._thriftId, field);
5234
          byName.put(field.getFieldName(), field);
5235
        }
5236
      }
5237
 
5238
      /**
5239
       * Find the _Fields constant that matches fieldId, or null if its not found.
5240
       */
5241
      public static _Fields findByThriftId(int fieldId) {
5242
        return byId.get(fieldId);
5243
      }
5244
 
5245
      /**
5246
       * Find the _Fields constant that matches fieldId, throwing an exception
5247
       * if it is not found.
5248
       */
5249
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5250
        _Fields fields = findByThriftId(fieldId);
5251
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5252
        return fields;
5253
      }
5254
 
5255
      /**
5256
       * Find the _Fields constant that matches name, or null if its not found.
5257
       */
5258
      public static _Fields findByName(String name) {
5259
        return byName.get(name);
5260
      }
5261
 
5262
      private final short _thriftId;
5263
      private final String _fieldName;
5264
 
5265
      _Fields(short thriftId, String fieldName) {
5266
        _thriftId = thriftId;
5267
        _fieldName = fieldName;
5268
      }
5269
 
5270
      public short getThriftFieldId() {
5271
        return _thriftId;
5272
      }
5273
 
5274
      public String getFieldName() {
5275
        return _fieldName;
5276
      }
5277
    }
5278
 
5279
    // isset id assignments
5280
 
5281
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5282
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5283
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5284
    }});
5285
 
5286
    static {
553 chandransh 5287
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 5288
    }
5289
 
553 chandransh 5290
    public updateUser_args() {
48 ashish 5291
    }
5292
 
553 chandransh 5293
    public updateUser_args(
5294
      User user)
48 ashish 5295
    {
5296
      this();
553 chandransh 5297
      this.user = user;
48 ashish 5298
    }
5299
 
5300
    /**
5301
     * Performs a deep copy on <i>other</i>.
5302
     */
553 chandransh 5303
    public updateUser_args(updateUser_args other) {
5304
      if (other.isSetUser()) {
5305
        this.user = new User(other.user);
5306
      }
48 ashish 5307
    }
5308
 
553 chandransh 5309
    public updateUser_args deepCopy() {
5310
      return new updateUser_args(this);
48 ashish 5311
    }
5312
 
5313
    @Deprecated
553 chandransh 5314
    public updateUser_args clone() {
5315
      return new updateUser_args(this);
48 ashish 5316
    }
5317
 
553 chandransh 5318
    public User getUser() {
5319
      return this.user;
48 ashish 5320
    }
5321
 
553 chandransh 5322
    public updateUser_args setUser(User user) {
5323
      this.user = user;
48 ashish 5324
      return this;
5325
    }
5326
 
553 chandransh 5327
    public void unsetUser() {
5328
      this.user = null;
48 ashish 5329
    }
5330
 
553 chandransh 5331
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5332
    public boolean isSetUser() {
5333
      return this.user != null;
48 ashish 5334
    }
5335
 
553 chandransh 5336
    public void setUserIsSet(boolean value) {
5337
      if (!value) {
5338
        this.user = null;
5339
      }
48 ashish 5340
    }
5341
 
5342
    public void setFieldValue(_Fields field, Object value) {
5343
      switch (field) {
553 chandransh 5344
      case USER:
48 ashish 5345
        if (value == null) {
553 chandransh 5346
          unsetUser();
48 ashish 5347
        } else {
553 chandransh 5348
          setUser((User)value);
48 ashish 5349
        }
5350
        break;
5351
 
5352
      }
5353
    }
5354
 
5355
    public void setFieldValue(int fieldID, Object value) {
5356
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5357
    }
5358
 
5359
    public Object getFieldValue(_Fields field) {
5360
      switch (field) {
553 chandransh 5361
      case USER:
5362
        return getUser();
48 ashish 5363
 
5364
      }
5365
      throw new IllegalStateException();
5366
    }
5367
 
5368
    public Object getFieldValue(int fieldId) {
5369
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5370
    }
5371
 
5372
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5373
    public boolean isSet(_Fields field) {
5374
      switch (field) {
553 chandransh 5375
      case USER:
5376
        return isSetUser();
48 ashish 5377
      }
5378
      throw new IllegalStateException();
5379
    }
5380
 
5381
    public boolean isSet(int fieldID) {
5382
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5383
    }
5384
 
5385
    @Override
5386
    public boolean equals(Object that) {
5387
      if (that == null)
5388
        return false;
553 chandransh 5389
      if (that instanceof updateUser_args)
5390
        return this.equals((updateUser_args)that);
48 ashish 5391
      return false;
5392
    }
5393
 
553 chandransh 5394
    public boolean equals(updateUser_args that) {
48 ashish 5395
      if (that == null)
5396
        return false;
5397
 
553 chandransh 5398
      boolean this_present_user = true && this.isSetUser();
5399
      boolean that_present_user = true && that.isSetUser();
5400
      if (this_present_user || that_present_user) {
5401
        if (!(this_present_user && that_present_user))
48 ashish 5402
          return false;
553 chandransh 5403
        if (!this.user.equals(that.user))
48 ashish 5404
          return false;
5405
      }
5406
 
5407
      return true;
5408
    }
5409
 
5410
    @Override
5411
    public int hashCode() {
5412
      return 0;
5413
    }
5414
 
571 rajveer 5415
    public int compareTo(updateUser_args other) {
5416
      if (!getClass().equals(other.getClass())) {
5417
        return getClass().getName().compareTo(other.getClass().getName());
5418
      }
5419
 
5420
      int lastComparison = 0;
5421
      updateUser_args typedOther = (updateUser_args)other;
5422
 
5423
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5424
      if (lastComparison != 0) {
5425
        return lastComparison;
5426
      }
5427
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5428
      if (lastComparison != 0) {
5429
        return lastComparison;
5430
      }
5431
      return 0;
5432
    }
5433
 
48 ashish 5434
    public void read(TProtocol iprot) throws TException {
5435
      TField field;
5436
      iprot.readStructBegin();
5437
      while (true)
5438
      {
5439
        field = iprot.readFieldBegin();
5440
        if (field.type == TType.STOP) { 
5441
          break;
5442
        }
5443
        _Fields fieldId = _Fields.findByThriftId(field.id);
5444
        if (fieldId == null) {
5445
          TProtocolUtil.skip(iprot, field.type);
5446
        } else {
5447
          switch (fieldId) {
553 chandransh 5448
            case USER:
5449
              if (field.type == TType.STRUCT) {
5450
                this.user = new User();
5451
                this.user.read(iprot);
48 ashish 5452
              } else { 
5453
                TProtocolUtil.skip(iprot, field.type);
5454
              }
5455
              break;
5456
          }
5457
          iprot.readFieldEnd();
5458
        }
5459
      }
5460
      iprot.readStructEnd();
5461
      validate();
5462
    }
5463
 
5464
    public void write(TProtocol oprot) throws TException {
5465
      validate();
5466
 
5467
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5468
      if (this.user != null) {
5469
        oprot.writeFieldBegin(USER_FIELD_DESC);
5470
        this.user.write(oprot);
5471
        oprot.writeFieldEnd();
5472
      }
48 ashish 5473
      oprot.writeFieldStop();
5474
      oprot.writeStructEnd();
5475
    }
5476
 
5477
    @Override
5478
    public String toString() {
553 chandransh 5479
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5480
      boolean first = true;
5481
 
553 chandransh 5482
      sb.append("user:");
5483
      if (this.user == null) {
5484
        sb.append("null");
5485
      } else {
5486
        sb.append(this.user);
5487
      }
48 ashish 5488
      first = false;
5489
      sb.append(")");
5490
      return sb.toString();
5491
    }
5492
 
5493
    public void validate() throws TException {
5494
      // check for required fields
5495
    }
5496
 
5497
  }
5498
 
571 rajveer 5499
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5500
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5501
 
5502
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5503
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5504
 
553 chandransh 5505
    private User success;
5506
    private UserContextException ucex;
48 ashish 5507
 
5508
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5509
    public enum _Fields implements TFieldIdEnum {
5510
      SUCCESS((short)0, "success"),
553 chandransh 5511
      UCEX((short)1, "ucex");
48 ashish 5512
 
5513
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5514
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5515
 
5516
      static {
5517
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5518
          byId.put((int)field._thriftId, field);
5519
          byName.put(field.getFieldName(), field);
5520
        }
5521
      }
5522
 
5523
      /**
5524
       * Find the _Fields constant that matches fieldId, or null if its not found.
5525
       */
5526
      public static _Fields findByThriftId(int fieldId) {
5527
        return byId.get(fieldId);
5528
      }
5529
 
5530
      /**
5531
       * Find the _Fields constant that matches fieldId, throwing an exception
5532
       * if it is not found.
5533
       */
5534
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5535
        _Fields fields = findByThriftId(fieldId);
5536
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5537
        return fields;
5538
      }
5539
 
5540
      /**
5541
       * Find the _Fields constant that matches name, or null if its not found.
5542
       */
5543
      public static _Fields findByName(String name) {
5544
        return byName.get(name);
5545
      }
5546
 
5547
      private final short _thriftId;
5548
      private final String _fieldName;
5549
 
5550
      _Fields(short thriftId, String fieldName) {
5551
        _thriftId = thriftId;
5552
        _fieldName = fieldName;
5553
      }
5554
 
5555
      public short getThriftFieldId() {
5556
        return _thriftId;
5557
      }
5558
 
5559
      public String getFieldName() {
5560
        return _fieldName;
5561
      }
5562
    }
5563
 
5564
    // isset id assignments
5565
 
5566
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5567
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5568
          new StructMetaData(TType.STRUCT, User.class)));
5569
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5570
          new FieldValueMetaData(TType.STRUCT)));
5571
    }});
5572
 
5573
    static {
553 chandransh 5574
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5575
    }
5576
 
553 chandransh 5577
    public updateUser_result() {
48 ashish 5578
    }
5579
 
553 chandransh 5580
    public updateUser_result(
5581
      User success,
5582
      UserContextException ucex)
48 ashish 5583
    {
5584
      this();
5585
      this.success = success;
553 chandransh 5586
      this.ucex = ucex;
48 ashish 5587
    }
5588
 
5589
    /**
5590
     * Performs a deep copy on <i>other</i>.
5591
     */
553 chandransh 5592
    public updateUser_result(updateUser_result other) {
48 ashish 5593
      if (other.isSetSuccess()) {
553 chandransh 5594
        this.success = new User(other.success);
48 ashish 5595
      }
553 chandransh 5596
      if (other.isSetUcex()) {
5597
        this.ucex = new UserContextException(other.ucex);
48 ashish 5598
      }
5599
    }
5600
 
553 chandransh 5601
    public updateUser_result deepCopy() {
5602
      return new updateUser_result(this);
48 ashish 5603
    }
5604
 
5605
    @Deprecated
553 chandransh 5606
    public updateUser_result clone() {
5607
      return new updateUser_result(this);
48 ashish 5608
    }
5609
 
553 chandransh 5610
    public User getSuccess() {
48 ashish 5611
      return this.success;
5612
    }
5613
 
553 chandransh 5614
    public updateUser_result setSuccess(User success) {
48 ashish 5615
      this.success = success;
5616
      return this;
5617
    }
5618
 
5619
    public void unsetSuccess() {
5620
      this.success = null;
5621
    }
5622
 
5623
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5624
    public boolean isSetSuccess() {
5625
      return this.success != null;
5626
    }
5627
 
5628
    public void setSuccessIsSet(boolean value) {
5629
      if (!value) {
5630
        this.success = null;
5631
      }
5632
    }
5633
 
553 chandransh 5634
    public UserContextException getUcex() {
5635
      return this.ucex;
48 ashish 5636
    }
5637
 
553 chandransh 5638
    public updateUser_result setUcex(UserContextException ucex) {
5639
      this.ucex = ucex;
48 ashish 5640
      return this;
5641
    }
5642
 
553 chandransh 5643
    public void unsetUcex() {
5644
      this.ucex = null;
48 ashish 5645
    }
5646
 
553 chandransh 5647
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5648
    public boolean isSetUcex() {
5649
      return this.ucex != null;
48 ashish 5650
    }
5651
 
553 chandransh 5652
    public void setUcexIsSet(boolean value) {
48 ashish 5653
      if (!value) {
553 chandransh 5654
        this.ucex = null;
48 ashish 5655
      }
5656
    }
5657
 
5658
    public void setFieldValue(_Fields field, Object value) {
5659
      switch (field) {
5660
      case SUCCESS:
5661
        if (value == null) {
5662
          unsetSuccess();
5663
        } else {
553 chandransh 5664
          setSuccess((User)value);
48 ashish 5665
        }
5666
        break;
5667
 
553 chandransh 5668
      case UCEX:
48 ashish 5669
        if (value == null) {
553 chandransh 5670
          unsetUcex();
48 ashish 5671
        } else {
553 chandransh 5672
          setUcex((UserContextException)value);
48 ashish 5673
        }
5674
        break;
5675
 
5676
      }
5677
    }
5678
 
5679
    public void setFieldValue(int fieldID, Object value) {
5680
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5681
    }
5682
 
5683
    public Object getFieldValue(_Fields field) {
5684
      switch (field) {
5685
      case SUCCESS:
5686
        return getSuccess();
5687
 
553 chandransh 5688
      case UCEX:
5689
        return getUcex();
48 ashish 5690
 
5691
      }
5692
      throw new IllegalStateException();
5693
    }
5694
 
5695
    public Object getFieldValue(int fieldId) {
5696
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5697
    }
5698
 
5699
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5700
    public boolean isSet(_Fields field) {
5701
      switch (field) {
5702
      case SUCCESS:
5703
        return isSetSuccess();
553 chandransh 5704
      case UCEX:
5705
        return isSetUcex();
48 ashish 5706
      }
5707
      throw new IllegalStateException();
5708
    }
5709
 
5710
    public boolean isSet(int fieldID) {
5711
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5712
    }
5713
 
5714
    @Override
5715
    public boolean equals(Object that) {
5716
      if (that == null)
5717
        return false;
553 chandransh 5718
      if (that instanceof updateUser_result)
5719
        return this.equals((updateUser_result)that);
48 ashish 5720
      return false;
5721
    }
5722
 
553 chandransh 5723
    public boolean equals(updateUser_result that) {
48 ashish 5724
      if (that == null)
5725
        return false;
5726
 
5727
      boolean this_present_success = true && this.isSetSuccess();
5728
      boolean that_present_success = true && that.isSetSuccess();
5729
      if (this_present_success || that_present_success) {
5730
        if (!(this_present_success && that_present_success))
5731
          return false;
5732
        if (!this.success.equals(that.success))
5733
          return false;
5734
      }
5735
 
553 chandransh 5736
      boolean this_present_ucex = true && this.isSetUcex();
5737
      boolean that_present_ucex = true && that.isSetUcex();
5738
      if (this_present_ucex || that_present_ucex) {
5739
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5740
          return false;
553 chandransh 5741
        if (!this.ucex.equals(that.ucex))
48 ashish 5742
          return false;
5743
      }
5744
 
5745
      return true;
5746
    }
5747
 
5748
    @Override
5749
    public int hashCode() {
5750
      return 0;
5751
    }
5752
 
571 rajveer 5753
    public int compareTo(updateUser_result other) {
5754
      if (!getClass().equals(other.getClass())) {
5755
        return getClass().getName().compareTo(other.getClass().getName());
5756
      }
5757
 
5758
      int lastComparison = 0;
5759
      updateUser_result typedOther = (updateUser_result)other;
5760
 
5761
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5762
      if (lastComparison != 0) {
5763
        return lastComparison;
5764
      }
5765
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5766
      if (lastComparison != 0) {
5767
        return lastComparison;
5768
      }
5769
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5770
      if (lastComparison != 0) {
5771
        return lastComparison;
5772
      }
5773
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5774
      if (lastComparison != 0) {
5775
        return lastComparison;
5776
      }
5777
      return 0;
5778
    }
5779
 
48 ashish 5780
    public void read(TProtocol iprot) throws TException {
5781
      TField field;
5782
      iprot.readStructBegin();
5783
      while (true)
5784
      {
5785
        field = iprot.readFieldBegin();
5786
        if (field.type == TType.STOP) { 
5787
          break;
5788
        }
5789
        _Fields fieldId = _Fields.findByThriftId(field.id);
5790
        if (fieldId == null) {
5791
          TProtocolUtil.skip(iprot, field.type);
5792
        } else {
5793
          switch (fieldId) {
5794
            case SUCCESS:
5795
              if (field.type == TType.STRUCT) {
553 chandransh 5796
                this.success = new User();
48 ashish 5797
                this.success.read(iprot);
5798
              } else { 
5799
                TProtocolUtil.skip(iprot, field.type);
5800
              }
5801
              break;
553 chandransh 5802
            case UCEX:
48 ashish 5803
              if (field.type == TType.STRUCT) {
553 chandransh 5804
                this.ucex = new UserContextException();
5805
                this.ucex.read(iprot);
48 ashish 5806
              } else { 
5807
                TProtocolUtil.skip(iprot, field.type);
5808
              }
5809
              break;
5810
          }
5811
          iprot.readFieldEnd();
5812
        }
5813
      }
5814
      iprot.readStructEnd();
5815
      validate();
5816
    }
5817
 
5818
    public void write(TProtocol oprot) throws TException {
5819
      oprot.writeStructBegin(STRUCT_DESC);
5820
 
5821
      if (this.isSetSuccess()) {
5822
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5823
        this.success.write(oprot);
5824
        oprot.writeFieldEnd();
553 chandransh 5825
      } else if (this.isSetUcex()) {
5826
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5827
        this.ucex.write(oprot);
48 ashish 5828
        oprot.writeFieldEnd();
5829
      }
5830
      oprot.writeFieldStop();
5831
      oprot.writeStructEnd();
5832
    }
5833
 
5834
    @Override
5835
    public String toString() {
553 chandransh 5836
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5837
      boolean first = true;
5838
 
5839
      sb.append("success:");
5840
      if (this.success == null) {
5841
        sb.append("null");
5842
      } else {
5843
        sb.append(this.success);
5844
      }
5845
      first = false;
5846
      if (!first) sb.append(", ");
553 chandransh 5847
      sb.append("ucex:");
5848
      if (this.ucex == null) {
48 ashish 5849
        sb.append("null");
5850
      } else {
553 chandransh 5851
        sb.append(this.ucex);
48 ashish 5852
      }
5853
      first = false;
5854
      sb.append(")");
5855
      return sb.toString();
5856
    }
5857
 
5858
    public void validate() throws TException {
5859
      // check for required fields
5860
    }
5861
 
5862
  }
5863
 
553 chandransh 5864
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5865
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5866
 
5867
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5868
 
5869
    private long userId;
5870
 
5871
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5872
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5873
      USER_ID((short)1, "userId");
48 ashish 5874
 
5875
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5876
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5877
 
5878
      static {
5879
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5880
          byId.put((int)field._thriftId, field);
5881
          byName.put(field.getFieldName(), field);
5882
        }
5883
      }
5884
 
5885
      /**
5886
       * Find the _Fields constant that matches fieldId, or null if its not found.
5887
       */
5888
      public static _Fields findByThriftId(int fieldId) {
5889
        return byId.get(fieldId);
5890
      }
5891
 
5892
      /**
5893
       * Find the _Fields constant that matches fieldId, throwing an exception
5894
       * if it is not found.
5895
       */
5896
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5897
        _Fields fields = findByThriftId(fieldId);
5898
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5899
        return fields;
5900
      }
5901
 
5902
      /**
5903
       * Find the _Fields constant that matches name, or null if its not found.
5904
       */
5905
      public static _Fields findByName(String name) {
5906
        return byName.get(name);
5907
      }
5908
 
5909
      private final short _thriftId;
5910
      private final String _fieldName;
5911
 
5912
      _Fields(short thriftId, String fieldName) {
5913
        _thriftId = thriftId;
5914
        _fieldName = fieldName;
5915
      }
5916
 
5917
      public short getThriftFieldId() {
5918
        return _thriftId;
5919
      }
5920
 
5921
      public String getFieldName() {
5922
        return _fieldName;
5923
      }
5924
    }
5925
 
5926
    // isset id assignments
5927
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 5928
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5929
 
5930
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5931
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5932
          new FieldValueMetaData(TType.I64)));
5933
    }});
5934
 
5935
    static {
553 chandransh 5936
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 5937
    }
5938
 
553 chandransh 5939
    public deleteUser_args() {
48 ashish 5940
    }
5941
 
553 chandransh 5942
    public deleteUser_args(
5943
      long userId)
48 ashish 5944
    {
5945
      this();
5946
      this.userId = userId;
5947
      setUserIdIsSet(true);
5948
    }
5949
 
5950
    /**
5951
     * Performs a deep copy on <i>other</i>.
5952
     */
553 chandransh 5953
    public deleteUser_args(deleteUser_args other) {
48 ashish 5954
      __isset_bit_vector.clear();
5955
      __isset_bit_vector.or(other.__isset_bit_vector);
5956
      this.userId = other.userId;
5957
    }
5958
 
553 chandransh 5959
    public deleteUser_args deepCopy() {
5960
      return new deleteUser_args(this);
48 ashish 5961
    }
5962
 
5963
    @Deprecated
553 chandransh 5964
    public deleteUser_args clone() {
5965
      return new deleteUser_args(this);
48 ashish 5966
    }
5967
 
5968
    public long getUserId() {
5969
      return this.userId;
5970
    }
5971
 
553 chandransh 5972
    public deleteUser_args setUserId(long userId) {
48 ashish 5973
      this.userId = userId;
5974
      setUserIdIsSet(true);
5975
      return this;
5976
    }
5977
 
5978
    public void unsetUserId() {
5979
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5980
    }
5981
 
5982
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5983
    public boolean isSetUserId() {
5984
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5985
    }
5986
 
5987
    public void setUserIdIsSet(boolean value) {
5988
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5989
    }
5990
 
5991
    public void setFieldValue(_Fields field, Object value) {
5992
      switch (field) {
5993
      case USER_ID:
5994
        if (value == null) {
5995
          unsetUserId();
5996
        } else {
5997
          setUserId((Long)value);
5998
        }
5999
        break;
6000
 
6001
      }
6002
    }
6003
 
6004
    public void setFieldValue(int fieldID, Object value) {
6005
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6006
    }
6007
 
6008
    public Object getFieldValue(_Fields field) {
6009
      switch (field) {
6010
      case USER_ID:
6011
        return new Long(getUserId());
6012
 
6013
      }
6014
      throw new IllegalStateException();
6015
    }
6016
 
6017
    public Object getFieldValue(int fieldId) {
6018
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6019
    }
6020
 
6021
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6022
    public boolean isSet(_Fields field) {
6023
      switch (field) {
6024
      case USER_ID:
6025
        return isSetUserId();
6026
      }
6027
      throw new IllegalStateException();
6028
    }
6029
 
6030
    public boolean isSet(int fieldID) {
6031
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6032
    }
6033
 
6034
    @Override
6035
    public boolean equals(Object that) {
6036
      if (that == null)
6037
        return false;
553 chandransh 6038
      if (that instanceof deleteUser_args)
6039
        return this.equals((deleteUser_args)that);
48 ashish 6040
      return false;
6041
    }
6042
 
553 chandransh 6043
    public boolean equals(deleteUser_args that) {
48 ashish 6044
      if (that == null)
6045
        return false;
6046
 
6047
      boolean this_present_userId = true;
6048
      boolean that_present_userId = true;
6049
      if (this_present_userId || that_present_userId) {
6050
        if (!(this_present_userId && that_present_userId))
6051
          return false;
6052
        if (this.userId != that.userId)
6053
          return false;
6054
      }
6055
 
6056
      return true;
6057
    }
6058
 
6059
    @Override
6060
    public int hashCode() {
6061
      return 0;
6062
    }
6063
 
553 chandransh 6064
    public int compareTo(deleteUser_args other) {
48 ashish 6065
      if (!getClass().equals(other.getClass())) {
6066
        return getClass().getName().compareTo(other.getClass().getName());
6067
      }
6068
 
6069
      int lastComparison = 0;
553 chandransh 6070
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 6071
 
6072
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6073
      if (lastComparison != 0) {
6074
        return lastComparison;
6075
      }
6076
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6077
      if (lastComparison != 0) {
6078
        return lastComparison;
6079
      }
6080
      return 0;
6081
    }
6082
 
6083
    public void read(TProtocol iprot) throws TException {
6084
      TField field;
6085
      iprot.readStructBegin();
6086
      while (true)
6087
      {
6088
        field = iprot.readFieldBegin();
6089
        if (field.type == TType.STOP) { 
6090
          break;
6091
        }
6092
        _Fields fieldId = _Fields.findByThriftId(field.id);
6093
        if (fieldId == null) {
6094
          TProtocolUtil.skip(iprot, field.type);
6095
        } else {
6096
          switch (fieldId) {
6097
            case USER_ID:
6098
              if (field.type == TType.I64) {
6099
                this.userId = iprot.readI64();
6100
                setUserIdIsSet(true);
6101
              } else { 
6102
                TProtocolUtil.skip(iprot, field.type);
6103
              }
6104
              break;
6105
          }
6106
          iprot.readFieldEnd();
6107
        }
6108
      }
6109
      iprot.readStructEnd();
6110
      validate();
6111
    }
6112
 
6113
    public void write(TProtocol oprot) throws TException {
6114
      validate();
6115
 
6116
      oprot.writeStructBegin(STRUCT_DESC);
6117
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6118
      oprot.writeI64(this.userId);
6119
      oprot.writeFieldEnd();
6120
      oprot.writeFieldStop();
6121
      oprot.writeStructEnd();
6122
    }
6123
 
6124
    @Override
6125
    public String toString() {
553 chandransh 6126
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 6127
      boolean first = true;
6128
 
6129
      sb.append("userId:");
6130
      sb.append(this.userId);
6131
      first = false;
6132
      sb.append(")");
6133
      return sb.toString();
6134
    }
6135
 
6136
    public void validate() throws TException {
6137
      // check for required fields
6138
    }
6139
 
6140
  }
6141
 
553 chandransh 6142
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
6143
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 6144
 
553 chandransh 6145
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6146
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6147
 
553 chandransh 6148
    private boolean success;
6149
    private UserContextException ucex;
48 ashish 6150
 
6151
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6152
    public enum _Fields implements TFieldIdEnum {
6153
      SUCCESS((short)0, "success"),
553 chandransh 6154
      UCEX((short)1, "ucex");
48 ashish 6155
 
6156
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6157
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6158
 
6159
      static {
6160
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6161
          byId.put((int)field._thriftId, field);
6162
          byName.put(field.getFieldName(), field);
6163
        }
6164
      }
6165
 
6166
      /**
6167
       * Find the _Fields constant that matches fieldId, or null if its not found.
6168
       */
6169
      public static _Fields findByThriftId(int fieldId) {
6170
        return byId.get(fieldId);
6171
      }
6172
 
6173
      /**
6174
       * Find the _Fields constant that matches fieldId, throwing an exception
6175
       * if it is not found.
6176
       */
6177
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6178
        _Fields fields = findByThriftId(fieldId);
6179
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6180
        return fields;
6181
      }
6182
 
6183
      /**
6184
       * Find the _Fields constant that matches name, or null if its not found.
6185
       */
6186
      public static _Fields findByName(String name) {
6187
        return byName.get(name);
6188
      }
6189
 
6190
      private final short _thriftId;
6191
      private final String _fieldName;
6192
 
6193
      _Fields(short thriftId, String fieldName) {
6194
        _thriftId = thriftId;
6195
        _fieldName = fieldName;
6196
      }
6197
 
6198
      public short getThriftFieldId() {
6199
        return _thriftId;
6200
      }
6201
 
6202
      public String getFieldName() {
6203
        return _fieldName;
6204
      }
6205
    }
6206
 
6207
    // isset id assignments
553 chandransh 6208
    private static final int __SUCCESS_ISSET_ID = 0;
6209
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6210
 
6211
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6212
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6213
          new FieldValueMetaData(TType.BOOL)));
6214
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6215
          new FieldValueMetaData(TType.STRUCT)));
6216
    }});
6217
 
6218
    static {
553 chandransh 6219
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 6220
    }
6221
 
553 chandransh 6222
    public deleteUser_result() {
48 ashish 6223
    }
6224
 
553 chandransh 6225
    public deleteUser_result(
6226
      boolean success,
6227
      UserContextException ucex)
48 ashish 6228
    {
6229
      this();
6230
      this.success = success;
553 chandransh 6231
      setSuccessIsSet(true);
6232
      this.ucex = ucex;
48 ashish 6233
    }
6234
 
6235
    /**
6236
     * Performs a deep copy on <i>other</i>.
6237
     */
553 chandransh 6238
    public deleteUser_result(deleteUser_result other) {
6239
      __isset_bit_vector.clear();
6240
      __isset_bit_vector.or(other.__isset_bit_vector);
6241
      this.success = other.success;
6242
      if (other.isSetUcex()) {
6243
        this.ucex = new UserContextException(other.ucex);
48 ashish 6244
      }
6245
    }
6246
 
553 chandransh 6247
    public deleteUser_result deepCopy() {
6248
      return new deleteUser_result(this);
48 ashish 6249
    }
6250
 
6251
    @Deprecated
553 chandransh 6252
    public deleteUser_result clone() {
6253
      return new deleteUser_result(this);
48 ashish 6254
    }
6255
 
553 chandransh 6256
    public boolean isSuccess() {
48 ashish 6257
      return this.success;
6258
    }
6259
 
553 chandransh 6260
    public deleteUser_result setSuccess(boolean success) {
48 ashish 6261
      this.success = success;
553 chandransh 6262
      setSuccessIsSet(true);
48 ashish 6263
      return this;
6264
    }
6265
 
6266
    public void unsetSuccess() {
553 chandransh 6267
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 6268
    }
6269
 
6270
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6271
    public boolean isSetSuccess() {
553 chandransh 6272
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 6273
    }
6274
 
6275
    public void setSuccessIsSet(boolean value) {
553 chandransh 6276
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 6277
    }
6278
 
553 chandransh 6279
    public UserContextException getUcex() {
6280
      return this.ucex;
48 ashish 6281
    }
6282
 
553 chandransh 6283
    public deleteUser_result setUcex(UserContextException ucex) {
6284
      this.ucex = ucex;
48 ashish 6285
      return this;
6286
    }
6287
 
553 chandransh 6288
    public void unsetUcex() {
6289
      this.ucex = null;
48 ashish 6290
    }
6291
 
553 chandransh 6292
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6293
    public boolean isSetUcex() {
6294
      return this.ucex != null;
48 ashish 6295
    }
6296
 
553 chandransh 6297
    public void setUcexIsSet(boolean value) {
48 ashish 6298
      if (!value) {
553 chandransh 6299
        this.ucex = null;
48 ashish 6300
      }
6301
    }
6302
 
6303
    public void setFieldValue(_Fields field, Object value) {
6304
      switch (field) {
6305
      case SUCCESS:
6306
        if (value == null) {
6307
          unsetSuccess();
6308
        } else {
553 chandransh 6309
          setSuccess((Boolean)value);
48 ashish 6310
        }
6311
        break;
6312
 
553 chandransh 6313
      case UCEX:
48 ashish 6314
        if (value == null) {
553 chandransh 6315
          unsetUcex();
48 ashish 6316
        } else {
553 chandransh 6317
          setUcex((UserContextException)value);
48 ashish 6318
        }
6319
        break;
6320
 
6321
      }
6322
    }
6323
 
6324
    public void setFieldValue(int fieldID, Object value) {
6325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6326
    }
6327
 
6328
    public Object getFieldValue(_Fields field) {
6329
      switch (field) {
6330
      case SUCCESS:
553 chandransh 6331
        return new Boolean(isSuccess());
48 ashish 6332
 
553 chandransh 6333
      case UCEX:
6334
        return getUcex();
48 ashish 6335
 
6336
      }
6337
      throw new IllegalStateException();
6338
    }
6339
 
6340
    public Object getFieldValue(int fieldId) {
6341
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6342
    }
6343
 
6344
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6345
    public boolean isSet(_Fields field) {
6346
      switch (field) {
6347
      case SUCCESS:
6348
        return isSetSuccess();
553 chandransh 6349
      case UCEX:
6350
        return isSetUcex();
48 ashish 6351
      }
6352
      throw new IllegalStateException();
6353
    }
6354
 
6355
    public boolean isSet(int fieldID) {
6356
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6357
    }
6358
 
6359
    @Override
6360
    public boolean equals(Object that) {
6361
      if (that == null)
6362
        return false;
553 chandransh 6363
      if (that instanceof deleteUser_result)
6364
        return this.equals((deleteUser_result)that);
48 ashish 6365
      return false;
6366
    }
6367
 
553 chandransh 6368
    public boolean equals(deleteUser_result that) {
48 ashish 6369
      if (that == null)
6370
        return false;
6371
 
553 chandransh 6372
      boolean this_present_success = true;
6373
      boolean that_present_success = true;
48 ashish 6374
      if (this_present_success || that_present_success) {
6375
        if (!(this_present_success && that_present_success))
6376
          return false;
553 chandransh 6377
        if (this.success != that.success)
48 ashish 6378
          return false;
6379
      }
6380
 
553 chandransh 6381
      boolean this_present_ucex = true && this.isSetUcex();
6382
      boolean that_present_ucex = true && that.isSetUcex();
6383
      if (this_present_ucex || that_present_ucex) {
6384
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6385
          return false;
553 chandransh 6386
        if (!this.ucex.equals(that.ucex))
48 ashish 6387
          return false;
6388
      }
6389
 
6390
      return true;
6391
    }
6392
 
6393
    @Override
6394
    public int hashCode() {
6395
      return 0;
6396
    }
6397
 
553 chandransh 6398
    public int compareTo(deleteUser_result other) {
6399
      if (!getClass().equals(other.getClass())) {
6400
        return getClass().getName().compareTo(other.getClass().getName());
6401
      }
6402
 
6403
      int lastComparison = 0;
6404
      deleteUser_result typedOther = (deleteUser_result)other;
6405
 
6406
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6407
      if (lastComparison != 0) {
6408
        return lastComparison;
6409
      }
6410
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6411
      if (lastComparison != 0) {
6412
        return lastComparison;
6413
      }
6414
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6415
      if (lastComparison != 0) {
6416
        return lastComparison;
6417
      }
6418
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6419
      if (lastComparison != 0) {
6420
        return lastComparison;
6421
      }
6422
      return 0;
6423
    }
6424
 
48 ashish 6425
    public void read(TProtocol iprot) throws TException {
6426
      TField field;
6427
      iprot.readStructBegin();
6428
      while (true)
6429
      {
6430
        field = iprot.readFieldBegin();
6431
        if (field.type == TType.STOP) { 
6432
          break;
6433
        }
6434
        _Fields fieldId = _Fields.findByThriftId(field.id);
6435
        if (fieldId == null) {
6436
          TProtocolUtil.skip(iprot, field.type);
6437
        } else {
6438
          switch (fieldId) {
6439
            case SUCCESS:
553 chandransh 6440
              if (field.type == TType.BOOL) {
6441
                this.success = iprot.readBool();
6442
                setSuccessIsSet(true);
48 ashish 6443
              } else { 
6444
                TProtocolUtil.skip(iprot, field.type);
6445
              }
6446
              break;
553 chandransh 6447
            case UCEX:
48 ashish 6448
              if (field.type == TType.STRUCT) {
553 chandransh 6449
                this.ucex = new UserContextException();
6450
                this.ucex.read(iprot);
48 ashish 6451
              } else { 
6452
                TProtocolUtil.skip(iprot, field.type);
6453
              }
6454
              break;
6455
          }
6456
          iprot.readFieldEnd();
6457
        }
6458
      }
6459
      iprot.readStructEnd();
6460
      validate();
6461
    }
6462
 
6463
    public void write(TProtocol oprot) throws TException {
6464
      oprot.writeStructBegin(STRUCT_DESC);
6465
 
6466
      if (this.isSetSuccess()) {
6467
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6468
        oprot.writeBool(this.success);
48 ashish 6469
        oprot.writeFieldEnd();
553 chandransh 6470
      } else if (this.isSetUcex()) {
6471
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6472
        this.ucex.write(oprot);
48 ashish 6473
        oprot.writeFieldEnd();
6474
      }
6475
      oprot.writeFieldStop();
6476
      oprot.writeStructEnd();
6477
    }
6478
 
6479
    @Override
6480
    public String toString() {
553 chandransh 6481
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6482
      boolean first = true;
6483
 
6484
      sb.append("success:");
553 chandransh 6485
      sb.append(this.success);
48 ashish 6486
      first = false;
6487
      if (!first) sb.append(", ");
553 chandransh 6488
      sb.append("ucex:");
6489
      if (this.ucex == null) {
48 ashish 6490
        sb.append("null");
6491
      } else {
553 chandransh 6492
        sb.append(this.ucex);
48 ashish 6493
      }
6494
      first = false;
6495
      sb.append(")");
6496
      return sb.toString();
6497
    }
6498
 
6499
    public void validate() throws TException {
6500
      // check for required fields
6501
    }
6502
 
6503
  }
6504
 
553 chandransh 6505
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6506
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6507
 
6508
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6509
 
6510
    private long userId;
6511
 
6512
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6513
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6514
      USER_ID((short)1, "userId");
48 ashish 6515
 
6516
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6517
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6518
 
6519
      static {
6520
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6521
          byId.put((int)field._thriftId, field);
6522
          byName.put(field.getFieldName(), field);
6523
        }
6524
      }
6525
 
6526
      /**
6527
       * Find the _Fields constant that matches fieldId, or null if its not found.
6528
       */
6529
      public static _Fields findByThriftId(int fieldId) {
6530
        return byId.get(fieldId);
6531
      }
6532
 
6533
      /**
6534
       * Find the _Fields constant that matches fieldId, throwing an exception
6535
       * if it is not found.
6536
       */
6537
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6538
        _Fields fields = findByThriftId(fieldId);
6539
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6540
        return fields;
6541
      }
6542
 
6543
      /**
6544
       * Find the _Fields constant that matches name, or null if its not found.
6545
       */
6546
      public static _Fields findByName(String name) {
6547
        return byName.get(name);
6548
      }
6549
 
6550
      private final short _thriftId;
6551
      private final String _fieldName;
6552
 
6553
      _Fields(short thriftId, String fieldName) {
6554
        _thriftId = thriftId;
6555
        _fieldName = fieldName;
6556
      }
6557
 
6558
      public short getThriftFieldId() {
6559
        return _thriftId;
6560
      }
6561
 
6562
      public String getFieldName() {
6563
        return _fieldName;
6564
      }
6565
    }
6566
 
6567
    // isset id assignments
6568
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6569
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6570
 
6571
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6572
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6573
          new FieldValueMetaData(TType.I64)));
6574
    }});
6575
 
6576
    static {
553 chandransh 6577
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6578
    }
6579
 
553 chandransh 6580
    public getUserState_args() {
48 ashish 6581
    }
6582
 
553 chandransh 6583
    public getUserState_args(
6584
      long userId)
48 ashish 6585
    {
6586
      this();
6587
      this.userId = userId;
6588
      setUserIdIsSet(true);
6589
    }
6590
 
6591
    /**
6592
     * Performs a deep copy on <i>other</i>.
6593
     */
553 chandransh 6594
    public getUserState_args(getUserState_args other) {
48 ashish 6595
      __isset_bit_vector.clear();
6596
      __isset_bit_vector.or(other.__isset_bit_vector);
6597
      this.userId = other.userId;
6598
    }
6599
 
553 chandransh 6600
    public getUserState_args deepCopy() {
6601
      return new getUserState_args(this);
48 ashish 6602
    }
6603
 
6604
    @Deprecated
553 chandransh 6605
    public getUserState_args clone() {
6606
      return new getUserState_args(this);
48 ashish 6607
    }
6608
 
6609
    public long getUserId() {
6610
      return this.userId;
6611
    }
6612
 
553 chandransh 6613
    public getUserState_args setUserId(long userId) {
48 ashish 6614
      this.userId = userId;
6615
      setUserIdIsSet(true);
6616
      return this;
6617
    }
6618
 
6619
    public void unsetUserId() {
6620
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6621
    }
6622
 
6623
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6624
    public boolean isSetUserId() {
6625
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6626
    }
6627
 
6628
    public void setUserIdIsSet(boolean value) {
6629
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6630
    }
6631
 
6632
    public void setFieldValue(_Fields field, Object value) {
6633
      switch (field) {
6634
      case USER_ID:
6635
        if (value == null) {
6636
          unsetUserId();
6637
        } else {
6638
          setUserId((Long)value);
6639
        }
6640
        break;
6641
 
6642
      }
6643
    }
6644
 
6645
    public void setFieldValue(int fieldID, Object value) {
6646
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6647
    }
6648
 
6649
    public Object getFieldValue(_Fields field) {
6650
      switch (field) {
6651
      case USER_ID:
6652
        return new Long(getUserId());
6653
 
6654
      }
6655
      throw new IllegalStateException();
6656
    }
6657
 
6658
    public Object getFieldValue(int fieldId) {
6659
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6660
    }
6661
 
6662
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6663
    public boolean isSet(_Fields field) {
6664
      switch (field) {
6665
      case USER_ID:
6666
        return isSetUserId();
6667
      }
6668
      throw new IllegalStateException();
6669
    }
6670
 
6671
    public boolean isSet(int fieldID) {
6672
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6673
    }
6674
 
6675
    @Override
6676
    public boolean equals(Object that) {
6677
      if (that == null)
6678
        return false;
553 chandransh 6679
      if (that instanceof getUserState_args)
6680
        return this.equals((getUserState_args)that);
48 ashish 6681
      return false;
6682
    }
6683
 
553 chandransh 6684
    public boolean equals(getUserState_args that) {
48 ashish 6685
      if (that == null)
6686
        return false;
6687
 
6688
      boolean this_present_userId = true;
6689
      boolean that_present_userId = true;
6690
      if (this_present_userId || that_present_userId) {
6691
        if (!(this_present_userId && that_present_userId))
6692
          return false;
6693
        if (this.userId != that.userId)
6694
          return false;
6695
      }
6696
 
6697
      return true;
6698
    }
6699
 
6700
    @Override
6701
    public int hashCode() {
6702
      return 0;
6703
    }
6704
 
553 chandransh 6705
    public int compareTo(getUserState_args other) {
48 ashish 6706
      if (!getClass().equals(other.getClass())) {
6707
        return getClass().getName().compareTo(other.getClass().getName());
6708
      }
6709
 
6710
      int lastComparison = 0;
553 chandransh 6711
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6712
 
6713
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6714
      if (lastComparison != 0) {
6715
        return lastComparison;
6716
      }
6717
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6718
      if (lastComparison != 0) {
6719
        return lastComparison;
6720
      }
6721
      return 0;
6722
    }
6723
 
6724
    public void read(TProtocol iprot) throws TException {
6725
      TField field;
6726
      iprot.readStructBegin();
6727
      while (true)
6728
      {
6729
        field = iprot.readFieldBegin();
6730
        if (field.type == TType.STOP) { 
6731
          break;
6732
        }
6733
        _Fields fieldId = _Fields.findByThriftId(field.id);
6734
        if (fieldId == null) {
6735
          TProtocolUtil.skip(iprot, field.type);
6736
        } else {
6737
          switch (fieldId) {
6738
            case USER_ID:
6739
              if (field.type == TType.I64) {
6740
                this.userId = iprot.readI64();
6741
                setUserIdIsSet(true);
6742
              } else { 
6743
                TProtocolUtil.skip(iprot, field.type);
6744
              }
6745
              break;
6746
          }
6747
          iprot.readFieldEnd();
6748
        }
6749
      }
6750
      iprot.readStructEnd();
6751
      validate();
6752
    }
6753
 
6754
    public void write(TProtocol oprot) throws TException {
6755
      validate();
6756
 
6757
      oprot.writeStructBegin(STRUCT_DESC);
6758
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6759
      oprot.writeI64(this.userId);
6760
      oprot.writeFieldEnd();
6761
      oprot.writeFieldStop();
6762
      oprot.writeStructEnd();
6763
    }
6764
 
6765
    @Override
6766
    public String toString() {
553 chandransh 6767
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6768
      boolean first = true;
6769
 
6770
      sb.append("userId:");
6771
      sb.append(this.userId);
6772
      first = false;
6773
      sb.append(")");
6774
      return sb.toString();
6775
    }
6776
 
6777
    public void validate() throws TException {
6778
      // check for required fields
6779
    }
6780
 
6781
  }
6782
 
553 chandransh 6783
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6784
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6785
 
6786
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6787
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6788
 
553 chandransh 6789
    private UserState success;
6790
    private UserContextException ucex;
48 ashish 6791
 
6792
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6793
    public enum _Fields implements TFieldIdEnum {
6794
      SUCCESS((short)0, "success"),
553 chandransh 6795
      UCEX((short)1, "ucex");
48 ashish 6796
 
6797
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6798
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6799
 
6800
      static {
6801
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6802
          byId.put((int)field._thriftId, field);
6803
          byName.put(field.getFieldName(), field);
6804
        }
6805
      }
6806
 
6807
      /**
6808
       * Find the _Fields constant that matches fieldId, or null if its not found.
6809
       */
6810
      public static _Fields findByThriftId(int fieldId) {
6811
        return byId.get(fieldId);
6812
      }
6813
 
6814
      /**
6815
       * Find the _Fields constant that matches fieldId, throwing an exception
6816
       * if it is not found.
6817
       */
6818
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6819
        _Fields fields = findByThriftId(fieldId);
6820
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6821
        return fields;
6822
      }
6823
 
6824
      /**
6825
       * Find the _Fields constant that matches name, or null if its not found.
6826
       */
6827
      public static _Fields findByName(String name) {
6828
        return byName.get(name);
6829
      }
6830
 
6831
      private final short _thriftId;
6832
      private final String _fieldName;
6833
 
6834
      _Fields(short thriftId, String fieldName) {
6835
        _thriftId = thriftId;
6836
        _fieldName = fieldName;
6837
      }
6838
 
6839
      public short getThriftFieldId() {
6840
        return _thriftId;
6841
      }
6842
 
6843
      public String getFieldName() {
6844
        return _fieldName;
6845
      }
6846
    }
6847
 
6848
    // isset id assignments
6849
 
6850
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6851
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6852
          new StructMetaData(TType.STRUCT, UserState.class)));
6853
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6854
          new FieldValueMetaData(TType.STRUCT)));
6855
    }});
6856
 
6857
    static {
553 chandransh 6858
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6859
    }
6860
 
553 chandransh 6861
    public getUserState_result() {
48 ashish 6862
    }
6863
 
553 chandransh 6864
    public getUserState_result(
6865
      UserState success,
6866
      UserContextException ucex)
48 ashish 6867
    {
6868
      this();
6869
      this.success = success;
553 chandransh 6870
      this.ucex = ucex;
48 ashish 6871
    }
6872
 
6873
    /**
6874
     * Performs a deep copy on <i>other</i>.
6875
     */
553 chandransh 6876
    public getUserState_result(getUserState_result other) {
48 ashish 6877
      if (other.isSetSuccess()) {
553 chandransh 6878
        this.success = new UserState(other.success);
48 ashish 6879
      }
553 chandransh 6880
      if (other.isSetUcex()) {
6881
        this.ucex = new UserContextException(other.ucex);
48 ashish 6882
      }
6883
    }
6884
 
553 chandransh 6885
    public getUserState_result deepCopy() {
6886
      return new getUserState_result(this);
48 ashish 6887
    }
6888
 
6889
    @Deprecated
553 chandransh 6890
    public getUserState_result clone() {
6891
      return new getUserState_result(this);
48 ashish 6892
    }
6893
 
553 chandransh 6894
    public UserState getSuccess() {
48 ashish 6895
      return this.success;
6896
    }
6897
 
553 chandransh 6898
    public getUserState_result setSuccess(UserState success) {
48 ashish 6899
      this.success = success;
6900
      return this;
6901
    }
6902
 
6903
    public void unsetSuccess() {
6904
      this.success = null;
6905
    }
6906
 
6907
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6908
    public boolean isSetSuccess() {
6909
      return this.success != null;
6910
    }
6911
 
6912
    public void setSuccessIsSet(boolean value) {
6913
      if (!value) {
6914
        this.success = null;
6915
      }
6916
    }
6917
 
553 chandransh 6918
    public UserContextException getUcex() {
6919
      return this.ucex;
48 ashish 6920
    }
6921
 
553 chandransh 6922
    public getUserState_result setUcex(UserContextException ucex) {
6923
      this.ucex = ucex;
48 ashish 6924
      return this;
6925
    }
6926
 
553 chandransh 6927
    public void unsetUcex() {
6928
      this.ucex = null;
48 ashish 6929
    }
6930
 
553 chandransh 6931
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6932
    public boolean isSetUcex() {
6933
      return this.ucex != null;
48 ashish 6934
    }
6935
 
553 chandransh 6936
    public void setUcexIsSet(boolean value) {
48 ashish 6937
      if (!value) {
553 chandransh 6938
        this.ucex = null;
48 ashish 6939
      }
6940
    }
6941
 
6942
    public void setFieldValue(_Fields field, Object value) {
6943
      switch (field) {
6944
      case SUCCESS:
6945
        if (value == null) {
6946
          unsetSuccess();
6947
        } else {
553 chandransh 6948
          setSuccess((UserState)value);
48 ashish 6949
        }
6950
        break;
6951
 
553 chandransh 6952
      case UCEX:
48 ashish 6953
        if (value == null) {
553 chandransh 6954
          unsetUcex();
48 ashish 6955
        } else {
553 chandransh 6956
          setUcex((UserContextException)value);
48 ashish 6957
        }
6958
        break;
6959
 
6960
      }
6961
    }
6962
 
6963
    public void setFieldValue(int fieldID, Object value) {
6964
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6965
    }
6966
 
6967
    public Object getFieldValue(_Fields field) {
6968
      switch (field) {
6969
      case SUCCESS:
6970
        return getSuccess();
6971
 
553 chandransh 6972
      case UCEX:
6973
        return getUcex();
48 ashish 6974
 
6975
      }
6976
      throw new IllegalStateException();
6977
    }
6978
 
6979
    public Object getFieldValue(int fieldId) {
6980
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6981
    }
6982
 
6983
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6984
    public boolean isSet(_Fields field) {
6985
      switch (field) {
6986
      case SUCCESS:
6987
        return isSetSuccess();
553 chandransh 6988
      case UCEX:
6989
        return isSetUcex();
48 ashish 6990
      }
6991
      throw new IllegalStateException();
6992
    }
6993
 
6994
    public boolean isSet(int fieldID) {
6995
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6996
    }
6997
 
6998
    @Override
6999
    public boolean equals(Object that) {
7000
      if (that == null)
7001
        return false;
553 chandransh 7002
      if (that instanceof getUserState_result)
7003
        return this.equals((getUserState_result)that);
48 ashish 7004
      return false;
7005
    }
7006
 
553 chandransh 7007
    public boolean equals(getUserState_result that) {
48 ashish 7008
      if (that == null)
7009
        return false;
7010
 
7011
      boolean this_present_success = true && this.isSetSuccess();
7012
      boolean that_present_success = true && that.isSetSuccess();
7013
      if (this_present_success || that_present_success) {
7014
        if (!(this_present_success && that_present_success))
7015
          return false;
7016
        if (!this.success.equals(that.success))
7017
          return false;
7018
      }
7019
 
553 chandransh 7020
      boolean this_present_ucex = true && this.isSetUcex();
7021
      boolean that_present_ucex = true && that.isSetUcex();
7022
      if (this_present_ucex || that_present_ucex) {
7023
        if (!(this_present_ucex && that_present_ucex))
48 ashish 7024
          return false;
553 chandransh 7025
        if (!this.ucex.equals(that.ucex))
48 ashish 7026
          return false;
7027
      }
7028
 
7029
      return true;
7030
    }
7031
 
7032
    @Override
7033
    public int hashCode() {
7034
      return 0;
7035
    }
7036
 
553 chandransh 7037
    public int compareTo(getUserState_result other) {
48 ashish 7038
      if (!getClass().equals(other.getClass())) {
7039
        return getClass().getName().compareTo(other.getClass().getName());
7040
      }
7041
 
7042
      int lastComparison = 0;
553 chandransh 7043
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 7044
 
7045
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7046
      if (lastComparison != 0) {
7047
        return lastComparison;
7048
      }
7049
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7050
      if (lastComparison != 0) {
7051
        return lastComparison;
7052
      }
553 chandransh 7053
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 7054
      if (lastComparison != 0) {
7055
        return lastComparison;
7056
      }
553 chandransh 7057
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 7058
      if (lastComparison != 0) {
7059
        return lastComparison;
7060
      }
7061
      return 0;
7062
    }
7063
 
7064
    public void read(TProtocol iprot) throws TException {
7065
      TField field;
7066
      iprot.readStructBegin();
7067
      while (true)
7068
      {
7069
        field = iprot.readFieldBegin();
7070
        if (field.type == TType.STOP) { 
7071
          break;
7072
        }
7073
        _Fields fieldId = _Fields.findByThriftId(field.id);
7074
        if (fieldId == null) {
7075
          TProtocolUtil.skip(iprot, field.type);
7076
        } else {
7077
          switch (fieldId) {
7078
            case SUCCESS:
7079
              if (field.type == TType.STRUCT) {
553 chandransh 7080
                this.success = new UserState();
48 ashish 7081
                this.success.read(iprot);
7082
              } else { 
7083
                TProtocolUtil.skip(iprot, field.type);
7084
              }
7085
              break;
553 chandransh 7086
            case UCEX:
48 ashish 7087
              if (field.type == TType.STRUCT) {
553 chandransh 7088
                this.ucex = new UserContextException();
7089
                this.ucex.read(iprot);
48 ashish 7090
              } else { 
7091
                TProtocolUtil.skip(iprot, field.type);
7092
              }
7093
              break;
7094
          }
7095
          iprot.readFieldEnd();
7096
        }
7097
      }
7098
      iprot.readStructEnd();
7099
      validate();
7100
    }
7101
 
7102
    public void write(TProtocol oprot) throws TException {
7103
      oprot.writeStructBegin(STRUCT_DESC);
7104
 
7105
      if (this.isSetSuccess()) {
7106
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7107
        this.success.write(oprot);
7108
        oprot.writeFieldEnd();
553 chandransh 7109
      } else if (this.isSetUcex()) {
7110
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7111
        this.ucex.write(oprot);
48 ashish 7112
        oprot.writeFieldEnd();
7113
      }
7114
      oprot.writeFieldStop();
7115
      oprot.writeStructEnd();
7116
    }
7117
 
7118
    @Override
7119
    public String toString() {
553 chandransh 7120
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 7121
      boolean first = true;
7122
 
7123
      sb.append("success:");
7124
      if (this.success == null) {
7125
        sb.append("null");
7126
      } else {
7127
        sb.append(this.success);
7128
      }
7129
      first = false;
7130
      if (!first) sb.append(", ");
553 chandransh 7131
      sb.append("ucex:");
7132
      if (this.ucex == null) {
48 ashish 7133
        sb.append("null");
7134
      } else {
553 chandransh 7135
        sb.append(this.ucex);
48 ashish 7136
      }
7137
      first = false;
7138
      sb.append(")");
7139
      return sb.toString();
7140
    }
7141
 
7142
    public void validate() throws TException {
7143
      // check for required fields
7144
    }
7145
 
7146
  }
7147
 
553 chandransh 7148
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
7149
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 7150
 
7151
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7152
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7153
 
7154
    private String email;
7155
    private String password;
7156
 
7157
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7158
    public enum _Fields implements TFieldIdEnum {
7159
      EMAIL((short)1, "email"),
7160
      PASSWORD((short)2, "password");
7161
 
7162
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7163
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7164
 
7165
      static {
7166
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7167
          byId.put((int)field._thriftId, field);
7168
          byName.put(field.getFieldName(), field);
7169
        }
7170
      }
7171
 
7172
      /**
7173
       * Find the _Fields constant that matches fieldId, or null if its not found.
7174
       */
7175
      public static _Fields findByThriftId(int fieldId) {
7176
        return byId.get(fieldId);
7177
      }
7178
 
7179
      /**
7180
       * Find the _Fields constant that matches fieldId, throwing an exception
7181
       * if it is not found.
7182
       */
7183
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7184
        _Fields fields = findByThriftId(fieldId);
7185
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7186
        return fields;
7187
      }
7188
 
7189
      /**
7190
       * Find the _Fields constant that matches name, or null if its not found.
7191
       */
7192
      public static _Fields findByName(String name) {
7193
        return byName.get(name);
7194
      }
7195
 
7196
      private final short _thriftId;
7197
      private final String _fieldName;
7198
 
7199
      _Fields(short thriftId, String fieldName) {
7200
        _thriftId = thriftId;
7201
        _fieldName = fieldName;
7202
      }
7203
 
7204
      public short getThriftFieldId() {
7205
        return _thriftId;
7206
      }
7207
 
7208
      public String getFieldName() {
7209
        return _fieldName;
7210
      }
7211
    }
7212
 
7213
    // isset id assignments
7214
 
7215
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7216
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7217
          new FieldValueMetaData(TType.STRING)));
7218
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
7219
          new FieldValueMetaData(TType.STRING)));
7220
    }});
7221
 
7222
    static {
553 chandransh 7223
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 7224
    }
7225
 
553 chandransh 7226
    public authenticateUser_args() {
48 ashish 7227
    }
7228
 
553 chandransh 7229
    public authenticateUser_args(
48 ashish 7230
      String email,
7231
      String password)
7232
    {
7233
      this();
7234
      this.email = email;
7235
      this.password = password;
7236
    }
7237
 
7238
    /**
7239
     * Performs a deep copy on <i>other</i>.
7240
     */
553 chandransh 7241
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 7242
      if (other.isSetEmail()) {
7243
        this.email = other.email;
7244
      }
7245
      if (other.isSetPassword()) {
7246
        this.password = other.password;
7247
      }
7248
    }
7249
 
553 chandransh 7250
    public authenticateUser_args deepCopy() {
7251
      return new authenticateUser_args(this);
48 ashish 7252
    }
7253
 
7254
    @Deprecated
553 chandransh 7255
    public authenticateUser_args clone() {
7256
      return new authenticateUser_args(this);
48 ashish 7257
    }
7258
 
7259
    public String getEmail() {
7260
      return this.email;
7261
    }
7262
 
553 chandransh 7263
    public authenticateUser_args setEmail(String email) {
48 ashish 7264
      this.email = email;
7265
      return this;
7266
    }
7267
 
7268
    public void unsetEmail() {
7269
      this.email = null;
7270
    }
7271
 
7272
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7273
    public boolean isSetEmail() {
7274
      return this.email != null;
7275
    }
7276
 
7277
    public void setEmailIsSet(boolean value) {
7278
      if (!value) {
7279
        this.email = null;
7280
      }
7281
    }
7282
 
7283
    public String getPassword() {
7284
      return this.password;
7285
    }
7286
 
553 chandransh 7287
    public authenticateUser_args setPassword(String password) {
48 ashish 7288
      this.password = password;
7289
      return this;
7290
    }
7291
 
7292
    public void unsetPassword() {
7293
      this.password = null;
7294
    }
7295
 
7296
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7297
    public boolean isSetPassword() {
7298
      return this.password != null;
7299
    }
7300
 
7301
    public void setPasswordIsSet(boolean value) {
7302
      if (!value) {
7303
        this.password = null;
7304
      }
7305
    }
7306
 
7307
    public void setFieldValue(_Fields field, Object value) {
7308
      switch (field) {
7309
      case EMAIL:
7310
        if (value == null) {
7311
          unsetEmail();
7312
        } else {
7313
          setEmail((String)value);
7314
        }
7315
        break;
7316
 
7317
      case PASSWORD:
7318
        if (value == null) {
7319
          unsetPassword();
7320
        } else {
7321
          setPassword((String)value);
7322
        }
7323
        break;
7324
 
7325
      }
7326
    }
7327
 
7328
    public void setFieldValue(int fieldID, Object value) {
7329
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7330
    }
7331
 
7332
    public Object getFieldValue(_Fields field) {
7333
      switch (field) {
7334
      case EMAIL:
7335
        return getEmail();
7336
 
7337
      case PASSWORD:
7338
        return getPassword();
7339
 
7340
      }
7341
      throw new IllegalStateException();
7342
    }
7343
 
7344
    public Object getFieldValue(int fieldId) {
7345
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7346
    }
7347
 
7348
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7349
    public boolean isSet(_Fields field) {
7350
      switch (field) {
7351
      case EMAIL:
7352
        return isSetEmail();
7353
      case PASSWORD:
7354
        return isSetPassword();
7355
      }
7356
      throw new IllegalStateException();
7357
    }
7358
 
7359
    public boolean isSet(int fieldID) {
7360
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7361
    }
7362
 
7363
    @Override
7364
    public boolean equals(Object that) {
7365
      if (that == null)
7366
        return false;
553 chandransh 7367
      if (that instanceof authenticateUser_args)
7368
        return this.equals((authenticateUser_args)that);
48 ashish 7369
      return false;
7370
    }
7371
 
553 chandransh 7372
    public boolean equals(authenticateUser_args that) {
48 ashish 7373
      if (that == null)
7374
        return false;
7375
 
7376
      boolean this_present_email = true && this.isSetEmail();
7377
      boolean that_present_email = true && that.isSetEmail();
7378
      if (this_present_email || that_present_email) {
7379
        if (!(this_present_email && that_present_email))
7380
          return false;
7381
        if (!this.email.equals(that.email))
7382
          return false;
7383
      }
7384
 
7385
      boolean this_present_password = true && this.isSetPassword();
7386
      boolean that_present_password = true && that.isSetPassword();
7387
      if (this_present_password || that_present_password) {
7388
        if (!(this_present_password && that_present_password))
7389
          return false;
7390
        if (!this.password.equals(that.password))
7391
          return false;
7392
      }
7393
 
7394
      return true;
7395
    }
7396
 
7397
    @Override
7398
    public int hashCode() {
7399
      return 0;
7400
    }
7401
 
553 chandransh 7402
    public int compareTo(authenticateUser_args other) {
48 ashish 7403
      if (!getClass().equals(other.getClass())) {
7404
        return getClass().getName().compareTo(other.getClass().getName());
7405
      }
7406
 
7407
      int lastComparison = 0;
553 chandransh 7408
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 7409
 
7410
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7411
      if (lastComparison != 0) {
7412
        return lastComparison;
7413
      }
7414
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7415
      if (lastComparison != 0) {
7416
        return lastComparison;
7417
      }
7418
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7419
      if (lastComparison != 0) {
7420
        return lastComparison;
7421
      }
7422
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7423
      if (lastComparison != 0) {
7424
        return lastComparison;
7425
      }
7426
      return 0;
7427
    }
7428
 
7429
    public void read(TProtocol iprot) throws TException {
7430
      TField field;
7431
      iprot.readStructBegin();
7432
      while (true)
7433
      {
7434
        field = iprot.readFieldBegin();
7435
        if (field.type == TType.STOP) { 
7436
          break;
7437
        }
7438
        _Fields fieldId = _Fields.findByThriftId(field.id);
7439
        if (fieldId == null) {
7440
          TProtocolUtil.skip(iprot, field.type);
7441
        } else {
7442
          switch (fieldId) {
7443
            case EMAIL:
7444
              if (field.type == TType.STRING) {
7445
                this.email = iprot.readString();
7446
              } else { 
7447
                TProtocolUtil.skip(iprot, field.type);
7448
              }
7449
              break;
7450
            case PASSWORD:
7451
              if (field.type == TType.STRING) {
7452
                this.password = iprot.readString();
7453
              } else { 
7454
                TProtocolUtil.skip(iprot, field.type);
7455
              }
7456
              break;
7457
          }
7458
          iprot.readFieldEnd();
7459
        }
7460
      }
7461
      iprot.readStructEnd();
7462
      validate();
7463
    }
7464
 
7465
    public void write(TProtocol oprot) throws TException {
7466
      validate();
7467
 
7468
      oprot.writeStructBegin(STRUCT_DESC);
7469
      if (this.email != null) {
7470
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7471
        oprot.writeString(this.email);
7472
        oprot.writeFieldEnd();
7473
      }
7474
      if (this.password != null) {
7475
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7476
        oprot.writeString(this.password);
7477
        oprot.writeFieldEnd();
7478
      }
7479
      oprot.writeFieldStop();
7480
      oprot.writeStructEnd();
7481
    }
7482
 
7483
    @Override
7484
    public String toString() {
553 chandransh 7485
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7486
      boolean first = true;
7487
 
7488
      sb.append("email:");
7489
      if (this.email == null) {
7490
        sb.append("null");
7491
      } else {
7492
        sb.append(this.email);
7493
      }
7494
      first = false;
7495
      if (!first) sb.append(", ");
7496
      sb.append("password:");
7497
      if (this.password == null) {
7498
        sb.append("null");
7499
      } else {
7500
        sb.append(this.password);
7501
      }
7502
      first = false;
7503
      sb.append(")");
7504
      return sb.toString();
7505
    }
7506
 
7507
    public void validate() throws TException {
7508
      // check for required fields
7509
    }
7510
 
7511
  }
7512
 
571 rajveer 7513
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7514
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7515
 
7516
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7517
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7518
 
553 chandransh 7519
    private User success;
7520
    private AuthenticationException auex;
48 ashish 7521
 
7522
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7523
    public enum _Fields implements TFieldIdEnum {
7524
      SUCCESS((short)0, "success"),
553 chandransh 7525
      AUEX((short)1, "auex");
48 ashish 7526
 
7527
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7528
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7529
 
7530
      static {
7531
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7532
          byId.put((int)field._thriftId, field);
7533
          byName.put(field.getFieldName(), field);
7534
        }
7535
      }
7536
 
7537
      /**
7538
       * Find the _Fields constant that matches fieldId, or null if its not found.
7539
       */
7540
      public static _Fields findByThriftId(int fieldId) {
7541
        return byId.get(fieldId);
7542
      }
7543
 
7544
      /**
7545
       * Find the _Fields constant that matches fieldId, throwing an exception
7546
       * if it is not found.
7547
       */
7548
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7549
        _Fields fields = findByThriftId(fieldId);
7550
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7551
        return fields;
7552
      }
7553
 
7554
      /**
7555
       * Find the _Fields constant that matches name, or null if its not found.
7556
       */
7557
      public static _Fields findByName(String name) {
7558
        return byName.get(name);
7559
      }
7560
 
7561
      private final short _thriftId;
7562
      private final String _fieldName;
7563
 
7564
      _Fields(short thriftId, String fieldName) {
7565
        _thriftId = thriftId;
7566
        _fieldName = fieldName;
7567
      }
7568
 
7569
      public short getThriftFieldId() {
7570
        return _thriftId;
7571
      }
7572
 
7573
      public String getFieldName() {
7574
        return _fieldName;
7575
      }
7576
    }
7577
 
7578
    // isset id assignments
7579
 
7580
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7581
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7582
          new StructMetaData(TType.STRUCT, User.class)));
7583
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7584
          new FieldValueMetaData(TType.STRUCT)));
7585
    }});
7586
 
7587
    static {
553 chandransh 7588
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7589
    }
7590
 
553 chandransh 7591
    public authenticateUser_result() {
48 ashish 7592
    }
7593
 
553 chandransh 7594
    public authenticateUser_result(
7595
      User success,
7596
      AuthenticationException auex)
48 ashish 7597
    {
7598
      this();
7599
      this.success = success;
553 chandransh 7600
      this.auex = auex;
48 ashish 7601
    }
7602
 
7603
    /**
7604
     * Performs a deep copy on <i>other</i>.
7605
     */
553 chandransh 7606
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7607
      if (other.isSetSuccess()) {
553 chandransh 7608
        this.success = new User(other.success);
48 ashish 7609
      }
553 chandransh 7610
      if (other.isSetAuex()) {
7611
        this.auex = new AuthenticationException(other.auex);
48 ashish 7612
      }
7613
    }
7614
 
553 chandransh 7615
    public authenticateUser_result deepCopy() {
7616
      return new authenticateUser_result(this);
48 ashish 7617
    }
7618
 
7619
    @Deprecated
553 chandransh 7620
    public authenticateUser_result clone() {
7621
      return new authenticateUser_result(this);
48 ashish 7622
    }
7623
 
553 chandransh 7624
    public User getSuccess() {
48 ashish 7625
      return this.success;
7626
    }
7627
 
553 chandransh 7628
    public authenticateUser_result setSuccess(User success) {
48 ashish 7629
      this.success = success;
7630
      return this;
7631
    }
7632
 
7633
    public void unsetSuccess() {
7634
      this.success = null;
7635
    }
7636
 
7637
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7638
    public boolean isSetSuccess() {
7639
      return this.success != null;
7640
    }
7641
 
7642
    public void setSuccessIsSet(boolean value) {
7643
      if (!value) {
7644
        this.success = null;
7645
      }
7646
    }
7647
 
553 chandransh 7648
    public AuthenticationException getAuex() {
7649
      return this.auex;
48 ashish 7650
    }
7651
 
553 chandransh 7652
    public authenticateUser_result setAuex(AuthenticationException auex) {
7653
      this.auex = auex;
48 ashish 7654
      return this;
7655
    }
7656
 
553 chandransh 7657
    public void unsetAuex() {
7658
      this.auex = null;
48 ashish 7659
    }
7660
 
553 chandransh 7661
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7662
    public boolean isSetAuex() {
7663
      return this.auex != null;
48 ashish 7664
    }
7665
 
553 chandransh 7666
    public void setAuexIsSet(boolean value) {
48 ashish 7667
      if (!value) {
553 chandransh 7668
        this.auex = null;
48 ashish 7669
      }
7670
    }
7671
 
7672
    public void setFieldValue(_Fields field, Object value) {
7673
      switch (field) {
7674
      case SUCCESS:
7675
        if (value == null) {
7676
          unsetSuccess();
7677
        } else {
553 chandransh 7678
          setSuccess((User)value);
48 ashish 7679
        }
7680
        break;
7681
 
553 chandransh 7682
      case AUEX:
48 ashish 7683
        if (value == null) {
553 chandransh 7684
          unsetAuex();
48 ashish 7685
        } else {
553 chandransh 7686
          setAuex((AuthenticationException)value);
48 ashish 7687
        }
7688
        break;
7689
 
7690
      }
7691
    }
7692
 
7693
    public void setFieldValue(int fieldID, Object value) {
7694
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7695
    }
7696
 
7697
    public Object getFieldValue(_Fields field) {
7698
      switch (field) {
7699
      case SUCCESS:
7700
        return getSuccess();
7701
 
553 chandransh 7702
      case AUEX:
7703
        return getAuex();
48 ashish 7704
 
7705
      }
7706
      throw new IllegalStateException();
7707
    }
7708
 
7709
    public Object getFieldValue(int fieldId) {
7710
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7711
    }
7712
 
7713
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7714
    public boolean isSet(_Fields field) {
7715
      switch (field) {
7716
      case SUCCESS:
7717
        return isSetSuccess();
553 chandransh 7718
      case AUEX:
7719
        return isSetAuex();
48 ashish 7720
      }
7721
      throw new IllegalStateException();
7722
    }
7723
 
7724
    public boolean isSet(int fieldID) {
7725
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7726
    }
7727
 
7728
    @Override
7729
    public boolean equals(Object that) {
7730
      if (that == null)
7731
        return false;
553 chandransh 7732
      if (that instanceof authenticateUser_result)
7733
        return this.equals((authenticateUser_result)that);
48 ashish 7734
      return false;
7735
    }
7736
 
553 chandransh 7737
    public boolean equals(authenticateUser_result that) {
48 ashish 7738
      if (that == null)
7739
        return false;
7740
 
7741
      boolean this_present_success = true && this.isSetSuccess();
7742
      boolean that_present_success = true && that.isSetSuccess();
7743
      if (this_present_success || that_present_success) {
7744
        if (!(this_present_success && that_present_success))
7745
          return false;
7746
        if (!this.success.equals(that.success))
7747
          return false;
7748
      }
7749
 
553 chandransh 7750
      boolean this_present_auex = true && this.isSetAuex();
7751
      boolean that_present_auex = true && that.isSetAuex();
7752
      if (this_present_auex || that_present_auex) {
7753
        if (!(this_present_auex && that_present_auex))
48 ashish 7754
          return false;
553 chandransh 7755
        if (!this.auex.equals(that.auex))
48 ashish 7756
          return false;
7757
      }
7758
 
7759
      return true;
7760
    }
7761
 
7762
    @Override
7763
    public int hashCode() {
7764
      return 0;
7765
    }
7766
 
571 rajveer 7767
    public int compareTo(authenticateUser_result other) {
7768
      if (!getClass().equals(other.getClass())) {
7769
        return getClass().getName().compareTo(other.getClass().getName());
7770
      }
7771
 
7772
      int lastComparison = 0;
7773
      authenticateUser_result typedOther = (authenticateUser_result)other;
7774
 
7775
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7776
      if (lastComparison != 0) {
7777
        return lastComparison;
7778
      }
7779
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7780
      if (lastComparison != 0) {
7781
        return lastComparison;
7782
      }
7783
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
7784
      if (lastComparison != 0) {
7785
        return lastComparison;
7786
      }
7787
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
7788
      if (lastComparison != 0) {
7789
        return lastComparison;
7790
      }
7791
      return 0;
7792
    }
7793
 
48 ashish 7794
    public void read(TProtocol iprot) throws TException {
7795
      TField field;
7796
      iprot.readStructBegin();
7797
      while (true)
7798
      {
7799
        field = iprot.readFieldBegin();
7800
        if (field.type == TType.STOP) { 
7801
          break;
7802
        }
7803
        _Fields fieldId = _Fields.findByThriftId(field.id);
7804
        if (fieldId == null) {
7805
          TProtocolUtil.skip(iprot, field.type);
7806
        } else {
7807
          switch (fieldId) {
7808
            case SUCCESS:
7809
              if (field.type == TType.STRUCT) {
553 chandransh 7810
                this.success = new User();
48 ashish 7811
                this.success.read(iprot);
7812
              } else { 
7813
                TProtocolUtil.skip(iprot, field.type);
7814
              }
7815
              break;
553 chandransh 7816
            case AUEX:
48 ashish 7817
              if (field.type == TType.STRUCT) {
553 chandransh 7818
                this.auex = new AuthenticationException();
7819
                this.auex.read(iprot);
48 ashish 7820
              } else { 
7821
                TProtocolUtil.skip(iprot, field.type);
7822
              }
7823
              break;
7824
          }
7825
          iprot.readFieldEnd();
7826
        }
7827
      }
7828
      iprot.readStructEnd();
7829
      validate();
7830
    }
7831
 
7832
    public void write(TProtocol oprot) throws TException {
7833
      oprot.writeStructBegin(STRUCT_DESC);
7834
 
7835
      if (this.isSetSuccess()) {
7836
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7837
        this.success.write(oprot);
7838
        oprot.writeFieldEnd();
553 chandransh 7839
      } else if (this.isSetAuex()) {
7840
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7841
        this.auex.write(oprot);
48 ashish 7842
        oprot.writeFieldEnd();
7843
      }
7844
      oprot.writeFieldStop();
7845
      oprot.writeStructEnd();
7846
    }
7847
 
7848
    @Override
7849
    public String toString() {
553 chandransh 7850
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7851
      boolean first = true;
7852
 
7853
      sb.append("success:");
7854
      if (this.success == null) {
7855
        sb.append("null");
7856
      } else {
7857
        sb.append(this.success);
7858
      }
7859
      first = false;
7860
      if (!first) sb.append(", ");
553 chandransh 7861
      sb.append("auex:");
7862
      if (this.auex == null) {
48 ashish 7863
        sb.append("null");
7864
      } else {
553 chandransh 7865
        sb.append(this.auex);
48 ashish 7866
      }
7867
      first = false;
7868
      sb.append(")");
7869
      return sb.toString();
7870
    }
7871
 
7872
    public void validate() throws TException {
7873
      // check for required fields
7874
    }
7875
 
7876
  }
7877
 
553 chandransh 7878
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7879
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7880
 
553 chandransh 7881
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7882
 
553 chandransh 7883
    private String email;
123 ashish 7884
 
7885
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7886
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7887
      EMAIL((short)1, "email");
123 ashish 7888
 
7889
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7890
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7891
 
7892
      static {
7893
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7894
          byId.put((int)field._thriftId, field);
7895
          byName.put(field.getFieldName(), field);
7896
        }
7897
      }
7898
 
7899
      /**
7900
       * Find the _Fields constant that matches fieldId, or null if its not found.
7901
       */
7902
      public static _Fields findByThriftId(int fieldId) {
7903
        return byId.get(fieldId);
7904
      }
7905
 
7906
      /**
7907
       * Find the _Fields constant that matches fieldId, throwing an exception
7908
       * if it is not found.
7909
       */
7910
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7911
        _Fields fields = findByThriftId(fieldId);
7912
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7913
        return fields;
7914
      }
7915
 
7916
      /**
7917
       * Find the _Fields constant that matches name, or null if its not found.
7918
       */
7919
      public static _Fields findByName(String name) {
7920
        return byName.get(name);
7921
      }
7922
 
7923
      private final short _thriftId;
7924
      private final String _fieldName;
7925
 
7926
      _Fields(short thriftId, String fieldName) {
7927
        _thriftId = thriftId;
7928
        _fieldName = fieldName;
7929
      }
7930
 
7931
      public short getThriftFieldId() {
7932
        return _thriftId;
7933
      }
7934
 
7935
      public String getFieldName() {
7936
        return _fieldName;
7937
      }
7938
    }
7939
 
7940
    // isset id assignments
553 chandransh 7941
 
7942
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7943
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7944
          new FieldValueMetaData(TType.STRING)));
7945
    }});
7946
 
7947
    static {
7948
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7949
    }
7950
 
7951
    public userExists_args() {
7952
    }
7953
 
7954
    public userExists_args(
7955
      String email)
7956
    {
7957
      this();
7958
      this.email = email;
7959
    }
7960
 
7961
    /**
7962
     * Performs a deep copy on <i>other</i>.
7963
     */
7964
    public userExists_args(userExists_args other) {
7965
      if (other.isSetEmail()) {
7966
        this.email = other.email;
7967
      }
7968
    }
7969
 
7970
    public userExists_args deepCopy() {
7971
      return new userExists_args(this);
7972
    }
7973
 
7974
    @Deprecated
7975
    public userExists_args clone() {
7976
      return new userExists_args(this);
7977
    }
7978
 
7979
    public String getEmail() {
7980
      return this.email;
7981
    }
7982
 
7983
    public userExists_args setEmail(String email) {
7984
      this.email = email;
7985
      return this;
7986
    }
7987
 
7988
    public void unsetEmail() {
7989
      this.email = null;
7990
    }
7991
 
7992
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7993
    public boolean isSetEmail() {
7994
      return this.email != null;
7995
    }
7996
 
7997
    public void setEmailIsSet(boolean value) {
7998
      if (!value) {
7999
        this.email = null;
8000
      }
8001
    }
8002
 
8003
    public void setFieldValue(_Fields field, Object value) {
8004
      switch (field) {
8005
      case EMAIL:
8006
        if (value == null) {
8007
          unsetEmail();
8008
        } else {
8009
          setEmail((String)value);
8010
        }
8011
        break;
8012
 
8013
      }
8014
    }
8015
 
8016
    public void setFieldValue(int fieldID, Object value) {
8017
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8018
    }
8019
 
8020
    public Object getFieldValue(_Fields field) {
8021
      switch (field) {
8022
      case EMAIL:
8023
        return getEmail();
8024
 
8025
      }
8026
      throw new IllegalStateException();
8027
    }
8028
 
8029
    public Object getFieldValue(int fieldId) {
8030
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8031
    }
8032
 
8033
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8034
    public boolean isSet(_Fields field) {
8035
      switch (field) {
8036
      case EMAIL:
8037
        return isSetEmail();
8038
      }
8039
      throw new IllegalStateException();
8040
    }
8041
 
8042
    public boolean isSet(int fieldID) {
8043
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8044
    }
8045
 
8046
    @Override
8047
    public boolean equals(Object that) {
8048
      if (that == null)
8049
        return false;
8050
      if (that instanceof userExists_args)
8051
        return this.equals((userExists_args)that);
8052
      return false;
8053
    }
8054
 
8055
    public boolean equals(userExists_args that) {
8056
      if (that == null)
8057
        return false;
8058
 
8059
      boolean this_present_email = true && this.isSetEmail();
8060
      boolean that_present_email = true && that.isSetEmail();
8061
      if (this_present_email || that_present_email) {
8062
        if (!(this_present_email && that_present_email))
8063
          return false;
8064
        if (!this.email.equals(that.email))
8065
          return false;
8066
      }
8067
 
8068
      return true;
8069
    }
8070
 
8071
    @Override
8072
    public int hashCode() {
8073
      return 0;
8074
    }
8075
 
8076
    public int compareTo(userExists_args other) {
8077
      if (!getClass().equals(other.getClass())) {
8078
        return getClass().getName().compareTo(other.getClass().getName());
8079
      }
8080
 
8081
      int lastComparison = 0;
8082
      userExists_args typedOther = (userExists_args)other;
8083
 
8084
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8085
      if (lastComparison != 0) {
8086
        return lastComparison;
8087
      }
8088
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8089
      if (lastComparison != 0) {
8090
        return lastComparison;
8091
      }
8092
      return 0;
8093
    }
8094
 
8095
    public void read(TProtocol iprot) throws TException {
8096
      TField field;
8097
      iprot.readStructBegin();
8098
      while (true)
8099
      {
8100
        field = iprot.readFieldBegin();
8101
        if (field.type == TType.STOP) { 
8102
          break;
8103
        }
8104
        _Fields fieldId = _Fields.findByThriftId(field.id);
8105
        if (fieldId == null) {
8106
          TProtocolUtil.skip(iprot, field.type);
8107
        } else {
8108
          switch (fieldId) {
8109
            case EMAIL:
8110
              if (field.type == TType.STRING) {
8111
                this.email = iprot.readString();
8112
              } else { 
8113
                TProtocolUtil.skip(iprot, field.type);
8114
              }
8115
              break;
8116
          }
8117
          iprot.readFieldEnd();
8118
        }
8119
      }
8120
      iprot.readStructEnd();
8121
      validate();
8122
    }
8123
 
8124
    public void write(TProtocol oprot) throws TException {
8125
      validate();
8126
 
8127
      oprot.writeStructBegin(STRUCT_DESC);
8128
      if (this.email != null) {
8129
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8130
        oprot.writeString(this.email);
8131
        oprot.writeFieldEnd();
8132
      }
8133
      oprot.writeFieldStop();
8134
      oprot.writeStructEnd();
8135
    }
8136
 
8137
    @Override
8138
    public String toString() {
8139
      StringBuilder sb = new StringBuilder("userExists_args(");
8140
      boolean first = true;
8141
 
8142
      sb.append("email:");
8143
      if (this.email == null) {
8144
        sb.append("null");
8145
      } else {
8146
        sb.append(this.email);
8147
      }
8148
      first = false;
8149
      sb.append(")");
8150
      return sb.toString();
8151
    }
8152
 
8153
    public void validate() throws TException {
8154
      // check for required fields
8155
    }
8156
 
8157
  }
8158
 
8159
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
8160
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
8161
 
8162
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8163
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8164
 
8165
    private boolean success;
8166
    private UserContextException ucx;
8167
 
8168
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8169
    public enum _Fields implements TFieldIdEnum {
8170
      SUCCESS((short)0, "success"),
8171
      UCX((short)1, "ucx");
8172
 
8173
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8174
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8175
 
8176
      static {
8177
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8178
          byId.put((int)field._thriftId, field);
8179
          byName.put(field.getFieldName(), field);
8180
        }
8181
      }
8182
 
8183
      /**
8184
       * Find the _Fields constant that matches fieldId, or null if its not found.
8185
       */
8186
      public static _Fields findByThriftId(int fieldId) {
8187
        return byId.get(fieldId);
8188
      }
8189
 
8190
      /**
8191
       * Find the _Fields constant that matches fieldId, throwing an exception
8192
       * if it is not found.
8193
       */
8194
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8195
        _Fields fields = findByThriftId(fieldId);
8196
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8197
        return fields;
8198
      }
8199
 
8200
      /**
8201
       * Find the _Fields constant that matches name, or null if its not found.
8202
       */
8203
      public static _Fields findByName(String name) {
8204
        return byName.get(name);
8205
      }
8206
 
8207
      private final short _thriftId;
8208
      private final String _fieldName;
8209
 
8210
      _Fields(short thriftId, String fieldName) {
8211
        _thriftId = thriftId;
8212
        _fieldName = fieldName;
8213
      }
8214
 
8215
      public short getThriftFieldId() {
8216
        return _thriftId;
8217
      }
8218
 
8219
      public String getFieldName() {
8220
        return _fieldName;
8221
      }
8222
    }
8223
 
8224
    // isset id assignments
8225
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 8226
    private BitSet __isset_bit_vector = new BitSet(1);
8227
 
8228
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8229
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 8230
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 8231
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8232
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 8233
    }});
8234
 
8235
    static {
553 chandransh 8236
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 8237
    }
8238
 
553 chandransh 8239
    public userExists_result() {
123 ashish 8240
    }
8241
 
553 chandransh 8242
    public userExists_result(
8243
      boolean success,
8244
      UserContextException ucx)
123 ashish 8245
    {
8246
      this();
553 chandransh 8247
      this.success = success;
8248
      setSuccessIsSet(true);
8249
      this.ucx = ucx;
123 ashish 8250
    }
8251
 
8252
    /**
8253
     * Performs a deep copy on <i>other</i>.
8254
     */
553 chandransh 8255
    public userExists_result(userExists_result other) {
123 ashish 8256
      __isset_bit_vector.clear();
8257
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 8258
      this.success = other.success;
8259
      if (other.isSetUcx()) {
8260
        this.ucx = new UserContextException(other.ucx);
123 ashish 8261
      }
8262
    }
8263
 
553 chandransh 8264
    public userExists_result deepCopy() {
8265
      return new userExists_result(this);
123 ashish 8266
    }
8267
 
8268
    @Deprecated
553 chandransh 8269
    public userExists_result clone() {
8270
      return new userExists_result(this);
123 ashish 8271
    }
8272
 
553 chandransh 8273
    public boolean isSuccess() {
8274
      return this.success;
123 ashish 8275
    }
8276
 
553 chandransh 8277
    public userExists_result setSuccess(boolean success) {
8278
      this.success = success;
8279
      setSuccessIsSet(true);
123 ashish 8280
      return this;
8281
    }
8282
 
553 chandransh 8283
    public void unsetSuccess() {
8284
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 8285
    }
8286
 
553 chandransh 8287
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8288
    public boolean isSetSuccess() {
8289
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 8290
    }
8291
 
553 chandransh 8292
    public void setSuccessIsSet(boolean value) {
8293
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8294
    }
8295
 
8296
    public UserContextException getUcx() {
8297
      return this.ucx;
8298
    }
8299
 
8300
    public userExists_result setUcx(UserContextException ucx) {
8301
      this.ucx = ucx;
8302
      return this;
8303
    }
8304
 
8305
    public void unsetUcx() {
8306
      this.ucx = null;
8307
    }
8308
 
8309
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8310
    public boolean isSetUcx() {
8311
      return this.ucx != null;
8312
    }
8313
 
8314
    public void setUcxIsSet(boolean value) {
123 ashish 8315
      if (!value) {
553 chandransh 8316
        this.ucx = null;
123 ashish 8317
      }
8318
    }
8319
 
553 chandransh 8320
    public void setFieldValue(_Fields field, Object value) {
8321
      switch (field) {
8322
      case SUCCESS:
8323
        if (value == null) {
8324
          unsetSuccess();
8325
        } else {
8326
          setSuccess((Boolean)value);
8327
        }
8328
        break;
8329
 
8330
      case UCX:
8331
        if (value == null) {
8332
          unsetUcx();
8333
        } else {
8334
          setUcx((UserContextException)value);
8335
        }
8336
        break;
8337
 
8338
      }
123 ashish 8339
    }
8340
 
553 chandransh 8341
    public void setFieldValue(int fieldID, Object value) {
8342
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8343
    }
8344
 
8345
    public Object getFieldValue(_Fields field) {
8346
      switch (field) {
8347
      case SUCCESS:
8348
        return new Boolean(isSuccess());
8349
 
8350
      case UCX:
8351
        return getUcx();
8352
 
8353
      }
8354
      throw new IllegalStateException();
8355
    }
8356
 
8357
    public Object getFieldValue(int fieldId) {
8358
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8359
    }
8360
 
8361
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8362
    public boolean isSet(_Fields field) {
8363
      switch (field) {
8364
      case SUCCESS:
8365
        return isSetSuccess();
8366
      case UCX:
8367
        return isSetUcx();
8368
      }
8369
      throw new IllegalStateException();
8370
    }
8371
 
8372
    public boolean isSet(int fieldID) {
8373
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8374
    }
8375
 
8376
    @Override
8377
    public boolean equals(Object that) {
8378
      if (that == null)
8379
        return false;
8380
      if (that instanceof userExists_result)
8381
        return this.equals((userExists_result)that);
8382
      return false;
8383
    }
8384
 
8385
    public boolean equals(userExists_result that) {
8386
      if (that == null)
8387
        return false;
8388
 
8389
      boolean this_present_success = true;
8390
      boolean that_present_success = true;
8391
      if (this_present_success || that_present_success) {
8392
        if (!(this_present_success && that_present_success))
8393
          return false;
8394
        if (this.success != that.success)
8395
          return false;
8396
      }
8397
 
8398
      boolean this_present_ucx = true && this.isSetUcx();
8399
      boolean that_present_ucx = true && that.isSetUcx();
8400
      if (this_present_ucx || that_present_ucx) {
8401
        if (!(this_present_ucx && that_present_ucx))
8402
          return false;
8403
        if (!this.ucx.equals(that.ucx))
8404
          return false;
8405
      }
8406
 
8407
      return true;
8408
    }
8409
 
8410
    @Override
8411
    public int hashCode() {
8412
      return 0;
8413
    }
8414
 
8415
    public int compareTo(userExists_result other) {
8416
      if (!getClass().equals(other.getClass())) {
8417
        return getClass().getName().compareTo(other.getClass().getName());
8418
      }
8419
 
8420
      int lastComparison = 0;
8421
      userExists_result typedOther = (userExists_result)other;
8422
 
8423
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8424
      if (lastComparison != 0) {
8425
        return lastComparison;
8426
      }
8427
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8428
      if (lastComparison != 0) {
8429
        return lastComparison;
8430
      }
8431
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8432
      if (lastComparison != 0) {
8433
        return lastComparison;
8434
      }
8435
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8436
      if (lastComparison != 0) {
8437
        return lastComparison;
8438
      }
8439
      return 0;
8440
    }
8441
 
8442
    public void read(TProtocol iprot) throws TException {
8443
      TField field;
8444
      iprot.readStructBegin();
8445
      while (true)
8446
      {
8447
        field = iprot.readFieldBegin();
8448
        if (field.type == TType.STOP) { 
8449
          break;
8450
        }
8451
        _Fields fieldId = _Fields.findByThriftId(field.id);
8452
        if (fieldId == null) {
8453
          TProtocolUtil.skip(iprot, field.type);
8454
        } else {
8455
          switch (fieldId) {
8456
            case SUCCESS:
8457
              if (field.type == TType.BOOL) {
8458
                this.success = iprot.readBool();
8459
                setSuccessIsSet(true);
8460
              } else { 
8461
                TProtocolUtil.skip(iprot, field.type);
8462
              }
8463
              break;
8464
            case UCX:
8465
              if (field.type == TType.STRUCT) {
8466
                this.ucx = new UserContextException();
8467
                this.ucx.read(iprot);
8468
              } else { 
8469
                TProtocolUtil.skip(iprot, field.type);
8470
              }
8471
              break;
8472
          }
8473
          iprot.readFieldEnd();
8474
        }
8475
      }
8476
      iprot.readStructEnd();
8477
      validate();
8478
    }
8479
 
8480
    public void write(TProtocol oprot) throws TException {
8481
      oprot.writeStructBegin(STRUCT_DESC);
8482
 
8483
      if (this.isSetSuccess()) {
8484
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8485
        oprot.writeBool(this.success);
8486
        oprot.writeFieldEnd();
8487
      } else if (this.isSetUcx()) {
8488
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8489
        this.ucx.write(oprot);
8490
        oprot.writeFieldEnd();
8491
      }
8492
      oprot.writeFieldStop();
8493
      oprot.writeStructEnd();
8494
    }
8495
 
8496
    @Override
8497
    public String toString() {
8498
      StringBuilder sb = new StringBuilder("userExists_result(");
8499
      boolean first = true;
8500
 
8501
      sb.append("success:");
8502
      sb.append(this.success);
8503
      first = false;
8504
      if (!first) sb.append(", ");
8505
      sb.append("ucx:");
8506
      if (this.ucx == null) {
8507
        sb.append("null");
8508
      } else {
8509
        sb.append(this.ucx);
8510
      }
8511
      first = false;
8512
      sb.append(")");
8513
      return sb.toString();
8514
    }
8515
 
8516
    public void validate() throws TException {
8517
      // check for required fields
8518
    }
8519
 
8520
  }
8521
 
8522
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8523
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8524
 
8525
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8526
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8527
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8528
 
8529
    private long userId;
8530
    private Address address;
8531
    private boolean setDefault;
8532
 
8533
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8534
    public enum _Fields implements TFieldIdEnum {
8535
      USER_ID((short)1, "userId"),
8536
      ADDRESS((short)2, "address"),
571 rajveer 8537
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8538
 
8539
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8540
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8541
 
8542
      static {
8543
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8544
          byId.put((int)field._thriftId, field);
8545
          byName.put(field.getFieldName(), field);
8546
        }
8547
      }
8548
 
8549
      /**
8550
       * Find the _Fields constant that matches fieldId, or null if its not found.
8551
       */
8552
      public static _Fields findByThriftId(int fieldId) {
8553
        return byId.get(fieldId);
8554
      }
8555
 
8556
      /**
8557
       * Find the _Fields constant that matches fieldId, throwing an exception
8558
       * if it is not found.
8559
       */
8560
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8561
        _Fields fields = findByThriftId(fieldId);
8562
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8563
        return fields;
8564
      }
8565
 
8566
      /**
8567
       * Find the _Fields constant that matches name, or null if its not found.
8568
       */
8569
      public static _Fields findByName(String name) {
8570
        return byName.get(name);
8571
      }
8572
 
8573
      private final short _thriftId;
8574
      private final String _fieldName;
8575
 
8576
      _Fields(short thriftId, String fieldName) {
8577
        _thriftId = thriftId;
8578
        _fieldName = fieldName;
8579
      }
8580
 
8581
      public short getThriftFieldId() {
8582
        return _thriftId;
8583
      }
8584
 
8585
      public String getFieldName() {
8586
        return _fieldName;
8587
      }
8588
    }
8589
 
8590
    // isset id assignments
8591
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8592
    private static final int __SETDEFAULT_ISSET_ID = 1;
8593
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8594
 
8595
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8596
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8597
          new FieldValueMetaData(TType.I64)));
8598
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8599
          new StructMetaData(TType.STRUCT, Address.class)));
8600
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8601
          new FieldValueMetaData(TType.BOOL)));
8602
    }});
8603
 
8604
    static {
8605
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8606
    }
8607
 
8608
    public addAddressForUser_args() {
8609
    }
8610
 
8611
    public addAddressForUser_args(
8612
      long userId,
8613
      Address address,
8614
      boolean setDefault)
8615
    {
8616
      this();
8617
      this.userId = userId;
8618
      setUserIdIsSet(true);
8619
      this.address = address;
8620
      this.setDefault = setDefault;
8621
      setSetDefaultIsSet(true);
8622
    }
8623
 
8624
    /**
8625
     * Performs a deep copy on <i>other</i>.
8626
     */
8627
    public addAddressForUser_args(addAddressForUser_args other) {
8628
      __isset_bit_vector.clear();
8629
      __isset_bit_vector.or(other.__isset_bit_vector);
8630
      this.userId = other.userId;
8631
      if (other.isSetAddress()) {
8632
        this.address = new Address(other.address);
8633
      }
8634
      this.setDefault = other.setDefault;
8635
    }
8636
 
8637
    public addAddressForUser_args deepCopy() {
8638
      return new addAddressForUser_args(this);
8639
    }
8640
 
8641
    @Deprecated
8642
    public addAddressForUser_args clone() {
8643
      return new addAddressForUser_args(this);
8644
    }
8645
 
8646
    public long getUserId() {
8647
      return this.userId;
8648
    }
8649
 
8650
    public addAddressForUser_args setUserId(long userId) {
8651
      this.userId = userId;
8652
      setUserIdIsSet(true);
123 ashish 8653
      return this;
8654
    }
8655
 
553 chandransh 8656
    public void unsetUserId() {
8657
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8658
    }
8659
 
553 chandransh 8660
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8661
    public boolean isSetUserId() {
8662
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8663
    }
8664
 
553 chandransh 8665
    public void setUserIdIsSet(boolean value) {
8666
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8667
    }
8668
 
8669
    public Address getAddress() {
8670
      return this.address;
8671
    }
8672
 
8673
    public addAddressForUser_args setAddress(Address address) {
8674
      this.address = address;
8675
      return this;
8676
    }
8677
 
8678
    public void unsetAddress() {
8679
      this.address = null;
8680
    }
8681
 
8682
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8683
    public boolean isSetAddress() {
8684
      return this.address != null;
8685
    }
8686
 
8687
    public void setAddressIsSet(boolean value) {
123 ashish 8688
      if (!value) {
553 chandransh 8689
        this.address = null;
123 ashish 8690
      }
8691
    }
8692
 
553 chandransh 8693
    public boolean isSetDefault() {
8694
      return this.setDefault;
8695
    }
8696
 
8697
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8698
      this.setDefault = setDefault;
8699
      setSetDefaultIsSet(true);
8700
      return this;
8701
    }
8702
 
8703
    public void unsetSetDefault() {
8704
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8705
    }
8706
 
8707
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8708
    public boolean isSetSetDefault() {
8709
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8710
    }
8711
 
8712
    public void setSetDefaultIsSet(boolean value) {
8713
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8714
    }
8715
 
123 ashish 8716
    public void setFieldValue(_Fields field, Object value) {
8717
      switch (field) {
553 chandransh 8718
      case USER_ID:
123 ashish 8719
        if (value == null) {
553 chandransh 8720
          unsetUserId();
123 ashish 8721
        } else {
553 chandransh 8722
          setUserId((Long)value);
123 ashish 8723
        }
8724
        break;
8725
 
553 chandransh 8726
      case ADDRESS:
123 ashish 8727
        if (value == null) {
553 chandransh 8728
          unsetAddress();
123 ashish 8729
        } else {
553 chandransh 8730
          setAddress((Address)value);
123 ashish 8731
        }
8732
        break;
8733
 
553 chandransh 8734
      case SET_DEFAULT:
8735
        if (value == null) {
8736
          unsetSetDefault();
8737
        } else {
8738
          setSetDefault((Boolean)value);
8739
        }
8740
        break;
8741
 
123 ashish 8742
      }
8743
    }
8744
 
8745
    public void setFieldValue(int fieldID, Object value) {
8746
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8747
    }
8748
 
8749
    public Object getFieldValue(_Fields field) {
8750
      switch (field) {
553 chandransh 8751
      case USER_ID:
8752
        return new Long(getUserId());
123 ashish 8753
 
553 chandransh 8754
      case ADDRESS:
8755
        return getAddress();
123 ashish 8756
 
553 chandransh 8757
      case SET_DEFAULT:
8758
        return new Boolean(isSetDefault());
8759
 
123 ashish 8760
      }
8761
      throw new IllegalStateException();
8762
    }
8763
 
8764
    public Object getFieldValue(int fieldId) {
8765
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8766
    }
8767
 
8768
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8769
    public boolean isSet(_Fields field) {
8770
      switch (field) {
553 chandransh 8771
      case USER_ID:
8772
        return isSetUserId();
8773
      case ADDRESS:
8774
        return isSetAddress();
8775
      case SET_DEFAULT:
8776
        return isSetSetDefault();
123 ashish 8777
      }
8778
      throw new IllegalStateException();
8779
    }
8780
 
8781
    public boolean isSet(int fieldID) {
8782
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8783
    }
8784
 
8785
    @Override
8786
    public boolean equals(Object that) {
8787
      if (that == null)
8788
        return false;
553 chandransh 8789
      if (that instanceof addAddressForUser_args)
8790
        return this.equals((addAddressForUser_args)that);
123 ashish 8791
      return false;
8792
    }
8793
 
553 chandransh 8794
    public boolean equals(addAddressForUser_args that) {
123 ashish 8795
      if (that == null)
8796
        return false;
8797
 
553 chandransh 8798
      boolean this_present_userId = true;
8799
      boolean that_present_userId = true;
8800
      if (this_present_userId || that_present_userId) {
8801
        if (!(this_present_userId && that_present_userId))
123 ashish 8802
          return false;
553 chandransh 8803
        if (this.userId != that.userId)
123 ashish 8804
          return false;
8805
      }
8806
 
553 chandransh 8807
      boolean this_present_address = true && this.isSetAddress();
8808
      boolean that_present_address = true && that.isSetAddress();
8809
      if (this_present_address || that_present_address) {
8810
        if (!(this_present_address && that_present_address))
123 ashish 8811
          return false;
553 chandransh 8812
        if (!this.address.equals(that.address))
123 ashish 8813
          return false;
8814
      }
8815
 
553 chandransh 8816
      boolean this_present_setDefault = true;
8817
      boolean that_present_setDefault = true;
8818
      if (this_present_setDefault || that_present_setDefault) {
8819
        if (!(this_present_setDefault && that_present_setDefault))
8820
          return false;
8821
        if (this.setDefault != that.setDefault)
8822
          return false;
8823
      }
8824
 
123 ashish 8825
      return true;
8826
    }
8827
 
8828
    @Override
8829
    public int hashCode() {
8830
      return 0;
8831
    }
8832
 
553 chandransh 8833
    public int compareTo(addAddressForUser_args other) {
123 ashish 8834
      if (!getClass().equals(other.getClass())) {
8835
        return getClass().getName().compareTo(other.getClass().getName());
8836
      }
8837
 
8838
      int lastComparison = 0;
553 chandransh 8839
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8840
 
553 chandransh 8841
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8842
      if (lastComparison != 0) {
8843
        return lastComparison;
8844
      }
553 chandransh 8845
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8846
      if (lastComparison != 0) {
8847
        return lastComparison;
8848
      }
553 chandransh 8849
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8850
      if (lastComparison != 0) {
8851
        return lastComparison;
8852
      }
553 chandransh 8853
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8854
      if (lastComparison != 0) {
8855
        return lastComparison;
8856
      }
553 chandransh 8857
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8858
      if (lastComparison != 0) {
8859
        return lastComparison;
8860
      }
8861
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8862
      if (lastComparison != 0) {
8863
        return lastComparison;
8864
      }
123 ashish 8865
      return 0;
8866
    }
8867
 
8868
    public void read(TProtocol iprot) throws TException {
8869
      TField field;
8870
      iprot.readStructBegin();
8871
      while (true)
8872
      {
8873
        field = iprot.readFieldBegin();
8874
        if (field.type == TType.STOP) { 
8875
          break;
8876
        }
8877
        _Fields fieldId = _Fields.findByThriftId(field.id);
8878
        if (fieldId == null) {
8879
          TProtocolUtil.skip(iprot, field.type);
8880
        } else {
8881
          switch (fieldId) {
553 chandransh 8882
            case USER_ID:
8883
              if (field.type == TType.I64) {
8884
                this.userId = iprot.readI64();
8885
                setUserIdIsSet(true);
123 ashish 8886
              } else { 
8887
                TProtocolUtil.skip(iprot, field.type);
8888
              }
8889
              break;
553 chandransh 8890
            case ADDRESS:
8891
              if (field.type == TType.STRUCT) {
8892
                this.address = new Address();
8893
                this.address.read(iprot);
123 ashish 8894
              } else { 
8895
                TProtocolUtil.skip(iprot, field.type);
8896
              }
8897
              break;
553 chandransh 8898
            case SET_DEFAULT:
123 ashish 8899
              if (field.type == TType.BOOL) {
553 chandransh 8900
                this.setDefault = iprot.readBool();
8901
                setSetDefaultIsSet(true);
123 ashish 8902
              } else { 
8903
                TProtocolUtil.skip(iprot, field.type);
8904
              }
8905
              break;
8906
          }
8907
          iprot.readFieldEnd();
8908
        }
8909
      }
8910
      iprot.readStructEnd();
8911
      validate();
8912
    }
8913
 
8914
    public void write(TProtocol oprot) throws TException {
8915
      validate();
8916
 
8917
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8918
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8919
      oprot.writeI64(this.userId);
8920
      oprot.writeFieldEnd();
8921
      if (this.address != null) {
8922
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8923
        this.address.write(oprot);
123 ashish 8924
        oprot.writeFieldEnd();
8925
      }
553 chandransh 8926
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
8927
      oprot.writeBool(this.setDefault);
8928
      oprot.writeFieldEnd();
123 ashish 8929
      oprot.writeFieldStop();
8930
      oprot.writeStructEnd();
8931
    }
8932
 
8933
    @Override
8934
    public String toString() {
553 chandransh 8935
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 8936
      boolean first = true;
8937
 
553 chandransh 8938
      sb.append("userId:");
8939
      sb.append(this.userId);
123 ashish 8940
      first = false;
8941
      if (!first) sb.append(", ");
553 chandransh 8942
      sb.append("address:");
8943
      if (this.address == null) {
123 ashish 8944
        sb.append("null");
8945
      } else {
553 chandransh 8946
        sb.append(this.address);
123 ashish 8947
      }
8948
      first = false;
8949
      if (!first) sb.append(", ");
553 chandransh 8950
      sb.append("setDefault:");
8951
      sb.append(this.setDefault);
8952
      first = false;
123 ashish 8953
      sb.append(")");
8954
      return sb.toString();
8955
    }
8956
 
8957
    public void validate() throws TException {
8958
      // check for required fields
8959
    }
8960
 
8961
  }
8962
 
553 chandransh 8963
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
8964
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 8965
 
571 rajveer 8966
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 8967
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 8968
 
571 rajveer 8969
    private long success;
553 chandransh 8970
    private UserContextException ucx;
123 ashish 8971
 
8972
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8973
    public enum _Fields implements TFieldIdEnum {
8974
      SUCCESS((short)0, "success"),
553 chandransh 8975
      UCX((short)1, "ucx");
123 ashish 8976
 
8977
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8978
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8979
 
8980
      static {
8981
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8982
          byId.put((int)field._thriftId, field);
8983
          byName.put(field.getFieldName(), field);
8984
        }
8985
      }
8986
 
8987
      /**
8988
       * Find the _Fields constant that matches fieldId, or null if its not found.
8989
       */
8990
      public static _Fields findByThriftId(int fieldId) {
8991
        return byId.get(fieldId);
8992
      }
8993
 
8994
      /**
8995
       * Find the _Fields constant that matches fieldId, throwing an exception
8996
       * if it is not found.
8997
       */
8998
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8999
        _Fields fields = findByThriftId(fieldId);
9000
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9001
        return fields;
9002
      }
9003
 
9004
      /**
9005
       * Find the _Fields constant that matches name, or null if its not found.
9006
       */
9007
      public static _Fields findByName(String name) {
9008
        return byName.get(name);
9009
      }
9010
 
9011
      private final short _thriftId;
9012
      private final String _fieldName;
9013
 
9014
      _Fields(short thriftId, String fieldName) {
9015
        _thriftId = thriftId;
9016
        _fieldName = fieldName;
9017
      }
9018
 
9019
      public short getThriftFieldId() {
9020
        return _thriftId;
9021
      }
9022
 
9023
      public String getFieldName() {
9024
        return _fieldName;
9025
      }
9026
    }
9027
 
9028
    // isset id assignments
9029
    private static final int __SUCCESS_ISSET_ID = 0;
9030
    private BitSet __isset_bit_vector = new BitSet(1);
9031
 
9032
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9033
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 9034
          new FieldValueMetaData(TType.I64)));
553 chandransh 9035
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 9036
          new FieldValueMetaData(TType.STRUCT)));
9037
    }});
9038
 
9039
    static {
553 chandransh 9040
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 9041
    }
9042
 
553 chandransh 9043
    public addAddressForUser_result() {
123 ashish 9044
    }
9045
 
553 chandransh 9046
    public addAddressForUser_result(
571 rajveer 9047
      long success,
553 chandransh 9048
      UserContextException ucx)
123 ashish 9049
    {
9050
      this();
9051
      this.success = success;
9052
      setSuccessIsSet(true);
553 chandransh 9053
      this.ucx = ucx;
123 ashish 9054
    }
9055
 
9056
    /**
9057
     * Performs a deep copy on <i>other</i>.
9058
     */
553 chandransh 9059
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 9060
      __isset_bit_vector.clear();
9061
      __isset_bit_vector.or(other.__isset_bit_vector);
9062
      this.success = other.success;
553 chandransh 9063
      if (other.isSetUcx()) {
9064
        this.ucx = new UserContextException(other.ucx);
123 ashish 9065
      }
9066
    }
9067
 
553 chandransh 9068
    public addAddressForUser_result deepCopy() {
9069
      return new addAddressForUser_result(this);
123 ashish 9070
    }
9071
 
9072
    @Deprecated
553 chandransh 9073
    public addAddressForUser_result clone() {
9074
      return new addAddressForUser_result(this);
123 ashish 9075
    }
9076
 
571 rajveer 9077
    public long getSuccess() {
123 ashish 9078
      return this.success;
9079
    }
9080
 
571 rajveer 9081
    public addAddressForUser_result setSuccess(long success) {
123 ashish 9082
      this.success = success;
9083
      setSuccessIsSet(true);
9084
      return this;
9085
    }
9086
 
9087
    public void unsetSuccess() {
9088
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9089
    }
9090
 
9091
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9092
    public boolean isSetSuccess() {
9093
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9094
    }
9095
 
9096
    public void setSuccessIsSet(boolean value) {
9097
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9098
    }
9099
 
553 chandransh 9100
    public UserContextException getUcx() {
9101
      return this.ucx;
123 ashish 9102
    }
9103
 
553 chandransh 9104
    public addAddressForUser_result setUcx(UserContextException ucx) {
9105
      this.ucx = ucx;
123 ashish 9106
      return this;
9107
    }
9108
 
553 chandransh 9109
    public void unsetUcx() {
9110
      this.ucx = null;
123 ashish 9111
    }
9112
 
553 chandransh 9113
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9114
    public boolean isSetUcx() {
9115
      return this.ucx != null;
123 ashish 9116
    }
9117
 
553 chandransh 9118
    public void setUcxIsSet(boolean value) {
123 ashish 9119
      if (!value) {
553 chandransh 9120
        this.ucx = null;
123 ashish 9121
      }
9122
    }
9123
 
9124
    public void setFieldValue(_Fields field, Object value) {
9125
      switch (field) {
9126
      case SUCCESS:
9127
        if (value == null) {
9128
          unsetSuccess();
9129
        } else {
571 rajveer 9130
          setSuccess((Long)value);
123 ashish 9131
        }
9132
        break;
9133
 
553 chandransh 9134
      case UCX:
123 ashish 9135
        if (value == null) {
553 chandransh 9136
          unsetUcx();
123 ashish 9137
        } else {
553 chandransh 9138
          setUcx((UserContextException)value);
123 ashish 9139
        }
9140
        break;
9141
 
9142
      }
9143
    }
9144
 
9145
    public void setFieldValue(int fieldID, Object value) {
9146
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9147
    }
9148
 
9149
    public Object getFieldValue(_Fields field) {
9150
      switch (field) {
9151
      case SUCCESS:
571 rajveer 9152
        return new Long(getSuccess());
123 ashish 9153
 
553 chandransh 9154
      case UCX:
9155
        return getUcx();
123 ashish 9156
 
9157
      }
9158
      throw new IllegalStateException();
9159
    }
9160
 
9161
    public Object getFieldValue(int fieldId) {
9162
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9163
    }
9164
 
9165
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9166
    public boolean isSet(_Fields field) {
9167
      switch (field) {
9168
      case SUCCESS:
9169
        return isSetSuccess();
553 chandransh 9170
      case UCX:
9171
        return isSetUcx();
123 ashish 9172
      }
9173
      throw new IllegalStateException();
9174
    }
9175
 
9176
    public boolean isSet(int fieldID) {
9177
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9178
    }
9179
 
9180
    @Override
9181
    public boolean equals(Object that) {
9182
      if (that == null)
9183
        return false;
553 chandransh 9184
      if (that instanceof addAddressForUser_result)
9185
        return this.equals((addAddressForUser_result)that);
123 ashish 9186
      return false;
9187
    }
9188
 
553 chandransh 9189
    public boolean equals(addAddressForUser_result that) {
123 ashish 9190
      if (that == null)
9191
        return false;
9192
 
9193
      boolean this_present_success = true;
9194
      boolean that_present_success = true;
9195
      if (this_present_success || that_present_success) {
9196
        if (!(this_present_success && that_present_success))
9197
          return false;
9198
        if (this.success != that.success)
9199
          return false;
9200
      }
9201
 
553 chandransh 9202
      boolean this_present_ucx = true && this.isSetUcx();
9203
      boolean that_present_ucx = true && that.isSetUcx();
9204
      if (this_present_ucx || that_present_ucx) {
9205
        if (!(this_present_ucx && that_present_ucx))
123 ashish 9206
          return false;
553 chandransh 9207
        if (!this.ucx.equals(that.ucx))
123 ashish 9208
          return false;
9209
      }
9210
 
9211
      return true;
9212
    }
9213
 
9214
    @Override
9215
    public int hashCode() {
9216
      return 0;
9217
    }
9218
 
553 chandransh 9219
    public int compareTo(addAddressForUser_result other) {
123 ashish 9220
      if (!getClass().equals(other.getClass())) {
9221
        return getClass().getName().compareTo(other.getClass().getName());
9222
      }
9223
 
9224
      int lastComparison = 0;
553 chandransh 9225
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 9226
 
9227
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9228
      if (lastComparison != 0) {
9229
        return lastComparison;
9230
      }
9231
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9232
      if (lastComparison != 0) {
9233
        return lastComparison;
9234
      }
553 chandransh 9235
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 9236
      if (lastComparison != 0) {
9237
        return lastComparison;
9238
      }
553 chandransh 9239
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 9240
      if (lastComparison != 0) {
9241
        return lastComparison;
9242
      }
9243
      return 0;
9244
    }
9245
 
9246
    public void read(TProtocol iprot) throws TException {
9247
      TField field;
9248
      iprot.readStructBegin();
9249
      while (true)
9250
      {
9251
        field = iprot.readFieldBegin();
9252
        if (field.type == TType.STOP) { 
9253
          break;
9254
        }
9255
        _Fields fieldId = _Fields.findByThriftId(field.id);
9256
        if (fieldId == null) {
9257
          TProtocolUtil.skip(iprot, field.type);
9258
        } else {
9259
          switch (fieldId) {
9260
            case SUCCESS:
571 rajveer 9261
              if (field.type == TType.I64) {
9262
                this.success = iprot.readI64();
123 ashish 9263
                setSuccessIsSet(true);
9264
              } else { 
9265
                TProtocolUtil.skip(iprot, field.type);
9266
              }
9267
              break;
553 chandransh 9268
            case UCX:
123 ashish 9269
              if (field.type == TType.STRUCT) {
553 chandransh 9270
                this.ucx = new UserContextException();
9271
                this.ucx.read(iprot);
123 ashish 9272
              } else { 
9273
                TProtocolUtil.skip(iprot, field.type);
9274
              }
9275
              break;
9276
          }
9277
          iprot.readFieldEnd();
9278
        }
9279
      }
9280
      iprot.readStructEnd();
9281
      validate();
9282
    }
9283
 
9284
    public void write(TProtocol oprot) throws TException {
9285
      oprot.writeStructBegin(STRUCT_DESC);
9286
 
9287
      if (this.isSetSuccess()) {
9288
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 9289
        oprot.writeI64(this.success);
123 ashish 9290
        oprot.writeFieldEnd();
553 chandransh 9291
      } else if (this.isSetUcx()) {
9292
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9293
        this.ucx.write(oprot);
123 ashish 9294
        oprot.writeFieldEnd();
9295
      }
9296
      oprot.writeFieldStop();
9297
      oprot.writeStructEnd();
9298
    }
9299
 
9300
    @Override
9301
    public String toString() {
553 chandransh 9302
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 9303
      boolean first = true;
9304
 
9305
      sb.append("success:");
9306
      sb.append(this.success);
9307
      first = false;
9308
      if (!first) sb.append(", ");
553 chandransh 9309
      sb.append("ucx:");
9310
      if (this.ucx == null) {
123 ashish 9311
        sb.append("null");
9312
      } else {
553 chandransh 9313
        sb.append(this.ucx);
123 ashish 9314
      }
9315
      first = false;
9316
      sb.append(")");
9317
      return sb.toString();
9318
    }
9319
 
9320
    public void validate() throws TException {
9321
      // check for required fields
9322
    }
9323
 
9324
  }
9325
 
553 chandransh 9326
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9327
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 9328
 
553 chandransh 9329
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9330
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 9331
 
553 chandransh 9332
    private long userid;
9333
    private long addressId;
48 ashish 9334
 
9335
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9336
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9337
      USERID((short)1, "userid"),
9338
      ADDRESS_ID((short)2, "addressId");
48 ashish 9339
 
9340
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9341
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9342
 
9343
      static {
9344
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9345
          byId.put((int)field._thriftId, field);
9346
          byName.put(field.getFieldName(), field);
9347
        }
9348
      }
9349
 
9350
      /**
9351
       * Find the _Fields constant that matches fieldId, or null if its not found.
9352
       */
9353
      public static _Fields findByThriftId(int fieldId) {
9354
        return byId.get(fieldId);
9355
      }
9356
 
9357
      /**
9358
       * Find the _Fields constant that matches fieldId, throwing an exception
9359
       * if it is not found.
9360
       */
9361
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9362
        _Fields fields = findByThriftId(fieldId);
9363
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9364
        return fields;
9365
      }
9366
 
9367
      /**
9368
       * Find the _Fields constant that matches name, or null if its not found.
9369
       */
9370
      public static _Fields findByName(String name) {
9371
        return byName.get(name);
9372
      }
9373
 
9374
      private final short _thriftId;
9375
      private final String _fieldName;
9376
 
9377
      _Fields(short thriftId, String fieldName) {
9378
        _thriftId = thriftId;
9379
        _fieldName = fieldName;
9380
      }
9381
 
9382
      public short getThriftFieldId() {
9383
        return _thriftId;
9384
      }
9385
 
9386
      public String getFieldName() {
9387
        return _fieldName;
9388
      }
9389
    }
9390
 
9391
    // isset id assignments
553 chandransh 9392
    private static final int __USERID_ISSET_ID = 0;
9393
    private static final int __ADDRESSID_ISSET_ID = 1;
9394
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 9395
 
9396
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9397
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9398
          new FieldValueMetaData(TType.I64)));
9399
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9400
          new FieldValueMetaData(TType.I64)));
48 ashish 9401
    }});
9402
 
9403
    static {
553 chandransh 9404
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 9405
    }
9406
 
553 chandransh 9407
    public removeAddressForUser_args() {
48 ashish 9408
    }
9409
 
553 chandransh 9410
    public removeAddressForUser_args(
9411
      long userid,
9412
      long addressId)
48 ashish 9413
    {
9414
      this();
553 chandransh 9415
      this.userid = userid;
9416
      setUseridIsSet(true);
9417
      this.addressId = addressId;
9418
      setAddressIdIsSet(true);
48 ashish 9419
    }
9420
 
9421
    /**
9422
     * Performs a deep copy on <i>other</i>.
9423
     */
553 chandransh 9424
    public removeAddressForUser_args(removeAddressForUser_args other) {
9425
      __isset_bit_vector.clear();
9426
      __isset_bit_vector.or(other.__isset_bit_vector);
9427
      this.userid = other.userid;
9428
      this.addressId = other.addressId;
48 ashish 9429
    }
9430
 
553 chandransh 9431
    public removeAddressForUser_args deepCopy() {
9432
      return new removeAddressForUser_args(this);
48 ashish 9433
    }
9434
 
9435
    @Deprecated
553 chandransh 9436
    public removeAddressForUser_args clone() {
9437
      return new removeAddressForUser_args(this);
48 ashish 9438
    }
9439
 
553 chandransh 9440
    public long getUserid() {
9441
      return this.userid;
48 ashish 9442
    }
9443
 
553 chandransh 9444
    public removeAddressForUser_args setUserid(long userid) {
9445
      this.userid = userid;
9446
      setUseridIsSet(true);
48 ashish 9447
      return this;
9448
    }
9449
 
553 chandransh 9450
    public void unsetUserid() {
9451
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9452
    }
9453
 
553 chandransh 9454
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9455
    public boolean isSetUserid() {
9456
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9457
    }
9458
 
553 chandransh 9459
    public void setUseridIsSet(boolean value) {
9460
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9461
    }
9462
 
553 chandransh 9463
    public long getAddressId() {
9464
      return this.addressId;
9465
    }
9466
 
9467
    public removeAddressForUser_args setAddressId(long addressId) {
9468
      this.addressId = addressId;
9469
      setAddressIdIsSet(true);
9470
      return this;
9471
    }
9472
 
9473
    public void unsetAddressId() {
9474
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9475
    }
9476
 
9477
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9478
    public boolean isSetAddressId() {
9479
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9480
    }
9481
 
9482
    public void setAddressIdIsSet(boolean value) {
9483
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9484
    }
9485
 
48 ashish 9486
    public void setFieldValue(_Fields field, Object value) {
9487
      switch (field) {
553 chandransh 9488
      case USERID:
48 ashish 9489
        if (value == null) {
553 chandransh 9490
          unsetUserid();
48 ashish 9491
        } else {
553 chandransh 9492
          setUserid((Long)value);
48 ashish 9493
        }
9494
        break;
9495
 
553 chandransh 9496
      case ADDRESS_ID:
9497
        if (value == null) {
9498
          unsetAddressId();
9499
        } else {
9500
          setAddressId((Long)value);
9501
        }
9502
        break;
9503
 
48 ashish 9504
      }
9505
    }
9506
 
9507
    public void setFieldValue(int fieldID, Object value) {
9508
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9509
    }
9510
 
9511
    public Object getFieldValue(_Fields field) {
9512
      switch (field) {
553 chandransh 9513
      case USERID:
9514
        return new Long(getUserid());
48 ashish 9515
 
553 chandransh 9516
      case ADDRESS_ID:
9517
        return new Long(getAddressId());
9518
 
48 ashish 9519
      }
9520
      throw new IllegalStateException();
9521
    }
9522
 
9523
    public Object getFieldValue(int fieldId) {
9524
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9525
    }
9526
 
9527
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9528
    public boolean isSet(_Fields field) {
9529
      switch (field) {
553 chandransh 9530
      case USERID:
9531
        return isSetUserid();
9532
      case ADDRESS_ID:
9533
        return isSetAddressId();
48 ashish 9534
      }
9535
      throw new IllegalStateException();
9536
    }
9537
 
9538
    public boolean isSet(int fieldID) {
9539
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9540
    }
9541
 
9542
    @Override
9543
    public boolean equals(Object that) {
9544
      if (that == null)
9545
        return false;
553 chandransh 9546
      if (that instanceof removeAddressForUser_args)
9547
        return this.equals((removeAddressForUser_args)that);
48 ashish 9548
      return false;
9549
    }
9550
 
553 chandransh 9551
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9552
      if (that == null)
9553
        return false;
9554
 
553 chandransh 9555
      boolean this_present_userid = true;
9556
      boolean that_present_userid = true;
9557
      if (this_present_userid || that_present_userid) {
9558
        if (!(this_present_userid && that_present_userid))
48 ashish 9559
          return false;
553 chandransh 9560
        if (this.userid != that.userid)
48 ashish 9561
          return false;
9562
      }
9563
 
553 chandransh 9564
      boolean this_present_addressId = true;
9565
      boolean that_present_addressId = true;
9566
      if (this_present_addressId || that_present_addressId) {
9567
        if (!(this_present_addressId && that_present_addressId))
9568
          return false;
9569
        if (this.addressId != that.addressId)
9570
          return false;
9571
      }
9572
 
48 ashish 9573
      return true;
9574
    }
9575
 
9576
    @Override
9577
    public int hashCode() {
9578
      return 0;
9579
    }
9580
 
553 chandransh 9581
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9582
      if (!getClass().equals(other.getClass())) {
9583
        return getClass().getName().compareTo(other.getClass().getName());
9584
      }
9585
 
9586
      int lastComparison = 0;
553 chandransh 9587
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9588
 
553 chandransh 9589
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9590
      if (lastComparison != 0) {
9591
        return lastComparison;
9592
      }
553 chandransh 9593
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9594
      if (lastComparison != 0) {
9595
        return lastComparison;
9596
      }
553 chandransh 9597
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9598
      if (lastComparison != 0) {
9599
        return lastComparison;
9600
      }
9601
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9602
      if (lastComparison != 0) {
9603
        return lastComparison;
9604
      }
48 ashish 9605
      return 0;
9606
    }
9607
 
9608
    public void read(TProtocol iprot) throws TException {
9609
      TField field;
9610
      iprot.readStructBegin();
9611
      while (true)
9612
      {
9613
        field = iprot.readFieldBegin();
9614
        if (field.type == TType.STOP) { 
9615
          break;
9616
        }
9617
        _Fields fieldId = _Fields.findByThriftId(field.id);
9618
        if (fieldId == null) {
9619
          TProtocolUtil.skip(iprot, field.type);
9620
        } else {
9621
          switch (fieldId) {
553 chandransh 9622
            case USERID:
9623
              if (field.type == TType.I64) {
9624
                this.userid = iprot.readI64();
9625
                setUseridIsSet(true);
48 ashish 9626
              } else { 
9627
                TProtocolUtil.skip(iprot, field.type);
9628
              }
9629
              break;
553 chandransh 9630
            case ADDRESS_ID:
9631
              if (field.type == TType.I64) {
9632
                this.addressId = iprot.readI64();
9633
                setAddressIdIsSet(true);
9634
              } else { 
9635
                TProtocolUtil.skip(iprot, field.type);
9636
              }
9637
              break;
48 ashish 9638
          }
9639
          iprot.readFieldEnd();
9640
        }
9641
      }
9642
      iprot.readStructEnd();
9643
      validate();
9644
    }
9645
 
9646
    public void write(TProtocol oprot) throws TException {
9647
      validate();
9648
 
9649
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9650
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9651
      oprot.writeI64(this.userid);
9652
      oprot.writeFieldEnd();
9653
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9654
      oprot.writeI64(this.addressId);
9655
      oprot.writeFieldEnd();
48 ashish 9656
      oprot.writeFieldStop();
9657
      oprot.writeStructEnd();
9658
    }
9659
 
9660
    @Override
9661
    public String toString() {
553 chandransh 9662
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9663
      boolean first = true;
9664
 
553 chandransh 9665
      sb.append("userid:");
9666
      sb.append(this.userid);
48 ashish 9667
      first = false;
553 chandransh 9668
      if (!first) sb.append(", ");
9669
      sb.append("addressId:");
9670
      sb.append(this.addressId);
9671
      first = false;
48 ashish 9672
      sb.append(")");
9673
      return sb.toString();
9674
    }
9675
 
9676
    public void validate() throws TException {
9677
      // check for required fields
9678
    }
9679
 
9680
  }
9681
 
553 chandransh 9682
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9683
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9684
 
9685
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9686
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9687
 
9688
    private boolean success;
9689
    private UserContextException ucx;
9690
 
9691
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9692
    public enum _Fields implements TFieldIdEnum {
9693
      SUCCESS((short)0, "success"),
9694
      UCX((short)1, "ucx");
9695
 
9696
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9697
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9698
 
9699
      static {
9700
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9701
          byId.put((int)field._thriftId, field);
9702
          byName.put(field.getFieldName(), field);
9703
        }
9704
      }
9705
 
9706
      /**
9707
       * Find the _Fields constant that matches fieldId, or null if its not found.
9708
       */
9709
      public static _Fields findByThriftId(int fieldId) {
9710
        return byId.get(fieldId);
9711
      }
9712
 
9713
      /**
9714
       * Find the _Fields constant that matches fieldId, throwing an exception
9715
       * if it is not found.
9716
       */
9717
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9718
        _Fields fields = findByThriftId(fieldId);
9719
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9720
        return fields;
9721
      }
9722
 
9723
      /**
9724
       * Find the _Fields constant that matches name, or null if its not found.
9725
       */
9726
      public static _Fields findByName(String name) {
9727
        return byName.get(name);
9728
      }
9729
 
9730
      private final short _thriftId;
9731
      private final String _fieldName;
9732
 
9733
      _Fields(short thriftId, String fieldName) {
9734
        _thriftId = thriftId;
9735
        _fieldName = fieldName;
9736
      }
9737
 
9738
      public short getThriftFieldId() {
9739
        return _thriftId;
9740
      }
9741
 
9742
      public String getFieldName() {
9743
        return _fieldName;
9744
      }
9745
    }
9746
 
9747
    // isset id assignments
9748
    private static final int __SUCCESS_ISSET_ID = 0;
9749
    private BitSet __isset_bit_vector = new BitSet(1);
9750
 
9751
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9752
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9753
          new FieldValueMetaData(TType.BOOL)));
9754
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9755
          new FieldValueMetaData(TType.STRUCT)));
9756
    }});
9757
 
9758
    static {
553 chandransh 9759
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9760
    }
9761
 
553 chandransh 9762
    public removeAddressForUser_result() {
48 ashish 9763
    }
9764
 
553 chandransh 9765
    public removeAddressForUser_result(
48 ashish 9766
      boolean success,
9767
      UserContextException ucx)
9768
    {
9769
      this();
9770
      this.success = success;
9771
      setSuccessIsSet(true);
9772
      this.ucx = ucx;
9773
    }
9774
 
9775
    /**
9776
     * Performs a deep copy on <i>other</i>.
9777
     */
553 chandransh 9778
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9779
      __isset_bit_vector.clear();
9780
      __isset_bit_vector.or(other.__isset_bit_vector);
9781
      this.success = other.success;
9782
      if (other.isSetUcx()) {
9783
        this.ucx = new UserContextException(other.ucx);
9784
      }
9785
    }
9786
 
553 chandransh 9787
    public removeAddressForUser_result deepCopy() {
9788
      return new removeAddressForUser_result(this);
48 ashish 9789
    }
9790
 
9791
    @Deprecated
553 chandransh 9792
    public removeAddressForUser_result clone() {
9793
      return new removeAddressForUser_result(this);
48 ashish 9794
    }
9795
 
9796
    public boolean isSuccess() {
9797
      return this.success;
9798
    }
9799
 
553 chandransh 9800
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9801
      this.success = success;
9802
      setSuccessIsSet(true);
9803
      return this;
9804
    }
9805
 
9806
    public void unsetSuccess() {
9807
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9808
    }
9809
 
9810
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9811
    public boolean isSetSuccess() {
9812
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9813
    }
9814
 
9815
    public void setSuccessIsSet(boolean value) {
9816
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9817
    }
9818
 
9819
    public UserContextException getUcx() {
9820
      return this.ucx;
9821
    }
9822
 
553 chandransh 9823
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9824
      this.ucx = ucx;
9825
      return this;
9826
    }
9827
 
9828
    public void unsetUcx() {
9829
      this.ucx = null;
9830
    }
9831
 
9832
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9833
    public boolean isSetUcx() {
9834
      return this.ucx != null;
9835
    }
9836
 
9837
    public void setUcxIsSet(boolean value) {
9838
      if (!value) {
9839
        this.ucx = null;
9840
      }
9841
    }
9842
 
9843
    public void setFieldValue(_Fields field, Object value) {
9844
      switch (field) {
9845
      case SUCCESS:
9846
        if (value == null) {
9847
          unsetSuccess();
9848
        } else {
9849
          setSuccess((Boolean)value);
9850
        }
9851
        break;
9852
 
9853
      case UCX:
9854
        if (value == null) {
9855
          unsetUcx();
9856
        } else {
9857
          setUcx((UserContextException)value);
9858
        }
9859
        break;
9860
 
9861
      }
9862
    }
9863
 
9864
    public void setFieldValue(int fieldID, Object value) {
9865
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9866
    }
9867
 
9868
    public Object getFieldValue(_Fields field) {
9869
      switch (field) {
9870
      case SUCCESS:
9871
        return new Boolean(isSuccess());
9872
 
9873
      case UCX:
9874
        return getUcx();
9875
 
9876
      }
9877
      throw new IllegalStateException();
9878
    }
9879
 
9880
    public Object getFieldValue(int fieldId) {
9881
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9882
    }
9883
 
9884
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9885
    public boolean isSet(_Fields field) {
9886
      switch (field) {
9887
      case SUCCESS:
9888
        return isSetSuccess();
9889
      case UCX:
9890
        return isSetUcx();
9891
      }
9892
      throw new IllegalStateException();
9893
    }
9894
 
9895
    public boolean isSet(int fieldID) {
9896
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9897
    }
9898
 
9899
    @Override
9900
    public boolean equals(Object that) {
9901
      if (that == null)
9902
        return false;
553 chandransh 9903
      if (that instanceof removeAddressForUser_result)
9904
        return this.equals((removeAddressForUser_result)that);
48 ashish 9905
      return false;
9906
    }
9907
 
553 chandransh 9908
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9909
      if (that == null)
9910
        return false;
9911
 
9912
      boolean this_present_success = true;
9913
      boolean that_present_success = true;
9914
      if (this_present_success || that_present_success) {
9915
        if (!(this_present_success && that_present_success))
9916
          return false;
9917
        if (this.success != that.success)
9918
          return false;
9919
      }
9920
 
9921
      boolean this_present_ucx = true && this.isSetUcx();
9922
      boolean that_present_ucx = true && that.isSetUcx();
9923
      if (this_present_ucx || that_present_ucx) {
9924
        if (!(this_present_ucx && that_present_ucx))
9925
          return false;
9926
        if (!this.ucx.equals(that.ucx))
9927
          return false;
9928
      }
9929
 
9930
      return true;
9931
    }
9932
 
9933
    @Override
9934
    public int hashCode() {
9935
      return 0;
9936
    }
9937
 
553 chandransh 9938
    public int compareTo(removeAddressForUser_result other) {
48 ashish 9939
      if (!getClass().equals(other.getClass())) {
9940
        return getClass().getName().compareTo(other.getClass().getName());
9941
      }
9942
 
9943
      int lastComparison = 0;
553 chandransh 9944
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 9945
 
9946
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9947
      if (lastComparison != 0) {
9948
        return lastComparison;
9949
      }
9950
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9951
      if (lastComparison != 0) {
9952
        return lastComparison;
9953
      }
9954
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9955
      if (lastComparison != 0) {
9956
        return lastComparison;
9957
      }
9958
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9959
      if (lastComparison != 0) {
9960
        return lastComparison;
9961
      }
9962
      return 0;
9963
    }
9964
 
9965
    public void read(TProtocol iprot) throws TException {
9966
      TField field;
9967
      iprot.readStructBegin();
9968
      while (true)
9969
      {
9970
        field = iprot.readFieldBegin();
9971
        if (field.type == TType.STOP) { 
9972
          break;
9973
        }
9974
        _Fields fieldId = _Fields.findByThriftId(field.id);
9975
        if (fieldId == null) {
9976
          TProtocolUtil.skip(iprot, field.type);
9977
        } else {
9978
          switch (fieldId) {
9979
            case SUCCESS:
9980
              if (field.type == TType.BOOL) {
9981
                this.success = iprot.readBool();
9982
                setSuccessIsSet(true);
9983
              } else { 
9984
                TProtocolUtil.skip(iprot, field.type);
9985
              }
9986
              break;
9987
            case UCX:
9988
              if (field.type == TType.STRUCT) {
9989
                this.ucx = new UserContextException();
9990
                this.ucx.read(iprot);
9991
              } else { 
9992
                TProtocolUtil.skip(iprot, field.type);
9993
              }
9994
              break;
9995
          }
9996
          iprot.readFieldEnd();
9997
        }
9998
      }
9999
      iprot.readStructEnd();
10000
      validate();
10001
    }
10002
 
10003
    public void write(TProtocol oprot) throws TException {
10004
      oprot.writeStructBegin(STRUCT_DESC);
10005
 
10006
      if (this.isSetSuccess()) {
10007
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10008
        oprot.writeBool(this.success);
10009
        oprot.writeFieldEnd();
10010
      } else if (this.isSetUcx()) {
10011
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10012
        this.ucx.write(oprot);
10013
        oprot.writeFieldEnd();
10014
      }
10015
      oprot.writeFieldStop();
10016
      oprot.writeStructEnd();
10017
    }
10018
 
10019
    @Override
10020
    public String toString() {
553 chandransh 10021
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 10022
      boolean first = true;
10023
 
10024
      sb.append("success:");
10025
      sb.append(this.success);
10026
      first = false;
10027
      if (!first) sb.append(", ");
10028
      sb.append("ucx:");
10029
      if (this.ucx == null) {
10030
        sb.append("null");
10031
      } else {
10032
        sb.append(this.ucx);
10033
      }
10034
      first = false;
10035
      sb.append(")");
10036
      return sb.toString();
10037
    }
10038
 
10039
    public void validate() throws TException {
10040
      // check for required fields
10041
    }
10042
 
10043
  }
10044
 
553 chandransh 10045
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10046
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 10047
 
553 chandransh 10048
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 10049
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10050
 
553 chandransh 10051
    private long userId;
48 ashish 10052
    private long timestamp;
10053
 
10054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10055
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10056
      USER_ID((short)1, "userId"),
10057
      TIMESTAMP((short)2, "timestamp");
48 ashish 10058
 
10059
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10060
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10061
 
10062
      static {
10063
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10064
          byId.put((int)field._thriftId, field);
10065
          byName.put(field.getFieldName(), field);
10066
        }
10067
      }
10068
 
10069
      /**
10070
       * Find the _Fields constant that matches fieldId, or null if its not found.
10071
       */
10072
      public static _Fields findByThriftId(int fieldId) {
10073
        return byId.get(fieldId);
10074
      }
10075
 
10076
      /**
10077
       * Find the _Fields constant that matches fieldId, throwing an exception
10078
       * if it is not found.
10079
       */
10080
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10081
        _Fields fields = findByThriftId(fieldId);
10082
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10083
        return fields;
10084
      }
10085
 
10086
      /**
10087
       * Find the _Fields constant that matches name, or null if its not found.
10088
       */
10089
      public static _Fields findByName(String name) {
10090
        return byName.get(name);
10091
      }
10092
 
10093
      private final short _thriftId;
10094
      private final String _fieldName;
10095
 
10096
      _Fields(short thriftId, String fieldName) {
10097
        _thriftId = thriftId;
10098
        _fieldName = fieldName;
10099
      }
10100
 
10101
      public short getThriftFieldId() {
10102
        return _thriftId;
10103
      }
10104
 
10105
      public String getFieldName() {
10106
        return _fieldName;
10107
      }
10108
    }
10109
 
10110
    // isset id assignments
553 chandransh 10111
    private static final int __USERID_ISSET_ID = 0;
10112
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 10113
    private BitSet __isset_bit_vector = new BitSet(2);
10114
 
10115
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10116
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10117
          new FieldValueMetaData(TType.I64)));
48 ashish 10118
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10119
          new FieldValueMetaData(TType.I64)));
10120
    }});
10121
 
10122
    static {
553 chandransh 10123
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 10124
    }
10125
 
553 chandransh 10126
    public setUserAsLoggedIn_args() {
48 ashish 10127
    }
10128
 
553 chandransh 10129
    public setUserAsLoggedIn_args(
10130
      long userId,
10131
      long timestamp)
48 ashish 10132
    {
10133
      this();
553 chandransh 10134
      this.userId = userId;
10135
      setUserIdIsSet(true);
48 ashish 10136
      this.timestamp = timestamp;
10137
      setTimestampIsSet(true);
10138
    }
10139
 
10140
    /**
10141
     * Performs a deep copy on <i>other</i>.
10142
     */
553 chandransh 10143
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 10144
      __isset_bit_vector.clear();
10145
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 10146
      this.userId = other.userId;
48 ashish 10147
      this.timestamp = other.timestamp;
10148
    }
10149
 
553 chandransh 10150
    public setUserAsLoggedIn_args deepCopy() {
10151
      return new setUserAsLoggedIn_args(this);
48 ashish 10152
    }
10153
 
10154
    @Deprecated
553 chandransh 10155
    public setUserAsLoggedIn_args clone() {
10156
      return new setUserAsLoggedIn_args(this);
48 ashish 10157
    }
10158
 
553 chandransh 10159
    public long getUserId() {
10160
      return this.userId;
48 ashish 10161
    }
10162
 
553 chandransh 10163
    public setUserAsLoggedIn_args setUserId(long userId) {
10164
      this.userId = userId;
10165
      setUserIdIsSet(true);
48 ashish 10166
      return this;
10167
    }
10168
 
553 chandransh 10169
    public void unsetUserId() {
10170
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10171
    }
10172
 
553 chandransh 10173
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10174
    public boolean isSetUserId() {
10175
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10176
    }
10177
 
553 chandransh 10178
    public void setUserIdIsSet(boolean value) {
10179
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10180
    }
10181
 
10182
    public long getTimestamp() {
10183
      return this.timestamp;
10184
    }
10185
 
553 chandransh 10186
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 10187
      this.timestamp = timestamp;
10188
      setTimestampIsSet(true);
10189
      return this;
10190
    }
10191
 
10192
    public void unsetTimestamp() {
10193
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10194
    }
10195
 
10196
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10197
    public boolean isSetTimestamp() {
10198
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10199
    }
10200
 
10201
    public void setTimestampIsSet(boolean value) {
10202
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10203
    }
10204
 
10205
    public void setFieldValue(_Fields field, Object value) {
10206
      switch (field) {
553 chandransh 10207
      case USER_ID:
48 ashish 10208
        if (value == null) {
553 chandransh 10209
          unsetUserId();
48 ashish 10210
        } else {
553 chandransh 10211
          setUserId((Long)value);
48 ashish 10212
        }
10213
        break;
10214
 
10215
      case TIMESTAMP:
10216
        if (value == null) {
10217
          unsetTimestamp();
10218
        } else {
10219
          setTimestamp((Long)value);
10220
        }
10221
        break;
10222
 
10223
      }
10224
    }
10225
 
10226
    public void setFieldValue(int fieldID, Object value) {
10227
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10228
    }
10229
 
10230
    public Object getFieldValue(_Fields field) {
10231
      switch (field) {
553 chandransh 10232
      case USER_ID:
10233
        return new Long(getUserId());
48 ashish 10234
 
10235
      case TIMESTAMP:
10236
        return new Long(getTimestamp());
10237
 
10238
      }
10239
      throw new IllegalStateException();
10240
    }
10241
 
10242
    public Object getFieldValue(int fieldId) {
10243
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10244
    }
10245
 
10246
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10247
    public boolean isSet(_Fields field) {
10248
      switch (field) {
553 chandransh 10249
      case USER_ID:
10250
        return isSetUserId();
48 ashish 10251
      case TIMESTAMP:
10252
        return isSetTimestamp();
10253
      }
10254
      throw new IllegalStateException();
10255
    }
10256
 
10257
    public boolean isSet(int fieldID) {
10258
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10259
    }
10260
 
10261
    @Override
10262
    public boolean equals(Object that) {
10263
      if (that == null)
10264
        return false;
553 chandransh 10265
      if (that instanceof setUserAsLoggedIn_args)
10266
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 10267
      return false;
10268
    }
10269
 
553 chandransh 10270
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 10271
      if (that == null)
10272
        return false;
10273
 
553 chandransh 10274
      boolean this_present_userId = true;
10275
      boolean that_present_userId = true;
10276
      if (this_present_userId || that_present_userId) {
10277
        if (!(this_present_userId && that_present_userId))
48 ashish 10278
          return false;
553 chandransh 10279
        if (this.userId != that.userId)
48 ashish 10280
          return false;
10281
      }
10282
 
10283
      boolean this_present_timestamp = true;
10284
      boolean that_present_timestamp = true;
10285
      if (this_present_timestamp || that_present_timestamp) {
10286
        if (!(this_present_timestamp && that_present_timestamp))
10287
          return false;
10288
        if (this.timestamp != that.timestamp)
10289
          return false;
10290
      }
10291
 
10292
      return true;
10293
    }
10294
 
10295
    @Override
10296
    public int hashCode() {
10297
      return 0;
10298
    }
10299
 
553 chandransh 10300
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 10301
      if (!getClass().equals(other.getClass())) {
10302
        return getClass().getName().compareTo(other.getClass().getName());
10303
      }
10304
 
10305
      int lastComparison = 0;
553 chandransh 10306
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 10307
 
553 chandransh 10308
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 10309
      if (lastComparison != 0) {
10310
        return lastComparison;
10311
      }
553 chandransh 10312
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 10313
      if (lastComparison != 0) {
10314
        return lastComparison;
10315
      }
10316
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10317
      if (lastComparison != 0) {
10318
        return lastComparison;
10319
      }
10320
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10321
      if (lastComparison != 0) {
10322
        return lastComparison;
10323
      }
10324
      return 0;
10325
    }
10326
 
10327
    public void read(TProtocol iprot) throws TException {
10328
      TField field;
10329
      iprot.readStructBegin();
10330
      while (true)
10331
      {
10332
        field = iprot.readFieldBegin();
10333
        if (field.type == TType.STOP) { 
10334
          break;
10335
        }
10336
        _Fields fieldId = _Fields.findByThriftId(field.id);
10337
        if (fieldId == null) {
10338
          TProtocolUtil.skip(iprot, field.type);
10339
        } else {
10340
          switch (fieldId) {
553 chandransh 10341
            case USER_ID:
10342
              if (field.type == TType.I64) {
10343
                this.userId = iprot.readI64();
10344
                setUserIdIsSet(true);
48 ashish 10345
              } else { 
10346
                TProtocolUtil.skip(iprot, field.type);
10347
              }
10348
              break;
10349
            case TIMESTAMP:
10350
              if (field.type == TType.I64) {
10351
                this.timestamp = iprot.readI64();
10352
                setTimestampIsSet(true);
10353
              } else { 
10354
                TProtocolUtil.skip(iprot, field.type);
10355
              }
10356
              break;
10357
          }
10358
          iprot.readFieldEnd();
10359
        }
10360
      }
10361
      iprot.readStructEnd();
10362
      validate();
10363
    }
10364
 
10365
    public void write(TProtocol oprot) throws TException {
10366
      validate();
10367
 
10368
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10369
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10370
      oprot.writeI64(this.userId);
10371
      oprot.writeFieldEnd();
48 ashish 10372
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10373
      oprot.writeI64(this.timestamp);
10374
      oprot.writeFieldEnd();
10375
      oprot.writeFieldStop();
10376
      oprot.writeStructEnd();
10377
    }
10378
 
10379
    @Override
10380
    public String toString() {
553 chandransh 10381
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 10382
      boolean first = true;
10383
 
553 chandransh 10384
      sb.append("userId:");
10385
      sb.append(this.userId);
48 ashish 10386
      first = false;
10387
      if (!first) sb.append(", ");
10388
      sb.append("timestamp:");
10389
      sb.append(this.timestamp);
10390
      first = false;
10391
      sb.append(")");
10392
      return sb.toString();
10393
    }
10394
 
10395
    public void validate() throws TException {
10396
      // check for required fields
10397
    }
10398
 
10399
  }
10400
 
553 chandransh 10401
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10402
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 10403
 
10404
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10405
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10406
 
10407
    private boolean success;
10408
    private UserContextException ucx;
10409
 
10410
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10411
    public enum _Fields implements TFieldIdEnum {
10412
      SUCCESS((short)0, "success"),
10413
      UCX((short)1, "ucx");
10414
 
10415
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10417
 
10418
      static {
10419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10420
          byId.put((int)field._thriftId, field);
10421
          byName.put(field.getFieldName(), field);
10422
        }
10423
      }
10424
 
10425
      /**
10426
       * Find the _Fields constant that matches fieldId, or null if its not found.
10427
       */
10428
      public static _Fields findByThriftId(int fieldId) {
10429
        return byId.get(fieldId);
10430
      }
10431
 
10432
      /**
10433
       * Find the _Fields constant that matches fieldId, throwing an exception
10434
       * if it is not found.
10435
       */
10436
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10437
        _Fields fields = findByThriftId(fieldId);
10438
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10439
        return fields;
10440
      }
10441
 
10442
      /**
10443
       * Find the _Fields constant that matches name, or null if its not found.
10444
       */
10445
      public static _Fields findByName(String name) {
10446
        return byName.get(name);
10447
      }
10448
 
10449
      private final short _thriftId;
10450
      private final String _fieldName;
10451
 
10452
      _Fields(short thriftId, String fieldName) {
10453
        _thriftId = thriftId;
10454
        _fieldName = fieldName;
10455
      }
10456
 
10457
      public short getThriftFieldId() {
10458
        return _thriftId;
10459
      }
10460
 
10461
      public String getFieldName() {
10462
        return _fieldName;
10463
      }
10464
    }
10465
 
10466
    // isset id assignments
10467
    private static final int __SUCCESS_ISSET_ID = 0;
10468
    private BitSet __isset_bit_vector = new BitSet(1);
10469
 
10470
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10471
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10472
          new FieldValueMetaData(TType.BOOL)));
10473
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10474
          new FieldValueMetaData(TType.STRUCT)));
10475
    }});
10476
 
10477
    static {
553 chandransh 10478
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10479
    }
10480
 
553 chandransh 10481
    public setUserAsLoggedIn_result() {
48 ashish 10482
    }
10483
 
553 chandransh 10484
    public setUserAsLoggedIn_result(
48 ashish 10485
      boolean success,
10486
      UserContextException ucx)
10487
    {
10488
      this();
10489
      this.success = success;
10490
      setSuccessIsSet(true);
10491
      this.ucx = ucx;
10492
    }
10493
 
10494
    /**
10495
     * Performs a deep copy on <i>other</i>.
10496
     */
553 chandransh 10497
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10498
      __isset_bit_vector.clear();
10499
      __isset_bit_vector.or(other.__isset_bit_vector);
10500
      this.success = other.success;
10501
      if (other.isSetUcx()) {
10502
        this.ucx = new UserContextException(other.ucx);
10503
      }
10504
    }
10505
 
553 chandransh 10506
    public setUserAsLoggedIn_result deepCopy() {
10507
      return new setUserAsLoggedIn_result(this);
48 ashish 10508
    }
10509
 
10510
    @Deprecated
553 chandransh 10511
    public setUserAsLoggedIn_result clone() {
10512
      return new setUserAsLoggedIn_result(this);
48 ashish 10513
    }
10514
 
10515
    public boolean isSuccess() {
10516
      return this.success;
10517
    }
10518
 
553 chandransh 10519
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10520
      this.success = success;
10521
      setSuccessIsSet(true);
10522
      return this;
10523
    }
10524
 
10525
    public void unsetSuccess() {
10526
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10527
    }
10528
 
10529
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10530
    public boolean isSetSuccess() {
10531
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10532
    }
10533
 
10534
    public void setSuccessIsSet(boolean value) {
10535
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10536
    }
10537
 
10538
    public UserContextException getUcx() {
10539
      return this.ucx;
10540
    }
10541
 
553 chandransh 10542
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10543
      this.ucx = ucx;
10544
      return this;
10545
    }
10546
 
10547
    public void unsetUcx() {
10548
      this.ucx = null;
10549
    }
10550
 
10551
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10552
    public boolean isSetUcx() {
10553
      return this.ucx != null;
10554
    }
10555
 
10556
    public void setUcxIsSet(boolean value) {
10557
      if (!value) {
10558
        this.ucx = null;
10559
      }
10560
    }
10561
 
10562
    public void setFieldValue(_Fields field, Object value) {
10563
      switch (field) {
10564
      case SUCCESS:
10565
        if (value == null) {
10566
          unsetSuccess();
10567
        } else {
10568
          setSuccess((Boolean)value);
10569
        }
10570
        break;
10571
 
10572
      case UCX:
10573
        if (value == null) {
10574
          unsetUcx();
10575
        } else {
10576
          setUcx((UserContextException)value);
10577
        }
10578
        break;
10579
 
10580
      }
10581
    }
10582
 
10583
    public void setFieldValue(int fieldID, Object value) {
10584
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10585
    }
10586
 
10587
    public Object getFieldValue(_Fields field) {
10588
      switch (field) {
10589
      case SUCCESS:
10590
        return new Boolean(isSuccess());
10591
 
10592
      case UCX:
10593
        return getUcx();
10594
 
10595
      }
10596
      throw new IllegalStateException();
10597
    }
10598
 
10599
    public Object getFieldValue(int fieldId) {
10600
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10601
    }
10602
 
10603
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10604
    public boolean isSet(_Fields field) {
10605
      switch (field) {
10606
      case SUCCESS:
10607
        return isSetSuccess();
10608
      case UCX:
10609
        return isSetUcx();
10610
      }
10611
      throw new IllegalStateException();
10612
    }
10613
 
10614
    public boolean isSet(int fieldID) {
10615
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10616
    }
10617
 
10618
    @Override
10619
    public boolean equals(Object that) {
10620
      if (that == null)
10621
        return false;
553 chandransh 10622
      if (that instanceof setUserAsLoggedIn_result)
10623
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10624
      return false;
10625
    }
10626
 
553 chandransh 10627
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10628
      if (that == null)
10629
        return false;
10630
 
10631
      boolean this_present_success = true;
10632
      boolean that_present_success = true;
10633
      if (this_present_success || that_present_success) {
10634
        if (!(this_present_success && that_present_success))
10635
          return false;
10636
        if (this.success != that.success)
10637
          return false;
10638
      }
10639
 
10640
      boolean this_present_ucx = true && this.isSetUcx();
10641
      boolean that_present_ucx = true && that.isSetUcx();
10642
      if (this_present_ucx || that_present_ucx) {
10643
        if (!(this_present_ucx && that_present_ucx))
10644
          return false;
10645
        if (!this.ucx.equals(that.ucx))
10646
          return false;
10647
      }
10648
 
10649
      return true;
10650
    }
10651
 
10652
    @Override
10653
    public int hashCode() {
10654
      return 0;
10655
    }
10656
 
553 chandransh 10657
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10658
      if (!getClass().equals(other.getClass())) {
10659
        return getClass().getName().compareTo(other.getClass().getName());
10660
      }
10661
 
10662
      int lastComparison = 0;
553 chandransh 10663
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10664
 
10665
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10666
      if (lastComparison != 0) {
10667
        return lastComparison;
10668
      }
10669
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10670
      if (lastComparison != 0) {
10671
        return lastComparison;
10672
      }
10673
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10674
      if (lastComparison != 0) {
10675
        return lastComparison;
10676
      }
10677
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10678
      if (lastComparison != 0) {
10679
        return lastComparison;
10680
      }
10681
      return 0;
10682
    }
10683
 
10684
    public void read(TProtocol iprot) throws TException {
10685
      TField field;
10686
      iprot.readStructBegin();
10687
      while (true)
10688
      {
10689
        field = iprot.readFieldBegin();
10690
        if (field.type == TType.STOP) { 
10691
          break;
10692
        }
10693
        _Fields fieldId = _Fields.findByThriftId(field.id);
10694
        if (fieldId == null) {
10695
          TProtocolUtil.skip(iprot, field.type);
10696
        } else {
10697
          switch (fieldId) {
10698
            case SUCCESS:
10699
              if (field.type == TType.BOOL) {
10700
                this.success = iprot.readBool();
10701
                setSuccessIsSet(true);
10702
              } else { 
10703
                TProtocolUtil.skip(iprot, field.type);
10704
              }
10705
              break;
10706
            case UCX:
10707
              if (field.type == TType.STRUCT) {
10708
                this.ucx = new UserContextException();
10709
                this.ucx.read(iprot);
10710
              } else { 
10711
                TProtocolUtil.skip(iprot, field.type);
10712
              }
10713
              break;
10714
          }
10715
          iprot.readFieldEnd();
10716
        }
10717
      }
10718
      iprot.readStructEnd();
10719
      validate();
10720
    }
10721
 
10722
    public void write(TProtocol oprot) throws TException {
10723
      oprot.writeStructBegin(STRUCT_DESC);
10724
 
10725
      if (this.isSetSuccess()) {
10726
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10727
        oprot.writeBool(this.success);
10728
        oprot.writeFieldEnd();
10729
      } else if (this.isSetUcx()) {
10730
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10731
        this.ucx.write(oprot);
10732
        oprot.writeFieldEnd();
10733
      }
10734
      oprot.writeFieldStop();
10735
      oprot.writeStructEnd();
10736
    }
10737
 
10738
    @Override
10739
    public String toString() {
553 chandransh 10740
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10741
      boolean first = true;
10742
 
10743
      sb.append("success:");
10744
      sb.append(this.success);
10745
      first = false;
10746
      if (!first) sb.append(", ");
10747
      sb.append("ucx:");
10748
      if (this.ucx == null) {
10749
        sb.append("null");
10750
      } else {
10751
        sb.append(this.ucx);
10752
      }
10753
      first = false;
10754
      sb.append(")");
10755
      return sb.toString();
10756
    }
10757
 
10758
    public void validate() throws TException {
10759
      // check for required fields
10760
    }
10761
 
10762
  }
10763
 
553 chandransh 10764
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10765
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10766
 
553 chandransh 10767
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10768
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10769
 
10770
    private long userid;
10771
    private long timestamp;
10772
 
10773
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10774
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10775
      USERID((short)1, "userid"),
10776
      TIMESTAMP((short)2, "timestamp");
48 ashish 10777
 
10778
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10779
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10780
 
10781
      static {
10782
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10783
          byId.put((int)field._thriftId, field);
10784
          byName.put(field.getFieldName(), field);
10785
        }
10786
      }
10787
 
10788
      /**
10789
       * Find the _Fields constant that matches fieldId, or null if its not found.
10790
       */
10791
      public static _Fields findByThriftId(int fieldId) {
10792
        return byId.get(fieldId);
10793
      }
10794
 
10795
      /**
10796
       * Find the _Fields constant that matches fieldId, throwing an exception
10797
       * if it is not found.
10798
       */
10799
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10800
        _Fields fields = findByThriftId(fieldId);
10801
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10802
        return fields;
10803
      }
10804
 
10805
      /**
10806
       * Find the _Fields constant that matches name, or null if its not found.
10807
       */
10808
      public static _Fields findByName(String name) {
10809
        return byName.get(name);
10810
      }
10811
 
10812
      private final short _thriftId;
10813
      private final String _fieldName;
10814
 
10815
      _Fields(short thriftId, String fieldName) {
10816
        _thriftId = thriftId;
10817
        _fieldName = fieldName;
10818
      }
10819
 
10820
      public short getThriftFieldId() {
10821
        return _thriftId;
10822
      }
10823
 
10824
      public String getFieldName() {
10825
        return _fieldName;
10826
      }
10827
    }
10828
 
10829
    // isset id assignments
10830
    private static final int __USERID_ISSET_ID = 0;
10831
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10832
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10833
 
10834
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10835
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10836
          new FieldValueMetaData(TType.I64)));
10837
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10838
          new FieldValueMetaData(TType.I64)));
10839
    }});
10840
 
10841
    static {
553 chandransh 10842
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10843
    }
10844
 
553 chandransh 10845
    public setUserAsLoggedOut_args() {
48 ashish 10846
    }
10847
 
553 chandransh 10848
    public setUserAsLoggedOut_args(
48 ashish 10849
      long userid,
553 chandransh 10850
      long timestamp)
48 ashish 10851
    {
10852
      this();
10853
      this.userid = userid;
10854
      setUseridIsSet(true);
10855
      this.timestamp = timestamp;
10856
      setTimestampIsSet(true);
10857
    }
10858
 
10859
    /**
10860
     * Performs a deep copy on <i>other</i>.
10861
     */
553 chandransh 10862
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10863
      __isset_bit_vector.clear();
10864
      __isset_bit_vector.or(other.__isset_bit_vector);
10865
      this.userid = other.userid;
10866
      this.timestamp = other.timestamp;
10867
    }
10868
 
553 chandransh 10869
    public setUserAsLoggedOut_args deepCopy() {
10870
      return new setUserAsLoggedOut_args(this);
48 ashish 10871
    }
10872
 
10873
    @Deprecated
553 chandransh 10874
    public setUserAsLoggedOut_args clone() {
10875
      return new setUserAsLoggedOut_args(this);
48 ashish 10876
    }
10877
 
10878
    public long getUserid() {
10879
      return this.userid;
10880
    }
10881
 
553 chandransh 10882
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10883
      this.userid = userid;
10884
      setUseridIsSet(true);
10885
      return this;
10886
    }
10887
 
10888
    public void unsetUserid() {
10889
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10890
    }
10891
 
10892
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10893
    public boolean isSetUserid() {
10894
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10895
    }
10896
 
10897
    public void setUseridIsSet(boolean value) {
10898
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10899
    }
10900
 
10901
    public long getTimestamp() {
10902
      return this.timestamp;
10903
    }
10904
 
553 chandransh 10905
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10906
      this.timestamp = timestamp;
10907
      setTimestampIsSet(true);
10908
      return this;
10909
    }
10910
 
10911
    public void unsetTimestamp() {
10912
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10913
    }
10914
 
10915
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10916
    public boolean isSetTimestamp() {
10917
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10918
    }
10919
 
10920
    public void setTimestampIsSet(boolean value) {
10921
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10922
    }
10923
 
10924
    public void setFieldValue(_Fields field, Object value) {
10925
      switch (field) {
10926
      case USERID:
10927
        if (value == null) {
10928
          unsetUserid();
10929
        } else {
10930
          setUserid((Long)value);
10931
        }
10932
        break;
10933
 
10934
      case TIMESTAMP:
10935
        if (value == null) {
10936
          unsetTimestamp();
10937
        } else {
10938
          setTimestamp((Long)value);
10939
        }
10940
        break;
10941
 
10942
      }
10943
    }
10944
 
10945
    public void setFieldValue(int fieldID, Object value) {
10946
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10947
    }
10948
 
10949
    public Object getFieldValue(_Fields field) {
10950
      switch (field) {
10951
      case USERID:
10952
        return new Long(getUserid());
10953
 
10954
      case TIMESTAMP:
10955
        return new Long(getTimestamp());
10956
 
10957
      }
10958
      throw new IllegalStateException();
10959
    }
10960
 
10961
    public Object getFieldValue(int fieldId) {
10962
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10963
    }
10964
 
10965
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10966
    public boolean isSet(_Fields field) {
10967
      switch (field) {
10968
      case USERID:
10969
        return isSetUserid();
10970
      case TIMESTAMP:
10971
        return isSetTimestamp();
10972
      }
10973
      throw new IllegalStateException();
10974
    }
10975
 
10976
    public boolean isSet(int fieldID) {
10977
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10978
    }
10979
 
10980
    @Override
10981
    public boolean equals(Object that) {
10982
      if (that == null)
10983
        return false;
553 chandransh 10984
      if (that instanceof setUserAsLoggedOut_args)
10985
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 10986
      return false;
10987
    }
10988
 
553 chandransh 10989
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 10990
      if (that == null)
10991
        return false;
10992
 
10993
      boolean this_present_userid = true;
10994
      boolean that_present_userid = true;
10995
      if (this_present_userid || that_present_userid) {
10996
        if (!(this_present_userid && that_present_userid))
10997
          return false;
10998
        if (this.userid != that.userid)
10999
          return false;
11000
      }
11001
 
11002
      boolean this_present_timestamp = true;
11003
      boolean that_present_timestamp = true;
11004
      if (this_present_timestamp || that_present_timestamp) {
11005
        if (!(this_present_timestamp && that_present_timestamp))
11006
          return false;
11007
        if (this.timestamp != that.timestamp)
11008
          return false;
11009
      }
11010
 
11011
      return true;
11012
    }
11013
 
11014
    @Override
11015
    public int hashCode() {
11016
      return 0;
11017
    }
11018
 
553 chandransh 11019
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 11020
      if (!getClass().equals(other.getClass())) {
11021
        return getClass().getName().compareTo(other.getClass().getName());
11022
      }
11023
 
11024
      int lastComparison = 0;
553 chandransh 11025
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 11026
 
11027
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11028
      if (lastComparison != 0) {
11029
        return lastComparison;
11030
      }
11031
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11032
      if (lastComparison != 0) {
11033
        return lastComparison;
11034
      }
11035
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11036
      if (lastComparison != 0) {
11037
        return lastComparison;
11038
      }
11039
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11040
      if (lastComparison != 0) {
11041
        return lastComparison;
11042
      }
11043
      return 0;
11044
    }
11045
 
11046
    public void read(TProtocol iprot) throws TException {
11047
      TField field;
11048
      iprot.readStructBegin();
11049
      while (true)
11050
      {
11051
        field = iprot.readFieldBegin();
11052
        if (field.type == TType.STOP) { 
11053
          break;
11054
        }
11055
        _Fields fieldId = _Fields.findByThriftId(field.id);
11056
        if (fieldId == null) {
11057
          TProtocolUtil.skip(iprot, field.type);
11058
        } else {
11059
          switch (fieldId) {
11060
            case USERID:
11061
              if (field.type == TType.I64) {
11062
                this.userid = iprot.readI64();
11063
                setUseridIsSet(true);
11064
              } else { 
11065
                TProtocolUtil.skip(iprot, field.type);
11066
              }
11067
              break;
11068
            case TIMESTAMP:
11069
              if (field.type == TType.I64) {
11070
                this.timestamp = iprot.readI64();
11071
                setTimestampIsSet(true);
11072
              } else { 
11073
                TProtocolUtil.skip(iprot, field.type);
11074
              }
11075
              break;
11076
          }
11077
          iprot.readFieldEnd();
11078
        }
11079
      }
11080
      iprot.readStructEnd();
11081
      validate();
11082
    }
11083
 
11084
    public void write(TProtocol oprot) throws TException {
11085
      validate();
11086
 
11087
      oprot.writeStructBegin(STRUCT_DESC);
11088
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11089
      oprot.writeI64(this.userid);
11090
      oprot.writeFieldEnd();
11091
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11092
      oprot.writeI64(this.timestamp);
11093
      oprot.writeFieldEnd();
11094
      oprot.writeFieldStop();
11095
      oprot.writeStructEnd();
11096
    }
11097
 
11098
    @Override
11099
    public String toString() {
553 chandransh 11100
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 11101
      boolean first = true;
11102
 
11103
      sb.append("userid:");
11104
      sb.append(this.userid);
11105
      first = false;
11106
      if (!first) sb.append(", ");
11107
      sb.append("timestamp:");
11108
      sb.append(this.timestamp);
11109
      first = false;
11110
      sb.append(")");
11111
      return sb.toString();
11112
    }
11113
 
11114
    public void validate() throws TException {
11115
      // check for required fields
11116
    }
11117
 
11118
  }
11119
 
553 chandransh 11120
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11121
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 11122
 
11123
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11124
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11125
 
11126
    private boolean success;
11127
    private UserContextException ucx;
11128
 
11129
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11130
    public enum _Fields implements TFieldIdEnum {
11131
      SUCCESS((short)0, "success"),
11132
      UCX((short)1, "ucx");
11133
 
11134
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11135
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11136
 
11137
      static {
11138
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11139
          byId.put((int)field._thriftId, field);
11140
          byName.put(field.getFieldName(), field);
11141
        }
11142
      }
11143
 
11144
      /**
11145
       * Find the _Fields constant that matches fieldId, or null if its not found.
11146
       */
11147
      public static _Fields findByThriftId(int fieldId) {
11148
        return byId.get(fieldId);
11149
      }
11150
 
11151
      /**
11152
       * Find the _Fields constant that matches fieldId, throwing an exception
11153
       * if it is not found.
11154
       */
11155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11156
        _Fields fields = findByThriftId(fieldId);
11157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11158
        return fields;
11159
      }
11160
 
11161
      /**
11162
       * Find the _Fields constant that matches name, or null if its not found.
11163
       */
11164
      public static _Fields findByName(String name) {
11165
        return byName.get(name);
11166
      }
11167
 
11168
      private final short _thriftId;
11169
      private final String _fieldName;
11170
 
11171
      _Fields(short thriftId, String fieldName) {
11172
        _thriftId = thriftId;
11173
        _fieldName = fieldName;
11174
      }
11175
 
11176
      public short getThriftFieldId() {
11177
        return _thriftId;
11178
      }
11179
 
11180
      public String getFieldName() {
11181
        return _fieldName;
11182
      }
11183
    }
11184
 
11185
    // isset id assignments
11186
    private static final int __SUCCESS_ISSET_ID = 0;
11187
    private BitSet __isset_bit_vector = new BitSet(1);
11188
 
11189
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11190
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11191
          new FieldValueMetaData(TType.BOOL)));
11192
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11193
          new FieldValueMetaData(TType.STRUCT)));
11194
    }});
11195
 
11196
    static {
553 chandransh 11197
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 11198
    }
11199
 
553 chandransh 11200
    public setUserAsLoggedOut_result() {
48 ashish 11201
    }
11202
 
553 chandransh 11203
    public setUserAsLoggedOut_result(
48 ashish 11204
      boolean success,
11205
      UserContextException ucx)
11206
    {
11207
      this();
11208
      this.success = success;
11209
      setSuccessIsSet(true);
11210
      this.ucx = ucx;
11211
    }
11212
 
11213
    /**
11214
     * Performs a deep copy on <i>other</i>.
11215
     */
553 chandransh 11216
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 11217
      __isset_bit_vector.clear();
11218
      __isset_bit_vector.or(other.__isset_bit_vector);
11219
      this.success = other.success;
11220
      if (other.isSetUcx()) {
11221
        this.ucx = new UserContextException(other.ucx);
11222
      }
11223
    }
11224
 
553 chandransh 11225
    public setUserAsLoggedOut_result deepCopy() {
11226
      return new setUserAsLoggedOut_result(this);
48 ashish 11227
    }
11228
 
11229
    @Deprecated
553 chandransh 11230
    public setUserAsLoggedOut_result clone() {
11231
      return new setUserAsLoggedOut_result(this);
48 ashish 11232
    }
11233
 
11234
    public boolean isSuccess() {
11235
      return this.success;
11236
    }
11237
 
553 chandransh 11238
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 11239
      this.success = success;
11240
      setSuccessIsSet(true);
11241
      return this;
11242
    }
11243
 
11244
    public void unsetSuccess() {
11245
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11246
    }
11247
 
11248
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11249
    public boolean isSetSuccess() {
11250
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11251
    }
11252
 
11253
    public void setSuccessIsSet(boolean value) {
11254
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11255
    }
11256
 
11257
    public UserContextException getUcx() {
11258
      return this.ucx;
11259
    }
11260
 
553 chandransh 11261
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 11262
      this.ucx = ucx;
11263
      return this;
11264
    }
11265
 
11266
    public void unsetUcx() {
11267
      this.ucx = null;
11268
    }
11269
 
11270
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11271
    public boolean isSetUcx() {
11272
      return this.ucx != null;
11273
    }
11274
 
11275
    public void setUcxIsSet(boolean value) {
11276
      if (!value) {
11277
        this.ucx = null;
11278
      }
11279
    }
11280
 
11281
    public void setFieldValue(_Fields field, Object value) {
11282
      switch (field) {
11283
      case SUCCESS:
11284
        if (value == null) {
11285
          unsetSuccess();
11286
        } else {
11287
          setSuccess((Boolean)value);
11288
        }
11289
        break;
11290
 
11291
      case UCX:
11292
        if (value == null) {
11293
          unsetUcx();
11294
        } else {
11295
          setUcx((UserContextException)value);
11296
        }
11297
        break;
11298
 
11299
      }
11300
    }
11301
 
11302
    public void setFieldValue(int fieldID, Object value) {
11303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11304
    }
11305
 
11306
    public Object getFieldValue(_Fields field) {
11307
      switch (field) {
11308
      case SUCCESS:
11309
        return new Boolean(isSuccess());
11310
 
11311
      case UCX:
11312
        return getUcx();
11313
 
11314
      }
11315
      throw new IllegalStateException();
11316
    }
11317
 
11318
    public Object getFieldValue(int fieldId) {
11319
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11320
    }
11321
 
11322
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11323
    public boolean isSet(_Fields field) {
11324
      switch (field) {
11325
      case SUCCESS:
11326
        return isSetSuccess();
11327
      case UCX:
11328
        return isSetUcx();
11329
      }
11330
      throw new IllegalStateException();
11331
    }
11332
 
11333
    public boolean isSet(int fieldID) {
11334
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11335
    }
11336
 
11337
    @Override
11338
    public boolean equals(Object that) {
11339
      if (that == null)
11340
        return false;
553 chandransh 11341
      if (that instanceof setUserAsLoggedOut_result)
11342
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 11343
      return false;
11344
    }
11345
 
553 chandransh 11346
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 11347
      if (that == null)
11348
        return false;
11349
 
11350
      boolean this_present_success = true;
11351
      boolean that_present_success = true;
11352
      if (this_present_success || that_present_success) {
11353
        if (!(this_present_success && that_present_success))
11354
          return false;
11355
        if (this.success != that.success)
11356
          return false;
11357
      }
11358
 
11359
      boolean this_present_ucx = true && this.isSetUcx();
11360
      boolean that_present_ucx = true && that.isSetUcx();
11361
      if (this_present_ucx || that_present_ucx) {
11362
        if (!(this_present_ucx && that_present_ucx))
11363
          return false;
11364
        if (!this.ucx.equals(that.ucx))
11365
          return false;
11366
      }
11367
 
11368
      return true;
11369
    }
11370
 
11371
    @Override
11372
    public int hashCode() {
11373
      return 0;
11374
    }
11375
 
553 chandransh 11376
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 11377
      if (!getClass().equals(other.getClass())) {
11378
        return getClass().getName().compareTo(other.getClass().getName());
11379
      }
11380
 
11381
      int lastComparison = 0;
553 chandransh 11382
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 11383
 
11384
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11385
      if (lastComparison != 0) {
11386
        return lastComparison;
11387
      }
11388
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11389
      if (lastComparison != 0) {
11390
        return lastComparison;
11391
      }
11392
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11393
      if (lastComparison != 0) {
11394
        return lastComparison;
11395
      }
11396
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11397
      if (lastComparison != 0) {
11398
        return lastComparison;
11399
      }
11400
      return 0;
11401
    }
11402
 
11403
    public void read(TProtocol iprot) throws TException {
11404
      TField field;
11405
      iprot.readStructBegin();
11406
      while (true)
11407
      {
11408
        field = iprot.readFieldBegin();
11409
        if (field.type == TType.STOP) { 
11410
          break;
11411
        }
11412
        _Fields fieldId = _Fields.findByThriftId(field.id);
11413
        if (fieldId == null) {
11414
          TProtocolUtil.skip(iprot, field.type);
11415
        } else {
11416
          switch (fieldId) {
11417
            case SUCCESS:
11418
              if (field.type == TType.BOOL) {
11419
                this.success = iprot.readBool();
11420
                setSuccessIsSet(true);
11421
              } else { 
11422
                TProtocolUtil.skip(iprot, field.type);
11423
              }
11424
              break;
11425
            case UCX:
11426
              if (field.type == TType.STRUCT) {
11427
                this.ucx = new UserContextException();
11428
                this.ucx.read(iprot);
11429
              } else { 
11430
                TProtocolUtil.skip(iprot, field.type);
11431
              }
11432
              break;
11433
          }
11434
          iprot.readFieldEnd();
11435
        }
11436
      }
11437
      iprot.readStructEnd();
11438
      validate();
11439
    }
11440
 
11441
    public void write(TProtocol oprot) throws TException {
11442
      oprot.writeStructBegin(STRUCT_DESC);
11443
 
11444
      if (this.isSetSuccess()) {
11445
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11446
        oprot.writeBool(this.success);
11447
        oprot.writeFieldEnd();
11448
      } else if (this.isSetUcx()) {
11449
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11450
        this.ucx.write(oprot);
11451
        oprot.writeFieldEnd();
11452
      }
11453
      oprot.writeFieldStop();
11454
      oprot.writeStructEnd();
11455
    }
11456
 
11457
    @Override
11458
    public String toString() {
553 chandransh 11459
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11460
      boolean first = true;
11461
 
11462
      sb.append("success:");
11463
      sb.append(this.success);
11464
      first = false;
11465
      if (!first) sb.append(", ");
11466
      sb.append("ucx:");
11467
      if (this.ucx == null) {
11468
        sb.append("null");
11469
      } else {
11470
        sb.append(this.ucx);
11471
      }
11472
      first = false;
11473
      sb.append(")");
11474
      return sb.toString();
11475
    }
11476
 
11477
    public void validate() throws TException {
11478
      // check for required fields
11479
    }
11480
 
11481
  }
11482
 
553 chandransh 11483
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11484
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11485
 
11486
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11487
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11488
 
11489
    private long userid;
11490
    private long addressId;
11491
 
11492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11493
    public enum _Fields implements TFieldIdEnum {
11494
      USERID((short)1, "userid"),
11495
      ADDRESS_ID((short)2, "addressId");
11496
 
11497
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11498
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11499
 
11500
      static {
11501
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11502
          byId.put((int)field._thriftId, field);
11503
          byName.put(field.getFieldName(), field);
11504
        }
11505
      }
11506
 
11507
      /**
11508
       * Find the _Fields constant that matches fieldId, or null if its not found.
11509
       */
11510
      public static _Fields findByThriftId(int fieldId) {
11511
        return byId.get(fieldId);
11512
      }
11513
 
11514
      /**
11515
       * Find the _Fields constant that matches fieldId, throwing an exception
11516
       * if it is not found.
11517
       */
11518
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11519
        _Fields fields = findByThriftId(fieldId);
11520
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11521
        return fields;
11522
      }
11523
 
11524
      /**
11525
       * Find the _Fields constant that matches name, or null if its not found.
11526
       */
11527
      public static _Fields findByName(String name) {
11528
        return byName.get(name);
11529
      }
11530
 
11531
      private final short _thriftId;
11532
      private final String _fieldName;
11533
 
11534
      _Fields(short thriftId, String fieldName) {
11535
        _thriftId = thriftId;
11536
        _fieldName = fieldName;
11537
      }
11538
 
11539
      public short getThriftFieldId() {
11540
        return _thriftId;
11541
      }
11542
 
11543
      public String getFieldName() {
11544
        return _fieldName;
11545
      }
11546
    }
11547
 
11548
    // isset id assignments
11549
    private static final int __USERID_ISSET_ID = 0;
11550
    private static final int __ADDRESSID_ISSET_ID = 1;
11551
    private BitSet __isset_bit_vector = new BitSet(2);
11552
 
11553
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11554
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11555
          new FieldValueMetaData(TType.I64)));
11556
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11557
          new FieldValueMetaData(TType.I64)));
11558
    }});
11559
 
11560
    static {
553 chandransh 11561
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11562
    }
11563
 
553 chandransh 11564
    public setDefaultAddress_args() {
48 ashish 11565
    }
11566
 
553 chandransh 11567
    public setDefaultAddress_args(
48 ashish 11568
      long userid,
11569
      long addressId)
11570
    {
11571
      this();
11572
      this.userid = userid;
11573
      setUseridIsSet(true);
11574
      this.addressId = addressId;
11575
      setAddressIdIsSet(true);
11576
    }
11577
 
11578
    /**
11579
     * Performs a deep copy on <i>other</i>.
11580
     */
553 chandransh 11581
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11582
      __isset_bit_vector.clear();
11583
      __isset_bit_vector.or(other.__isset_bit_vector);
11584
      this.userid = other.userid;
11585
      this.addressId = other.addressId;
11586
    }
11587
 
553 chandransh 11588
    public setDefaultAddress_args deepCopy() {
11589
      return new setDefaultAddress_args(this);
48 ashish 11590
    }
11591
 
11592
    @Deprecated
553 chandransh 11593
    public setDefaultAddress_args clone() {
11594
      return new setDefaultAddress_args(this);
48 ashish 11595
    }
11596
 
11597
    public long getUserid() {
11598
      return this.userid;
11599
    }
11600
 
553 chandransh 11601
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11602
      this.userid = userid;
11603
      setUseridIsSet(true);
11604
      return this;
11605
    }
11606
 
11607
    public void unsetUserid() {
11608
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11609
    }
11610
 
11611
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11612
    public boolean isSetUserid() {
11613
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11614
    }
11615
 
11616
    public void setUseridIsSet(boolean value) {
11617
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11618
    }
11619
 
11620
    public long getAddressId() {
11621
      return this.addressId;
11622
    }
11623
 
553 chandransh 11624
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11625
      this.addressId = addressId;
11626
      setAddressIdIsSet(true);
11627
      return this;
11628
    }
11629
 
11630
    public void unsetAddressId() {
11631
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11632
    }
11633
 
11634
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11635
    public boolean isSetAddressId() {
11636
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11637
    }
11638
 
11639
    public void setAddressIdIsSet(boolean value) {
11640
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11641
    }
11642
 
11643
    public void setFieldValue(_Fields field, Object value) {
11644
      switch (field) {
11645
      case USERID:
11646
        if (value == null) {
11647
          unsetUserid();
11648
        } else {
11649
          setUserid((Long)value);
11650
        }
11651
        break;
11652
 
11653
      case ADDRESS_ID:
11654
        if (value == null) {
11655
          unsetAddressId();
11656
        } else {
11657
          setAddressId((Long)value);
11658
        }
11659
        break;
11660
 
11661
      }
11662
    }
11663
 
11664
    public void setFieldValue(int fieldID, Object value) {
11665
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11666
    }
11667
 
11668
    public Object getFieldValue(_Fields field) {
11669
      switch (field) {
11670
      case USERID:
11671
        return new Long(getUserid());
11672
 
11673
      case ADDRESS_ID:
11674
        return new Long(getAddressId());
11675
 
11676
      }
11677
      throw new IllegalStateException();
11678
    }
11679
 
11680
    public Object getFieldValue(int fieldId) {
11681
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11682
    }
11683
 
11684
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11685
    public boolean isSet(_Fields field) {
11686
      switch (field) {
11687
      case USERID:
11688
        return isSetUserid();
11689
      case ADDRESS_ID:
11690
        return isSetAddressId();
11691
      }
11692
      throw new IllegalStateException();
11693
    }
11694
 
11695
    public boolean isSet(int fieldID) {
11696
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11697
    }
11698
 
11699
    @Override
11700
    public boolean equals(Object that) {
11701
      if (that == null)
11702
        return false;
553 chandransh 11703
      if (that instanceof setDefaultAddress_args)
11704
        return this.equals((setDefaultAddress_args)that);
48 ashish 11705
      return false;
11706
    }
11707
 
553 chandransh 11708
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11709
      if (that == null)
11710
        return false;
11711
 
11712
      boolean this_present_userid = true;
11713
      boolean that_present_userid = true;
11714
      if (this_present_userid || that_present_userid) {
11715
        if (!(this_present_userid && that_present_userid))
11716
          return false;
11717
        if (this.userid != that.userid)
11718
          return false;
11719
      }
11720
 
11721
      boolean this_present_addressId = true;
11722
      boolean that_present_addressId = true;
11723
      if (this_present_addressId || that_present_addressId) {
11724
        if (!(this_present_addressId && that_present_addressId))
11725
          return false;
11726
        if (this.addressId != that.addressId)
11727
          return false;
11728
      }
11729
 
11730
      return true;
11731
    }
11732
 
11733
    @Override
11734
    public int hashCode() {
11735
      return 0;
11736
    }
11737
 
553 chandransh 11738
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11739
      if (!getClass().equals(other.getClass())) {
11740
        return getClass().getName().compareTo(other.getClass().getName());
11741
      }
11742
 
11743
      int lastComparison = 0;
553 chandransh 11744
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11745
 
11746
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11747
      if (lastComparison != 0) {
11748
        return lastComparison;
11749
      }
11750
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11751
      if (lastComparison != 0) {
11752
        return lastComparison;
11753
      }
11754
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11755
      if (lastComparison != 0) {
11756
        return lastComparison;
11757
      }
11758
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11759
      if (lastComparison != 0) {
11760
        return lastComparison;
11761
      }
11762
      return 0;
11763
    }
11764
 
11765
    public void read(TProtocol iprot) throws TException {
11766
      TField field;
11767
      iprot.readStructBegin();
11768
      while (true)
11769
      {
11770
        field = iprot.readFieldBegin();
11771
        if (field.type == TType.STOP) { 
11772
          break;
11773
        }
11774
        _Fields fieldId = _Fields.findByThriftId(field.id);
11775
        if (fieldId == null) {
11776
          TProtocolUtil.skip(iprot, field.type);
11777
        } else {
11778
          switch (fieldId) {
11779
            case USERID:
11780
              if (field.type == TType.I64) {
11781
                this.userid = iprot.readI64();
11782
                setUseridIsSet(true);
11783
              } else { 
11784
                TProtocolUtil.skip(iprot, field.type);
11785
              }
11786
              break;
11787
            case ADDRESS_ID:
11788
              if (field.type == TType.I64) {
11789
                this.addressId = iprot.readI64();
11790
                setAddressIdIsSet(true);
11791
              } else { 
11792
                TProtocolUtil.skip(iprot, field.type);
11793
              }
11794
              break;
11795
          }
11796
          iprot.readFieldEnd();
11797
        }
11798
      }
11799
      iprot.readStructEnd();
11800
      validate();
11801
    }
11802
 
11803
    public void write(TProtocol oprot) throws TException {
11804
      validate();
11805
 
11806
      oprot.writeStructBegin(STRUCT_DESC);
11807
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11808
      oprot.writeI64(this.userid);
11809
      oprot.writeFieldEnd();
11810
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11811
      oprot.writeI64(this.addressId);
11812
      oprot.writeFieldEnd();
11813
      oprot.writeFieldStop();
11814
      oprot.writeStructEnd();
11815
    }
11816
 
11817
    @Override
11818
    public String toString() {
553 chandransh 11819
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11820
      boolean first = true;
11821
 
11822
      sb.append("userid:");
11823
      sb.append(this.userid);
11824
      first = false;
11825
      if (!first) sb.append(", ");
11826
      sb.append("addressId:");
11827
      sb.append(this.addressId);
11828
      first = false;
11829
      sb.append(")");
11830
      return sb.toString();
11831
    }
11832
 
11833
    public void validate() throws TException {
11834
      // check for required fields
11835
    }
11836
 
11837
  }
11838
 
553 chandransh 11839
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11840
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11841
 
11842
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11843
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11844
 
11845
    private boolean success;
11846
    private UserContextException ucx;
11847
 
11848
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11849
    public enum _Fields implements TFieldIdEnum {
11850
      SUCCESS((short)0, "success"),
11851
      UCX((short)1, "ucx");
11852
 
11853
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11854
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11855
 
11856
      static {
11857
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11858
          byId.put((int)field._thriftId, field);
11859
          byName.put(field.getFieldName(), field);
11860
        }
11861
      }
11862
 
11863
      /**
11864
       * Find the _Fields constant that matches fieldId, or null if its not found.
11865
       */
11866
      public static _Fields findByThriftId(int fieldId) {
11867
        return byId.get(fieldId);
11868
      }
11869
 
11870
      /**
11871
       * Find the _Fields constant that matches fieldId, throwing an exception
11872
       * if it is not found.
11873
       */
11874
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11875
        _Fields fields = findByThriftId(fieldId);
11876
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11877
        return fields;
11878
      }
11879
 
11880
      /**
11881
       * Find the _Fields constant that matches name, or null if its not found.
11882
       */
11883
      public static _Fields findByName(String name) {
11884
        return byName.get(name);
11885
      }
11886
 
11887
      private final short _thriftId;
11888
      private final String _fieldName;
11889
 
11890
      _Fields(short thriftId, String fieldName) {
11891
        _thriftId = thriftId;
11892
        _fieldName = fieldName;
11893
      }
11894
 
11895
      public short getThriftFieldId() {
11896
        return _thriftId;
11897
      }
11898
 
11899
      public String getFieldName() {
11900
        return _fieldName;
11901
      }
11902
    }
11903
 
11904
    // isset id assignments
11905
    private static final int __SUCCESS_ISSET_ID = 0;
11906
    private BitSet __isset_bit_vector = new BitSet(1);
11907
 
11908
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11909
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11910
          new FieldValueMetaData(TType.BOOL)));
11911
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11912
          new FieldValueMetaData(TType.STRUCT)));
11913
    }});
11914
 
11915
    static {
553 chandransh 11916
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11917
    }
11918
 
553 chandransh 11919
    public setDefaultAddress_result() {
48 ashish 11920
    }
11921
 
553 chandransh 11922
    public setDefaultAddress_result(
48 ashish 11923
      boolean success,
11924
      UserContextException ucx)
11925
    {
11926
      this();
11927
      this.success = success;
11928
      setSuccessIsSet(true);
11929
      this.ucx = ucx;
11930
    }
11931
 
11932
    /**
11933
     * Performs a deep copy on <i>other</i>.
11934
     */
553 chandransh 11935
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 11936
      __isset_bit_vector.clear();
11937
      __isset_bit_vector.or(other.__isset_bit_vector);
11938
      this.success = other.success;
11939
      if (other.isSetUcx()) {
11940
        this.ucx = new UserContextException(other.ucx);
11941
      }
11942
    }
11943
 
553 chandransh 11944
    public setDefaultAddress_result deepCopy() {
11945
      return new setDefaultAddress_result(this);
48 ashish 11946
    }
11947
 
11948
    @Deprecated
553 chandransh 11949
    public setDefaultAddress_result clone() {
11950
      return new setDefaultAddress_result(this);
48 ashish 11951
    }
11952
 
11953
    public boolean isSuccess() {
11954
      return this.success;
11955
    }
11956
 
553 chandransh 11957
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 11958
      this.success = success;
11959
      setSuccessIsSet(true);
11960
      return this;
11961
    }
11962
 
11963
    public void unsetSuccess() {
11964
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11965
    }
11966
 
11967
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11968
    public boolean isSetSuccess() {
11969
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11970
    }
11971
 
11972
    public void setSuccessIsSet(boolean value) {
11973
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11974
    }
11975
 
11976
    public UserContextException getUcx() {
11977
      return this.ucx;
11978
    }
11979
 
553 chandransh 11980
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 11981
      this.ucx = ucx;
11982
      return this;
11983
    }
11984
 
11985
    public void unsetUcx() {
11986
      this.ucx = null;
11987
    }
11988
 
11989
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11990
    public boolean isSetUcx() {
11991
      return this.ucx != null;
11992
    }
11993
 
11994
    public void setUcxIsSet(boolean value) {
11995
      if (!value) {
11996
        this.ucx = null;
11997
      }
11998
    }
11999
 
12000
    public void setFieldValue(_Fields field, Object value) {
12001
      switch (field) {
12002
      case SUCCESS:
12003
        if (value == null) {
12004
          unsetSuccess();
12005
        } else {
12006
          setSuccess((Boolean)value);
12007
        }
12008
        break;
12009
 
12010
      case UCX:
12011
        if (value == null) {
12012
          unsetUcx();
12013
        } else {
12014
          setUcx((UserContextException)value);
12015
        }
12016
        break;
12017
 
12018
      }
12019
    }
12020
 
12021
    public void setFieldValue(int fieldID, Object value) {
12022
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12023
    }
12024
 
12025
    public Object getFieldValue(_Fields field) {
12026
      switch (field) {
12027
      case SUCCESS:
12028
        return new Boolean(isSuccess());
12029
 
12030
      case UCX:
12031
        return getUcx();
12032
 
12033
      }
12034
      throw new IllegalStateException();
12035
    }
12036
 
12037
    public Object getFieldValue(int fieldId) {
12038
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12039
    }
12040
 
12041
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12042
    public boolean isSet(_Fields field) {
12043
      switch (field) {
12044
      case SUCCESS:
12045
        return isSetSuccess();
12046
      case UCX:
12047
        return isSetUcx();
12048
      }
12049
      throw new IllegalStateException();
12050
    }
12051
 
12052
    public boolean isSet(int fieldID) {
12053
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12054
    }
12055
 
12056
    @Override
12057
    public boolean equals(Object that) {
12058
      if (that == null)
12059
        return false;
553 chandransh 12060
      if (that instanceof setDefaultAddress_result)
12061
        return this.equals((setDefaultAddress_result)that);
48 ashish 12062
      return false;
12063
    }
12064
 
553 chandransh 12065
    public boolean equals(setDefaultAddress_result that) {
48 ashish 12066
      if (that == null)
12067
        return false;
12068
 
12069
      boolean this_present_success = true;
12070
      boolean that_present_success = true;
12071
      if (this_present_success || that_present_success) {
12072
        if (!(this_present_success && that_present_success))
12073
          return false;
12074
        if (this.success != that.success)
12075
          return false;
12076
      }
12077
 
12078
      boolean this_present_ucx = true && this.isSetUcx();
12079
      boolean that_present_ucx = true && that.isSetUcx();
12080
      if (this_present_ucx || that_present_ucx) {
12081
        if (!(this_present_ucx && that_present_ucx))
12082
          return false;
12083
        if (!this.ucx.equals(that.ucx))
12084
          return false;
12085
      }
12086
 
12087
      return true;
12088
    }
12089
 
12090
    @Override
12091
    public int hashCode() {
12092
      return 0;
12093
    }
12094
 
553 chandransh 12095
    public int compareTo(setDefaultAddress_result other) {
48 ashish 12096
      if (!getClass().equals(other.getClass())) {
12097
        return getClass().getName().compareTo(other.getClass().getName());
12098
      }
12099
 
12100
      int lastComparison = 0;
553 chandransh 12101
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 12102
 
12103
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12104
      if (lastComparison != 0) {
12105
        return lastComparison;
12106
      }
12107
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12108
      if (lastComparison != 0) {
12109
        return lastComparison;
12110
      }
12111
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12112
      if (lastComparison != 0) {
12113
        return lastComparison;
12114
      }
12115
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12116
      if (lastComparison != 0) {
12117
        return lastComparison;
12118
      }
12119
      return 0;
12120
    }
12121
 
12122
    public void read(TProtocol iprot) throws TException {
12123
      TField field;
12124
      iprot.readStructBegin();
12125
      while (true)
12126
      {
12127
        field = iprot.readFieldBegin();
12128
        if (field.type == TType.STOP) { 
12129
          break;
12130
        }
12131
        _Fields fieldId = _Fields.findByThriftId(field.id);
12132
        if (fieldId == null) {
12133
          TProtocolUtil.skip(iprot, field.type);
12134
        } else {
12135
          switch (fieldId) {
12136
            case SUCCESS:
12137
              if (field.type == TType.BOOL) {
12138
                this.success = iprot.readBool();
12139
                setSuccessIsSet(true);
12140
              } else { 
12141
                TProtocolUtil.skip(iprot, field.type);
12142
              }
12143
              break;
12144
            case UCX:
12145
              if (field.type == TType.STRUCT) {
12146
                this.ucx = new UserContextException();
12147
                this.ucx.read(iprot);
12148
              } else { 
12149
                TProtocolUtil.skip(iprot, field.type);
12150
              }
12151
              break;
12152
          }
12153
          iprot.readFieldEnd();
12154
        }
12155
      }
12156
      iprot.readStructEnd();
12157
      validate();
12158
    }
12159
 
12160
    public void write(TProtocol oprot) throws TException {
12161
      oprot.writeStructBegin(STRUCT_DESC);
12162
 
12163
      if (this.isSetSuccess()) {
12164
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12165
        oprot.writeBool(this.success);
12166
        oprot.writeFieldEnd();
12167
      } else if (this.isSetUcx()) {
12168
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12169
        this.ucx.write(oprot);
12170
        oprot.writeFieldEnd();
12171
      }
12172
      oprot.writeFieldStop();
12173
      oprot.writeStructEnd();
12174
    }
12175
 
12176
    @Override
12177
    public String toString() {
553 chandransh 12178
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 12179
      boolean first = true;
12180
 
12181
      sb.append("success:");
12182
      sb.append(this.success);
12183
      first = false;
12184
      if (!first) sb.append(", ");
12185
      sb.append("ucx:");
12186
      if (this.ucx == null) {
12187
        sb.append("null");
12188
      } else {
12189
        sb.append(this.ucx);
12190
      }
12191
      first = false;
12192
      sb.append(")");
12193
      return sb.toString();
12194
    }
12195
 
12196
    public void validate() throws TException {
12197
      // check for required fields
12198
    }
12199
 
12200
  }
12201
 
553 chandransh 12202
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12203
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 12204
 
553 chandransh 12205
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 12206
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
12207
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 12208
 
553 chandransh 12209
    private long userid;
593 rajveer 12210
    private String oldPassword;
12211
    private String newPassword;
48 ashish 12212
 
12213
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12214
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12215
      USERID((short)1, "userid"),
593 rajveer 12216
      OLD_PASSWORD((short)2, "oldPassword"),
12217
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 12218
 
12219
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12220
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12221
 
12222
      static {
12223
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12224
          byId.put((int)field._thriftId, field);
12225
          byName.put(field.getFieldName(), field);
12226
        }
12227
      }
12228
 
12229
      /**
12230
       * Find the _Fields constant that matches fieldId, or null if its not found.
12231
       */
12232
      public static _Fields findByThriftId(int fieldId) {
12233
        return byId.get(fieldId);
12234
      }
12235
 
12236
      /**
12237
       * Find the _Fields constant that matches fieldId, throwing an exception
12238
       * if it is not found.
12239
       */
12240
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12241
        _Fields fields = findByThriftId(fieldId);
12242
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12243
        return fields;
12244
      }
12245
 
12246
      /**
12247
       * Find the _Fields constant that matches name, or null if its not found.
12248
       */
12249
      public static _Fields findByName(String name) {
12250
        return byName.get(name);
12251
      }
12252
 
12253
      private final short _thriftId;
12254
      private final String _fieldName;
12255
 
12256
      _Fields(short thriftId, String fieldName) {
12257
        _thriftId = thriftId;
12258
        _fieldName = fieldName;
12259
      }
12260
 
12261
      public short getThriftFieldId() {
12262
        return _thriftId;
12263
      }
12264
 
12265
      public String getFieldName() {
12266
        return _fieldName;
12267
      }
12268
    }
12269
 
12270
    // isset id assignments
12271
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12272
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12273
 
12274
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12275
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 12276
          new FieldValueMetaData(TType.I64)));
593 rajveer 12277
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 12278
          new FieldValueMetaData(TType.STRING)));
593 rajveer 12279
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
12280
          new FieldValueMetaData(TType.STRING)));
48 ashish 12281
    }});
12282
 
12283
    static {
553 chandransh 12284
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 12285
    }
12286
 
553 chandransh 12287
    public updatePassword_args() {
48 ashish 12288
    }
12289
 
553 chandransh 12290
    public updatePassword_args(
12291
      long userid,
593 rajveer 12292
      String oldPassword,
12293
      String newPassword)
48 ashish 12294
    {
12295
      this();
553 chandransh 12296
      this.userid = userid;
12297
      setUseridIsSet(true);
593 rajveer 12298
      this.oldPassword = oldPassword;
12299
      this.newPassword = newPassword;
48 ashish 12300
    }
12301
 
12302
    /**
12303
     * Performs a deep copy on <i>other</i>.
12304
     */
553 chandransh 12305
    public updatePassword_args(updatePassword_args other) {
48 ashish 12306
      __isset_bit_vector.clear();
12307
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12308
      this.userid = other.userid;
593 rajveer 12309
      if (other.isSetOldPassword()) {
12310
        this.oldPassword = other.oldPassword;
553 chandransh 12311
      }
593 rajveer 12312
      if (other.isSetNewPassword()) {
12313
        this.newPassword = other.newPassword;
12314
      }
48 ashish 12315
    }
12316
 
553 chandransh 12317
    public updatePassword_args deepCopy() {
12318
      return new updatePassword_args(this);
48 ashish 12319
    }
12320
 
12321
    @Deprecated
553 chandransh 12322
    public updatePassword_args clone() {
12323
      return new updatePassword_args(this);
48 ashish 12324
    }
12325
 
553 chandransh 12326
    public long getUserid() {
12327
      return this.userid;
48 ashish 12328
    }
12329
 
553 chandransh 12330
    public updatePassword_args setUserid(long userid) {
12331
      this.userid = userid;
12332
      setUseridIsSet(true);
48 ashish 12333
      return this;
12334
    }
12335
 
553 chandransh 12336
    public void unsetUserid() {
48 ashish 12337
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12338
    }
12339
 
553 chandransh 12340
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12341
    public boolean isSetUserid() {
48 ashish 12342
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12343
    }
12344
 
553 chandransh 12345
    public void setUseridIsSet(boolean value) {
48 ashish 12346
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12347
    }
12348
 
593 rajveer 12349
    public String getOldPassword() {
12350
      return this.oldPassword;
48 ashish 12351
    }
12352
 
593 rajveer 12353
    public updatePassword_args setOldPassword(String oldPassword) {
12354
      this.oldPassword = oldPassword;
48 ashish 12355
      return this;
12356
    }
12357
 
593 rajveer 12358
    public void unsetOldPassword() {
12359
      this.oldPassword = null;
48 ashish 12360
    }
12361
 
593 rajveer 12362
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
12363
    public boolean isSetOldPassword() {
12364
      return this.oldPassword != null;
48 ashish 12365
    }
12366
 
593 rajveer 12367
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 12368
      if (!value) {
593 rajveer 12369
        this.oldPassword = null;
553 chandransh 12370
      }
48 ashish 12371
    }
12372
 
593 rajveer 12373
    public String getNewPassword() {
12374
      return this.newPassword;
12375
    }
12376
 
12377
    public updatePassword_args setNewPassword(String newPassword) {
12378
      this.newPassword = newPassword;
12379
      return this;
12380
    }
12381
 
12382
    public void unsetNewPassword() {
12383
      this.newPassword = null;
12384
    }
12385
 
12386
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
12387
    public boolean isSetNewPassword() {
12388
      return this.newPassword != null;
12389
    }
12390
 
12391
    public void setNewPasswordIsSet(boolean value) {
12392
      if (!value) {
12393
        this.newPassword = null;
12394
      }
12395
    }
12396
 
48 ashish 12397
    public void setFieldValue(_Fields field, Object value) {
12398
      switch (field) {
553 chandransh 12399
      case USERID:
48 ashish 12400
        if (value == null) {
553 chandransh 12401
          unsetUserid();
48 ashish 12402
        } else {
553 chandransh 12403
          setUserid((Long)value);
48 ashish 12404
        }
12405
        break;
12406
 
593 rajveer 12407
      case OLD_PASSWORD:
48 ashish 12408
        if (value == null) {
593 rajveer 12409
          unsetOldPassword();
48 ashish 12410
        } else {
593 rajveer 12411
          setOldPassword((String)value);
48 ashish 12412
        }
12413
        break;
12414
 
593 rajveer 12415
      case NEW_PASSWORD:
12416
        if (value == null) {
12417
          unsetNewPassword();
12418
        } else {
12419
          setNewPassword((String)value);
12420
        }
12421
        break;
12422
 
48 ashish 12423
      }
12424
    }
12425
 
12426
    public void setFieldValue(int fieldID, Object value) {
12427
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12428
    }
12429
 
12430
    public Object getFieldValue(_Fields field) {
12431
      switch (field) {
553 chandransh 12432
      case USERID:
12433
        return new Long(getUserid());
48 ashish 12434
 
593 rajveer 12435
      case OLD_PASSWORD:
12436
        return getOldPassword();
48 ashish 12437
 
593 rajveer 12438
      case NEW_PASSWORD:
12439
        return getNewPassword();
12440
 
48 ashish 12441
      }
12442
      throw new IllegalStateException();
12443
    }
12444
 
12445
    public Object getFieldValue(int fieldId) {
12446
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12447
    }
12448
 
12449
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12450
    public boolean isSet(_Fields field) {
12451
      switch (field) {
553 chandransh 12452
      case USERID:
12453
        return isSetUserid();
593 rajveer 12454
      case OLD_PASSWORD:
12455
        return isSetOldPassword();
12456
      case NEW_PASSWORD:
12457
        return isSetNewPassword();
48 ashish 12458
      }
12459
      throw new IllegalStateException();
12460
    }
12461
 
12462
    public boolean isSet(int fieldID) {
12463
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12464
    }
12465
 
12466
    @Override
12467
    public boolean equals(Object that) {
12468
      if (that == null)
12469
        return false;
553 chandransh 12470
      if (that instanceof updatePassword_args)
12471
        return this.equals((updatePassword_args)that);
48 ashish 12472
      return false;
12473
    }
12474
 
553 chandransh 12475
    public boolean equals(updatePassword_args that) {
48 ashish 12476
      if (that == null)
12477
        return false;
12478
 
553 chandransh 12479
      boolean this_present_userid = true;
12480
      boolean that_present_userid = true;
12481
      if (this_present_userid || that_present_userid) {
12482
        if (!(this_present_userid && that_present_userid))
48 ashish 12483
          return false;
553 chandransh 12484
        if (this.userid != that.userid)
48 ashish 12485
          return false;
12486
      }
12487
 
593 rajveer 12488
      boolean this_present_oldPassword = true && this.isSetOldPassword();
12489
      boolean that_present_oldPassword = true && that.isSetOldPassword();
12490
      if (this_present_oldPassword || that_present_oldPassword) {
12491
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 12492
          return false;
593 rajveer 12493
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 12494
          return false;
12495
      }
12496
 
593 rajveer 12497
      boolean this_present_newPassword = true && this.isSetNewPassword();
12498
      boolean that_present_newPassword = true && that.isSetNewPassword();
12499
      if (this_present_newPassword || that_present_newPassword) {
12500
        if (!(this_present_newPassword && that_present_newPassword))
12501
          return false;
12502
        if (!this.newPassword.equals(that.newPassword))
12503
          return false;
12504
      }
12505
 
48 ashish 12506
      return true;
12507
    }
12508
 
12509
    @Override
12510
    public int hashCode() {
12511
      return 0;
12512
    }
12513
 
553 chandransh 12514
    public int compareTo(updatePassword_args other) {
48 ashish 12515
      if (!getClass().equals(other.getClass())) {
12516
        return getClass().getName().compareTo(other.getClass().getName());
12517
      }
12518
 
12519
      int lastComparison = 0;
553 chandransh 12520
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12521
 
553 chandransh 12522
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12523
      if (lastComparison != 0) {
12524
        return lastComparison;
12525
      }
553 chandransh 12526
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12527
      if (lastComparison != 0) {
12528
        return lastComparison;
12529
      }
593 rajveer 12530
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 12531
      if (lastComparison != 0) {
12532
        return lastComparison;
12533
      }
593 rajveer 12534
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 12535
      if (lastComparison != 0) {
12536
        return lastComparison;
12537
      }
593 rajveer 12538
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
12539
      if (lastComparison != 0) {
12540
        return lastComparison;
12541
      }
12542
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
12543
      if (lastComparison != 0) {
12544
        return lastComparison;
12545
      }
48 ashish 12546
      return 0;
12547
    }
12548
 
12549
    public void read(TProtocol iprot) throws TException {
12550
      TField field;
12551
      iprot.readStructBegin();
12552
      while (true)
12553
      {
12554
        field = iprot.readFieldBegin();
12555
        if (field.type == TType.STOP) { 
12556
          break;
12557
        }
12558
        _Fields fieldId = _Fields.findByThriftId(field.id);
12559
        if (fieldId == null) {
12560
          TProtocolUtil.skip(iprot, field.type);
12561
        } else {
12562
          switch (fieldId) {
553 chandransh 12563
            case USERID:
48 ashish 12564
              if (field.type == TType.I64) {
553 chandransh 12565
                this.userid = iprot.readI64();
12566
                setUseridIsSet(true);
48 ashish 12567
              } else { 
12568
                TProtocolUtil.skip(iprot, field.type);
12569
              }
12570
              break;
593 rajveer 12571
            case OLD_PASSWORD:
553 chandransh 12572
              if (field.type == TType.STRING) {
593 rajveer 12573
                this.oldPassword = iprot.readString();
48 ashish 12574
              } else { 
12575
                TProtocolUtil.skip(iprot, field.type);
12576
              }
12577
              break;
593 rajveer 12578
            case NEW_PASSWORD:
12579
              if (field.type == TType.STRING) {
12580
                this.newPassword = iprot.readString();
12581
              } else { 
12582
                TProtocolUtil.skip(iprot, field.type);
12583
              }
12584
              break;
48 ashish 12585
          }
12586
          iprot.readFieldEnd();
12587
        }
12588
      }
12589
      iprot.readStructEnd();
12590
      validate();
12591
    }
12592
 
12593
    public void write(TProtocol oprot) throws TException {
12594
      validate();
12595
 
12596
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12597
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12598
      oprot.writeI64(this.userid);
48 ashish 12599
      oprot.writeFieldEnd();
593 rajveer 12600
      if (this.oldPassword != null) {
12601
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
12602
        oprot.writeString(this.oldPassword);
553 chandransh 12603
        oprot.writeFieldEnd();
12604
      }
593 rajveer 12605
      if (this.newPassword != null) {
12606
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
12607
        oprot.writeString(this.newPassword);
12608
        oprot.writeFieldEnd();
12609
      }
48 ashish 12610
      oprot.writeFieldStop();
12611
      oprot.writeStructEnd();
12612
    }
12613
 
12614
    @Override
12615
    public String toString() {
553 chandransh 12616
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12617
      boolean first = true;
12618
 
553 chandransh 12619
      sb.append("userid:");
12620
      sb.append(this.userid);
48 ashish 12621
      first = false;
12622
      if (!first) sb.append(", ");
593 rajveer 12623
      sb.append("oldPassword:");
12624
      if (this.oldPassword == null) {
553 chandransh 12625
        sb.append("null");
12626
      } else {
593 rajveer 12627
        sb.append(this.oldPassword);
553 chandransh 12628
      }
48 ashish 12629
      first = false;
593 rajveer 12630
      if (!first) sb.append(", ");
12631
      sb.append("newPassword:");
12632
      if (this.newPassword == null) {
12633
        sb.append("null");
12634
      } else {
12635
        sb.append(this.newPassword);
12636
      }
12637
      first = false;
48 ashish 12638
      sb.append(")");
12639
      return sb.toString();
12640
    }
12641
 
12642
    public void validate() throws TException {
12643
      // check for required fields
12644
    }
12645
 
12646
  }
12647
 
553 chandransh 12648
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12649
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12650
 
12651
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12652
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12653
 
12654
    private boolean success;
12655
    private UserContextException ucx;
12656
 
12657
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12658
    public enum _Fields implements TFieldIdEnum {
12659
      SUCCESS((short)0, "success"),
12660
      UCX((short)1, "ucx");
12661
 
12662
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12663
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12664
 
12665
      static {
12666
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12667
          byId.put((int)field._thriftId, field);
12668
          byName.put(field.getFieldName(), field);
12669
        }
12670
      }
12671
 
12672
      /**
12673
       * Find the _Fields constant that matches fieldId, or null if its not found.
12674
       */
12675
      public static _Fields findByThriftId(int fieldId) {
12676
        return byId.get(fieldId);
12677
      }
12678
 
12679
      /**
12680
       * Find the _Fields constant that matches fieldId, throwing an exception
12681
       * if it is not found.
12682
       */
12683
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12684
        _Fields fields = findByThriftId(fieldId);
12685
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12686
        return fields;
12687
      }
12688
 
12689
      /**
12690
       * Find the _Fields constant that matches name, or null if its not found.
12691
       */
12692
      public static _Fields findByName(String name) {
12693
        return byName.get(name);
12694
      }
12695
 
12696
      private final short _thriftId;
12697
      private final String _fieldName;
12698
 
12699
      _Fields(short thriftId, String fieldName) {
12700
        _thriftId = thriftId;
12701
        _fieldName = fieldName;
12702
      }
12703
 
12704
      public short getThriftFieldId() {
12705
        return _thriftId;
12706
      }
12707
 
12708
      public String getFieldName() {
12709
        return _fieldName;
12710
      }
12711
    }
12712
 
12713
    // isset id assignments
12714
    private static final int __SUCCESS_ISSET_ID = 0;
12715
    private BitSet __isset_bit_vector = new BitSet(1);
12716
 
12717
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12718
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12719
          new FieldValueMetaData(TType.BOOL)));
12720
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12721
          new FieldValueMetaData(TType.STRUCT)));
12722
    }});
12723
 
12724
    static {
553 chandransh 12725
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12726
    }
12727
 
553 chandransh 12728
    public updatePassword_result() {
48 ashish 12729
    }
12730
 
553 chandransh 12731
    public updatePassword_result(
48 ashish 12732
      boolean success,
12733
      UserContextException ucx)
12734
    {
12735
      this();
12736
      this.success = success;
12737
      setSuccessIsSet(true);
12738
      this.ucx = ucx;
12739
    }
12740
 
12741
    /**
12742
     * Performs a deep copy on <i>other</i>.
12743
     */
553 chandransh 12744
    public updatePassword_result(updatePassword_result other) {
48 ashish 12745
      __isset_bit_vector.clear();
12746
      __isset_bit_vector.or(other.__isset_bit_vector);
12747
      this.success = other.success;
12748
      if (other.isSetUcx()) {
12749
        this.ucx = new UserContextException(other.ucx);
12750
      }
12751
    }
12752
 
553 chandransh 12753
    public updatePassword_result deepCopy() {
12754
      return new updatePassword_result(this);
48 ashish 12755
    }
12756
 
12757
    @Deprecated
553 chandransh 12758
    public updatePassword_result clone() {
12759
      return new updatePassword_result(this);
48 ashish 12760
    }
12761
 
12762
    public boolean isSuccess() {
12763
      return this.success;
12764
    }
12765
 
553 chandransh 12766
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12767
      this.success = success;
12768
      setSuccessIsSet(true);
12769
      return this;
12770
    }
12771
 
12772
    public void unsetSuccess() {
12773
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12774
    }
12775
 
12776
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12777
    public boolean isSetSuccess() {
12778
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12779
    }
12780
 
12781
    public void setSuccessIsSet(boolean value) {
12782
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12783
    }
12784
 
12785
    public UserContextException getUcx() {
12786
      return this.ucx;
12787
    }
12788
 
553 chandransh 12789
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12790
      this.ucx = ucx;
12791
      return this;
12792
    }
12793
 
12794
    public void unsetUcx() {
12795
      this.ucx = null;
12796
    }
12797
 
12798
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12799
    public boolean isSetUcx() {
12800
      return this.ucx != null;
12801
    }
12802
 
12803
    public void setUcxIsSet(boolean value) {
12804
      if (!value) {
12805
        this.ucx = null;
12806
      }
12807
    }
12808
 
12809
    public void setFieldValue(_Fields field, Object value) {
12810
      switch (field) {
12811
      case SUCCESS:
12812
        if (value == null) {
12813
          unsetSuccess();
12814
        } else {
12815
          setSuccess((Boolean)value);
12816
        }
12817
        break;
12818
 
12819
      case UCX:
12820
        if (value == null) {
12821
          unsetUcx();
12822
        } else {
12823
          setUcx((UserContextException)value);
12824
        }
12825
        break;
12826
 
12827
      }
12828
    }
12829
 
12830
    public void setFieldValue(int fieldID, Object value) {
12831
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12832
    }
12833
 
12834
    public Object getFieldValue(_Fields field) {
12835
      switch (field) {
12836
      case SUCCESS:
12837
        return new Boolean(isSuccess());
12838
 
12839
      case UCX:
12840
        return getUcx();
12841
 
12842
      }
12843
      throw new IllegalStateException();
12844
    }
12845
 
12846
    public Object getFieldValue(int fieldId) {
12847
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12848
    }
12849
 
12850
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12851
    public boolean isSet(_Fields field) {
12852
      switch (field) {
12853
      case SUCCESS:
12854
        return isSetSuccess();
12855
      case UCX:
12856
        return isSetUcx();
12857
      }
12858
      throw new IllegalStateException();
12859
    }
12860
 
12861
    public boolean isSet(int fieldID) {
12862
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12863
    }
12864
 
12865
    @Override
12866
    public boolean equals(Object that) {
12867
      if (that == null)
12868
        return false;
553 chandransh 12869
      if (that instanceof updatePassword_result)
12870
        return this.equals((updatePassword_result)that);
48 ashish 12871
      return false;
12872
    }
12873
 
553 chandransh 12874
    public boolean equals(updatePassword_result that) {
48 ashish 12875
      if (that == null)
12876
        return false;
12877
 
12878
      boolean this_present_success = true;
12879
      boolean that_present_success = true;
12880
      if (this_present_success || that_present_success) {
12881
        if (!(this_present_success && that_present_success))
12882
          return false;
12883
        if (this.success != that.success)
12884
          return false;
12885
      }
12886
 
12887
      boolean this_present_ucx = true && this.isSetUcx();
12888
      boolean that_present_ucx = true && that.isSetUcx();
12889
      if (this_present_ucx || that_present_ucx) {
12890
        if (!(this_present_ucx && that_present_ucx))
12891
          return false;
12892
        if (!this.ucx.equals(that.ucx))
12893
          return false;
12894
      }
12895
 
12896
      return true;
12897
    }
12898
 
12899
    @Override
12900
    public int hashCode() {
12901
      return 0;
12902
    }
12903
 
553 chandransh 12904
    public int compareTo(updatePassword_result other) {
48 ashish 12905
      if (!getClass().equals(other.getClass())) {
12906
        return getClass().getName().compareTo(other.getClass().getName());
12907
      }
12908
 
12909
      int lastComparison = 0;
553 chandransh 12910
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12911
 
12912
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12913
      if (lastComparison != 0) {
12914
        return lastComparison;
12915
      }
12916
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12917
      if (lastComparison != 0) {
12918
        return lastComparison;
12919
      }
12920
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12921
      if (lastComparison != 0) {
12922
        return lastComparison;
12923
      }
12924
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12925
      if (lastComparison != 0) {
12926
        return lastComparison;
12927
      }
12928
      return 0;
12929
    }
12930
 
12931
    public void read(TProtocol iprot) throws TException {
12932
      TField field;
12933
      iprot.readStructBegin();
12934
      while (true)
12935
      {
12936
        field = iprot.readFieldBegin();
12937
        if (field.type == TType.STOP) { 
12938
          break;
12939
        }
12940
        _Fields fieldId = _Fields.findByThriftId(field.id);
12941
        if (fieldId == null) {
12942
          TProtocolUtil.skip(iprot, field.type);
12943
        } else {
12944
          switch (fieldId) {
12945
            case SUCCESS:
12946
              if (field.type == TType.BOOL) {
12947
                this.success = iprot.readBool();
12948
                setSuccessIsSet(true);
12949
              } else { 
12950
                TProtocolUtil.skip(iprot, field.type);
12951
              }
12952
              break;
12953
            case UCX:
12954
              if (field.type == TType.STRUCT) {
12955
                this.ucx = new UserContextException();
12956
                this.ucx.read(iprot);
12957
              } else { 
12958
                TProtocolUtil.skip(iprot, field.type);
12959
              }
12960
              break;
12961
          }
12962
          iprot.readFieldEnd();
12963
        }
12964
      }
12965
      iprot.readStructEnd();
12966
      validate();
12967
    }
12968
 
12969
    public void write(TProtocol oprot) throws TException {
12970
      oprot.writeStructBegin(STRUCT_DESC);
12971
 
12972
      if (this.isSetSuccess()) {
12973
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12974
        oprot.writeBool(this.success);
12975
        oprot.writeFieldEnd();
12976
      } else if (this.isSetUcx()) {
12977
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12978
        this.ucx.write(oprot);
12979
        oprot.writeFieldEnd();
12980
      }
12981
      oprot.writeFieldStop();
12982
      oprot.writeStructEnd();
12983
    }
12984
 
12985
    @Override
12986
    public String toString() {
553 chandransh 12987
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 12988
      boolean first = true;
12989
 
12990
      sb.append("success:");
12991
      sb.append(this.success);
12992
      first = false;
12993
      if (!first) sb.append(", ");
12994
      sb.append("ucx:");
12995
      if (this.ucx == null) {
12996
        sb.append("null");
12997
      } else {
12998
        sb.append(this.ucx);
12999
      }
13000
      first = false;
13001
      sb.append(")");
13002
      return sb.toString();
13003
    }
13004
 
13005
    public void validate() throws TException {
13006
      // check for required fields
13007
    }
13008
 
13009
  }
13010
 
582 rajveer 13011
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
13012
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
13013
 
13014
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
13015
 
13016
    private String email;
13017
 
13018
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13019
    public enum _Fields implements TFieldIdEnum {
13020
      EMAIL((short)1, "email");
13021
 
13022
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13023
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13024
 
13025
      static {
13026
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13027
          byId.put((int)field._thriftId, field);
13028
          byName.put(field.getFieldName(), field);
13029
        }
13030
      }
13031
 
13032
      /**
13033
       * Find the _Fields constant that matches fieldId, or null if its not found.
13034
       */
13035
      public static _Fields findByThriftId(int fieldId) {
13036
        return byId.get(fieldId);
13037
      }
13038
 
13039
      /**
13040
       * Find the _Fields constant that matches fieldId, throwing an exception
13041
       * if it is not found.
13042
       */
13043
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13044
        _Fields fields = findByThriftId(fieldId);
13045
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13046
        return fields;
13047
      }
13048
 
13049
      /**
13050
       * Find the _Fields constant that matches name, or null if its not found.
13051
       */
13052
      public static _Fields findByName(String name) {
13053
        return byName.get(name);
13054
      }
13055
 
13056
      private final short _thriftId;
13057
      private final String _fieldName;
13058
 
13059
      _Fields(short thriftId, String fieldName) {
13060
        _thriftId = thriftId;
13061
        _fieldName = fieldName;
13062
      }
13063
 
13064
      public short getThriftFieldId() {
13065
        return _thriftId;
13066
      }
13067
 
13068
      public String getFieldName() {
13069
        return _fieldName;
13070
      }
13071
    }
13072
 
13073
    // isset id assignments
13074
 
13075
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13076
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
13077
          new FieldValueMetaData(TType.STRING)));
13078
    }});
13079
 
13080
    static {
13081
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
13082
    }
13083
 
13084
    public forgotPassword_args() {
13085
    }
13086
 
13087
    public forgotPassword_args(
13088
      String email)
13089
    {
13090
      this();
13091
      this.email = email;
13092
    }
13093
 
13094
    /**
13095
     * Performs a deep copy on <i>other</i>.
13096
     */
13097
    public forgotPassword_args(forgotPassword_args other) {
13098
      if (other.isSetEmail()) {
13099
        this.email = other.email;
13100
      }
13101
    }
13102
 
13103
    public forgotPassword_args deepCopy() {
13104
      return new forgotPassword_args(this);
13105
    }
13106
 
13107
    @Deprecated
13108
    public forgotPassword_args clone() {
13109
      return new forgotPassword_args(this);
13110
    }
13111
 
13112
    public String getEmail() {
13113
      return this.email;
13114
    }
13115
 
13116
    public forgotPassword_args setEmail(String email) {
13117
      this.email = email;
13118
      return this;
13119
    }
13120
 
13121
    public void unsetEmail() {
13122
      this.email = null;
13123
    }
13124
 
13125
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
13126
    public boolean isSetEmail() {
13127
      return this.email != null;
13128
    }
13129
 
13130
    public void setEmailIsSet(boolean value) {
13131
      if (!value) {
13132
        this.email = null;
13133
      }
13134
    }
13135
 
13136
    public void setFieldValue(_Fields field, Object value) {
13137
      switch (field) {
13138
      case EMAIL:
13139
        if (value == null) {
13140
          unsetEmail();
13141
        } else {
13142
          setEmail((String)value);
13143
        }
13144
        break;
13145
 
13146
      }
13147
    }
13148
 
13149
    public void setFieldValue(int fieldID, Object value) {
13150
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13151
    }
13152
 
13153
    public Object getFieldValue(_Fields field) {
13154
      switch (field) {
13155
      case EMAIL:
13156
        return getEmail();
13157
 
13158
      }
13159
      throw new IllegalStateException();
13160
    }
13161
 
13162
    public Object getFieldValue(int fieldId) {
13163
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13164
    }
13165
 
13166
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13167
    public boolean isSet(_Fields field) {
13168
      switch (field) {
13169
      case EMAIL:
13170
        return isSetEmail();
13171
      }
13172
      throw new IllegalStateException();
13173
    }
13174
 
13175
    public boolean isSet(int fieldID) {
13176
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13177
    }
13178
 
13179
    @Override
13180
    public boolean equals(Object that) {
13181
      if (that == null)
13182
        return false;
13183
      if (that instanceof forgotPassword_args)
13184
        return this.equals((forgotPassword_args)that);
13185
      return false;
13186
    }
13187
 
13188
    public boolean equals(forgotPassword_args that) {
13189
      if (that == null)
13190
        return false;
13191
 
13192
      boolean this_present_email = true && this.isSetEmail();
13193
      boolean that_present_email = true && that.isSetEmail();
13194
      if (this_present_email || that_present_email) {
13195
        if (!(this_present_email && that_present_email))
13196
          return false;
13197
        if (!this.email.equals(that.email))
13198
          return false;
13199
      }
13200
 
13201
      return true;
13202
    }
13203
 
13204
    @Override
13205
    public int hashCode() {
13206
      return 0;
13207
    }
13208
 
13209
    public int compareTo(forgotPassword_args other) {
13210
      if (!getClass().equals(other.getClass())) {
13211
        return getClass().getName().compareTo(other.getClass().getName());
13212
      }
13213
 
13214
      int lastComparison = 0;
13215
      forgotPassword_args typedOther = (forgotPassword_args)other;
13216
 
13217
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
13218
      if (lastComparison != 0) {
13219
        return lastComparison;
13220
      }
13221
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
13222
      if (lastComparison != 0) {
13223
        return lastComparison;
13224
      }
13225
      return 0;
13226
    }
13227
 
13228
    public void read(TProtocol iprot) throws TException {
13229
      TField field;
13230
      iprot.readStructBegin();
13231
      while (true)
13232
      {
13233
        field = iprot.readFieldBegin();
13234
        if (field.type == TType.STOP) { 
13235
          break;
13236
        }
13237
        _Fields fieldId = _Fields.findByThriftId(field.id);
13238
        if (fieldId == null) {
13239
          TProtocolUtil.skip(iprot, field.type);
13240
        } else {
13241
          switch (fieldId) {
13242
            case EMAIL:
13243
              if (field.type == TType.STRING) {
13244
                this.email = iprot.readString();
13245
              } else { 
13246
                TProtocolUtil.skip(iprot, field.type);
13247
              }
13248
              break;
13249
          }
13250
          iprot.readFieldEnd();
13251
        }
13252
      }
13253
      iprot.readStructEnd();
13254
      validate();
13255
    }
13256
 
13257
    public void write(TProtocol oprot) throws TException {
13258
      validate();
13259
 
13260
      oprot.writeStructBegin(STRUCT_DESC);
13261
      if (this.email != null) {
13262
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
13263
        oprot.writeString(this.email);
13264
        oprot.writeFieldEnd();
13265
      }
13266
      oprot.writeFieldStop();
13267
      oprot.writeStructEnd();
13268
    }
13269
 
13270
    @Override
13271
    public String toString() {
13272
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
13273
      boolean first = true;
13274
 
13275
      sb.append("email:");
13276
      if (this.email == null) {
13277
        sb.append("null");
13278
      } else {
13279
        sb.append(this.email);
13280
      }
13281
      first = false;
13282
      sb.append(")");
13283
      return sb.toString();
13284
    }
13285
 
13286
    public void validate() throws TException {
13287
      // check for required fields
13288
    }
13289
 
13290
  }
13291
 
13292
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
13293
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
13294
 
13295
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13296
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13297
 
13298
    private boolean success;
13299
    private UserContextException ucx;
13300
 
13301
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13302
    public enum _Fields implements TFieldIdEnum {
13303
      SUCCESS((short)0, "success"),
13304
      UCX((short)1, "ucx");
13305
 
13306
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13307
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13308
 
13309
      static {
13310
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13311
          byId.put((int)field._thriftId, field);
13312
          byName.put(field.getFieldName(), field);
13313
        }
13314
      }
13315
 
13316
      /**
13317
       * Find the _Fields constant that matches fieldId, or null if its not found.
13318
       */
13319
      public static _Fields findByThriftId(int fieldId) {
13320
        return byId.get(fieldId);
13321
      }
13322
 
13323
      /**
13324
       * Find the _Fields constant that matches fieldId, throwing an exception
13325
       * if it is not found.
13326
       */
13327
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13328
        _Fields fields = findByThriftId(fieldId);
13329
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13330
        return fields;
13331
      }
13332
 
13333
      /**
13334
       * Find the _Fields constant that matches name, or null if its not found.
13335
       */
13336
      public static _Fields findByName(String name) {
13337
        return byName.get(name);
13338
      }
13339
 
13340
      private final short _thriftId;
13341
      private final String _fieldName;
13342
 
13343
      _Fields(short thriftId, String fieldName) {
13344
        _thriftId = thriftId;
13345
        _fieldName = fieldName;
13346
      }
13347
 
13348
      public short getThriftFieldId() {
13349
        return _thriftId;
13350
      }
13351
 
13352
      public String getFieldName() {
13353
        return _fieldName;
13354
      }
13355
    }
13356
 
13357
    // isset id assignments
13358
    private static final int __SUCCESS_ISSET_ID = 0;
13359
    private BitSet __isset_bit_vector = new BitSet(1);
13360
 
13361
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13362
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13363
          new FieldValueMetaData(TType.BOOL)));
13364
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13365
          new FieldValueMetaData(TType.STRUCT)));
13366
    }});
13367
 
13368
    static {
13369
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
13370
    }
13371
 
13372
    public forgotPassword_result() {
13373
    }
13374
 
13375
    public forgotPassword_result(
13376
      boolean success,
13377
      UserContextException ucx)
13378
    {
13379
      this();
13380
      this.success = success;
13381
      setSuccessIsSet(true);
13382
      this.ucx = ucx;
13383
    }
13384
 
13385
    /**
13386
     * Performs a deep copy on <i>other</i>.
13387
     */
13388
    public forgotPassword_result(forgotPassword_result other) {
13389
      __isset_bit_vector.clear();
13390
      __isset_bit_vector.or(other.__isset_bit_vector);
13391
      this.success = other.success;
13392
      if (other.isSetUcx()) {
13393
        this.ucx = new UserContextException(other.ucx);
13394
      }
13395
    }
13396
 
13397
    public forgotPassword_result deepCopy() {
13398
      return new forgotPassword_result(this);
13399
    }
13400
 
13401
    @Deprecated
13402
    public forgotPassword_result clone() {
13403
      return new forgotPassword_result(this);
13404
    }
13405
 
13406
    public boolean isSuccess() {
13407
      return this.success;
13408
    }
13409
 
13410
    public forgotPassword_result setSuccess(boolean success) {
13411
      this.success = success;
13412
      setSuccessIsSet(true);
13413
      return this;
13414
    }
13415
 
13416
    public void unsetSuccess() {
13417
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13418
    }
13419
 
13420
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13421
    public boolean isSetSuccess() {
13422
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13423
    }
13424
 
13425
    public void setSuccessIsSet(boolean value) {
13426
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13427
    }
13428
 
13429
    public UserContextException getUcx() {
13430
      return this.ucx;
13431
    }
13432
 
13433
    public forgotPassword_result setUcx(UserContextException ucx) {
13434
      this.ucx = ucx;
13435
      return this;
13436
    }
13437
 
13438
    public void unsetUcx() {
13439
      this.ucx = null;
13440
    }
13441
 
13442
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13443
    public boolean isSetUcx() {
13444
      return this.ucx != null;
13445
    }
13446
 
13447
    public void setUcxIsSet(boolean value) {
13448
      if (!value) {
13449
        this.ucx = null;
13450
      }
13451
    }
13452
 
13453
    public void setFieldValue(_Fields field, Object value) {
13454
      switch (field) {
13455
      case SUCCESS:
13456
        if (value == null) {
13457
          unsetSuccess();
13458
        } else {
13459
          setSuccess((Boolean)value);
13460
        }
13461
        break;
13462
 
13463
      case UCX:
13464
        if (value == null) {
13465
          unsetUcx();
13466
        } else {
13467
          setUcx((UserContextException)value);
13468
        }
13469
        break;
13470
 
13471
      }
13472
    }
13473
 
13474
    public void setFieldValue(int fieldID, Object value) {
13475
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13476
    }
13477
 
13478
    public Object getFieldValue(_Fields field) {
13479
      switch (field) {
13480
      case SUCCESS:
13481
        return new Boolean(isSuccess());
13482
 
13483
      case UCX:
13484
        return getUcx();
13485
 
13486
      }
13487
      throw new IllegalStateException();
13488
    }
13489
 
13490
    public Object getFieldValue(int fieldId) {
13491
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13492
    }
13493
 
13494
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13495
    public boolean isSet(_Fields field) {
13496
      switch (field) {
13497
      case SUCCESS:
13498
        return isSetSuccess();
13499
      case UCX:
13500
        return isSetUcx();
13501
      }
13502
      throw new IllegalStateException();
13503
    }
13504
 
13505
    public boolean isSet(int fieldID) {
13506
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13507
    }
13508
 
13509
    @Override
13510
    public boolean equals(Object that) {
13511
      if (that == null)
13512
        return false;
13513
      if (that instanceof forgotPassword_result)
13514
        return this.equals((forgotPassword_result)that);
13515
      return false;
13516
    }
13517
 
13518
    public boolean equals(forgotPassword_result that) {
13519
      if (that == null)
13520
        return false;
13521
 
13522
      boolean this_present_success = true;
13523
      boolean that_present_success = true;
13524
      if (this_present_success || that_present_success) {
13525
        if (!(this_present_success && that_present_success))
13526
          return false;
13527
        if (this.success != that.success)
13528
          return false;
13529
      }
13530
 
13531
      boolean this_present_ucx = true && this.isSetUcx();
13532
      boolean that_present_ucx = true && that.isSetUcx();
13533
      if (this_present_ucx || that_present_ucx) {
13534
        if (!(this_present_ucx && that_present_ucx))
13535
          return false;
13536
        if (!this.ucx.equals(that.ucx))
13537
          return false;
13538
      }
13539
 
13540
      return true;
13541
    }
13542
 
13543
    @Override
13544
    public int hashCode() {
13545
      return 0;
13546
    }
13547
 
13548
    public int compareTo(forgotPassword_result other) {
13549
      if (!getClass().equals(other.getClass())) {
13550
        return getClass().getName().compareTo(other.getClass().getName());
13551
      }
13552
 
13553
      int lastComparison = 0;
13554
      forgotPassword_result typedOther = (forgotPassword_result)other;
13555
 
13556
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13557
      if (lastComparison != 0) {
13558
        return lastComparison;
13559
      }
13560
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13561
      if (lastComparison != 0) {
13562
        return lastComparison;
13563
      }
13564
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13565
      if (lastComparison != 0) {
13566
        return lastComparison;
13567
      }
13568
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13569
      if (lastComparison != 0) {
13570
        return lastComparison;
13571
      }
13572
      return 0;
13573
    }
13574
 
13575
    public void read(TProtocol iprot) throws TException {
13576
      TField field;
13577
      iprot.readStructBegin();
13578
      while (true)
13579
      {
13580
        field = iprot.readFieldBegin();
13581
        if (field.type == TType.STOP) { 
13582
          break;
13583
        }
13584
        _Fields fieldId = _Fields.findByThriftId(field.id);
13585
        if (fieldId == null) {
13586
          TProtocolUtil.skip(iprot, field.type);
13587
        } else {
13588
          switch (fieldId) {
13589
            case SUCCESS:
13590
              if (field.type == TType.BOOL) {
13591
                this.success = iprot.readBool();
13592
                setSuccessIsSet(true);
13593
              } else { 
13594
                TProtocolUtil.skip(iprot, field.type);
13595
              }
13596
              break;
13597
            case UCX:
13598
              if (field.type == TType.STRUCT) {
13599
                this.ucx = new UserContextException();
13600
                this.ucx.read(iprot);
13601
              } else { 
13602
                TProtocolUtil.skip(iprot, field.type);
13603
              }
13604
              break;
13605
          }
13606
          iprot.readFieldEnd();
13607
        }
13608
      }
13609
      iprot.readStructEnd();
13610
      validate();
13611
    }
13612
 
13613
    public void write(TProtocol oprot) throws TException {
13614
      oprot.writeStructBegin(STRUCT_DESC);
13615
 
13616
      if (this.isSetSuccess()) {
13617
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13618
        oprot.writeBool(this.success);
13619
        oprot.writeFieldEnd();
13620
      } else if (this.isSetUcx()) {
13621
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13622
        this.ucx.write(oprot);
13623
        oprot.writeFieldEnd();
13624
      }
13625
      oprot.writeFieldStop();
13626
      oprot.writeStructEnd();
13627
    }
13628
 
13629
    @Override
13630
    public String toString() {
13631
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
13632
      boolean first = true;
13633
 
13634
      sb.append("success:");
13635
      sb.append(this.success);
13636
      first = false;
13637
      if (!first) sb.append(", ");
13638
      sb.append("ucx:");
13639
      if (this.ucx == null) {
13640
        sb.append("null");
13641
      } else {
13642
        sb.append(this.ucx);
13643
      }
13644
      first = false;
13645
      sb.append(")");
13646
      return sb.toString();
13647
    }
13648
 
13649
    public void validate() throws TException {
13650
      // check for required fields
13651
    }
13652
 
13653
  }
13654
 
593 rajveer 13655
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
13656
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
13657
 
13658
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
13659
 
13660
    private long userId;
13661
 
13662
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13663
    public enum _Fields implements TFieldIdEnum {
13664
      USER_ID((short)1, "userId");
13665
 
13666
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13667
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13668
 
13669
      static {
13670
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13671
          byId.put((int)field._thriftId, field);
13672
          byName.put(field.getFieldName(), field);
13673
        }
13674
      }
13675
 
13676
      /**
13677
       * Find the _Fields constant that matches fieldId, or null if its not found.
13678
       */
13679
      public static _Fields findByThriftId(int fieldId) {
13680
        return byId.get(fieldId);
13681
      }
13682
 
13683
      /**
13684
       * Find the _Fields constant that matches fieldId, throwing an exception
13685
       * if it is not found.
13686
       */
13687
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13688
        _Fields fields = findByThriftId(fieldId);
13689
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13690
        return fields;
13691
      }
13692
 
13693
      /**
13694
       * Find the _Fields constant that matches name, or null if its not found.
13695
       */
13696
      public static _Fields findByName(String name) {
13697
        return byName.get(name);
13698
      }
13699
 
13700
      private final short _thriftId;
13701
      private final String _fieldName;
13702
 
13703
      _Fields(short thriftId, String fieldName) {
13704
        _thriftId = thriftId;
13705
        _fieldName = fieldName;
13706
      }
13707
 
13708
      public short getThriftFieldId() {
13709
        return _thriftId;
13710
      }
13711
 
13712
      public String getFieldName() {
13713
        return _fieldName;
13714
      }
13715
    }
13716
 
13717
    // isset id assignments
13718
    private static final int __USERID_ISSET_ID = 0;
13719
    private BitSet __isset_bit_vector = new BitSet(1);
13720
 
13721
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13722
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
13723
          new FieldValueMetaData(TType.I64)));
13724
    }});
13725
 
13726
    static {
13727
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
13728
    }
13729
 
13730
    public getAllAddressesForUser_args() {
13731
    }
13732
 
13733
    public getAllAddressesForUser_args(
13734
      long userId)
13735
    {
13736
      this();
13737
      this.userId = userId;
13738
      setUserIdIsSet(true);
13739
    }
13740
 
13741
    /**
13742
     * Performs a deep copy on <i>other</i>.
13743
     */
13744
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
13745
      __isset_bit_vector.clear();
13746
      __isset_bit_vector.or(other.__isset_bit_vector);
13747
      this.userId = other.userId;
13748
    }
13749
 
13750
    public getAllAddressesForUser_args deepCopy() {
13751
      return new getAllAddressesForUser_args(this);
13752
    }
13753
 
13754
    @Deprecated
13755
    public getAllAddressesForUser_args clone() {
13756
      return new getAllAddressesForUser_args(this);
13757
    }
13758
 
13759
    public long getUserId() {
13760
      return this.userId;
13761
    }
13762
 
13763
    public getAllAddressesForUser_args setUserId(long userId) {
13764
      this.userId = userId;
13765
      setUserIdIsSet(true);
13766
      return this;
13767
    }
13768
 
13769
    public void unsetUserId() {
13770
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13771
    }
13772
 
13773
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13774
    public boolean isSetUserId() {
13775
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13776
    }
13777
 
13778
    public void setUserIdIsSet(boolean value) {
13779
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13780
    }
13781
 
13782
    public void setFieldValue(_Fields field, Object value) {
13783
      switch (field) {
13784
      case USER_ID:
13785
        if (value == null) {
13786
          unsetUserId();
13787
        } else {
13788
          setUserId((Long)value);
13789
        }
13790
        break;
13791
 
13792
      }
13793
    }
13794
 
13795
    public void setFieldValue(int fieldID, Object value) {
13796
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13797
    }
13798
 
13799
    public Object getFieldValue(_Fields field) {
13800
      switch (field) {
13801
      case USER_ID:
13802
        return new Long(getUserId());
13803
 
13804
      }
13805
      throw new IllegalStateException();
13806
    }
13807
 
13808
    public Object getFieldValue(int fieldId) {
13809
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13810
    }
13811
 
13812
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13813
    public boolean isSet(_Fields field) {
13814
      switch (field) {
13815
      case USER_ID:
13816
        return isSetUserId();
13817
      }
13818
      throw new IllegalStateException();
13819
    }
13820
 
13821
    public boolean isSet(int fieldID) {
13822
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13823
    }
13824
 
13825
    @Override
13826
    public boolean equals(Object that) {
13827
      if (that == null)
13828
        return false;
13829
      if (that instanceof getAllAddressesForUser_args)
13830
        return this.equals((getAllAddressesForUser_args)that);
13831
      return false;
13832
    }
13833
 
13834
    public boolean equals(getAllAddressesForUser_args that) {
13835
      if (that == null)
13836
        return false;
13837
 
13838
      boolean this_present_userId = true;
13839
      boolean that_present_userId = true;
13840
      if (this_present_userId || that_present_userId) {
13841
        if (!(this_present_userId && that_present_userId))
13842
          return false;
13843
        if (this.userId != that.userId)
13844
          return false;
13845
      }
13846
 
13847
      return true;
13848
    }
13849
 
13850
    @Override
13851
    public int hashCode() {
13852
      return 0;
13853
    }
13854
 
13855
    public int compareTo(getAllAddressesForUser_args other) {
13856
      if (!getClass().equals(other.getClass())) {
13857
        return getClass().getName().compareTo(other.getClass().getName());
13858
      }
13859
 
13860
      int lastComparison = 0;
13861
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
13862
 
13863
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
13864
      if (lastComparison != 0) {
13865
        return lastComparison;
13866
      }
13867
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
13868
      if (lastComparison != 0) {
13869
        return lastComparison;
13870
      }
13871
      return 0;
13872
    }
13873
 
13874
    public void read(TProtocol iprot) throws TException {
13875
      TField field;
13876
      iprot.readStructBegin();
13877
      while (true)
13878
      {
13879
        field = iprot.readFieldBegin();
13880
        if (field.type == TType.STOP) { 
13881
          break;
13882
        }
13883
        _Fields fieldId = _Fields.findByThriftId(field.id);
13884
        if (fieldId == null) {
13885
          TProtocolUtil.skip(iprot, field.type);
13886
        } else {
13887
          switch (fieldId) {
13888
            case USER_ID:
13889
              if (field.type == TType.I64) {
13890
                this.userId = iprot.readI64();
13891
                setUserIdIsSet(true);
13892
              } else { 
13893
                TProtocolUtil.skip(iprot, field.type);
13894
              }
13895
              break;
13896
          }
13897
          iprot.readFieldEnd();
13898
        }
13899
      }
13900
      iprot.readStructEnd();
13901
      validate();
13902
    }
13903
 
13904
    public void write(TProtocol oprot) throws TException {
13905
      validate();
13906
 
13907
      oprot.writeStructBegin(STRUCT_DESC);
13908
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
13909
      oprot.writeI64(this.userId);
13910
      oprot.writeFieldEnd();
13911
      oprot.writeFieldStop();
13912
      oprot.writeStructEnd();
13913
    }
13914
 
13915
    @Override
13916
    public String toString() {
13917
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
13918
      boolean first = true;
13919
 
13920
      sb.append("userId:");
13921
      sb.append(this.userId);
13922
      first = false;
13923
      sb.append(")");
13924
      return sb.toString();
13925
    }
13926
 
13927
    public void validate() throws TException {
13928
      // check for required fields
13929
    }
13930
 
13931
  }
13932
 
13933
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
13934
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
13935
 
13936
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
13937
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13938
 
13939
    private List<Address> success;
13940
    private UserContextException ucx;
13941
 
13942
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13943
    public enum _Fields implements TFieldIdEnum {
13944
      SUCCESS((short)0, "success"),
13945
      UCX((short)1, "ucx");
13946
 
13947
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13948
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13949
 
13950
      static {
13951
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13952
          byId.put((int)field._thriftId, field);
13953
          byName.put(field.getFieldName(), field);
13954
        }
13955
      }
13956
 
13957
      /**
13958
       * Find the _Fields constant that matches fieldId, or null if its not found.
13959
       */
13960
      public static _Fields findByThriftId(int fieldId) {
13961
        return byId.get(fieldId);
13962
      }
13963
 
13964
      /**
13965
       * Find the _Fields constant that matches fieldId, throwing an exception
13966
       * if it is not found.
13967
       */
13968
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13969
        _Fields fields = findByThriftId(fieldId);
13970
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13971
        return fields;
13972
      }
13973
 
13974
      /**
13975
       * Find the _Fields constant that matches name, or null if its not found.
13976
       */
13977
      public static _Fields findByName(String name) {
13978
        return byName.get(name);
13979
      }
13980
 
13981
      private final short _thriftId;
13982
      private final String _fieldName;
13983
 
13984
      _Fields(short thriftId, String fieldName) {
13985
        _thriftId = thriftId;
13986
        _fieldName = fieldName;
13987
      }
13988
 
13989
      public short getThriftFieldId() {
13990
        return _thriftId;
13991
      }
13992
 
13993
      public String getFieldName() {
13994
        return _fieldName;
13995
      }
13996
    }
13997
 
13998
    // isset id assignments
13999
 
14000
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14001
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14002
          new ListMetaData(TType.LIST, 
14003
              new StructMetaData(TType.STRUCT, Address.class))));
14004
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14005
          new FieldValueMetaData(TType.STRUCT)));
14006
    }});
14007
 
14008
    static {
14009
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
14010
    }
14011
 
14012
    public getAllAddressesForUser_result() {
14013
    }
14014
 
14015
    public getAllAddressesForUser_result(
14016
      List<Address> success,
14017
      UserContextException ucx)
14018
    {
14019
      this();
14020
      this.success = success;
14021
      this.ucx = ucx;
14022
    }
14023
 
14024
    /**
14025
     * Performs a deep copy on <i>other</i>.
14026
     */
14027
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
14028
      if (other.isSetSuccess()) {
14029
        List<Address> __this__success = new ArrayList<Address>();
14030
        for (Address other_element : other.success) {
14031
          __this__success.add(new Address(other_element));
14032
        }
14033
        this.success = __this__success;
14034
      }
14035
      if (other.isSetUcx()) {
14036
        this.ucx = new UserContextException(other.ucx);
14037
      }
14038
    }
14039
 
14040
    public getAllAddressesForUser_result deepCopy() {
14041
      return new getAllAddressesForUser_result(this);
14042
    }
14043
 
14044
    @Deprecated
14045
    public getAllAddressesForUser_result clone() {
14046
      return new getAllAddressesForUser_result(this);
14047
    }
14048
 
14049
    public int getSuccessSize() {
14050
      return (this.success == null) ? 0 : this.success.size();
14051
    }
14052
 
14053
    public java.util.Iterator<Address> getSuccessIterator() {
14054
      return (this.success == null) ? null : this.success.iterator();
14055
    }
14056
 
14057
    public void addToSuccess(Address elem) {
14058
      if (this.success == null) {
14059
        this.success = new ArrayList<Address>();
14060
      }
14061
      this.success.add(elem);
14062
    }
14063
 
14064
    public List<Address> getSuccess() {
14065
      return this.success;
14066
    }
14067
 
14068
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
14069
      this.success = success;
14070
      return this;
14071
    }
14072
 
14073
    public void unsetSuccess() {
14074
      this.success = null;
14075
    }
14076
 
14077
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14078
    public boolean isSetSuccess() {
14079
      return this.success != null;
14080
    }
14081
 
14082
    public void setSuccessIsSet(boolean value) {
14083
      if (!value) {
14084
        this.success = null;
14085
      }
14086
    }
14087
 
14088
    public UserContextException getUcx() {
14089
      return this.ucx;
14090
    }
14091
 
14092
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
14093
      this.ucx = ucx;
14094
      return this;
14095
    }
14096
 
14097
    public void unsetUcx() {
14098
      this.ucx = null;
14099
    }
14100
 
14101
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14102
    public boolean isSetUcx() {
14103
      return this.ucx != null;
14104
    }
14105
 
14106
    public void setUcxIsSet(boolean value) {
14107
      if (!value) {
14108
        this.ucx = null;
14109
      }
14110
    }
14111
 
14112
    public void setFieldValue(_Fields field, Object value) {
14113
      switch (field) {
14114
      case SUCCESS:
14115
        if (value == null) {
14116
          unsetSuccess();
14117
        } else {
14118
          setSuccess((List<Address>)value);
14119
        }
14120
        break;
14121
 
14122
      case UCX:
14123
        if (value == null) {
14124
          unsetUcx();
14125
        } else {
14126
          setUcx((UserContextException)value);
14127
        }
14128
        break;
14129
 
14130
      }
14131
    }
14132
 
14133
    public void setFieldValue(int fieldID, Object value) {
14134
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14135
    }
14136
 
14137
    public Object getFieldValue(_Fields field) {
14138
      switch (field) {
14139
      case SUCCESS:
14140
        return getSuccess();
14141
 
14142
      case UCX:
14143
        return getUcx();
14144
 
14145
      }
14146
      throw new IllegalStateException();
14147
    }
14148
 
14149
    public Object getFieldValue(int fieldId) {
14150
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14151
    }
14152
 
14153
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14154
    public boolean isSet(_Fields field) {
14155
      switch (field) {
14156
      case SUCCESS:
14157
        return isSetSuccess();
14158
      case UCX:
14159
        return isSetUcx();
14160
      }
14161
      throw new IllegalStateException();
14162
    }
14163
 
14164
    public boolean isSet(int fieldID) {
14165
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14166
    }
14167
 
14168
    @Override
14169
    public boolean equals(Object that) {
14170
      if (that == null)
14171
        return false;
14172
      if (that instanceof getAllAddressesForUser_result)
14173
        return this.equals((getAllAddressesForUser_result)that);
14174
      return false;
14175
    }
14176
 
14177
    public boolean equals(getAllAddressesForUser_result that) {
14178
      if (that == null)
14179
        return false;
14180
 
14181
      boolean this_present_success = true && this.isSetSuccess();
14182
      boolean that_present_success = true && that.isSetSuccess();
14183
      if (this_present_success || that_present_success) {
14184
        if (!(this_present_success && that_present_success))
14185
          return false;
14186
        if (!this.success.equals(that.success))
14187
          return false;
14188
      }
14189
 
14190
      boolean this_present_ucx = true && this.isSetUcx();
14191
      boolean that_present_ucx = true && that.isSetUcx();
14192
      if (this_present_ucx || that_present_ucx) {
14193
        if (!(this_present_ucx && that_present_ucx))
14194
          return false;
14195
        if (!this.ucx.equals(that.ucx))
14196
          return false;
14197
      }
14198
 
14199
      return true;
14200
    }
14201
 
14202
    @Override
14203
    public int hashCode() {
14204
      return 0;
14205
    }
14206
 
14207
    public int compareTo(getAllAddressesForUser_result other) {
14208
      if (!getClass().equals(other.getClass())) {
14209
        return getClass().getName().compareTo(other.getClass().getName());
14210
      }
14211
 
14212
      int lastComparison = 0;
14213
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
14214
 
14215
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14216
      if (lastComparison != 0) {
14217
        return lastComparison;
14218
      }
14219
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14220
      if (lastComparison != 0) {
14221
        return lastComparison;
14222
      }
14223
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14224
      if (lastComparison != 0) {
14225
        return lastComparison;
14226
      }
14227
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14228
      if (lastComparison != 0) {
14229
        return lastComparison;
14230
      }
14231
      return 0;
14232
    }
14233
 
14234
    public void read(TProtocol iprot) throws TException {
14235
      TField field;
14236
      iprot.readStructBegin();
14237
      while (true)
14238
      {
14239
        field = iprot.readFieldBegin();
14240
        if (field.type == TType.STOP) { 
14241
          break;
14242
        }
14243
        _Fields fieldId = _Fields.findByThriftId(field.id);
14244
        if (fieldId == null) {
14245
          TProtocolUtil.skip(iprot, field.type);
14246
        } else {
14247
          switch (fieldId) {
14248
            case SUCCESS:
14249
              if (field.type == TType.LIST) {
14250
                {
771 rajveer 14251
                  TList _list16 = iprot.readListBegin();
14252
                  this.success = new ArrayList<Address>(_list16.size);
14253
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
593 rajveer 14254
                  {
771 rajveer 14255
                    Address _elem18;
14256
                    _elem18 = new Address();
14257
                    _elem18.read(iprot);
14258
                    this.success.add(_elem18);
593 rajveer 14259
                  }
14260
                  iprot.readListEnd();
14261
                }
14262
              } else { 
14263
                TProtocolUtil.skip(iprot, field.type);
14264
              }
14265
              break;
14266
            case UCX:
14267
              if (field.type == TType.STRUCT) {
14268
                this.ucx = new UserContextException();
14269
                this.ucx.read(iprot);
14270
              } else { 
14271
                TProtocolUtil.skip(iprot, field.type);
14272
              }
14273
              break;
14274
          }
14275
          iprot.readFieldEnd();
14276
        }
14277
      }
14278
      iprot.readStructEnd();
14279
      validate();
14280
    }
14281
 
14282
    public void write(TProtocol oprot) throws TException {
14283
      oprot.writeStructBegin(STRUCT_DESC);
14284
 
14285
      if (this.isSetSuccess()) {
14286
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14287
        {
14288
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 14289
          for (Address _iter19 : this.success)
593 rajveer 14290
          {
771 rajveer 14291
            _iter19.write(oprot);
593 rajveer 14292
          }
14293
          oprot.writeListEnd();
14294
        }
14295
        oprot.writeFieldEnd();
14296
      } else if (this.isSetUcx()) {
14297
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14298
        this.ucx.write(oprot);
14299
        oprot.writeFieldEnd();
14300
      }
14301
      oprot.writeFieldStop();
14302
      oprot.writeStructEnd();
14303
    }
14304
 
14305
    @Override
14306
    public String toString() {
14307
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
14308
      boolean first = true;
14309
 
14310
      sb.append("success:");
14311
      if (this.success == null) {
14312
        sb.append("null");
14313
      } else {
14314
        sb.append(this.success);
14315
      }
14316
      first = false;
14317
      if (!first) sb.append(", ");
14318
      sb.append("ucx:");
14319
      if (this.ucx == null) {
14320
        sb.append("null");
14321
      } else {
14322
        sb.append(this.ucx);
14323
      }
14324
      first = false;
14325
      sb.append(")");
14326
      return sb.toString();
14327
    }
14328
 
14329
    public void validate() throws TException {
14330
      // check for required fields
14331
    }
14332
 
14333
  }
14334
 
14335
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
14336
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
14337
 
14338
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14339
 
14340
    private long userId;
14341
 
14342
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14343
    public enum _Fields implements TFieldIdEnum {
14344
      USER_ID((short)1, "userId");
14345
 
14346
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14347
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14348
 
14349
      static {
14350
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14351
          byId.put((int)field._thriftId, field);
14352
          byName.put(field.getFieldName(), field);
14353
        }
14354
      }
14355
 
14356
      /**
14357
       * Find the _Fields constant that matches fieldId, or null if its not found.
14358
       */
14359
      public static _Fields findByThriftId(int fieldId) {
14360
        return byId.get(fieldId);
14361
      }
14362
 
14363
      /**
14364
       * Find the _Fields constant that matches fieldId, throwing an exception
14365
       * if it is not found.
14366
       */
14367
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14368
        _Fields fields = findByThriftId(fieldId);
14369
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14370
        return fields;
14371
      }
14372
 
14373
      /**
14374
       * Find the _Fields constant that matches name, or null if its not found.
14375
       */
14376
      public static _Fields findByName(String name) {
14377
        return byName.get(name);
14378
      }
14379
 
14380
      private final short _thriftId;
14381
      private final String _fieldName;
14382
 
14383
      _Fields(short thriftId, String fieldName) {
14384
        _thriftId = thriftId;
14385
        _fieldName = fieldName;
14386
      }
14387
 
14388
      public short getThriftFieldId() {
14389
        return _thriftId;
14390
      }
14391
 
14392
      public String getFieldName() {
14393
        return _fieldName;
14394
      }
14395
    }
14396
 
14397
    // isset id assignments
14398
    private static final int __USERID_ISSET_ID = 0;
14399
    private BitSet __isset_bit_vector = new BitSet(1);
14400
 
14401
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14402
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14403
          new FieldValueMetaData(TType.I64)));
14404
    }});
14405
 
14406
    static {
14407
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
14408
    }
14409
 
14410
    public getDefaultAddressId_args() {
14411
    }
14412
 
14413
    public getDefaultAddressId_args(
14414
      long userId)
14415
    {
14416
      this();
14417
      this.userId = userId;
14418
      setUserIdIsSet(true);
14419
    }
14420
 
14421
    /**
14422
     * Performs a deep copy on <i>other</i>.
14423
     */
14424
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
14425
      __isset_bit_vector.clear();
14426
      __isset_bit_vector.or(other.__isset_bit_vector);
14427
      this.userId = other.userId;
14428
    }
14429
 
14430
    public getDefaultAddressId_args deepCopy() {
14431
      return new getDefaultAddressId_args(this);
14432
    }
14433
 
14434
    @Deprecated
14435
    public getDefaultAddressId_args clone() {
14436
      return new getDefaultAddressId_args(this);
14437
    }
14438
 
14439
    public long getUserId() {
14440
      return this.userId;
14441
    }
14442
 
14443
    public getDefaultAddressId_args setUserId(long userId) {
14444
      this.userId = userId;
14445
      setUserIdIsSet(true);
14446
      return this;
14447
    }
14448
 
14449
    public void unsetUserId() {
14450
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14451
    }
14452
 
14453
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14454
    public boolean isSetUserId() {
14455
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14456
    }
14457
 
14458
    public void setUserIdIsSet(boolean value) {
14459
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14460
    }
14461
 
14462
    public void setFieldValue(_Fields field, Object value) {
14463
      switch (field) {
14464
      case USER_ID:
14465
        if (value == null) {
14466
          unsetUserId();
14467
        } else {
14468
          setUserId((Long)value);
14469
        }
14470
        break;
14471
 
14472
      }
14473
    }
14474
 
14475
    public void setFieldValue(int fieldID, Object value) {
14476
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14477
    }
14478
 
14479
    public Object getFieldValue(_Fields field) {
14480
      switch (field) {
14481
      case USER_ID:
14482
        return new Long(getUserId());
14483
 
14484
      }
14485
      throw new IllegalStateException();
14486
    }
14487
 
14488
    public Object getFieldValue(int fieldId) {
14489
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14490
    }
14491
 
14492
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14493
    public boolean isSet(_Fields field) {
14494
      switch (field) {
14495
      case USER_ID:
14496
        return isSetUserId();
14497
      }
14498
      throw new IllegalStateException();
14499
    }
14500
 
14501
    public boolean isSet(int fieldID) {
14502
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14503
    }
14504
 
14505
    @Override
14506
    public boolean equals(Object that) {
14507
      if (that == null)
14508
        return false;
14509
      if (that instanceof getDefaultAddressId_args)
14510
        return this.equals((getDefaultAddressId_args)that);
14511
      return false;
14512
    }
14513
 
14514
    public boolean equals(getDefaultAddressId_args that) {
14515
      if (that == null)
14516
        return false;
14517
 
14518
      boolean this_present_userId = true;
14519
      boolean that_present_userId = true;
14520
      if (this_present_userId || that_present_userId) {
14521
        if (!(this_present_userId && that_present_userId))
14522
          return false;
14523
        if (this.userId != that.userId)
14524
          return false;
14525
      }
14526
 
14527
      return true;
14528
    }
14529
 
14530
    @Override
14531
    public int hashCode() {
14532
      return 0;
14533
    }
14534
 
14535
    public int compareTo(getDefaultAddressId_args other) {
14536
      if (!getClass().equals(other.getClass())) {
14537
        return getClass().getName().compareTo(other.getClass().getName());
14538
      }
14539
 
14540
      int lastComparison = 0;
14541
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
14542
 
14543
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14544
      if (lastComparison != 0) {
14545
        return lastComparison;
14546
      }
14547
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14548
      if (lastComparison != 0) {
14549
        return lastComparison;
14550
      }
14551
      return 0;
14552
    }
14553
 
14554
    public void read(TProtocol iprot) throws TException {
14555
      TField field;
14556
      iprot.readStructBegin();
14557
      while (true)
14558
      {
14559
        field = iprot.readFieldBegin();
14560
        if (field.type == TType.STOP) { 
14561
          break;
14562
        }
14563
        _Fields fieldId = _Fields.findByThriftId(field.id);
14564
        if (fieldId == null) {
14565
          TProtocolUtil.skip(iprot, field.type);
14566
        } else {
14567
          switch (fieldId) {
14568
            case USER_ID:
14569
              if (field.type == TType.I64) {
14570
                this.userId = iprot.readI64();
14571
                setUserIdIsSet(true);
14572
              } else { 
14573
                TProtocolUtil.skip(iprot, field.type);
14574
              }
14575
              break;
14576
          }
14577
          iprot.readFieldEnd();
14578
        }
14579
      }
14580
      iprot.readStructEnd();
14581
      validate();
14582
    }
14583
 
14584
    public void write(TProtocol oprot) throws TException {
14585
      validate();
14586
 
14587
      oprot.writeStructBegin(STRUCT_DESC);
14588
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14589
      oprot.writeI64(this.userId);
14590
      oprot.writeFieldEnd();
14591
      oprot.writeFieldStop();
14592
      oprot.writeStructEnd();
14593
    }
14594
 
14595
    @Override
14596
    public String toString() {
14597
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
14598
      boolean first = true;
14599
 
14600
      sb.append("userId:");
14601
      sb.append(this.userId);
14602
      first = false;
14603
      sb.append(")");
14604
      return sb.toString();
14605
    }
14606
 
14607
    public void validate() throws TException {
14608
      // check for required fields
14609
    }
14610
 
14611
  }
14612
 
14613
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
14614
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
14615
 
14616
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
14617
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14618
 
14619
    private long success;
14620
    private UserContextException ucx;
14621
 
14622
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14623
    public enum _Fields implements TFieldIdEnum {
14624
      SUCCESS((short)0, "success"),
14625
      UCX((short)1, "ucx");
14626
 
14627
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14628
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14629
 
14630
      static {
14631
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14632
          byId.put((int)field._thriftId, field);
14633
          byName.put(field.getFieldName(), field);
14634
        }
14635
      }
14636
 
14637
      /**
14638
       * Find the _Fields constant that matches fieldId, or null if its not found.
14639
       */
14640
      public static _Fields findByThriftId(int fieldId) {
14641
        return byId.get(fieldId);
14642
      }
14643
 
14644
      /**
14645
       * Find the _Fields constant that matches fieldId, throwing an exception
14646
       * if it is not found.
14647
       */
14648
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14649
        _Fields fields = findByThriftId(fieldId);
14650
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14651
        return fields;
14652
      }
14653
 
14654
      /**
14655
       * Find the _Fields constant that matches name, or null if its not found.
14656
       */
14657
      public static _Fields findByName(String name) {
14658
        return byName.get(name);
14659
      }
14660
 
14661
      private final short _thriftId;
14662
      private final String _fieldName;
14663
 
14664
      _Fields(short thriftId, String fieldName) {
14665
        _thriftId = thriftId;
14666
        _fieldName = fieldName;
14667
      }
14668
 
14669
      public short getThriftFieldId() {
14670
        return _thriftId;
14671
      }
14672
 
14673
      public String getFieldName() {
14674
        return _fieldName;
14675
      }
14676
    }
14677
 
14678
    // isset id assignments
14679
    private static final int __SUCCESS_ISSET_ID = 0;
14680
    private BitSet __isset_bit_vector = new BitSet(1);
14681
 
14682
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14683
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14684
          new FieldValueMetaData(TType.I64)));
14685
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14686
          new FieldValueMetaData(TType.STRUCT)));
14687
    }});
14688
 
14689
    static {
14690
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
14691
    }
14692
 
14693
    public getDefaultAddressId_result() {
14694
    }
14695
 
14696
    public getDefaultAddressId_result(
14697
      long success,
14698
      UserContextException ucx)
14699
    {
14700
      this();
14701
      this.success = success;
14702
      setSuccessIsSet(true);
14703
      this.ucx = ucx;
14704
    }
14705
 
14706
    /**
14707
     * Performs a deep copy on <i>other</i>.
14708
     */
14709
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
14710
      __isset_bit_vector.clear();
14711
      __isset_bit_vector.or(other.__isset_bit_vector);
14712
      this.success = other.success;
14713
      if (other.isSetUcx()) {
14714
        this.ucx = new UserContextException(other.ucx);
14715
      }
14716
    }
14717
 
14718
    public getDefaultAddressId_result deepCopy() {
14719
      return new getDefaultAddressId_result(this);
14720
    }
14721
 
14722
    @Deprecated
14723
    public getDefaultAddressId_result clone() {
14724
      return new getDefaultAddressId_result(this);
14725
    }
14726
 
14727
    public long getSuccess() {
14728
      return this.success;
14729
    }
14730
 
14731
    public getDefaultAddressId_result setSuccess(long success) {
14732
      this.success = success;
14733
      setSuccessIsSet(true);
14734
      return this;
14735
    }
14736
 
14737
    public void unsetSuccess() {
14738
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14739
    }
14740
 
14741
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14742
    public boolean isSetSuccess() {
14743
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14744
    }
14745
 
14746
    public void setSuccessIsSet(boolean value) {
14747
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14748
    }
14749
 
14750
    public UserContextException getUcx() {
14751
      return this.ucx;
14752
    }
14753
 
14754
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
14755
      this.ucx = ucx;
14756
      return this;
14757
    }
14758
 
14759
    public void unsetUcx() {
14760
      this.ucx = null;
14761
    }
14762
 
14763
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14764
    public boolean isSetUcx() {
14765
      return this.ucx != null;
14766
    }
14767
 
14768
    public void setUcxIsSet(boolean value) {
14769
      if (!value) {
14770
        this.ucx = null;
14771
      }
14772
    }
14773
 
14774
    public void setFieldValue(_Fields field, Object value) {
14775
      switch (field) {
14776
      case SUCCESS:
14777
        if (value == null) {
14778
          unsetSuccess();
14779
        } else {
14780
          setSuccess((Long)value);
14781
        }
14782
        break;
14783
 
14784
      case UCX:
14785
        if (value == null) {
14786
          unsetUcx();
14787
        } else {
14788
          setUcx((UserContextException)value);
14789
        }
14790
        break;
14791
 
14792
      }
14793
    }
14794
 
14795
    public void setFieldValue(int fieldID, Object value) {
14796
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14797
    }
14798
 
14799
    public Object getFieldValue(_Fields field) {
14800
      switch (field) {
14801
      case SUCCESS:
14802
        return new Long(getSuccess());
14803
 
14804
      case UCX:
14805
        return getUcx();
14806
 
14807
      }
14808
      throw new IllegalStateException();
14809
    }
14810
 
14811
    public Object getFieldValue(int fieldId) {
14812
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14813
    }
14814
 
14815
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14816
    public boolean isSet(_Fields field) {
14817
      switch (field) {
14818
      case SUCCESS:
14819
        return isSetSuccess();
14820
      case UCX:
14821
        return isSetUcx();
14822
      }
14823
      throw new IllegalStateException();
14824
    }
14825
 
14826
    public boolean isSet(int fieldID) {
14827
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14828
    }
14829
 
14830
    @Override
14831
    public boolean equals(Object that) {
14832
      if (that == null)
14833
        return false;
14834
      if (that instanceof getDefaultAddressId_result)
14835
        return this.equals((getDefaultAddressId_result)that);
14836
      return false;
14837
    }
14838
 
14839
    public boolean equals(getDefaultAddressId_result that) {
14840
      if (that == null)
14841
        return false;
14842
 
14843
      boolean this_present_success = true;
14844
      boolean that_present_success = true;
14845
      if (this_present_success || that_present_success) {
14846
        if (!(this_present_success && that_present_success))
14847
          return false;
14848
        if (this.success != that.success)
14849
          return false;
14850
      }
14851
 
14852
      boolean this_present_ucx = true && this.isSetUcx();
14853
      boolean that_present_ucx = true && that.isSetUcx();
14854
      if (this_present_ucx || that_present_ucx) {
14855
        if (!(this_present_ucx && that_present_ucx))
14856
          return false;
14857
        if (!this.ucx.equals(that.ucx))
14858
          return false;
14859
      }
14860
 
14861
      return true;
14862
    }
14863
 
14864
    @Override
14865
    public int hashCode() {
14866
      return 0;
14867
    }
14868
 
14869
    public int compareTo(getDefaultAddressId_result other) {
14870
      if (!getClass().equals(other.getClass())) {
14871
        return getClass().getName().compareTo(other.getClass().getName());
14872
      }
14873
 
14874
      int lastComparison = 0;
14875
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
14876
 
14877
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14878
      if (lastComparison != 0) {
14879
        return lastComparison;
14880
      }
14881
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14882
      if (lastComparison != 0) {
14883
        return lastComparison;
14884
      }
14885
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14886
      if (lastComparison != 0) {
14887
        return lastComparison;
14888
      }
14889
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14890
      if (lastComparison != 0) {
14891
        return lastComparison;
14892
      }
14893
      return 0;
14894
    }
14895
 
14896
    public void read(TProtocol iprot) throws TException {
14897
      TField field;
14898
      iprot.readStructBegin();
14899
      while (true)
14900
      {
14901
        field = iprot.readFieldBegin();
14902
        if (field.type == TType.STOP) { 
14903
          break;
14904
        }
14905
        _Fields fieldId = _Fields.findByThriftId(field.id);
14906
        if (fieldId == null) {
14907
          TProtocolUtil.skip(iprot, field.type);
14908
        } else {
14909
          switch (fieldId) {
14910
            case SUCCESS:
14911
              if (field.type == TType.I64) {
14912
                this.success = iprot.readI64();
14913
                setSuccessIsSet(true);
14914
              } else { 
14915
                TProtocolUtil.skip(iprot, field.type);
14916
              }
14917
              break;
14918
            case UCX:
14919
              if (field.type == TType.STRUCT) {
14920
                this.ucx = new UserContextException();
14921
                this.ucx.read(iprot);
14922
              } else { 
14923
                TProtocolUtil.skip(iprot, field.type);
14924
              }
14925
              break;
14926
          }
14927
          iprot.readFieldEnd();
14928
        }
14929
      }
14930
      iprot.readStructEnd();
14931
      validate();
14932
    }
14933
 
14934
    public void write(TProtocol oprot) throws TException {
14935
      oprot.writeStructBegin(STRUCT_DESC);
14936
 
14937
      if (this.isSetSuccess()) {
14938
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14939
        oprot.writeI64(this.success);
14940
        oprot.writeFieldEnd();
14941
      } else if (this.isSetUcx()) {
14942
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14943
        this.ucx.write(oprot);
14944
        oprot.writeFieldEnd();
14945
      }
14946
      oprot.writeFieldStop();
14947
      oprot.writeStructEnd();
14948
    }
14949
 
14950
    @Override
14951
    public String toString() {
14952
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
14953
      boolean first = true;
14954
 
14955
      sb.append("success:");
14956
      sb.append(this.success);
14957
      first = false;
14958
      if (!first) sb.append(", ");
14959
      sb.append("ucx:");
14960
      if (this.ucx == null) {
14961
        sb.append("null");
14962
      } else {
14963
        sb.append(this.ucx);
14964
      }
14965
      first = false;
14966
      sb.append(")");
14967
      return sb.toString();
14968
    }
14969
 
14970
    public void validate() throws TException {
14971
      // check for required fields
14972
    }
14973
 
14974
  }
14975
 
784 rajveer 14976
  public static class getDefaultPincode_args implements TBase<getDefaultPincode_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_args>   {
14977
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_args");
14978
 
14979
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14980
 
14981
    private long userId;
14982
 
14983
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14984
    public enum _Fields implements TFieldIdEnum {
14985
      USER_ID((short)1, "userId");
14986
 
14987
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14988
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14989
 
14990
      static {
14991
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14992
          byId.put((int)field._thriftId, field);
14993
          byName.put(field.getFieldName(), field);
14994
        }
14995
      }
14996
 
14997
      /**
14998
       * Find the _Fields constant that matches fieldId, or null if its not found.
14999
       */
15000
      public static _Fields findByThriftId(int fieldId) {
15001
        return byId.get(fieldId);
15002
      }
15003
 
15004
      /**
15005
       * Find the _Fields constant that matches fieldId, throwing an exception
15006
       * if it is not found.
15007
       */
15008
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15009
        _Fields fields = findByThriftId(fieldId);
15010
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15011
        return fields;
15012
      }
15013
 
15014
      /**
15015
       * Find the _Fields constant that matches name, or null if its not found.
15016
       */
15017
      public static _Fields findByName(String name) {
15018
        return byName.get(name);
15019
      }
15020
 
15021
      private final short _thriftId;
15022
      private final String _fieldName;
15023
 
15024
      _Fields(short thriftId, String fieldName) {
15025
        _thriftId = thriftId;
15026
        _fieldName = fieldName;
15027
      }
15028
 
15029
      public short getThriftFieldId() {
15030
        return _thriftId;
15031
      }
15032
 
15033
      public String getFieldName() {
15034
        return _fieldName;
15035
      }
15036
    }
15037
 
15038
    // isset id assignments
15039
    private static final int __USERID_ISSET_ID = 0;
15040
    private BitSet __isset_bit_vector = new BitSet(1);
15041
 
15042
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15043
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15044
          new FieldValueMetaData(TType.I64)));
15045
    }});
15046
 
15047
    static {
15048
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_args.class, metaDataMap);
15049
    }
15050
 
15051
    public getDefaultPincode_args() {
15052
    }
15053
 
15054
    public getDefaultPincode_args(
15055
      long userId)
15056
    {
15057
      this();
15058
      this.userId = userId;
15059
      setUserIdIsSet(true);
15060
    }
15061
 
15062
    /**
15063
     * Performs a deep copy on <i>other</i>.
15064
     */
15065
    public getDefaultPincode_args(getDefaultPincode_args other) {
15066
      __isset_bit_vector.clear();
15067
      __isset_bit_vector.or(other.__isset_bit_vector);
15068
      this.userId = other.userId;
15069
    }
15070
 
15071
    public getDefaultPincode_args deepCopy() {
15072
      return new getDefaultPincode_args(this);
15073
    }
15074
 
15075
    @Deprecated
15076
    public getDefaultPincode_args clone() {
15077
      return new getDefaultPincode_args(this);
15078
    }
15079
 
15080
    public long getUserId() {
15081
      return this.userId;
15082
    }
15083
 
15084
    public getDefaultPincode_args setUserId(long userId) {
15085
      this.userId = userId;
15086
      setUserIdIsSet(true);
15087
      return this;
15088
    }
15089
 
15090
    public void unsetUserId() {
15091
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15092
    }
15093
 
15094
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15095
    public boolean isSetUserId() {
15096
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15097
    }
15098
 
15099
    public void setUserIdIsSet(boolean value) {
15100
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15101
    }
15102
 
15103
    public void setFieldValue(_Fields field, Object value) {
15104
      switch (field) {
15105
      case USER_ID:
15106
        if (value == null) {
15107
          unsetUserId();
15108
        } else {
15109
          setUserId((Long)value);
15110
        }
15111
        break;
15112
 
15113
      }
15114
    }
15115
 
15116
    public void setFieldValue(int fieldID, Object value) {
15117
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15118
    }
15119
 
15120
    public Object getFieldValue(_Fields field) {
15121
      switch (field) {
15122
      case USER_ID:
15123
        return new Long(getUserId());
15124
 
15125
      }
15126
      throw new IllegalStateException();
15127
    }
15128
 
15129
    public Object getFieldValue(int fieldId) {
15130
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15131
    }
15132
 
15133
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15134
    public boolean isSet(_Fields field) {
15135
      switch (field) {
15136
      case USER_ID:
15137
        return isSetUserId();
15138
      }
15139
      throw new IllegalStateException();
15140
    }
15141
 
15142
    public boolean isSet(int fieldID) {
15143
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15144
    }
15145
 
15146
    @Override
15147
    public boolean equals(Object that) {
15148
      if (that == null)
15149
        return false;
15150
      if (that instanceof getDefaultPincode_args)
15151
        return this.equals((getDefaultPincode_args)that);
15152
      return false;
15153
    }
15154
 
15155
    public boolean equals(getDefaultPincode_args that) {
15156
      if (that == null)
15157
        return false;
15158
 
15159
      boolean this_present_userId = true;
15160
      boolean that_present_userId = true;
15161
      if (this_present_userId || that_present_userId) {
15162
        if (!(this_present_userId && that_present_userId))
15163
          return false;
15164
        if (this.userId != that.userId)
15165
          return false;
15166
      }
15167
 
15168
      return true;
15169
    }
15170
 
15171
    @Override
15172
    public int hashCode() {
15173
      return 0;
15174
    }
15175
 
15176
    public int compareTo(getDefaultPincode_args other) {
15177
      if (!getClass().equals(other.getClass())) {
15178
        return getClass().getName().compareTo(other.getClass().getName());
15179
      }
15180
 
15181
      int lastComparison = 0;
15182
      getDefaultPincode_args typedOther = (getDefaultPincode_args)other;
15183
 
15184
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15185
      if (lastComparison != 0) {
15186
        return lastComparison;
15187
      }
15188
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15189
      if (lastComparison != 0) {
15190
        return lastComparison;
15191
      }
15192
      return 0;
15193
    }
15194
 
15195
    public void read(TProtocol iprot) throws TException {
15196
      TField field;
15197
      iprot.readStructBegin();
15198
      while (true)
15199
      {
15200
        field = iprot.readFieldBegin();
15201
        if (field.type == TType.STOP) { 
15202
          break;
15203
        }
15204
        _Fields fieldId = _Fields.findByThriftId(field.id);
15205
        if (fieldId == null) {
15206
          TProtocolUtil.skip(iprot, field.type);
15207
        } else {
15208
          switch (fieldId) {
15209
            case USER_ID:
15210
              if (field.type == TType.I64) {
15211
                this.userId = iprot.readI64();
15212
                setUserIdIsSet(true);
15213
              } else { 
15214
                TProtocolUtil.skip(iprot, field.type);
15215
              }
15216
              break;
15217
          }
15218
          iprot.readFieldEnd();
15219
        }
15220
      }
15221
      iprot.readStructEnd();
15222
      validate();
15223
    }
15224
 
15225
    public void write(TProtocol oprot) throws TException {
15226
      validate();
15227
 
15228
      oprot.writeStructBegin(STRUCT_DESC);
15229
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15230
      oprot.writeI64(this.userId);
15231
      oprot.writeFieldEnd();
15232
      oprot.writeFieldStop();
15233
      oprot.writeStructEnd();
15234
    }
15235
 
15236
    @Override
15237
    public String toString() {
15238
      StringBuilder sb = new StringBuilder("getDefaultPincode_args(");
15239
      boolean first = true;
15240
 
15241
      sb.append("userId:");
15242
      sb.append(this.userId);
15243
      first = false;
15244
      sb.append(")");
15245
      return sb.toString();
15246
    }
15247
 
15248
    public void validate() throws TException {
15249
      // check for required fields
15250
    }
15251
 
15252
  }
15253
 
15254
  public static class getDefaultPincode_result implements TBase<getDefaultPincode_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_result>   {
15255
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_result");
15256
 
15257
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
15258
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15259
 
15260
    private String success;
15261
    private UserContextException ucx;
15262
 
15263
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15264
    public enum _Fields implements TFieldIdEnum {
15265
      SUCCESS((short)0, "success"),
15266
      UCX((short)1, "ucx");
15267
 
15268
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15270
 
15271
      static {
15272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15273
          byId.put((int)field._thriftId, field);
15274
          byName.put(field.getFieldName(), field);
15275
        }
15276
      }
15277
 
15278
      /**
15279
       * Find the _Fields constant that matches fieldId, or null if its not found.
15280
       */
15281
      public static _Fields findByThriftId(int fieldId) {
15282
        return byId.get(fieldId);
15283
      }
15284
 
15285
      /**
15286
       * Find the _Fields constant that matches fieldId, throwing an exception
15287
       * if it is not found.
15288
       */
15289
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15290
        _Fields fields = findByThriftId(fieldId);
15291
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15292
        return fields;
15293
      }
15294
 
15295
      /**
15296
       * Find the _Fields constant that matches name, or null if its not found.
15297
       */
15298
      public static _Fields findByName(String name) {
15299
        return byName.get(name);
15300
      }
15301
 
15302
      private final short _thriftId;
15303
      private final String _fieldName;
15304
 
15305
      _Fields(short thriftId, String fieldName) {
15306
        _thriftId = thriftId;
15307
        _fieldName = fieldName;
15308
      }
15309
 
15310
      public short getThriftFieldId() {
15311
        return _thriftId;
15312
      }
15313
 
15314
      public String getFieldName() {
15315
        return _fieldName;
15316
      }
15317
    }
15318
 
15319
    // isset id assignments
15320
 
15321
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15322
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15323
          new FieldValueMetaData(TType.STRING)));
15324
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15325
          new FieldValueMetaData(TType.STRUCT)));
15326
    }});
15327
 
15328
    static {
15329
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_result.class, metaDataMap);
15330
    }
15331
 
15332
    public getDefaultPincode_result() {
15333
    }
15334
 
15335
    public getDefaultPincode_result(
15336
      String success,
15337
      UserContextException ucx)
15338
    {
15339
      this();
15340
      this.success = success;
15341
      this.ucx = ucx;
15342
    }
15343
 
15344
    /**
15345
     * Performs a deep copy on <i>other</i>.
15346
     */
15347
    public getDefaultPincode_result(getDefaultPincode_result other) {
15348
      if (other.isSetSuccess()) {
15349
        this.success = other.success;
15350
      }
15351
      if (other.isSetUcx()) {
15352
        this.ucx = new UserContextException(other.ucx);
15353
      }
15354
    }
15355
 
15356
    public getDefaultPincode_result deepCopy() {
15357
      return new getDefaultPincode_result(this);
15358
    }
15359
 
15360
    @Deprecated
15361
    public getDefaultPincode_result clone() {
15362
      return new getDefaultPincode_result(this);
15363
    }
15364
 
15365
    public String getSuccess() {
15366
      return this.success;
15367
    }
15368
 
15369
    public getDefaultPincode_result setSuccess(String success) {
15370
      this.success = success;
15371
      return this;
15372
    }
15373
 
15374
    public void unsetSuccess() {
15375
      this.success = null;
15376
    }
15377
 
15378
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15379
    public boolean isSetSuccess() {
15380
      return this.success != null;
15381
    }
15382
 
15383
    public void setSuccessIsSet(boolean value) {
15384
      if (!value) {
15385
        this.success = null;
15386
      }
15387
    }
15388
 
15389
    public UserContextException getUcx() {
15390
      return this.ucx;
15391
    }
15392
 
15393
    public getDefaultPincode_result setUcx(UserContextException ucx) {
15394
      this.ucx = ucx;
15395
      return this;
15396
    }
15397
 
15398
    public void unsetUcx() {
15399
      this.ucx = null;
15400
    }
15401
 
15402
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15403
    public boolean isSetUcx() {
15404
      return this.ucx != null;
15405
    }
15406
 
15407
    public void setUcxIsSet(boolean value) {
15408
      if (!value) {
15409
        this.ucx = null;
15410
      }
15411
    }
15412
 
15413
    public void setFieldValue(_Fields field, Object value) {
15414
      switch (field) {
15415
      case SUCCESS:
15416
        if (value == null) {
15417
          unsetSuccess();
15418
        } else {
15419
          setSuccess((String)value);
15420
        }
15421
        break;
15422
 
15423
      case UCX:
15424
        if (value == null) {
15425
          unsetUcx();
15426
        } else {
15427
          setUcx((UserContextException)value);
15428
        }
15429
        break;
15430
 
15431
      }
15432
    }
15433
 
15434
    public void setFieldValue(int fieldID, Object value) {
15435
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15436
    }
15437
 
15438
    public Object getFieldValue(_Fields field) {
15439
      switch (field) {
15440
      case SUCCESS:
15441
        return getSuccess();
15442
 
15443
      case UCX:
15444
        return getUcx();
15445
 
15446
      }
15447
      throw new IllegalStateException();
15448
    }
15449
 
15450
    public Object getFieldValue(int fieldId) {
15451
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15452
    }
15453
 
15454
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15455
    public boolean isSet(_Fields field) {
15456
      switch (field) {
15457
      case SUCCESS:
15458
        return isSetSuccess();
15459
      case UCX:
15460
        return isSetUcx();
15461
      }
15462
      throw new IllegalStateException();
15463
    }
15464
 
15465
    public boolean isSet(int fieldID) {
15466
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15467
    }
15468
 
15469
    @Override
15470
    public boolean equals(Object that) {
15471
      if (that == null)
15472
        return false;
15473
      if (that instanceof getDefaultPincode_result)
15474
        return this.equals((getDefaultPincode_result)that);
15475
      return false;
15476
    }
15477
 
15478
    public boolean equals(getDefaultPincode_result that) {
15479
      if (that == null)
15480
        return false;
15481
 
15482
      boolean this_present_success = true && this.isSetSuccess();
15483
      boolean that_present_success = true && that.isSetSuccess();
15484
      if (this_present_success || that_present_success) {
15485
        if (!(this_present_success && that_present_success))
15486
          return false;
15487
        if (!this.success.equals(that.success))
15488
          return false;
15489
      }
15490
 
15491
      boolean this_present_ucx = true && this.isSetUcx();
15492
      boolean that_present_ucx = true && that.isSetUcx();
15493
      if (this_present_ucx || that_present_ucx) {
15494
        if (!(this_present_ucx && that_present_ucx))
15495
          return false;
15496
        if (!this.ucx.equals(that.ucx))
15497
          return false;
15498
      }
15499
 
15500
      return true;
15501
    }
15502
 
15503
    @Override
15504
    public int hashCode() {
15505
      return 0;
15506
    }
15507
 
15508
    public int compareTo(getDefaultPincode_result other) {
15509
      if (!getClass().equals(other.getClass())) {
15510
        return getClass().getName().compareTo(other.getClass().getName());
15511
      }
15512
 
15513
      int lastComparison = 0;
15514
      getDefaultPincode_result typedOther = (getDefaultPincode_result)other;
15515
 
15516
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15517
      if (lastComparison != 0) {
15518
        return lastComparison;
15519
      }
15520
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15521
      if (lastComparison != 0) {
15522
        return lastComparison;
15523
      }
15524
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15525
      if (lastComparison != 0) {
15526
        return lastComparison;
15527
      }
15528
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15529
      if (lastComparison != 0) {
15530
        return lastComparison;
15531
      }
15532
      return 0;
15533
    }
15534
 
15535
    public void read(TProtocol iprot) throws TException {
15536
      TField field;
15537
      iprot.readStructBegin();
15538
      while (true)
15539
      {
15540
        field = iprot.readFieldBegin();
15541
        if (field.type == TType.STOP) { 
15542
          break;
15543
        }
15544
        _Fields fieldId = _Fields.findByThriftId(field.id);
15545
        if (fieldId == null) {
15546
          TProtocolUtil.skip(iprot, field.type);
15547
        } else {
15548
          switch (fieldId) {
15549
            case SUCCESS:
15550
              if (field.type == TType.STRING) {
15551
                this.success = iprot.readString();
15552
              } else { 
15553
                TProtocolUtil.skip(iprot, field.type);
15554
              }
15555
              break;
15556
            case UCX:
15557
              if (field.type == TType.STRUCT) {
15558
                this.ucx = new UserContextException();
15559
                this.ucx.read(iprot);
15560
              } else { 
15561
                TProtocolUtil.skip(iprot, field.type);
15562
              }
15563
              break;
15564
          }
15565
          iprot.readFieldEnd();
15566
        }
15567
      }
15568
      iprot.readStructEnd();
15569
      validate();
15570
    }
15571
 
15572
    public void write(TProtocol oprot) throws TException {
15573
      oprot.writeStructBegin(STRUCT_DESC);
15574
 
15575
      if (this.isSetSuccess()) {
15576
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15577
        oprot.writeString(this.success);
15578
        oprot.writeFieldEnd();
15579
      } else if (this.isSetUcx()) {
15580
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15581
        this.ucx.write(oprot);
15582
        oprot.writeFieldEnd();
15583
      }
15584
      oprot.writeFieldStop();
15585
      oprot.writeStructEnd();
15586
    }
15587
 
15588
    @Override
15589
    public String toString() {
15590
      StringBuilder sb = new StringBuilder("getDefaultPincode_result(");
15591
      boolean first = true;
15592
 
15593
      sb.append("success:");
15594
      if (this.success == null) {
15595
        sb.append("null");
15596
      } else {
15597
        sb.append(this.success);
15598
      }
15599
      first = false;
15600
      if (!first) sb.append(", ");
15601
      sb.append("ucx:");
15602
      if (this.ucx == null) {
15603
        sb.append("null");
15604
      } else {
15605
        sb.append(this.ucx);
15606
      }
15607
      first = false;
15608
      sb.append(")");
15609
      return sb.toString();
15610
    }
15611
 
15612
    public void validate() throws TException {
15613
      // check for required fields
15614
    }
15615
 
15616
  }
15617
 
553 chandransh 15618
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
15619
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 15620
 
553 chandransh 15621
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 15622
 
553 chandransh 15623
    private long userId;
48 ashish 15624
 
15625
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15626
    public enum _Fields implements TFieldIdEnum {
553 chandransh 15627
      USER_ID((short)1, "userId");
48 ashish 15628
 
15629
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15630
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15631
 
15632
      static {
15633
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15634
          byId.put((int)field._thriftId, field);
15635
          byName.put(field.getFieldName(), field);
15636
        }
15637
      }
15638
 
15639
      /**
15640
       * Find the _Fields constant that matches fieldId, or null if its not found.
15641
       */
15642
      public static _Fields findByThriftId(int fieldId) {
15643
        return byId.get(fieldId);
15644
      }
15645
 
15646
      /**
15647
       * Find the _Fields constant that matches fieldId, throwing an exception
15648
       * if it is not found.
15649
       */
15650
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15651
        _Fields fields = findByThriftId(fieldId);
15652
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15653
        return fields;
15654
      }
15655
 
15656
      /**
15657
       * Find the _Fields constant that matches name, or null if its not found.
15658
       */
15659
      public static _Fields findByName(String name) {
15660
        return byName.get(name);
15661
      }
15662
 
15663
      private final short _thriftId;
15664
      private final String _fieldName;
15665
 
15666
      _Fields(short thriftId, String fieldName) {
15667
        _thriftId = thriftId;
15668
        _fieldName = fieldName;
15669
      }
15670
 
15671
      public short getThriftFieldId() {
15672
        return _thriftId;
15673
      }
15674
 
15675
      public String getFieldName() {
15676
        return _fieldName;
15677
      }
15678
    }
15679
 
15680
    // isset id assignments
15681
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 15682
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 15683
 
15684
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15685
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 15686
          new FieldValueMetaData(TType.I64)));
15687
    }});
15688
 
15689
    static {
553 chandransh 15690
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 15691
    }
15692
 
553 chandransh 15693
    public createCart_args() {
48 ashish 15694
    }
15695
 
553 chandransh 15696
    public createCart_args(
15697
      long userId)
48 ashish 15698
    {
15699
      this();
553 chandransh 15700
      this.userId = userId;
15701
      setUserIdIsSet(true);
48 ashish 15702
    }
15703
 
15704
    /**
15705
     * Performs a deep copy on <i>other</i>.
15706
     */
553 chandransh 15707
    public createCart_args(createCart_args other) {
48 ashish 15708
      __isset_bit_vector.clear();
15709
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15710
      this.userId = other.userId;
48 ashish 15711
    }
15712
 
553 chandransh 15713
    public createCart_args deepCopy() {
15714
      return new createCart_args(this);
48 ashish 15715
    }
15716
 
15717
    @Deprecated
553 chandransh 15718
    public createCart_args clone() {
15719
      return new createCart_args(this);
48 ashish 15720
    }
15721
 
553 chandransh 15722
    public long getUserId() {
15723
      return this.userId;
48 ashish 15724
    }
15725
 
553 chandransh 15726
    public createCart_args setUserId(long userId) {
15727
      this.userId = userId;
15728
      setUserIdIsSet(true);
48 ashish 15729
      return this;
15730
    }
15731
 
553 chandransh 15732
    public void unsetUserId() {
48 ashish 15733
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15734
    }
15735
 
553 chandransh 15736
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15737
    public boolean isSetUserId() {
48 ashish 15738
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15739
    }
15740
 
553 chandransh 15741
    public void setUserIdIsSet(boolean value) {
48 ashish 15742
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15743
    }
15744
 
15745
    public void setFieldValue(_Fields field, Object value) {
15746
      switch (field) {
553 chandransh 15747
      case USER_ID:
48 ashish 15748
        if (value == null) {
553 chandransh 15749
          unsetUserId();
48 ashish 15750
        } else {
553 chandransh 15751
          setUserId((Long)value);
48 ashish 15752
        }
15753
        break;
15754
 
15755
      }
15756
    }
15757
 
15758
    public void setFieldValue(int fieldID, Object value) {
15759
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15760
    }
15761
 
15762
    public Object getFieldValue(_Fields field) {
15763
      switch (field) {
553 chandransh 15764
      case USER_ID:
15765
        return new Long(getUserId());
48 ashish 15766
 
15767
      }
15768
      throw new IllegalStateException();
15769
    }
15770
 
15771
    public Object getFieldValue(int fieldId) {
15772
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15773
    }
15774
 
15775
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15776
    public boolean isSet(_Fields field) {
15777
      switch (field) {
553 chandransh 15778
      case USER_ID:
15779
        return isSetUserId();
48 ashish 15780
      }
15781
      throw new IllegalStateException();
15782
    }
15783
 
15784
    public boolean isSet(int fieldID) {
15785
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15786
    }
15787
 
15788
    @Override
15789
    public boolean equals(Object that) {
15790
      if (that == null)
15791
        return false;
553 chandransh 15792
      if (that instanceof createCart_args)
15793
        return this.equals((createCart_args)that);
48 ashish 15794
      return false;
15795
    }
15796
 
553 chandransh 15797
    public boolean equals(createCart_args that) {
48 ashish 15798
      if (that == null)
15799
        return false;
15800
 
553 chandransh 15801
      boolean this_present_userId = true;
15802
      boolean that_present_userId = true;
15803
      if (this_present_userId || that_present_userId) {
15804
        if (!(this_present_userId && that_present_userId))
48 ashish 15805
          return false;
553 chandransh 15806
        if (this.userId != that.userId)
48 ashish 15807
          return false;
15808
      }
15809
 
15810
      return true;
15811
    }
15812
 
15813
    @Override
15814
    public int hashCode() {
15815
      return 0;
15816
    }
15817
 
553 chandransh 15818
    public int compareTo(createCart_args other) {
48 ashish 15819
      if (!getClass().equals(other.getClass())) {
15820
        return getClass().getName().compareTo(other.getClass().getName());
15821
      }
15822
 
15823
      int lastComparison = 0;
553 chandransh 15824
      createCart_args typedOther = (createCart_args)other;
48 ashish 15825
 
553 chandransh 15826
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 15827
      if (lastComparison != 0) {
15828
        return lastComparison;
15829
      }
553 chandransh 15830
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 15831
      if (lastComparison != 0) {
15832
        return lastComparison;
15833
      }
15834
      return 0;
15835
    }
15836
 
15837
    public void read(TProtocol iprot) throws TException {
15838
      TField field;
15839
      iprot.readStructBegin();
15840
      while (true)
15841
      {
15842
        field = iprot.readFieldBegin();
15843
        if (field.type == TType.STOP) { 
15844
          break;
15845
        }
15846
        _Fields fieldId = _Fields.findByThriftId(field.id);
15847
        if (fieldId == null) {
15848
          TProtocolUtil.skip(iprot, field.type);
15849
        } else {
15850
          switch (fieldId) {
553 chandransh 15851
            case USER_ID:
48 ashish 15852
              if (field.type == TType.I64) {
553 chandransh 15853
                this.userId = iprot.readI64();
15854
                setUserIdIsSet(true);
48 ashish 15855
              } else { 
15856
                TProtocolUtil.skip(iprot, field.type);
15857
              }
15858
              break;
15859
          }
15860
          iprot.readFieldEnd();
15861
        }
15862
      }
15863
      iprot.readStructEnd();
15864
      validate();
15865
    }
15866
 
15867
    public void write(TProtocol oprot) throws TException {
15868
      validate();
15869
 
15870
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 15871
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15872
      oprot.writeI64(this.userId);
48 ashish 15873
      oprot.writeFieldEnd();
15874
      oprot.writeFieldStop();
15875
      oprot.writeStructEnd();
15876
    }
15877
 
15878
    @Override
15879
    public String toString() {
553 chandransh 15880
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 15881
      boolean first = true;
15882
 
553 chandransh 15883
      sb.append("userId:");
15884
      sb.append(this.userId);
48 ashish 15885
      first = false;
15886
      sb.append(")");
15887
      return sb.toString();
15888
    }
15889
 
15890
    public void validate() throws TException {
15891
      // check for required fields
15892
    }
15893
 
15894
  }
15895
 
553 chandransh 15896
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
15897
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 15898
 
553 chandransh 15899
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15900
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 15901
 
553 chandransh 15902
    private long success;
15903
    private ShoppingCartException scx;
48 ashish 15904
 
15905
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15906
    public enum _Fields implements TFieldIdEnum {
15907
      SUCCESS((short)0, "success"),
553 chandransh 15908
      SCX((short)1, "scx");
48 ashish 15909
 
15910
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15912
 
15913
      static {
15914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15915
          byId.put((int)field._thriftId, field);
15916
          byName.put(field.getFieldName(), field);
15917
        }
15918
      }
15919
 
15920
      /**
15921
       * Find the _Fields constant that matches fieldId, or null if its not found.
15922
       */
15923
      public static _Fields findByThriftId(int fieldId) {
15924
        return byId.get(fieldId);
15925
      }
15926
 
15927
      /**
15928
       * Find the _Fields constant that matches fieldId, throwing an exception
15929
       * if it is not found.
15930
       */
15931
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15932
        _Fields fields = findByThriftId(fieldId);
15933
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15934
        return fields;
15935
      }
15936
 
15937
      /**
15938
       * Find the _Fields constant that matches name, or null if its not found.
15939
       */
15940
      public static _Fields findByName(String name) {
15941
        return byName.get(name);
15942
      }
15943
 
15944
      private final short _thriftId;
15945
      private final String _fieldName;
15946
 
15947
      _Fields(short thriftId, String fieldName) {
15948
        _thriftId = thriftId;
15949
        _fieldName = fieldName;
15950
      }
15951
 
15952
      public short getThriftFieldId() {
15953
        return _thriftId;
15954
      }
15955
 
15956
      public String getFieldName() {
15957
        return _fieldName;
15958
      }
15959
    }
15960
 
15961
    // isset id assignments
15962
    private static final int __SUCCESS_ISSET_ID = 0;
15963
    private BitSet __isset_bit_vector = new BitSet(1);
15964
 
15965
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15966
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 15967
          new FieldValueMetaData(TType.I64)));
15968
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 15969
          new FieldValueMetaData(TType.STRUCT)));
15970
    }});
15971
 
15972
    static {
553 chandransh 15973
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 15974
    }
15975
 
553 chandransh 15976
    public createCart_result() {
48 ashish 15977
    }
15978
 
553 chandransh 15979
    public createCart_result(
15980
      long success,
15981
      ShoppingCartException scx)
48 ashish 15982
    {
15983
      this();
15984
      this.success = success;
15985
      setSuccessIsSet(true);
553 chandransh 15986
      this.scx = scx;
48 ashish 15987
    }
15988
 
15989
    /**
15990
     * Performs a deep copy on <i>other</i>.
15991
     */
553 chandransh 15992
    public createCart_result(createCart_result other) {
48 ashish 15993
      __isset_bit_vector.clear();
15994
      __isset_bit_vector.or(other.__isset_bit_vector);
15995
      this.success = other.success;
553 chandransh 15996
      if (other.isSetScx()) {
15997
        this.scx = new ShoppingCartException(other.scx);
48 ashish 15998
      }
15999
    }
16000
 
553 chandransh 16001
    public createCart_result deepCopy() {
16002
      return new createCart_result(this);
48 ashish 16003
    }
16004
 
16005
    @Deprecated
553 chandransh 16006
    public createCart_result clone() {
16007
      return new createCart_result(this);
48 ashish 16008
    }
16009
 
553 chandransh 16010
    public long getSuccess() {
48 ashish 16011
      return this.success;
16012
    }
16013
 
553 chandransh 16014
    public createCart_result setSuccess(long success) {
48 ashish 16015
      this.success = success;
16016
      setSuccessIsSet(true);
16017
      return this;
16018
    }
16019
 
16020
    public void unsetSuccess() {
16021
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16022
    }
16023
 
16024
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16025
    public boolean isSetSuccess() {
16026
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16027
    }
16028
 
16029
    public void setSuccessIsSet(boolean value) {
16030
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16031
    }
16032
 
553 chandransh 16033
    public ShoppingCartException getScx() {
16034
      return this.scx;
48 ashish 16035
    }
16036
 
553 chandransh 16037
    public createCart_result setScx(ShoppingCartException scx) {
16038
      this.scx = scx;
48 ashish 16039
      return this;
16040
    }
16041
 
553 chandransh 16042
    public void unsetScx() {
16043
      this.scx = null;
48 ashish 16044
    }
16045
 
553 chandransh 16046
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16047
    public boolean isSetScx() {
16048
      return this.scx != null;
48 ashish 16049
    }
16050
 
553 chandransh 16051
    public void setScxIsSet(boolean value) {
48 ashish 16052
      if (!value) {
553 chandransh 16053
        this.scx = null;
48 ashish 16054
      }
16055
    }
16056
 
16057
    public void setFieldValue(_Fields field, Object value) {
16058
      switch (field) {
16059
      case SUCCESS:
16060
        if (value == null) {
16061
          unsetSuccess();
16062
        } else {
553 chandransh 16063
          setSuccess((Long)value);
48 ashish 16064
        }
16065
        break;
16066
 
553 chandransh 16067
      case SCX:
48 ashish 16068
        if (value == null) {
553 chandransh 16069
          unsetScx();
48 ashish 16070
        } else {
553 chandransh 16071
          setScx((ShoppingCartException)value);
48 ashish 16072
        }
16073
        break;
16074
 
16075
      }
16076
    }
16077
 
16078
    public void setFieldValue(int fieldID, Object value) {
16079
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16080
    }
16081
 
16082
    public Object getFieldValue(_Fields field) {
16083
      switch (field) {
16084
      case SUCCESS:
553 chandransh 16085
        return new Long(getSuccess());
48 ashish 16086
 
553 chandransh 16087
      case SCX:
16088
        return getScx();
48 ashish 16089
 
16090
      }
16091
      throw new IllegalStateException();
16092
    }
16093
 
16094
    public Object getFieldValue(int fieldId) {
16095
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16096
    }
16097
 
16098
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16099
    public boolean isSet(_Fields field) {
16100
      switch (field) {
16101
      case SUCCESS:
16102
        return isSetSuccess();
553 chandransh 16103
      case SCX:
16104
        return isSetScx();
48 ashish 16105
      }
16106
      throw new IllegalStateException();
16107
    }
16108
 
16109
    public boolean isSet(int fieldID) {
16110
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16111
    }
16112
 
16113
    @Override
16114
    public boolean equals(Object that) {
16115
      if (that == null)
16116
        return false;
553 chandransh 16117
      if (that instanceof createCart_result)
16118
        return this.equals((createCart_result)that);
48 ashish 16119
      return false;
16120
    }
16121
 
553 chandransh 16122
    public boolean equals(createCart_result that) {
48 ashish 16123
      if (that == null)
16124
        return false;
16125
 
16126
      boolean this_present_success = true;
16127
      boolean that_present_success = true;
16128
      if (this_present_success || that_present_success) {
16129
        if (!(this_present_success && that_present_success))
16130
          return false;
16131
        if (this.success != that.success)
16132
          return false;
16133
      }
16134
 
553 chandransh 16135
      boolean this_present_scx = true && this.isSetScx();
16136
      boolean that_present_scx = true && that.isSetScx();
16137
      if (this_present_scx || that_present_scx) {
16138
        if (!(this_present_scx && that_present_scx))
48 ashish 16139
          return false;
553 chandransh 16140
        if (!this.scx.equals(that.scx))
48 ashish 16141
          return false;
16142
      }
16143
 
16144
      return true;
16145
    }
16146
 
16147
    @Override
16148
    public int hashCode() {
16149
      return 0;
16150
    }
16151
 
553 chandransh 16152
    public int compareTo(createCart_result other) {
48 ashish 16153
      if (!getClass().equals(other.getClass())) {
16154
        return getClass().getName().compareTo(other.getClass().getName());
16155
      }
16156
 
16157
      int lastComparison = 0;
553 chandransh 16158
      createCart_result typedOther = (createCart_result)other;
48 ashish 16159
 
16160
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16161
      if (lastComparison != 0) {
16162
        return lastComparison;
16163
      }
16164
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16165
      if (lastComparison != 0) {
16166
        return lastComparison;
16167
      }
553 chandransh 16168
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 16169
      if (lastComparison != 0) {
16170
        return lastComparison;
16171
      }
553 chandransh 16172
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 16173
      if (lastComparison != 0) {
16174
        return lastComparison;
16175
      }
16176
      return 0;
16177
    }
16178
 
16179
    public void read(TProtocol iprot) throws TException {
16180
      TField field;
16181
      iprot.readStructBegin();
16182
      while (true)
16183
      {
16184
        field = iprot.readFieldBegin();
16185
        if (field.type == TType.STOP) { 
16186
          break;
16187
        }
16188
        _Fields fieldId = _Fields.findByThriftId(field.id);
16189
        if (fieldId == null) {
16190
          TProtocolUtil.skip(iprot, field.type);
16191
        } else {
16192
          switch (fieldId) {
16193
            case SUCCESS:
553 chandransh 16194
              if (field.type == TType.I64) {
16195
                this.success = iprot.readI64();
48 ashish 16196
                setSuccessIsSet(true);
16197
              } else { 
16198
                TProtocolUtil.skip(iprot, field.type);
16199
              }
16200
              break;
553 chandransh 16201
            case SCX:
48 ashish 16202
              if (field.type == TType.STRUCT) {
553 chandransh 16203
                this.scx = new ShoppingCartException();
16204
                this.scx.read(iprot);
48 ashish 16205
              } else { 
16206
                TProtocolUtil.skip(iprot, field.type);
16207
              }
16208
              break;
16209
          }
16210
          iprot.readFieldEnd();
16211
        }
16212
      }
16213
      iprot.readStructEnd();
16214
      validate();
16215
    }
16216
 
16217
    public void write(TProtocol oprot) throws TException {
16218
      oprot.writeStructBegin(STRUCT_DESC);
16219
 
16220
      if (this.isSetSuccess()) {
16221
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 16222
        oprot.writeI64(this.success);
48 ashish 16223
        oprot.writeFieldEnd();
553 chandransh 16224
      } else if (this.isSetScx()) {
16225
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16226
        this.scx.write(oprot);
48 ashish 16227
        oprot.writeFieldEnd();
16228
      }
16229
      oprot.writeFieldStop();
16230
      oprot.writeStructEnd();
16231
    }
16232
 
16233
    @Override
16234
    public String toString() {
553 chandransh 16235
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 16236
      boolean first = true;
16237
 
16238
      sb.append("success:");
16239
      sb.append(this.success);
16240
      first = false;
16241
      if (!first) sb.append(", ");
553 chandransh 16242
      sb.append("scx:");
16243
      if (this.scx == null) {
48 ashish 16244
        sb.append("null");
16245
      } else {
553 chandransh 16246
        sb.append(this.scx);
48 ashish 16247
      }
16248
      first = false;
16249
      sb.append(")");
16250
      return sb.toString();
16251
    }
16252
 
16253
    public void validate() throws TException {
16254
      // check for required fields
16255
    }
16256
 
16257
  }
16258
 
553 chandransh 16259
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
16260
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 16261
 
553 chandransh 16262
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 16263
 
553 chandransh 16264
    private long userId;
506 rajveer 16265
 
16266
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16267
    public enum _Fields implements TFieldIdEnum {
553 chandransh 16268
      USER_ID((short)1, "userId");
506 rajveer 16269
 
16270
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16271
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16272
 
16273
      static {
16274
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16275
          byId.put((int)field._thriftId, field);
16276
          byName.put(field.getFieldName(), field);
16277
        }
16278
      }
16279
 
16280
      /**
16281
       * Find the _Fields constant that matches fieldId, or null if its not found.
16282
       */
16283
      public static _Fields findByThriftId(int fieldId) {
16284
        return byId.get(fieldId);
16285
      }
16286
 
16287
      /**
16288
       * Find the _Fields constant that matches fieldId, throwing an exception
16289
       * if it is not found.
16290
       */
16291
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16292
        _Fields fields = findByThriftId(fieldId);
16293
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16294
        return fields;
16295
      }
16296
 
16297
      /**
16298
       * Find the _Fields constant that matches name, or null if its not found.
16299
       */
16300
      public static _Fields findByName(String name) {
16301
        return byName.get(name);
16302
      }
16303
 
16304
      private final short _thriftId;
16305
      private final String _fieldName;
16306
 
16307
      _Fields(short thriftId, String fieldName) {
16308
        _thriftId = thriftId;
16309
        _fieldName = fieldName;
16310
      }
16311
 
16312
      public short getThriftFieldId() {
16313
        return _thriftId;
16314
      }
16315
 
16316
      public String getFieldName() {
16317
        return _fieldName;
16318
      }
16319
    }
16320
 
16321
    // isset id assignments
16322
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 16323
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 16324
 
16325
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 16326
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 16327
          new FieldValueMetaData(TType.I64)));
16328
    }});
16329
 
16330
    static {
553 chandransh 16331
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 16332
    }
16333
 
553 chandransh 16334
    public getCurrentCart_args() {
506 rajveer 16335
    }
16336
 
553 chandransh 16337
    public getCurrentCart_args(
16338
      long userId)
506 rajveer 16339
    {
16340
      this();
553 chandransh 16341
      this.userId = userId;
16342
      setUserIdIsSet(true);
506 rajveer 16343
    }
16344
 
16345
    /**
16346
     * Performs a deep copy on <i>other</i>.
16347
     */
553 chandransh 16348
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 16349
      __isset_bit_vector.clear();
16350
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16351
      this.userId = other.userId;
506 rajveer 16352
    }
16353
 
553 chandransh 16354
    public getCurrentCart_args deepCopy() {
16355
      return new getCurrentCart_args(this);
506 rajveer 16356
    }
16357
 
16358
    @Deprecated
553 chandransh 16359
    public getCurrentCart_args clone() {
16360
      return new getCurrentCart_args(this);
506 rajveer 16361
    }
16362
 
553 chandransh 16363
    public long getUserId() {
16364
      return this.userId;
506 rajveer 16365
    }
16366
 
553 chandransh 16367
    public getCurrentCart_args setUserId(long userId) {
16368
      this.userId = userId;
16369
      setUserIdIsSet(true);
506 rajveer 16370
      return this;
16371
    }
16372
 
553 chandransh 16373
    public void unsetUserId() {
506 rajveer 16374
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16375
    }
16376
 
553 chandransh 16377
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16378
    public boolean isSetUserId() {
506 rajveer 16379
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16380
    }
16381
 
553 chandransh 16382
    public void setUserIdIsSet(boolean value) {
506 rajveer 16383
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16384
    }
16385
 
553 chandransh 16386
    public void setFieldValue(_Fields field, Object value) {
16387
      switch (field) {
16388
      case USER_ID:
16389
        if (value == null) {
16390
          unsetUserId();
16391
        } else {
16392
          setUserId((Long)value);
16393
        }
16394
        break;
16395
 
16396
      }
506 rajveer 16397
    }
16398
 
553 chandransh 16399
    public void setFieldValue(int fieldID, Object value) {
16400
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16401
    }
16402
 
16403
    public Object getFieldValue(_Fields field) {
16404
      switch (field) {
16405
      case USER_ID:
16406
        return new Long(getUserId());
16407
 
16408
      }
16409
      throw new IllegalStateException();
16410
    }
16411
 
16412
    public Object getFieldValue(int fieldId) {
16413
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16414
    }
16415
 
16416
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16417
    public boolean isSet(_Fields field) {
16418
      switch (field) {
16419
      case USER_ID:
16420
        return isSetUserId();
16421
      }
16422
      throw new IllegalStateException();
16423
    }
16424
 
16425
    public boolean isSet(int fieldID) {
16426
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16427
    }
16428
 
16429
    @Override
16430
    public boolean equals(Object that) {
16431
      if (that == null)
16432
        return false;
16433
      if (that instanceof getCurrentCart_args)
16434
        return this.equals((getCurrentCart_args)that);
16435
      return false;
16436
    }
16437
 
16438
    public boolean equals(getCurrentCart_args that) {
16439
      if (that == null)
16440
        return false;
16441
 
16442
      boolean this_present_userId = true;
16443
      boolean that_present_userId = true;
16444
      if (this_present_userId || that_present_userId) {
16445
        if (!(this_present_userId && that_present_userId))
16446
          return false;
16447
        if (this.userId != that.userId)
16448
          return false;
16449
      }
16450
 
16451
      return true;
16452
    }
16453
 
16454
    @Override
16455
    public int hashCode() {
16456
      return 0;
16457
    }
16458
 
16459
    public int compareTo(getCurrentCart_args other) {
16460
      if (!getClass().equals(other.getClass())) {
16461
        return getClass().getName().compareTo(other.getClass().getName());
16462
      }
16463
 
16464
      int lastComparison = 0;
16465
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
16466
 
16467
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
16468
      if (lastComparison != 0) {
16469
        return lastComparison;
16470
      }
16471
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
16472
      if (lastComparison != 0) {
16473
        return lastComparison;
16474
      }
16475
      return 0;
16476
    }
16477
 
16478
    public void read(TProtocol iprot) throws TException {
16479
      TField field;
16480
      iprot.readStructBegin();
16481
      while (true)
16482
      {
16483
        field = iprot.readFieldBegin();
16484
        if (field.type == TType.STOP) { 
16485
          break;
16486
        }
16487
        _Fields fieldId = _Fields.findByThriftId(field.id);
16488
        if (fieldId == null) {
16489
          TProtocolUtil.skip(iprot, field.type);
16490
        } else {
16491
          switch (fieldId) {
16492
            case USER_ID:
16493
              if (field.type == TType.I64) {
16494
                this.userId = iprot.readI64();
16495
                setUserIdIsSet(true);
16496
              } else { 
16497
                TProtocolUtil.skip(iprot, field.type);
16498
              }
16499
              break;
16500
          }
16501
          iprot.readFieldEnd();
16502
        }
16503
      }
16504
      iprot.readStructEnd();
16505
      validate();
16506
    }
16507
 
16508
    public void write(TProtocol oprot) throws TException {
16509
      validate();
16510
 
16511
      oprot.writeStructBegin(STRUCT_DESC);
16512
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
16513
      oprot.writeI64(this.userId);
16514
      oprot.writeFieldEnd();
16515
      oprot.writeFieldStop();
16516
      oprot.writeStructEnd();
16517
    }
16518
 
16519
    @Override
16520
    public String toString() {
16521
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
16522
      boolean first = true;
16523
 
16524
      sb.append("userId:");
16525
      sb.append(this.userId);
16526
      first = false;
16527
      sb.append(")");
16528
      return sb.toString();
16529
    }
16530
 
16531
    public void validate() throws TException {
16532
      // check for required fields
16533
    }
16534
 
16535
  }
16536
 
16537
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
16538
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
16539
 
16540
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
16541
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
16542
 
16543
    private Cart success;
16544
    private ShoppingCartException scx;
16545
 
16546
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16547
    public enum _Fields implements TFieldIdEnum {
16548
      SUCCESS((short)0, "success"),
16549
      SCX((short)1, "scx");
16550
 
16551
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16552
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16553
 
16554
      static {
16555
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16556
          byId.put((int)field._thriftId, field);
16557
          byName.put(field.getFieldName(), field);
16558
        }
16559
      }
16560
 
16561
      /**
16562
       * Find the _Fields constant that matches fieldId, or null if its not found.
16563
       */
16564
      public static _Fields findByThriftId(int fieldId) {
16565
        return byId.get(fieldId);
16566
      }
16567
 
16568
      /**
16569
       * Find the _Fields constant that matches fieldId, throwing an exception
16570
       * if it is not found.
16571
       */
16572
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16573
        _Fields fields = findByThriftId(fieldId);
16574
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16575
        return fields;
16576
      }
16577
 
16578
      /**
16579
       * Find the _Fields constant that matches name, or null if its not found.
16580
       */
16581
      public static _Fields findByName(String name) {
16582
        return byName.get(name);
16583
      }
16584
 
16585
      private final short _thriftId;
16586
      private final String _fieldName;
16587
 
16588
      _Fields(short thriftId, String fieldName) {
16589
        _thriftId = thriftId;
16590
        _fieldName = fieldName;
16591
      }
16592
 
16593
      public short getThriftFieldId() {
16594
        return _thriftId;
16595
      }
16596
 
16597
      public String getFieldName() {
16598
        return _fieldName;
16599
      }
16600
    }
16601
 
16602
    // isset id assignments
16603
 
16604
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16605
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16606
          new StructMetaData(TType.STRUCT, Cart.class)));
16607
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
16608
          new FieldValueMetaData(TType.STRUCT)));
16609
    }});
16610
 
16611
    static {
16612
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
16613
    }
16614
 
16615
    public getCurrentCart_result() {
16616
    }
16617
 
16618
    public getCurrentCart_result(
16619
      Cart success,
16620
      ShoppingCartException scx)
16621
    {
16622
      this();
16623
      this.success = success;
16624
      this.scx = scx;
16625
    }
16626
 
16627
    /**
16628
     * Performs a deep copy on <i>other</i>.
16629
     */
16630
    public getCurrentCart_result(getCurrentCart_result other) {
16631
      if (other.isSetSuccess()) {
16632
        this.success = new Cart(other.success);
16633
      }
16634
      if (other.isSetScx()) {
16635
        this.scx = new ShoppingCartException(other.scx);
16636
      }
16637
    }
16638
 
16639
    public getCurrentCart_result deepCopy() {
16640
      return new getCurrentCart_result(this);
16641
    }
16642
 
16643
    @Deprecated
16644
    public getCurrentCart_result clone() {
16645
      return new getCurrentCart_result(this);
16646
    }
16647
 
16648
    public Cart getSuccess() {
16649
      return this.success;
16650
    }
16651
 
16652
    public getCurrentCart_result setSuccess(Cart success) {
16653
      this.success = success;
506 rajveer 16654
      return this;
16655
    }
16656
 
553 chandransh 16657
    public void unsetSuccess() {
16658
      this.success = null;
506 rajveer 16659
    }
16660
 
553 chandransh 16661
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16662
    public boolean isSetSuccess() {
16663
      return this.success != null;
506 rajveer 16664
    }
16665
 
553 chandransh 16666
    public void setSuccessIsSet(boolean value) {
16667
      if (!value) {
16668
        this.success = null;
16669
      }
506 rajveer 16670
    }
16671
 
553 chandransh 16672
    public ShoppingCartException getScx() {
16673
      return this.scx;
16674
    }
16675
 
16676
    public getCurrentCart_result setScx(ShoppingCartException scx) {
16677
      this.scx = scx;
16678
      return this;
16679
    }
16680
 
16681
    public void unsetScx() {
16682
      this.scx = null;
16683
    }
16684
 
16685
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16686
    public boolean isSetScx() {
16687
      return this.scx != null;
16688
    }
16689
 
16690
    public void setScxIsSet(boolean value) {
16691
      if (!value) {
16692
        this.scx = null;
16693
      }
16694
    }
16695
 
506 rajveer 16696
    public void setFieldValue(_Fields field, Object value) {
16697
      switch (field) {
553 chandransh 16698
      case SUCCESS:
506 rajveer 16699
        if (value == null) {
553 chandransh 16700
          unsetSuccess();
506 rajveer 16701
        } else {
553 chandransh 16702
          setSuccess((Cart)value);
506 rajveer 16703
        }
16704
        break;
16705
 
553 chandransh 16706
      case SCX:
506 rajveer 16707
        if (value == null) {
553 chandransh 16708
          unsetScx();
506 rajveer 16709
        } else {
553 chandransh 16710
          setScx((ShoppingCartException)value);
506 rajveer 16711
        }
16712
        break;
16713
 
16714
      }
16715
    }
16716
 
16717
    public void setFieldValue(int fieldID, Object value) {
16718
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16719
    }
16720
 
16721
    public Object getFieldValue(_Fields field) {
16722
      switch (field) {
553 chandransh 16723
      case SUCCESS:
16724
        return getSuccess();
506 rajveer 16725
 
553 chandransh 16726
      case SCX:
16727
        return getScx();
506 rajveer 16728
 
16729
      }
16730
      throw new IllegalStateException();
16731
    }
16732
 
16733
    public Object getFieldValue(int fieldId) {
16734
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16735
    }
16736
 
16737
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16738
    public boolean isSet(_Fields field) {
16739
      switch (field) {
553 chandransh 16740
      case SUCCESS:
16741
        return isSetSuccess();
16742
      case SCX:
16743
        return isSetScx();
506 rajveer 16744
      }
16745
      throw new IllegalStateException();
16746
    }
16747
 
16748
    public boolean isSet(int fieldID) {
16749
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16750
    }
16751
 
16752
    @Override
16753
    public boolean equals(Object that) {
16754
      if (that == null)
16755
        return false;
553 chandransh 16756
      if (that instanceof getCurrentCart_result)
16757
        return this.equals((getCurrentCart_result)that);
506 rajveer 16758
      return false;
16759
    }
16760
 
553 chandransh 16761
    public boolean equals(getCurrentCart_result that) {
506 rajveer 16762
      if (that == null)
16763
        return false;
16764
 
553 chandransh 16765
      boolean this_present_success = true && this.isSetSuccess();
16766
      boolean that_present_success = true && that.isSetSuccess();
16767
      if (this_present_success || that_present_success) {
16768
        if (!(this_present_success && that_present_success))
506 rajveer 16769
          return false;
553 chandransh 16770
        if (!this.success.equals(that.success))
506 rajveer 16771
          return false;
16772
      }
16773
 
553 chandransh 16774
      boolean this_present_scx = true && this.isSetScx();
16775
      boolean that_present_scx = true && that.isSetScx();
16776
      if (this_present_scx || that_present_scx) {
16777
        if (!(this_present_scx && that_present_scx))
506 rajveer 16778
          return false;
553 chandransh 16779
        if (!this.scx.equals(that.scx))
506 rajveer 16780
          return false;
16781
      }
16782
 
16783
      return true;
16784
    }
16785
 
16786
    @Override
16787
    public int hashCode() {
16788
      return 0;
16789
    }
16790
 
553 chandransh 16791
    public int compareTo(getCurrentCart_result other) {
506 rajveer 16792
      if (!getClass().equals(other.getClass())) {
16793
        return getClass().getName().compareTo(other.getClass().getName());
16794
      }
16795
 
16796
      int lastComparison = 0;
553 chandransh 16797
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 16798
 
553 chandransh 16799
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 16800
      if (lastComparison != 0) {
16801
        return lastComparison;
16802
      }
553 chandransh 16803
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 16804
      if (lastComparison != 0) {
16805
        return lastComparison;
16806
      }
553 chandransh 16807
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 16808
      if (lastComparison != 0) {
16809
        return lastComparison;
16810
      }
553 chandransh 16811
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 16812
      if (lastComparison != 0) {
16813
        return lastComparison;
16814
      }
16815
      return 0;
16816
    }
16817
 
16818
    public void read(TProtocol iprot) throws TException {
16819
      TField field;
16820
      iprot.readStructBegin();
16821
      while (true)
16822
      {
16823
        field = iprot.readFieldBegin();
16824
        if (field.type == TType.STOP) { 
16825
          break;
16826
        }
16827
        _Fields fieldId = _Fields.findByThriftId(field.id);
16828
        if (fieldId == null) {
16829
          TProtocolUtil.skip(iprot, field.type);
16830
        } else {
16831
          switch (fieldId) {
553 chandransh 16832
            case SUCCESS:
16833
              if (field.type == TType.STRUCT) {
16834
                this.success = new Cart();
16835
                this.success.read(iprot);
506 rajveer 16836
              } else { 
16837
                TProtocolUtil.skip(iprot, field.type);
16838
              }
16839
              break;
553 chandransh 16840
            case SCX:
16841
              if (field.type == TType.STRUCT) {
16842
                this.scx = new ShoppingCartException();
16843
                this.scx.read(iprot);
16844
              } else { 
16845
                TProtocolUtil.skip(iprot, field.type);
16846
              }
16847
              break;
16848
          }
16849
          iprot.readFieldEnd();
16850
        }
16851
      }
16852
      iprot.readStructEnd();
16853
      validate();
16854
    }
16855
 
16856
    public void write(TProtocol oprot) throws TException {
16857
      oprot.writeStructBegin(STRUCT_DESC);
16858
 
16859
      if (this.isSetSuccess()) {
16860
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16861
        this.success.write(oprot);
16862
        oprot.writeFieldEnd();
16863
      } else if (this.isSetScx()) {
16864
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16865
        this.scx.write(oprot);
16866
        oprot.writeFieldEnd();
16867
      }
16868
      oprot.writeFieldStop();
16869
      oprot.writeStructEnd();
16870
    }
16871
 
16872
    @Override
16873
    public String toString() {
16874
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
16875
      boolean first = true;
16876
 
16877
      sb.append("success:");
16878
      if (this.success == null) {
16879
        sb.append("null");
16880
      } else {
16881
        sb.append(this.success);
16882
      }
16883
      first = false;
16884
      if (!first) sb.append(", ");
16885
      sb.append("scx:");
16886
      if (this.scx == null) {
16887
        sb.append("null");
16888
      } else {
16889
        sb.append(this.scx);
16890
      }
16891
      first = false;
16892
      sb.append(")");
16893
      return sb.toString();
16894
    }
16895
 
16896
    public void validate() throws TException {
16897
      // check for required fields
16898
    }
16899
 
16900
  }
16901
 
16902
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
16903
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
16904
 
16905
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
16906
 
16907
    private long cartId;
16908
 
16909
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16910
    public enum _Fields implements TFieldIdEnum {
16911
      CART_ID((short)1, "cartId");
16912
 
16913
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16914
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16915
 
16916
      static {
16917
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16918
          byId.put((int)field._thriftId, field);
16919
          byName.put(field.getFieldName(), field);
16920
        }
16921
      }
16922
 
16923
      /**
16924
       * Find the _Fields constant that matches fieldId, or null if its not found.
16925
       */
16926
      public static _Fields findByThriftId(int fieldId) {
16927
        return byId.get(fieldId);
16928
      }
16929
 
16930
      /**
16931
       * Find the _Fields constant that matches fieldId, throwing an exception
16932
       * if it is not found.
16933
       */
16934
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16935
        _Fields fields = findByThriftId(fieldId);
16936
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16937
        return fields;
16938
      }
16939
 
16940
      /**
16941
       * Find the _Fields constant that matches name, or null if its not found.
16942
       */
16943
      public static _Fields findByName(String name) {
16944
        return byName.get(name);
16945
      }
16946
 
16947
      private final short _thriftId;
16948
      private final String _fieldName;
16949
 
16950
      _Fields(short thriftId, String fieldName) {
16951
        _thriftId = thriftId;
16952
        _fieldName = fieldName;
16953
      }
16954
 
16955
      public short getThriftFieldId() {
16956
        return _thriftId;
16957
      }
16958
 
16959
      public String getFieldName() {
16960
        return _fieldName;
16961
      }
16962
    }
16963
 
16964
    // isset id assignments
16965
    private static final int __CARTID_ISSET_ID = 0;
16966
    private BitSet __isset_bit_vector = new BitSet(1);
16967
 
16968
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16969
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
16970
          new FieldValueMetaData(TType.I64)));
16971
    }});
16972
 
16973
    static {
16974
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
16975
    }
16976
 
16977
    public getCart_args() {
16978
    }
16979
 
16980
    public getCart_args(
16981
      long cartId)
16982
    {
16983
      this();
16984
      this.cartId = cartId;
16985
      setCartIdIsSet(true);
16986
    }
16987
 
16988
    /**
16989
     * Performs a deep copy on <i>other</i>.
16990
     */
16991
    public getCart_args(getCart_args other) {
16992
      __isset_bit_vector.clear();
16993
      __isset_bit_vector.or(other.__isset_bit_vector);
16994
      this.cartId = other.cartId;
16995
    }
16996
 
16997
    public getCart_args deepCopy() {
16998
      return new getCart_args(this);
16999
    }
17000
 
17001
    @Deprecated
17002
    public getCart_args clone() {
17003
      return new getCart_args(this);
17004
    }
17005
 
17006
    public long getCartId() {
17007
      return this.cartId;
17008
    }
17009
 
17010
    public getCart_args setCartId(long cartId) {
17011
      this.cartId = cartId;
17012
      setCartIdIsSet(true);
17013
      return this;
17014
    }
17015
 
17016
    public void unsetCartId() {
17017
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
17018
    }
17019
 
17020
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
17021
    public boolean isSetCartId() {
17022
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
17023
    }
17024
 
17025
    public void setCartIdIsSet(boolean value) {
17026
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
17027
    }
17028
 
17029
    public void setFieldValue(_Fields field, Object value) {
17030
      switch (field) {
17031
      case CART_ID:
17032
        if (value == null) {
17033
          unsetCartId();
17034
        } else {
17035
          setCartId((Long)value);
17036
        }
17037
        break;
17038
 
17039
      }
17040
    }
17041
 
17042
    public void setFieldValue(int fieldID, Object value) {
17043
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17044
    }
17045
 
17046
    public Object getFieldValue(_Fields field) {
17047
      switch (field) {
17048
      case CART_ID:
17049
        return new Long(getCartId());
17050
 
17051
      }
17052
      throw new IllegalStateException();
17053
    }
17054
 
17055
    public Object getFieldValue(int fieldId) {
17056
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17057
    }
17058
 
17059
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17060
    public boolean isSet(_Fields field) {
17061
      switch (field) {
17062
      case CART_ID:
17063
        return isSetCartId();
17064
      }
17065
      throw new IllegalStateException();
17066
    }
17067
 
17068
    public boolean isSet(int fieldID) {
17069
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17070
    }
17071
 
17072
    @Override
17073
    public boolean equals(Object that) {
17074
      if (that == null)
17075
        return false;
17076
      if (that instanceof getCart_args)
17077
        return this.equals((getCart_args)that);
17078
      return false;
17079
    }
17080
 
17081
    public boolean equals(getCart_args that) {
17082
      if (that == null)
17083
        return false;
17084
 
17085
      boolean this_present_cartId = true;
17086
      boolean that_present_cartId = true;
17087
      if (this_present_cartId || that_present_cartId) {
17088
        if (!(this_present_cartId && that_present_cartId))
17089
          return false;
17090
        if (this.cartId != that.cartId)
17091
          return false;
17092
      }
17093
 
17094
      return true;
17095
    }
17096
 
17097
    @Override
17098
    public int hashCode() {
17099
      return 0;
17100
    }
17101
 
17102
    public int compareTo(getCart_args other) {
17103
      if (!getClass().equals(other.getClass())) {
17104
        return getClass().getName().compareTo(other.getClass().getName());
17105
      }
17106
 
17107
      int lastComparison = 0;
17108
      getCart_args typedOther = (getCart_args)other;
17109
 
17110
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
17111
      if (lastComparison != 0) {
17112
        return lastComparison;
17113
      }
17114
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
17115
      if (lastComparison != 0) {
17116
        return lastComparison;
17117
      }
17118
      return 0;
17119
    }
17120
 
17121
    public void read(TProtocol iprot) throws TException {
17122
      TField field;
17123
      iprot.readStructBegin();
17124
      while (true)
17125
      {
17126
        field = iprot.readFieldBegin();
17127
        if (field.type == TType.STOP) { 
17128
          break;
17129
        }
17130
        _Fields fieldId = _Fields.findByThriftId(field.id);
17131
        if (fieldId == null) {
17132
          TProtocolUtil.skip(iprot, field.type);
17133
        } else {
17134
          switch (fieldId) {
17135
            case CART_ID:
506 rajveer 17136
              if (field.type == TType.I64) {
553 chandransh 17137
                this.cartId = iprot.readI64();
17138
                setCartIdIsSet(true);
506 rajveer 17139
              } else { 
17140
                TProtocolUtil.skip(iprot, field.type);
17141
              }
17142
              break;
17143
          }
17144
          iprot.readFieldEnd();
17145
        }
17146
      }
17147
      iprot.readStructEnd();
17148
      validate();
17149
    }
17150
 
17151
    public void write(TProtocol oprot) throws TException {
17152
      validate();
17153
 
17154
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17155
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
17156
      oprot.writeI64(this.cartId);
506 rajveer 17157
      oprot.writeFieldEnd();
17158
      oprot.writeFieldStop();
17159
      oprot.writeStructEnd();
17160
    }
17161
 
17162
    @Override
17163
    public String toString() {
553 chandransh 17164
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 17165
      boolean first = true;
17166
 
553 chandransh 17167
      sb.append("cartId:");
17168
      sb.append(this.cartId);
506 rajveer 17169
      first = false;
17170
      sb.append(")");
17171
      return sb.toString();
17172
    }
17173
 
17174
    public void validate() throws TException {
17175
      // check for required fields
17176
    }
17177
 
17178
  }
17179
 
553 chandransh 17180
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
17181
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 17182
 
553 chandransh 17183
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
17184
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 17185
 
553 chandransh 17186
    private Cart success;
17187
    private ShoppingCartException scx;
506 rajveer 17188
 
17189
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17190
    public enum _Fields implements TFieldIdEnum {
17191
      SUCCESS((short)0, "success"),
553 chandransh 17192
      SCX((short)1, "scx");
506 rajveer 17193
 
17194
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17195
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17196
 
17197
      static {
17198
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17199
          byId.put((int)field._thriftId, field);
17200
          byName.put(field.getFieldName(), field);
17201
        }
17202
      }
17203
 
17204
      /**
17205
       * Find the _Fields constant that matches fieldId, or null if its not found.
17206
       */
17207
      public static _Fields findByThriftId(int fieldId) {
17208
        return byId.get(fieldId);
17209
      }
17210
 
17211
      /**
17212
       * Find the _Fields constant that matches fieldId, throwing an exception
17213
       * if it is not found.
17214
       */
17215
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17216
        _Fields fields = findByThriftId(fieldId);
17217
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17218
        return fields;
17219
      }
17220
 
17221
      /**
17222
       * Find the _Fields constant that matches name, or null if its not found.
17223
       */
17224
      public static _Fields findByName(String name) {
17225
        return byName.get(name);
17226
      }
17227
 
17228
      private final short _thriftId;
17229
      private final String _fieldName;
17230
 
17231
      _Fields(short thriftId, String fieldName) {
17232
        _thriftId = thriftId;
17233
        _fieldName = fieldName;
17234
      }
17235
 
17236
      public short getThriftFieldId() {
17237
        return _thriftId;
17238
      }
17239
 
17240
      public String getFieldName() {
17241
        return _fieldName;
17242
      }
17243
    }
17244
 
17245
    // isset id assignments
17246
 
17247
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17248
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17249
          new StructMetaData(TType.STRUCT, Cart.class)));
17250
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 17251
          new FieldValueMetaData(TType.STRUCT)));
17252
    }});
17253
 
17254
    static {
553 chandransh 17255
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 17256
    }
17257
 
553 chandransh 17258
    public getCart_result() {
506 rajveer 17259
    }
17260
 
553 chandransh 17261
    public getCart_result(
17262
      Cart success,
17263
      ShoppingCartException scx)
506 rajveer 17264
    {
17265
      this();
17266
      this.success = success;
553 chandransh 17267
      this.scx = scx;
506 rajveer 17268
    }
17269
 
17270
    /**
17271
     * Performs a deep copy on <i>other</i>.
17272
     */
553 chandransh 17273
    public getCart_result(getCart_result other) {
17274
      if (other.isSetSuccess()) {
17275
        this.success = new Cart(other.success);
506 rajveer 17276
      }
553 chandransh 17277
      if (other.isSetScx()) {
17278
        this.scx = new ShoppingCartException(other.scx);
17279
      }
506 rajveer 17280
    }
17281
 
553 chandransh 17282
    public getCart_result deepCopy() {
17283
      return new getCart_result(this);
506 rajveer 17284
    }
17285
 
17286
    @Deprecated
553 chandransh 17287
    public getCart_result clone() {
17288
      return new getCart_result(this);
506 rajveer 17289
    }
17290
 
553 chandransh 17291
    public Cart getSuccess() {
506 rajveer 17292
      return this.success;
17293
    }
17294
 
553 chandransh 17295
    public getCart_result setSuccess(Cart success) {
506 rajveer 17296
      this.success = success;
17297
      return this;
17298
    }
17299
 
17300
    public void unsetSuccess() {
553 chandransh 17301
      this.success = null;
506 rajveer 17302
    }
17303
 
17304
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17305
    public boolean isSetSuccess() {
553 chandransh 17306
      return this.success != null;
506 rajveer 17307
    }
17308
 
17309
    public void setSuccessIsSet(boolean value) {
553 chandransh 17310
      if (!value) {
17311
        this.success = null;
17312
      }
506 rajveer 17313
    }
17314
 
553 chandransh 17315
    public ShoppingCartException getScx() {
17316
      return this.scx;
506 rajveer 17317
    }
17318
 
553 chandransh 17319
    public getCart_result setScx(ShoppingCartException scx) {
17320
      this.scx = scx;
506 rajveer 17321
      return this;
17322
    }
17323
 
553 chandransh 17324
    public void unsetScx() {
17325
      this.scx = null;
506 rajveer 17326
    }
17327
 
553 chandransh 17328
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17329
    public boolean isSetScx() {
17330
      return this.scx != null;
506 rajveer 17331
    }
17332
 
553 chandransh 17333
    public void setScxIsSet(boolean value) {
506 rajveer 17334
      if (!value) {
553 chandransh 17335
        this.scx = null;
506 rajveer 17336
      }
17337
    }
17338
 
17339
    public void setFieldValue(_Fields field, Object value) {
17340
      switch (field) {
17341
      case SUCCESS:
17342
        if (value == null) {
17343
          unsetSuccess();
17344
        } else {
553 chandransh 17345
          setSuccess((Cart)value);
506 rajveer 17346
        }
17347
        break;
17348
 
553 chandransh 17349
      case SCX:
506 rajveer 17350
        if (value == null) {
553 chandransh 17351
          unsetScx();
506 rajveer 17352
        } else {
553 chandransh 17353
          setScx((ShoppingCartException)value);
506 rajveer 17354
        }
17355
        break;
17356
 
17357
      }
17358
    }
17359
 
17360
    public void setFieldValue(int fieldID, Object value) {
17361
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17362
    }
17363
 
17364
    public Object getFieldValue(_Fields field) {
17365
      switch (field) {
17366
      case SUCCESS:
553 chandransh 17367
        return getSuccess();
506 rajveer 17368
 
553 chandransh 17369
      case SCX:
17370
        return getScx();
506 rajveer 17371
 
17372
      }
17373
      throw new IllegalStateException();
17374
    }
17375
 
17376
    public Object getFieldValue(int fieldId) {
17377
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17378
    }
17379
 
17380
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17381
    public boolean isSet(_Fields field) {
17382
      switch (field) {
17383
      case SUCCESS:
17384
        return isSetSuccess();
553 chandransh 17385
      case SCX:
17386
        return isSetScx();
506 rajveer 17387
      }
17388
      throw new IllegalStateException();
17389
    }
17390
 
17391
    public boolean isSet(int fieldID) {
17392
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17393
    }
17394
 
17395
    @Override
17396
    public boolean equals(Object that) {
17397
      if (that == null)
17398
        return false;
553 chandransh 17399
      if (that instanceof getCart_result)
17400
        return this.equals((getCart_result)that);
506 rajveer 17401
      return false;
17402
    }
17403
 
553 chandransh 17404
    public boolean equals(getCart_result that) {
506 rajveer 17405
      if (that == null)
17406
        return false;
17407
 
553 chandransh 17408
      boolean this_present_success = true && this.isSetSuccess();
17409
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 17410
      if (this_present_success || that_present_success) {
17411
        if (!(this_present_success && that_present_success))
17412
          return false;
553 chandransh 17413
        if (!this.success.equals(that.success))
506 rajveer 17414
          return false;
17415
      }
17416
 
553 chandransh 17417
      boolean this_present_scx = true && this.isSetScx();
17418
      boolean that_present_scx = true && that.isSetScx();
17419
      if (this_present_scx || that_present_scx) {
17420
        if (!(this_present_scx && that_present_scx))
506 rajveer 17421
          return false;
553 chandransh 17422
        if (!this.scx.equals(that.scx))
506 rajveer 17423
          return false;
17424
      }
17425
 
17426
      return true;
17427
    }
17428
 
17429
    @Override
17430
    public int hashCode() {
17431
      return 0;
17432
    }
17433
 
553 chandransh 17434
    public int compareTo(getCart_result other) {
506 rajveer 17435
      if (!getClass().equals(other.getClass())) {
17436
        return getClass().getName().compareTo(other.getClass().getName());
17437
      }
17438
 
17439
      int lastComparison = 0;
553 chandransh 17440
      getCart_result typedOther = (getCart_result)other;
506 rajveer 17441
 
17442
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17443
      if (lastComparison != 0) {
17444
        return lastComparison;
17445
      }
17446
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17447
      if (lastComparison != 0) {
17448
        return lastComparison;
17449
      }
553 chandransh 17450
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 17451
      if (lastComparison != 0) {
17452
        return lastComparison;
17453
      }
553 chandransh 17454
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 17455
      if (lastComparison != 0) {
17456
        return lastComparison;
17457
      }
17458
      return 0;
17459
    }
17460
 
17461
    public void read(TProtocol iprot) throws TException {
17462
      TField field;
17463
      iprot.readStructBegin();
17464
      while (true)
17465
      {
17466
        field = iprot.readFieldBegin();
17467
        if (field.type == TType.STOP) { 
17468
          break;
17469
        }
17470
        _Fields fieldId = _Fields.findByThriftId(field.id);
17471
        if (fieldId == null) {
17472
          TProtocolUtil.skip(iprot, field.type);
17473
        } else {
17474
          switch (fieldId) {
17475
            case SUCCESS:
553 chandransh 17476
              if (field.type == TType.STRUCT) {
17477
                this.success = new Cart();
17478
                this.success.read(iprot);
506 rajveer 17479
              } else { 
17480
                TProtocolUtil.skip(iprot, field.type);
17481
              }
17482
              break;
553 chandransh 17483
            case SCX:
506 rajveer 17484
              if (field.type == TType.STRUCT) {
553 chandransh 17485
                this.scx = new ShoppingCartException();
17486
                this.scx.read(iprot);
506 rajveer 17487
              } else { 
17488
                TProtocolUtil.skip(iprot, field.type);
17489
              }
17490
              break;
17491
          }
17492
          iprot.readFieldEnd();
17493
        }
17494
      }
17495
      iprot.readStructEnd();
17496
      validate();
17497
    }
17498
 
17499
    public void write(TProtocol oprot) throws TException {
17500
      oprot.writeStructBegin(STRUCT_DESC);
17501
 
17502
      if (this.isSetSuccess()) {
17503
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 17504
        this.success.write(oprot);
506 rajveer 17505
        oprot.writeFieldEnd();
553 chandransh 17506
      } else if (this.isSetScx()) {
17507
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17508
        this.scx.write(oprot);
506 rajveer 17509
        oprot.writeFieldEnd();
17510
      }
17511
      oprot.writeFieldStop();
17512
      oprot.writeStructEnd();
17513
    }
17514
 
17515
    @Override
17516
    public String toString() {
553 chandransh 17517
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 17518
      boolean first = true;
17519
 
17520
      sb.append("success:");
553 chandransh 17521
      if (this.success == null) {
17522
        sb.append("null");
17523
      } else {
17524
        sb.append(this.success);
17525
      }
506 rajveer 17526
      first = false;
17527
      if (!first) sb.append(", ");
553 chandransh 17528
      sb.append("scx:");
17529
      if (this.scx == null) {
506 rajveer 17530
        sb.append("null");
17531
      } else {
553 chandransh 17532
        sb.append(this.scx);
506 rajveer 17533
      }
17534
      first = false;
17535
      sb.append(")");
17536
      return sb.toString();
17537
    }
17538
 
17539
    public void validate() throws TException {
17540
      // check for required fields
17541
    }
17542
 
17543
  }
17544
 
553 chandransh 17545
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
17546
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 17547
 
553 chandransh 17548
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
17549
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 17550
 
553 chandransh 17551
    private long userId;
17552
    private CartStatus status;
48 ashish 17553
 
17554
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17555
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17556
      USER_ID((short)1, "userId"),
17557
      /**
17558
       * 
17559
       * @see CartStatus
17560
       */
17561
      STATUS((short)2, "status");
48 ashish 17562
 
17563
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17564
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17565
 
17566
      static {
17567
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17568
          byId.put((int)field._thriftId, field);
17569
          byName.put(field.getFieldName(), field);
17570
        }
17571
      }
17572
 
17573
      /**
17574
       * Find the _Fields constant that matches fieldId, or null if its not found.
17575
       */
17576
      public static _Fields findByThriftId(int fieldId) {
17577
        return byId.get(fieldId);
17578
      }
17579
 
17580
      /**
17581
       * Find the _Fields constant that matches fieldId, throwing an exception
17582
       * if it is not found.
17583
       */
17584
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17585
        _Fields fields = findByThriftId(fieldId);
17586
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17587
        return fields;
17588
      }
17589
 
17590
      /**
17591
       * Find the _Fields constant that matches name, or null if its not found.
17592
       */
17593
      public static _Fields findByName(String name) {
17594
        return byName.get(name);
17595
      }
17596
 
17597
      private final short _thriftId;
17598
      private final String _fieldName;
17599
 
17600
      _Fields(short thriftId, String fieldName) {
17601
        _thriftId = thriftId;
17602
        _fieldName = fieldName;
17603
      }
17604
 
17605
      public short getThriftFieldId() {
17606
        return _thriftId;
17607
      }
17608
 
17609
      public String getFieldName() {
17610
        return _fieldName;
17611
      }
17612
    }
17613
 
17614
    // isset id assignments
17615
    private static final int __USERID_ISSET_ID = 0;
17616
    private BitSet __isset_bit_vector = new BitSet(1);
17617
 
17618
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17619
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 17620
          new FieldValueMetaData(TType.I64)));
553 chandransh 17621
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
17622
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 17623
    }});
17624
 
17625
    static {
553 chandransh 17626
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 17627
    }
17628
 
553 chandransh 17629
    public getCartsForUser_args() {
48 ashish 17630
    }
17631
 
553 chandransh 17632
    public getCartsForUser_args(
17633
      long userId,
17634
      CartStatus status)
48 ashish 17635
    {
17636
      this();
553 chandransh 17637
      this.userId = userId;
17638
      setUserIdIsSet(true);
17639
      this.status = status;
48 ashish 17640
    }
17641
 
17642
    /**
17643
     * Performs a deep copy on <i>other</i>.
17644
     */
553 chandransh 17645
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 17646
      __isset_bit_vector.clear();
17647
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17648
      this.userId = other.userId;
17649
      if (other.isSetStatus()) {
17650
        this.status = other.status;
48 ashish 17651
      }
17652
    }
17653
 
553 chandransh 17654
    public getCartsForUser_args deepCopy() {
17655
      return new getCartsForUser_args(this);
48 ashish 17656
    }
17657
 
17658
    @Deprecated
553 chandransh 17659
    public getCartsForUser_args clone() {
17660
      return new getCartsForUser_args(this);
48 ashish 17661
    }
17662
 
553 chandransh 17663
    public long getUserId() {
17664
      return this.userId;
48 ashish 17665
    }
17666
 
553 chandransh 17667
    public getCartsForUser_args setUserId(long userId) {
17668
      this.userId = userId;
17669
      setUserIdIsSet(true);
48 ashish 17670
      return this;
17671
    }
17672
 
553 chandransh 17673
    public void unsetUserId() {
48 ashish 17674
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17675
    }
17676
 
553 chandransh 17677
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
17678
    public boolean isSetUserId() {
48 ashish 17679
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17680
    }
17681
 
553 chandransh 17682
    public void setUserIdIsSet(boolean value) {
48 ashish 17683
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17684
    }
17685
 
553 chandransh 17686
    /**
17687
     * 
17688
     * @see CartStatus
17689
     */
17690
    public CartStatus getStatus() {
17691
      return this.status;
48 ashish 17692
    }
17693
 
553 chandransh 17694
    /**
17695
     * 
17696
     * @see CartStatus
17697
     */
17698
    public getCartsForUser_args setStatus(CartStatus status) {
17699
      this.status = status;
48 ashish 17700
      return this;
17701
    }
17702
 
553 chandransh 17703
    public void unsetStatus() {
17704
      this.status = null;
48 ashish 17705
    }
17706
 
553 chandransh 17707
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17708
    public boolean isSetStatus() {
17709
      return this.status != null;
48 ashish 17710
    }
17711
 
553 chandransh 17712
    public void setStatusIsSet(boolean value) {
48 ashish 17713
      if (!value) {
553 chandransh 17714
        this.status = null;
48 ashish 17715
      }
17716
    }
17717
 
17718
    public void setFieldValue(_Fields field, Object value) {
17719
      switch (field) {
553 chandransh 17720
      case USER_ID:
48 ashish 17721
        if (value == null) {
553 chandransh 17722
          unsetUserId();
48 ashish 17723
        } else {
553 chandransh 17724
          setUserId((Long)value);
48 ashish 17725
        }
17726
        break;
17727
 
553 chandransh 17728
      case STATUS:
48 ashish 17729
        if (value == null) {
553 chandransh 17730
          unsetStatus();
48 ashish 17731
        } else {
553 chandransh 17732
          setStatus((CartStatus)value);
48 ashish 17733
        }
17734
        break;
17735
 
17736
      }
17737
    }
17738
 
17739
    public void setFieldValue(int fieldID, Object value) {
17740
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17741
    }
17742
 
17743
    public Object getFieldValue(_Fields field) {
17744
      switch (field) {
553 chandransh 17745
      case USER_ID:
17746
        return new Long(getUserId());
48 ashish 17747
 
553 chandransh 17748
      case STATUS:
17749
        return getStatus();
48 ashish 17750
 
17751
      }
17752
      throw new IllegalStateException();
17753
    }
17754
 
17755
    public Object getFieldValue(int fieldId) {
17756
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17757
    }
17758
 
17759
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17760
    public boolean isSet(_Fields field) {
17761
      switch (field) {
553 chandransh 17762
      case USER_ID:
17763
        return isSetUserId();
17764
      case STATUS:
17765
        return isSetStatus();
48 ashish 17766
      }
17767
      throw new IllegalStateException();
17768
    }
17769
 
17770
    public boolean isSet(int fieldID) {
17771
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17772
    }
17773
 
17774
    @Override
17775
    public boolean equals(Object that) {
17776
      if (that == null)
17777
        return false;
553 chandransh 17778
      if (that instanceof getCartsForUser_args)
17779
        return this.equals((getCartsForUser_args)that);
48 ashish 17780
      return false;
17781
    }
17782
 
553 chandransh 17783
    public boolean equals(getCartsForUser_args that) {
48 ashish 17784
      if (that == null)
17785
        return false;
17786
 
553 chandransh 17787
      boolean this_present_userId = true;
17788
      boolean that_present_userId = true;
17789
      if (this_present_userId || that_present_userId) {
17790
        if (!(this_present_userId && that_present_userId))
48 ashish 17791
          return false;
553 chandransh 17792
        if (this.userId != that.userId)
48 ashish 17793
          return false;
17794
      }
17795
 
553 chandransh 17796
      boolean this_present_status = true && this.isSetStatus();
17797
      boolean that_present_status = true && that.isSetStatus();
17798
      if (this_present_status || that_present_status) {
17799
        if (!(this_present_status && that_present_status))
48 ashish 17800
          return false;
553 chandransh 17801
        if (!this.status.equals(that.status))
48 ashish 17802
          return false;
17803
      }
17804
 
17805
      return true;
17806
    }
17807
 
17808
    @Override
17809
    public int hashCode() {
17810
      return 0;
17811
    }
17812
 
553 chandransh 17813
    public int compareTo(getCartsForUser_args other) {
48 ashish 17814
      if (!getClass().equals(other.getClass())) {
17815
        return getClass().getName().compareTo(other.getClass().getName());
17816
      }
17817
 
17818
      int lastComparison = 0;
553 chandransh 17819
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 17820
 
553 chandransh 17821
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 17822
      if (lastComparison != 0) {
17823
        return lastComparison;
17824
      }
553 chandransh 17825
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 17826
      if (lastComparison != 0) {
17827
        return lastComparison;
17828
      }
553 chandransh 17829
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 17830
      if (lastComparison != 0) {
17831
        return lastComparison;
17832
      }
553 chandransh 17833
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 17834
      if (lastComparison != 0) {
17835
        return lastComparison;
17836
      }
17837
      return 0;
17838
    }
17839
 
17840
    public void read(TProtocol iprot) throws TException {
17841
      TField field;
17842
      iprot.readStructBegin();
17843
      while (true)
17844
      {
17845
        field = iprot.readFieldBegin();
17846
        if (field.type == TType.STOP) { 
17847
          break;
17848
        }
17849
        _Fields fieldId = _Fields.findByThriftId(field.id);
17850
        if (fieldId == null) {
17851
          TProtocolUtil.skip(iprot, field.type);
17852
        } else {
17853
          switch (fieldId) {
553 chandransh 17854
            case USER_ID:
48 ashish 17855
              if (field.type == TType.I64) {
553 chandransh 17856
                this.userId = iprot.readI64();
17857
                setUserIdIsSet(true);
48 ashish 17858
              } else { 
17859
                TProtocolUtil.skip(iprot, field.type);
17860
              }
17861
              break;
553 chandransh 17862
            case STATUS:
17863
              if (field.type == TType.I32) {
17864
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 17865
              } else { 
17866
                TProtocolUtil.skip(iprot, field.type);
17867
              }
17868
              break;
17869
          }
17870
          iprot.readFieldEnd();
17871
        }
17872
      }
17873
      iprot.readStructEnd();
17874
      validate();
17875
    }
17876
 
17877
    public void write(TProtocol oprot) throws TException {
17878
      validate();
17879
 
17880
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17881
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17882
      oprot.writeI64(this.userId);
48 ashish 17883
      oprot.writeFieldEnd();
553 chandransh 17884
      if (this.status != null) {
17885
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17886
        oprot.writeI32(this.status.getValue());
48 ashish 17887
        oprot.writeFieldEnd();
17888
      }
17889
      oprot.writeFieldStop();
17890
      oprot.writeStructEnd();
17891
    }
17892
 
17893
    @Override
17894
    public String toString() {
553 chandransh 17895
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 17896
      boolean first = true;
17897
 
553 chandransh 17898
      sb.append("userId:");
17899
      sb.append(this.userId);
48 ashish 17900
      first = false;
17901
      if (!first) sb.append(", ");
553 chandransh 17902
      sb.append("status:");
17903
      if (this.status == null) {
48 ashish 17904
        sb.append("null");
17905
      } else {
553 chandransh 17906
        String status_name = status.name();
17907
        if (status_name != null) {
17908
          sb.append(status_name);
17909
          sb.append(" (");
17910
        }
17911
        sb.append(this.status);
17912
        if (status_name != null) {
17913
          sb.append(")");
17914
        }
48 ashish 17915
      }
17916
      first = false;
17917
      sb.append(")");
17918
      return sb.toString();
17919
    }
17920
 
17921
    public void validate() throws TException {
17922
      // check for required fields
17923
    }
17924
 
17925
  }
17926
 
553 chandransh 17927
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
17928
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 17929
 
553 chandransh 17930
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17931
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17932
 
553 chandransh 17933
    private List<Cart> success;
17934
    private ShoppingCartException scx;
48 ashish 17935
 
17936
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17937
    public enum _Fields implements TFieldIdEnum {
17938
      SUCCESS((short)0, "success"),
553 chandransh 17939
      SCX((short)1, "scx");
48 ashish 17940
 
17941
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17942
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17943
 
17944
      static {
17945
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17946
          byId.put((int)field._thriftId, field);
17947
          byName.put(field.getFieldName(), field);
17948
        }
17949
      }
17950
 
17951
      /**
17952
       * Find the _Fields constant that matches fieldId, or null if its not found.
17953
       */
17954
      public static _Fields findByThriftId(int fieldId) {
17955
        return byId.get(fieldId);
17956
      }
17957
 
17958
      /**
17959
       * Find the _Fields constant that matches fieldId, throwing an exception
17960
       * if it is not found.
17961
       */
17962
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17963
        _Fields fields = findByThriftId(fieldId);
17964
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17965
        return fields;
17966
      }
17967
 
17968
      /**
17969
       * Find the _Fields constant that matches name, or null if its not found.
17970
       */
17971
      public static _Fields findByName(String name) {
17972
        return byName.get(name);
17973
      }
17974
 
17975
      private final short _thriftId;
17976
      private final String _fieldName;
17977
 
17978
      _Fields(short thriftId, String fieldName) {
17979
        _thriftId = thriftId;
17980
        _fieldName = fieldName;
17981
      }
17982
 
17983
      public short getThriftFieldId() {
17984
        return _thriftId;
17985
      }
17986
 
17987
      public String getFieldName() {
17988
        return _fieldName;
17989
      }
17990
    }
17991
 
17992
    // isset id assignments
17993
 
17994
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17995
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17996
          new ListMetaData(TType.LIST, 
17997
              new StructMetaData(TType.STRUCT, Cart.class))));
17998
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17999
          new FieldValueMetaData(TType.STRUCT)));
18000
    }});
18001
 
18002
    static {
553 chandransh 18003
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 18004
    }
18005
 
553 chandransh 18006
    public getCartsForUser_result() {
48 ashish 18007
    }
18008
 
553 chandransh 18009
    public getCartsForUser_result(
18010
      List<Cart> success,
18011
      ShoppingCartException scx)
48 ashish 18012
    {
18013
      this();
18014
      this.success = success;
553 chandransh 18015
      this.scx = scx;
48 ashish 18016
    }
18017
 
18018
    /**
18019
     * Performs a deep copy on <i>other</i>.
18020
     */
553 chandransh 18021
    public getCartsForUser_result(getCartsForUser_result other) {
18022
      if (other.isSetSuccess()) {
18023
        List<Cart> __this__success = new ArrayList<Cart>();
18024
        for (Cart other_element : other.success) {
18025
          __this__success.add(new Cart(other_element));
18026
        }
18027
        this.success = __this__success;
48 ashish 18028
      }
553 chandransh 18029
      if (other.isSetScx()) {
18030
        this.scx = new ShoppingCartException(other.scx);
18031
      }
48 ashish 18032
    }
18033
 
553 chandransh 18034
    public getCartsForUser_result deepCopy() {
18035
      return new getCartsForUser_result(this);
48 ashish 18036
    }
18037
 
18038
    @Deprecated
553 chandransh 18039
    public getCartsForUser_result clone() {
18040
      return new getCartsForUser_result(this);
48 ashish 18041
    }
18042
 
553 chandransh 18043
    public int getSuccessSize() {
18044
      return (this.success == null) ? 0 : this.success.size();
18045
    }
18046
 
18047
    public java.util.Iterator<Cart> getSuccessIterator() {
18048
      return (this.success == null) ? null : this.success.iterator();
18049
    }
18050
 
18051
    public void addToSuccess(Cart elem) {
18052
      if (this.success == null) {
18053
        this.success = new ArrayList<Cart>();
18054
      }
18055
      this.success.add(elem);
18056
    }
18057
 
18058
    public List<Cart> getSuccess() {
48 ashish 18059
      return this.success;
18060
    }
18061
 
553 chandransh 18062
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 18063
      this.success = success;
18064
      return this;
18065
    }
18066
 
18067
    public void unsetSuccess() {
553 chandransh 18068
      this.success = null;
48 ashish 18069
    }
18070
 
18071
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18072
    public boolean isSetSuccess() {
553 chandransh 18073
      return this.success != null;
48 ashish 18074
    }
18075
 
18076
    public void setSuccessIsSet(boolean value) {
553 chandransh 18077
      if (!value) {
18078
        this.success = null;
18079
      }
48 ashish 18080
    }
18081
 
553 chandransh 18082
    public ShoppingCartException getScx() {
18083
      return this.scx;
48 ashish 18084
    }
18085
 
553 chandransh 18086
    public getCartsForUser_result setScx(ShoppingCartException scx) {
18087
      this.scx = scx;
48 ashish 18088
      return this;
18089
    }
18090
 
553 chandransh 18091
    public void unsetScx() {
18092
      this.scx = null;
48 ashish 18093
    }
18094
 
553 chandransh 18095
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18096
    public boolean isSetScx() {
18097
      return this.scx != null;
48 ashish 18098
    }
18099
 
553 chandransh 18100
    public void setScxIsSet(boolean value) {
48 ashish 18101
      if (!value) {
553 chandransh 18102
        this.scx = null;
48 ashish 18103
      }
18104
    }
18105
 
18106
    public void setFieldValue(_Fields field, Object value) {
18107
      switch (field) {
18108
      case SUCCESS:
18109
        if (value == null) {
18110
          unsetSuccess();
18111
        } else {
553 chandransh 18112
          setSuccess((List<Cart>)value);
48 ashish 18113
        }
18114
        break;
18115
 
553 chandransh 18116
      case SCX:
48 ashish 18117
        if (value == null) {
553 chandransh 18118
          unsetScx();
48 ashish 18119
        } else {
553 chandransh 18120
          setScx((ShoppingCartException)value);
48 ashish 18121
        }
18122
        break;
18123
 
18124
      }
18125
    }
18126
 
18127
    public void setFieldValue(int fieldID, Object value) {
18128
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18129
    }
18130
 
18131
    public Object getFieldValue(_Fields field) {
18132
      switch (field) {
18133
      case SUCCESS:
553 chandransh 18134
        return getSuccess();
48 ashish 18135
 
553 chandransh 18136
      case SCX:
18137
        return getScx();
48 ashish 18138
 
18139
      }
18140
      throw new IllegalStateException();
18141
    }
18142
 
18143
    public Object getFieldValue(int fieldId) {
18144
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18145
    }
18146
 
18147
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18148
    public boolean isSet(_Fields field) {
18149
      switch (field) {
18150
      case SUCCESS:
18151
        return isSetSuccess();
553 chandransh 18152
      case SCX:
18153
        return isSetScx();
48 ashish 18154
      }
18155
      throw new IllegalStateException();
18156
    }
18157
 
18158
    public boolean isSet(int fieldID) {
18159
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18160
    }
18161
 
18162
    @Override
18163
    public boolean equals(Object that) {
18164
      if (that == null)
18165
        return false;
553 chandransh 18166
      if (that instanceof getCartsForUser_result)
18167
        return this.equals((getCartsForUser_result)that);
48 ashish 18168
      return false;
18169
    }
18170
 
553 chandransh 18171
    public boolean equals(getCartsForUser_result that) {
48 ashish 18172
      if (that == null)
18173
        return false;
18174
 
553 chandransh 18175
      boolean this_present_success = true && this.isSetSuccess();
18176
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 18177
      if (this_present_success || that_present_success) {
18178
        if (!(this_present_success && that_present_success))
18179
          return false;
553 chandransh 18180
        if (!this.success.equals(that.success))
48 ashish 18181
          return false;
18182
      }
18183
 
553 chandransh 18184
      boolean this_present_scx = true && this.isSetScx();
18185
      boolean that_present_scx = true && that.isSetScx();
18186
      if (this_present_scx || that_present_scx) {
18187
        if (!(this_present_scx && that_present_scx))
48 ashish 18188
          return false;
553 chandransh 18189
        if (!this.scx.equals(that.scx))
48 ashish 18190
          return false;
18191
      }
18192
 
18193
      return true;
18194
    }
18195
 
18196
    @Override
18197
    public int hashCode() {
18198
      return 0;
18199
    }
18200
 
553 chandransh 18201
    public int compareTo(getCartsForUser_result other) {
48 ashish 18202
      if (!getClass().equals(other.getClass())) {
18203
        return getClass().getName().compareTo(other.getClass().getName());
18204
      }
18205
 
18206
      int lastComparison = 0;
553 chandransh 18207
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 18208
 
18209
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18210
      if (lastComparison != 0) {
18211
        return lastComparison;
18212
      }
18213
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18214
      if (lastComparison != 0) {
18215
        return lastComparison;
18216
      }
553 chandransh 18217
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 18218
      if (lastComparison != 0) {
18219
        return lastComparison;
18220
      }
553 chandransh 18221
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 18222
      if (lastComparison != 0) {
18223
        return lastComparison;
18224
      }
18225
      return 0;
18226
    }
18227
 
18228
    public void read(TProtocol iprot) throws TException {
18229
      TField field;
18230
      iprot.readStructBegin();
18231
      while (true)
18232
      {
18233
        field = iprot.readFieldBegin();
18234
        if (field.type == TType.STOP) { 
18235
          break;
18236
        }
18237
        _Fields fieldId = _Fields.findByThriftId(field.id);
18238
        if (fieldId == null) {
18239
          TProtocolUtil.skip(iprot, field.type);
18240
        } else {
18241
          switch (fieldId) {
18242
            case SUCCESS:
553 chandransh 18243
              if (field.type == TType.LIST) {
18244
                {
771 rajveer 18245
                  TList _list20 = iprot.readListBegin();
18246
                  this.success = new ArrayList<Cart>(_list20.size);
18247
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
553 chandransh 18248
                  {
771 rajveer 18249
                    Cart _elem22;
18250
                    _elem22 = new Cart();
18251
                    _elem22.read(iprot);
18252
                    this.success.add(_elem22);
553 chandransh 18253
                  }
18254
                  iprot.readListEnd();
18255
                }
48 ashish 18256
              } else { 
18257
                TProtocolUtil.skip(iprot, field.type);
18258
              }
18259
              break;
553 chandransh 18260
            case SCX:
48 ashish 18261
              if (field.type == TType.STRUCT) {
553 chandransh 18262
                this.scx = new ShoppingCartException();
18263
                this.scx.read(iprot);
48 ashish 18264
              } else { 
18265
                TProtocolUtil.skip(iprot, field.type);
18266
              }
18267
              break;
18268
          }
18269
          iprot.readFieldEnd();
18270
        }
18271
      }
18272
      iprot.readStructEnd();
18273
      validate();
18274
    }
18275
 
18276
    public void write(TProtocol oprot) throws TException {
18277
      oprot.writeStructBegin(STRUCT_DESC);
18278
 
18279
      if (this.isSetSuccess()) {
18280
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 18281
        {
18282
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 18283
          for (Cart _iter23 : this.success)
553 chandransh 18284
          {
771 rajveer 18285
            _iter23.write(oprot);
553 chandransh 18286
          }
18287
          oprot.writeListEnd();
18288
        }
48 ashish 18289
        oprot.writeFieldEnd();
553 chandransh 18290
      } else if (this.isSetScx()) {
18291
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18292
        this.scx.write(oprot);
48 ashish 18293
        oprot.writeFieldEnd();
18294
      }
18295
      oprot.writeFieldStop();
18296
      oprot.writeStructEnd();
18297
    }
18298
 
18299
    @Override
18300
    public String toString() {
553 chandransh 18301
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 18302
      boolean first = true;
18303
 
18304
      sb.append("success:");
553 chandransh 18305
      if (this.success == null) {
18306
        sb.append("null");
18307
      } else {
18308
        sb.append(this.success);
18309
      }
48 ashish 18310
      first = false;
18311
      if (!first) sb.append(", ");
553 chandransh 18312
      sb.append("scx:");
18313
      if (this.scx == null) {
48 ashish 18314
        sb.append("null");
18315
      } else {
553 chandransh 18316
        sb.append(this.scx);
48 ashish 18317
      }
18318
      first = false;
18319
      sb.append(")");
18320
      return sb.toString();
18321
    }
18322
 
18323
    public void validate() throws TException {
18324
      // check for required fields
18325
    }
18326
 
18327
  }
18328
 
553 chandransh 18329
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
18330
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 18331
 
553 chandransh 18332
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 18333
 
553 chandransh 18334
    private CartStatus status;
48 ashish 18335
 
18336
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18337
    public enum _Fields implements TFieldIdEnum {
553 chandransh 18338
      /**
18339
       * 
18340
       * @see CartStatus
18341
       */
18342
      STATUS((short)1, "status");
48 ashish 18343
 
18344
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18345
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18346
 
18347
      static {
18348
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18349
          byId.put((int)field._thriftId, field);
18350
          byName.put(field.getFieldName(), field);
18351
        }
18352
      }
18353
 
18354
      /**
18355
       * Find the _Fields constant that matches fieldId, or null if its not found.
18356
       */
18357
      public static _Fields findByThriftId(int fieldId) {
18358
        return byId.get(fieldId);
18359
      }
18360
 
18361
      /**
18362
       * Find the _Fields constant that matches fieldId, throwing an exception
18363
       * if it is not found.
18364
       */
18365
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18366
        _Fields fields = findByThriftId(fieldId);
18367
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18368
        return fields;
18369
      }
18370
 
18371
      /**
18372
       * Find the _Fields constant that matches name, or null if its not found.
18373
       */
18374
      public static _Fields findByName(String name) {
18375
        return byName.get(name);
18376
      }
18377
 
18378
      private final short _thriftId;
18379
      private final String _fieldName;
18380
 
18381
      _Fields(short thriftId, String fieldName) {
18382
        _thriftId = thriftId;
18383
        _fieldName = fieldName;
18384
      }
18385
 
18386
      public short getThriftFieldId() {
18387
        return _thriftId;
18388
      }
18389
 
18390
      public String getFieldName() {
18391
        return _fieldName;
18392
      }
18393
    }
18394
 
18395
    // isset id assignments
553 chandransh 18396
 
18397
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18398
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
18399
          new EnumMetaData(TType.ENUM, CartStatus.class)));
18400
    }});
18401
 
18402
    static {
18403
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
18404
    }
18405
 
18406
    public getCartsByStatus_args() {
18407
    }
18408
 
18409
    public getCartsByStatus_args(
18410
      CartStatus status)
18411
    {
18412
      this();
18413
      this.status = status;
18414
    }
18415
 
18416
    /**
18417
     * Performs a deep copy on <i>other</i>.
18418
     */
18419
    public getCartsByStatus_args(getCartsByStatus_args other) {
18420
      if (other.isSetStatus()) {
18421
        this.status = other.status;
18422
      }
18423
    }
18424
 
18425
    public getCartsByStatus_args deepCopy() {
18426
      return new getCartsByStatus_args(this);
18427
    }
18428
 
18429
    @Deprecated
18430
    public getCartsByStatus_args clone() {
18431
      return new getCartsByStatus_args(this);
18432
    }
18433
 
18434
    /**
18435
     * 
18436
     * @see CartStatus
18437
     */
18438
    public CartStatus getStatus() {
18439
      return this.status;
18440
    }
18441
 
18442
    /**
18443
     * 
18444
     * @see CartStatus
18445
     */
18446
    public getCartsByStatus_args setStatus(CartStatus status) {
18447
      this.status = status;
18448
      return this;
18449
    }
18450
 
18451
    public void unsetStatus() {
18452
      this.status = null;
18453
    }
18454
 
18455
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
18456
    public boolean isSetStatus() {
18457
      return this.status != null;
18458
    }
18459
 
18460
    public void setStatusIsSet(boolean value) {
18461
      if (!value) {
18462
        this.status = null;
18463
      }
18464
    }
18465
 
18466
    public void setFieldValue(_Fields field, Object value) {
18467
      switch (field) {
18468
      case STATUS:
18469
        if (value == null) {
18470
          unsetStatus();
18471
        } else {
18472
          setStatus((CartStatus)value);
18473
        }
18474
        break;
18475
 
18476
      }
18477
    }
18478
 
18479
    public void setFieldValue(int fieldID, Object value) {
18480
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18481
    }
18482
 
18483
    public Object getFieldValue(_Fields field) {
18484
      switch (field) {
18485
      case STATUS:
18486
        return getStatus();
18487
 
18488
      }
18489
      throw new IllegalStateException();
18490
    }
18491
 
18492
    public Object getFieldValue(int fieldId) {
18493
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18494
    }
18495
 
18496
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18497
    public boolean isSet(_Fields field) {
18498
      switch (field) {
18499
      case STATUS:
18500
        return isSetStatus();
18501
      }
18502
      throw new IllegalStateException();
18503
    }
18504
 
18505
    public boolean isSet(int fieldID) {
18506
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18507
    }
18508
 
18509
    @Override
18510
    public boolean equals(Object that) {
18511
      if (that == null)
18512
        return false;
18513
      if (that instanceof getCartsByStatus_args)
18514
        return this.equals((getCartsByStatus_args)that);
18515
      return false;
18516
    }
18517
 
18518
    public boolean equals(getCartsByStatus_args that) {
18519
      if (that == null)
18520
        return false;
18521
 
18522
      boolean this_present_status = true && this.isSetStatus();
18523
      boolean that_present_status = true && that.isSetStatus();
18524
      if (this_present_status || that_present_status) {
18525
        if (!(this_present_status && that_present_status))
18526
          return false;
18527
        if (!this.status.equals(that.status))
18528
          return false;
18529
      }
18530
 
18531
      return true;
18532
    }
18533
 
18534
    @Override
18535
    public int hashCode() {
18536
      return 0;
18537
    }
18538
 
18539
    public int compareTo(getCartsByStatus_args other) {
18540
      if (!getClass().equals(other.getClass())) {
18541
        return getClass().getName().compareTo(other.getClass().getName());
18542
      }
18543
 
18544
      int lastComparison = 0;
18545
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
18546
 
18547
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
18548
      if (lastComparison != 0) {
18549
        return lastComparison;
18550
      }
18551
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
18552
      if (lastComparison != 0) {
18553
        return lastComparison;
18554
      }
18555
      return 0;
18556
    }
18557
 
18558
    public void read(TProtocol iprot) throws TException {
18559
      TField field;
18560
      iprot.readStructBegin();
18561
      while (true)
18562
      {
18563
        field = iprot.readFieldBegin();
18564
        if (field.type == TType.STOP) { 
18565
          break;
18566
        }
18567
        _Fields fieldId = _Fields.findByThriftId(field.id);
18568
        if (fieldId == null) {
18569
          TProtocolUtil.skip(iprot, field.type);
18570
        } else {
18571
          switch (fieldId) {
18572
            case STATUS:
18573
              if (field.type == TType.I32) {
18574
                this.status = CartStatus.findByValue(iprot.readI32());
18575
              } else { 
18576
                TProtocolUtil.skip(iprot, field.type);
18577
              }
18578
              break;
18579
          }
18580
          iprot.readFieldEnd();
18581
        }
18582
      }
18583
      iprot.readStructEnd();
18584
      validate();
18585
    }
18586
 
18587
    public void write(TProtocol oprot) throws TException {
18588
      validate();
18589
 
18590
      oprot.writeStructBegin(STRUCT_DESC);
18591
      if (this.status != null) {
18592
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
18593
        oprot.writeI32(this.status.getValue());
18594
        oprot.writeFieldEnd();
18595
      }
18596
      oprot.writeFieldStop();
18597
      oprot.writeStructEnd();
18598
    }
18599
 
18600
    @Override
18601
    public String toString() {
18602
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
18603
      boolean first = true;
18604
 
18605
      sb.append("status:");
18606
      if (this.status == null) {
18607
        sb.append("null");
18608
      } else {
18609
        String status_name = status.name();
18610
        if (status_name != null) {
18611
          sb.append(status_name);
18612
          sb.append(" (");
18613
        }
18614
        sb.append(this.status);
18615
        if (status_name != null) {
18616
          sb.append(")");
18617
        }
18618
      }
18619
      first = false;
18620
      sb.append(")");
18621
      return sb.toString();
18622
    }
18623
 
18624
    public void validate() throws TException {
18625
      // check for required fields
18626
    }
18627
 
18628
  }
18629
 
18630
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
18631
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
18632
 
18633
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18634
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
18635
 
18636
    private List<Cart> success;
18637
    private ShoppingCartException scx;
18638
 
18639
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18640
    public enum _Fields implements TFieldIdEnum {
18641
      SUCCESS((short)0, "success"),
18642
      SCX((short)1, "scx");
18643
 
18644
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18645
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18646
 
18647
      static {
18648
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18649
          byId.put((int)field._thriftId, field);
18650
          byName.put(field.getFieldName(), field);
18651
        }
18652
      }
18653
 
18654
      /**
18655
       * Find the _Fields constant that matches fieldId, or null if its not found.
18656
       */
18657
      public static _Fields findByThriftId(int fieldId) {
18658
        return byId.get(fieldId);
18659
      }
18660
 
18661
      /**
18662
       * Find the _Fields constant that matches fieldId, throwing an exception
18663
       * if it is not found.
18664
       */
18665
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18666
        _Fields fields = findByThriftId(fieldId);
18667
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18668
        return fields;
18669
      }
18670
 
18671
      /**
18672
       * Find the _Fields constant that matches name, or null if its not found.
18673
       */
18674
      public static _Fields findByName(String name) {
18675
        return byName.get(name);
18676
      }
18677
 
18678
      private final short _thriftId;
18679
      private final String _fieldName;
18680
 
18681
      _Fields(short thriftId, String fieldName) {
18682
        _thriftId = thriftId;
18683
        _fieldName = fieldName;
18684
      }
18685
 
18686
      public short getThriftFieldId() {
18687
        return _thriftId;
18688
      }
18689
 
18690
      public String getFieldName() {
18691
        return _fieldName;
18692
      }
18693
    }
18694
 
18695
    // isset id assignments
18696
 
18697
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18698
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18699
          new ListMetaData(TType.LIST, 
18700
              new StructMetaData(TType.STRUCT, Cart.class))));
18701
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
18702
          new FieldValueMetaData(TType.STRUCT)));
18703
    }});
18704
 
18705
    static {
18706
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
18707
    }
18708
 
18709
    public getCartsByStatus_result() {
18710
    }
18711
 
18712
    public getCartsByStatus_result(
18713
      List<Cart> success,
18714
      ShoppingCartException scx)
18715
    {
18716
      this();
18717
      this.success = success;
18718
      this.scx = scx;
18719
    }
18720
 
18721
    /**
18722
     * Performs a deep copy on <i>other</i>.
18723
     */
18724
    public getCartsByStatus_result(getCartsByStatus_result other) {
18725
      if (other.isSetSuccess()) {
18726
        List<Cart> __this__success = new ArrayList<Cart>();
18727
        for (Cart other_element : other.success) {
18728
          __this__success.add(new Cart(other_element));
18729
        }
18730
        this.success = __this__success;
18731
      }
18732
      if (other.isSetScx()) {
18733
        this.scx = new ShoppingCartException(other.scx);
18734
      }
18735
    }
18736
 
18737
    public getCartsByStatus_result deepCopy() {
18738
      return new getCartsByStatus_result(this);
18739
    }
18740
 
18741
    @Deprecated
18742
    public getCartsByStatus_result clone() {
18743
      return new getCartsByStatus_result(this);
18744
    }
18745
 
18746
    public int getSuccessSize() {
18747
      return (this.success == null) ? 0 : this.success.size();
18748
    }
18749
 
18750
    public java.util.Iterator<Cart> getSuccessIterator() {
18751
      return (this.success == null) ? null : this.success.iterator();
18752
    }
18753
 
18754
    public void addToSuccess(Cart elem) {
18755
      if (this.success == null) {
18756
        this.success = new ArrayList<Cart>();
18757
      }
18758
      this.success.add(elem);
18759
    }
18760
 
18761
    public List<Cart> getSuccess() {
18762
      return this.success;
18763
    }
18764
 
18765
    public getCartsByStatus_result setSuccess(List<Cart> success) {
18766
      this.success = success;
18767
      return this;
18768
    }
18769
 
18770
    public void unsetSuccess() {
18771
      this.success = null;
18772
    }
18773
 
18774
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18775
    public boolean isSetSuccess() {
18776
      return this.success != null;
18777
    }
18778
 
18779
    public void setSuccessIsSet(boolean value) {
18780
      if (!value) {
18781
        this.success = null;
18782
      }
18783
    }
18784
 
18785
    public ShoppingCartException getScx() {
18786
      return this.scx;
18787
    }
18788
 
18789
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
18790
      this.scx = scx;
18791
      return this;
18792
    }
18793
 
18794
    public void unsetScx() {
18795
      this.scx = null;
18796
    }
18797
 
18798
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18799
    public boolean isSetScx() {
18800
      return this.scx != null;
18801
    }
18802
 
18803
    public void setScxIsSet(boolean value) {
18804
      if (!value) {
18805
        this.scx = null;
18806
      }
18807
    }
18808
 
18809
    public void setFieldValue(_Fields field, Object value) {
18810
      switch (field) {
18811
      case SUCCESS:
18812
        if (value == null) {
18813
          unsetSuccess();
18814
        } else {
18815
          setSuccess((List<Cart>)value);
18816
        }
18817
        break;
18818
 
18819
      case SCX:
18820
        if (value == null) {
18821
          unsetScx();
18822
        } else {
18823
          setScx((ShoppingCartException)value);
18824
        }
18825
        break;
18826
 
18827
      }
18828
    }
18829
 
18830
    public void setFieldValue(int fieldID, Object value) {
18831
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18832
    }
18833
 
18834
    public Object getFieldValue(_Fields field) {
18835
      switch (field) {
18836
      case SUCCESS:
18837
        return getSuccess();
18838
 
18839
      case SCX:
18840
        return getScx();
18841
 
18842
      }
18843
      throw new IllegalStateException();
18844
    }
18845
 
18846
    public Object getFieldValue(int fieldId) {
18847
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18848
    }
18849
 
18850
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18851
    public boolean isSet(_Fields field) {
18852
      switch (field) {
18853
      case SUCCESS:
18854
        return isSetSuccess();
18855
      case SCX:
18856
        return isSetScx();
18857
      }
18858
      throw new IllegalStateException();
18859
    }
18860
 
18861
    public boolean isSet(int fieldID) {
18862
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18863
    }
18864
 
18865
    @Override
18866
    public boolean equals(Object that) {
18867
      if (that == null)
18868
        return false;
18869
      if (that instanceof getCartsByStatus_result)
18870
        return this.equals((getCartsByStatus_result)that);
18871
      return false;
18872
    }
18873
 
18874
    public boolean equals(getCartsByStatus_result that) {
18875
      if (that == null)
18876
        return false;
18877
 
18878
      boolean this_present_success = true && this.isSetSuccess();
18879
      boolean that_present_success = true && that.isSetSuccess();
18880
      if (this_present_success || that_present_success) {
18881
        if (!(this_present_success && that_present_success))
18882
          return false;
18883
        if (!this.success.equals(that.success))
18884
          return false;
18885
      }
18886
 
18887
      boolean this_present_scx = true && this.isSetScx();
18888
      boolean that_present_scx = true && that.isSetScx();
18889
      if (this_present_scx || that_present_scx) {
18890
        if (!(this_present_scx && that_present_scx))
18891
          return false;
18892
        if (!this.scx.equals(that.scx))
18893
          return false;
18894
      }
18895
 
18896
      return true;
18897
    }
18898
 
18899
    @Override
18900
    public int hashCode() {
18901
      return 0;
18902
    }
18903
 
18904
    public int compareTo(getCartsByStatus_result other) {
18905
      if (!getClass().equals(other.getClass())) {
18906
        return getClass().getName().compareTo(other.getClass().getName());
18907
      }
18908
 
18909
      int lastComparison = 0;
18910
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
18911
 
18912
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18913
      if (lastComparison != 0) {
18914
        return lastComparison;
18915
      }
18916
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18917
      if (lastComparison != 0) {
18918
        return lastComparison;
18919
      }
18920
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18921
      if (lastComparison != 0) {
18922
        return lastComparison;
18923
      }
18924
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18925
      if (lastComparison != 0) {
18926
        return lastComparison;
18927
      }
18928
      return 0;
18929
    }
18930
 
18931
    public void read(TProtocol iprot) throws TException {
18932
      TField field;
18933
      iprot.readStructBegin();
18934
      while (true)
18935
      {
18936
        field = iprot.readFieldBegin();
18937
        if (field.type == TType.STOP) { 
18938
          break;
18939
        }
18940
        _Fields fieldId = _Fields.findByThriftId(field.id);
18941
        if (fieldId == null) {
18942
          TProtocolUtil.skip(iprot, field.type);
18943
        } else {
18944
          switch (fieldId) {
18945
            case SUCCESS:
18946
              if (field.type == TType.LIST) {
18947
                {
771 rajveer 18948
                  TList _list24 = iprot.readListBegin();
18949
                  this.success = new ArrayList<Cart>(_list24.size);
18950
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
553 chandransh 18951
                  {
771 rajveer 18952
                    Cart _elem26;
18953
                    _elem26 = new Cart();
18954
                    _elem26.read(iprot);
18955
                    this.success.add(_elem26);
553 chandransh 18956
                  }
18957
                  iprot.readListEnd();
18958
                }
18959
              } else { 
18960
                TProtocolUtil.skip(iprot, field.type);
18961
              }
18962
              break;
18963
            case SCX:
18964
              if (field.type == TType.STRUCT) {
18965
                this.scx = new ShoppingCartException();
18966
                this.scx.read(iprot);
18967
              } else { 
18968
                TProtocolUtil.skip(iprot, field.type);
18969
              }
18970
              break;
18971
          }
18972
          iprot.readFieldEnd();
18973
        }
18974
      }
18975
      iprot.readStructEnd();
18976
      validate();
18977
    }
18978
 
18979
    public void write(TProtocol oprot) throws TException {
18980
      oprot.writeStructBegin(STRUCT_DESC);
18981
 
18982
      if (this.isSetSuccess()) {
18983
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18984
        {
18985
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 18986
          for (Cart _iter27 : this.success)
553 chandransh 18987
          {
771 rajveer 18988
            _iter27.write(oprot);
553 chandransh 18989
          }
18990
          oprot.writeListEnd();
18991
        }
18992
        oprot.writeFieldEnd();
18993
      } else if (this.isSetScx()) {
18994
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18995
        this.scx.write(oprot);
18996
        oprot.writeFieldEnd();
18997
      }
18998
      oprot.writeFieldStop();
18999
      oprot.writeStructEnd();
19000
    }
19001
 
19002
    @Override
19003
    public String toString() {
19004
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
19005
      boolean first = true;
19006
 
19007
      sb.append("success:");
19008
      if (this.success == null) {
19009
        sb.append("null");
19010
      } else {
19011
        sb.append(this.success);
19012
      }
19013
      first = false;
19014
      if (!first) sb.append(", ");
19015
      sb.append("scx:");
19016
      if (this.scx == null) {
19017
        sb.append("null");
19018
      } else {
19019
        sb.append(this.scx);
19020
      }
19021
      first = false;
19022
      sb.append(")");
19023
      return sb.toString();
19024
    }
19025
 
19026
    public void validate() throws TException {
19027
      // check for required fields
19028
    }
19029
 
19030
  }
19031
 
19032
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
19033
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
19034
 
19035
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
19036
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
19037
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
19038
 
19039
    private long from_time;
19040
    private long to_time;
19041
    private CartStatus status;
19042
 
19043
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19044
    public enum _Fields implements TFieldIdEnum {
19045
      FROM_TIME((short)1, "from_time"),
19046
      TO_TIME((short)2, "to_time"),
19047
      /**
19048
       * 
19049
       * @see CartStatus
19050
       */
19051
      STATUS((short)3, "status");
19052
 
19053
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19054
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19055
 
19056
      static {
19057
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19058
          byId.put((int)field._thriftId, field);
19059
          byName.put(field.getFieldName(), field);
19060
        }
19061
      }
19062
 
19063
      /**
19064
       * Find the _Fields constant that matches fieldId, or null if its not found.
19065
       */
19066
      public static _Fields findByThriftId(int fieldId) {
19067
        return byId.get(fieldId);
19068
      }
19069
 
19070
      /**
19071
       * Find the _Fields constant that matches fieldId, throwing an exception
19072
       * if it is not found.
19073
       */
19074
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19075
        _Fields fields = findByThriftId(fieldId);
19076
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19077
        return fields;
19078
      }
19079
 
19080
      /**
19081
       * Find the _Fields constant that matches name, or null if its not found.
19082
       */
19083
      public static _Fields findByName(String name) {
19084
        return byName.get(name);
19085
      }
19086
 
19087
      private final short _thriftId;
19088
      private final String _fieldName;
19089
 
19090
      _Fields(short thriftId, String fieldName) {
19091
        _thriftId = thriftId;
19092
        _fieldName = fieldName;
19093
      }
19094
 
19095
      public short getThriftFieldId() {
19096
        return _thriftId;
19097
      }
19098
 
19099
      public String getFieldName() {
19100
        return _fieldName;
19101
      }
19102
    }
19103
 
19104
    // isset id assignments
19105
    private static final int __FROM_TIME_ISSET_ID = 0;
19106
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 19107
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 19108
 
19109
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19110
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 19111
          new FieldValueMetaData(TType.I64)));
553 chandransh 19112
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
19113
          new FieldValueMetaData(TType.I64)));
19114
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19115
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 19116
    }});
19117
 
19118
    static {
553 chandransh 19119
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 19120
    }
19121
 
553 chandransh 19122
    public getCartsByTime_args() {
48 ashish 19123
    }
19124
 
553 chandransh 19125
    public getCartsByTime_args(
19126
      long from_time,
19127
      long to_time,
19128
      CartStatus status)
48 ashish 19129
    {
19130
      this();
553 chandransh 19131
      this.from_time = from_time;
19132
      setFrom_timeIsSet(true);
19133
      this.to_time = to_time;
19134
      setTo_timeIsSet(true);
19135
      this.status = status;
48 ashish 19136
    }
19137
 
19138
    /**
19139
     * Performs a deep copy on <i>other</i>.
19140
     */
553 chandransh 19141
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 19142
      __isset_bit_vector.clear();
19143
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19144
      this.from_time = other.from_time;
19145
      this.to_time = other.to_time;
19146
      if (other.isSetStatus()) {
19147
        this.status = other.status;
19148
      }
48 ashish 19149
    }
19150
 
553 chandransh 19151
    public getCartsByTime_args deepCopy() {
19152
      return new getCartsByTime_args(this);
48 ashish 19153
    }
19154
 
19155
    @Deprecated
553 chandransh 19156
    public getCartsByTime_args clone() {
19157
      return new getCartsByTime_args(this);
48 ashish 19158
    }
19159
 
553 chandransh 19160
    public long getFrom_time() {
19161
      return this.from_time;
48 ashish 19162
    }
19163
 
553 chandransh 19164
    public getCartsByTime_args setFrom_time(long from_time) {
19165
      this.from_time = from_time;
19166
      setFrom_timeIsSet(true);
48 ashish 19167
      return this;
19168
    }
19169
 
553 chandransh 19170
    public void unsetFrom_time() {
19171
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 19172
    }
19173
 
553 chandransh 19174
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
19175
    public boolean isSetFrom_time() {
19176
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 19177
    }
19178
 
553 chandransh 19179
    public void setFrom_timeIsSet(boolean value) {
19180
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 19181
    }
19182
 
553 chandransh 19183
    public long getTo_time() {
19184
      return this.to_time;
123 ashish 19185
    }
19186
 
553 chandransh 19187
    public getCartsByTime_args setTo_time(long to_time) {
19188
      this.to_time = to_time;
19189
      setTo_timeIsSet(true);
123 ashish 19190
      return this;
19191
    }
19192
 
553 chandransh 19193
    public void unsetTo_time() {
19194
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 19195
    }
19196
 
553 chandransh 19197
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
19198
    public boolean isSetTo_time() {
19199
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 19200
    }
19201
 
553 chandransh 19202
    public void setTo_timeIsSet(boolean value) {
19203
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 19204
    }
19205
 
553 chandransh 19206
    /**
19207
     * 
19208
     * @see CartStatus
19209
     */
19210
    public CartStatus getStatus() {
19211
      return this.status;
19212
    }
19213
 
19214
    /**
19215
     * 
19216
     * @see CartStatus
19217
     */
19218
    public getCartsByTime_args setStatus(CartStatus status) {
19219
      this.status = status;
19220
      return this;
19221
    }
19222
 
19223
    public void unsetStatus() {
19224
      this.status = null;
19225
    }
19226
 
19227
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19228
    public boolean isSetStatus() {
19229
      return this.status != null;
19230
    }
19231
 
19232
    public void setStatusIsSet(boolean value) {
19233
      if (!value) {
19234
        this.status = null;
19235
      }
19236
    }
19237
 
48 ashish 19238
    public void setFieldValue(_Fields field, Object value) {
19239
      switch (field) {
553 chandransh 19240
      case FROM_TIME:
48 ashish 19241
        if (value == null) {
553 chandransh 19242
          unsetFrom_time();
48 ashish 19243
        } else {
553 chandransh 19244
          setFrom_time((Long)value);
48 ashish 19245
        }
19246
        break;
19247
 
553 chandransh 19248
      case TO_TIME:
123 ashish 19249
        if (value == null) {
553 chandransh 19250
          unsetTo_time();
123 ashish 19251
        } else {
553 chandransh 19252
          setTo_time((Long)value);
123 ashish 19253
        }
19254
        break;
19255
 
553 chandransh 19256
      case STATUS:
19257
        if (value == null) {
19258
          unsetStatus();
19259
        } else {
19260
          setStatus((CartStatus)value);
19261
        }
19262
        break;
19263
 
48 ashish 19264
      }
19265
    }
19266
 
19267
    public void setFieldValue(int fieldID, Object value) {
19268
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19269
    }
19270
 
19271
    public Object getFieldValue(_Fields field) {
19272
      switch (field) {
553 chandransh 19273
      case FROM_TIME:
19274
        return new Long(getFrom_time());
48 ashish 19275
 
553 chandransh 19276
      case TO_TIME:
19277
        return new Long(getTo_time());
123 ashish 19278
 
553 chandransh 19279
      case STATUS:
19280
        return getStatus();
19281
 
48 ashish 19282
      }
19283
      throw new IllegalStateException();
19284
    }
19285
 
19286
    public Object getFieldValue(int fieldId) {
19287
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19288
    }
19289
 
19290
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19291
    public boolean isSet(_Fields field) {
19292
      switch (field) {
553 chandransh 19293
      case FROM_TIME:
19294
        return isSetFrom_time();
19295
      case TO_TIME:
19296
        return isSetTo_time();
19297
      case STATUS:
19298
        return isSetStatus();
48 ashish 19299
      }
19300
      throw new IllegalStateException();
19301
    }
19302
 
19303
    public boolean isSet(int fieldID) {
19304
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19305
    }
19306
 
19307
    @Override
19308
    public boolean equals(Object that) {
19309
      if (that == null)
19310
        return false;
553 chandransh 19311
      if (that instanceof getCartsByTime_args)
19312
        return this.equals((getCartsByTime_args)that);
48 ashish 19313
      return false;
19314
    }
19315
 
553 chandransh 19316
    public boolean equals(getCartsByTime_args that) {
48 ashish 19317
      if (that == null)
19318
        return false;
19319
 
553 chandransh 19320
      boolean this_present_from_time = true;
19321
      boolean that_present_from_time = true;
19322
      if (this_present_from_time || that_present_from_time) {
19323
        if (!(this_present_from_time && that_present_from_time))
48 ashish 19324
          return false;
553 chandransh 19325
        if (this.from_time != that.from_time)
48 ashish 19326
          return false;
19327
      }
19328
 
553 chandransh 19329
      boolean this_present_to_time = true;
19330
      boolean that_present_to_time = true;
19331
      if (this_present_to_time || that_present_to_time) {
19332
        if (!(this_present_to_time && that_present_to_time))
123 ashish 19333
          return false;
553 chandransh 19334
        if (this.to_time != that.to_time)
123 ashish 19335
          return false;
19336
      }
19337
 
553 chandransh 19338
      boolean this_present_status = true && this.isSetStatus();
19339
      boolean that_present_status = true && that.isSetStatus();
19340
      if (this_present_status || that_present_status) {
19341
        if (!(this_present_status && that_present_status))
19342
          return false;
19343
        if (!this.status.equals(that.status))
19344
          return false;
19345
      }
19346
 
48 ashish 19347
      return true;
19348
    }
19349
 
19350
    @Override
19351
    public int hashCode() {
19352
      return 0;
19353
    }
19354
 
553 chandransh 19355
    public int compareTo(getCartsByTime_args other) {
48 ashish 19356
      if (!getClass().equals(other.getClass())) {
19357
        return getClass().getName().compareTo(other.getClass().getName());
19358
      }
19359
 
19360
      int lastComparison = 0;
553 chandransh 19361
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 19362
 
553 chandransh 19363
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 19364
      if (lastComparison != 0) {
19365
        return lastComparison;
19366
      }
553 chandransh 19367
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 19368
      if (lastComparison != 0) {
19369
        return lastComparison;
19370
      }
553 chandransh 19371
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 19372
      if (lastComparison != 0) {
19373
        return lastComparison;
19374
      }
553 chandransh 19375
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 19376
      if (lastComparison != 0) {
19377
        return lastComparison;
19378
      }
553 chandransh 19379
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19380
      if (lastComparison != 0) {
19381
        return lastComparison;
19382
      }
19383
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19384
      if (lastComparison != 0) {
19385
        return lastComparison;
19386
      }
48 ashish 19387
      return 0;
19388
    }
19389
 
19390
    public void read(TProtocol iprot) throws TException {
19391
      TField field;
19392
      iprot.readStructBegin();
19393
      while (true)
19394
      {
19395
        field = iprot.readFieldBegin();
19396
        if (field.type == TType.STOP) { 
19397
          break;
19398
        }
19399
        _Fields fieldId = _Fields.findByThriftId(field.id);
19400
        if (fieldId == null) {
19401
          TProtocolUtil.skip(iprot, field.type);
19402
        } else {
19403
          switch (fieldId) {
553 chandransh 19404
            case FROM_TIME:
48 ashish 19405
              if (field.type == TType.I64) {
553 chandransh 19406
                this.from_time = iprot.readI64();
19407
                setFrom_timeIsSet(true);
48 ashish 19408
              } else { 
19409
                TProtocolUtil.skip(iprot, field.type);
19410
              }
19411
              break;
553 chandransh 19412
            case TO_TIME:
19413
              if (field.type == TType.I64) {
19414
                this.to_time = iprot.readI64();
19415
                setTo_timeIsSet(true);
123 ashish 19416
              } else { 
19417
                TProtocolUtil.skip(iprot, field.type);
19418
              }
19419
              break;
553 chandransh 19420
            case STATUS:
19421
              if (field.type == TType.I32) {
19422
                this.status = CartStatus.findByValue(iprot.readI32());
19423
              } else { 
19424
                TProtocolUtil.skip(iprot, field.type);
19425
              }
19426
              break;
48 ashish 19427
          }
19428
          iprot.readFieldEnd();
19429
        }
19430
      }
19431
      iprot.readStructEnd();
19432
      validate();
19433
    }
19434
 
19435
    public void write(TProtocol oprot) throws TException {
19436
      validate();
19437
 
19438
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19439
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
19440
      oprot.writeI64(this.from_time);
48 ashish 19441
      oprot.writeFieldEnd();
553 chandransh 19442
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
19443
      oprot.writeI64(this.to_time);
123 ashish 19444
      oprot.writeFieldEnd();
553 chandransh 19445
      if (this.status != null) {
19446
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19447
        oprot.writeI32(this.status.getValue());
19448
        oprot.writeFieldEnd();
19449
      }
48 ashish 19450
      oprot.writeFieldStop();
19451
      oprot.writeStructEnd();
19452
    }
19453
 
19454
    @Override
19455
    public String toString() {
553 chandransh 19456
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 19457
      boolean first = true;
19458
 
553 chandransh 19459
      sb.append("from_time:");
19460
      sb.append(this.from_time);
48 ashish 19461
      first = false;
123 ashish 19462
      if (!first) sb.append(", ");
553 chandransh 19463
      sb.append("to_time:");
19464
      sb.append(this.to_time);
123 ashish 19465
      first = false;
553 chandransh 19466
      if (!first) sb.append(", ");
19467
      sb.append("status:");
19468
      if (this.status == null) {
19469
        sb.append("null");
19470
      } else {
19471
        String status_name = status.name();
19472
        if (status_name != null) {
19473
          sb.append(status_name);
19474
          sb.append(" (");
19475
        }
19476
        sb.append(this.status);
19477
        if (status_name != null) {
19478
          sb.append(")");
19479
        }
19480
      }
19481
      first = false;
48 ashish 19482
      sb.append(")");
19483
      return sb.toString();
19484
    }
19485
 
19486
    public void validate() throws TException {
19487
      // check for required fields
19488
    }
19489
 
19490
  }
19491
 
553 chandransh 19492
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
19493
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 19494
 
553 chandransh 19495
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19496
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19497
 
553 chandransh 19498
    private List<Cart> success;
19499
    private ShoppingCartException scx;
48 ashish 19500
 
19501
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19502
    public enum _Fields implements TFieldIdEnum {
19503
      SUCCESS((short)0, "success"),
553 chandransh 19504
      SCX((short)1, "scx");
48 ashish 19505
 
19506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19508
 
19509
      static {
19510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19511
          byId.put((int)field._thriftId, field);
19512
          byName.put(field.getFieldName(), field);
19513
        }
19514
      }
19515
 
19516
      /**
19517
       * Find the _Fields constant that matches fieldId, or null if its not found.
19518
       */
19519
      public static _Fields findByThriftId(int fieldId) {
19520
        return byId.get(fieldId);
19521
      }
19522
 
19523
      /**
19524
       * Find the _Fields constant that matches fieldId, throwing an exception
19525
       * if it is not found.
19526
       */
19527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19528
        _Fields fields = findByThriftId(fieldId);
19529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19530
        return fields;
19531
      }
19532
 
19533
      /**
19534
       * Find the _Fields constant that matches name, or null if its not found.
19535
       */
19536
      public static _Fields findByName(String name) {
19537
        return byName.get(name);
19538
      }
19539
 
19540
      private final short _thriftId;
19541
      private final String _fieldName;
19542
 
19543
      _Fields(short thriftId, String fieldName) {
19544
        _thriftId = thriftId;
19545
        _fieldName = fieldName;
19546
      }
19547
 
19548
      public short getThriftFieldId() {
19549
        return _thriftId;
19550
      }
19551
 
19552
      public String getFieldName() {
19553
        return _fieldName;
19554
      }
19555
    }
19556
 
19557
    // isset id assignments
19558
 
19559
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19560
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 19561
          new ListMetaData(TType.LIST, 
19562
              new StructMetaData(TType.STRUCT, Cart.class))));
19563
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19564
          new FieldValueMetaData(TType.STRUCT)));
19565
    }});
19566
 
19567
    static {
553 chandransh 19568
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 19569
    }
19570
 
553 chandransh 19571
    public getCartsByTime_result() {
48 ashish 19572
    }
19573
 
553 chandransh 19574
    public getCartsByTime_result(
19575
      List<Cart> success,
19576
      ShoppingCartException scx)
48 ashish 19577
    {
19578
      this();
19579
      this.success = success;
553 chandransh 19580
      this.scx = scx;
48 ashish 19581
    }
19582
 
19583
    /**
19584
     * Performs a deep copy on <i>other</i>.
19585
     */
553 chandransh 19586
    public getCartsByTime_result(getCartsByTime_result other) {
19587
      if (other.isSetSuccess()) {
19588
        List<Cart> __this__success = new ArrayList<Cart>();
19589
        for (Cart other_element : other.success) {
19590
          __this__success.add(new Cart(other_element));
19591
        }
19592
        this.success = __this__success;
48 ashish 19593
      }
553 chandransh 19594
      if (other.isSetScx()) {
19595
        this.scx = new ShoppingCartException(other.scx);
19596
      }
48 ashish 19597
    }
19598
 
553 chandransh 19599
    public getCartsByTime_result deepCopy() {
19600
      return new getCartsByTime_result(this);
48 ashish 19601
    }
19602
 
19603
    @Deprecated
553 chandransh 19604
    public getCartsByTime_result clone() {
19605
      return new getCartsByTime_result(this);
48 ashish 19606
    }
19607
 
553 chandransh 19608
    public int getSuccessSize() {
19609
      return (this.success == null) ? 0 : this.success.size();
19610
    }
19611
 
19612
    public java.util.Iterator<Cart> getSuccessIterator() {
19613
      return (this.success == null) ? null : this.success.iterator();
19614
    }
19615
 
19616
    public void addToSuccess(Cart elem) {
19617
      if (this.success == null) {
19618
        this.success = new ArrayList<Cart>();
19619
      }
19620
      this.success.add(elem);
19621
    }
19622
 
19623
    public List<Cart> getSuccess() {
48 ashish 19624
      return this.success;
19625
    }
19626
 
553 chandransh 19627
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 19628
      this.success = success;
19629
      return this;
19630
    }
19631
 
19632
    public void unsetSuccess() {
553 chandransh 19633
      this.success = null;
48 ashish 19634
    }
19635
 
19636
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19637
    public boolean isSetSuccess() {
553 chandransh 19638
      return this.success != null;
48 ashish 19639
    }
19640
 
19641
    public void setSuccessIsSet(boolean value) {
553 chandransh 19642
      if (!value) {
19643
        this.success = null;
19644
      }
48 ashish 19645
    }
19646
 
553 chandransh 19647
    public ShoppingCartException getScx() {
19648
      return this.scx;
48 ashish 19649
    }
19650
 
553 chandransh 19651
    public getCartsByTime_result setScx(ShoppingCartException scx) {
19652
      this.scx = scx;
48 ashish 19653
      return this;
19654
    }
19655
 
553 chandransh 19656
    public void unsetScx() {
19657
      this.scx = null;
48 ashish 19658
    }
19659
 
553 chandransh 19660
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19661
    public boolean isSetScx() {
19662
      return this.scx != null;
48 ashish 19663
    }
19664
 
553 chandransh 19665
    public void setScxIsSet(boolean value) {
48 ashish 19666
      if (!value) {
553 chandransh 19667
        this.scx = null;
48 ashish 19668
      }
19669
    }
19670
 
19671
    public void setFieldValue(_Fields field, Object value) {
19672
      switch (field) {
19673
      case SUCCESS:
19674
        if (value == null) {
19675
          unsetSuccess();
19676
        } else {
553 chandransh 19677
          setSuccess((List<Cart>)value);
48 ashish 19678
        }
19679
        break;
19680
 
553 chandransh 19681
      case SCX:
48 ashish 19682
        if (value == null) {
553 chandransh 19683
          unsetScx();
48 ashish 19684
        } else {
553 chandransh 19685
          setScx((ShoppingCartException)value);
48 ashish 19686
        }
19687
        break;
19688
 
19689
      }
19690
    }
19691
 
19692
    public void setFieldValue(int fieldID, Object value) {
19693
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19694
    }
19695
 
19696
    public Object getFieldValue(_Fields field) {
19697
      switch (field) {
19698
      case SUCCESS:
553 chandransh 19699
        return getSuccess();
48 ashish 19700
 
553 chandransh 19701
      case SCX:
19702
        return getScx();
48 ashish 19703
 
19704
      }
19705
      throw new IllegalStateException();
19706
    }
19707
 
19708
    public Object getFieldValue(int fieldId) {
19709
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19710
    }
19711
 
19712
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19713
    public boolean isSet(_Fields field) {
19714
      switch (field) {
19715
      case SUCCESS:
19716
        return isSetSuccess();
553 chandransh 19717
      case SCX:
19718
        return isSetScx();
48 ashish 19719
      }
19720
      throw new IllegalStateException();
19721
    }
19722
 
19723
    public boolean isSet(int fieldID) {
19724
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19725
    }
19726
 
19727
    @Override
19728
    public boolean equals(Object that) {
19729
      if (that == null)
19730
        return false;
553 chandransh 19731
      if (that instanceof getCartsByTime_result)
19732
        return this.equals((getCartsByTime_result)that);
48 ashish 19733
      return false;
19734
    }
19735
 
553 chandransh 19736
    public boolean equals(getCartsByTime_result that) {
48 ashish 19737
      if (that == null)
19738
        return false;
19739
 
553 chandransh 19740
      boolean this_present_success = true && this.isSetSuccess();
19741
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 19742
      if (this_present_success || that_present_success) {
19743
        if (!(this_present_success && that_present_success))
19744
          return false;
553 chandransh 19745
        if (!this.success.equals(that.success))
48 ashish 19746
          return false;
19747
      }
19748
 
553 chandransh 19749
      boolean this_present_scx = true && this.isSetScx();
19750
      boolean that_present_scx = true && that.isSetScx();
19751
      if (this_present_scx || that_present_scx) {
19752
        if (!(this_present_scx && that_present_scx))
48 ashish 19753
          return false;
553 chandransh 19754
        if (!this.scx.equals(that.scx))
48 ashish 19755
          return false;
19756
      }
19757
 
19758
      return true;
19759
    }
19760
 
19761
    @Override
19762
    public int hashCode() {
19763
      return 0;
19764
    }
19765
 
553 chandransh 19766
    public int compareTo(getCartsByTime_result other) {
48 ashish 19767
      if (!getClass().equals(other.getClass())) {
19768
        return getClass().getName().compareTo(other.getClass().getName());
19769
      }
19770
 
19771
      int lastComparison = 0;
553 chandransh 19772
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 19773
 
19774
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19775
      if (lastComparison != 0) {
19776
        return lastComparison;
19777
      }
19778
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19779
      if (lastComparison != 0) {
19780
        return lastComparison;
19781
      }
553 chandransh 19782
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 19783
      if (lastComparison != 0) {
19784
        return lastComparison;
19785
      }
553 chandransh 19786
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 19787
      if (lastComparison != 0) {
19788
        return lastComparison;
19789
      }
19790
      return 0;
19791
    }
19792
 
19793
    public void read(TProtocol iprot) throws TException {
19794
      TField field;
19795
      iprot.readStructBegin();
19796
      while (true)
19797
      {
19798
        field = iprot.readFieldBegin();
19799
        if (field.type == TType.STOP) { 
19800
          break;
19801
        }
19802
        _Fields fieldId = _Fields.findByThriftId(field.id);
19803
        if (fieldId == null) {
19804
          TProtocolUtil.skip(iprot, field.type);
19805
        } else {
19806
          switch (fieldId) {
19807
            case SUCCESS:
553 chandransh 19808
              if (field.type == TType.LIST) {
19809
                {
771 rajveer 19810
                  TList _list28 = iprot.readListBegin();
19811
                  this.success = new ArrayList<Cart>(_list28.size);
19812
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
553 chandransh 19813
                  {
771 rajveer 19814
                    Cart _elem30;
19815
                    _elem30 = new Cart();
19816
                    _elem30.read(iprot);
19817
                    this.success.add(_elem30);
553 chandransh 19818
                  }
19819
                  iprot.readListEnd();
19820
                }
48 ashish 19821
              } else { 
19822
                TProtocolUtil.skip(iprot, field.type);
19823
              }
19824
              break;
553 chandransh 19825
            case SCX:
48 ashish 19826
              if (field.type == TType.STRUCT) {
553 chandransh 19827
                this.scx = new ShoppingCartException();
19828
                this.scx.read(iprot);
48 ashish 19829
              } else { 
19830
                TProtocolUtil.skip(iprot, field.type);
19831
              }
19832
              break;
19833
          }
19834
          iprot.readFieldEnd();
19835
        }
19836
      }
19837
      iprot.readStructEnd();
19838
      validate();
19839
    }
19840
 
19841
    public void write(TProtocol oprot) throws TException {
19842
      oprot.writeStructBegin(STRUCT_DESC);
19843
 
19844
      if (this.isSetSuccess()) {
19845
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 19846
        {
19847
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 19848
          for (Cart _iter31 : this.success)
553 chandransh 19849
          {
771 rajveer 19850
            _iter31.write(oprot);
553 chandransh 19851
          }
19852
          oprot.writeListEnd();
19853
        }
48 ashish 19854
        oprot.writeFieldEnd();
553 chandransh 19855
      } else if (this.isSetScx()) {
19856
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19857
        this.scx.write(oprot);
48 ashish 19858
        oprot.writeFieldEnd();
19859
      }
19860
      oprot.writeFieldStop();
19861
      oprot.writeStructEnd();
19862
    }
19863
 
19864
    @Override
19865
    public String toString() {
553 chandransh 19866
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 19867
      boolean first = true;
19868
 
19869
      sb.append("success:");
553 chandransh 19870
      if (this.success == null) {
19871
        sb.append("null");
19872
      } else {
19873
        sb.append(this.success);
19874
      }
48 ashish 19875
      first = false;
19876
      if (!first) sb.append(", ");
553 chandransh 19877
      sb.append("scx:");
19878
      if (this.scx == null) {
48 ashish 19879
        sb.append("null");
19880
      } else {
553 chandransh 19881
        sb.append(this.scx);
48 ashish 19882
      }
19883
      first = false;
19884
      sb.append(")");
19885
      return sb.toString();
19886
    }
19887
 
19888
    public void validate() throws TException {
19889
      // check for required fields
19890
    }
19891
 
19892
  }
19893
 
553 chandransh 19894
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
19895
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 19896
 
553 chandransh 19897
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19898
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 19899
 
553 chandransh 19900
    private long cartId;
19901
    private CartStatus status;
48 ashish 19902
 
19903
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19904
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19905
      CART_ID((short)1, "cartId"),
19906
      /**
19907
       * 
19908
       * @see CartStatus
19909
       */
19910
      STATUS((short)2, "status");
48 ashish 19911
 
19912
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19913
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19914
 
19915
      static {
19916
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19917
          byId.put((int)field._thriftId, field);
19918
          byName.put(field.getFieldName(), field);
19919
        }
19920
      }
19921
 
19922
      /**
19923
       * Find the _Fields constant that matches fieldId, or null if its not found.
19924
       */
19925
      public static _Fields findByThriftId(int fieldId) {
19926
        return byId.get(fieldId);
19927
      }
19928
 
19929
      /**
19930
       * Find the _Fields constant that matches fieldId, throwing an exception
19931
       * if it is not found.
19932
       */
19933
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19934
        _Fields fields = findByThriftId(fieldId);
19935
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19936
        return fields;
19937
      }
19938
 
19939
      /**
19940
       * Find the _Fields constant that matches name, or null if its not found.
19941
       */
19942
      public static _Fields findByName(String name) {
19943
        return byName.get(name);
19944
      }
19945
 
19946
      private final short _thriftId;
19947
      private final String _fieldName;
19948
 
19949
      _Fields(short thriftId, String fieldName) {
19950
        _thriftId = thriftId;
19951
        _fieldName = fieldName;
19952
      }
19953
 
19954
      public short getThriftFieldId() {
19955
        return _thriftId;
19956
      }
19957
 
19958
      public String getFieldName() {
19959
        return _fieldName;
19960
      }
19961
    }
19962
 
19963
    // isset id assignments
553 chandransh 19964
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 19965
    private BitSet __isset_bit_vector = new BitSet(1);
19966
 
19967
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19968
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 19969
          new FieldValueMetaData(TType.I64)));
553 chandransh 19970
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19971
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 19972
    }});
19973
 
19974
    static {
553 chandransh 19975
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 19976
    }
19977
 
553 chandransh 19978
    public changeCartStatus_args() {
48 ashish 19979
    }
19980
 
553 chandransh 19981
    public changeCartStatus_args(
19982
      long cartId,
19983
      CartStatus status)
48 ashish 19984
    {
19985
      this();
553 chandransh 19986
      this.cartId = cartId;
19987
      setCartIdIsSet(true);
19988
      this.status = status;
48 ashish 19989
    }
19990
 
19991
    /**
19992
     * Performs a deep copy on <i>other</i>.
19993
     */
553 chandransh 19994
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 19995
      __isset_bit_vector.clear();
19996
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19997
      this.cartId = other.cartId;
19998
      if (other.isSetStatus()) {
19999
        this.status = other.status;
20000
      }
48 ashish 20001
    }
20002
 
553 chandransh 20003
    public changeCartStatus_args deepCopy() {
20004
      return new changeCartStatus_args(this);
48 ashish 20005
    }
20006
 
20007
    @Deprecated
553 chandransh 20008
    public changeCartStatus_args clone() {
20009
      return new changeCartStatus_args(this);
48 ashish 20010
    }
20011
 
553 chandransh 20012
    public long getCartId() {
20013
      return this.cartId;
48 ashish 20014
    }
20015
 
553 chandransh 20016
    public changeCartStatus_args setCartId(long cartId) {
20017
      this.cartId = cartId;
20018
      setCartIdIsSet(true);
48 ashish 20019
      return this;
20020
    }
20021
 
553 chandransh 20022
    public void unsetCartId() {
20023
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 20024
    }
20025
 
553 chandransh 20026
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20027
    public boolean isSetCartId() {
20028
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 20029
    }
20030
 
553 chandransh 20031
    public void setCartIdIsSet(boolean value) {
20032
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 20033
    }
20034
 
553 chandransh 20035
    /**
20036
     * 
20037
     * @see CartStatus
20038
     */
20039
    public CartStatus getStatus() {
20040
      return this.status;
20041
    }
20042
 
20043
    /**
20044
     * 
20045
     * @see CartStatus
20046
     */
20047
    public changeCartStatus_args setStatus(CartStatus status) {
20048
      this.status = status;
20049
      return this;
20050
    }
20051
 
20052
    public void unsetStatus() {
20053
      this.status = null;
20054
    }
20055
 
20056
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
20057
    public boolean isSetStatus() {
20058
      return this.status != null;
20059
    }
20060
 
20061
    public void setStatusIsSet(boolean value) {
20062
      if (!value) {
20063
        this.status = null;
20064
      }
20065
    }
20066
 
48 ashish 20067
    public void setFieldValue(_Fields field, Object value) {
20068
      switch (field) {
553 chandransh 20069
      case CART_ID:
48 ashish 20070
        if (value == null) {
553 chandransh 20071
          unsetCartId();
48 ashish 20072
        } else {
553 chandransh 20073
          setCartId((Long)value);
48 ashish 20074
        }
20075
        break;
20076
 
553 chandransh 20077
      case STATUS:
20078
        if (value == null) {
20079
          unsetStatus();
20080
        } else {
20081
          setStatus((CartStatus)value);
20082
        }
20083
        break;
20084
 
48 ashish 20085
      }
20086
    }
20087
 
20088
    public void setFieldValue(int fieldID, Object value) {
20089
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20090
    }
20091
 
20092
    public Object getFieldValue(_Fields field) {
20093
      switch (field) {
553 chandransh 20094
      case CART_ID:
20095
        return new Long(getCartId());
48 ashish 20096
 
553 chandransh 20097
      case STATUS:
20098
        return getStatus();
20099
 
48 ashish 20100
      }
20101
      throw new IllegalStateException();
20102
    }
20103
 
20104
    public Object getFieldValue(int fieldId) {
20105
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20106
    }
20107
 
20108
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20109
    public boolean isSet(_Fields field) {
20110
      switch (field) {
553 chandransh 20111
      case CART_ID:
20112
        return isSetCartId();
20113
      case STATUS:
20114
        return isSetStatus();
48 ashish 20115
      }
20116
      throw new IllegalStateException();
20117
    }
20118
 
20119
    public boolean isSet(int fieldID) {
20120
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20121
    }
20122
 
20123
    @Override
20124
    public boolean equals(Object that) {
20125
      if (that == null)
20126
        return false;
553 chandransh 20127
      if (that instanceof changeCartStatus_args)
20128
        return this.equals((changeCartStatus_args)that);
48 ashish 20129
      return false;
20130
    }
20131
 
553 chandransh 20132
    public boolean equals(changeCartStatus_args that) {
48 ashish 20133
      if (that == null)
20134
        return false;
20135
 
553 chandransh 20136
      boolean this_present_cartId = true;
20137
      boolean that_present_cartId = true;
20138
      if (this_present_cartId || that_present_cartId) {
20139
        if (!(this_present_cartId && that_present_cartId))
48 ashish 20140
          return false;
553 chandransh 20141
        if (this.cartId != that.cartId)
48 ashish 20142
          return false;
20143
      }
20144
 
553 chandransh 20145
      boolean this_present_status = true && this.isSetStatus();
20146
      boolean that_present_status = true && that.isSetStatus();
20147
      if (this_present_status || that_present_status) {
20148
        if (!(this_present_status && that_present_status))
20149
          return false;
20150
        if (!this.status.equals(that.status))
20151
          return false;
20152
      }
20153
 
48 ashish 20154
      return true;
20155
    }
20156
 
20157
    @Override
20158
    public int hashCode() {
20159
      return 0;
20160
    }
20161
 
553 chandransh 20162
    public int compareTo(changeCartStatus_args other) {
48 ashish 20163
      if (!getClass().equals(other.getClass())) {
20164
        return getClass().getName().compareTo(other.getClass().getName());
20165
      }
20166
 
20167
      int lastComparison = 0;
553 chandransh 20168
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 20169
 
553 chandransh 20170
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 20171
      if (lastComparison != 0) {
20172
        return lastComparison;
20173
      }
553 chandransh 20174
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 20175
      if (lastComparison != 0) {
20176
        return lastComparison;
20177
      }
553 chandransh 20178
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
20179
      if (lastComparison != 0) {
20180
        return lastComparison;
20181
      }
20182
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
20183
      if (lastComparison != 0) {
20184
        return lastComparison;
20185
      }
48 ashish 20186
      return 0;
20187
    }
20188
 
20189
    public void read(TProtocol iprot) throws TException {
20190
      TField field;
20191
      iprot.readStructBegin();
20192
      while (true)
20193
      {
20194
        field = iprot.readFieldBegin();
20195
        if (field.type == TType.STOP) { 
20196
          break;
20197
        }
20198
        _Fields fieldId = _Fields.findByThriftId(field.id);
20199
        if (fieldId == null) {
20200
          TProtocolUtil.skip(iprot, field.type);
20201
        } else {
20202
          switch (fieldId) {
553 chandransh 20203
            case CART_ID:
48 ashish 20204
              if (field.type == TType.I64) {
553 chandransh 20205
                this.cartId = iprot.readI64();
20206
                setCartIdIsSet(true);
48 ashish 20207
              } else { 
20208
                TProtocolUtil.skip(iprot, field.type);
20209
              }
20210
              break;
553 chandransh 20211
            case STATUS:
20212
              if (field.type == TType.I32) {
20213
                this.status = CartStatus.findByValue(iprot.readI32());
20214
              } else { 
20215
                TProtocolUtil.skip(iprot, field.type);
20216
              }
20217
              break;
48 ashish 20218
          }
20219
          iprot.readFieldEnd();
20220
        }
20221
      }
20222
      iprot.readStructEnd();
20223
      validate();
20224
    }
20225
 
20226
    public void write(TProtocol oprot) throws TException {
20227
      validate();
20228
 
20229
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 20230
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20231
      oprot.writeI64(this.cartId);
48 ashish 20232
      oprot.writeFieldEnd();
553 chandransh 20233
      if (this.status != null) {
20234
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
20235
        oprot.writeI32(this.status.getValue());
20236
        oprot.writeFieldEnd();
20237
      }
48 ashish 20238
      oprot.writeFieldStop();
20239
      oprot.writeStructEnd();
20240
    }
20241
 
20242
    @Override
20243
    public String toString() {
553 chandransh 20244
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 20245
      boolean first = true;
20246
 
553 chandransh 20247
      sb.append("cartId:");
20248
      sb.append(this.cartId);
48 ashish 20249
      first = false;
553 chandransh 20250
      if (!first) sb.append(", ");
20251
      sb.append("status:");
20252
      if (this.status == null) {
20253
        sb.append("null");
20254
      } else {
20255
        String status_name = status.name();
20256
        if (status_name != null) {
20257
          sb.append(status_name);
20258
          sb.append(" (");
20259
        }
20260
        sb.append(this.status);
20261
        if (status_name != null) {
20262
          sb.append(")");
20263
        }
20264
      }
20265
      first = false;
48 ashish 20266
      sb.append(")");
20267
      return sb.toString();
20268
    }
20269
 
20270
    public void validate() throws TException {
20271
      // check for required fields
20272
    }
20273
 
20274
  }
20275
 
553 chandransh 20276
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
20277
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 20278
 
553 chandransh 20279
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20280
 
553 chandransh 20281
    private ShoppingCartException scx;
48 ashish 20282
 
20283
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20284
    public enum _Fields implements TFieldIdEnum {
553 chandransh 20285
      SCX((short)1, "scx");
48 ashish 20286
 
20287
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20288
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20289
 
20290
      static {
20291
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20292
          byId.put((int)field._thriftId, field);
20293
          byName.put(field.getFieldName(), field);
20294
        }
20295
      }
20296
 
20297
      /**
20298
       * Find the _Fields constant that matches fieldId, or null if its not found.
20299
       */
20300
      public static _Fields findByThriftId(int fieldId) {
20301
        return byId.get(fieldId);
20302
      }
20303
 
20304
      /**
20305
       * Find the _Fields constant that matches fieldId, throwing an exception
20306
       * if it is not found.
20307
       */
20308
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20309
        _Fields fields = findByThriftId(fieldId);
20310
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20311
        return fields;
20312
      }
20313
 
20314
      /**
20315
       * Find the _Fields constant that matches name, or null if its not found.
20316
       */
20317
      public static _Fields findByName(String name) {
20318
        return byName.get(name);
20319
      }
20320
 
20321
      private final short _thriftId;
20322
      private final String _fieldName;
20323
 
20324
      _Fields(short thriftId, String fieldName) {
20325
        _thriftId = thriftId;
20326
        _fieldName = fieldName;
20327
      }
20328
 
20329
      public short getThriftFieldId() {
20330
        return _thriftId;
20331
      }
20332
 
20333
      public String getFieldName() {
20334
        return _fieldName;
20335
      }
20336
    }
20337
 
20338
    // isset id assignments
20339
 
20340
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20341
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 20342
          new FieldValueMetaData(TType.STRUCT)));
20343
    }});
20344
 
20345
    static {
553 chandransh 20346
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 20347
    }
20348
 
553 chandransh 20349
    public changeCartStatus_result() {
48 ashish 20350
    }
20351
 
553 chandransh 20352
    public changeCartStatus_result(
20353
      ShoppingCartException scx)
48 ashish 20354
    {
20355
      this();
553 chandransh 20356
      this.scx = scx;
48 ashish 20357
    }
20358
 
20359
    /**
20360
     * Performs a deep copy on <i>other</i>.
20361
     */
553 chandransh 20362
    public changeCartStatus_result(changeCartStatus_result other) {
20363
      if (other.isSetScx()) {
20364
        this.scx = new ShoppingCartException(other.scx);
20365
      }
20366
    }
20367
 
20368
    public changeCartStatus_result deepCopy() {
20369
      return new changeCartStatus_result(this);
20370
    }
20371
 
20372
    @Deprecated
20373
    public changeCartStatus_result clone() {
20374
      return new changeCartStatus_result(this);
20375
    }
20376
 
20377
    public ShoppingCartException getScx() {
20378
      return this.scx;
20379
    }
20380
 
20381
    public changeCartStatus_result setScx(ShoppingCartException scx) {
20382
      this.scx = scx;
20383
      return this;
20384
    }
20385
 
20386
    public void unsetScx() {
20387
      this.scx = null;
20388
    }
20389
 
20390
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20391
    public boolean isSetScx() {
20392
      return this.scx != null;
20393
    }
20394
 
20395
    public void setScxIsSet(boolean value) {
20396
      if (!value) {
20397
        this.scx = null;
20398
      }
20399
    }
20400
 
20401
    public void setFieldValue(_Fields field, Object value) {
20402
      switch (field) {
20403
      case SCX:
20404
        if (value == null) {
20405
          unsetScx();
20406
        } else {
20407
          setScx((ShoppingCartException)value);
20408
        }
20409
        break;
20410
 
20411
      }
20412
    }
20413
 
20414
    public void setFieldValue(int fieldID, Object value) {
20415
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20416
    }
20417
 
20418
    public Object getFieldValue(_Fields field) {
20419
      switch (field) {
20420
      case SCX:
20421
        return getScx();
20422
 
20423
      }
20424
      throw new IllegalStateException();
20425
    }
20426
 
20427
    public Object getFieldValue(int fieldId) {
20428
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20429
    }
20430
 
20431
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20432
    public boolean isSet(_Fields field) {
20433
      switch (field) {
20434
      case SCX:
20435
        return isSetScx();
20436
      }
20437
      throw new IllegalStateException();
20438
    }
20439
 
20440
    public boolean isSet(int fieldID) {
20441
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20442
    }
20443
 
20444
    @Override
20445
    public boolean equals(Object that) {
20446
      if (that == null)
20447
        return false;
20448
      if (that instanceof changeCartStatus_result)
20449
        return this.equals((changeCartStatus_result)that);
20450
      return false;
20451
    }
20452
 
20453
    public boolean equals(changeCartStatus_result that) {
20454
      if (that == null)
20455
        return false;
20456
 
20457
      boolean this_present_scx = true && this.isSetScx();
20458
      boolean that_present_scx = true && that.isSetScx();
20459
      if (this_present_scx || that_present_scx) {
20460
        if (!(this_present_scx && that_present_scx))
20461
          return false;
20462
        if (!this.scx.equals(that.scx))
20463
          return false;
20464
      }
20465
 
20466
      return true;
20467
    }
20468
 
20469
    @Override
20470
    public int hashCode() {
20471
      return 0;
20472
    }
20473
 
20474
    public int compareTo(changeCartStatus_result other) {
20475
      if (!getClass().equals(other.getClass())) {
20476
        return getClass().getName().compareTo(other.getClass().getName());
20477
      }
20478
 
20479
      int lastComparison = 0;
20480
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
20481
 
20482
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20483
      if (lastComparison != 0) {
20484
        return lastComparison;
20485
      }
20486
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20487
      if (lastComparison != 0) {
20488
        return lastComparison;
20489
      }
20490
      return 0;
20491
    }
20492
 
20493
    public void read(TProtocol iprot) throws TException {
20494
      TField field;
20495
      iprot.readStructBegin();
20496
      while (true)
20497
      {
20498
        field = iprot.readFieldBegin();
20499
        if (field.type == TType.STOP) { 
20500
          break;
20501
        }
20502
        _Fields fieldId = _Fields.findByThriftId(field.id);
20503
        if (fieldId == null) {
20504
          TProtocolUtil.skip(iprot, field.type);
20505
        } else {
20506
          switch (fieldId) {
20507
            case SCX:
20508
              if (field.type == TType.STRUCT) {
20509
                this.scx = new ShoppingCartException();
20510
                this.scx.read(iprot);
20511
              } else { 
20512
                TProtocolUtil.skip(iprot, field.type);
20513
              }
20514
              break;
20515
          }
20516
          iprot.readFieldEnd();
20517
        }
20518
      }
20519
      iprot.readStructEnd();
20520
      validate();
20521
    }
20522
 
20523
    public void write(TProtocol oprot) throws TException {
20524
      oprot.writeStructBegin(STRUCT_DESC);
20525
 
20526
      if (this.isSetScx()) {
20527
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20528
        this.scx.write(oprot);
20529
        oprot.writeFieldEnd();
20530
      }
20531
      oprot.writeFieldStop();
20532
      oprot.writeStructEnd();
20533
    }
20534
 
20535
    @Override
20536
    public String toString() {
20537
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
20538
      boolean first = true;
20539
 
20540
      sb.append("scx:");
20541
      if (this.scx == null) {
20542
        sb.append("null");
20543
      } else {
20544
        sb.append(this.scx);
20545
      }
20546
      first = false;
20547
      sb.append(")");
20548
      return sb.toString();
20549
    }
20550
 
20551
    public void validate() throws TException {
20552
      // check for required fields
20553
    }
20554
 
20555
  }
20556
 
20557
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
20558
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
20559
 
20560
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20561
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
20562
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
20563
 
20564
    private long cartId;
20565
    private long itemId;
20566
    private long quantity;
20567
 
20568
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20569
    public enum _Fields implements TFieldIdEnum {
20570
      CART_ID((short)1, "cartId"),
20571
      ITEM_ID((short)2, "itemId"),
20572
      QUANTITY((short)3, "quantity");
20573
 
20574
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20575
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20576
 
20577
      static {
20578
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20579
          byId.put((int)field._thriftId, field);
20580
          byName.put(field.getFieldName(), field);
20581
        }
20582
      }
20583
 
20584
      /**
20585
       * Find the _Fields constant that matches fieldId, or null if its not found.
20586
       */
20587
      public static _Fields findByThriftId(int fieldId) {
20588
        return byId.get(fieldId);
20589
      }
20590
 
20591
      /**
20592
       * Find the _Fields constant that matches fieldId, throwing an exception
20593
       * if it is not found.
20594
       */
20595
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20596
        _Fields fields = findByThriftId(fieldId);
20597
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20598
        return fields;
20599
      }
20600
 
20601
      /**
20602
       * Find the _Fields constant that matches name, or null if its not found.
20603
       */
20604
      public static _Fields findByName(String name) {
20605
        return byName.get(name);
20606
      }
20607
 
20608
      private final short _thriftId;
20609
      private final String _fieldName;
20610
 
20611
      _Fields(short thriftId, String fieldName) {
20612
        _thriftId = thriftId;
20613
        _fieldName = fieldName;
20614
      }
20615
 
20616
      public short getThriftFieldId() {
20617
        return _thriftId;
20618
      }
20619
 
20620
      public String getFieldName() {
20621
        return _fieldName;
20622
      }
20623
    }
20624
 
20625
    // isset id assignments
20626
    private static final int __CARTID_ISSET_ID = 0;
20627
    private static final int __ITEMID_ISSET_ID = 1;
20628
    private static final int __QUANTITY_ISSET_ID = 2;
20629
    private BitSet __isset_bit_vector = new BitSet(3);
20630
 
20631
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20632
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
20633
          new FieldValueMetaData(TType.I64)));
20634
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
20635
          new FieldValueMetaData(TType.I64)));
20636
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
20637
          new FieldValueMetaData(TType.I64)));
20638
    }});
20639
 
20640
    static {
20641
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
20642
    }
20643
 
20644
    public addItemToCart_args() {
20645
    }
20646
 
20647
    public addItemToCart_args(
20648
      long cartId,
20649
      long itemId,
20650
      long quantity)
20651
    {
20652
      this();
20653
      this.cartId = cartId;
20654
      setCartIdIsSet(true);
20655
      this.itemId = itemId;
20656
      setItemIdIsSet(true);
20657
      this.quantity = quantity;
20658
      setQuantityIsSet(true);
20659
    }
20660
 
20661
    /**
20662
     * Performs a deep copy on <i>other</i>.
20663
     */
20664
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 20665
      __isset_bit_vector.clear();
20666
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20667
      this.cartId = other.cartId;
20668
      this.itemId = other.itemId;
20669
      this.quantity = other.quantity;
48 ashish 20670
    }
20671
 
553 chandransh 20672
    public addItemToCart_args deepCopy() {
20673
      return new addItemToCart_args(this);
48 ashish 20674
    }
20675
 
20676
    @Deprecated
553 chandransh 20677
    public addItemToCart_args clone() {
20678
      return new addItemToCart_args(this);
48 ashish 20679
    }
20680
 
553 chandransh 20681
    public long getCartId() {
20682
      return this.cartId;
48 ashish 20683
    }
20684
 
553 chandransh 20685
    public addItemToCart_args setCartId(long cartId) {
20686
      this.cartId = cartId;
20687
      setCartIdIsSet(true);
48 ashish 20688
      return this;
20689
    }
20690
 
553 chandransh 20691
    public void unsetCartId() {
20692
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 20693
    }
20694
 
553 chandransh 20695
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20696
    public boolean isSetCartId() {
20697
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 20698
    }
20699
 
553 chandransh 20700
    public void setCartIdIsSet(boolean value) {
20701
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 20702
    }
20703
 
553 chandransh 20704
    public long getItemId() {
20705
      return this.itemId;
48 ashish 20706
    }
20707
 
553 chandransh 20708
    public addItemToCart_args setItemId(long itemId) {
20709
      this.itemId = itemId;
20710
      setItemIdIsSet(true);
48 ashish 20711
      return this;
20712
    }
20713
 
553 chandransh 20714
    public void unsetItemId() {
20715
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 20716
    }
20717
 
553 chandransh 20718
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
20719
    public boolean isSetItemId() {
20720
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 20721
    }
20722
 
553 chandransh 20723
    public void setItemIdIsSet(boolean value) {
20724
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
20725
    }
20726
 
20727
    public long getQuantity() {
20728
      return this.quantity;
20729
    }
20730
 
20731
    public addItemToCart_args setQuantity(long quantity) {
20732
      this.quantity = quantity;
20733
      setQuantityIsSet(true);
20734
      return this;
20735
    }
20736
 
20737
    public void unsetQuantity() {
20738
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
20739
    }
20740
 
20741
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
20742
    public boolean isSetQuantity() {
20743
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
20744
    }
20745
 
20746
    public void setQuantityIsSet(boolean value) {
20747
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
20748
    }
20749
 
20750
    public void setFieldValue(_Fields field, Object value) {
20751
      switch (field) {
20752
      case CART_ID:
20753
        if (value == null) {
20754
          unsetCartId();
20755
        } else {
20756
          setCartId((Long)value);
20757
        }
20758
        break;
20759
 
20760
      case ITEM_ID:
20761
        if (value == null) {
20762
          unsetItemId();
20763
        } else {
20764
          setItemId((Long)value);
20765
        }
20766
        break;
20767
 
20768
      case QUANTITY:
20769
        if (value == null) {
20770
          unsetQuantity();
20771
        } else {
20772
          setQuantity((Long)value);
20773
        }
20774
        break;
20775
 
20776
      }
20777
    }
20778
 
20779
    public void setFieldValue(int fieldID, Object value) {
20780
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20781
    }
20782
 
20783
    public Object getFieldValue(_Fields field) {
20784
      switch (field) {
20785
      case CART_ID:
20786
        return new Long(getCartId());
20787
 
20788
      case ITEM_ID:
20789
        return new Long(getItemId());
20790
 
20791
      case QUANTITY:
20792
        return new Long(getQuantity());
20793
 
20794
      }
20795
      throw new IllegalStateException();
20796
    }
20797
 
20798
    public Object getFieldValue(int fieldId) {
20799
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20800
    }
20801
 
20802
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20803
    public boolean isSet(_Fields field) {
20804
      switch (field) {
20805
      case CART_ID:
20806
        return isSetCartId();
20807
      case ITEM_ID:
20808
        return isSetItemId();
20809
      case QUANTITY:
20810
        return isSetQuantity();
20811
      }
20812
      throw new IllegalStateException();
20813
    }
20814
 
20815
    public boolean isSet(int fieldID) {
20816
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20817
    }
20818
 
20819
    @Override
20820
    public boolean equals(Object that) {
20821
      if (that == null)
20822
        return false;
20823
      if (that instanceof addItemToCart_args)
20824
        return this.equals((addItemToCart_args)that);
20825
      return false;
20826
    }
20827
 
20828
    public boolean equals(addItemToCart_args that) {
20829
      if (that == null)
20830
        return false;
20831
 
20832
      boolean this_present_cartId = true;
20833
      boolean that_present_cartId = true;
20834
      if (this_present_cartId || that_present_cartId) {
20835
        if (!(this_present_cartId && that_present_cartId))
20836
          return false;
20837
        if (this.cartId != that.cartId)
20838
          return false;
20839
      }
20840
 
20841
      boolean this_present_itemId = true;
20842
      boolean that_present_itemId = true;
20843
      if (this_present_itemId || that_present_itemId) {
20844
        if (!(this_present_itemId && that_present_itemId))
20845
          return false;
20846
        if (this.itemId != that.itemId)
20847
          return false;
20848
      }
20849
 
20850
      boolean this_present_quantity = true;
20851
      boolean that_present_quantity = true;
20852
      if (this_present_quantity || that_present_quantity) {
20853
        if (!(this_present_quantity && that_present_quantity))
20854
          return false;
20855
        if (this.quantity != that.quantity)
20856
          return false;
20857
      }
20858
 
20859
      return true;
20860
    }
20861
 
20862
    @Override
20863
    public int hashCode() {
20864
      return 0;
20865
    }
20866
 
20867
    public int compareTo(addItemToCart_args other) {
20868
      if (!getClass().equals(other.getClass())) {
20869
        return getClass().getName().compareTo(other.getClass().getName());
20870
      }
20871
 
20872
      int lastComparison = 0;
20873
      addItemToCart_args typedOther = (addItemToCart_args)other;
20874
 
20875
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
20876
      if (lastComparison != 0) {
20877
        return lastComparison;
20878
      }
20879
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
20880
      if (lastComparison != 0) {
20881
        return lastComparison;
20882
      }
20883
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
20884
      if (lastComparison != 0) {
20885
        return lastComparison;
20886
      }
20887
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
20888
      if (lastComparison != 0) {
20889
        return lastComparison;
20890
      }
20891
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
20892
      if (lastComparison != 0) {
20893
        return lastComparison;
20894
      }
20895
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
20896
      if (lastComparison != 0) {
20897
        return lastComparison;
20898
      }
20899
      return 0;
20900
    }
20901
 
20902
    public void read(TProtocol iprot) throws TException {
20903
      TField field;
20904
      iprot.readStructBegin();
20905
      while (true)
20906
      {
20907
        field = iprot.readFieldBegin();
20908
        if (field.type == TType.STOP) { 
20909
          break;
20910
        }
20911
        _Fields fieldId = _Fields.findByThriftId(field.id);
20912
        if (fieldId == null) {
20913
          TProtocolUtil.skip(iprot, field.type);
20914
        } else {
20915
          switch (fieldId) {
20916
            case CART_ID:
20917
              if (field.type == TType.I64) {
20918
                this.cartId = iprot.readI64();
20919
                setCartIdIsSet(true);
20920
              } else { 
20921
                TProtocolUtil.skip(iprot, field.type);
20922
              }
20923
              break;
20924
            case ITEM_ID:
20925
              if (field.type == TType.I64) {
20926
                this.itemId = iprot.readI64();
20927
                setItemIdIsSet(true);
20928
              } else { 
20929
                TProtocolUtil.skip(iprot, field.type);
20930
              }
20931
              break;
20932
            case QUANTITY:
20933
              if (field.type == TType.I64) {
20934
                this.quantity = iprot.readI64();
20935
                setQuantityIsSet(true);
20936
              } else { 
20937
                TProtocolUtil.skip(iprot, field.type);
20938
              }
20939
              break;
20940
          }
20941
          iprot.readFieldEnd();
20942
        }
20943
      }
20944
      iprot.readStructEnd();
20945
      validate();
20946
    }
20947
 
20948
    public void write(TProtocol oprot) throws TException {
20949
      validate();
20950
 
20951
      oprot.writeStructBegin(STRUCT_DESC);
20952
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20953
      oprot.writeI64(this.cartId);
20954
      oprot.writeFieldEnd();
20955
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20956
      oprot.writeI64(this.itemId);
20957
      oprot.writeFieldEnd();
20958
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
20959
      oprot.writeI64(this.quantity);
20960
      oprot.writeFieldEnd();
20961
      oprot.writeFieldStop();
20962
      oprot.writeStructEnd();
20963
    }
20964
 
20965
    @Override
20966
    public String toString() {
20967
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
20968
      boolean first = true;
20969
 
20970
      sb.append("cartId:");
20971
      sb.append(this.cartId);
20972
      first = false;
20973
      if (!first) sb.append(", ");
20974
      sb.append("itemId:");
20975
      sb.append(this.itemId);
20976
      first = false;
20977
      if (!first) sb.append(", ");
20978
      sb.append("quantity:");
20979
      sb.append(this.quantity);
20980
      first = false;
20981
      sb.append(")");
20982
      return sb.toString();
20983
    }
20984
 
20985
    public void validate() throws TException {
20986
      // check for required fields
20987
    }
20988
 
20989
  }
20990
 
20991
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
20992
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
20993
 
20994
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20995
 
20996
    private ShoppingCartException scx;
20997
 
20998
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20999
    public enum _Fields implements TFieldIdEnum {
21000
      SCX((short)1, "scx");
21001
 
21002
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21004
 
21005
      static {
21006
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21007
          byId.put((int)field._thriftId, field);
21008
          byName.put(field.getFieldName(), field);
21009
        }
21010
      }
21011
 
21012
      /**
21013
       * Find the _Fields constant that matches fieldId, or null if its not found.
21014
       */
21015
      public static _Fields findByThriftId(int fieldId) {
21016
        return byId.get(fieldId);
21017
      }
21018
 
21019
      /**
21020
       * Find the _Fields constant that matches fieldId, throwing an exception
21021
       * if it is not found.
21022
       */
21023
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21024
        _Fields fields = findByThriftId(fieldId);
21025
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21026
        return fields;
21027
      }
21028
 
21029
      /**
21030
       * Find the _Fields constant that matches name, or null if its not found.
21031
       */
21032
      public static _Fields findByName(String name) {
21033
        return byName.get(name);
21034
      }
21035
 
21036
      private final short _thriftId;
21037
      private final String _fieldName;
21038
 
21039
      _Fields(short thriftId, String fieldName) {
21040
        _thriftId = thriftId;
21041
        _fieldName = fieldName;
21042
      }
21043
 
21044
      public short getThriftFieldId() {
21045
        return _thriftId;
21046
      }
21047
 
21048
      public String getFieldName() {
21049
        return _fieldName;
21050
      }
21051
    }
21052
 
21053
    // isset id assignments
21054
 
21055
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21056
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
21057
          new FieldValueMetaData(TType.STRUCT)));
21058
    }});
21059
 
21060
    static {
21061
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
21062
    }
21063
 
21064
    public addItemToCart_result() {
21065
    }
21066
 
21067
    public addItemToCart_result(
21068
      ShoppingCartException scx)
21069
    {
21070
      this();
21071
      this.scx = scx;
21072
    }
21073
 
21074
    /**
21075
     * Performs a deep copy on <i>other</i>.
21076
     */
21077
    public addItemToCart_result(addItemToCart_result other) {
21078
      if (other.isSetScx()) {
21079
        this.scx = new ShoppingCartException(other.scx);
21080
      }
21081
    }
21082
 
21083
    public addItemToCart_result deepCopy() {
21084
      return new addItemToCart_result(this);
21085
    }
21086
 
21087
    @Deprecated
21088
    public addItemToCart_result clone() {
21089
      return new addItemToCart_result(this);
21090
    }
21091
 
21092
    public ShoppingCartException getScx() {
21093
      return this.scx;
21094
    }
21095
 
21096
    public addItemToCart_result setScx(ShoppingCartException scx) {
21097
      this.scx = scx;
21098
      return this;
21099
    }
21100
 
21101
    public void unsetScx() {
21102
      this.scx = null;
21103
    }
21104
 
21105
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21106
    public boolean isSetScx() {
21107
      return this.scx != null;
21108
    }
21109
 
21110
    public void setScxIsSet(boolean value) {
48 ashish 21111
      if (!value) {
553 chandransh 21112
        this.scx = null;
48 ashish 21113
      }
21114
    }
21115
 
21116
    public void setFieldValue(_Fields field, Object value) {
21117
      switch (field) {
553 chandransh 21118
      case SCX:
48 ashish 21119
        if (value == null) {
553 chandransh 21120
          unsetScx();
48 ashish 21121
        } else {
553 chandransh 21122
          setScx((ShoppingCartException)value);
48 ashish 21123
        }
21124
        break;
21125
 
553 chandransh 21126
      }
21127
    }
21128
 
21129
    public void setFieldValue(int fieldID, Object value) {
21130
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21131
    }
21132
 
21133
    public Object getFieldValue(_Fields field) {
21134
      switch (field) {
21135
      case SCX:
21136
        return getScx();
21137
 
21138
      }
21139
      throw new IllegalStateException();
21140
    }
21141
 
21142
    public Object getFieldValue(int fieldId) {
21143
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21144
    }
21145
 
21146
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21147
    public boolean isSet(_Fields field) {
21148
      switch (field) {
21149
      case SCX:
21150
        return isSetScx();
21151
      }
21152
      throw new IllegalStateException();
21153
    }
21154
 
21155
    public boolean isSet(int fieldID) {
21156
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21157
    }
21158
 
21159
    @Override
21160
    public boolean equals(Object that) {
21161
      if (that == null)
21162
        return false;
21163
      if (that instanceof addItemToCart_result)
21164
        return this.equals((addItemToCart_result)that);
21165
      return false;
21166
    }
21167
 
21168
    public boolean equals(addItemToCart_result that) {
21169
      if (that == null)
21170
        return false;
21171
 
21172
      boolean this_present_scx = true && this.isSetScx();
21173
      boolean that_present_scx = true && that.isSetScx();
21174
      if (this_present_scx || that_present_scx) {
21175
        if (!(this_present_scx && that_present_scx))
21176
          return false;
21177
        if (!this.scx.equals(that.scx))
21178
          return false;
21179
      }
21180
 
21181
      return true;
21182
    }
21183
 
21184
    @Override
21185
    public int hashCode() {
21186
      return 0;
21187
    }
21188
 
21189
    public int compareTo(addItemToCart_result other) {
21190
      if (!getClass().equals(other.getClass())) {
21191
        return getClass().getName().compareTo(other.getClass().getName());
21192
      }
21193
 
21194
      int lastComparison = 0;
21195
      addItemToCart_result typedOther = (addItemToCart_result)other;
21196
 
21197
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21198
      if (lastComparison != 0) {
21199
        return lastComparison;
21200
      }
21201
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21202
      if (lastComparison != 0) {
21203
        return lastComparison;
21204
      }
21205
      return 0;
21206
    }
21207
 
21208
    public void read(TProtocol iprot) throws TException {
21209
      TField field;
21210
      iprot.readStructBegin();
21211
      while (true)
21212
      {
21213
        field = iprot.readFieldBegin();
21214
        if (field.type == TType.STOP) { 
21215
          break;
21216
        }
21217
        _Fields fieldId = _Fields.findByThriftId(field.id);
21218
        if (fieldId == null) {
21219
          TProtocolUtil.skip(iprot, field.type);
21220
        } else {
21221
          switch (fieldId) {
21222
            case SCX:
21223
              if (field.type == TType.STRUCT) {
21224
                this.scx = new ShoppingCartException();
21225
                this.scx.read(iprot);
21226
              } else { 
21227
                TProtocolUtil.skip(iprot, field.type);
21228
              }
21229
              break;
21230
          }
21231
          iprot.readFieldEnd();
21232
        }
21233
      }
21234
      iprot.readStructEnd();
21235
      validate();
21236
    }
21237
 
21238
    public void write(TProtocol oprot) throws TException {
21239
      oprot.writeStructBegin(STRUCT_DESC);
21240
 
21241
      if (this.isSetScx()) {
21242
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21243
        this.scx.write(oprot);
21244
        oprot.writeFieldEnd();
21245
      }
21246
      oprot.writeFieldStop();
21247
      oprot.writeStructEnd();
21248
    }
21249
 
21250
    @Override
21251
    public String toString() {
21252
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
21253
      boolean first = true;
21254
 
21255
      sb.append("scx:");
21256
      if (this.scx == null) {
21257
        sb.append("null");
21258
      } else {
21259
        sb.append(this.scx);
21260
      }
21261
      first = false;
21262
      sb.append(")");
21263
      return sb.toString();
21264
    }
21265
 
21266
    public void validate() throws TException {
21267
      // check for required fields
21268
    }
21269
 
21270
  }
21271
 
21272
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
21273
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
21274
 
21275
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21276
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21277
 
21278
    private long cartId;
21279
    private long itemId;
21280
 
21281
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21282
    public enum _Fields implements TFieldIdEnum {
21283
      CART_ID((short)1, "cartId"),
21284
      ITEM_ID((short)2, "itemId");
21285
 
21286
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21287
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21288
 
21289
      static {
21290
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21291
          byId.put((int)field._thriftId, field);
21292
          byName.put(field.getFieldName(), field);
21293
        }
21294
      }
21295
 
21296
      /**
21297
       * Find the _Fields constant that matches fieldId, or null if its not found.
21298
       */
21299
      public static _Fields findByThriftId(int fieldId) {
21300
        return byId.get(fieldId);
21301
      }
21302
 
21303
      /**
21304
       * Find the _Fields constant that matches fieldId, throwing an exception
21305
       * if it is not found.
21306
       */
21307
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21308
        _Fields fields = findByThriftId(fieldId);
21309
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21310
        return fields;
21311
      }
21312
 
21313
      /**
21314
       * Find the _Fields constant that matches name, or null if its not found.
21315
       */
21316
      public static _Fields findByName(String name) {
21317
        return byName.get(name);
21318
      }
21319
 
21320
      private final short _thriftId;
21321
      private final String _fieldName;
21322
 
21323
      _Fields(short thriftId, String fieldName) {
21324
        _thriftId = thriftId;
21325
        _fieldName = fieldName;
21326
      }
21327
 
21328
      public short getThriftFieldId() {
21329
        return _thriftId;
21330
      }
21331
 
21332
      public String getFieldName() {
21333
        return _fieldName;
21334
      }
21335
    }
21336
 
21337
    // isset id assignments
21338
    private static final int __CARTID_ISSET_ID = 0;
21339
    private static final int __ITEMID_ISSET_ID = 1;
21340
    private BitSet __isset_bit_vector = new BitSet(2);
21341
 
21342
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21343
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
21344
          new FieldValueMetaData(TType.I64)));
21345
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21346
          new FieldValueMetaData(TType.I64)));
21347
    }});
21348
 
21349
    static {
21350
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
21351
    }
21352
 
21353
    public deleteItemFromCart_args() {
21354
    }
21355
 
21356
    public deleteItemFromCart_args(
21357
      long cartId,
21358
      long itemId)
21359
    {
21360
      this();
21361
      this.cartId = cartId;
21362
      setCartIdIsSet(true);
21363
      this.itemId = itemId;
21364
      setItemIdIsSet(true);
21365
    }
21366
 
21367
    /**
21368
     * Performs a deep copy on <i>other</i>.
21369
     */
21370
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
21371
      __isset_bit_vector.clear();
21372
      __isset_bit_vector.or(other.__isset_bit_vector);
21373
      this.cartId = other.cartId;
21374
      this.itemId = other.itemId;
21375
    }
21376
 
21377
    public deleteItemFromCart_args deepCopy() {
21378
      return new deleteItemFromCart_args(this);
21379
    }
21380
 
21381
    @Deprecated
21382
    public deleteItemFromCart_args clone() {
21383
      return new deleteItemFromCart_args(this);
21384
    }
21385
 
21386
    public long getCartId() {
21387
      return this.cartId;
21388
    }
21389
 
21390
    public deleteItemFromCart_args setCartId(long cartId) {
21391
      this.cartId = cartId;
21392
      setCartIdIsSet(true);
21393
      return this;
21394
    }
21395
 
21396
    public void unsetCartId() {
21397
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
21398
    }
21399
 
21400
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21401
    public boolean isSetCartId() {
21402
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
21403
    }
21404
 
21405
    public void setCartIdIsSet(boolean value) {
21406
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
21407
    }
21408
 
21409
    public long getItemId() {
21410
      return this.itemId;
21411
    }
21412
 
21413
    public deleteItemFromCart_args setItemId(long itemId) {
21414
      this.itemId = itemId;
21415
      setItemIdIsSet(true);
21416
      return this;
21417
    }
21418
 
21419
    public void unsetItemId() {
21420
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
21421
    }
21422
 
21423
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
21424
    public boolean isSetItemId() {
21425
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
21426
    }
21427
 
21428
    public void setItemIdIsSet(boolean value) {
21429
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
21430
    }
21431
 
21432
    public void setFieldValue(_Fields field, Object value) {
21433
      switch (field) {
21434
      case CART_ID:
48 ashish 21435
        if (value == null) {
553 chandransh 21436
          unsetCartId();
48 ashish 21437
        } else {
553 chandransh 21438
          setCartId((Long)value);
48 ashish 21439
        }
21440
        break;
21441
 
553 chandransh 21442
      case ITEM_ID:
21443
        if (value == null) {
21444
          unsetItemId();
21445
        } else {
21446
          setItemId((Long)value);
21447
        }
21448
        break;
21449
 
48 ashish 21450
      }
21451
    }
21452
 
21453
    public void setFieldValue(int fieldID, Object value) {
21454
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21455
    }
21456
 
21457
    public Object getFieldValue(_Fields field) {
21458
      switch (field) {
553 chandransh 21459
      case CART_ID:
21460
        return new Long(getCartId());
48 ashish 21461
 
553 chandransh 21462
      case ITEM_ID:
21463
        return new Long(getItemId());
48 ashish 21464
 
21465
      }
21466
      throw new IllegalStateException();
21467
    }
21468
 
21469
    public Object getFieldValue(int fieldId) {
21470
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21471
    }
21472
 
21473
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21474
    public boolean isSet(_Fields field) {
21475
      switch (field) {
553 chandransh 21476
      case CART_ID:
21477
        return isSetCartId();
21478
      case ITEM_ID:
21479
        return isSetItemId();
48 ashish 21480
      }
21481
      throw new IllegalStateException();
21482
    }
21483
 
21484
    public boolean isSet(int fieldID) {
21485
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21486
    }
21487
 
21488
    @Override
21489
    public boolean equals(Object that) {
21490
      if (that == null)
21491
        return false;
553 chandransh 21492
      if (that instanceof deleteItemFromCart_args)
21493
        return this.equals((deleteItemFromCart_args)that);
48 ashish 21494
      return false;
21495
    }
21496
 
553 chandransh 21497
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 21498
      if (that == null)
21499
        return false;
21500
 
553 chandransh 21501
      boolean this_present_cartId = true;
21502
      boolean that_present_cartId = true;
21503
      if (this_present_cartId || that_present_cartId) {
21504
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21505
          return false;
553 chandransh 21506
        if (this.cartId != that.cartId)
48 ashish 21507
          return false;
21508
      }
21509
 
553 chandransh 21510
      boolean this_present_itemId = true;
21511
      boolean that_present_itemId = true;
21512
      if (this_present_itemId || that_present_itemId) {
21513
        if (!(this_present_itemId && that_present_itemId))
48 ashish 21514
          return false;
553 chandransh 21515
        if (this.itemId != that.itemId)
48 ashish 21516
          return false;
21517
      }
21518
 
21519
      return true;
21520
    }
21521
 
21522
    @Override
21523
    public int hashCode() {
21524
      return 0;
21525
    }
21526
 
553 chandransh 21527
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 21528
      if (!getClass().equals(other.getClass())) {
21529
        return getClass().getName().compareTo(other.getClass().getName());
21530
      }
21531
 
21532
      int lastComparison = 0;
553 chandransh 21533
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 21534
 
553 chandransh 21535
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21536
      if (lastComparison != 0) {
21537
        return lastComparison;
21538
      }
553 chandransh 21539
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21540
      if (lastComparison != 0) {
21541
        return lastComparison;
21542
      }
553 chandransh 21543
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 21544
      if (lastComparison != 0) {
21545
        return lastComparison;
21546
      }
553 chandransh 21547
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 21548
      if (lastComparison != 0) {
21549
        return lastComparison;
21550
      }
21551
      return 0;
21552
    }
21553
 
21554
    public void read(TProtocol iprot) throws TException {
21555
      TField field;
21556
      iprot.readStructBegin();
21557
      while (true)
21558
      {
21559
        field = iprot.readFieldBegin();
21560
        if (field.type == TType.STOP) { 
21561
          break;
21562
        }
21563
        _Fields fieldId = _Fields.findByThriftId(field.id);
21564
        if (fieldId == null) {
21565
          TProtocolUtil.skip(iprot, field.type);
21566
        } else {
21567
          switch (fieldId) {
553 chandransh 21568
            case CART_ID:
21569
              if (field.type == TType.I64) {
21570
                this.cartId = iprot.readI64();
21571
                setCartIdIsSet(true);
48 ashish 21572
              } else { 
21573
                TProtocolUtil.skip(iprot, field.type);
21574
              }
21575
              break;
553 chandransh 21576
            case ITEM_ID:
21577
              if (field.type == TType.I64) {
21578
                this.itemId = iprot.readI64();
21579
                setItemIdIsSet(true);
21580
              } else { 
21581
                TProtocolUtil.skip(iprot, field.type);
21582
              }
21583
              break;
21584
          }
21585
          iprot.readFieldEnd();
21586
        }
21587
      }
21588
      iprot.readStructEnd();
21589
      validate();
21590
    }
21591
 
21592
    public void write(TProtocol oprot) throws TException {
21593
      validate();
21594
 
21595
      oprot.writeStructBegin(STRUCT_DESC);
21596
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21597
      oprot.writeI64(this.cartId);
21598
      oprot.writeFieldEnd();
21599
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
21600
      oprot.writeI64(this.itemId);
21601
      oprot.writeFieldEnd();
21602
      oprot.writeFieldStop();
21603
      oprot.writeStructEnd();
21604
    }
21605
 
21606
    @Override
21607
    public String toString() {
21608
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
21609
      boolean first = true;
21610
 
21611
      sb.append("cartId:");
21612
      sb.append(this.cartId);
21613
      first = false;
21614
      if (!first) sb.append(", ");
21615
      sb.append("itemId:");
21616
      sb.append(this.itemId);
21617
      first = false;
21618
      sb.append(")");
21619
      return sb.toString();
21620
    }
21621
 
21622
    public void validate() throws TException {
21623
      // check for required fields
21624
    }
21625
 
21626
  }
21627
 
21628
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
21629
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
21630
 
21631
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
21632
 
21633
    private ShoppingCartException scx;
21634
 
21635
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21636
    public enum _Fields implements TFieldIdEnum {
21637
      SCX((short)1, "scx");
21638
 
21639
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21640
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21641
 
21642
      static {
21643
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21644
          byId.put((int)field._thriftId, field);
21645
          byName.put(field.getFieldName(), field);
21646
        }
21647
      }
21648
 
21649
      /**
21650
       * Find the _Fields constant that matches fieldId, or null if its not found.
21651
       */
21652
      public static _Fields findByThriftId(int fieldId) {
21653
        return byId.get(fieldId);
21654
      }
21655
 
21656
      /**
21657
       * Find the _Fields constant that matches fieldId, throwing an exception
21658
       * if it is not found.
21659
       */
21660
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21661
        _Fields fields = findByThriftId(fieldId);
21662
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21663
        return fields;
21664
      }
21665
 
21666
      /**
21667
       * Find the _Fields constant that matches name, or null if its not found.
21668
       */
21669
      public static _Fields findByName(String name) {
21670
        return byName.get(name);
21671
      }
21672
 
21673
      private final short _thriftId;
21674
      private final String _fieldName;
21675
 
21676
      _Fields(short thriftId, String fieldName) {
21677
        _thriftId = thriftId;
21678
        _fieldName = fieldName;
21679
      }
21680
 
21681
      public short getThriftFieldId() {
21682
        return _thriftId;
21683
      }
21684
 
21685
      public String getFieldName() {
21686
        return _fieldName;
21687
      }
21688
    }
21689
 
21690
    // isset id assignments
21691
 
21692
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21693
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
21694
          new FieldValueMetaData(TType.STRUCT)));
21695
    }});
21696
 
21697
    static {
21698
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
21699
    }
21700
 
21701
    public deleteItemFromCart_result() {
21702
    }
21703
 
21704
    public deleteItemFromCart_result(
21705
      ShoppingCartException scx)
21706
    {
21707
      this();
21708
      this.scx = scx;
21709
    }
21710
 
21711
    /**
21712
     * Performs a deep copy on <i>other</i>.
21713
     */
21714
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
21715
      if (other.isSetScx()) {
21716
        this.scx = new ShoppingCartException(other.scx);
21717
      }
21718
    }
21719
 
21720
    public deleteItemFromCart_result deepCopy() {
21721
      return new deleteItemFromCart_result(this);
21722
    }
21723
 
21724
    @Deprecated
21725
    public deleteItemFromCart_result clone() {
21726
      return new deleteItemFromCart_result(this);
21727
    }
21728
 
21729
    public ShoppingCartException getScx() {
21730
      return this.scx;
21731
    }
21732
 
21733
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
21734
      this.scx = scx;
21735
      return this;
21736
    }
21737
 
21738
    public void unsetScx() {
21739
      this.scx = null;
21740
    }
21741
 
21742
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21743
    public boolean isSetScx() {
21744
      return this.scx != null;
21745
    }
21746
 
21747
    public void setScxIsSet(boolean value) {
21748
      if (!value) {
21749
        this.scx = null;
21750
      }
21751
    }
21752
 
21753
    public void setFieldValue(_Fields field, Object value) {
21754
      switch (field) {
21755
      case SCX:
21756
        if (value == null) {
21757
          unsetScx();
21758
        } else {
21759
          setScx((ShoppingCartException)value);
21760
        }
21761
        break;
21762
 
21763
      }
21764
    }
21765
 
21766
    public void setFieldValue(int fieldID, Object value) {
21767
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21768
    }
21769
 
21770
    public Object getFieldValue(_Fields field) {
21771
      switch (field) {
21772
      case SCX:
21773
        return getScx();
21774
 
21775
      }
21776
      throw new IllegalStateException();
21777
    }
21778
 
21779
    public Object getFieldValue(int fieldId) {
21780
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21781
    }
21782
 
21783
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21784
    public boolean isSet(_Fields field) {
21785
      switch (field) {
21786
      case SCX:
21787
        return isSetScx();
21788
      }
21789
      throw new IllegalStateException();
21790
    }
21791
 
21792
    public boolean isSet(int fieldID) {
21793
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21794
    }
21795
 
21796
    @Override
21797
    public boolean equals(Object that) {
21798
      if (that == null)
21799
        return false;
21800
      if (that instanceof deleteItemFromCart_result)
21801
        return this.equals((deleteItemFromCart_result)that);
21802
      return false;
21803
    }
21804
 
21805
    public boolean equals(deleteItemFromCart_result that) {
21806
      if (that == null)
21807
        return false;
21808
 
21809
      boolean this_present_scx = true && this.isSetScx();
21810
      boolean that_present_scx = true && that.isSetScx();
21811
      if (this_present_scx || that_present_scx) {
21812
        if (!(this_present_scx && that_present_scx))
21813
          return false;
21814
        if (!this.scx.equals(that.scx))
21815
          return false;
21816
      }
21817
 
21818
      return true;
21819
    }
21820
 
21821
    @Override
21822
    public int hashCode() {
21823
      return 0;
21824
    }
21825
 
21826
    public int compareTo(deleteItemFromCart_result other) {
21827
      if (!getClass().equals(other.getClass())) {
21828
        return getClass().getName().compareTo(other.getClass().getName());
21829
      }
21830
 
21831
      int lastComparison = 0;
21832
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
21833
 
21834
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21835
      if (lastComparison != 0) {
21836
        return lastComparison;
21837
      }
21838
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21839
      if (lastComparison != 0) {
21840
        return lastComparison;
21841
      }
21842
      return 0;
21843
    }
21844
 
21845
    public void read(TProtocol iprot) throws TException {
21846
      TField field;
21847
      iprot.readStructBegin();
21848
      while (true)
21849
      {
21850
        field = iprot.readFieldBegin();
21851
        if (field.type == TType.STOP) { 
21852
          break;
21853
        }
21854
        _Fields fieldId = _Fields.findByThriftId(field.id);
21855
        if (fieldId == null) {
21856
          TProtocolUtil.skip(iprot, field.type);
21857
        } else {
21858
          switch (fieldId) {
21859
            case SCX:
48 ashish 21860
              if (field.type == TType.STRUCT) {
553 chandransh 21861
                this.scx = new ShoppingCartException();
21862
                this.scx.read(iprot);
48 ashish 21863
              } else { 
21864
                TProtocolUtil.skip(iprot, field.type);
21865
              }
21866
              break;
21867
          }
21868
          iprot.readFieldEnd();
21869
        }
21870
      }
21871
      iprot.readStructEnd();
21872
      validate();
21873
    }
21874
 
21875
    public void write(TProtocol oprot) throws TException {
21876
      oprot.writeStructBegin(STRUCT_DESC);
21877
 
553 chandransh 21878
      if (this.isSetScx()) {
21879
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21880
        this.scx.write(oprot);
48 ashish 21881
        oprot.writeFieldEnd();
21882
      }
21883
      oprot.writeFieldStop();
21884
      oprot.writeStructEnd();
21885
    }
21886
 
21887
    @Override
21888
    public String toString() {
553 chandransh 21889
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 21890
      boolean first = true;
21891
 
553 chandransh 21892
      sb.append("scx:");
21893
      if (this.scx == null) {
48 ashish 21894
        sb.append("null");
21895
      } else {
553 chandransh 21896
        sb.append(this.scx);
48 ashish 21897
      }
21898
      first = false;
21899
      sb.append(")");
21900
      return sb.toString();
21901
    }
21902
 
21903
    public void validate() throws TException {
21904
      // check for required fields
21905
    }
21906
 
21907
  }
21908
 
553 chandransh 21909
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
21910
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 21911
 
553 chandransh 21912
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21913
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21914
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 21915
 
553 chandransh 21916
    private long cartId;
21917
    private long itemId;
21918
    private long quantity;
48 ashish 21919
 
21920
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21921
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21922
      CART_ID((short)1, "cartId"),
21923
      ITEM_ID((short)2, "itemId"),
21924
      QUANTITY((short)3, "quantity");
48 ashish 21925
 
21926
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21927
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21928
 
21929
      static {
21930
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21931
          byId.put((int)field._thriftId, field);
21932
          byName.put(field.getFieldName(), field);
21933
        }
21934
      }
21935
 
21936
      /**
21937
       * Find the _Fields constant that matches fieldId, or null if its not found.
21938
       */
21939
      public static _Fields findByThriftId(int fieldId) {
21940
        return byId.get(fieldId);
21941
      }
21942
 
21943
      /**
21944
       * Find the _Fields constant that matches fieldId, throwing an exception
21945
       * if it is not found.
21946
       */
21947
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21948
        _Fields fields = findByThriftId(fieldId);
21949
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21950
        return fields;
21951
      }
21952
 
21953
      /**
21954
       * Find the _Fields constant that matches name, or null if its not found.
21955
       */
21956
      public static _Fields findByName(String name) {
21957
        return byName.get(name);
21958
      }
21959
 
21960
      private final short _thriftId;
21961
      private final String _fieldName;
21962
 
21963
      _Fields(short thriftId, String fieldName) {
21964
        _thriftId = thriftId;
21965
        _fieldName = fieldName;
21966
      }
21967
 
21968
      public short getThriftFieldId() {
21969
        return _thriftId;
21970
      }
21971
 
21972
      public String getFieldName() {
21973
        return _fieldName;
21974
      }
21975
    }
21976
 
21977
    // isset id assignments
553 chandransh 21978
    private static final int __CARTID_ISSET_ID = 0;
21979
    private static final int __ITEMID_ISSET_ID = 1;
21980
    private static final int __QUANTITY_ISSET_ID = 2;
21981
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 21982
 
21983
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21984
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21985
          new FieldValueMetaData(TType.I64)));
553 chandransh 21986
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21987
          new FieldValueMetaData(TType.I64)));
21988
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
21989
          new FieldValueMetaData(TType.I64)));
48 ashish 21990
    }});
21991
 
21992
    static {
553 chandransh 21993
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 21994
    }
21995
 
553 chandransh 21996
    public changeQuantity_args() {
48 ashish 21997
    }
21998
 
553 chandransh 21999
    public changeQuantity_args(
22000
      long cartId,
22001
      long itemId,
22002
      long quantity)
48 ashish 22003
    {
22004
      this();
553 chandransh 22005
      this.cartId = cartId;
22006
      setCartIdIsSet(true);
22007
      this.itemId = itemId;
22008
      setItemIdIsSet(true);
22009
      this.quantity = quantity;
22010
      setQuantityIsSet(true);
48 ashish 22011
    }
22012
 
22013
    /**
22014
     * Performs a deep copy on <i>other</i>.
22015
     */
553 chandransh 22016
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 22017
      __isset_bit_vector.clear();
22018
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22019
      this.cartId = other.cartId;
22020
      this.itemId = other.itemId;
22021
      this.quantity = other.quantity;
48 ashish 22022
    }
22023
 
553 chandransh 22024
    public changeQuantity_args deepCopy() {
22025
      return new changeQuantity_args(this);
48 ashish 22026
    }
22027
 
22028
    @Deprecated
553 chandransh 22029
    public changeQuantity_args clone() {
22030
      return new changeQuantity_args(this);
48 ashish 22031
    }
22032
 
553 chandransh 22033
    public long getCartId() {
22034
      return this.cartId;
48 ashish 22035
    }
22036
 
553 chandransh 22037
    public changeQuantity_args setCartId(long cartId) {
22038
      this.cartId = cartId;
22039
      setCartIdIsSet(true);
48 ashish 22040
      return this;
22041
    }
22042
 
553 chandransh 22043
    public void unsetCartId() {
22044
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22045
    }
22046
 
553 chandransh 22047
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22048
    public boolean isSetCartId() {
22049
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22050
    }
22051
 
553 chandransh 22052
    public void setCartIdIsSet(boolean value) {
22053
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22054
    }
22055
 
553 chandransh 22056
    public long getItemId() {
22057
      return this.itemId;
22058
    }
22059
 
22060
    public changeQuantity_args setItemId(long itemId) {
22061
      this.itemId = itemId;
22062
      setItemIdIsSet(true);
22063
      return this;
22064
    }
22065
 
22066
    public void unsetItemId() {
22067
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
22068
    }
22069
 
22070
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22071
    public boolean isSetItemId() {
22072
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
22073
    }
22074
 
22075
    public void setItemIdIsSet(boolean value) {
22076
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22077
    }
22078
 
22079
    public long getQuantity() {
22080
      return this.quantity;
22081
    }
22082
 
22083
    public changeQuantity_args setQuantity(long quantity) {
22084
      this.quantity = quantity;
22085
      setQuantityIsSet(true);
22086
      return this;
22087
    }
22088
 
22089
    public void unsetQuantity() {
22090
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
22091
    }
22092
 
22093
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
22094
    public boolean isSetQuantity() {
22095
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
22096
    }
22097
 
22098
    public void setQuantityIsSet(boolean value) {
22099
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
22100
    }
22101
 
48 ashish 22102
    public void setFieldValue(_Fields field, Object value) {
22103
      switch (field) {
553 chandransh 22104
      case CART_ID:
48 ashish 22105
        if (value == null) {
553 chandransh 22106
          unsetCartId();
48 ashish 22107
        } else {
553 chandransh 22108
          setCartId((Long)value);
48 ashish 22109
        }
22110
        break;
22111
 
553 chandransh 22112
      case ITEM_ID:
22113
        if (value == null) {
22114
          unsetItemId();
22115
        } else {
22116
          setItemId((Long)value);
22117
        }
22118
        break;
22119
 
22120
      case QUANTITY:
22121
        if (value == null) {
22122
          unsetQuantity();
22123
        } else {
22124
          setQuantity((Long)value);
22125
        }
22126
        break;
22127
 
48 ashish 22128
      }
22129
    }
22130
 
22131
    public void setFieldValue(int fieldID, Object value) {
22132
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22133
    }
22134
 
22135
    public Object getFieldValue(_Fields field) {
22136
      switch (field) {
553 chandransh 22137
      case CART_ID:
22138
        return new Long(getCartId());
48 ashish 22139
 
553 chandransh 22140
      case ITEM_ID:
22141
        return new Long(getItemId());
22142
 
22143
      case QUANTITY:
22144
        return new Long(getQuantity());
22145
 
48 ashish 22146
      }
22147
      throw new IllegalStateException();
22148
    }
22149
 
22150
    public Object getFieldValue(int fieldId) {
22151
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22152
    }
22153
 
22154
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22155
    public boolean isSet(_Fields field) {
22156
      switch (field) {
553 chandransh 22157
      case CART_ID:
22158
        return isSetCartId();
22159
      case ITEM_ID:
22160
        return isSetItemId();
22161
      case QUANTITY:
22162
        return isSetQuantity();
48 ashish 22163
      }
22164
      throw new IllegalStateException();
22165
    }
22166
 
22167
    public boolean isSet(int fieldID) {
22168
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22169
    }
22170
 
22171
    @Override
22172
    public boolean equals(Object that) {
22173
      if (that == null)
22174
        return false;
553 chandransh 22175
      if (that instanceof changeQuantity_args)
22176
        return this.equals((changeQuantity_args)that);
48 ashish 22177
      return false;
22178
    }
22179
 
553 chandransh 22180
    public boolean equals(changeQuantity_args that) {
48 ashish 22181
      if (that == null)
22182
        return false;
22183
 
553 chandransh 22184
      boolean this_present_cartId = true;
22185
      boolean that_present_cartId = true;
22186
      if (this_present_cartId || that_present_cartId) {
22187
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22188
          return false;
553 chandransh 22189
        if (this.cartId != that.cartId)
48 ashish 22190
          return false;
22191
      }
22192
 
553 chandransh 22193
      boolean this_present_itemId = true;
22194
      boolean that_present_itemId = true;
22195
      if (this_present_itemId || that_present_itemId) {
22196
        if (!(this_present_itemId && that_present_itemId))
22197
          return false;
22198
        if (this.itemId != that.itemId)
22199
          return false;
22200
      }
22201
 
22202
      boolean this_present_quantity = true;
22203
      boolean that_present_quantity = true;
22204
      if (this_present_quantity || that_present_quantity) {
22205
        if (!(this_present_quantity && that_present_quantity))
22206
          return false;
22207
        if (this.quantity != that.quantity)
22208
          return false;
22209
      }
22210
 
48 ashish 22211
      return true;
22212
    }
22213
 
22214
    @Override
22215
    public int hashCode() {
22216
      return 0;
22217
    }
22218
 
553 chandransh 22219
    public int compareTo(changeQuantity_args other) {
48 ashish 22220
      if (!getClass().equals(other.getClass())) {
22221
        return getClass().getName().compareTo(other.getClass().getName());
22222
      }
22223
 
22224
      int lastComparison = 0;
553 chandransh 22225
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 22226
 
553 chandransh 22227
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22228
      if (lastComparison != 0) {
22229
        return lastComparison;
22230
      }
553 chandransh 22231
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22232
      if (lastComparison != 0) {
22233
        return lastComparison;
22234
      }
553 chandransh 22235
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
22236
      if (lastComparison != 0) {
22237
        return lastComparison;
22238
      }
22239
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
22240
      if (lastComparison != 0) {
22241
        return lastComparison;
22242
      }
22243
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
22244
      if (lastComparison != 0) {
22245
        return lastComparison;
22246
      }
22247
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
22248
      if (lastComparison != 0) {
22249
        return lastComparison;
22250
      }
48 ashish 22251
      return 0;
22252
    }
22253
 
22254
    public void read(TProtocol iprot) throws TException {
22255
      TField field;
22256
      iprot.readStructBegin();
22257
      while (true)
22258
      {
22259
        field = iprot.readFieldBegin();
22260
        if (field.type == TType.STOP) { 
22261
          break;
22262
        }
22263
        _Fields fieldId = _Fields.findByThriftId(field.id);
22264
        if (fieldId == null) {
22265
          TProtocolUtil.skip(iprot, field.type);
22266
        } else {
22267
          switch (fieldId) {
553 chandransh 22268
            case CART_ID:
48 ashish 22269
              if (field.type == TType.I64) {
553 chandransh 22270
                this.cartId = iprot.readI64();
22271
                setCartIdIsSet(true);
48 ashish 22272
              } else { 
22273
                TProtocolUtil.skip(iprot, field.type);
22274
              }
22275
              break;
553 chandransh 22276
            case ITEM_ID:
22277
              if (field.type == TType.I64) {
22278
                this.itemId = iprot.readI64();
22279
                setItemIdIsSet(true);
22280
              } else { 
22281
                TProtocolUtil.skip(iprot, field.type);
22282
              }
22283
              break;
22284
            case QUANTITY:
22285
              if (field.type == TType.I64) {
22286
                this.quantity = iprot.readI64();
22287
                setQuantityIsSet(true);
22288
              } else { 
22289
                TProtocolUtil.skip(iprot, field.type);
22290
              }
22291
              break;
48 ashish 22292
          }
22293
          iprot.readFieldEnd();
22294
        }
22295
      }
22296
      iprot.readStructEnd();
22297
      validate();
22298
    }
22299
 
22300
    public void write(TProtocol oprot) throws TException {
22301
      validate();
22302
 
22303
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22304
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22305
      oprot.writeI64(this.cartId);
48 ashish 22306
      oprot.writeFieldEnd();
553 chandransh 22307
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22308
      oprot.writeI64(this.itemId);
22309
      oprot.writeFieldEnd();
22310
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
22311
      oprot.writeI64(this.quantity);
22312
      oprot.writeFieldEnd();
48 ashish 22313
      oprot.writeFieldStop();
22314
      oprot.writeStructEnd();
22315
    }
22316
 
22317
    @Override
22318
    public String toString() {
553 chandransh 22319
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 22320
      boolean first = true;
22321
 
553 chandransh 22322
      sb.append("cartId:");
22323
      sb.append(this.cartId);
48 ashish 22324
      first = false;
553 chandransh 22325
      if (!first) sb.append(", ");
22326
      sb.append("itemId:");
22327
      sb.append(this.itemId);
22328
      first = false;
22329
      if (!first) sb.append(", ");
22330
      sb.append("quantity:");
22331
      sb.append(this.quantity);
22332
      first = false;
48 ashish 22333
      sb.append(")");
22334
      return sb.toString();
22335
    }
22336
 
22337
    public void validate() throws TException {
22338
      // check for required fields
22339
    }
22340
 
22341
  }
22342
 
553 chandransh 22343
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
22344
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 22345
 
553 chandransh 22346
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22347
 
553 chandransh 22348
    private ShoppingCartException scx;
48 ashish 22349
 
22350
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22351
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22352
      SCX((short)1, "scx");
48 ashish 22353
 
22354
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22355
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22356
 
22357
      static {
22358
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22359
          byId.put((int)field._thriftId, field);
22360
          byName.put(field.getFieldName(), field);
22361
        }
22362
      }
22363
 
22364
      /**
22365
       * Find the _Fields constant that matches fieldId, or null if its not found.
22366
       */
22367
      public static _Fields findByThriftId(int fieldId) {
22368
        return byId.get(fieldId);
22369
      }
22370
 
22371
      /**
22372
       * Find the _Fields constant that matches fieldId, throwing an exception
22373
       * if it is not found.
22374
       */
22375
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22376
        _Fields fields = findByThriftId(fieldId);
22377
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22378
        return fields;
22379
      }
22380
 
22381
      /**
22382
       * Find the _Fields constant that matches name, or null if its not found.
22383
       */
22384
      public static _Fields findByName(String name) {
22385
        return byName.get(name);
22386
      }
22387
 
22388
      private final short _thriftId;
22389
      private final String _fieldName;
22390
 
22391
      _Fields(short thriftId, String fieldName) {
22392
        _thriftId = thriftId;
22393
        _fieldName = fieldName;
22394
      }
22395
 
22396
      public short getThriftFieldId() {
22397
        return _thriftId;
22398
      }
22399
 
22400
      public String getFieldName() {
22401
        return _fieldName;
22402
      }
22403
    }
22404
 
22405
    // isset id assignments
22406
 
22407
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 22408
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 22409
          new FieldValueMetaData(TType.STRUCT)));
22410
    }});
22411
 
22412
    static {
553 chandransh 22413
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 22414
    }
22415
 
553 chandransh 22416
    public changeQuantity_result() {
48 ashish 22417
    }
22418
 
553 chandransh 22419
    public changeQuantity_result(
22420
      ShoppingCartException scx)
48 ashish 22421
    {
22422
      this();
553 chandransh 22423
      this.scx = scx;
48 ashish 22424
    }
22425
 
22426
    /**
22427
     * Performs a deep copy on <i>other</i>.
22428
     */
553 chandransh 22429
    public changeQuantity_result(changeQuantity_result other) {
22430
      if (other.isSetScx()) {
22431
        this.scx = new ShoppingCartException(other.scx);
22432
      }
22433
    }
22434
 
22435
    public changeQuantity_result deepCopy() {
22436
      return new changeQuantity_result(this);
22437
    }
22438
 
22439
    @Deprecated
22440
    public changeQuantity_result clone() {
22441
      return new changeQuantity_result(this);
22442
    }
22443
 
22444
    public ShoppingCartException getScx() {
22445
      return this.scx;
22446
    }
22447
 
22448
    public changeQuantity_result setScx(ShoppingCartException scx) {
22449
      this.scx = scx;
22450
      return this;
22451
    }
22452
 
22453
    public void unsetScx() {
22454
      this.scx = null;
22455
    }
22456
 
22457
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22458
    public boolean isSetScx() {
22459
      return this.scx != null;
22460
    }
22461
 
22462
    public void setScxIsSet(boolean value) {
22463
      if (!value) {
22464
        this.scx = null;
22465
      }
22466
    }
22467
 
22468
    public void setFieldValue(_Fields field, Object value) {
22469
      switch (field) {
22470
      case SCX:
22471
        if (value == null) {
22472
          unsetScx();
22473
        } else {
22474
          setScx((ShoppingCartException)value);
22475
        }
22476
        break;
22477
 
22478
      }
22479
    }
22480
 
22481
    public void setFieldValue(int fieldID, Object value) {
22482
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22483
    }
22484
 
22485
    public Object getFieldValue(_Fields field) {
22486
      switch (field) {
22487
      case SCX:
22488
        return getScx();
22489
 
22490
      }
22491
      throw new IllegalStateException();
22492
    }
22493
 
22494
    public Object getFieldValue(int fieldId) {
22495
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22496
    }
22497
 
22498
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22499
    public boolean isSet(_Fields field) {
22500
      switch (field) {
22501
      case SCX:
22502
        return isSetScx();
22503
      }
22504
      throw new IllegalStateException();
22505
    }
22506
 
22507
    public boolean isSet(int fieldID) {
22508
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22509
    }
22510
 
22511
    @Override
22512
    public boolean equals(Object that) {
22513
      if (that == null)
22514
        return false;
22515
      if (that instanceof changeQuantity_result)
22516
        return this.equals((changeQuantity_result)that);
22517
      return false;
22518
    }
22519
 
22520
    public boolean equals(changeQuantity_result that) {
22521
      if (that == null)
22522
        return false;
22523
 
22524
      boolean this_present_scx = true && this.isSetScx();
22525
      boolean that_present_scx = true && that.isSetScx();
22526
      if (this_present_scx || that_present_scx) {
22527
        if (!(this_present_scx && that_present_scx))
22528
          return false;
22529
        if (!this.scx.equals(that.scx))
22530
          return false;
22531
      }
22532
 
22533
      return true;
22534
    }
22535
 
22536
    @Override
22537
    public int hashCode() {
22538
      return 0;
22539
    }
22540
 
22541
    public int compareTo(changeQuantity_result other) {
22542
      if (!getClass().equals(other.getClass())) {
22543
        return getClass().getName().compareTo(other.getClass().getName());
22544
      }
22545
 
22546
      int lastComparison = 0;
22547
      changeQuantity_result typedOther = (changeQuantity_result)other;
22548
 
22549
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22550
      if (lastComparison != 0) {
22551
        return lastComparison;
22552
      }
22553
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22554
      if (lastComparison != 0) {
22555
        return lastComparison;
22556
      }
22557
      return 0;
22558
    }
22559
 
22560
    public void read(TProtocol iprot) throws TException {
22561
      TField field;
22562
      iprot.readStructBegin();
22563
      while (true)
22564
      {
22565
        field = iprot.readFieldBegin();
22566
        if (field.type == TType.STOP) { 
22567
          break;
22568
        }
22569
        _Fields fieldId = _Fields.findByThriftId(field.id);
22570
        if (fieldId == null) {
22571
          TProtocolUtil.skip(iprot, field.type);
22572
        } else {
22573
          switch (fieldId) {
22574
            case SCX:
22575
              if (field.type == TType.STRUCT) {
22576
                this.scx = new ShoppingCartException();
22577
                this.scx.read(iprot);
22578
              } else { 
22579
                TProtocolUtil.skip(iprot, field.type);
22580
              }
22581
              break;
22582
          }
22583
          iprot.readFieldEnd();
22584
        }
22585
      }
22586
      iprot.readStructEnd();
22587
      validate();
22588
    }
22589
 
22590
    public void write(TProtocol oprot) throws TException {
22591
      oprot.writeStructBegin(STRUCT_DESC);
22592
 
22593
      if (this.isSetScx()) {
22594
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22595
        this.scx.write(oprot);
22596
        oprot.writeFieldEnd();
22597
      }
22598
      oprot.writeFieldStop();
22599
      oprot.writeStructEnd();
22600
    }
22601
 
22602
    @Override
22603
    public String toString() {
22604
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
22605
      boolean first = true;
22606
 
22607
      sb.append("scx:");
22608
      if (this.scx == null) {
22609
        sb.append("null");
22610
      } else {
22611
        sb.append(this.scx);
22612
      }
22613
      first = false;
22614
      sb.append(")");
22615
      return sb.toString();
22616
    }
22617
 
22618
    public void validate() throws TException {
22619
      // check for required fields
22620
    }
22621
 
22622
  }
22623
 
22624
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
22625
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
22626
 
22627
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22628
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
22629
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
22630
 
22631
    private long cartId;
22632
    private long itemId;
22633
    private LineStatus status;
22634
 
22635
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22636
    public enum _Fields implements TFieldIdEnum {
22637
      CART_ID((short)1, "cartId"),
22638
      ITEM_ID((short)2, "itemId"),
22639
      /**
22640
       * 
22641
       * @see LineStatus
22642
       */
22643
      STATUS((short)3, "status");
22644
 
22645
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22646
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22647
 
22648
      static {
22649
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22650
          byId.put((int)field._thriftId, field);
22651
          byName.put(field.getFieldName(), field);
22652
        }
22653
      }
22654
 
22655
      /**
22656
       * Find the _Fields constant that matches fieldId, or null if its not found.
22657
       */
22658
      public static _Fields findByThriftId(int fieldId) {
22659
        return byId.get(fieldId);
22660
      }
22661
 
22662
      /**
22663
       * Find the _Fields constant that matches fieldId, throwing an exception
22664
       * if it is not found.
22665
       */
22666
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22667
        _Fields fields = findByThriftId(fieldId);
22668
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22669
        return fields;
22670
      }
22671
 
22672
      /**
22673
       * Find the _Fields constant that matches name, or null if its not found.
22674
       */
22675
      public static _Fields findByName(String name) {
22676
        return byName.get(name);
22677
      }
22678
 
22679
      private final short _thriftId;
22680
      private final String _fieldName;
22681
 
22682
      _Fields(short thriftId, String fieldName) {
22683
        _thriftId = thriftId;
22684
        _fieldName = fieldName;
22685
      }
22686
 
22687
      public short getThriftFieldId() {
22688
        return _thriftId;
22689
      }
22690
 
22691
      public String getFieldName() {
22692
        return _fieldName;
22693
      }
22694
    }
22695
 
22696
    // isset id assignments
22697
    private static final int __CARTID_ISSET_ID = 0;
22698
    private static final int __ITEMID_ISSET_ID = 1;
22699
    private BitSet __isset_bit_vector = new BitSet(2);
22700
 
22701
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22702
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22703
          new FieldValueMetaData(TType.I64)));
22704
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22705
          new FieldValueMetaData(TType.I64)));
22706
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
22707
          new EnumMetaData(TType.ENUM, LineStatus.class)));
22708
    }});
22709
 
22710
    static {
22711
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
22712
    }
22713
 
22714
    public changeItemStatus_args() {
22715
    }
22716
 
22717
    public changeItemStatus_args(
22718
      long cartId,
22719
      long itemId,
22720
      LineStatus status)
22721
    {
22722
      this();
22723
      this.cartId = cartId;
22724
      setCartIdIsSet(true);
22725
      this.itemId = itemId;
22726
      setItemIdIsSet(true);
22727
      this.status = status;
22728
    }
22729
 
22730
    /**
22731
     * Performs a deep copy on <i>other</i>.
22732
     */
22733
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 22734
      __isset_bit_vector.clear();
22735
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22736
      this.cartId = other.cartId;
22737
      this.itemId = other.itemId;
22738
      if (other.isSetStatus()) {
22739
        this.status = other.status;
48 ashish 22740
      }
22741
    }
22742
 
553 chandransh 22743
    public changeItemStatus_args deepCopy() {
22744
      return new changeItemStatus_args(this);
48 ashish 22745
    }
22746
 
22747
    @Deprecated
553 chandransh 22748
    public changeItemStatus_args clone() {
22749
      return new changeItemStatus_args(this);
48 ashish 22750
    }
22751
 
553 chandransh 22752
    public long getCartId() {
22753
      return this.cartId;
48 ashish 22754
    }
22755
 
553 chandransh 22756
    public changeItemStatus_args setCartId(long cartId) {
22757
      this.cartId = cartId;
22758
      setCartIdIsSet(true);
48 ashish 22759
      return this;
22760
    }
22761
 
553 chandransh 22762
    public void unsetCartId() {
22763
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22764
    }
22765
 
553 chandransh 22766
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22767
    public boolean isSetCartId() {
22768
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22769
    }
22770
 
553 chandransh 22771
    public void setCartIdIsSet(boolean value) {
22772
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22773
    }
22774
 
553 chandransh 22775
    public long getItemId() {
22776
      return this.itemId;
48 ashish 22777
    }
22778
 
553 chandransh 22779
    public changeItemStatus_args setItemId(long itemId) {
22780
      this.itemId = itemId;
22781
      setItemIdIsSet(true);
48 ashish 22782
      return this;
22783
    }
22784
 
553 chandransh 22785
    public void unsetItemId() {
22786
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 22787
    }
22788
 
553 chandransh 22789
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22790
    public boolean isSetItemId() {
22791
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 22792
    }
22793
 
553 chandransh 22794
    public void setItemIdIsSet(boolean value) {
22795
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22796
    }
22797
 
22798
    /**
22799
     * 
22800
     * @see LineStatus
22801
     */
22802
    public LineStatus getStatus() {
22803
      return this.status;
22804
    }
22805
 
22806
    /**
22807
     * 
22808
     * @see LineStatus
22809
     */
22810
    public changeItemStatus_args setStatus(LineStatus status) {
22811
      this.status = status;
22812
      return this;
22813
    }
22814
 
22815
    public void unsetStatus() {
22816
      this.status = null;
22817
    }
22818
 
22819
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
22820
    public boolean isSetStatus() {
22821
      return this.status != null;
22822
    }
22823
 
22824
    public void setStatusIsSet(boolean value) {
48 ashish 22825
      if (!value) {
553 chandransh 22826
        this.status = null;
48 ashish 22827
      }
22828
    }
22829
 
22830
    public void setFieldValue(_Fields field, Object value) {
22831
      switch (field) {
553 chandransh 22832
      case CART_ID:
48 ashish 22833
        if (value == null) {
553 chandransh 22834
          unsetCartId();
48 ashish 22835
        } else {
553 chandransh 22836
          setCartId((Long)value);
48 ashish 22837
        }
22838
        break;
22839
 
553 chandransh 22840
      case ITEM_ID:
48 ashish 22841
        if (value == null) {
553 chandransh 22842
          unsetItemId();
48 ashish 22843
        } else {
553 chandransh 22844
          setItemId((Long)value);
48 ashish 22845
        }
22846
        break;
22847
 
553 chandransh 22848
      case STATUS:
22849
        if (value == null) {
22850
          unsetStatus();
22851
        } else {
22852
          setStatus((LineStatus)value);
22853
        }
22854
        break;
22855
 
48 ashish 22856
      }
22857
    }
22858
 
22859
    public void setFieldValue(int fieldID, Object value) {
22860
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22861
    }
22862
 
22863
    public Object getFieldValue(_Fields field) {
22864
      switch (field) {
553 chandransh 22865
      case CART_ID:
22866
        return new Long(getCartId());
48 ashish 22867
 
553 chandransh 22868
      case ITEM_ID:
22869
        return new Long(getItemId());
48 ashish 22870
 
553 chandransh 22871
      case STATUS:
22872
        return getStatus();
22873
 
48 ashish 22874
      }
22875
      throw new IllegalStateException();
22876
    }
22877
 
22878
    public Object getFieldValue(int fieldId) {
22879
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22880
    }
22881
 
22882
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22883
    public boolean isSet(_Fields field) {
22884
      switch (field) {
553 chandransh 22885
      case CART_ID:
22886
        return isSetCartId();
22887
      case ITEM_ID:
22888
        return isSetItemId();
22889
      case STATUS:
22890
        return isSetStatus();
48 ashish 22891
      }
22892
      throw new IllegalStateException();
22893
    }
22894
 
22895
    public boolean isSet(int fieldID) {
22896
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22897
    }
22898
 
22899
    @Override
22900
    public boolean equals(Object that) {
22901
      if (that == null)
22902
        return false;
553 chandransh 22903
      if (that instanceof changeItemStatus_args)
22904
        return this.equals((changeItemStatus_args)that);
48 ashish 22905
      return false;
22906
    }
22907
 
553 chandransh 22908
    public boolean equals(changeItemStatus_args that) {
48 ashish 22909
      if (that == null)
22910
        return false;
22911
 
553 chandransh 22912
      boolean this_present_cartId = true;
22913
      boolean that_present_cartId = true;
22914
      if (this_present_cartId || that_present_cartId) {
22915
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22916
          return false;
553 chandransh 22917
        if (this.cartId != that.cartId)
48 ashish 22918
          return false;
22919
      }
22920
 
553 chandransh 22921
      boolean this_present_itemId = true;
22922
      boolean that_present_itemId = true;
22923
      if (this_present_itemId || that_present_itemId) {
22924
        if (!(this_present_itemId && that_present_itemId))
48 ashish 22925
          return false;
553 chandransh 22926
        if (this.itemId != that.itemId)
48 ashish 22927
          return false;
22928
      }
22929
 
553 chandransh 22930
      boolean this_present_status = true && this.isSetStatus();
22931
      boolean that_present_status = true && that.isSetStatus();
22932
      if (this_present_status || that_present_status) {
22933
        if (!(this_present_status && that_present_status))
22934
          return false;
22935
        if (!this.status.equals(that.status))
22936
          return false;
22937
      }
22938
 
48 ashish 22939
      return true;
22940
    }
22941
 
22942
    @Override
22943
    public int hashCode() {
22944
      return 0;
22945
    }
22946
 
553 chandransh 22947
    public int compareTo(changeItemStatus_args other) {
48 ashish 22948
      if (!getClass().equals(other.getClass())) {
22949
        return getClass().getName().compareTo(other.getClass().getName());
22950
      }
22951
 
22952
      int lastComparison = 0;
553 chandransh 22953
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 22954
 
553 chandransh 22955
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22956
      if (lastComparison != 0) {
22957
        return lastComparison;
22958
      }
553 chandransh 22959
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22960
      if (lastComparison != 0) {
22961
        return lastComparison;
22962
      }
553 chandransh 22963
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 22964
      if (lastComparison != 0) {
22965
        return lastComparison;
22966
      }
553 chandransh 22967
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 22968
      if (lastComparison != 0) {
22969
        return lastComparison;
22970
      }
553 chandransh 22971
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
22972
      if (lastComparison != 0) {
22973
        return lastComparison;
22974
      }
22975
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
22976
      if (lastComparison != 0) {
22977
        return lastComparison;
22978
      }
48 ashish 22979
      return 0;
22980
    }
22981
 
22982
    public void read(TProtocol iprot) throws TException {
22983
      TField field;
22984
      iprot.readStructBegin();
22985
      while (true)
22986
      {
22987
        field = iprot.readFieldBegin();
22988
        if (field.type == TType.STOP) { 
22989
          break;
22990
        }
22991
        _Fields fieldId = _Fields.findByThriftId(field.id);
22992
        if (fieldId == null) {
22993
          TProtocolUtil.skip(iprot, field.type);
22994
        } else {
22995
          switch (fieldId) {
553 chandransh 22996
            case CART_ID:
22997
              if (field.type == TType.I64) {
22998
                this.cartId = iprot.readI64();
22999
                setCartIdIsSet(true);
48 ashish 23000
              } else { 
23001
                TProtocolUtil.skip(iprot, field.type);
23002
              }
23003
              break;
553 chandransh 23004
            case ITEM_ID:
23005
              if (field.type == TType.I64) {
23006
                this.itemId = iprot.readI64();
23007
                setItemIdIsSet(true);
48 ashish 23008
              } else { 
23009
                TProtocolUtil.skip(iprot, field.type);
23010
              }
23011
              break;
553 chandransh 23012
            case STATUS:
23013
              if (field.type == TType.I32) {
23014
                this.status = LineStatus.findByValue(iprot.readI32());
23015
              } else { 
23016
                TProtocolUtil.skip(iprot, field.type);
23017
              }
23018
              break;
48 ashish 23019
          }
23020
          iprot.readFieldEnd();
23021
        }
23022
      }
23023
      iprot.readStructEnd();
23024
      validate();
23025
    }
23026
 
23027
    public void write(TProtocol oprot) throws TException {
553 chandransh 23028
      validate();
23029
 
48 ashish 23030
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 23031
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23032
      oprot.writeI64(this.cartId);
23033
      oprot.writeFieldEnd();
23034
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
23035
      oprot.writeI64(this.itemId);
23036
      oprot.writeFieldEnd();
23037
      if (this.status != null) {
23038
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
23039
        oprot.writeI32(this.status.getValue());
48 ashish 23040
        oprot.writeFieldEnd();
23041
      }
23042
      oprot.writeFieldStop();
23043
      oprot.writeStructEnd();
23044
    }
23045
 
23046
    @Override
23047
    public String toString() {
553 chandransh 23048
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 23049
      boolean first = true;
23050
 
553 chandransh 23051
      sb.append("cartId:");
23052
      sb.append(this.cartId);
48 ashish 23053
      first = false;
23054
      if (!first) sb.append(", ");
553 chandransh 23055
      sb.append("itemId:");
23056
      sb.append(this.itemId);
23057
      first = false;
23058
      if (!first) sb.append(", ");
23059
      sb.append("status:");
23060
      if (this.status == null) {
48 ashish 23061
        sb.append("null");
23062
      } else {
553 chandransh 23063
        String status_name = status.name();
23064
        if (status_name != null) {
23065
          sb.append(status_name);
23066
          sb.append(" (");
23067
        }
23068
        sb.append(this.status);
23069
        if (status_name != null) {
23070
          sb.append(")");
23071
        }
48 ashish 23072
      }
23073
      first = false;
23074
      sb.append(")");
23075
      return sb.toString();
23076
    }
23077
 
23078
    public void validate() throws TException {
23079
      // check for required fields
23080
    }
23081
 
23082
  }
23083
 
553 chandransh 23084
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
23085
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 23086
 
553 chandransh 23087
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 23088
 
553 chandransh 23089
    private ShoppingCartException scx;
48 ashish 23090
 
23091
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23092
    public enum _Fields implements TFieldIdEnum {
553 chandransh 23093
      SCX((short)1, "scx");
48 ashish 23094
 
23095
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23097
 
23098
      static {
23099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23100
          byId.put((int)field._thriftId, field);
23101
          byName.put(field.getFieldName(), field);
23102
        }
23103
      }
23104
 
23105
      /**
23106
       * Find the _Fields constant that matches fieldId, or null if its not found.
23107
       */
23108
      public static _Fields findByThriftId(int fieldId) {
23109
        return byId.get(fieldId);
23110
      }
23111
 
23112
      /**
23113
       * Find the _Fields constant that matches fieldId, throwing an exception
23114
       * if it is not found.
23115
       */
23116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23117
        _Fields fields = findByThriftId(fieldId);
23118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23119
        return fields;
23120
      }
23121
 
23122
      /**
23123
       * Find the _Fields constant that matches name, or null if its not found.
23124
       */
23125
      public static _Fields findByName(String name) {
23126
        return byName.get(name);
23127
      }
23128
 
23129
      private final short _thriftId;
23130
      private final String _fieldName;
23131
 
23132
      _Fields(short thriftId, String fieldName) {
23133
        _thriftId = thriftId;
23134
        _fieldName = fieldName;
23135
      }
23136
 
23137
      public short getThriftFieldId() {
23138
        return _thriftId;
23139
      }
23140
 
23141
      public String getFieldName() {
23142
        return _fieldName;
23143
      }
23144
    }
23145
 
23146
    // isset id assignments
553 chandransh 23147
 
23148
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23149
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23150
          new FieldValueMetaData(TType.STRUCT)));
23151
    }});
23152
 
23153
    static {
23154
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
23155
    }
23156
 
23157
    public changeItemStatus_result() {
23158
    }
23159
 
23160
    public changeItemStatus_result(
23161
      ShoppingCartException scx)
23162
    {
23163
      this();
23164
      this.scx = scx;
23165
    }
23166
 
23167
    /**
23168
     * Performs a deep copy on <i>other</i>.
23169
     */
23170
    public changeItemStatus_result(changeItemStatus_result other) {
23171
      if (other.isSetScx()) {
23172
        this.scx = new ShoppingCartException(other.scx);
23173
      }
23174
    }
23175
 
23176
    public changeItemStatus_result deepCopy() {
23177
      return new changeItemStatus_result(this);
23178
    }
23179
 
23180
    @Deprecated
23181
    public changeItemStatus_result clone() {
23182
      return new changeItemStatus_result(this);
23183
    }
23184
 
23185
    public ShoppingCartException getScx() {
23186
      return this.scx;
23187
    }
23188
 
23189
    public changeItemStatus_result setScx(ShoppingCartException scx) {
23190
      this.scx = scx;
23191
      return this;
23192
    }
23193
 
23194
    public void unsetScx() {
23195
      this.scx = null;
23196
    }
23197
 
23198
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23199
    public boolean isSetScx() {
23200
      return this.scx != null;
23201
    }
23202
 
23203
    public void setScxIsSet(boolean value) {
23204
      if (!value) {
23205
        this.scx = null;
23206
      }
23207
    }
23208
 
23209
    public void setFieldValue(_Fields field, Object value) {
23210
      switch (field) {
23211
      case SCX:
23212
        if (value == null) {
23213
          unsetScx();
23214
        } else {
23215
          setScx((ShoppingCartException)value);
23216
        }
23217
        break;
23218
 
23219
      }
23220
    }
23221
 
23222
    public void setFieldValue(int fieldID, Object value) {
23223
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23224
    }
23225
 
23226
    public Object getFieldValue(_Fields field) {
23227
      switch (field) {
23228
      case SCX:
23229
        return getScx();
23230
 
23231
      }
23232
      throw new IllegalStateException();
23233
    }
23234
 
23235
    public Object getFieldValue(int fieldId) {
23236
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23237
    }
23238
 
23239
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23240
    public boolean isSet(_Fields field) {
23241
      switch (field) {
23242
      case SCX:
23243
        return isSetScx();
23244
      }
23245
      throw new IllegalStateException();
23246
    }
23247
 
23248
    public boolean isSet(int fieldID) {
23249
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23250
    }
23251
 
23252
    @Override
23253
    public boolean equals(Object that) {
23254
      if (that == null)
23255
        return false;
23256
      if (that instanceof changeItemStatus_result)
23257
        return this.equals((changeItemStatus_result)that);
23258
      return false;
23259
    }
23260
 
23261
    public boolean equals(changeItemStatus_result that) {
23262
      if (that == null)
23263
        return false;
23264
 
23265
      boolean this_present_scx = true && this.isSetScx();
23266
      boolean that_present_scx = true && that.isSetScx();
23267
      if (this_present_scx || that_present_scx) {
23268
        if (!(this_present_scx && that_present_scx))
23269
          return false;
23270
        if (!this.scx.equals(that.scx))
23271
          return false;
23272
      }
23273
 
23274
      return true;
23275
    }
23276
 
23277
    @Override
23278
    public int hashCode() {
23279
      return 0;
23280
    }
23281
 
23282
    public int compareTo(changeItemStatus_result other) {
23283
      if (!getClass().equals(other.getClass())) {
23284
        return getClass().getName().compareTo(other.getClass().getName());
23285
      }
23286
 
23287
      int lastComparison = 0;
23288
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
23289
 
23290
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23291
      if (lastComparison != 0) {
23292
        return lastComparison;
23293
      }
23294
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23295
      if (lastComparison != 0) {
23296
        return lastComparison;
23297
      }
23298
      return 0;
23299
    }
23300
 
23301
    public void read(TProtocol iprot) throws TException {
23302
      TField field;
23303
      iprot.readStructBegin();
23304
      while (true)
23305
      {
23306
        field = iprot.readFieldBegin();
23307
        if (field.type == TType.STOP) { 
23308
          break;
23309
        }
23310
        _Fields fieldId = _Fields.findByThriftId(field.id);
23311
        if (fieldId == null) {
23312
          TProtocolUtil.skip(iprot, field.type);
23313
        } else {
23314
          switch (fieldId) {
23315
            case SCX:
23316
              if (field.type == TType.STRUCT) {
23317
                this.scx = new ShoppingCartException();
23318
                this.scx.read(iprot);
23319
              } else { 
23320
                TProtocolUtil.skip(iprot, field.type);
23321
              }
23322
              break;
23323
          }
23324
          iprot.readFieldEnd();
23325
        }
23326
      }
23327
      iprot.readStructEnd();
23328
      validate();
23329
    }
23330
 
23331
    public void write(TProtocol oprot) throws TException {
23332
      oprot.writeStructBegin(STRUCT_DESC);
23333
 
23334
      if (this.isSetScx()) {
23335
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23336
        this.scx.write(oprot);
23337
        oprot.writeFieldEnd();
23338
      }
23339
      oprot.writeFieldStop();
23340
      oprot.writeStructEnd();
23341
    }
23342
 
23343
    @Override
23344
    public String toString() {
23345
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
23346
      boolean first = true;
23347
 
23348
      sb.append("scx:");
23349
      if (this.scx == null) {
23350
        sb.append("null");
23351
      } else {
23352
        sb.append(this.scx);
23353
      }
23354
      first = false;
23355
      sb.append(")");
23356
      return sb.toString();
23357
    }
23358
 
23359
    public void validate() throws TException {
23360
      // check for required fields
23361
    }
23362
 
23363
  }
23364
 
23365
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
23366
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
23367
 
23368
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23369
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
23370
 
23371
    private long cartId;
23372
    private long addressId;
23373
 
23374
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23375
    public enum _Fields implements TFieldIdEnum {
23376
      CART_ID((short)1, "cartId"),
23377
      ADDRESS_ID((short)2, "addressId");
23378
 
23379
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23380
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23381
 
23382
      static {
23383
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23384
          byId.put((int)field._thriftId, field);
23385
          byName.put(field.getFieldName(), field);
23386
        }
23387
      }
23388
 
23389
      /**
23390
       * Find the _Fields constant that matches fieldId, or null if its not found.
23391
       */
23392
      public static _Fields findByThriftId(int fieldId) {
23393
        return byId.get(fieldId);
23394
      }
23395
 
23396
      /**
23397
       * Find the _Fields constant that matches fieldId, throwing an exception
23398
       * if it is not found.
23399
       */
23400
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23401
        _Fields fields = findByThriftId(fieldId);
23402
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23403
        return fields;
23404
      }
23405
 
23406
      /**
23407
       * Find the _Fields constant that matches name, or null if its not found.
23408
       */
23409
      public static _Fields findByName(String name) {
23410
        return byName.get(name);
23411
      }
23412
 
23413
      private final short _thriftId;
23414
      private final String _fieldName;
23415
 
23416
      _Fields(short thriftId, String fieldName) {
23417
        _thriftId = thriftId;
23418
        _fieldName = fieldName;
23419
      }
23420
 
23421
      public short getThriftFieldId() {
23422
        return _thriftId;
23423
      }
23424
 
23425
      public String getFieldName() {
23426
        return _fieldName;
23427
      }
23428
    }
23429
 
23430
    // isset id assignments
23431
    private static final int __CARTID_ISSET_ID = 0;
23432
    private static final int __ADDRESSID_ISSET_ID = 1;
23433
    private BitSet __isset_bit_vector = new BitSet(2);
23434
 
23435
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23436
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
23437
          new FieldValueMetaData(TType.I64)));
23438
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
23439
          new FieldValueMetaData(TType.I64)));
23440
    }});
23441
 
23442
    static {
23443
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
23444
    }
23445
 
23446
    public addAddressToCart_args() {
23447
    }
23448
 
23449
    public addAddressToCart_args(
23450
      long cartId,
23451
      long addressId)
23452
    {
23453
      this();
23454
      this.cartId = cartId;
23455
      setCartIdIsSet(true);
23456
      this.addressId = addressId;
23457
      setAddressIdIsSet(true);
23458
    }
23459
 
23460
    /**
23461
     * Performs a deep copy on <i>other</i>.
23462
     */
23463
    public addAddressToCart_args(addAddressToCart_args other) {
23464
      __isset_bit_vector.clear();
23465
      __isset_bit_vector.or(other.__isset_bit_vector);
23466
      this.cartId = other.cartId;
23467
      this.addressId = other.addressId;
23468
    }
23469
 
23470
    public addAddressToCart_args deepCopy() {
23471
      return new addAddressToCart_args(this);
23472
    }
23473
 
23474
    @Deprecated
23475
    public addAddressToCart_args clone() {
23476
      return new addAddressToCart_args(this);
23477
    }
23478
 
23479
    public long getCartId() {
23480
      return this.cartId;
23481
    }
23482
 
23483
    public addAddressToCart_args setCartId(long cartId) {
23484
      this.cartId = cartId;
23485
      setCartIdIsSet(true);
23486
      return this;
23487
    }
23488
 
23489
    public void unsetCartId() {
23490
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
23491
    }
23492
 
23493
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23494
    public boolean isSetCartId() {
23495
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
23496
    }
23497
 
23498
    public void setCartIdIsSet(boolean value) {
23499
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
23500
    }
23501
 
23502
    public long getAddressId() {
23503
      return this.addressId;
23504
    }
23505
 
23506
    public addAddressToCart_args setAddressId(long addressId) {
23507
      this.addressId = addressId;
23508
      setAddressIdIsSet(true);
23509
      return this;
23510
    }
23511
 
23512
    public void unsetAddressId() {
23513
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
23514
    }
23515
 
23516
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
23517
    public boolean isSetAddressId() {
23518
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
23519
    }
23520
 
23521
    public void setAddressIdIsSet(boolean value) {
23522
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
23523
    }
23524
 
23525
    public void setFieldValue(_Fields field, Object value) {
23526
      switch (field) {
23527
      case CART_ID:
23528
        if (value == null) {
23529
          unsetCartId();
23530
        } else {
23531
          setCartId((Long)value);
23532
        }
23533
        break;
23534
 
23535
      case ADDRESS_ID:
23536
        if (value == null) {
23537
          unsetAddressId();
23538
        } else {
23539
          setAddressId((Long)value);
23540
        }
23541
        break;
23542
 
23543
      }
23544
    }
23545
 
23546
    public void setFieldValue(int fieldID, Object value) {
23547
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23548
    }
23549
 
23550
    public Object getFieldValue(_Fields field) {
23551
      switch (field) {
23552
      case CART_ID:
23553
        return new Long(getCartId());
23554
 
23555
      case ADDRESS_ID:
23556
        return new Long(getAddressId());
23557
 
23558
      }
23559
      throw new IllegalStateException();
23560
    }
23561
 
23562
    public Object getFieldValue(int fieldId) {
23563
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23564
    }
23565
 
23566
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23567
    public boolean isSet(_Fields field) {
23568
      switch (field) {
23569
      case CART_ID:
23570
        return isSetCartId();
23571
      case ADDRESS_ID:
23572
        return isSetAddressId();
23573
      }
23574
      throw new IllegalStateException();
23575
    }
23576
 
23577
    public boolean isSet(int fieldID) {
23578
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23579
    }
23580
 
23581
    @Override
23582
    public boolean equals(Object that) {
23583
      if (that == null)
23584
        return false;
23585
      if (that instanceof addAddressToCart_args)
23586
        return this.equals((addAddressToCart_args)that);
23587
      return false;
23588
    }
23589
 
23590
    public boolean equals(addAddressToCart_args that) {
23591
      if (that == null)
23592
        return false;
23593
 
23594
      boolean this_present_cartId = true;
23595
      boolean that_present_cartId = true;
23596
      if (this_present_cartId || that_present_cartId) {
23597
        if (!(this_present_cartId && that_present_cartId))
23598
          return false;
23599
        if (this.cartId != that.cartId)
23600
          return false;
23601
      }
23602
 
23603
      boolean this_present_addressId = true;
23604
      boolean that_present_addressId = true;
23605
      if (this_present_addressId || that_present_addressId) {
23606
        if (!(this_present_addressId && that_present_addressId))
23607
          return false;
23608
        if (this.addressId != that.addressId)
23609
          return false;
23610
      }
23611
 
23612
      return true;
23613
    }
23614
 
23615
    @Override
23616
    public int hashCode() {
23617
      return 0;
23618
    }
23619
 
23620
    public int compareTo(addAddressToCart_args other) {
23621
      if (!getClass().equals(other.getClass())) {
23622
        return getClass().getName().compareTo(other.getClass().getName());
23623
      }
23624
 
23625
      int lastComparison = 0;
23626
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
23627
 
23628
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
23629
      if (lastComparison != 0) {
23630
        return lastComparison;
23631
      }
23632
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
23633
      if (lastComparison != 0) {
23634
        return lastComparison;
23635
      }
23636
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
23637
      if (lastComparison != 0) {
23638
        return lastComparison;
23639
      }
23640
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
23641
      if (lastComparison != 0) {
23642
        return lastComparison;
23643
      }
23644
      return 0;
23645
    }
23646
 
23647
    public void read(TProtocol iprot) throws TException {
23648
      TField field;
23649
      iprot.readStructBegin();
23650
      while (true)
23651
      {
23652
        field = iprot.readFieldBegin();
23653
        if (field.type == TType.STOP) { 
23654
          break;
23655
        }
23656
        _Fields fieldId = _Fields.findByThriftId(field.id);
23657
        if (fieldId == null) {
23658
          TProtocolUtil.skip(iprot, field.type);
23659
        } else {
23660
          switch (fieldId) {
23661
            case CART_ID:
23662
              if (field.type == TType.I64) {
23663
                this.cartId = iprot.readI64();
23664
                setCartIdIsSet(true);
23665
              } else { 
23666
                TProtocolUtil.skip(iprot, field.type);
23667
              }
23668
              break;
23669
            case ADDRESS_ID:
23670
              if (field.type == TType.I64) {
23671
                this.addressId = iprot.readI64();
23672
                setAddressIdIsSet(true);
23673
              } else { 
23674
                TProtocolUtil.skip(iprot, field.type);
23675
              }
23676
              break;
23677
          }
23678
          iprot.readFieldEnd();
23679
        }
23680
      }
23681
      iprot.readStructEnd();
23682
      validate();
23683
    }
23684
 
23685
    public void write(TProtocol oprot) throws TException {
23686
      validate();
23687
 
23688
      oprot.writeStructBegin(STRUCT_DESC);
23689
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23690
      oprot.writeI64(this.cartId);
23691
      oprot.writeFieldEnd();
23692
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
23693
      oprot.writeI64(this.addressId);
23694
      oprot.writeFieldEnd();
23695
      oprot.writeFieldStop();
23696
      oprot.writeStructEnd();
23697
    }
23698
 
23699
    @Override
23700
    public String toString() {
23701
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
23702
      boolean first = true;
23703
 
23704
      sb.append("cartId:");
23705
      sb.append(this.cartId);
23706
      first = false;
23707
      if (!first) sb.append(", ");
23708
      sb.append("addressId:");
23709
      sb.append(this.addressId);
23710
      first = false;
23711
      sb.append(")");
23712
      return sb.toString();
23713
    }
23714
 
23715
    public void validate() throws TException {
23716
      // check for required fields
23717
    }
23718
 
23719
  }
23720
 
23721
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
23722
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
23723
 
578 chandransh 23724
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 23725
 
578 chandransh 23726
    private ShoppingCartException scx;
553 chandransh 23727
 
23728
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23729
    public enum _Fields implements TFieldIdEnum {
578 chandransh 23730
      SCX((short)1, "scx");
553 chandransh 23731
 
23732
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23733
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23734
 
23735
      static {
23736
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23737
          byId.put((int)field._thriftId, field);
23738
          byName.put(field.getFieldName(), field);
23739
        }
23740
      }
23741
 
23742
      /**
23743
       * Find the _Fields constant that matches fieldId, or null if its not found.
23744
       */
23745
      public static _Fields findByThriftId(int fieldId) {
23746
        return byId.get(fieldId);
23747
      }
23748
 
23749
      /**
23750
       * Find the _Fields constant that matches fieldId, throwing an exception
23751
       * if it is not found.
23752
       */
23753
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23754
        _Fields fields = findByThriftId(fieldId);
23755
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23756
        return fields;
23757
      }
23758
 
23759
      /**
23760
       * Find the _Fields constant that matches name, or null if its not found.
23761
       */
23762
      public static _Fields findByName(String name) {
23763
        return byName.get(name);
23764
      }
23765
 
23766
      private final short _thriftId;
23767
      private final String _fieldName;
23768
 
23769
      _Fields(short thriftId, String fieldName) {
23770
        _thriftId = thriftId;
23771
        _fieldName = fieldName;
23772
      }
23773
 
23774
      public short getThriftFieldId() {
23775
        return _thriftId;
23776
      }
23777
 
23778
      public String getFieldName() {
23779
        return _fieldName;
23780
      }
23781
    }
578 chandransh 23782
 
23783
    // isset id assignments
23784
 
553 chandransh 23785
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 23786
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23787
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 23788
    }});
23789
 
23790
    static {
23791
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
23792
    }
23793
 
23794
    public addAddressToCart_result() {
23795
    }
23796
 
578 chandransh 23797
    public addAddressToCart_result(
23798
      ShoppingCartException scx)
23799
    {
23800
      this();
23801
      this.scx = scx;
23802
    }
23803
 
553 chandransh 23804
    /**
23805
     * Performs a deep copy on <i>other</i>.
23806
     */
23807
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 23808
      if (other.isSetScx()) {
23809
        this.scx = new ShoppingCartException(other.scx);
23810
      }
553 chandransh 23811
    }
23812
 
23813
    public addAddressToCart_result deepCopy() {
23814
      return new addAddressToCart_result(this);
23815
    }
23816
 
23817
    @Deprecated
23818
    public addAddressToCart_result clone() {
23819
      return new addAddressToCart_result(this);
23820
    }
23821
 
578 chandransh 23822
    public ShoppingCartException getScx() {
23823
      return this.scx;
23824
    }
23825
 
23826
    public addAddressToCart_result setScx(ShoppingCartException scx) {
23827
      this.scx = scx;
23828
      return this;
23829
    }
23830
 
23831
    public void unsetScx() {
23832
      this.scx = null;
23833
    }
23834
 
23835
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23836
    public boolean isSetScx() {
23837
      return this.scx != null;
23838
    }
23839
 
23840
    public void setScxIsSet(boolean value) {
23841
      if (!value) {
23842
        this.scx = null;
23843
      }
23844
    }
23845
 
553 chandransh 23846
    public void setFieldValue(_Fields field, Object value) {
23847
      switch (field) {
578 chandransh 23848
      case SCX:
23849
        if (value == null) {
23850
          unsetScx();
23851
        } else {
23852
          setScx((ShoppingCartException)value);
23853
        }
23854
        break;
23855
 
553 chandransh 23856
      }
23857
    }
23858
 
23859
    public void setFieldValue(int fieldID, Object value) {
23860
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23861
    }
23862
 
23863
    public Object getFieldValue(_Fields field) {
23864
      switch (field) {
578 chandransh 23865
      case SCX:
23866
        return getScx();
23867
 
553 chandransh 23868
      }
23869
      throw new IllegalStateException();
23870
    }
23871
 
23872
    public Object getFieldValue(int fieldId) {
23873
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23874
    }
23875
 
23876
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23877
    public boolean isSet(_Fields field) {
23878
      switch (field) {
578 chandransh 23879
      case SCX:
23880
        return isSetScx();
553 chandransh 23881
      }
23882
      throw new IllegalStateException();
23883
    }
23884
 
23885
    public boolean isSet(int fieldID) {
23886
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23887
    }
23888
 
23889
    @Override
23890
    public boolean equals(Object that) {
23891
      if (that == null)
23892
        return false;
23893
      if (that instanceof addAddressToCart_result)
23894
        return this.equals((addAddressToCart_result)that);
23895
      return false;
23896
    }
23897
 
23898
    public boolean equals(addAddressToCart_result that) {
23899
      if (that == null)
23900
        return false;
23901
 
578 chandransh 23902
      boolean this_present_scx = true && this.isSetScx();
23903
      boolean that_present_scx = true && that.isSetScx();
23904
      if (this_present_scx || that_present_scx) {
23905
        if (!(this_present_scx && that_present_scx))
23906
          return false;
23907
        if (!this.scx.equals(that.scx))
23908
          return false;
23909
      }
23910
 
553 chandransh 23911
      return true;
23912
    }
23913
 
23914
    @Override
23915
    public int hashCode() {
23916
      return 0;
23917
    }
23918
 
23919
    public int compareTo(addAddressToCart_result other) {
23920
      if (!getClass().equals(other.getClass())) {
23921
        return getClass().getName().compareTo(other.getClass().getName());
23922
      }
23923
 
23924
      int lastComparison = 0;
23925
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
23926
 
578 chandransh 23927
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23928
      if (lastComparison != 0) {
23929
        return lastComparison;
23930
      }
23931
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23932
      if (lastComparison != 0) {
23933
        return lastComparison;
23934
      }
553 chandransh 23935
      return 0;
23936
    }
23937
 
23938
    public void read(TProtocol iprot) throws TException {
23939
      TField field;
23940
      iprot.readStructBegin();
23941
      while (true)
23942
      {
23943
        field = iprot.readFieldBegin();
23944
        if (field.type == TType.STOP) { 
23945
          break;
23946
        }
23947
        _Fields fieldId = _Fields.findByThriftId(field.id);
23948
        if (fieldId == null) {
23949
          TProtocolUtil.skip(iprot, field.type);
23950
        } else {
23951
          switch (fieldId) {
578 chandransh 23952
            case SCX:
23953
              if (field.type == TType.STRUCT) {
23954
                this.scx = new ShoppingCartException();
23955
                this.scx.read(iprot);
23956
              } else { 
23957
                TProtocolUtil.skip(iprot, field.type);
23958
              }
23959
              break;
553 chandransh 23960
          }
23961
          iprot.readFieldEnd();
23962
        }
23963
      }
23964
      iprot.readStructEnd();
23965
      validate();
23966
    }
23967
 
23968
    public void write(TProtocol oprot) throws TException {
23969
      oprot.writeStructBegin(STRUCT_DESC);
23970
 
578 chandransh 23971
      if (this.isSetScx()) {
23972
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23973
        this.scx.write(oprot);
23974
        oprot.writeFieldEnd();
23975
      }
553 chandransh 23976
      oprot.writeFieldStop();
23977
      oprot.writeStructEnd();
23978
    }
23979
 
23980
    @Override
23981
    public String toString() {
23982
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
23983
      boolean first = true;
23984
 
578 chandransh 23985
      sb.append("scx:");
23986
      if (this.scx == null) {
23987
        sb.append("null");
23988
      } else {
23989
        sb.append(this.scx);
23990
      }
23991
      first = false;
553 chandransh 23992
      sb.append(")");
23993
      return sb.toString();
23994
    }
23995
 
23996
    public void validate() throws TException {
23997
      // check for required fields
23998
    }
23999
 
24000
  }
24001
 
688 chandransh 24002
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
24003
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 24004
 
24005
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24006
 
24007
    private long cartId;
24008
 
24009
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24010
    public enum _Fields implements TFieldIdEnum {
24011
      CART_ID((short)1, "cartId");
24012
 
24013
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24014
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24015
 
24016
      static {
24017
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24018
          byId.put((int)field._thriftId, field);
24019
          byName.put(field.getFieldName(), field);
24020
        }
24021
      }
24022
 
24023
      /**
24024
       * Find the _Fields constant that matches fieldId, or null if its not found.
24025
       */
24026
      public static _Fields findByThriftId(int fieldId) {
24027
        return byId.get(fieldId);
24028
      }
24029
 
24030
      /**
24031
       * Find the _Fields constant that matches fieldId, throwing an exception
24032
       * if it is not found.
24033
       */
24034
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24035
        _Fields fields = findByThriftId(fieldId);
24036
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24037
        return fields;
24038
      }
24039
 
24040
      /**
24041
       * Find the _Fields constant that matches name, or null if its not found.
24042
       */
24043
      public static _Fields findByName(String name) {
24044
        return byName.get(name);
24045
      }
24046
 
24047
      private final short _thriftId;
24048
      private final String _fieldName;
24049
 
24050
      _Fields(short thriftId, String fieldName) {
24051
        _thriftId = thriftId;
24052
        _fieldName = fieldName;
24053
      }
24054
 
24055
      public short getThriftFieldId() {
24056
        return _thriftId;
24057
      }
24058
 
24059
      public String getFieldName() {
24060
        return _fieldName;
24061
      }
24062
    }
24063
 
24064
    // isset id assignments
24065
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 24066
    private BitSet __isset_bit_vector = new BitSet(1);
24067
 
24068
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24069
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24070
          new FieldValueMetaData(TType.I64)));
24071
    }});
24072
 
24073
    static {
688 chandransh 24074
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 24075
    }
24076
 
688 chandransh 24077
    public createOrders_args() {
48 ashish 24078
    }
24079
 
688 chandransh 24080
    public createOrders_args(
553 chandransh 24081
      long cartId)
48 ashish 24082
    {
24083
      this();
553 chandransh 24084
      this.cartId = cartId;
24085
      setCartIdIsSet(true);
48 ashish 24086
    }
24087
 
24088
    /**
24089
     * Performs a deep copy on <i>other</i>.
24090
     */
688 chandransh 24091
    public createOrders_args(createOrders_args other) {
48 ashish 24092
      __isset_bit_vector.clear();
24093
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24094
      this.cartId = other.cartId;
48 ashish 24095
    }
24096
 
688 chandransh 24097
    public createOrders_args deepCopy() {
24098
      return new createOrders_args(this);
48 ashish 24099
    }
24100
 
24101
    @Deprecated
688 chandransh 24102
    public createOrders_args clone() {
24103
      return new createOrders_args(this);
48 ashish 24104
    }
24105
 
553 chandransh 24106
    public long getCartId() {
24107
      return this.cartId;
48 ashish 24108
    }
24109
 
688 chandransh 24110
    public createOrders_args setCartId(long cartId) {
553 chandransh 24111
      this.cartId = cartId;
24112
      setCartIdIsSet(true);
48 ashish 24113
      return this;
24114
    }
24115
 
553 chandransh 24116
    public void unsetCartId() {
24117
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24118
    }
24119
 
553 chandransh 24120
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24121
    public boolean isSetCartId() {
24122
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24123
    }
24124
 
553 chandransh 24125
    public void setCartIdIsSet(boolean value) {
24126
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24127
    }
24128
 
24129
    public void setFieldValue(_Fields field, Object value) {
24130
      switch (field) {
553 chandransh 24131
      case CART_ID:
48 ashish 24132
        if (value == null) {
553 chandransh 24133
          unsetCartId();
48 ashish 24134
        } else {
553 chandransh 24135
          setCartId((Long)value);
48 ashish 24136
        }
24137
        break;
24138
 
24139
      }
24140
    }
24141
 
24142
    public void setFieldValue(int fieldID, Object value) {
24143
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24144
    }
24145
 
24146
    public Object getFieldValue(_Fields field) {
24147
      switch (field) {
553 chandransh 24148
      case CART_ID:
24149
        return new Long(getCartId());
48 ashish 24150
 
24151
      }
24152
      throw new IllegalStateException();
24153
    }
24154
 
24155
    public Object getFieldValue(int fieldId) {
24156
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24157
    }
24158
 
24159
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24160
    public boolean isSet(_Fields field) {
24161
      switch (field) {
553 chandransh 24162
      case CART_ID:
24163
        return isSetCartId();
48 ashish 24164
      }
24165
      throw new IllegalStateException();
24166
    }
24167
 
24168
    public boolean isSet(int fieldID) {
24169
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24170
    }
24171
 
24172
    @Override
24173
    public boolean equals(Object that) {
24174
      if (that == null)
24175
        return false;
688 chandransh 24176
      if (that instanceof createOrders_args)
24177
        return this.equals((createOrders_args)that);
48 ashish 24178
      return false;
24179
    }
24180
 
688 chandransh 24181
    public boolean equals(createOrders_args that) {
48 ashish 24182
      if (that == null)
24183
        return false;
24184
 
553 chandransh 24185
      boolean this_present_cartId = true;
24186
      boolean that_present_cartId = true;
24187
      if (this_present_cartId || that_present_cartId) {
24188
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24189
          return false;
553 chandransh 24190
        if (this.cartId != that.cartId)
48 ashish 24191
          return false;
24192
      }
24193
 
24194
      return true;
24195
    }
24196
 
24197
    @Override
24198
    public int hashCode() {
24199
      return 0;
24200
    }
24201
 
688 chandransh 24202
    public int compareTo(createOrders_args other) {
48 ashish 24203
      if (!getClass().equals(other.getClass())) {
24204
        return getClass().getName().compareTo(other.getClass().getName());
24205
      }
24206
 
24207
      int lastComparison = 0;
688 chandransh 24208
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 24209
 
553 chandransh 24210
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24211
      if (lastComparison != 0) {
24212
        return lastComparison;
24213
      }
553 chandransh 24214
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24215
      if (lastComparison != 0) {
24216
        return lastComparison;
24217
      }
24218
      return 0;
24219
    }
24220
 
24221
    public void read(TProtocol iprot) throws TException {
24222
      TField field;
24223
      iprot.readStructBegin();
24224
      while (true)
24225
      {
24226
        field = iprot.readFieldBegin();
24227
        if (field.type == TType.STOP) { 
24228
          break;
24229
        }
24230
        _Fields fieldId = _Fields.findByThriftId(field.id);
24231
        if (fieldId == null) {
24232
          TProtocolUtil.skip(iprot, field.type);
24233
        } else {
24234
          switch (fieldId) {
553 chandransh 24235
            case CART_ID:
48 ashish 24236
              if (field.type == TType.I64) {
553 chandransh 24237
                this.cartId = iprot.readI64();
24238
                setCartIdIsSet(true);
48 ashish 24239
              } else { 
24240
                TProtocolUtil.skip(iprot, field.type);
24241
              }
24242
              break;
24243
          }
24244
          iprot.readFieldEnd();
24245
        }
24246
      }
24247
      iprot.readStructEnd();
24248
      validate();
24249
    }
24250
 
24251
    public void write(TProtocol oprot) throws TException {
24252
      validate();
24253
 
24254
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24255
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24256
      oprot.writeI64(this.cartId);
48 ashish 24257
      oprot.writeFieldEnd();
24258
      oprot.writeFieldStop();
24259
      oprot.writeStructEnd();
24260
    }
24261
 
24262
    @Override
24263
    public String toString() {
688 chandransh 24264
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 24265
      boolean first = true;
24266
 
553 chandransh 24267
      sb.append("cartId:");
24268
      sb.append(this.cartId);
48 ashish 24269
      first = false;
24270
      sb.append(")");
24271
      return sb.toString();
24272
    }
24273
 
24274
    public void validate() throws TException {
24275
      // check for required fields
24276
    }
24277
 
24278
  }
24279
 
688 chandransh 24280
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
24281
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 24282
 
578 chandransh 24283
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 24284
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 24285
 
578 chandransh 24286
    private long success;
553 chandransh 24287
    private ShoppingCartException scx;
48 ashish 24288
 
24289
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24290
    public enum _Fields implements TFieldIdEnum {
24291
      SUCCESS((short)0, "success"),
553 chandransh 24292
      SCX((short)1, "scx");
48 ashish 24293
 
24294
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24296
 
24297
      static {
24298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24299
          byId.put((int)field._thriftId, field);
24300
          byName.put(field.getFieldName(), field);
24301
        }
24302
      }
24303
 
24304
      /**
24305
       * Find the _Fields constant that matches fieldId, or null if its not found.
24306
       */
24307
      public static _Fields findByThriftId(int fieldId) {
24308
        return byId.get(fieldId);
24309
      }
24310
 
24311
      /**
24312
       * Find the _Fields constant that matches fieldId, throwing an exception
24313
       * if it is not found.
24314
       */
24315
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24316
        _Fields fields = findByThriftId(fieldId);
24317
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24318
        return fields;
24319
      }
24320
 
24321
      /**
24322
       * Find the _Fields constant that matches name, or null if its not found.
24323
       */
24324
      public static _Fields findByName(String name) {
24325
        return byName.get(name);
24326
      }
24327
 
24328
      private final short _thriftId;
24329
      private final String _fieldName;
24330
 
24331
      _Fields(short thriftId, String fieldName) {
24332
        _thriftId = thriftId;
24333
        _fieldName = fieldName;
24334
      }
24335
 
24336
      public short getThriftFieldId() {
24337
        return _thriftId;
24338
      }
24339
 
24340
      public String getFieldName() {
24341
        return _fieldName;
24342
      }
24343
    }
24344
 
24345
    // isset id assignments
24346
    private static final int __SUCCESS_ISSET_ID = 0;
24347
    private BitSet __isset_bit_vector = new BitSet(1);
24348
 
24349
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24350
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 24351
          new FieldValueMetaData(TType.I64)));
553 chandransh 24352
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 24353
          new FieldValueMetaData(TType.STRUCT)));
24354
    }});
24355
 
24356
    static {
688 chandransh 24357
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 24358
    }
24359
 
688 chandransh 24360
    public createOrders_result() {
48 ashish 24361
    }
24362
 
688 chandransh 24363
    public createOrders_result(
578 chandransh 24364
      long success,
553 chandransh 24365
      ShoppingCartException scx)
48 ashish 24366
    {
24367
      this();
24368
      this.success = success;
24369
      setSuccessIsSet(true);
553 chandransh 24370
      this.scx = scx;
48 ashish 24371
    }
24372
 
24373
    /**
24374
     * Performs a deep copy on <i>other</i>.
24375
     */
688 chandransh 24376
    public createOrders_result(createOrders_result other) {
48 ashish 24377
      __isset_bit_vector.clear();
24378
      __isset_bit_vector.or(other.__isset_bit_vector);
24379
      this.success = other.success;
553 chandransh 24380
      if (other.isSetScx()) {
24381
        this.scx = new ShoppingCartException(other.scx);
48 ashish 24382
      }
24383
    }
24384
 
688 chandransh 24385
    public createOrders_result deepCopy() {
24386
      return new createOrders_result(this);
48 ashish 24387
    }
24388
 
24389
    @Deprecated
688 chandransh 24390
    public createOrders_result clone() {
24391
      return new createOrders_result(this);
48 ashish 24392
    }
24393
 
578 chandransh 24394
    public long getSuccess() {
48 ashish 24395
      return this.success;
24396
    }
24397
 
688 chandransh 24398
    public createOrders_result setSuccess(long success) {
48 ashish 24399
      this.success = success;
24400
      setSuccessIsSet(true);
24401
      return this;
24402
    }
24403
 
24404
    public void unsetSuccess() {
24405
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24406
    }
24407
 
24408
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24409
    public boolean isSetSuccess() {
24410
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24411
    }
24412
 
24413
    public void setSuccessIsSet(boolean value) {
24414
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24415
    }
24416
 
553 chandransh 24417
    public ShoppingCartException getScx() {
24418
      return this.scx;
48 ashish 24419
    }
24420
 
688 chandransh 24421
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 24422
      this.scx = scx;
48 ashish 24423
      return this;
24424
    }
24425
 
553 chandransh 24426
    public void unsetScx() {
24427
      this.scx = null;
48 ashish 24428
    }
24429
 
553 chandransh 24430
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24431
    public boolean isSetScx() {
24432
      return this.scx != null;
48 ashish 24433
    }
24434
 
553 chandransh 24435
    public void setScxIsSet(boolean value) {
48 ashish 24436
      if (!value) {
553 chandransh 24437
        this.scx = null;
48 ashish 24438
      }
24439
    }
24440
 
24441
    public void setFieldValue(_Fields field, Object value) {
24442
      switch (field) {
24443
      case SUCCESS:
24444
        if (value == null) {
24445
          unsetSuccess();
24446
        } else {
578 chandransh 24447
          setSuccess((Long)value);
48 ashish 24448
        }
24449
        break;
24450
 
553 chandransh 24451
      case SCX:
48 ashish 24452
        if (value == null) {
553 chandransh 24453
          unsetScx();
48 ashish 24454
        } else {
553 chandransh 24455
          setScx((ShoppingCartException)value);
48 ashish 24456
        }
24457
        break;
24458
 
24459
      }
24460
    }
24461
 
24462
    public void setFieldValue(int fieldID, Object value) {
24463
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24464
    }
24465
 
24466
    public Object getFieldValue(_Fields field) {
24467
      switch (field) {
24468
      case SUCCESS:
578 chandransh 24469
        return new Long(getSuccess());
48 ashish 24470
 
553 chandransh 24471
      case SCX:
24472
        return getScx();
48 ashish 24473
 
24474
      }
24475
      throw new IllegalStateException();
24476
    }
24477
 
24478
    public Object getFieldValue(int fieldId) {
24479
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24480
    }
24481
 
24482
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24483
    public boolean isSet(_Fields field) {
24484
      switch (field) {
24485
      case SUCCESS:
24486
        return isSetSuccess();
553 chandransh 24487
      case SCX:
24488
        return isSetScx();
48 ashish 24489
      }
24490
      throw new IllegalStateException();
24491
    }
24492
 
24493
    public boolean isSet(int fieldID) {
24494
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24495
    }
24496
 
24497
    @Override
24498
    public boolean equals(Object that) {
24499
      if (that == null)
24500
        return false;
688 chandransh 24501
      if (that instanceof createOrders_result)
24502
        return this.equals((createOrders_result)that);
48 ashish 24503
      return false;
24504
    }
24505
 
688 chandransh 24506
    public boolean equals(createOrders_result that) {
48 ashish 24507
      if (that == null)
24508
        return false;
24509
 
24510
      boolean this_present_success = true;
24511
      boolean that_present_success = true;
24512
      if (this_present_success || that_present_success) {
24513
        if (!(this_present_success && that_present_success))
24514
          return false;
24515
        if (this.success != that.success)
24516
          return false;
24517
      }
24518
 
553 chandransh 24519
      boolean this_present_scx = true && this.isSetScx();
24520
      boolean that_present_scx = true && that.isSetScx();
24521
      if (this_present_scx || that_present_scx) {
24522
        if (!(this_present_scx && that_present_scx))
48 ashish 24523
          return false;
553 chandransh 24524
        if (!this.scx.equals(that.scx))
48 ashish 24525
          return false;
24526
      }
24527
 
24528
      return true;
24529
    }
24530
 
24531
    @Override
24532
    public int hashCode() {
24533
      return 0;
24534
    }
24535
 
688 chandransh 24536
    public int compareTo(createOrders_result other) {
48 ashish 24537
      if (!getClass().equals(other.getClass())) {
24538
        return getClass().getName().compareTo(other.getClass().getName());
24539
      }
24540
 
24541
      int lastComparison = 0;
688 chandransh 24542
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 24543
 
24544
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24545
      if (lastComparison != 0) {
24546
        return lastComparison;
24547
      }
24548
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24549
      if (lastComparison != 0) {
24550
        return lastComparison;
24551
      }
553 chandransh 24552
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 24553
      if (lastComparison != 0) {
24554
        return lastComparison;
24555
      }
553 chandransh 24556
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 24557
      if (lastComparison != 0) {
24558
        return lastComparison;
24559
      }
24560
      return 0;
24561
    }
24562
 
24563
    public void read(TProtocol iprot) throws TException {
24564
      TField field;
24565
      iprot.readStructBegin();
24566
      while (true)
24567
      {
24568
        field = iprot.readFieldBegin();
24569
        if (field.type == TType.STOP) { 
24570
          break;
24571
        }
24572
        _Fields fieldId = _Fields.findByThriftId(field.id);
24573
        if (fieldId == null) {
24574
          TProtocolUtil.skip(iprot, field.type);
24575
        } else {
24576
          switch (fieldId) {
24577
            case SUCCESS:
578 chandransh 24578
              if (field.type == TType.I64) {
24579
                this.success = iprot.readI64();
48 ashish 24580
                setSuccessIsSet(true);
24581
              } else { 
24582
                TProtocolUtil.skip(iprot, field.type);
24583
              }
24584
              break;
553 chandransh 24585
            case SCX:
48 ashish 24586
              if (field.type == TType.STRUCT) {
553 chandransh 24587
                this.scx = new ShoppingCartException();
24588
                this.scx.read(iprot);
48 ashish 24589
              } else { 
24590
                TProtocolUtil.skip(iprot, field.type);
24591
              }
24592
              break;
24593
          }
24594
          iprot.readFieldEnd();
24595
        }
24596
      }
24597
      iprot.readStructEnd();
24598
      validate();
24599
    }
24600
 
24601
    public void write(TProtocol oprot) throws TException {
24602
      oprot.writeStructBegin(STRUCT_DESC);
24603
 
24604
      if (this.isSetSuccess()) {
24605
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 24606
        oprot.writeI64(this.success);
48 ashish 24607
        oprot.writeFieldEnd();
553 chandransh 24608
      } else if (this.isSetScx()) {
24609
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24610
        this.scx.write(oprot);
48 ashish 24611
        oprot.writeFieldEnd();
24612
      }
24613
      oprot.writeFieldStop();
24614
      oprot.writeStructEnd();
24615
    }
24616
 
24617
    @Override
24618
    public String toString() {
688 chandransh 24619
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 24620
      boolean first = true;
24621
 
24622
      sb.append("success:");
24623
      sb.append(this.success);
24624
      first = false;
24625
      if (!first) sb.append(", ");
553 chandransh 24626
      sb.append("scx:");
24627
      if (this.scx == null) {
48 ashish 24628
        sb.append("null");
24629
      } else {
553 chandransh 24630
        sb.append(this.scx);
48 ashish 24631
      }
24632
      first = false;
24633
      sb.append(")");
24634
      return sb.toString();
24635
    }
24636
 
24637
    public void validate() throws TException {
24638
      // check for required fields
24639
    }
24640
 
24641
  }
24642
 
553 chandransh 24643
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
24644
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 24645
 
553 chandransh 24646
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 24647
 
553 chandransh 24648
    private long cartId;
48 ashish 24649
 
24650
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24651
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24652
      CART_ID((short)1, "cartId");
48 ashish 24653
 
24654
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24655
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24656
 
24657
      static {
24658
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24659
          byId.put((int)field._thriftId, field);
24660
          byName.put(field.getFieldName(), field);
24661
        }
24662
      }
24663
 
24664
      /**
24665
       * Find the _Fields constant that matches fieldId, or null if its not found.
24666
       */
24667
      public static _Fields findByThriftId(int fieldId) {
24668
        return byId.get(fieldId);
24669
      }
24670
 
24671
      /**
24672
       * Find the _Fields constant that matches fieldId, throwing an exception
24673
       * if it is not found.
24674
       */
24675
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24676
        _Fields fields = findByThriftId(fieldId);
24677
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24678
        return fields;
24679
      }
24680
 
24681
      /**
24682
       * Find the _Fields constant that matches name, or null if its not found.
24683
       */
24684
      public static _Fields findByName(String name) {
24685
        return byName.get(name);
24686
      }
24687
 
24688
      private final short _thriftId;
24689
      private final String _fieldName;
24690
 
24691
      _Fields(short thriftId, String fieldName) {
24692
        _thriftId = thriftId;
24693
        _fieldName = fieldName;
24694
      }
24695
 
24696
      public short getThriftFieldId() {
24697
        return _thriftId;
24698
      }
24699
 
24700
      public String getFieldName() {
24701
        return _fieldName;
24702
      }
24703
    }
24704
 
24705
    // isset id assignments
553 chandransh 24706
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 24707
    private BitSet __isset_bit_vector = new BitSet(1);
24708
 
24709
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24710
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24711
          new FieldValueMetaData(TType.I64)));
24712
    }});
24713
 
24714
    static {
553 chandransh 24715
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 24716
    }
24717
 
553 chandransh 24718
    public validateCart_args() {
48 ashish 24719
    }
24720
 
553 chandransh 24721
    public validateCart_args(
24722
      long cartId)
48 ashish 24723
    {
24724
      this();
553 chandransh 24725
      this.cartId = cartId;
24726
      setCartIdIsSet(true);
48 ashish 24727
    }
24728
 
24729
    /**
24730
     * Performs a deep copy on <i>other</i>.
24731
     */
553 chandransh 24732
    public validateCart_args(validateCart_args other) {
48 ashish 24733
      __isset_bit_vector.clear();
24734
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24735
      this.cartId = other.cartId;
48 ashish 24736
    }
24737
 
553 chandransh 24738
    public validateCart_args deepCopy() {
24739
      return new validateCart_args(this);
48 ashish 24740
    }
24741
 
24742
    @Deprecated
553 chandransh 24743
    public validateCart_args clone() {
24744
      return new validateCart_args(this);
48 ashish 24745
    }
24746
 
553 chandransh 24747
    public long getCartId() {
24748
      return this.cartId;
48 ashish 24749
    }
24750
 
553 chandransh 24751
    public validateCart_args setCartId(long cartId) {
24752
      this.cartId = cartId;
24753
      setCartIdIsSet(true);
48 ashish 24754
      return this;
24755
    }
24756
 
553 chandransh 24757
    public void unsetCartId() {
24758
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24759
    }
24760
 
553 chandransh 24761
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24762
    public boolean isSetCartId() {
24763
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24764
    }
24765
 
553 chandransh 24766
    public void setCartIdIsSet(boolean value) {
24767
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24768
    }
24769
 
24770
    public void setFieldValue(_Fields field, Object value) {
24771
      switch (field) {
553 chandransh 24772
      case CART_ID:
48 ashish 24773
        if (value == null) {
553 chandransh 24774
          unsetCartId();
48 ashish 24775
        } else {
553 chandransh 24776
          setCartId((Long)value);
48 ashish 24777
        }
24778
        break;
24779
 
24780
      }
24781
    }
24782
 
24783
    public void setFieldValue(int fieldID, Object value) {
24784
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24785
    }
24786
 
24787
    public Object getFieldValue(_Fields field) {
24788
      switch (field) {
553 chandransh 24789
      case CART_ID:
24790
        return new Long(getCartId());
48 ashish 24791
 
24792
      }
24793
      throw new IllegalStateException();
24794
    }
24795
 
24796
    public Object getFieldValue(int fieldId) {
24797
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24798
    }
24799
 
24800
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24801
    public boolean isSet(_Fields field) {
24802
      switch (field) {
553 chandransh 24803
      case CART_ID:
24804
        return isSetCartId();
48 ashish 24805
      }
24806
      throw new IllegalStateException();
24807
    }
24808
 
24809
    public boolean isSet(int fieldID) {
24810
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24811
    }
24812
 
24813
    @Override
24814
    public boolean equals(Object that) {
24815
      if (that == null)
24816
        return false;
553 chandransh 24817
      if (that instanceof validateCart_args)
24818
        return this.equals((validateCart_args)that);
48 ashish 24819
      return false;
24820
    }
24821
 
553 chandransh 24822
    public boolean equals(validateCart_args that) {
48 ashish 24823
      if (that == null)
24824
        return false;
24825
 
553 chandransh 24826
      boolean this_present_cartId = true;
24827
      boolean that_present_cartId = true;
24828
      if (this_present_cartId || that_present_cartId) {
24829
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24830
          return false;
553 chandransh 24831
        if (this.cartId != that.cartId)
48 ashish 24832
          return false;
24833
      }
24834
 
24835
      return true;
24836
    }
24837
 
24838
    @Override
24839
    public int hashCode() {
24840
      return 0;
24841
    }
24842
 
553 chandransh 24843
    public int compareTo(validateCart_args other) {
48 ashish 24844
      if (!getClass().equals(other.getClass())) {
24845
        return getClass().getName().compareTo(other.getClass().getName());
24846
      }
24847
 
24848
      int lastComparison = 0;
553 chandransh 24849
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 24850
 
553 chandransh 24851
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24852
      if (lastComparison != 0) {
24853
        return lastComparison;
24854
      }
553 chandransh 24855
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24856
      if (lastComparison != 0) {
24857
        return lastComparison;
24858
      }
24859
      return 0;
24860
    }
24861
 
24862
    public void read(TProtocol iprot) throws TException {
24863
      TField field;
24864
      iprot.readStructBegin();
24865
      while (true)
24866
      {
24867
        field = iprot.readFieldBegin();
24868
        if (field.type == TType.STOP) { 
24869
          break;
24870
        }
24871
        _Fields fieldId = _Fields.findByThriftId(field.id);
24872
        if (fieldId == null) {
24873
          TProtocolUtil.skip(iprot, field.type);
24874
        } else {
24875
          switch (fieldId) {
553 chandransh 24876
            case CART_ID:
48 ashish 24877
              if (field.type == TType.I64) {
553 chandransh 24878
                this.cartId = iprot.readI64();
24879
                setCartIdIsSet(true);
48 ashish 24880
              } else { 
24881
                TProtocolUtil.skip(iprot, field.type);
24882
              }
24883
              break;
24884
          }
24885
          iprot.readFieldEnd();
24886
        }
24887
      }
24888
      iprot.readStructEnd();
24889
      validate();
24890
    }
24891
 
24892
    public void write(TProtocol oprot) throws TException {
24893
      validate();
24894
 
24895
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24896
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24897
      oprot.writeI64(this.cartId);
48 ashish 24898
      oprot.writeFieldEnd();
24899
      oprot.writeFieldStop();
24900
      oprot.writeStructEnd();
24901
    }
24902
 
24903
    @Override
24904
    public String toString() {
553 chandransh 24905
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 24906
      boolean first = true;
24907
 
553 chandransh 24908
      sb.append("cartId:");
24909
      sb.append(this.cartId);
48 ashish 24910
      first = false;
24911
      sb.append(")");
24912
      return sb.toString();
24913
    }
24914
 
24915
    public void validate() throws TException {
24916
      // check for required fields
24917
    }
24918
 
24919
  }
24920
 
553 chandransh 24921
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
24922
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 24923
 
24924
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
578 chandransh 24925
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 24926
 
24927
    private boolean success;
578 chandransh 24928
    private ShoppingCartException scex;
48 ashish 24929
 
24930
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24931
    public enum _Fields implements TFieldIdEnum {
578 chandransh 24932
      SUCCESS((short)0, "success"),
24933
      SCEX((short)1, "scex");
48 ashish 24934
 
24935
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24936
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24937
 
24938
      static {
24939
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24940
          byId.put((int)field._thriftId, field);
24941
          byName.put(field.getFieldName(), field);
24942
        }
24943
      }
24944
 
24945
      /**
24946
       * Find the _Fields constant that matches fieldId, or null if its not found.
24947
       */
24948
      public static _Fields findByThriftId(int fieldId) {
24949
        return byId.get(fieldId);
24950
      }
24951
 
24952
      /**
24953
       * Find the _Fields constant that matches fieldId, throwing an exception
24954
       * if it is not found.
24955
       */
24956
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24957
        _Fields fields = findByThriftId(fieldId);
24958
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24959
        return fields;
24960
      }
24961
 
24962
      /**
24963
       * Find the _Fields constant that matches name, or null if its not found.
24964
       */
24965
      public static _Fields findByName(String name) {
24966
        return byName.get(name);
24967
      }
24968
 
24969
      private final short _thriftId;
24970
      private final String _fieldName;
24971
 
24972
      _Fields(short thriftId, String fieldName) {
24973
        _thriftId = thriftId;
24974
        _fieldName = fieldName;
24975
      }
24976
 
24977
      public short getThriftFieldId() {
24978
        return _thriftId;
24979
      }
24980
 
24981
      public String getFieldName() {
24982
        return _fieldName;
24983
      }
24984
    }
24985
 
24986
    // isset id assignments
24987
    private static final int __SUCCESS_ISSET_ID = 0;
24988
    private BitSet __isset_bit_vector = new BitSet(1);
24989
 
24990
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24991
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24992
          new FieldValueMetaData(TType.BOOL)));
578 chandransh 24993
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
24994
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 24995
    }});
24996
 
24997
    static {
553 chandransh 24998
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 24999
    }
25000
 
553 chandransh 25001
    public validateCart_result() {
48 ashish 25002
    }
25003
 
553 chandransh 25004
    public validateCart_result(
578 chandransh 25005
      boolean success,
25006
      ShoppingCartException scex)
48 ashish 25007
    {
25008
      this();
25009
      this.success = success;
25010
      setSuccessIsSet(true);
578 chandransh 25011
      this.scex = scex;
48 ashish 25012
    }
25013
 
25014
    /**
25015
     * Performs a deep copy on <i>other</i>.
25016
     */
553 chandransh 25017
    public validateCart_result(validateCart_result other) {
48 ashish 25018
      __isset_bit_vector.clear();
25019
      __isset_bit_vector.or(other.__isset_bit_vector);
25020
      this.success = other.success;
578 chandransh 25021
      if (other.isSetScex()) {
25022
        this.scex = new ShoppingCartException(other.scex);
25023
      }
48 ashish 25024
    }
25025
 
553 chandransh 25026
    public validateCart_result deepCopy() {
25027
      return new validateCart_result(this);
48 ashish 25028
    }
25029
 
25030
    @Deprecated
553 chandransh 25031
    public validateCart_result clone() {
25032
      return new validateCart_result(this);
48 ashish 25033
    }
25034
 
25035
    public boolean isSuccess() {
25036
      return this.success;
25037
    }
25038
 
553 chandransh 25039
    public validateCart_result setSuccess(boolean success) {
48 ashish 25040
      this.success = success;
25041
      setSuccessIsSet(true);
25042
      return this;
25043
    }
25044
 
25045
    public void unsetSuccess() {
25046
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
25047
    }
25048
 
25049
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25050
    public boolean isSetSuccess() {
25051
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
25052
    }
25053
 
25054
    public void setSuccessIsSet(boolean value) {
25055
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
25056
    }
25057
 
578 chandransh 25058
    public ShoppingCartException getScex() {
25059
      return this.scex;
25060
    }
25061
 
25062
    public validateCart_result setScex(ShoppingCartException scex) {
25063
      this.scex = scex;
25064
      return this;
25065
    }
25066
 
25067
    public void unsetScex() {
25068
      this.scex = null;
25069
    }
25070
 
25071
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
25072
    public boolean isSetScex() {
25073
      return this.scex != null;
25074
    }
25075
 
25076
    public void setScexIsSet(boolean value) {
25077
      if (!value) {
25078
        this.scex = null;
25079
      }
25080
    }
25081
 
553 chandransh 25082
    public void setFieldValue(_Fields field, Object value) {
25083
      switch (field) {
25084
      case SUCCESS:
25085
        if (value == null) {
25086
          unsetSuccess();
25087
        } else {
25088
          setSuccess((Boolean)value);
25089
        }
25090
        break;
25091
 
578 chandransh 25092
      case SCEX:
25093
        if (value == null) {
25094
          unsetScex();
25095
        } else {
25096
          setScex((ShoppingCartException)value);
25097
        }
25098
        break;
25099
 
553 chandransh 25100
      }
48 ashish 25101
    }
25102
 
553 chandransh 25103
    public void setFieldValue(int fieldID, Object value) {
25104
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25105
    }
25106
 
25107
    public Object getFieldValue(_Fields field) {
25108
      switch (field) {
25109
      case SUCCESS:
25110
        return new Boolean(isSuccess());
25111
 
578 chandransh 25112
      case SCEX:
25113
        return getScex();
25114
 
553 chandransh 25115
      }
25116
      throw new IllegalStateException();
25117
    }
25118
 
25119
    public Object getFieldValue(int fieldId) {
25120
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25121
    }
25122
 
25123
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25124
    public boolean isSet(_Fields field) {
25125
      switch (field) {
25126
      case SUCCESS:
25127
        return isSetSuccess();
578 chandransh 25128
      case SCEX:
25129
        return isSetScex();
553 chandransh 25130
      }
25131
      throw new IllegalStateException();
25132
    }
25133
 
25134
    public boolean isSet(int fieldID) {
25135
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25136
    }
25137
 
25138
    @Override
25139
    public boolean equals(Object that) {
25140
      if (that == null)
25141
        return false;
25142
      if (that instanceof validateCart_result)
25143
        return this.equals((validateCart_result)that);
25144
      return false;
25145
    }
25146
 
25147
    public boolean equals(validateCart_result that) {
25148
      if (that == null)
25149
        return false;
25150
 
25151
      boolean this_present_success = true;
25152
      boolean that_present_success = true;
25153
      if (this_present_success || that_present_success) {
25154
        if (!(this_present_success && that_present_success))
25155
          return false;
25156
        if (this.success != that.success)
25157
          return false;
25158
      }
25159
 
578 chandransh 25160
      boolean this_present_scex = true && this.isSetScex();
25161
      boolean that_present_scex = true && that.isSetScex();
25162
      if (this_present_scex || that_present_scex) {
25163
        if (!(this_present_scex && that_present_scex))
25164
          return false;
25165
        if (!this.scex.equals(that.scex))
25166
          return false;
25167
      }
25168
 
553 chandransh 25169
      return true;
25170
    }
25171
 
25172
    @Override
25173
    public int hashCode() {
25174
      return 0;
25175
    }
25176
 
25177
    public int compareTo(validateCart_result other) {
25178
      if (!getClass().equals(other.getClass())) {
25179
        return getClass().getName().compareTo(other.getClass().getName());
25180
      }
25181
 
25182
      int lastComparison = 0;
25183
      validateCart_result typedOther = (validateCart_result)other;
25184
 
25185
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25186
      if (lastComparison != 0) {
25187
        return lastComparison;
25188
      }
25189
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25190
      if (lastComparison != 0) {
25191
        return lastComparison;
25192
      }
578 chandransh 25193
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
25194
      if (lastComparison != 0) {
25195
        return lastComparison;
25196
      }
25197
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
25198
      if (lastComparison != 0) {
25199
        return lastComparison;
25200
      }
553 chandransh 25201
      return 0;
25202
    }
25203
 
25204
    public void read(TProtocol iprot) throws TException {
25205
      TField field;
25206
      iprot.readStructBegin();
25207
      while (true)
25208
      {
25209
        field = iprot.readFieldBegin();
25210
        if (field.type == TType.STOP) { 
25211
          break;
25212
        }
25213
        _Fields fieldId = _Fields.findByThriftId(field.id);
25214
        if (fieldId == null) {
25215
          TProtocolUtil.skip(iprot, field.type);
25216
        } else {
25217
          switch (fieldId) {
25218
            case SUCCESS:
25219
              if (field.type == TType.BOOL) {
25220
                this.success = iprot.readBool();
25221
                setSuccessIsSet(true);
25222
              } else { 
25223
                TProtocolUtil.skip(iprot, field.type);
25224
              }
25225
              break;
578 chandransh 25226
            case SCEX:
25227
              if (field.type == TType.STRUCT) {
25228
                this.scex = new ShoppingCartException();
25229
                this.scex.read(iprot);
25230
              } else { 
25231
                TProtocolUtil.skip(iprot, field.type);
25232
              }
25233
              break;
553 chandransh 25234
          }
25235
          iprot.readFieldEnd();
25236
        }
25237
      }
25238
      iprot.readStructEnd();
25239
      validate();
25240
    }
25241
 
25242
    public void write(TProtocol oprot) throws TException {
25243
      oprot.writeStructBegin(STRUCT_DESC);
25244
 
25245
      if (this.isSetSuccess()) {
25246
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25247
        oprot.writeBool(this.success);
25248
        oprot.writeFieldEnd();
578 chandransh 25249
      } else if (this.isSetScex()) {
25250
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
25251
        this.scex.write(oprot);
25252
        oprot.writeFieldEnd();
553 chandransh 25253
      }
25254
      oprot.writeFieldStop();
25255
      oprot.writeStructEnd();
25256
    }
25257
 
25258
    @Override
25259
    public String toString() {
25260
      StringBuilder sb = new StringBuilder("validateCart_result(");
25261
      boolean first = true;
25262
 
25263
      sb.append("success:");
25264
      sb.append(this.success);
25265
      first = false;
578 chandransh 25266
      if (!first) sb.append(", ");
25267
      sb.append("scex:");
25268
      if (this.scex == null) {
25269
        sb.append("null");
25270
      } else {
25271
        sb.append(this.scex);
25272
      }
25273
      first = false;
553 chandransh 25274
      sb.append(")");
25275
      return sb.toString();
25276
    }
25277
 
25278
    public void validate() throws TException {
25279
      // check for required fields
25280
    }
25281
 
25282
  }
25283
 
688 chandransh 25284
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
25285
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
578 chandransh 25286
 
688 chandransh 25287
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
25288
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
25289
 
25290
    private long fromCartId;
25291
    private long toCartId;
25292
 
25293
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25294
    public enum _Fields implements TFieldIdEnum {
25295
      FROM_CART_ID((short)1, "fromCartId"),
25296
      TO_CART_ID((short)2, "toCartId");
25297
 
25298
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25299
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25300
 
25301
      static {
25302
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25303
          byId.put((int)field._thriftId, field);
25304
          byName.put(field.getFieldName(), field);
25305
        }
25306
      }
25307
 
25308
      /**
25309
       * Find the _Fields constant that matches fieldId, or null if its not found.
25310
       */
25311
      public static _Fields findByThriftId(int fieldId) {
25312
        return byId.get(fieldId);
25313
      }
25314
 
25315
      /**
25316
       * Find the _Fields constant that matches fieldId, throwing an exception
25317
       * if it is not found.
25318
       */
25319
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25320
        _Fields fields = findByThriftId(fieldId);
25321
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25322
        return fields;
25323
      }
25324
 
25325
      /**
25326
       * Find the _Fields constant that matches name, or null if its not found.
25327
       */
25328
      public static _Fields findByName(String name) {
25329
        return byName.get(name);
25330
      }
25331
 
25332
      private final short _thriftId;
25333
      private final String _fieldName;
25334
 
25335
      _Fields(short thriftId, String fieldName) {
25336
        _thriftId = thriftId;
25337
        _fieldName = fieldName;
25338
      }
25339
 
25340
      public short getThriftFieldId() {
25341
        return _thriftId;
25342
      }
25343
 
25344
      public String getFieldName() {
25345
        return _fieldName;
25346
      }
25347
    }
25348
 
25349
    // isset id assignments
25350
    private static final int __FROMCARTID_ISSET_ID = 0;
25351
    private static final int __TOCARTID_ISSET_ID = 1;
25352
    private BitSet __isset_bit_vector = new BitSet(2);
25353
 
25354
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25355
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
25356
          new FieldValueMetaData(TType.I64)));
25357
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
25358
          new FieldValueMetaData(TType.I64)));
25359
    }});
25360
 
25361
    static {
25362
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
25363
    }
25364
 
25365
    public mergeCart_args() {
25366
    }
25367
 
25368
    public mergeCart_args(
25369
      long fromCartId,
25370
      long toCartId)
25371
    {
25372
      this();
25373
      this.fromCartId = fromCartId;
25374
      setFromCartIdIsSet(true);
25375
      this.toCartId = toCartId;
25376
      setToCartIdIsSet(true);
25377
    }
25378
 
25379
    /**
25380
     * Performs a deep copy on <i>other</i>.
25381
     */
25382
    public mergeCart_args(mergeCart_args other) {
25383
      __isset_bit_vector.clear();
25384
      __isset_bit_vector.or(other.__isset_bit_vector);
25385
      this.fromCartId = other.fromCartId;
25386
      this.toCartId = other.toCartId;
25387
    }
25388
 
25389
    public mergeCart_args deepCopy() {
25390
      return new mergeCart_args(this);
25391
    }
25392
 
25393
    @Deprecated
25394
    public mergeCart_args clone() {
25395
      return new mergeCart_args(this);
25396
    }
25397
 
25398
    public long getFromCartId() {
25399
      return this.fromCartId;
25400
    }
25401
 
25402
    public mergeCart_args setFromCartId(long fromCartId) {
25403
      this.fromCartId = fromCartId;
25404
      setFromCartIdIsSet(true);
25405
      return this;
25406
    }
25407
 
25408
    public void unsetFromCartId() {
25409
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
25410
    }
25411
 
25412
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
25413
    public boolean isSetFromCartId() {
25414
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
25415
    }
25416
 
25417
    public void setFromCartIdIsSet(boolean value) {
25418
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
25419
    }
25420
 
25421
    public long getToCartId() {
25422
      return this.toCartId;
25423
    }
25424
 
25425
    public mergeCart_args setToCartId(long toCartId) {
25426
      this.toCartId = toCartId;
25427
      setToCartIdIsSet(true);
25428
      return this;
25429
    }
25430
 
25431
    public void unsetToCartId() {
25432
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
25433
    }
25434
 
25435
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
25436
    public boolean isSetToCartId() {
25437
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
25438
    }
25439
 
25440
    public void setToCartIdIsSet(boolean value) {
25441
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
25442
    }
25443
 
25444
    public void setFieldValue(_Fields field, Object value) {
25445
      switch (field) {
25446
      case FROM_CART_ID:
25447
        if (value == null) {
25448
          unsetFromCartId();
25449
        } else {
25450
          setFromCartId((Long)value);
25451
        }
25452
        break;
25453
 
25454
      case TO_CART_ID:
25455
        if (value == null) {
25456
          unsetToCartId();
25457
        } else {
25458
          setToCartId((Long)value);
25459
        }
25460
        break;
25461
 
25462
      }
25463
    }
25464
 
25465
    public void setFieldValue(int fieldID, Object value) {
25466
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25467
    }
25468
 
25469
    public Object getFieldValue(_Fields field) {
25470
      switch (field) {
25471
      case FROM_CART_ID:
25472
        return new Long(getFromCartId());
25473
 
25474
      case TO_CART_ID:
25475
        return new Long(getToCartId());
25476
 
25477
      }
25478
      throw new IllegalStateException();
25479
    }
25480
 
25481
    public Object getFieldValue(int fieldId) {
25482
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25483
    }
25484
 
25485
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25486
    public boolean isSet(_Fields field) {
25487
      switch (field) {
25488
      case FROM_CART_ID:
25489
        return isSetFromCartId();
25490
      case TO_CART_ID:
25491
        return isSetToCartId();
25492
      }
25493
      throw new IllegalStateException();
25494
    }
25495
 
25496
    public boolean isSet(int fieldID) {
25497
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25498
    }
25499
 
25500
    @Override
25501
    public boolean equals(Object that) {
25502
      if (that == null)
25503
        return false;
25504
      if (that instanceof mergeCart_args)
25505
        return this.equals((mergeCart_args)that);
25506
      return false;
25507
    }
25508
 
25509
    public boolean equals(mergeCart_args that) {
25510
      if (that == null)
25511
        return false;
25512
 
25513
      boolean this_present_fromCartId = true;
25514
      boolean that_present_fromCartId = true;
25515
      if (this_present_fromCartId || that_present_fromCartId) {
25516
        if (!(this_present_fromCartId && that_present_fromCartId))
25517
          return false;
25518
        if (this.fromCartId != that.fromCartId)
25519
          return false;
25520
      }
25521
 
25522
      boolean this_present_toCartId = true;
25523
      boolean that_present_toCartId = true;
25524
      if (this_present_toCartId || that_present_toCartId) {
25525
        if (!(this_present_toCartId && that_present_toCartId))
25526
          return false;
25527
        if (this.toCartId != that.toCartId)
25528
          return false;
25529
      }
25530
 
25531
      return true;
25532
    }
25533
 
25534
    @Override
25535
    public int hashCode() {
25536
      return 0;
25537
    }
25538
 
25539
    public int compareTo(mergeCart_args other) {
25540
      if (!getClass().equals(other.getClass())) {
25541
        return getClass().getName().compareTo(other.getClass().getName());
25542
      }
25543
 
25544
      int lastComparison = 0;
25545
      mergeCart_args typedOther = (mergeCart_args)other;
25546
 
25547
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
25548
      if (lastComparison != 0) {
25549
        return lastComparison;
25550
      }
25551
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
25552
      if (lastComparison != 0) {
25553
        return lastComparison;
25554
      }
25555
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
25556
      if (lastComparison != 0) {
25557
        return lastComparison;
25558
      }
25559
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
25560
      if (lastComparison != 0) {
25561
        return lastComparison;
25562
      }
25563
      return 0;
25564
    }
25565
 
25566
    public void read(TProtocol iprot) throws TException {
25567
      TField field;
25568
      iprot.readStructBegin();
25569
      while (true)
25570
      {
25571
        field = iprot.readFieldBegin();
25572
        if (field.type == TType.STOP) { 
25573
          break;
25574
        }
25575
        _Fields fieldId = _Fields.findByThriftId(field.id);
25576
        if (fieldId == null) {
25577
          TProtocolUtil.skip(iprot, field.type);
25578
        } else {
25579
          switch (fieldId) {
25580
            case FROM_CART_ID:
25581
              if (field.type == TType.I64) {
25582
                this.fromCartId = iprot.readI64();
25583
                setFromCartIdIsSet(true);
25584
              } else { 
25585
                TProtocolUtil.skip(iprot, field.type);
25586
              }
25587
              break;
25588
            case TO_CART_ID:
25589
              if (field.type == TType.I64) {
25590
                this.toCartId = iprot.readI64();
25591
                setToCartIdIsSet(true);
25592
              } else { 
25593
                TProtocolUtil.skip(iprot, field.type);
25594
              }
25595
              break;
25596
          }
25597
          iprot.readFieldEnd();
25598
        }
25599
      }
25600
      iprot.readStructEnd();
25601
      validate();
25602
    }
25603
 
25604
    public void write(TProtocol oprot) throws TException {
25605
      validate();
25606
 
25607
      oprot.writeStructBegin(STRUCT_DESC);
25608
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
25609
      oprot.writeI64(this.fromCartId);
25610
      oprot.writeFieldEnd();
25611
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
25612
      oprot.writeI64(this.toCartId);
25613
      oprot.writeFieldEnd();
25614
      oprot.writeFieldStop();
25615
      oprot.writeStructEnd();
25616
    }
25617
 
25618
    @Override
25619
    public String toString() {
25620
      StringBuilder sb = new StringBuilder("mergeCart_args(");
25621
      boolean first = true;
25622
 
25623
      sb.append("fromCartId:");
25624
      sb.append(this.fromCartId);
25625
      first = false;
25626
      if (!first) sb.append(", ");
25627
      sb.append("toCartId:");
25628
      sb.append(this.toCartId);
25629
      first = false;
25630
      sb.append(")");
25631
      return sb.toString();
25632
    }
25633
 
25634
    public void validate() throws TException {
25635
      // check for required fields
25636
    }
25637
 
25638
  }
25639
 
25640
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
25641
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
25642
 
25643
 
25644
 
25645
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25646
    public enum _Fields implements TFieldIdEnum {
25647
;
25648
 
25649
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25650
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25651
 
25652
      static {
25653
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25654
          byId.put((int)field._thriftId, field);
25655
          byName.put(field.getFieldName(), field);
25656
        }
25657
      }
25658
 
25659
      /**
25660
       * Find the _Fields constant that matches fieldId, or null if its not found.
25661
       */
25662
      public static _Fields findByThriftId(int fieldId) {
25663
        return byId.get(fieldId);
25664
      }
25665
 
25666
      /**
25667
       * Find the _Fields constant that matches fieldId, throwing an exception
25668
       * if it is not found.
25669
       */
25670
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25671
        _Fields fields = findByThriftId(fieldId);
25672
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25673
        return fields;
25674
      }
25675
 
25676
      /**
25677
       * Find the _Fields constant that matches name, or null if its not found.
25678
       */
25679
      public static _Fields findByName(String name) {
25680
        return byName.get(name);
25681
      }
25682
 
25683
      private final short _thriftId;
25684
      private final String _fieldName;
25685
 
25686
      _Fields(short thriftId, String fieldName) {
25687
        _thriftId = thriftId;
25688
        _fieldName = fieldName;
25689
      }
25690
 
25691
      public short getThriftFieldId() {
25692
        return _thriftId;
25693
      }
25694
 
25695
      public String getFieldName() {
25696
        return _fieldName;
25697
      }
25698
    }
25699
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25700
    }});
25701
 
25702
    static {
25703
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
25704
    }
25705
 
25706
    public mergeCart_result() {
25707
    }
25708
 
25709
    /**
25710
     * Performs a deep copy on <i>other</i>.
25711
     */
25712
    public mergeCart_result(mergeCart_result other) {
25713
    }
25714
 
25715
    public mergeCart_result deepCopy() {
25716
      return new mergeCart_result(this);
25717
    }
25718
 
25719
    @Deprecated
25720
    public mergeCart_result clone() {
25721
      return new mergeCart_result(this);
25722
    }
25723
 
25724
    public void setFieldValue(_Fields field, Object value) {
25725
      switch (field) {
25726
      }
25727
    }
25728
 
25729
    public void setFieldValue(int fieldID, Object value) {
25730
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25731
    }
25732
 
25733
    public Object getFieldValue(_Fields field) {
25734
      switch (field) {
25735
      }
25736
      throw new IllegalStateException();
25737
    }
25738
 
25739
    public Object getFieldValue(int fieldId) {
25740
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25741
    }
25742
 
25743
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25744
    public boolean isSet(_Fields field) {
25745
      switch (field) {
25746
      }
25747
      throw new IllegalStateException();
25748
    }
25749
 
25750
    public boolean isSet(int fieldID) {
25751
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25752
    }
25753
 
25754
    @Override
25755
    public boolean equals(Object that) {
25756
      if (that == null)
25757
        return false;
25758
      if (that instanceof mergeCart_result)
25759
        return this.equals((mergeCart_result)that);
25760
      return false;
25761
    }
25762
 
25763
    public boolean equals(mergeCart_result that) {
25764
      if (that == null)
25765
        return false;
25766
 
25767
      return true;
25768
    }
25769
 
25770
    @Override
25771
    public int hashCode() {
25772
      return 0;
25773
    }
25774
 
25775
    public int compareTo(mergeCart_result other) {
25776
      if (!getClass().equals(other.getClass())) {
25777
        return getClass().getName().compareTo(other.getClass().getName());
25778
      }
25779
 
25780
      int lastComparison = 0;
25781
      mergeCart_result typedOther = (mergeCart_result)other;
25782
 
25783
      return 0;
25784
    }
25785
 
25786
    public void read(TProtocol iprot) throws TException {
25787
      TField field;
25788
      iprot.readStructBegin();
25789
      while (true)
25790
      {
25791
        field = iprot.readFieldBegin();
25792
        if (field.type == TType.STOP) { 
25793
          break;
25794
        }
25795
        _Fields fieldId = _Fields.findByThriftId(field.id);
25796
        if (fieldId == null) {
25797
          TProtocolUtil.skip(iprot, field.type);
25798
        } else {
25799
          switch (fieldId) {
25800
          }
25801
          iprot.readFieldEnd();
25802
        }
25803
      }
25804
      iprot.readStructEnd();
25805
      validate();
25806
    }
25807
 
25808
    public void write(TProtocol oprot) throws TException {
25809
      oprot.writeStructBegin(STRUCT_DESC);
25810
 
25811
      oprot.writeFieldStop();
25812
      oprot.writeStructEnd();
25813
    }
25814
 
25815
    @Override
25816
    public String toString() {
25817
      StringBuilder sb = new StringBuilder("mergeCart_result(");
25818
      boolean first = true;
25819
 
25820
      sb.append(")");
25821
      return sb.toString();
25822
    }
25823
 
25824
    public void validate() throws TException {
25825
      // check for required fields
25826
    }
25827
 
25828
  }
25829
 
25830
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
25831
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
25832
 
578 chandransh 25833
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25834
 
25835
    private long cartId;
25836
 
25837
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25838
    public enum _Fields implements TFieldIdEnum {
25839
      CART_ID((short)1, "cartId");
25840
 
25841
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25842
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25843
 
25844
      static {
25845
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25846
          byId.put((int)field._thriftId, field);
25847
          byName.put(field.getFieldName(), field);
25848
        }
25849
      }
25850
 
25851
      /**
25852
       * Find the _Fields constant that matches fieldId, or null if its not found.
25853
       */
25854
      public static _Fields findByThriftId(int fieldId) {
25855
        return byId.get(fieldId);
25856
      }
25857
 
25858
      /**
25859
       * Find the _Fields constant that matches fieldId, throwing an exception
25860
       * if it is not found.
25861
       */
25862
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25863
        _Fields fields = findByThriftId(fieldId);
25864
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25865
        return fields;
25866
      }
25867
 
25868
      /**
25869
       * Find the _Fields constant that matches name, or null if its not found.
25870
       */
25871
      public static _Fields findByName(String name) {
25872
        return byName.get(name);
25873
      }
25874
 
25875
      private final short _thriftId;
25876
      private final String _fieldName;
25877
 
25878
      _Fields(short thriftId, String fieldName) {
25879
        _thriftId = thriftId;
25880
        _fieldName = fieldName;
25881
      }
25882
 
25883
      public short getThriftFieldId() {
25884
        return _thriftId;
25885
      }
25886
 
25887
      public String getFieldName() {
25888
        return _fieldName;
25889
      }
25890
    }
25891
 
25892
    // isset id assignments
25893
    private static final int __CARTID_ISSET_ID = 0;
25894
    private BitSet __isset_bit_vector = new BitSet(1);
25895
 
25896
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25897
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25898
          new FieldValueMetaData(TType.I64)));
25899
    }});
25900
 
25901
    static {
688 chandransh 25902
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
578 chandransh 25903
    }
25904
 
688 chandransh 25905
    public checkOut_args() {
578 chandransh 25906
    }
25907
 
688 chandransh 25908
    public checkOut_args(
578 chandransh 25909
      long cartId)
25910
    {
25911
      this();
25912
      this.cartId = cartId;
25913
      setCartIdIsSet(true);
25914
    }
25915
 
25916
    /**
25917
     * Performs a deep copy on <i>other</i>.
25918
     */
688 chandransh 25919
    public checkOut_args(checkOut_args other) {
578 chandransh 25920
      __isset_bit_vector.clear();
25921
      __isset_bit_vector.or(other.__isset_bit_vector);
25922
      this.cartId = other.cartId;
25923
    }
25924
 
688 chandransh 25925
    public checkOut_args deepCopy() {
25926
      return new checkOut_args(this);
578 chandransh 25927
    }
25928
 
25929
    @Deprecated
688 chandransh 25930
    public checkOut_args clone() {
25931
      return new checkOut_args(this);
578 chandransh 25932
    }
25933
 
25934
    public long getCartId() {
25935
      return this.cartId;
25936
    }
25937
 
688 chandransh 25938
    public checkOut_args setCartId(long cartId) {
578 chandransh 25939
      this.cartId = cartId;
25940
      setCartIdIsSet(true);
25941
      return this;
25942
    }
25943
 
25944
    public void unsetCartId() {
25945
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
25946
    }
25947
 
25948
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25949
    public boolean isSetCartId() {
25950
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
25951
    }
25952
 
25953
    public void setCartIdIsSet(boolean value) {
25954
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
25955
    }
25956
 
25957
    public void setFieldValue(_Fields field, Object value) {
25958
      switch (field) {
25959
      case CART_ID:
25960
        if (value == null) {
25961
          unsetCartId();
25962
        } else {
25963
          setCartId((Long)value);
25964
        }
25965
        break;
25966
 
25967
      }
25968
    }
25969
 
25970
    public void setFieldValue(int fieldID, Object value) {
25971
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25972
    }
25973
 
25974
    public Object getFieldValue(_Fields field) {
25975
      switch (field) {
25976
      case CART_ID:
25977
        return new Long(getCartId());
25978
 
25979
      }
25980
      throw new IllegalStateException();
25981
    }
25982
 
25983
    public Object getFieldValue(int fieldId) {
25984
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25985
    }
25986
 
25987
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25988
    public boolean isSet(_Fields field) {
25989
      switch (field) {
25990
      case CART_ID:
25991
        return isSetCartId();
25992
      }
25993
      throw new IllegalStateException();
25994
    }
25995
 
25996
    public boolean isSet(int fieldID) {
25997
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25998
    }
25999
 
26000
    @Override
26001
    public boolean equals(Object that) {
26002
      if (that == null)
26003
        return false;
688 chandransh 26004
      if (that instanceof checkOut_args)
26005
        return this.equals((checkOut_args)that);
578 chandransh 26006
      return false;
26007
    }
26008
 
688 chandransh 26009
    public boolean equals(checkOut_args that) {
578 chandransh 26010
      if (that == null)
26011
        return false;
26012
 
26013
      boolean this_present_cartId = true;
26014
      boolean that_present_cartId = true;
26015
      if (this_present_cartId || that_present_cartId) {
26016
        if (!(this_present_cartId && that_present_cartId))
26017
          return false;
26018
        if (this.cartId != that.cartId)
26019
          return false;
26020
      }
26021
 
26022
      return true;
26023
    }
26024
 
26025
    @Override
26026
    public int hashCode() {
26027
      return 0;
26028
    }
26029
 
688 chandransh 26030
    public int compareTo(checkOut_args other) {
578 chandransh 26031
      if (!getClass().equals(other.getClass())) {
26032
        return getClass().getName().compareTo(other.getClass().getName());
26033
      }
26034
 
26035
      int lastComparison = 0;
688 chandransh 26036
      checkOut_args typedOther = (checkOut_args)other;
578 chandransh 26037
 
26038
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
26039
      if (lastComparison != 0) {
26040
        return lastComparison;
26041
      }
26042
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
26043
      if (lastComparison != 0) {
26044
        return lastComparison;
26045
      }
26046
      return 0;
26047
    }
26048
 
26049
    public void read(TProtocol iprot) throws TException {
26050
      TField field;
26051
      iprot.readStructBegin();
26052
      while (true)
26053
      {
26054
        field = iprot.readFieldBegin();
26055
        if (field.type == TType.STOP) { 
26056
          break;
26057
        }
26058
        _Fields fieldId = _Fields.findByThriftId(field.id);
26059
        if (fieldId == null) {
26060
          TProtocolUtil.skip(iprot, field.type);
26061
        } else {
26062
          switch (fieldId) {
26063
            case CART_ID:
26064
              if (field.type == TType.I64) {
26065
                this.cartId = iprot.readI64();
26066
                setCartIdIsSet(true);
26067
              } else { 
26068
                TProtocolUtil.skip(iprot, field.type);
26069
              }
26070
              break;
26071
          }
26072
          iprot.readFieldEnd();
26073
        }
26074
      }
26075
      iprot.readStructEnd();
26076
      validate();
26077
    }
26078
 
26079
    public void write(TProtocol oprot) throws TException {
26080
      validate();
26081
 
26082
      oprot.writeStructBegin(STRUCT_DESC);
26083
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26084
      oprot.writeI64(this.cartId);
26085
      oprot.writeFieldEnd();
26086
      oprot.writeFieldStop();
26087
      oprot.writeStructEnd();
26088
    }
26089
 
26090
    @Override
26091
    public String toString() {
688 chandransh 26092
      StringBuilder sb = new StringBuilder("checkOut_args(");
578 chandransh 26093
      boolean first = true;
26094
 
26095
      sb.append("cartId:");
26096
      sb.append(this.cartId);
26097
      first = false;
26098
      sb.append(")");
26099
      return sb.toString();
26100
    }
26101
 
26102
    public void validate() throws TException {
26103
      // check for required fields
26104
    }
26105
 
26106
  }
26107
 
688 chandransh 26108
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
26109
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
578 chandransh 26110
 
26111
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
26112
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
26113
 
26114
    private boolean success;
26115
    private ShoppingCartException scex;
26116
 
26117
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26118
    public enum _Fields implements TFieldIdEnum {
26119
      SUCCESS((short)0, "success"),
26120
      SCEX((short)1, "scex");
26121
 
26122
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26123
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26124
 
26125
      static {
26126
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26127
          byId.put((int)field._thriftId, field);
26128
          byName.put(field.getFieldName(), field);
26129
        }
26130
      }
26131
 
26132
      /**
26133
       * Find the _Fields constant that matches fieldId, or null if its not found.
26134
       */
26135
      public static _Fields findByThriftId(int fieldId) {
26136
        return byId.get(fieldId);
26137
      }
26138
 
26139
      /**
26140
       * Find the _Fields constant that matches fieldId, throwing an exception
26141
       * if it is not found.
26142
       */
26143
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26144
        _Fields fields = findByThriftId(fieldId);
26145
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26146
        return fields;
26147
      }
26148
 
26149
      /**
26150
       * Find the _Fields constant that matches name, or null if its not found.
26151
       */
26152
      public static _Fields findByName(String name) {
26153
        return byName.get(name);
26154
      }
26155
 
26156
      private final short _thriftId;
26157
      private final String _fieldName;
26158
 
26159
      _Fields(short thriftId, String fieldName) {
26160
        _thriftId = thriftId;
26161
        _fieldName = fieldName;
26162
      }
26163
 
26164
      public short getThriftFieldId() {
26165
        return _thriftId;
26166
      }
26167
 
26168
      public String getFieldName() {
26169
        return _fieldName;
26170
      }
26171
    }
26172
 
26173
    // isset id assignments
26174
    private static final int __SUCCESS_ISSET_ID = 0;
26175
    private BitSet __isset_bit_vector = new BitSet(1);
26176
 
26177
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26178
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26179
          new FieldValueMetaData(TType.BOOL)));
26180
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
26181
          new FieldValueMetaData(TType.STRUCT)));
26182
    }});
26183
 
26184
    static {
688 chandransh 26185
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
578 chandransh 26186
    }
26187
 
688 chandransh 26188
    public checkOut_result() {
578 chandransh 26189
    }
26190
 
688 chandransh 26191
    public checkOut_result(
578 chandransh 26192
      boolean success,
26193
      ShoppingCartException scex)
26194
    {
26195
      this();
26196
      this.success = success;
26197
      setSuccessIsSet(true);
26198
      this.scex = scex;
26199
    }
26200
 
26201
    /**
26202
     * Performs a deep copy on <i>other</i>.
26203
     */
688 chandransh 26204
    public checkOut_result(checkOut_result other) {
578 chandransh 26205
      __isset_bit_vector.clear();
26206
      __isset_bit_vector.or(other.__isset_bit_vector);
26207
      this.success = other.success;
26208
      if (other.isSetScex()) {
26209
        this.scex = new ShoppingCartException(other.scex);
26210
      }
26211
    }
26212
 
688 chandransh 26213
    public checkOut_result deepCopy() {
26214
      return new checkOut_result(this);
578 chandransh 26215
    }
26216
 
26217
    @Deprecated
688 chandransh 26218
    public checkOut_result clone() {
26219
      return new checkOut_result(this);
578 chandransh 26220
    }
26221
 
26222
    public boolean isSuccess() {
26223
      return this.success;
26224
    }
26225
 
688 chandransh 26226
    public checkOut_result setSuccess(boolean success) {
578 chandransh 26227
      this.success = success;
26228
      setSuccessIsSet(true);
26229
      return this;
26230
    }
26231
 
26232
    public void unsetSuccess() {
26233
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26234
    }
26235
 
26236
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26237
    public boolean isSetSuccess() {
26238
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26239
    }
26240
 
26241
    public void setSuccessIsSet(boolean value) {
26242
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26243
    }
26244
 
26245
    public ShoppingCartException getScex() {
26246
      return this.scex;
26247
    }
26248
 
688 chandransh 26249
    public checkOut_result setScex(ShoppingCartException scex) {
578 chandransh 26250
      this.scex = scex;
26251
      return this;
26252
    }
26253
 
26254
    public void unsetScex() {
26255
      this.scex = null;
26256
    }
26257
 
26258
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
26259
    public boolean isSetScex() {
26260
      return this.scex != null;
26261
    }
26262
 
26263
    public void setScexIsSet(boolean value) {
26264
      if (!value) {
26265
        this.scex = null;
26266
      }
26267
    }
26268
 
26269
    public void setFieldValue(_Fields field, Object value) {
26270
      switch (field) {
26271
      case SUCCESS:
26272
        if (value == null) {
26273
          unsetSuccess();
26274
        } else {
26275
          setSuccess((Boolean)value);
26276
        }
26277
        break;
26278
 
26279
      case SCEX:
26280
        if (value == null) {
26281
          unsetScex();
26282
        } else {
26283
          setScex((ShoppingCartException)value);
26284
        }
26285
        break;
26286
 
26287
      }
26288
    }
26289
 
26290
    public void setFieldValue(int fieldID, Object value) {
26291
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26292
    }
26293
 
26294
    public Object getFieldValue(_Fields field) {
26295
      switch (field) {
26296
      case SUCCESS:
26297
        return new Boolean(isSuccess());
26298
 
26299
      case SCEX:
26300
        return getScex();
26301
 
26302
      }
26303
      throw new IllegalStateException();
26304
    }
26305
 
26306
    public Object getFieldValue(int fieldId) {
26307
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26308
    }
26309
 
26310
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26311
    public boolean isSet(_Fields field) {
26312
      switch (field) {
26313
      case SUCCESS:
26314
        return isSetSuccess();
26315
      case SCEX:
26316
        return isSetScex();
26317
      }
26318
      throw new IllegalStateException();
26319
    }
26320
 
26321
    public boolean isSet(int fieldID) {
26322
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26323
    }
26324
 
26325
    @Override
26326
    public boolean equals(Object that) {
26327
      if (that == null)
26328
        return false;
688 chandransh 26329
      if (that instanceof checkOut_result)
26330
        return this.equals((checkOut_result)that);
578 chandransh 26331
      return false;
26332
    }
26333
 
688 chandransh 26334
    public boolean equals(checkOut_result that) {
578 chandransh 26335
      if (that == null)
26336
        return false;
26337
 
26338
      boolean this_present_success = true;
26339
      boolean that_present_success = true;
26340
      if (this_present_success || that_present_success) {
26341
        if (!(this_present_success && that_present_success))
26342
          return false;
26343
        if (this.success != that.success)
26344
          return false;
26345
      }
26346
 
26347
      boolean this_present_scex = true && this.isSetScex();
26348
      boolean that_present_scex = true && that.isSetScex();
26349
      if (this_present_scex || that_present_scex) {
26350
        if (!(this_present_scex && that_present_scex))
26351
          return false;
26352
        if (!this.scex.equals(that.scex))
26353
          return false;
26354
      }
26355
 
26356
      return true;
26357
    }
26358
 
26359
    @Override
26360
    public int hashCode() {
26361
      return 0;
26362
    }
26363
 
688 chandransh 26364
    public int compareTo(checkOut_result other) {
578 chandransh 26365
      if (!getClass().equals(other.getClass())) {
26366
        return getClass().getName().compareTo(other.getClass().getName());
26367
      }
26368
 
26369
      int lastComparison = 0;
688 chandransh 26370
      checkOut_result typedOther = (checkOut_result)other;
578 chandransh 26371
 
26372
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26373
      if (lastComparison != 0) {
26374
        return lastComparison;
26375
      }
26376
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26377
      if (lastComparison != 0) {
26378
        return lastComparison;
26379
      }
26380
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
26381
      if (lastComparison != 0) {
26382
        return lastComparison;
26383
      }
26384
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
26385
      if (lastComparison != 0) {
26386
        return lastComparison;
26387
      }
26388
      return 0;
26389
    }
26390
 
26391
    public void read(TProtocol iprot) throws TException {
26392
      TField field;
26393
      iprot.readStructBegin();
26394
      while (true)
26395
      {
26396
        field = iprot.readFieldBegin();
26397
        if (field.type == TType.STOP) { 
26398
          break;
26399
        }
26400
        _Fields fieldId = _Fields.findByThriftId(field.id);
26401
        if (fieldId == null) {
26402
          TProtocolUtil.skip(iprot, field.type);
26403
        } else {
26404
          switch (fieldId) {
26405
            case SUCCESS:
26406
              if (field.type == TType.BOOL) {
26407
                this.success = iprot.readBool();
26408
                setSuccessIsSet(true);
26409
              } else { 
26410
                TProtocolUtil.skip(iprot, field.type);
26411
              }
26412
              break;
26413
            case SCEX:
26414
              if (field.type == TType.STRUCT) {
26415
                this.scex = new ShoppingCartException();
26416
                this.scex.read(iprot);
26417
              } else { 
26418
                TProtocolUtil.skip(iprot, field.type);
26419
              }
26420
              break;
26421
          }
26422
          iprot.readFieldEnd();
26423
        }
26424
      }
26425
      iprot.readStructEnd();
26426
      validate();
26427
    }
26428
 
26429
    public void write(TProtocol oprot) throws TException {
26430
      oprot.writeStructBegin(STRUCT_DESC);
26431
 
26432
      if (this.isSetSuccess()) {
26433
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26434
        oprot.writeBool(this.success);
26435
        oprot.writeFieldEnd();
26436
      } else if (this.isSetScex()) {
26437
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
26438
        this.scex.write(oprot);
26439
        oprot.writeFieldEnd();
26440
      }
26441
      oprot.writeFieldStop();
26442
      oprot.writeStructEnd();
26443
    }
26444
 
26445
    @Override
26446
    public String toString() {
688 chandransh 26447
      StringBuilder sb = new StringBuilder("checkOut_result(");
578 chandransh 26448
      boolean first = true;
26449
 
26450
      sb.append("success:");
26451
      sb.append(this.success);
26452
      first = false;
26453
      if (!first) sb.append(", ");
26454
      sb.append("scex:");
26455
      if (this.scex == null) {
26456
        sb.append("null");
26457
      } else {
26458
        sb.append(this.scex);
26459
      }
26460
      first = false;
26461
      sb.append(")");
26462
      return sb.toString();
26463
    }
26464
 
26465
    public void validate() throws TException {
26466
      // check for required fields
26467
    }
26468
 
26469
  }
26470
 
688 chandransh 26471
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
26472
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
553 chandransh 26473
 
688 chandransh 26474
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
26475
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
553 chandransh 26476
 
688 chandransh 26477
    private long cartId;
708 rajveer 26478
    private Map<Long,Double> items;
553 chandransh 26479
 
26480
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26481
    public enum _Fields implements TFieldIdEnum {
688 chandransh 26482
      CART_ID((short)1, "cartId"),
26483
      ITEMS((short)2, "items");
553 chandransh 26484
 
26485
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26486
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26487
 
26488
      static {
26489
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26490
          byId.put((int)field._thriftId, field);
26491
          byName.put(field.getFieldName(), field);
26492
        }
26493
      }
26494
 
26495
      /**
26496
       * Find the _Fields constant that matches fieldId, or null if its not found.
26497
       */
26498
      public static _Fields findByThriftId(int fieldId) {
26499
        return byId.get(fieldId);
26500
      }
26501
 
26502
      /**
26503
       * Find the _Fields constant that matches fieldId, throwing an exception
26504
       * if it is not found.
26505
       */
26506
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26507
        _Fields fields = findByThriftId(fieldId);
26508
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26509
        return fields;
26510
      }
26511
 
26512
      /**
26513
       * Find the _Fields constant that matches name, or null if its not found.
26514
       */
26515
      public static _Fields findByName(String name) {
26516
        return byName.get(name);
26517
      }
26518
 
26519
      private final short _thriftId;
26520
      private final String _fieldName;
26521
 
26522
      _Fields(short thriftId, String fieldName) {
26523
        _thriftId = thriftId;
26524
        _fieldName = fieldName;
26525
      }
26526
 
26527
      public short getThriftFieldId() {
26528
        return _thriftId;
26529
      }
26530
 
26531
      public String getFieldName() {
26532
        return _fieldName;
26533
      }
26534
    }
26535
 
26536
    // isset id assignments
688 chandransh 26537
    private static final int __CARTID_ISSET_ID = 0;
26538
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 26539
 
26540
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 26541
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
553 chandransh 26542
          new FieldValueMetaData(TType.I64)));
688 chandransh 26543
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
26544
          new MapMetaData(TType.MAP, 
26545
              new FieldValueMetaData(TType.I64), 
708 rajveer 26546
              new FieldValueMetaData(TType.DOUBLE))));
553 chandransh 26547
    }});
26548
 
26549
    static {
688 chandransh 26550
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
553 chandransh 26551
    }
26552
 
688 chandransh 26553
    public resetCart_args() {
553 chandransh 26554
    }
26555
 
688 chandransh 26556
    public resetCart_args(
26557
      long cartId,
708 rajveer 26558
      Map<Long,Double> items)
553 chandransh 26559
    {
26560
      this();
688 chandransh 26561
      this.cartId = cartId;
26562
      setCartIdIsSet(true);
26563
      this.items = items;
553 chandransh 26564
    }
26565
 
26566
    /**
26567
     * Performs a deep copy on <i>other</i>.
26568
     */
688 chandransh 26569
    public resetCart_args(resetCart_args other) {
553 chandransh 26570
      __isset_bit_vector.clear();
26571
      __isset_bit_vector.or(other.__isset_bit_vector);
688 chandransh 26572
      this.cartId = other.cartId;
26573
      if (other.isSetItems()) {
708 rajveer 26574
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
26575
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {
688 chandransh 26576
 
26577
          Long other_element_key = other_element.getKey();
708 rajveer 26578
          Double other_element_value = other_element.getValue();
688 chandransh 26579
 
26580
          Long __this__items_copy_key = other_element_key;
26581
 
708 rajveer 26582
          Double __this__items_copy_value = other_element_value;
688 chandransh 26583
 
26584
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
26585
        }
26586
        this.items = __this__items;
26587
      }
553 chandransh 26588
    }
26589
 
688 chandransh 26590
    public resetCart_args deepCopy() {
26591
      return new resetCart_args(this);
553 chandransh 26592
    }
26593
 
26594
    @Deprecated
688 chandransh 26595
    public resetCart_args clone() {
26596
      return new resetCart_args(this);
553 chandransh 26597
    }
26598
 
688 chandransh 26599
    public long getCartId() {
26600
      return this.cartId;
553 chandransh 26601
    }
26602
 
688 chandransh 26603
    public resetCart_args setCartId(long cartId) {
26604
      this.cartId = cartId;
26605
      setCartIdIsSet(true);
48 ashish 26606
      return this;
26607
    }
26608
 
688 chandransh 26609
    public void unsetCartId() {
26610
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26611
    }
26612
 
688 chandransh 26613
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26614
    public boolean isSetCartId() {
26615
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26616
    }
26617
 
688 chandransh 26618
    public void setCartIdIsSet(boolean value) {
26619
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 26620
    }
26621
 
688 chandransh 26622
    public int getItemsSize() {
26623
      return (this.items == null) ? 0 : this.items.size();
553 chandransh 26624
    }
26625
 
708 rajveer 26626
    public void putToItems(long key, double val) {
688 chandransh 26627
      if (this.items == null) {
708 rajveer 26628
        this.items = new HashMap<Long,Double>();
688 chandransh 26629
      }
26630
      this.items.put(key, val);
26631
    }
26632
 
708 rajveer 26633
    public Map<Long,Double> getItems() {
688 chandransh 26634
      return this.items;
26635
    }
26636
 
708 rajveer 26637
    public resetCart_args setItems(Map<Long,Double> items) {
688 chandransh 26638
      this.items = items;
553 chandransh 26639
      return this;
26640
    }
26641
 
688 chandransh 26642
    public void unsetItems() {
26643
      this.items = null;
553 chandransh 26644
    }
26645
 
688 chandransh 26646
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
26647
    public boolean isSetItems() {
26648
      return this.items != null;
553 chandransh 26649
    }
26650
 
688 chandransh 26651
    public void setItemsIsSet(boolean value) {
26652
      if (!value) {
26653
        this.items = null;
26654
      }
553 chandransh 26655
    }
26656
 
26657
    public void setFieldValue(_Fields field, Object value) {
26658
      switch (field) {
688 chandransh 26659
      case CART_ID:
553 chandransh 26660
        if (value == null) {
688 chandransh 26661
          unsetCartId();
553 chandransh 26662
        } else {
688 chandransh 26663
          setCartId((Long)value);
553 chandransh 26664
        }
26665
        break;
26666
 
688 chandransh 26667
      case ITEMS:
553 chandransh 26668
        if (value == null) {
688 chandransh 26669
          unsetItems();
553 chandransh 26670
        } else {
708 rajveer 26671
          setItems((Map<Long,Double>)value);
553 chandransh 26672
        }
26673
        break;
26674
 
26675
      }
26676
    }
26677
 
26678
    public void setFieldValue(int fieldID, Object value) {
26679
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26680
    }
26681
 
26682
    public Object getFieldValue(_Fields field) {
26683
      switch (field) {
688 chandransh 26684
      case CART_ID:
26685
        return new Long(getCartId());
553 chandransh 26686
 
688 chandransh 26687
      case ITEMS:
26688
        return getItems();
553 chandransh 26689
 
26690
      }
26691
      throw new IllegalStateException();
26692
    }
26693
 
26694
    public Object getFieldValue(int fieldId) {
26695
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26696
    }
26697
 
26698
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26699
    public boolean isSet(_Fields field) {
26700
      switch (field) {
688 chandransh 26701
      case CART_ID:
26702
        return isSetCartId();
26703
      case ITEMS:
26704
        return isSetItems();
553 chandransh 26705
      }
26706
      throw new IllegalStateException();
26707
    }
26708
 
26709
    public boolean isSet(int fieldID) {
26710
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26711
    }
26712
 
26713
    @Override
26714
    public boolean equals(Object that) {
26715
      if (that == null)
26716
        return false;
688 chandransh 26717
      if (that instanceof resetCart_args)
26718
        return this.equals((resetCart_args)that);
553 chandransh 26719
      return false;
26720
    }
26721
 
688 chandransh 26722
    public boolean equals(resetCart_args that) {
553 chandransh 26723
      if (that == null)
26724
        return false;
26725
 
688 chandransh 26726
      boolean this_present_cartId = true;
26727
      boolean that_present_cartId = true;
26728
      if (this_present_cartId || that_present_cartId) {
26729
        if (!(this_present_cartId && that_present_cartId))
553 chandransh 26730
          return false;
688 chandransh 26731
        if (this.cartId != that.cartId)
553 chandransh 26732
          return false;
26733
      }
26734
 
688 chandransh 26735
      boolean this_present_items = true && this.isSetItems();
26736
      boolean that_present_items = true && that.isSetItems();
26737
      if (this_present_items || that_present_items) {
26738
        if (!(this_present_items && that_present_items))
553 chandransh 26739
          return false;
688 chandransh 26740
        if (!this.items.equals(that.items))
553 chandransh 26741
          return false;
26742
      }
26743
 
26744
      return true;
26745
    }
26746
 
26747
    @Override
26748
    public int hashCode() {
26749
      return 0;
26750
    }
26751
 
26752
    public void read(TProtocol iprot) throws TException {
26753
      TField field;
26754
      iprot.readStructBegin();
26755
      while (true)
26756
      {
26757
        field = iprot.readFieldBegin();
26758
        if (field.type == TType.STOP) { 
26759
          break;
26760
        }
26761
        _Fields fieldId = _Fields.findByThriftId(field.id);
26762
        if (fieldId == null) {
26763
          TProtocolUtil.skip(iprot, field.type);
26764
        } else {
26765
          switch (fieldId) {
688 chandransh 26766
            case CART_ID:
553 chandransh 26767
              if (field.type == TType.I64) {
688 chandransh 26768
                this.cartId = iprot.readI64();
26769
                setCartIdIsSet(true);
553 chandransh 26770
              } else { 
26771
                TProtocolUtil.skip(iprot, field.type);
26772
              }
26773
              break;
688 chandransh 26774
            case ITEMS:
26775
              if (field.type == TType.MAP) {
26776
                {
771 rajveer 26777
                  TMap _map32 = iprot.readMapBegin();
26778
                  this.items = new HashMap<Long,Double>(2*_map32.size);
26779
                  for (int _i33 = 0; _i33 < _map32.size; ++_i33)
688 chandransh 26780
                  {
771 rajveer 26781
                    long _key34;
26782
                    double _val35;
26783
                    _key34 = iprot.readI64();
26784
                    _val35 = iprot.readDouble();
26785
                    this.items.put(_key34, _val35);
688 chandransh 26786
                  }
26787
                  iprot.readMapEnd();
26788
                }
553 chandransh 26789
              } else { 
26790
                TProtocolUtil.skip(iprot, field.type);
26791
              }
26792
              break;
26793
          }
26794
          iprot.readFieldEnd();
26795
        }
26796
      }
26797
      iprot.readStructEnd();
26798
      validate();
26799
    }
26800
 
26801
    public void write(TProtocol oprot) throws TException {
26802
      validate();
26803
 
26804
      oprot.writeStructBegin(STRUCT_DESC);
688 chandransh 26805
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26806
      oprot.writeI64(this.cartId);
553 chandransh 26807
      oprot.writeFieldEnd();
688 chandransh 26808
      if (this.items != null) {
26809
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
26810
        {
708 rajveer 26811
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
771 rajveer 26812
          for (Map.Entry<Long, Double> _iter36 : this.items.entrySet())
688 chandransh 26813
          {
771 rajveer 26814
            oprot.writeI64(_iter36.getKey());
26815
            oprot.writeDouble(_iter36.getValue());
688 chandransh 26816
          }
26817
          oprot.writeMapEnd();
26818
        }
26819
        oprot.writeFieldEnd();
26820
      }
553 chandransh 26821
      oprot.writeFieldStop();
26822
      oprot.writeStructEnd();
26823
    }
26824
 
26825
    @Override
26826
    public String toString() {
688 chandransh 26827
      StringBuilder sb = new StringBuilder("resetCart_args(");
553 chandransh 26828
      boolean first = true;
26829
 
688 chandransh 26830
      sb.append("cartId:");
26831
      sb.append(this.cartId);
553 chandransh 26832
      first = false;
26833
      if (!first) sb.append(", ");
688 chandransh 26834
      sb.append("items:");
26835
      if (this.items == null) {
26836
        sb.append("null");
26837
      } else {
26838
        sb.append(this.items);
26839
      }
553 chandransh 26840
      first = false;
26841
      sb.append(")");
26842
      return sb.toString();
26843
    }
26844
 
26845
    public void validate() throws TException {
26846
      // check for required fields
26847
    }
26848
 
26849
  }
26850
 
688 chandransh 26851
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
26852
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
553 chandransh 26853
 
688 chandransh 26854
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
26855
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
553 chandransh 26856
 
688 chandransh 26857
    private boolean success;
26858
    private ShoppingCartException scex;
553 chandransh 26859
 
26860
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26861
    public enum _Fields implements TFieldIdEnum {
688 chandransh 26862
      SUCCESS((short)0, "success"),
26863
      SCEX((short)1, "scex");
553 chandransh 26864
 
26865
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26866
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26867
 
26868
      static {
26869
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26870
          byId.put((int)field._thriftId, field);
26871
          byName.put(field.getFieldName(), field);
26872
        }
26873
      }
26874
 
26875
      /**
26876
       * Find the _Fields constant that matches fieldId, or null if its not found.
26877
       */
26878
      public static _Fields findByThriftId(int fieldId) {
26879
        return byId.get(fieldId);
26880
      }
26881
 
26882
      /**
26883
       * Find the _Fields constant that matches fieldId, throwing an exception
26884
       * if it is not found.
26885
       */
26886
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26887
        _Fields fields = findByThriftId(fieldId);
26888
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26889
        return fields;
26890
      }
26891
 
26892
      /**
26893
       * Find the _Fields constant that matches name, or null if its not found.
26894
       */
26895
      public static _Fields findByName(String name) {
26896
        return byName.get(name);
26897
      }
26898
 
26899
      private final short _thriftId;
26900
      private final String _fieldName;
26901
 
26902
      _Fields(short thriftId, String fieldName) {
26903
        _thriftId = thriftId;
26904
        _fieldName = fieldName;
26905
      }
26906
 
26907
      public short getThriftFieldId() {
26908
        return _thriftId;
26909
      }
26910
 
26911
      public String getFieldName() {
26912
        return _fieldName;
26913
      }
26914
    }
688 chandransh 26915
 
26916
    // isset id assignments
26917
    private static final int __SUCCESS_ISSET_ID = 0;
26918
    private BitSet __isset_bit_vector = new BitSet(1);
26919
 
553 chandransh 26920
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 26921
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26922
          new FieldValueMetaData(TType.BOOL)));
26923
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
26924
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 26925
    }});
26926
 
26927
    static {
688 chandransh 26928
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
553 chandransh 26929
    }
26930
 
688 chandransh 26931
    public resetCart_result() {
553 chandransh 26932
    }
26933
 
688 chandransh 26934
    public resetCart_result(
26935
      boolean success,
26936
      ShoppingCartException scex)
26937
    {
26938
      this();
26939
      this.success = success;
26940
      setSuccessIsSet(true);
26941
      this.scex = scex;
26942
    }
26943
 
553 chandransh 26944
    /**
26945
     * Performs a deep copy on <i>other</i>.
26946
     */
688 chandransh 26947
    public resetCart_result(resetCart_result other) {
26948
      __isset_bit_vector.clear();
26949
      __isset_bit_vector.or(other.__isset_bit_vector);
26950
      this.success = other.success;
26951
      if (other.isSetScex()) {
26952
        this.scex = new ShoppingCartException(other.scex);
26953
      }
553 chandransh 26954
    }
26955
 
688 chandransh 26956
    public resetCart_result deepCopy() {
26957
      return new resetCart_result(this);
553 chandransh 26958
    }
26959
 
26960
    @Deprecated
688 chandransh 26961
    public resetCart_result clone() {
26962
      return new resetCart_result(this);
553 chandransh 26963
    }
26964
 
688 chandransh 26965
    public boolean isSuccess() {
26966
      return this.success;
26967
    }
26968
 
26969
    public resetCart_result setSuccess(boolean success) {
26970
      this.success = success;
26971
      setSuccessIsSet(true);
26972
      return this;
26973
    }
26974
 
26975
    public void unsetSuccess() {
26976
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26977
    }
26978
 
26979
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26980
    public boolean isSetSuccess() {
26981
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26982
    }
26983
 
26984
    public void setSuccessIsSet(boolean value) {
26985
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26986
    }
26987
 
26988
    public ShoppingCartException getScex() {
26989
      return this.scex;
26990
    }
26991
 
26992
    public resetCart_result setScex(ShoppingCartException scex) {
26993
      this.scex = scex;
26994
      return this;
26995
    }
26996
 
26997
    public void unsetScex() {
26998
      this.scex = null;
26999
    }
27000
 
27001
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
27002
    public boolean isSetScex() {
27003
      return this.scex != null;
27004
    }
27005
 
27006
    public void setScexIsSet(boolean value) {
27007
      if (!value) {
27008
        this.scex = null;
27009
      }
27010
    }
27011
 
553 chandransh 27012
    public void setFieldValue(_Fields field, Object value) {
27013
      switch (field) {
688 chandransh 27014
      case SUCCESS:
27015
        if (value == null) {
27016
          unsetSuccess();
27017
        } else {
27018
          setSuccess((Boolean)value);
27019
        }
27020
        break;
27021
 
27022
      case SCEX:
27023
        if (value == null) {
27024
          unsetScex();
27025
        } else {
27026
          setScex((ShoppingCartException)value);
27027
        }
27028
        break;
27029
 
553 chandransh 27030
      }
27031
    }
27032
 
27033
    public void setFieldValue(int fieldID, Object value) {
27034
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27035
    }
27036
 
27037
    public Object getFieldValue(_Fields field) {
27038
      switch (field) {
688 chandransh 27039
      case SUCCESS:
27040
        return new Boolean(isSuccess());
27041
 
27042
      case SCEX:
27043
        return getScex();
27044
 
553 chandransh 27045
      }
27046
      throw new IllegalStateException();
27047
    }
27048
 
27049
    public Object getFieldValue(int fieldId) {
27050
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27051
    }
27052
 
27053
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27054
    public boolean isSet(_Fields field) {
27055
      switch (field) {
688 chandransh 27056
      case SUCCESS:
27057
        return isSetSuccess();
27058
      case SCEX:
27059
        return isSetScex();
553 chandransh 27060
      }
27061
      throw new IllegalStateException();
27062
    }
27063
 
27064
    public boolean isSet(int fieldID) {
27065
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27066
    }
27067
 
27068
    @Override
27069
    public boolean equals(Object that) {
27070
      if (that == null)
27071
        return false;
688 chandransh 27072
      if (that instanceof resetCart_result)
27073
        return this.equals((resetCart_result)that);
553 chandransh 27074
      return false;
27075
    }
27076
 
688 chandransh 27077
    public boolean equals(resetCart_result that) {
553 chandransh 27078
      if (that == null)
27079
        return false;
27080
 
688 chandransh 27081
      boolean this_present_success = true;
27082
      boolean that_present_success = true;
27083
      if (this_present_success || that_present_success) {
27084
        if (!(this_present_success && that_present_success))
27085
          return false;
27086
        if (this.success != that.success)
27087
          return false;
27088
      }
27089
 
27090
      boolean this_present_scex = true && this.isSetScex();
27091
      boolean that_present_scex = true && that.isSetScex();
27092
      if (this_present_scex || that_present_scex) {
27093
        if (!(this_present_scex && that_present_scex))
27094
          return false;
27095
        if (!this.scex.equals(that.scex))
27096
          return false;
27097
      }
27098
 
553 chandransh 27099
      return true;
27100
    }
27101
 
27102
    @Override
27103
    public int hashCode() {
27104
      return 0;
27105
    }
27106
 
688 chandransh 27107
    public int compareTo(resetCart_result other) {
553 chandransh 27108
      if (!getClass().equals(other.getClass())) {
27109
        return getClass().getName().compareTo(other.getClass().getName());
27110
      }
27111
 
27112
      int lastComparison = 0;
688 chandransh 27113
      resetCart_result typedOther = (resetCart_result)other;
553 chandransh 27114
 
688 chandransh 27115
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27116
      if (lastComparison != 0) {
27117
        return lastComparison;
27118
      }
27119
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27120
      if (lastComparison != 0) {
27121
        return lastComparison;
27122
      }
27123
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
27124
      if (lastComparison != 0) {
27125
        return lastComparison;
27126
      }
27127
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
27128
      if (lastComparison != 0) {
27129
        return lastComparison;
27130
      }
553 chandransh 27131
      return 0;
27132
    }
27133
 
27134
    public void read(TProtocol iprot) throws TException {
27135
      TField field;
27136
      iprot.readStructBegin();
27137
      while (true)
27138
      {
27139
        field = iprot.readFieldBegin();
27140
        if (field.type == TType.STOP) { 
27141
          break;
27142
        }
27143
        _Fields fieldId = _Fields.findByThriftId(field.id);
27144
        if (fieldId == null) {
27145
          TProtocolUtil.skip(iprot, field.type);
27146
        } else {
27147
          switch (fieldId) {
688 chandransh 27148
            case SUCCESS:
27149
              if (field.type == TType.BOOL) {
27150
                this.success = iprot.readBool();
27151
                setSuccessIsSet(true);
27152
              } else { 
27153
                TProtocolUtil.skip(iprot, field.type);
27154
              }
27155
              break;
27156
            case SCEX:
27157
              if (field.type == TType.STRUCT) {
27158
                this.scex = new ShoppingCartException();
27159
                this.scex.read(iprot);
27160
              } else { 
27161
                TProtocolUtil.skip(iprot, field.type);
27162
              }
27163
              break;
553 chandransh 27164
          }
27165
          iprot.readFieldEnd();
27166
        }
27167
      }
27168
      iprot.readStructEnd();
27169
      validate();
27170
    }
27171
 
27172
    public void write(TProtocol oprot) throws TException {
27173
      oprot.writeStructBegin(STRUCT_DESC);
27174
 
688 chandransh 27175
      if (this.isSetSuccess()) {
27176
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27177
        oprot.writeBool(this.success);
27178
        oprot.writeFieldEnd();
27179
      } else if (this.isSetScex()) {
27180
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
27181
        this.scex.write(oprot);
27182
        oprot.writeFieldEnd();
27183
      }
553 chandransh 27184
      oprot.writeFieldStop();
27185
      oprot.writeStructEnd();
27186
    }
27187
 
27188
    @Override
27189
    public String toString() {
688 chandransh 27190
      StringBuilder sb = new StringBuilder("resetCart_result(");
553 chandransh 27191
      boolean first = true;
27192
 
688 chandransh 27193
      sb.append("success:");
27194
      sb.append(this.success);
27195
      first = false;
27196
      if (!first) sb.append(", ");
27197
      sb.append("scex:");
27198
      if (this.scex == null) {
27199
        sb.append("null");
27200
      } else {
27201
        sb.append(this.scex);
27202
      }
27203
      first = false;
553 chandransh 27204
      sb.append(")");
27205
      return sb.toString();
27206
    }
27207
 
27208
    public void validate() throws TException {
27209
      // check for required fields
27210
    }
27211
 
27212
  }
27213
 
771 rajveer 27214
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
27215
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
553 chandransh 27216
 
771 rajveer 27217
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 27218
 
27219
    private long userId;
27220
 
27221
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27222
    public enum _Fields implements TFieldIdEnum {
771 rajveer 27223
      USER_ID((short)1, "userId");
553 chandransh 27224
 
27225
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27226
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27227
 
27228
      static {
27229
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27230
          byId.put((int)field._thriftId, field);
27231
          byName.put(field.getFieldName(), field);
27232
        }
27233
      }
27234
 
27235
      /**
27236
       * Find the _Fields constant that matches fieldId, or null if its not found.
27237
       */
27238
      public static _Fields findByThriftId(int fieldId) {
27239
        return byId.get(fieldId);
27240
      }
27241
 
27242
      /**
27243
       * Find the _Fields constant that matches fieldId, throwing an exception
27244
       * if it is not found.
27245
       */
27246
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27247
        _Fields fields = findByThriftId(fieldId);
27248
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27249
        return fields;
27250
      }
27251
 
27252
      /**
27253
       * Find the _Fields constant that matches name, or null if its not found.
27254
       */
27255
      public static _Fields findByName(String name) {
27256
        return byName.get(name);
27257
      }
27258
 
27259
      private final short _thriftId;
27260
      private final String _fieldName;
27261
 
27262
      _Fields(short thriftId, String fieldName) {
27263
        _thriftId = thriftId;
27264
        _fieldName = fieldName;
27265
      }
27266
 
27267
      public short getThriftFieldId() {
27268
        return _thriftId;
27269
      }
27270
 
27271
      public String getFieldName() {
27272
        return _fieldName;
27273
      }
27274
    }
27275
 
27276
    // isset id assignments
27277
    private static final int __USERID_ISSET_ID = 0;
771 rajveer 27278
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 27279
 
27280
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27281
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
27282
          new FieldValueMetaData(TType.I64)));
27283
    }});
27284
 
27285
    static {
771 rajveer 27286
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
553 chandransh 27287
    }
27288
 
771 rajveer 27289
    public getMyResearch_args() {
553 chandransh 27290
    }
27291
 
771 rajveer 27292
    public getMyResearch_args(
27293
      long userId)
553 chandransh 27294
    {
27295
      this();
27296
      this.userId = userId;
27297
      setUserIdIsSet(true);
27298
    }
27299
 
27300
    /**
27301
     * Performs a deep copy on <i>other</i>.
27302
     */
771 rajveer 27303
    public getMyResearch_args(getMyResearch_args other) {
553 chandransh 27304
      __isset_bit_vector.clear();
27305
      __isset_bit_vector.or(other.__isset_bit_vector);
27306
      this.userId = other.userId;
27307
    }
27308
 
771 rajveer 27309
    public getMyResearch_args deepCopy() {
27310
      return new getMyResearch_args(this);
553 chandransh 27311
    }
27312
 
27313
    @Deprecated
771 rajveer 27314
    public getMyResearch_args clone() {
27315
      return new getMyResearch_args(this);
553 chandransh 27316
    }
27317
 
27318
    public long getUserId() {
27319
      return this.userId;
27320
    }
27321
 
771 rajveer 27322
    public getMyResearch_args setUserId(long userId) {
553 chandransh 27323
      this.userId = userId;
27324
      setUserIdIsSet(true);
27325
      return this;
27326
    }
27327
 
27328
    public void unsetUserId() {
27329
      __isset_bit_vector.clear(__USERID_ISSET_ID);
27330
    }
27331
 
27332
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
27333
    public boolean isSetUserId() {
27334
      return __isset_bit_vector.get(__USERID_ISSET_ID);
27335
    }
27336
 
27337
    public void setUserIdIsSet(boolean value) {
27338
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
27339
    }
27340
 
48 ashish 27341
    public void setFieldValue(_Fields field, Object value) {
27342
      switch (field) {
553 chandransh 27343
      case USER_ID:
48 ashish 27344
        if (value == null) {
553 chandransh 27345
          unsetUserId();
48 ashish 27346
        } else {
553 chandransh 27347
          setUserId((Long)value);
48 ashish 27348
        }
27349
        break;
27350
 
27351
      }
27352
    }
27353
 
27354
    public void setFieldValue(int fieldID, Object value) {
27355
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27356
    }
27357
 
27358
    public Object getFieldValue(_Fields field) {
27359
      switch (field) {
553 chandransh 27360
      case USER_ID:
27361
        return new Long(getUserId());
48 ashish 27362
 
27363
      }
27364
      throw new IllegalStateException();
27365
    }
27366
 
27367
    public Object getFieldValue(int fieldId) {
27368
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27369
    }
27370
 
27371
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27372
    public boolean isSet(_Fields field) {
27373
      switch (field) {
553 chandransh 27374
      case USER_ID:
27375
        return isSetUserId();
48 ashish 27376
      }
27377
      throw new IllegalStateException();
27378
    }
27379
 
27380
    public boolean isSet(int fieldID) {
27381
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27382
    }
27383
 
27384
    @Override
27385
    public boolean equals(Object that) {
27386
      if (that == null)
27387
        return false;
771 rajveer 27388
      if (that instanceof getMyResearch_args)
27389
        return this.equals((getMyResearch_args)that);
48 ashish 27390
      return false;
27391
    }
27392
 
771 rajveer 27393
    public boolean equals(getMyResearch_args that) {
48 ashish 27394
      if (that == null)
27395
        return false;
27396
 
553 chandransh 27397
      boolean this_present_userId = true;
27398
      boolean that_present_userId = true;
27399
      if (this_present_userId || that_present_userId) {
27400
        if (!(this_present_userId && that_present_userId))
48 ashish 27401
          return false;
553 chandransh 27402
        if (this.userId != that.userId)
48 ashish 27403
          return false;
27404
      }
27405
 
27406
      return true;
27407
    }
27408
 
27409
    @Override
27410
    public int hashCode() {
27411
      return 0;
27412
    }
27413
 
771 rajveer 27414
    public int compareTo(getMyResearch_args other) {
48 ashish 27415
      if (!getClass().equals(other.getClass())) {
27416
        return getClass().getName().compareTo(other.getClass().getName());
27417
      }
27418
 
27419
      int lastComparison = 0;
771 rajveer 27420
      getMyResearch_args typedOther = (getMyResearch_args)other;
48 ashish 27421
 
553 chandransh 27422
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 27423
      if (lastComparison != 0) {
27424
        return lastComparison;
27425
      }
553 chandransh 27426
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 27427
      if (lastComparison != 0) {
27428
        return lastComparison;
27429
      }
27430
      return 0;
27431
    }
27432
 
27433
    public void read(TProtocol iprot) throws TException {
27434
      TField field;
27435
      iprot.readStructBegin();
27436
      while (true)
27437
      {
27438
        field = iprot.readFieldBegin();
27439
        if (field.type == TType.STOP) { 
27440
          break;
27441
        }
27442
        _Fields fieldId = _Fields.findByThriftId(field.id);
27443
        if (fieldId == null) {
27444
          TProtocolUtil.skip(iprot, field.type);
27445
        } else {
27446
          switch (fieldId) {
553 chandransh 27447
            case USER_ID:
27448
              if (field.type == TType.I64) {
27449
                this.userId = iprot.readI64();
27450
                setUserIdIsSet(true);
48 ashish 27451
              } else { 
27452
                TProtocolUtil.skip(iprot, field.type);
27453
              }
27454
              break;
27455
          }
27456
          iprot.readFieldEnd();
27457
        }
27458
      }
27459
      iprot.readStructEnd();
27460
      validate();
27461
    }
27462
 
27463
    public void write(TProtocol oprot) throws TException {
27464
      validate();
27465
 
27466
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 27467
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
27468
      oprot.writeI64(this.userId);
27469
      oprot.writeFieldEnd();
27470
      oprot.writeFieldStop();
27471
      oprot.writeStructEnd();
27472
    }
27473
 
27474
    @Override
27475
    public String toString() {
771 rajveer 27476
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
553 chandransh 27477
      boolean first = true;
27478
 
27479
      sb.append("userId:");
27480
      sb.append(this.userId);
27481
      first = false;
27482
      sb.append(")");
27483
      return sb.toString();
27484
    }
27485
 
27486
    public void validate() throws TException {
27487
      // check for required fields
27488
    }
27489
 
27490
  }
27491
 
27492
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
27493
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
27494
 
27495
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
27496
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
27497
 
27498
    private Widget success;
27499
    private WidgetException scx;
27500
 
27501
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27502
    public enum _Fields implements TFieldIdEnum {
27503
      SUCCESS((short)0, "success"),
27504
      SCX((short)1, "scx");
27505
 
27506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27508
 
27509
      static {
27510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27511
          byId.put((int)field._thriftId, field);
27512
          byName.put(field.getFieldName(), field);
27513
        }
27514
      }
27515
 
27516
      /**
27517
       * Find the _Fields constant that matches fieldId, or null if its not found.
27518
       */
27519
      public static _Fields findByThriftId(int fieldId) {
27520
        return byId.get(fieldId);
27521
      }
27522
 
27523
      /**
27524
       * Find the _Fields constant that matches fieldId, throwing an exception
27525
       * if it is not found.
27526
       */
27527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27528
        _Fields fields = findByThriftId(fieldId);
27529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27530
        return fields;
27531
      }
27532
 
27533
      /**
27534
       * Find the _Fields constant that matches name, or null if its not found.
27535
       */
27536
      public static _Fields findByName(String name) {
27537
        return byName.get(name);
27538
      }
27539
 
27540
      private final short _thriftId;
27541
      private final String _fieldName;
27542
 
27543
      _Fields(short thriftId, String fieldName) {
27544
        _thriftId = thriftId;
27545
        _fieldName = fieldName;
27546
      }
27547
 
27548
      public short getThriftFieldId() {
27549
        return _thriftId;
27550
      }
27551
 
27552
      public String getFieldName() {
27553
        return _fieldName;
27554
      }
27555
    }
27556
 
27557
    // isset id assignments
27558
 
27559
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 27560
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 27561
          new StructMetaData(TType.STRUCT, Widget.class)));
27562
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 27563
          new FieldValueMetaData(TType.STRUCT)));
27564
    }});
27565
 
27566
    static {
553 chandransh 27567
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 27568
    }
27569
 
553 chandransh 27570
    public getMyResearch_result() {
48 ashish 27571
    }
27572
 
553 chandransh 27573
    public getMyResearch_result(
27574
      Widget success,
27575
      WidgetException scx)
48 ashish 27576
    {
27577
      this();
27578
      this.success = success;
553 chandransh 27579
      this.scx = scx;
48 ashish 27580
    }
27581
 
27582
    /**
27583
     * Performs a deep copy on <i>other</i>.
27584
     */
553 chandransh 27585
    public getMyResearch_result(getMyResearch_result other) {
27586
      if (other.isSetSuccess()) {
27587
        this.success = new Widget(other.success);
48 ashish 27588
      }
553 chandransh 27589
      if (other.isSetScx()) {
27590
        this.scx = new WidgetException(other.scx);
27591
      }
48 ashish 27592
    }
27593
 
553 chandransh 27594
    public getMyResearch_result deepCopy() {
27595
      return new getMyResearch_result(this);
48 ashish 27596
    }
27597
 
27598
    @Deprecated
553 chandransh 27599
    public getMyResearch_result clone() {
27600
      return new getMyResearch_result(this);
48 ashish 27601
    }
27602
 
553 chandransh 27603
    public Widget getSuccess() {
48 ashish 27604
      return this.success;
27605
    }
27606
 
553 chandransh 27607
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 27608
      this.success = success;
27609
      return this;
27610
    }
27611
 
27612
    public void unsetSuccess() {
553 chandransh 27613
      this.success = null;
48 ashish 27614
    }
27615
 
27616
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27617
    public boolean isSetSuccess() {
553 chandransh 27618
      return this.success != null;
48 ashish 27619
    }
27620
 
27621
    public void setSuccessIsSet(boolean value) {
553 chandransh 27622
      if (!value) {
27623
        this.success = null;
27624
      }
48 ashish 27625
    }
27626
 
553 chandransh 27627
    public WidgetException getScx() {
27628
      return this.scx;
48 ashish 27629
    }
27630
 
553 chandransh 27631
    public getMyResearch_result setScx(WidgetException scx) {
27632
      this.scx = scx;
48 ashish 27633
      return this;
27634
    }
27635
 
553 chandransh 27636
    public void unsetScx() {
27637
      this.scx = null;
48 ashish 27638
    }
27639
 
553 chandransh 27640
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27641
    public boolean isSetScx() {
27642
      return this.scx != null;
48 ashish 27643
    }
27644
 
553 chandransh 27645
    public void setScxIsSet(boolean value) {
48 ashish 27646
      if (!value) {
553 chandransh 27647
        this.scx = null;
48 ashish 27648
      }
27649
    }
27650
 
27651
    public void setFieldValue(_Fields field, Object value) {
27652
      switch (field) {
27653
      case SUCCESS:
27654
        if (value == null) {
27655
          unsetSuccess();
27656
        } else {
553 chandransh 27657
          setSuccess((Widget)value);
48 ashish 27658
        }
27659
        break;
27660
 
553 chandransh 27661
      case SCX:
48 ashish 27662
        if (value == null) {
553 chandransh 27663
          unsetScx();
48 ashish 27664
        } else {
553 chandransh 27665
          setScx((WidgetException)value);
48 ashish 27666
        }
27667
        break;
27668
 
27669
      }
27670
    }
27671
 
27672
    public void setFieldValue(int fieldID, Object value) {
27673
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27674
    }
27675
 
27676
    public Object getFieldValue(_Fields field) {
27677
      switch (field) {
27678
      case SUCCESS:
553 chandransh 27679
        return getSuccess();
48 ashish 27680
 
553 chandransh 27681
      case SCX:
27682
        return getScx();
48 ashish 27683
 
27684
      }
27685
      throw new IllegalStateException();
27686
    }
27687
 
27688
    public Object getFieldValue(int fieldId) {
27689
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27690
    }
27691
 
27692
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27693
    public boolean isSet(_Fields field) {
27694
      switch (field) {
27695
      case SUCCESS:
27696
        return isSetSuccess();
553 chandransh 27697
      case SCX:
27698
        return isSetScx();
48 ashish 27699
      }
27700
      throw new IllegalStateException();
27701
    }
27702
 
27703
    public boolean isSet(int fieldID) {
27704
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27705
    }
27706
 
27707
    @Override
27708
    public boolean equals(Object that) {
27709
      if (that == null)
27710
        return false;
553 chandransh 27711
      if (that instanceof getMyResearch_result)
27712
        return this.equals((getMyResearch_result)that);
48 ashish 27713
      return false;
27714
    }
27715
 
553 chandransh 27716
    public boolean equals(getMyResearch_result that) {
48 ashish 27717
      if (that == null)
27718
        return false;
27719
 
553 chandransh 27720
      boolean this_present_success = true && this.isSetSuccess();
27721
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 27722
      if (this_present_success || that_present_success) {
27723
        if (!(this_present_success && that_present_success))
27724
          return false;
553 chandransh 27725
        if (!this.success.equals(that.success))
48 ashish 27726
          return false;
27727
      }
27728
 
553 chandransh 27729
      boolean this_present_scx = true && this.isSetScx();
27730
      boolean that_present_scx = true && that.isSetScx();
27731
      if (this_present_scx || that_present_scx) {
27732
        if (!(this_present_scx && that_present_scx))
48 ashish 27733
          return false;
553 chandransh 27734
        if (!this.scx.equals(that.scx))
48 ashish 27735
          return false;
27736
      }
27737
 
27738
      return true;
27739
    }
27740
 
27741
    @Override
27742
    public int hashCode() {
27743
      return 0;
27744
    }
27745
 
553 chandransh 27746
    public int compareTo(getMyResearch_result other) {
48 ashish 27747
      if (!getClass().equals(other.getClass())) {
27748
        return getClass().getName().compareTo(other.getClass().getName());
27749
      }
27750
 
27751
      int lastComparison = 0;
553 chandransh 27752
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 27753
 
27754
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27755
      if (lastComparison != 0) {
27756
        return lastComparison;
27757
      }
27758
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27759
      if (lastComparison != 0) {
27760
        return lastComparison;
27761
      }
553 chandransh 27762
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 27763
      if (lastComparison != 0) {
27764
        return lastComparison;
27765
      }
553 chandransh 27766
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 27767
      if (lastComparison != 0) {
27768
        return lastComparison;
27769
      }
27770
      return 0;
27771
    }
27772
 
27773
    public void read(TProtocol iprot) throws TException {
27774
      TField field;
27775
      iprot.readStructBegin();
27776
      while (true)
27777
      {
27778
        field = iprot.readFieldBegin();
27779
        if (field.type == TType.STOP) { 
27780
          break;
27781
        }
27782
        _Fields fieldId = _Fields.findByThriftId(field.id);
27783
        if (fieldId == null) {
27784
          TProtocolUtil.skip(iprot, field.type);
27785
        } else {
27786
          switch (fieldId) {
27787
            case SUCCESS:
553 chandransh 27788
              if (field.type == TType.STRUCT) {
27789
                this.success = new Widget();
27790
                this.success.read(iprot);
48 ashish 27791
              } else { 
27792
                TProtocolUtil.skip(iprot, field.type);
27793
              }
27794
              break;
553 chandransh 27795
            case SCX:
48 ashish 27796
              if (field.type == TType.STRUCT) {
553 chandransh 27797
                this.scx = new WidgetException();
27798
                this.scx.read(iprot);
48 ashish 27799
              } else { 
27800
                TProtocolUtil.skip(iprot, field.type);
27801
              }
27802
              break;
27803
          }
27804
          iprot.readFieldEnd();
27805
        }
27806
      }
27807
      iprot.readStructEnd();
27808
      validate();
27809
    }
27810
 
27811
    public void write(TProtocol oprot) throws TException {
27812
      oprot.writeStructBegin(STRUCT_DESC);
27813
 
27814
      if (this.isSetSuccess()) {
27815
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 27816
        this.success.write(oprot);
48 ashish 27817
        oprot.writeFieldEnd();
553 chandransh 27818
      } else if (this.isSetScx()) {
27819
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27820
        this.scx.write(oprot);
48 ashish 27821
        oprot.writeFieldEnd();
27822
      }
27823
      oprot.writeFieldStop();
27824
      oprot.writeStructEnd();
27825
    }
27826
 
27827
    @Override
27828
    public String toString() {
553 chandransh 27829
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 27830
      boolean first = true;
27831
 
27832
      sb.append("success:");
553 chandransh 27833
      if (this.success == null) {
27834
        sb.append("null");
27835
      } else {
27836
        sb.append(this.success);
27837
      }
48 ashish 27838
      first = false;
27839
      if (!first) sb.append(", ");
553 chandransh 27840
      sb.append("scx:");
27841
      if (this.scx == null) {
48 ashish 27842
        sb.append("null");
27843
      } else {
553 chandransh 27844
        sb.append(this.scx);
48 ashish 27845
      }
27846
      first = false;
27847
      sb.append(")");
27848
      return sb.toString();
27849
    }
27850
 
27851
    public void validate() throws TException {
27852
      // check for required fields
27853
    }
27854
 
27855
  }
27856
 
553 chandransh 27857
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
27858
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 27859
 
771 rajveer 27860
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
27861
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 27862
 
771 rajveer 27863
    private long userId;
27864
    private long itemId;
130 ashish 27865
 
27866
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27867
    public enum _Fields implements TFieldIdEnum {
771 rajveer 27868
      USER_ID((short)1, "userId"),
27869
      ITEM_ID((short)2, "itemId");
130 ashish 27870
 
27871
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27872
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27873
 
27874
      static {
27875
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27876
          byId.put((int)field._thriftId, field);
27877
          byName.put(field.getFieldName(), field);
27878
        }
27879
      }
27880
 
27881
      /**
27882
       * Find the _Fields constant that matches fieldId, or null if its not found.
27883
       */
27884
      public static _Fields findByThriftId(int fieldId) {
27885
        return byId.get(fieldId);
27886
      }
27887
 
27888
      /**
27889
       * Find the _Fields constant that matches fieldId, throwing an exception
27890
       * if it is not found.
27891
       */
27892
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27893
        _Fields fields = findByThriftId(fieldId);
27894
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27895
        return fields;
27896
      }
27897
 
27898
      /**
27899
       * Find the _Fields constant that matches name, or null if its not found.
27900
       */
27901
      public static _Fields findByName(String name) {
27902
        return byName.get(name);
27903
      }
27904
 
27905
      private final short _thriftId;
27906
      private final String _fieldName;
27907
 
27908
      _Fields(short thriftId, String fieldName) {
27909
        _thriftId = thriftId;
27910
        _fieldName = fieldName;
27911
      }
27912
 
27913
      public short getThriftFieldId() {
27914
        return _thriftId;
27915
      }
27916
 
27917
      public String getFieldName() {
27918
        return _fieldName;
27919
      }
27920
    }
27921
 
27922
    // isset id assignments
771 rajveer 27923
    private static final int __USERID_ISSET_ID = 0;
27924
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 27925
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 27926
 
27927
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 27928
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
130 ashish 27929
          new FieldValueMetaData(TType.I64)));
771 rajveer 27930
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 27931
          new FieldValueMetaData(TType.I64)));
130 ashish 27932
    }});
27933
 
27934
    static {
553 chandransh 27935
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 27936
    }
27937
 
553 chandransh 27938
    public updateMyResearch_args() {
130 ashish 27939
    }
27940
 
553 chandransh 27941
    public updateMyResearch_args(
771 rajveer 27942
      long userId,
27943
      long itemId)
130 ashish 27944
    {
27945
      this();
771 rajveer 27946
      this.userId = userId;
27947
      setUserIdIsSet(true);
27948
      this.itemId = itemId;
27949
      setItemIdIsSet(true);
130 ashish 27950
    }
27951
 
27952
    /**
27953
     * Performs a deep copy on <i>other</i>.
27954
     */
553 chandransh 27955
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 27956
      __isset_bit_vector.clear();
27957
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 27958
      this.userId = other.userId;
27959
      this.itemId = other.itemId;
130 ashish 27960
    }
27961
 
553 chandransh 27962
    public updateMyResearch_args deepCopy() {
27963
      return new updateMyResearch_args(this);
130 ashish 27964
    }
27965
 
27966
    @Deprecated
553 chandransh 27967
    public updateMyResearch_args clone() {
27968
      return new updateMyResearch_args(this);
130 ashish 27969
    }
27970
 
771 rajveer 27971
    public long getUserId() {
27972
      return this.userId;
130 ashish 27973
    }
27974
 
771 rajveer 27975
    public updateMyResearch_args setUserId(long userId) {
27976
      this.userId = userId;
27977
      setUserIdIsSet(true);
130 ashish 27978
      return this;
27979
    }
27980
 
771 rajveer 27981
    public void unsetUserId() {
27982
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 27983
    }
27984
 
771 rajveer 27985
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
27986
    public boolean isSetUserId() {
27987
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 27988
    }
27989
 
771 rajveer 27990
    public void setUserIdIsSet(boolean value) {
27991
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 27992
    }
27993
 
771 rajveer 27994
    public long getItemId() {
27995
      return this.itemId;
553 chandransh 27996
    }
27997
 
771 rajveer 27998
    public updateMyResearch_args setItemId(long itemId) {
27999
      this.itemId = itemId;
28000
      setItemIdIsSet(true);
553 chandransh 28001
      return this;
28002
    }
28003
 
771 rajveer 28004
    public void unsetItemId() {
28005
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 28006
    }
28007
 
771 rajveer 28008
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
28009
    public boolean isSetItemId() {
28010
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 28011
    }
28012
 
771 rajveer 28013
    public void setItemIdIsSet(boolean value) {
28014
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 28015
    }
28016
 
130 ashish 28017
    public void setFieldValue(_Fields field, Object value) {
28018
      switch (field) {
553 chandransh 28019
      case USER_ID:
130 ashish 28020
        if (value == null) {
771 rajveer 28021
          unsetUserId();
130 ashish 28022
        } else {
771 rajveer 28023
          setUserId((Long)value);
130 ashish 28024
        }
28025
        break;
28026
 
553 chandransh 28027
      case ITEM_ID:
28028
        if (value == null) {
771 rajveer 28029
          unsetItemId();
553 chandransh 28030
        } else {
771 rajveer 28031
          setItemId((Long)value);
553 chandransh 28032
        }
28033
        break;
28034
 
130 ashish 28035
      }
28036
    }
28037
 
28038
    public void setFieldValue(int fieldID, Object value) {
28039
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28040
    }
28041
 
28042
    public Object getFieldValue(_Fields field) {
28043
      switch (field) {
553 chandransh 28044
      case USER_ID:
771 rajveer 28045
        return new Long(getUserId());
130 ashish 28046
 
553 chandransh 28047
      case ITEM_ID:
771 rajveer 28048
        return new Long(getItemId());
553 chandransh 28049
 
130 ashish 28050
      }
28051
      throw new IllegalStateException();
28052
    }
28053
 
28054
    public Object getFieldValue(int fieldId) {
28055
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28056
    }
28057
 
28058
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28059
    public boolean isSet(_Fields field) {
28060
      switch (field) {
553 chandransh 28061
      case USER_ID:
771 rajveer 28062
        return isSetUserId();
553 chandransh 28063
      case ITEM_ID:
771 rajveer 28064
        return isSetItemId();
130 ashish 28065
      }
28066
      throw new IllegalStateException();
28067
    }
28068
 
28069
    public boolean isSet(int fieldID) {
28070
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28071
    }
28072
 
28073
    @Override
28074
    public boolean equals(Object that) {
28075
      if (that == null)
28076
        return false;
553 chandransh 28077
      if (that instanceof updateMyResearch_args)
28078
        return this.equals((updateMyResearch_args)that);
130 ashish 28079
      return false;
28080
    }
28081
 
553 chandransh 28082
    public boolean equals(updateMyResearch_args that) {
130 ashish 28083
      if (that == null)
28084
        return false;
28085
 
771 rajveer 28086
      boolean this_present_userId = true;
28087
      boolean that_present_userId = true;
28088
      if (this_present_userId || that_present_userId) {
28089
        if (!(this_present_userId && that_present_userId))
130 ashish 28090
          return false;
771 rajveer 28091
        if (this.userId != that.userId)
130 ashish 28092
          return false;
28093
      }
28094
 
771 rajveer 28095
      boolean this_present_itemId = true;
28096
      boolean that_present_itemId = true;
28097
      if (this_present_itemId || that_present_itemId) {
28098
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 28099
          return false;
771 rajveer 28100
        if (this.itemId != that.itemId)
553 chandransh 28101
          return false;
28102
      }
28103
 
130 ashish 28104
      return true;
28105
    }
28106
 
28107
    @Override
28108
    public int hashCode() {
28109
      return 0;
28110
    }
28111
 
553 chandransh 28112
    public int compareTo(updateMyResearch_args other) {
130 ashish 28113
      if (!getClass().equals(other.getClass())) {
28114
        return getClass().getName().compareTo(other.getClass().getName());
28115
      }
28116
 
28117
      int lastComparison = 0;
553 chandransh 28118
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 28119
 
771 rajveer 28120
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 28121
      if (lastComparison != 0) {
28122
        return lastComparison;
28123
      }
771 rajveer 28124
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 28125
      if (lastComparison != 0) {
28126
        return lastComparison;
28127
      }
771 rajveer 28128
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 28129
      if (lastComparison != 0) {
28130
        return lastComparison;
28131
      }
771 rajveer 28132
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 28133
      if (lastComparison != 0) {
28134
        return lastComparison;
28135
      }
130 ashish 28136
      return 0;
28137
    }
28138
 
28139
    public void read(TProtocol iprot) throws TException {
28140
      TField field;
28141
      iprot.readStructBegin();
28142
      while (true)
28143
      {
28144
        field = iprot.readFieldBegin();
28145
        if (field.type == TType.STOP) { 
28146
          break;
28147
        }
28148
        _Fields fieldId = _Fields.findByThriftId(field.id);
28149
        if (fieldId == null) {
28150
          TProtocolUtil.skip(iprot, field.type);
28151
        } else {
28152
          switch (fieldId) {
553 chandransh 28153
            case USER_ID:
130 ashish 28154
              if (field.type == TType.I64) {
771 rajveer 28155
                this.userId = iprot.readI64();
28156
                setUserIdIsSet(true);
130 ashish 28157
              } else { 
28158
                TProtocolUtil.skip(iprot, field.type);
28159
              }
28160
              break;
553 chandransh 28161
            case ITEM_ID:
28162
              if (field.type == TType.I64) {
771 rajveer 28163
                this.itemId = iprot.readI64();
28164
                setItemIdIsSet(true);
553 chandransh 28165
              } else { 
28166
                TProtocolUtil.skip(iprot, field.type);
28167
              }
28168
              break;
130 ashish 28169
          }
28170
          iprot.readFieldEnd();
28171
        }
28172
      }
28173
      iprot.readStructEnd();
28174
      validate();
28175
    }
28176
 
28177
    public void write(TProtocol oprot) throws TException {
28178
      validate();
28179
 
28180
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 28181
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 28182
      oprot.writeI64(this.userId);
130 ashish 28183
      oprot.writeFieldEnd();
553 chandransh 28184
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 28185
      oprot.writeI64(this.itemId);
553 chandransh 28186
      oprot.writeFieldEnd();
130 ashish 28187
      oprot.writeFieldStop();
28188
      oprot.writeStructEnd();
28189
    }
28190
 
28191
    @Override
28192
    public String toString() {
553 chandransh 28193
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 28194
      boolean first = true;
28195
 
771 rajveer 28196
      sb.append("userId:");
28197
      sb.append(this.userId);
130 ashish 28198
      first = false;
553 chandransh 28199
      if (!first) sb.append(", ");
771 rajveer 28200
      sb.append("itemId:");
28201
      sb.append(this.itemId);
553 chandransh 28202
      first = false;
130 ashish 28203
      sb.append(")");
28204
      return sb.toString();
28205
    }
28206
 
28207
    public void validate() throws TException {
28208
      // check for required fields
28209
    }
28210
 
28211
  }
28212
 
553 chandransh 28213
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
28214
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 28215
 
28216
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 28217
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 28218
 
28219
    private boolean success;
553 chandransh 28220
    private WidgetException scx;
130 ashish 28221
 
28222
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28223
    public enum _Fields implements TFieldIdEnum {
28224
      SUCCESS((short)0, "success"),
553 chandransh 28225
      SCX((short)1, "scx");
130 ashish 28226
 
28227
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28228
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28229
 
28230
      static {
28231
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28232
          byId.put((int)field._thriftId, field);
28233
          byName.put(field.getFieldName(), field);
28234
        }
28235
      }
28236
 
28237
      /**
28238
       * Find the _Fields constant that matches fieldId, or null if its not found.
28239
       */
28240
      public static _Fields findByThriftId(int fieldId) {
28241
        return byId.get(fieldId);
28242
      }
28243
 
28244
      /**
28245
       * Find the _Fields constant that matches fieldId, throwing an exception
28246
       * if it is not found.
28247
       */
28248
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28249
        _Fields fields = findByThriftId(fieldId);
28250
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28251
        return fields;
28252
      }
28253
 
28254
      /**
28255
       * Find the _Fields constant that matches name, or null if its not found.
28256
       */
28257
      public static _Fields findByName(String name) {
28258
        return byName.get(name);
28259
      }
28260
 
28261
      private final short _thriftId;
28262
      private final String _fieldName;
28263
 
28264
      _Fields(short thriftId, String fieldName) {
28265
        _thriftId = thriftId;
28266
        _fieldName = fieldName;
28267
      }
28268
 
28269
      public short getThriftFieldId() {
28270
        return _thriftId;
28271
      }
28272
 
28273
      public String getFieldName() {
28274
        return _fieldName;
28275
      }
28276
    }
28277
 
28278
    // isset id assignments
28279
    private static final int __SUCCESS_ISSET_ID = 0;
28280
    private BitSet __isset_bit_vector = new BitSet(1);
28281
 
28282
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28283
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28284
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 28285
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 28286
          new FieldValueMetaData(TType.STRUCT)));
28287
    }});
28288
 
28289
    static {
553 chandransh 28290
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 28291
    }
28292
 
553 chandransh 28293
    public updateMyResearch_result() {
130 ashish 28294
    }
28295
 
553 chandransh 28296
    public updateMyResearch_result(
130 ashish 28297
      boolean success,
553 chandransh 28298
      WidgetException scx)
130 ashish 28299
    {
28300
      this();
28301
      this.success = success;
28302
      setSuccessIsSet(true);
553 chandransh 28303
      this.scx = scx;
130 ashish 28304
    }
28305
 
28306
    /**
28307
     * Performs a deep copy on <i>other</i>.
28308
     */
553 chandransh 28309
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 28310
      __isset_bit_vector.clear();
28311
      __isset_bit_vector.or(other.__isset_bit_vector);
28312
      this.success = other.success;
553 chandransh 28313
      if (other.isSetScx()) {
28314
        this.scx = new WidgetException(other.scx);
130 ashish 28315
      }
28316
    }
28317
 
553 chandransh 28318
    public updateMyResearch_result deepCopy() {
28319
      return new updateMyResearch_result(this);
130 ashish 28320
    }
28321
 
28322
    @Deprecated
553 chandransh 28323
    public updateMyResearch_result clone() {
28324
      return new updateMyResearch_result(this);
130 ashish 28325
    }
28326
 
28327
    public boolean isSuccess() {
28328
      return this.success;
28329
    }
28330
 
553 chandransh 28331
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 28332
      this.success = success;
28333
      setSuccessIsSet(true);
28334
      return this;
28335
    }
28336
 
28337
    public void unsetSuccess() {
28338
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
28339
    }
28340
 
28341
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28342
    public boolean isSetSuccess() {
28343
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
28344
    }
28345
 
28346
    public void setSuccessIsSet(boolean value) {
28347
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
28348
    }
28349
 
553 chandransh 28350
    public WidgetException getScx() {
28351
      return this.scx;
130 ashish 28352
    }
28353
 
553 chandransh 28354
    public updateMyResearch_result setScx(WidgetException scx) {
28355
      this.scx = scx;
130 ashish 28356
      return this;
28357
    }
28358
 
553 chandransh 28359
    public void unsetScx() {
28360
      this.scx = null;
130 ashish 28361
    }
28362
 
553 chandransh 28363
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28364
    public boolean isSetScx() {
28365
      return this.scx != null;
130 ashish 28366
    }
28367
 
553 chandransh 28368
    public void setScxIsSet(boolean value) {
130 ashish 28369
      if (!value) {
553 chandransh 28370
        this.scx = null;
130 ashish 28371
      }
28372
    }
28373
 
28374
    public void setFieldValue(_Fields field, Object value) {
28375
      switch (field) {
28376
      case SUCCESS:
28377
        if (value == null) {
28378
          unsetSuccess();
28379
        } else {
28380
          setSuccess((Boolean)value);
28381
        }
28382
        break;
28383
 
553 chandransh 28384
      case SCX:
130 ashish 28385
        if (value == null) {
553 chandransh 28386
          unsetScx();
130 ashish 28387
        } else {
553 chandransh 28388
          setScx((WidgetException)value);
130 ashish 28389
        }
28390
        break;
28391
 
28392
      }
28393
    }
28394
 
28395
    public void setFieldValue(int fieldID, Object value) {
28396
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28397
    }
28398
 
28399
    public Object getFieldValue(_Fields field) {
28400
      switch (field) {
28401
      case SUCCESS:
28402
        return new Boolean(isSuccess());
28403
 
553 chandransh 28404
      case SCX:
28405
        return getScx();
130 ashish 28406
 
28407
      }
28408
      throw new IllegalStateException();
28409
    }
28410
 
28411
    public Object getFieldValue(int fieldId) {
28412
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28413
    }
28414
 
28415
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28416
    public boolean isSet(_Fields field) {
28417
      switch (field) {
28418
      case SUCCESS:
28419
        return isSetSuccess();
553 chandransh 28420
      case SCX:
28421
        return isSetScx();
130 ashish 28422
      }
28423
      throw new IllegalStateException();
28424
    }
28425
 
28426
    public boolean isSet(int fieldID) {
28427
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28428
    }
28429
 
28430
    @Override
28431
    public boolean equals(Object that) {
28432
      if (that == null)
28433
        return false;
553 chandransh 28434
      if (that instanceof updateMyResearch_result)
28435
        return this.equals((updateMyResearch_result)that);
130 ashish 28436
      return false;
28437
    }
28438
 
553 chandransh 28439
    public boolean equals(updateMyResearch_result that) {
130 ashish 28440
      if (that == null)
28441
        return false;
28442
 
28443
      boolean this_present_success = true;
28444
      boolean that_present_success = true;
28445
      if (this_present_success || that_present_success) {
28446
        if (!(this_present_success && that_present_success))
28447
          return false;
28448
        if (this.success != that.success)
28449
          return false;
28450
      }
28451
 
553 chandransh 28452
      boolean this_present_scx = true && this.isSetScx();
28453
      boolean that_present_scx = true && that.isSetScx();
28454
      if (this_present_scx || that_present_scx) {
28455
        if (!(this_present_scx && that_present_scx))
130 ashish 28456
          return false;
553 chandransh 28457
        if (!this.scx.equals(that.scx))
130 ashish 28458
          return false;
28459
      }
28460
 
28461
      return true;
28462
    }
28463
 
28464
    @Override
28465
    public int hashCode() {
28466
      return 0;
28467
    }
28468
 
553 chandransh 28469
    public int compareTo(updateMyResearch_result other) {
130 ashish 28470
      if (!getClass().equals(other.getClass())) {
28471
        return getClass().getName().compareTo(other.getClass().getName());
28472
      }
28473
 
28474
      int lastComparison = 0;
553 chandransh 28475
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 28476
 
28477
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28478
      if (lastComparison != 0) {
28479
        return lastComparison;
28480
      }
28481
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28482
      if (lastComparison != 0) {
28483
        return lastComparison;
28484
      }
553 chandransh 28485
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 28486
      if (lastComparison != 0) {
28487
        return lastComparison;
28488
      }
553 chandransh 28489
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 28490
      if (lastComparison != 0) {
28491
        return lastComparison;
28492
      }
28493
      return 0;
28494
    }
28495
 
28496
    public void read(TProtocol iprot) throws TException {
28497
      TField field;
28498
      iprot.readStructBegin();
28499
      while (true)
28500
      {
28501
        field = iprot.readFieldBegin();
28502
        if (field.type == TType.STOP) { 
28503
          break;
28504
        }
28505
        _Fields fieldId = _Fields.findByThriftId(field.id);
28506
        if (fieldId == null) {
28507
          TProtocolUtil.skip(iprot, field.type);
28508
        } else {
28509
          switch (fieldId) {
28510
            case SUCCESS:
28511
              if (field.type == TType.BOOL) {
28512
                this.success = iprot.readBool();
28513
                setSuccessIsSet(true);
28514
              } else { 
28515
                TProtocolUtil.skip(iprot, field.type);
28516
              }
28517
              break;
553 chandransh 28518
            case SCX:
130 ashish 28519
              if (field.type == TType.STRUCT) {
553 chandransh 28520
                this.scx = new WidgetException();
28521
                this.scx.read(iprot);
130 ashish 28522
              } else { 
28523
                TProtocolUtil.skip(iprot, field.type);
28524
              }
28525
              break;
28526
          }
28527
          iprot.readFieldEnd();
28528
        }
28529
      }
28530
      iprot.readStructEnd();
28531
      validate();
28532
    }
28533
 
28534
    public void write(TProtocol oprot) throws TException {
28535
      oprot.writeStructBegin(STRUCT_DESC);
28536
 
28537
      if (this.isSetSuccess()) {
28538
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28539
        oprot.writeBool(this.success);
28540
        oprot.writeFieldEnd();
553 chandransh 28541
      } else if (this.isSetScx()) {
28542
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28543
        this.scx.write(oprot);
130 ashish 28544
        oprot.writeFieldEnd();
28545
      }
28546
      oprot.writeFieldStop();
28547
      oprot.writeStructEnd();
28548
    }
28549
 
28550
    @Override
28551
    public String toString() {
553 chandransh 28552
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 28553
      boolean first = true;
28554
 
28555
      sb.append("success:");
28556
      sb.append(this.success);
28557
      first = false;
28558
      if (!first) sb.append(", ");
553 chandransh 28559
      sb.append("scx:");
28560
      if (this.scx == null) {
130 ashish 28561
        sb.append("null");
28562
      } else {
553 chandransh 28563
        sb.append(this.scx);
130 ashish 28564
      }
28565
      first = false;
28566
      sb.append(")");
28567
      return sb.toString();
28568
    }
28569
 
28570
    public void validate() throws TException {
28571
      // check for required fields
28572
    }
28573
 
28574
  }
28575
 
553 chandransh 28576
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
28577
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 28578
 
771 rajveer 28579
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
28580
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 28581
 
771 rajveer 28582
    private long userId;
28583
    private long itemId;
130 ashish 28584
 
28585
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28586
    public enum _Fields implements TFieldIdEnum {
771 rajveer 28587
      USER_ID((short)1, "userId"),
28588
      ITEM_ID((short)2, "itemId");
130 ashish 28589
 
28590
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28591
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28592
 
28593
      static {
28594
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28595
          byId.put((int)field._thriftId, field);
28596
          byName.put(field.getFieldName(), field);
28597
        }
28598
      }
28599
 
28600
      /**
28601
       * Find the _Fields constant that matches fieldId, or null if its not found.
28602
       */
28603
      public static _Fields findByThriftId(int fieldId) {
28604
        return byId.get(fieldId);
28605
      }
28606
 
28607
      /**
28608
       * Find the _Fields constant that matches fieldId, throwing an exception
28609
       * if it is not found.
28610
       */
28611
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28612
        _Fields fields = findByThriftId(fieldId);
28613
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28614
        return fields;
28615
      }
28616
 
28617
      /**
28618
       * Find the _Fields constant that matches name, or null if its not found.
28619
       */
28620
      public static _Fields findByName(String name) {
28621
        return byName.get(name);
28622
      }
28623
 
28624
      private final short _thriftId;
28625
      private final String _fieldName;
28626
 
28627
      _Fields(short thriftId, String fieldName) {
28628
        _thriftId = thriftId;
28629
        _fieldName = fieldName;
28630
      }
28631
 
28632
      public short getThriftFieldId() {
28633
        return _thriftId;
28634
      }
28635
 
28636
      public String getFieldName() {
28637
        return _fieldName;
28638
      }
28639
    }
28640
 
28641
    // isset id assignments
771 rajveer 28642
    private static final int __USERID_ISSET_ID = 0;
28643
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 28644
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 28645
 
28646
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 28647
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 28648
          new FieldValueMetaData(TType.I64)));
771 rajveer 28649
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 28650
          new FieldValueMetaData(TType.I64)));
130 ashish 28651
    }});
28652
 
28653
    static {
553 chandransh 28654
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 28655
    }
28656
 
553 chandransh 28657
    public deleteItemFromMyResearch_args() {
130 ashish 28658
    }
28659
 
553 chandransh 28660
    public deleteItemFromMyResearch_args(
771 rajveer 28661
      long userId,
28662
      long itemId)
130 ashish 28663
    {
28664
      this();
771 rajveer 28665
      this.userId = userId;
28666
      setUserIdIsSet(true);
28667
      this.itemId = itemId;
28668
      setItemIdIsSet(true);
130 ashish 28669
    }
28670
 
28671
    /**
28672
     * Performs a deep copy on <i>other</i>.
28673
     */
553 chandransh 28674
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 28675
      __isset_bit_vector.clear();
28676
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 28677
      this.userId = other.userId;
28678
      this.itemId = other.itemId;
553 chandransh 28679
    }
28680
 
28681
    public deleteItemFromMyResearch_args deepCopy() {
28682
      return new deleteItemFromMyResearch_args(this);
28683
    }
28684
 
28685
    @Deprecated
28686
    public deleteItemFromMyResearch_args clone() {
28687
      return new deleteItemFromMyResearch_args(this);
28688
    }
28689
 
771 rajveer 28690
    public long getUserId() {
28691
      return this.userId;
553 chandransh 28692
    }
28693
 
771 rajveer 28694
    public deleteItemFromMyResearch_args setUserId(long userId) {
28695
      this.userId = userId;
28696
      setUserIdIsSet(true);
553 chandransh 28697
      return this;
28698
    }
28699
 
771 rajveer 28700
    public void unsetUserId() {
28701
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 28702
    }
28703
 
771 rajveer 28704
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
28705
    public boolean isSetUserId() {
28706
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 28707
    }
28708
 
771 rajveer 28709
    public void setUserIdIsSet(boolean value) {
28710
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 28711
    }
28712
 
771 rajveer 28713
    public long getItemId() {
28714
      return this.itemId;
553 chandransh 28715
    }
28716
 
771 rajveer 28717
    public deleteItemFromMyResearch_args setItemId(long itemId) {
28718
      this.itemId = itemId;
28719
      setItemIdIsSet(true);
553 chandransh 28720
      return this;
28721
    }
28722
 
771 rajveer 28723
    public void unsetItemId() {
28724
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 28725
    }
28726
 
771 rajveer 28727
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
28728
    public boolean isSetItemId() {
28729
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 28730
    }
28731
 
771 rajveer 28732
    public void setItemIdIsSet(boolean value) {
28733
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 28734
    }
28735
 
28736
    public void setFieldValue(_Fields field, Object value) {
28737
      switch (field) {
28738
      case USER_ID:
28739
        if (value == null) {
771 rajveer 28740
          unsetUserId();
553 chandransh 28741
        } else {
771 rajveer 28742
          setUserId((Long)value);
553 chandransh 28743
        }
28744
        break;
28745
 
28746
      case ITEM_ID:
28747
        if (value == null) {
771 rajveer 28748
          unsetItemId();
553 chandransh 28749
        } else {
771 rajveer 28750
          setItemId((Long)value);
553 chandransh 28751
        }
28752
        break;
28753
 
130 ashish 28754
      }
28755
    }
28756
 
553 chandransh 28757
    public void setFieldValue(int fieldID, Object value) {
28758
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 28759
    }
28760
 
553 chandransh 28761
    public Object getFieldValue(_Fields field) {
28762
      switch (field) {
28763
      case USER_ID:
771 rajveer 28764
        return new Long(getUserId());
553 chandransh 28765
 
28766
      case ITEM_ID:
771 rajveer 28767
        return new Long(getItemId());
553 chandransh 28768
 
28769
      }
28770
      throw new IllegalStateException();
28771
    }
28772
 
28773
    public Object getFieldValue(int fieldId) {
28774
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28775
    }
28776
 
28777
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28778
    public boolean isSet(_Fields field) {
28779
      switch (field) {
28780
      case USER_ID:
771 rajveer 28781
        return isSetUserId();
553 chandransh 28782
      case ITEM_ID:
771 rajveer 28783
        return isSetItemId();
553 chandransh 28784
      }
28785
      throw new IllegalStateException();
28786
    }
28787
 
28788
    public boolean isSet(int fieldID) {
28789
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28790
    }
28791
 
28792
    @Override
28793
    public boolean equals(Object that) {
28794
      if (that == null)
28795
        return false;
28796
      if (that instanceof deleteItemFromMyResearch_args)
28797
        return this.equals((deleteItemFromMyResearch_args)that);
28798
      return false;
28799
    }
28800
 
28801
    public boolean equals(deleteItemFromMyResearch_args that) {
28802
      if (that == null)
28803
        return false;
28804
 
771 rajveer 28805
      boolean this_present_userId = true;
28806
      boolean that_present_userId = true;
28807
      if (this_present_userId || that_present_userId) {
28808
        if (!(this_present_userId && that_present_userId))
553 chandransh 28809
          return false;
771 rajveer 28810
        if (this.userId != that.userId)
553 chandransh 28811
          return false;
28812
      }
28813
 
771 rajveer 28814
      boolean this_present_itemId = true;
28815
      boolean that_present_itemId = true;
28816
      if (this_present_itemId || that_present_itemId) {
28817
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 28818
          return false;
771 rajveer 28819
        if (this.itemId != that.itemId)
553 chandransh 28820
          return false;
28821
      }
28822
 
28823
      return true;
28824
    }
28825
 
28826
    @Override
28827
    public int hashCode() {
28828
      return 0;
28829
    }
28830
 
28831
    public int compareTo(deleteItemFromMyResearch_args other) {
28832
      if (!getClass().equals(other.getClass())) {
28833
        return getClass().getName().compareTo(other.getClass().getName());
28834
      }
28835
 
28836
      int lastComparison = 0;
28837
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
28838
 
771 rajveer 28839
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 28840
      if (lastComparison != 0) {
28841
        return lastComparison;
28842
      }
771 rajveer 28843
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 28844
      if (lastComparison != 0) {
28845
        return lastComparison;
28846
      }
771 rajveer 28847
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 28848
      if (lastComparison != 0) {
28849
        return lastComparison;
28850
      }
771 rajveer 28851
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 28852
      if (lastComparison != 0) {
28853
        return lastComparison;
28854
      }
28855
      return 0;
28856
    }
28857
 
28858
    public void read(TProtocol iprot) throws TException {
28859
      TField field;
28860
      iprot.readStructBegin();
28861
      while (true)
28862
      {
28863
        field = iprot.readFieldBegin();
28864
        if (field.type == TType.STOP) { 
28865
          break;
28866
        }
28867
        _Fields fieldId = _Fields.findByThriftId(field.id);
28868
        if (fieldId == null) {
28869
          TProtocolUtil.skip(iprot, field.type);
28870
        } else {
28871
          switch (fieldId) {
28872
            case USER_ID:
28873
              if (field.type == TType.I64) {
771 rajveer 28874
                this.userId = iprot.readI64();
28875
                setUserIdIsSet(true);
553 chandransh 28876
              } else { 
28877
                TProtocolUtil.skip(iprot, field.type);
28878
              }
28879
              break;
28880
            case ITEM_ID:
28881
              if (field.type == TType.I64) {
771 rajveer 28882
                this.itemId = iprot.readI64();
28883
                setItemIdIsSet(true);
553 chandransh 28884
              } else { 
28885
                TProtocolUtil.skip(iprot, field.type);
28886
              }
28887
              break;
28888
          }
28889
          iprot.readFieldEnd();
28890
        }
28891
      }
28892
      iprot.readStructEnd();
28893
      validate();
28894
    }
28895
 
28896
    public void write(TProtocol oprot) throws TException {
28897
      validate();
28898
 
28899
      oprot.writeStructBegin(STRUCT_DESC);
28900
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 28901
      oprot.writeI64(this.userId);
553 chandransh 28902
      oprot.writeFieldEnd();
28903
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 28904
      oprot.writeI64(this.itemId);
553 chandransh 28905
      oprot.writeFieldEnd();
28906
      oprot.writeFieldStop();
28907
      oprot.writeStructEnd();
28908
    }
28909
 
28910
    @Override
28911
    public String toString() {
28912
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
28913
      boolean first = true;
28914
 
771 rajveer 28915
      sb.append("userId:");
28916
      sb.append(this.userId);
553 chandransh 28917
      first = false;
28918
      if (!first) sb.append(", ");
771 rajveer 28919
      sb.append("itemId:");
28920
      sb.append(this.itemId);
553 chandransh 28921
      first = false;
28922
      sb.append(")");
28923
      return sb.toString();
28924
    }
28925
 
28926
    public void validate() throws TException {
28927
      // check for required fields
28928
    }
28929
 
28930
  }
28931
 
28932
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
28933
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
28934
 
28935
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28936
 
28937
    private WidgetException scx;
28938
 
28939
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28940
    public enum _Fields implements TFieldIdEnum {
28941
      SCX((short)1, "scx");
28942
 
28943
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28944
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28945
 
28946
      static {
28947
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28948
          byId.put((int)field._thriftId, field);
28949
          byName.put(field.getFieldName(), field);
28950
        }
28951
      }
28952
 
28953
      /**
28954
       * Find the _Fields constant that matches fieldId, or null if its not found.
28955
       */
28956
      public static _Fields findByThriftId(int fieldId) {
28957
        return byId.get(fieldId);
28958
      }
28959
 
28960
      /**
28961
       * Find the _Fields constant that matches fieldId, throwing an exception
28962
       * if it is not found.
28963
       */
28964
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28965
        _Fields fields = findByThriftId(fieldId);
28966
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28967
        return fields;
28968
      }
28969
 
28970
      /**
28971
       * Find the _Fields constant that matches name, or null if its not found.
28972
       */
28973
      public static _Fields findByName(String name) {
28974
        return byName.get(name);
28975
      }
28976
 
28977
      private final short _thriftId;
28978
      private final String _fieldName;
28979
 
28980
      _Fields(short thriftId, String fieldName) {
28981
        _thriftId = thriftId;
28982
        _fieldName = fieldName;
28983
      }
28984
 
28985
      public short getThriftFieldId() {
28986
        return _thriftId;
28987
      }
28988
 
28989
      public String getFieldName() {
28990
        return _fieldName;
28991
      }
28992
    }
28993
 
28994
    // isset id assignments
28995
 
28996
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28997
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
28998
          new FieldValueMetaData(TType.STRUCT)));
28999
    }});
29000
 
29001
    static {
29002
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
29003
    }
29004
 
29005
    public deleteItemFromMyResearch_result() {
29006
    }
29007
 
29008
    public deleteItemFromMyResearch_result(
29009
      WidgetException scx)
29010
    {
29011
      this();
29012
      this.scx = scx;
29013
    }
29014
 
29015
    /**
29016
     * Performs a deep copy on <i>other</i>.
29017
     */
29018
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
29019
      if (other.isSetScx()) {
29020
        this.scx = new WidgetException(other.scx);
29021
      }
29022
    }
29023
 
29024
    public deleteItemFromMyResearch_result deepCopy() {
29025
      return new deleteItemFromMyResearch_result(this);
29026
    }
29027
 
130 ashish 29028
    @Deprecated
553 chandransh 29029
    public deleteItemFromMyResearch_result clone() {
29030
      return new deleteItemFromMyResearch_result(this);
130 ashish 29031
    }
29032
 
553 chandransh 29033
    public WidgetException getScx() {
29034
      return this.scx;
130 ashish 29035
    }
29036
 
553 chandransh 29037
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
29038
      this.scx = scx;
130 ashish 29039
      return this;
29040
    }
29041
 
553 chandransh 29042
    public void unsetScx() {
29043
      this.scx = null;
130 ashish 29044
    }
29045
 
553 chandransh 29046
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29047
    public boolean isSetScx() {
29048
      return this.scx != null;
130 ashish 29049
    }
29050
 
553 chandransh 29051
    public void setScxIsSet(boolean value) {
130 ashish 29052
      if (!value) {
553 chandransh 29053
        this.scx = null;
130 ashish 29054
      }
29055
    }
29056
 
553 chandransh 29057
    public void setFieldValue(_Fields field, Object value) {
29058
      switch (field) {
29059
      case SCX:
29060
        if (value == null) {
29061
          unsetScx();
29062
        } else {
29063
          setScx((WidgetException)value);
29064
        }
29065
        break;
29066
 
29067
      }
130 ashish 29068
    }
29069
 
553 chandransh 29070
    public void setFieldValue(int fieldID, Object value) {
29071
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29072
    }
29073
 
29074
    public Object getFieldValue(_Fields field) {
29075
      switch (field) {
29076
      case SCX:
29077
        return getScx();
29078
 
29079
      }
29080
      throw new IllegalStateException();
29081
    }
29082
 
29083
    public Object getFieldValue(int fieldId) {
29084
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29085
    }
29086
 
29087
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29088
    public boolean isSet(_Fields field) {
29089
      switch (field) {
29090
      case SCX:
29091
        return isSetScx();
29092
      }
29093
      throw new IllegalStateException();
29094
    }
29095
 
29096
    public boolean isSet(int fieldID) {
29097
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29098
    }
29099
 
29100
    @Override
29101
    public boolean equals(Object that) {
29102
      if (that == null)
29103
        return false;
29104
      if (that instanceof deleteItemFromMyResearch_result)
29105
        return this.equals((deleteItemFromMyResearch_result)that);
29106
      return false;
29107
    }
29108
 
29109
    public boolean equals(deleteItemFromMyResearch_result that) {
29110
      if (that == null)
29111
        return false;
29112
 
29113
      boolean this_present_scx = true && this.isSetScx();
29114
      boolean that_present_scx = true && that.isSetScx();
29115
      if (this_present_scx || that_present_scx) {
29116
        if (!(this_present_scx && that_present_scx))
29117
          return false;
29118
        if (!this.scx.equals(that.scx))
29119
          return false;
29120
      }
29121
 
29122
      return true;
29123
    }
29124
 
29125
    @Override
29126
    public int hashCode() {
29127
      return 0;
29128
    }
29129
 
29130
    public int compareTo(deleteItemFromMyResearch_result other) {
29131
      if (!getClass().equals(other.getClass())) {
29132
        return getClass().getName().compareTo(other.getClass().getName());
29133
      }
29134
 
29135
      int lastComparison = 0;
29136
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
29137
 
29138
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
29139
      if (lastComparison != 0) {
29140
        return lastComparison;
29141
      }
29142
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
29143
      if (lastComparison != 0) {
29144
        return lastComparison;
29145
      }
29146
      return 0;
29147
    }
29148
 
29149
    public void read(TProtocol iprot) throws TException {
29150
      TField field;
29151
      iprot.readStructBegin();
29152
      while (true)
29153
      {
29154
        field = iprot.readFieldBegin();
29155
        if (field.type == TType.STOP) { 
29156
          break;
29157
        }
29158
        _Fields fieldId = _Fields.findByThriftId(field.id);
29159
        if (fieldId == null) {
29160
          TProtocolUtil.skip(iprot, field.type);
29161
        } else {
29162
          switch (fieldId) {
29163
            case SCX:
29164
              if (field.type == TType.STRUCT) {
29165
                this.scx = new WidgetException();
29166
                this.scx.read(iprot);
29167
              } else { 
29168
                TProtocolUtil.skip(iprot, field.type);
29169
              }
29170
              break;
29171
          }
29172
          iprot.readFieldEnd();
29173
        }
29174
      }
29175
      iprot.readStructEnd();
29176
      validate();
29177
    }
29178
 
29179
    public void write(TProtocol oprot) throws TException {
29180
      oprot.writeStructBegin(STRUCT_DESC);
29181
 
29182
      if (this.isSetScx()) {
29183
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29184
        this.scx.write(oprot);
29185
        oprot.writeFieldEnd();
29186
      }
29187
      oprot.writeFieldStop();
29188
      oprot.writeStructEnd();
29189
    }
29190
 
29191
    @Override
29192
    public String toString() {
29193
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
29194
      boolean first = true;
29195
 
29196
      sb.append("scx:");
29197
      if (this.scx == null) {
29198
        sb.append("null");
29199
      } else {
29200
        sb.append(this.scx);
29201
      }
29202
      first = false;
29203
      sb.append(")");
29204
      return sb.toString();
29205
    }
29206
 
29207
    public void validate() throws TException {
29208
      // check for required fields
29209
    }
29210
 
29211
  }
29212
 
771 rajveer 29213
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
29214
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
553 chandransh 29215
 
771 rajveer 29216
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
29217
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
553 chandransh 29218
 
771 rajveer 29219
    private long userId;
29220
    private long itemId;
553 chandransh 29221
 
29222
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29223
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29224
      USER_ID((short)1, "userId"),
29225
      ITEM_ID((short)2, "itemId");
553 chandransh 29226
 
29227
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29228
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29229
 
29230
      static {
29231
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29232
          byId.put((int)field._thriftId, field);
29233
          byName.put(field.getFieldName(), field);
29234
        }
29235
      }
29236
 
29237
      /**
29238
       * Find the _Fields constant that matches fieldId, or null if its not found.
29239
       */
29240
      public static _Fields findByThriftId(int fieldId) {
29241
        return byId.get(fieldId);
29242
      }
29243
 
29244
      /**
29245
       * Find the _Fields constant that matches fieldId, throwing an exception
29246
       * if it is not found.
29247
       */
29248
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29249
        _Fields fields = findByThriftId(fieldId);
29250
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29251
        return fields;
29252
      }
29253
 
29254
      /**
29255
       * Find the _Fields constant that matches name, or null if its not found.
29256
       */
29257
      public static _Fields findByName(String name) {
29258
        return byName.get(name);
29259
      }
29260
 
29261
      private final short _thriftId;
29262
      private final String _fieldName;
29263
 
29264
      _Fields(short thriftId, String fieldName) {
29265
        _thriftId = thriftId;
29266
        _fieldName = fieldName;
29267
      }
29268
 
29269
      public short getThriftFieldId() {
29270
        return _thriftId;
29271
      }
29272
 
29273
      public String getFieldName() {
29274
        return _fieldName;
29275
      }
29276
    }
29277
 
29278
    // isset id assignments
771 rajveer 29279
    private static final int __USERID_ISSET_ID = 0;
29280
    private static final int __ITEMID_ISSET_ID = 1;
29281
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 29282
 
29283
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 29284
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 29285
          new FieldValueMetaData(TType.I64)));
771 rajveer 29286
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 29287
          new FieldValueMetaData(TType.I64)));
29288
    }});
29289
 
29290
    static {
771 rajveer 29291
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
553 chandransh 29292
    }
29293
 
771 rajveer 29294
    public updateBrowseHistory_args() {
553 chandransh 29295
    }
29296
 
771 rajveer 29297
    public updateBrowseHistory_args(
29298
      long userId,
29299
      long itemId)
553 chandransh 29300
    {
29301
      this();
771 rajveer 29302
      this.userId = userId;
29303
      setUserIdIsSet(true);
29304
      this.itemId = itemId;
29305
      setItemIdIsSet(true);
553 chandransh 29306
    }
29307
 
29308
    /**
29309
     * Performs a deep copy on <i>other</i>.
29310
     */
771 rajveer 29311
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
553 chandransh 29312
      __isset_bit_vector.clear();
29313
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 29314
      this.userId = other.userId;
29315
      this.itemId = other.itemId;
553 chandransh 29316
    }
29317
 
771 rajveer 29318
    public updateBrowseHistory_args deepCopy() {
29319
      return new updateBrowseHistory_args(this);
553 chandransh 29320
    }
29321
 
29322
    @Deprecated
771 rajveer 29323
    public updateBrowseHistory_args clone() {
29324
      return new updateBrowseHistory_args(this);
553 chandransh 29325
    }
29326
 
771 rajveer 29327
    public long getUserId() {
29328
      return this.userId;
553 chandransh 29329
    }
29330
 
771 rajveer 29331
    public updateBrowseHistory_args setUserId(long userId) {
29332
      this.userId = userId;
29333
      setUserIdIsSet(true);
130 ashish 29334
      return this;
29335
    }
29336
 
771 rajveer 29337
    public void unsetUserId() {
29338
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 29339
    }
29340
 
771 rajveer 29341
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
29342
    public boolean isSetUserId() {
29343
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 29344
    }
29345
 
771 rajveer 29346
    public void setUserIdIsSet(boolean value) {
29347
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 29348
    }
29349
 
771 rajveer 29350
    public long getItemId() {
29351
      return this.itemId;
553 chandransh 29352
    }
29353
 
771 rajveer 29354
    public updateBrowseHistory_args setItemId(long itemId) {
29355
      this.itemId = itemId;
29356
      setItemIdIsSet(true);
553 chandransh 29357
      return this;
29358
    }
29359
 
771 rajveer 29360
    public void unsetItemId() {
29361
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 29362
    }
29363
 
771 rajveer 29364
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
29365
    public boolean isSetItemId() {
29366
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 29367
    }
29368
 
771 rajveer 29369
    public void setItemIdIsSet(boolean value) {
29370
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 29371
    }
29372
 
130 ashish 29373
    public void setFieldValue(_Fields field, Object value) {
29374
      switch (field) {
771 rajveer 29375
      case USER_ID:
130 ashish 29376
        if (value == null) {
771 rajveer 29377
          unsetUserId();
130 ashish 29378
        } else {
771 rajveer 29379
          setUserId((Long)value);
130 ashish 29380
        }
29381
        break;
29382
 
771 rajveer 29383
      case ITEM_ID:
130 ashish 29384
        if (value == null) {
771 rajveer 29385
          unsetItemId();
130 ashish 29386
        } else {
771 rajveer 29387
          setItemId((Long)value);
130 ashish 29388
        }
29389
        break;
29390
 
29391
      }
29392
    }
29393
 
29394
    public void setFieldValue(int fieldID, Object value) {
29395
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29396
    }
29397
 
29398
    public Object getFieldValue(_Fields field) {
29399
      switch (field) {
771 rajveer 29400
      case USER_ID:
29401
        return new Long(getUserId());
29402
 
553 chandransh 29403
      case ITEM_ID:
771 rajveer 29404
        return new Long(getItemId());
130 ashish 29405
 
29406
      }
29407
      throw new IllegalStateException();
29408
    }
29409
 
29410
    public Object getFieldValue(int fieldId) {
29411
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29412
    }
29413
 
29414
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29415
    public boolean isSet(_Fields field) {
29416
      switch (field) {
771 rajveer 29417
      case USER_ID:
29418
        return isSetUserId();
553 chandransh 29419
      case ITEM_ID:
771 rajveer 29420
        return isSetItemId();
130 ashish 29421
      }
29422
      throw new IllegalStateException();
29423
    }
29424
 
29425
    public boolean isSet(int fieldID) {
29426
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29427
    }
29428
 
29429
    @Override
29430
    public boolean equals(Object that) {
29431
      if (that == null)
29432
        return false;
771 rajveer 29433
      if (that instanceof updateBrowseHistory_args)
29434
        return this.equals((updateBrowseHistory_args)that);
130 ashish 29435
      return false;
29436
    }
29437
 
771 rajveer 29438
    public boolean equals(updateBrowseHistory_args that) {
130 ashish 29439
      if (that == null)
29440
        return false;
29441
 
771 rajveer 29442
      boolean this_present_userId = true;
29443
      boolean that_present_userId = true;
29444
      if (this_present_userId || that_present_userId) {
29445
        if (!(this_present_userId && that_present_userId))
130 ashish 29446
          return false;
771 rajveer 29447
        if (this.userId != that.userId)
130 ashish 29448
          return false;
29449
      }
29450
 
771 rajveer 29451
      boolean this_present_itemId = true;
29452
      boolean that_present_itemId = true;
29453
      if (this_present_itemId || that_present_itemId) {
29454
        if (!(this_present_itemId && that_present_itemId))
130 ashish 29455
          return false;
771 rajveer 29456
        if (this.itemId != that.itemId)
130 ashish 29457
          return false;
29458
      }
29459
 
29460
      return true;
29461
    }
29462
 
29463
    @Override
29464
    public int hashCode() {
29465
      return 0;
29466
    }
29467
 
771 rajveer 29468
    public int compareTo(updateBrowseHistory_args other) {
130 ashish 29469
      if (!getClass().equals(other.getClass())) {
29470
        return getClass().getName().compareTo(other.getClass().getName());
29471
      }
29472
 
29473
      int lastComparison = 0;
771 rajveer 29474
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
130 ashish 29475
 
771 rajveer 29476
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 29477
      if (lastComparison != 0) {
29478
        return lastComparison;
29479
      }
771 rajveer 29480
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 29481
      if (lastComparison != 0) {
29482
        return lastComparison;
29483
      }
771 rajveer 29484
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
130 ashish 29485
      if (lastComparison != 0) {
29486
        return lastComparison;
29487
      }
771 rajveer 29488
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
130 ashish 29489
      if (lastComparison != 0) {
29490
        return lastComparison;
29491
      }
29492
      return 0;
29493
    }
29494
 
29495
    public void read(TProtocol iprot) throws TException {
29496
      TField field;
29497
      iprot.readStructBegin();
29498
      while (true)
29499
      {
29500
        field = iprot.readFieldBegin();
29501
        if (field.type == TType.STOP) { 
29502
          break;
29503
        }
29504
        _Fields fieldId = _Fields.findByThriftId(field.id);
29505
        if (fieldId == null) {
29506
          TProtocolUtil.skip(iprot, field.type);
29507
        } else {
29508
          switch (fieldId) {
771 rajveer 29509
            case USER_ID:
553 chandransh 29510
              if (field.type == TType.I64) {
771 rajveer 29511
                this.userId = iprot.readI64();
29512
                setUserIdIsSet(true);
130 ashish 29513
              } else { 
29514
                TProtocolUtil.skip(iprot, field.type);
29515
              }
29516
              break;
771 rajveer 29517
            case ITEM_ID:
553 chandransh 29518
              if (field.type == TType.I64) {
771 rajveer 29519
                this.itemId = iprot.readI64();
29520
                setItemIdIsSet(true);
553 chandransh 29521
              } else { 
29522
                TProtocolUtil.skip(iprot, field.type);
29523
              }
29524
              break;
130 ashish 29525
          }
29526
          iprot.readFieldEnd();
29527
        }
29528
      }
29529
      iprot.readStructEnd();
29530
      validate();
29531
    }
29532
 
29533
    public void write(TProtocol oprot) throws TException {
29534
      validate();
29535
 
29536
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 29537
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
29538
      oprot.writeI64(this.userId);
29539
      oprot.writeFieldEnd();
553 chandransh 29540
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 29541
      oprot.writeI64(this.itemId);
553 chandransh 29542
      oprot.writeFieldEnd();
130 ashish 29543
      oprot.writeFieldStop();
29544
      oprot.writeStructEnd();
29545
    }
29546
 
29547
    @Override
29548
    public String toString() {
771 rajveer 29549
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
130 ashish 29550
      boolean first = true;
29551
 
771 rajveer 29552
      sb.append("userId:");
29553
      sb.append(this.userId);
553 chandransh 29554
      first = false;
29555
      if (!first) sb.append(", ");
771 rajveer 29556
      sb.append("itemId:");
29557
      sb.append(this.itemId);
130 ashish 29558
      first = false;
29559
      sb.append(")");
29560
      return sb.toString();
29561
    }
29562
 
29563
    public void validate() throws TException {
29564
      // check for required fields
29565
    }
29566
 
29567
  }
29568
 
771 rajveer 29569
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
29570
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
130 ashish 29571
 
29572
 
29573
 
29574
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29575
    public enum _Fields implements TFieldIdEnum {
553 chandransh 29576
;
29577
 
29578
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29579
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29580
 
29581
      static {
29582
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29583
          byId.put((int)field._thriftId, field);
29584
          byName.put(field.getFieldName(), field);
29585
        }
29586
      }
29587
 
29588
      /**
29589
       * Find the _Fields constant that matches fieldId, or null if its not found.
29590
       */
29591
      public static _Fields findByThriftId(int fieldId) {
29592
        return byId.get(fieldId);
29593
      }
29594
 
29595
      /**
29596
       * Find the _Fields constant that matches fieldId, throwing an exception
29597
       * if it is not found.
29598
       */
29599
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29600
        _Fields fields = findByThriftId(fieldId);
29601
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29602
        return fields;
29603
      }
29604
 
29605
      /**
29606
       * Find the _Fields constant that matches name, or null if its not found.
29607
       */
29608
      public static _Fields findByName(String name) {
29609
        return byName.get(name);
29610
      }
29611
 
29612
      private final short _thriftId;
29613
      private final String _fieldName;
29614
 
29615
      _Fields(short thriftId, String fieldName) {
29616
        _thriftId = thriftId;
29617
        _fieldName = fieldName;
29618
      }
29619
 
29620
      public short getThriftFieldId() {
29621
        return _thriftId;
29622
      }
29623
 
29624
      public String getFieldName() {
29625
        return _fieldName;
29626
      }
29627
    }
29628
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29629
    }});
29630
 
29631
    static {
771 rajveer 29632
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
553 chandransh 29633
    }
29634
 
771 rajveer 29635
    public updateBrowseHistory_result() {
553 chandransh 29636
    }
29637
 
29638
    /**
29639
     * Performs a deep copy on <i>other</i>.
29640
     */
771 rajveer 29641
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
553 chandransh 29642
    }
29643
 
771 rajveer 29644
    public updateBrowseHistory_result deepCopy() {
29645
      return new updateBrowseHistory_result(this);
553 chandransh 29646
    }
29647
 
29648
    @Deprecated
771 rajveer 29649
    public updateBrowseHistory_result clone() {
29650
      return new updateBrowseHistory_result(this);
553 chandransh 29651
    }
29652
 
29653
    public void setFieldValue(_Fields field, Object value) {
29654
      switch (field) {
29655
      }
29656
    }
29657
 
29658
    public void setFieldValue(int fieldID, Object value) {
29659
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29660
    }
29661
 
29662
    public Object getFieldValue(_Fields field) {
29663
      switch (field) {
29664
      }
29665
      throw new IllegalStateException();
29666
    }
29667
 
29668
    public Object getFieldValue(int fieldId) {
29669
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29670
    }
29671
 
29672
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29673
    public boolean isSet(_Fields field) {
29674
      switch (field) {
29675
      }
29676
      throw new IllegalStateException();
29677
    }
29678
 
29679
    public boolean isSet(int fieldID) {
29680
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29681
    }
29682
 
29683
    @Override
29684
    public boolean equals(Object that) {
29685
      if (that == null)
29686
        return false;
771 rajveer 29687
      if (that instanceof updateBrowseHistory_result)
29688
        return this.equals((updateBrowseHistory_result)that);
553 chandransh 29689
      return false;
29690
    }
29691
 
771 rajveer 29692
    public boolean equals(updateBrowseHistory_result that) {
553 chandransh 29693
      if (that == null)
29694
        return false;
29695
 
29696
      return true;
29697
    }
29698
 
29699
    @Override
29700
    public int hashCode() {
29701
      return 0;
29702
    }
29703
 
771 rajveer 29704
    public int compareTo(updateBrowseHistory_result other) {
553 chandransh 29705
      if (!getClass().equals(other.getClass())) {
29706
        return getClass().getName().compareTo(other.getClass().getName());
29707
      }
29708
 
29709
      int lastComparison = 0;
771 rajveer 29710
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
553 chandransh 29711
 
29712
      return 0;
29713
    }
29714
 
29715
    public void read(TProtocol iprot) throws TException {
29716
      TField field;
29717
      iprot.readStructBegin();
29718
      while (true)
29719
      {
29720
        field = iprot.readFieldBegin();
29721
        if (field.type == TType.STOP) { 
29722
          break;
29723
        }
29724
        _Fields fieldId = _Fields.findByThriftId(field.id);
29725
        if (fieldId == null) {
29726
          TProtocolUtil.skip(iprot, field.type);
29727
        } else {
29728
          switch (fieldId) {
29729
          }
29730
          iprot.readFieldEnd();
29731
        }
29732
      }
29733
      iprot.readStructEnd();
29734
      validate();
29735
    }
29736
 
29737
    public void write(TProtocol oprot) throws TException {
29738
      oprot.writeStructBegin(STRUCT_DESC);
29739
 
29740
      oprot.writeFieldStop();
29741
      oprot.writeStructEnd();
29742
    }
29743
 
29744
    @Override
29745
    public String toString() {
771 rajveer 29746
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
553 chandransh 29747
      boolean first = true;
29748
 
29749
      sb.append(")");
29750
      return sb.toString();
29751
    }
29752
 
29753
    public void validate() throws TException {
29754
      // check for required fields
29755
    }
29756
 
29757
  }
29758
 
771 rajveer 29759
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
29760
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
553 chandransh 29761
 
771 rajveer 29762
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 29763
 
771 rajveer 29764
    private long userId;
553 chandransh 29765
 
29766
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29767
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29768
      USER_ID((short)1, "userId");
553 chandransh 29769
 
29770
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29771
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29772
 
29773
      static {
29774
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29775
          byId.put((int)field._thriftId, field);
29776
          byName.put(field.getFieldName(), field);
29777
        }
29778
      }
29779
 
29780
      /**
29781
       * Find the _Fields constant that matches fieldId, or null if its not found.
29782
       */
29783
      public static _Fields findByThriftId(int fieldId) {
29784
        return byId.get(fieldId);
29785
      }
29786
 
29787
      /**
29788
       * Find the _Fields constant that matches fieldId, throwing an exception
29789
       * if it is not found.
29790
       */
29791
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29792
        _Fields fields = findByThriftId(fieldId);
29793
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29794
        return fields;
29795
      }
29796
 
29797
      /**
29798
       * Find the _Fields constant that matches name, or null if its not found.
29799
       */
29800
      public static _Fields findByName(String name) {
29801
        return byName.get(name);
29802
      }
29803
 
29804
      private final short _thriftId;
29805
      private final String _fieldName;
29806
 
29807
      _Fields(short thriftId, String fieldName) {
29808
        _thriftId = thriftId;
29809
        _fieldName = fieldName;
29810
      }
29811
 
29812
      public short getThriftFieldId() {
29813
        return _thriftId;
29814
      }
29815
 
29816
      public String getFieldName() {
29817
        return _fieldName;
29818
      }
29819
    }
29820
 
29821
    // isset id assignments
771 rajveer 29822
    private static final int __USERID_ISSET_ID = 0;
29823
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 29824
 
29825
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 29826
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 29827
          new FieldValueMetaData(TType.I64)));
29828
    }});
29829
 
29830
    static {
771 rajveer 29831
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
553 chandransh 29832
    }
29833
 
771 rajveer 29834
    public getBrowseHistory_args() {
553 chandransh 29835
    }
29836
 
771 rajveer 29837
    public getBrowseHistory_args(
29838
      long userId)
553 chandransh 29839
    {
29840
      this();
771 rajveer 29841
      this.userId = userId;
29842
      setUserIdIsSet(true);
553 chandransh 29843
    }
29844
 
29845
    /**
29846
     * Performs a deep copy on <i>other</i>.
29847
     */
771 rajveer 29848
    public getBrowseHistory_args(getBrowseHistory_args other) {
553 chandransh 29849
      __isset_bit_vector.clear();
29850
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 29851
      this.userId = other.userId;
553 chandransh 29852
    }
29853
 
771 rajveer 29854
    public getBrowseHistory_args deepCopy() {
29855
      return new getBrowseHistory_args(this);
553 chandransh 29856
    }
29857
 
29858
    @Deprecated
771 rajveer 29859
    public getBrowseHistory_args clone() {
29860
      return new getBrowseHistory_args(this);
553 chandransh 29861
    }
29862
 
771 rajveer 29863
    public long getUserId() {
29864
      return this.userId;
553 chandransh 29865
    }
29866
 
771 rajveer 29867
    public getBrowseHistory_args setUserId(long userId) {
29868
      this.userId = userId;
29869
      setUserIdIsSet(true);
553 chandransh 29870
      return this;
29871
    }
29872
 
771 rajveer 29873
    public void unsetUserId() {
29874
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 29875
    }
29876
 
771 rajveer 29877
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
29878
    public boolean isSetUserId() {
29879
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 29880
    }
29881
 
771 rajveer 29882
    public void setUserIdIsSet(boolean value) {
29883
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 29884
    }
29885
 
29886
    public void setFieldValue(_Fields field, Object value) {
29887
      switch (field) {
29888
      case USER_ID:
29889
        if (value == null) {
771 rajveer 29890
          unsetUserId();
553 chandransh 29891
        } else {
771 rajveer 29892
          setUserId((Long)value);
553 chandransh 29893
        }
29894
        break;
29895
 
29896
      }
29897
    }
29898
 
29899
    public void setFieldValue(int fieldID, Object value) {
29900
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29901
    }
29902
 
29903
    public Object getFieldValue(_Fields field) {
29904
      switch (field) {
29905
      case USER_ID:
771 rajveer 29906
        return new Long(getUserId());
553 chandransh 29907
 
29908
      }
29909
      throw new IllegalStateException();
29910
    }
29911
 
29912
    public Object getFieldValue(int fieldId) {
29913
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29914
    }
29915
 
29916
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29917
    public boolean isSet(_Fields field) {
29918
      switch (field) {
29919
      case USER_ID:
771 rajveer 29920
        return isSetUserId();
553 chandransh 29921
      }
29922
      throw new IllegalStateException();
29923
    }
29924
 
29925
    public boolean isSet(int fieldID) {
29926
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29927
    }
29928
 
29929
    @Override
29930
    public boolean equals(Object that) {
29931
      if (that == null)
29932
        return false;
771 rajveer 29933
      if (that instanceof getBrowseHistory_args)
29934
        return this.equals((getBrowseHistory_args)that);
553 chandransh 29935
      return false;
29936
    }
29937
 
771 rajveer 29938
    public boolean equals(getBrowseHistory_args that) {
553 chandransh 29939
      if (that == null)
29940
        return false;
29941
 
771 rajveer 29942
      boolean this_present_userId = true;
29943
      boolean that_present_userId = true;
29944
      if (this_present_userId || that_present_userId) {
29945
        if (!(this_present_userId && that_present_userId))
553 chandransh 29946
          return false;
771 rajveer 29947
        if (this.userId != that.userId)
553 chandransh 29948
          return false;
29949
      }
29950
 
29951
      return true;
29952
    }
29953
 
29954
    @Override
29955
    public int hashCode() {
29956
      return 0;
29957
    }
29958
 
771 rajveer 29959
    public int compareTo(getBrowseHistory_args other) {
553 chandransh 29960
      if (!getClass().equals(other.getClass())) {
29961
        return getClass().getName().compareTo(other.getClass().getName());
29962
      }
29963
 
29964
      int lastComparison = 0;
771 rajveer 29965
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
553 chandransh 29966
 
771 rajveer 29967
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 29968
      if (lastComparison != 0) {
29969
        return lastComparison;
29970
      }
771 rajveer 29971
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 29972
      if (lastComparison != 0) {
29973
        return lastComparison;
29974
      }
29975
      return 0;
29976
    }
29977
 
29978
    public void read(TProtocol iprot) throws TException {
29979
      TField field;
29980
      iprot.readStructBegin();
29981
      while (true)
29982
      {
29983
        field = iprot.readFieldBegin();
29984
        if (field.type == TType.STOP) { 
29985
          break;
29986
        }
29987
        _Fields fieldId = _Fields.findByThriftId(field.id);
29988
        if (fieldId == null) {
29989
          TProtocolUtil.skip(iprot, field.type);
29990
        } else {
29991
          switch (fieldId) {
29992
            case USER_ID:
29993
              if (field.type == TType.I64) {
771 rajveer 29994
                this.userId = iprot.readI64();
29995
                setUserIdIsSet(true);
553 chandransh 29996
              } else { 
29997
                TProtocolUtil.skip(iprot, field.type);
29998
              }
29999
              break;
30000
          }
30001
          iprot.readFieldEnd();
30002
        }
30003
      }
30004
      iprot.readStructEnd();
30005
      validate();
30006
    }
30007
 
30008
    public void write(TProtocol oprot) throws TException {
30009
      validate();
30010
 
30011
      oprot.writeStructBegin(STRUCT_DESC);
30012
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 30013
      oprot.writeI64(this.userId);
553 chandransh 30014
      oprot.writeFieldEnd();
30015
      oprot.writeFieldStop();
30016
      oprot.writeStructEnd();
30017
    }
30018
 
30019
    @Override
30020
    public String toString() {
771 rajveer 30021
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
553 chandransh 30022
      boolean first = true;
30023
 
771 rajveer 30024
      sb.append("userId:");
30025
      sb.append(this.userId);
553 chandransh 30026
      first = false;
30027
      sb.append(")");
30028
      return sb.toString();
30029
    }
30030
 
30031
    public void validate() throws TException {
30032
      // check for required fields
30033
    }
30034
 
30035
  }
30036
 
771 rajveer 30037
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
30038
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
553 chandransh 30039
 
30040
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
30041
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
30042
 
771 rajveer 30043
    private Widget success;
553 chandransh 30044
    private WidgetException scx;
30045
 
30046
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30047
    public enum _Fields implements TFieldIdEnum {
130 ashish 30048
      SUCCESS((short)0, "success"),
553 chandransh 30049
      SCX((short)1, "scx");
130 ashish 30050
 
30051
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30052
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30053
 
30054
      static {
30055
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30056
          byId.put((int)field._thriftId, field);
30057
          byName.put(field.getFieldName(), field);
30058
        }
30059
      }
30060
 
30061
      /**
30062
       * Find the _Fields constant that matches fieldId, or null if its not found.
30063
       */
30064
      public static _Fields findByThriftId(int fieldId) {
30065
        return byId.get(fieldId);
30066
      }
30067
 
30068
      /**
30069
       * Find the _Fields constant that matches fieldId, throwing an exception
30070
       * if it is not found.
30071
       */
30072
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30073
        _Fields fields = findByThriftId(fieldId);
30074
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30075
        return fields;
30076
      }
30077
 
30078
      /**
30079
       * Find the _Fields constant that matches name, or null if its not found.
30080
       */
30081
      public static _Fields findByName(String name) {
30082
        return byName.get(name);
30083
      }
30084
 
30085
      private final short _thriftId;
30086
      private final String _fieldName;
30087
 
30088
      _Fields(short thriftId, String fieldName) {
30089
        _thriftId = thriftId;
30090
        _fieldName = fieldName;
30091
      }
30092
 
30093
      public short getThriftFieldId() {
30094
        return _thriftId;
30095
      }
30096
 
30097
      public String getFieldName() {
30098
        return _fieldName;
30099
      }
30100
    }
30101
 
30102
    // isset id assignments
30103
 
30104
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30105
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
771 rajveer 30106
          new StructMetaData(TType.STRUCT, Widget.class)));
553 chandransh 30107
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 30108
          new FieldValueMetaData(TType.STRUCT)));
30109
    }});
30110
 
30111
    static {
771 rajveer 30112
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
130 ashish 30113
    }
30114
 
771 rajveer 30115
    public getBrowseHistory_result() {
130 ashish 30116
    }
30117
 
771 rajveer 30118
    public getBrowseHistory_result(
30119
      Widget success,
553 chandransh 30120
      WidgetException scx)
130 ashish 30121
    {
30122
      this();
30123
      this.success = success;
553 chandransh 30124
      this.scx = scx;
130 ashish 30125
    }
30126
 
30127
    /**
30128
     * Performs a deep copy on <i>other</i>.
30129
     */
771 rajveer 30130
    public getBrowseHistory_result(getBrowseHistory_result other) {
553 chandransh 30131
      if (other.isSetSuccess()) {
771 rajveer 30132
        this.success = new Widget(other.success);
553 chandransh 30133
      }
30134
      if (other.isSetScx()) {
30135
        this.scx = new WidgetException(other.scx);
30136
      }
30137
    }
30138
 
771 rajveer 30139
    public getBrowseHistory_result deepCopy() {
30140
      return new getBrowseHistory_result(this);
553 chandransh 30141
    }
30142
 
30143
    @Deprecated
771 rajveer 30144
    public getBrowseHistory_result clone() {
30145
      return new getBrowseHistory_result(this);
553 chandransh 30146
    }
30147
 
771 rajveer 30148
    public Widget getSuccess() {
553 chandransh 30149
      return this.success;
30150
    }
30151
 
771 rajveer 30152
    public getBrowseHistory_result setSuccess(Widget success) {
553 chandransh 30153
      this.success = success;
30154
      return this;
30155
    }
30156
 
30157
    public void unsetSuccess() {
30158
      this.success = null;
30159
    }
30160
 
30161
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30162
    public boolean isSetSuccess() {
30163
      return this.success != null;
30164
    }
30165
 
30166
    public void setSuccessIsSet(boolean value) {
30167
      if (!value) {
30168
        this.success = null;
30169
      }
30170
    }
30171
 
30172
    public WidgetException getScx() {
30173
      return this.scx;
30174
    }
30175
 
771 rajveer 30176
    public getBrowseHistory_result setScx(WidgetException scx) {
553 chandransh 30177
      this.scx = scx;
30178
      return this;
30179
    }
30180
 
30181
    public void unsetScx() {
30182
      this.scx = null;
30183
    }
30184
 
30185
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30186
    public boolean isSetScx() {
30187
      return this.scx != null;
30188
    }
30189
 
30190
    public void setScxIsSet(boolean value) {
30191
      if (!value) {
30192
        this.scx = null;
30193
      }
30194
    }
30195
 
30196
    public void setFieldValue(_Fields field, Object value) {
30197
      switch (field) {
30198
      case SUCCESS:
30199
        if (value == null) {
30200
          unsetSuccess();
30201
        } else {
771 rajveer 30202
          setSuccess((Widget)value);
553 chandransh 30203
        }
30204
        break;
30205
 
30206
      case SCX:
30207
        if (value == null) {
30208
          unsetScx();
30209
        } else {
30210
          setScx((WidgetException)value);
30211
        }
30212
        break;
30213
 
30214
      }
30215
    }
30216
 
30217
    public void setFieldValue(int fieldID, Object value) {
30218
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30219
    }
30220
 
30221
    public Object getFieldValue(_Fields field) {
30222
      switch (field) {
30223
      case SUCCESS:
30224
        return getSuccess();
30225
 
30226
      case SCX:
30227
        return getScx();
30228
 
30229
      }
30230
      throw new IllegalStateException();
30231
    }
30232
 
30233
    public Object getFieldValue(int fieldId) {
30234
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30235
    }
30236
 
30237
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30238
    public boolean isSet(_Fields field) {
30239
      switch (field) {
30240
      case SUCCESS:
30241
        return isSetSuccess();
30242
      case SCX:
30243
        return isSetScx();
30244
      }
30245
      throw new IllegalStateException();
30246
    }
30247
 
30248
    public boolean isSet(int fieldID) {
30249
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30250
    }
30251
 
30252
    @Override
30253
    public boolean equals(Object that) {
30254
      if (that == null)
30255
        return false;
771 rajveer 30256
      if (that instanceof getBrowseHistory_result)
30257
        return this.equals((getBrowseHistory_result)that);
553 chandransh 30258
      return false;
30259
    }
30260
 
771 rajveer 30261
    public boolean equals(getBrowseHistory_result that) {
553 chandransh 30262
      if (that == null)
30263
        return false;
30264
 
30265
      boolean this_present_success = true && this.isSetSuccess();
30266
      boolean that_present_success = true && that.isSetSuccess();
30267
      if (this_present_success || that_present_success) {
30268
        if (!(this_present_success && that_present_success))
30269
          return false;
30270
        if (!this.success.equals(that.success))
30271
          return false;
30272
      }
30273
 
30274
      boolean this_present_scx = true && this.isSetScx();
30275
      boolean that_present_scx = true && that.isSetScx();
30276
      if (this_present_scx || that_present_scx) {
30277
        if (!(this_present_scx && that_present_scx))
30278
          return false;
30279
        if (!this.scx.equals(that.scx))
30280
          return false;
30281
      }
30282
 
30283
      return true;
30284
    }
30285
 
30286
    @Override
30287
    public int hashCode() {
30288
      return 0;
30289
    }
30290
 
771 rajveer 30291
    public int compareTo(getBrowseHistory_result other) {
30292
      if (!getClass().equals(other.getClass())) {
30293
        return getClass().getName().compareTo(other.getClass().getName());
30294
      }
30295
 
30296
      int lastComparison = 0;
30297
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
30298
 
30299
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30300
      if (lastComparison != 0) {
30301
        return lastComparison;
30302
      }
30303
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30304
      if (lastComparison != 0) {
30305
        return lastComparison;
30306
      }
30307
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
30308
      if (lastComparison != 0) {
30309
        return lastComparison;
30310
      }
30311
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
30312
      if (lastComparison != 0) {
30313
        return lastComparison;
30314
      }
30315
      return 0;
30316
    }
30317
 
553 chandransh 30318
    public void read(TProtocol iprot) throws TException {
30319
      TField field;
30320
      iprot.readStructBegin();
30321
      while (true)
30322
      {
30323
        field = iprot.readFieldBegin();
30324
        if (field.type == TType.STOP) { 
30325
          break;
30326
        }
30327
        _Fields fieldId = _Fields.findByThriftId(field.id);
30328
        if (fieldId == null) {
30329
          TProtocolUtil.skip(iprot, field.type);
30330
        } else {
30331
          switch (fieldId) {
30332
            case SUCCESS:
30333
              if (field.type == TType.STRUCT) {
771 rajveer 30334
                this.success = new Widget();
553 chandransh 30335
                this.success.read(iprot);
30336
              } else { 
30337
                TProtocolUtil.skip(iprot, field.type);
30338
              }
30339
              break;
30340
            case SCX:
30341
              if (field.type == TType.STRUCT) {
30342
                this.scx = new WidgetException();
30343
                this.scx.read(iprot);
30344
              } else { 
30345
                TProtocolUtil.skip(iprot, field.type);
30346
              }
30347
              break;
30348
          }
30349
          iprot.readFieldEnd();
30350
        }
30351
      }
30352
      iprot.readStructEnd();
30353
      validate();
30354
    }
30355
 
30356
    public void write(TProtocol oprot) throws TException {
30357
      oprot.writeStructBegin(STRUCT_DESC);
30358
 
30359
      if (this.isSetSuccess()) {
30360
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30361
        this.success.write(oprot);
30362
        oprot.writeFieldEnd();
30363
      } else if (this.isSetScx()) {
30364
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30365
        this.scx.write(oprot);
30366
        oprot.writeFieldEnd();
30367
      }
30368
      oprot.writeFieldStop();
30369
      oprot.writeStructEnd();
30370
    }
30371
 
30372
    @Override
30373
    public String toString() {
771 rajveer 30374
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
553 chandransh 30375
      boolean first = true;
30376
 
30377
      sb.append("success:");
30378
      if (this.success == null) {
30379
        sb.append("null");
30380
      } else {
30381
        sb.append(this.success);
30382
      }
30383
      first = false;
30384
      if (!first) sb.append(", ");
30385
      sb.append("scx:");
30386
      if (this.scx == null) {
30387
        sb.append("null");
30388
      } else {
30389
        sb.append(this.scx);
30390
      }
30391
      first = false;
30392
      sb.append(")");
30393
      return sb.toString();
30394
    }
30395
 
30396
    public void validate() throws TException {
30397
      // check for required fields
30398
    }
30399
 
30400
  }
30401
 
771 rajveer 30402
  public static class mergeBrowseHistory_args implements TBase<mergeBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_args>   {
30403
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_args");
553 chandransh 30404
 
771 rajveer 30405
    private static final TField FROM_USER_ID_FIELD_DESC = new TField("fromUserId", TType.I64, (short)1);
30406
    private static final TField TO_USER_ID_FIELD_DESC = new TField("toUserId", TType.I64, (short)2);
553 chandransh 30407
 
771 rajveer 30408
    private long fromUserId;
30409
    private long toUserId;
553 chandransh 30410
 
30411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30412
    public enum _Fields implements TFieldIdEnum {
771 rajveer 30413
      FROM_USER_ID((short)1, "fromUserId"),
30414
      TO_USER_ID((short)2, "toUserId");
553 chandransh 30415
 
30416
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30417
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30418
 
30419
      static {
30420
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30421
          byId.put((int)field._thriftId, field);
30422
          byName.put(field.getFieldName(), field);
30423
        }
30424
      }
30425
 
30426
      /**
30427
       * Find the _Fields constant that matches fieldId, or null if its not found.
30428
       */
30429
      public static _Fields findByThriftId(int fieldId) {
30430
        return byId.get(fieldId);
30431
      }
30432
 
30433
      /**
30434
       * Find the _Fields constant that matches fieldId, throwing an exception
30435
       * if it is not found.
30436
       */
30437
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30438
        _Fields fields = findByThriftId(fieldId);
30439
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30440
        return fields;
30441
      }
30442
 
30443
      /**
30444
       * Find the _Fields constant that matches name, or null if its not found.
30445
       */
30446
      public static _Fields findByName(String name) {
30447
        return byName.get(name);
30448
      }
30449
 
30450
      private final short _thriftId;
30451
      private final String _fieldName;
30452
 
30453
      _Fields(short thriftId, String fieldName) {
30454
        _thriftId = thriftId;
30455
        _fieldName = fieldName;
30456
      }
30457
 
30458
      public short getThriftFieldId() {
30459
        return _thriftId;
30460
      }
30461
 
30462
      public String getFieldName() {
30463
        return _fieldName;
30464
      }
30465
    }
30466
 
30467
    // isset id assignments
771 rajveer 30468
    private static final int __FROMUSERID_ISSET_ID = 0;
30469
    private static final int __TOUSERID_ISSET_ID = 1;
30470
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 30471
 
30472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 30473
      put(_Fields.FROM_USER_ID, new FieldMetaData("fromUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 30474
          new FieldValueMetaData(TType.I64)));
771 rajveer 30475
      put(_Fields.TO_USER_ID, new FieldMetaData("toUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 30476
          new FieldValueMetaData(TType.I64)));
30477
    }});
30478
 
30479
    static {
771 rajveer 30480
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_args.class, metaDataMap);
553 chandransh 30481
    }
30482
 
771 rajveer 30483
    public mergeBrowseHistory_args() {
553 chandransh 30484
    }
30485
 
771 rajveer 30486
    public mergeBrowseHistory_args(
30487
      long fromUserId,
30488
      long toUserId)
553 chandransh 30489
    {
30490
      this();
771 rajveer 30491
      this.fromUserId = fromUserId;
30492
      setFromUserIdIsSet(true);
30493
      this.toUserId = toUserId;
30494
      setToUserIdIsSet(true);
553 chandransh 30495
    }
30496
 
30497
    /**
30498
     * Performs a deep copy on <i>other</i>.
30499
     */
771 rajveer 30500
    public mergeBrowseHistory_args(mergeBrowseHistory_args other) {
130 ashish 30501
      __isset_bit_vector.clear();
30502
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 30503
      this.fromUserId = other.fromUserId;
30504
      this.toUserId = other.toUserId;
553 chandransh 30505
    }
30506
 
771 rajveer 30507
    public mergeBrowseHistory_args deepCopy() {
30508
      return new mergeBrowseHistory_args(this);
553 chandransh 30509
    }
30510
 
30511
    @Deprecated
771 rajveer 30512
    public mergeBrowseHistory_args clone() {
30513
      return new mergeBrowseHistory_args(this);
553 chandransh 30514
    }
30515
 
771 rajveer 30516
    public long getFromUserId() {
30517
      return this.fromUserId;
553 chandransh 30518
    }
30519
 
771 rajveer 30520
    public mergeBrowseHistory_args setFromUserId(long fromUserId) {
30521
      this.fromUserId = fromUserId;
30522
      setFromUserIdIsSet(true);
553 chandransh 30523
      return this;
30524
    }
30525
 
771 rajveer 30526
    public void unsetFromUserId() {
30527
      __isset_bit_vector.clear(__FROMUSERID_ISSET_ID);
553 chandransh 30528
    }
30529
 
771 rajveer 30530
    /** Returns true if field fromUserId is set (has been asigned a value) and false otherwise */
30531
    public boolean isSetFromUserId() {
30532
      return __isset_bit_vector.get(__FROMUSERID_ISSET_ID);
553 chandransh 30533
    }
30534
 
771 rajveer 30535
    public void setFromUserIdIsSet(boolean value) {
30536
      __isset_bit_vector.set(__FROMUSERID_ISSET_ID, value);
553 chandransh 30537
    }
30538
 
771 rajveer 30539
    public long getToUserId() {
30540
      return this.toUserId;
553 chandransh 30541
    }
30542
 
771 rajveer 30543
    public mergeBrowseHistory_args setToUserId(long toUserId) {
30544
      this.toUserId = toUserId;
30545
      setToUserIdIsSet(true);
553 chandransh 30546
      return this;
30547
    }
30548
 
771 rajveer 30549
    public void unsetToUserId() {
30550
      __isset_bit_vector.clear(__TOUSERID_ISSET_ID);
553 chandransh 30551
    }
30552
 
771 rajveer 30553
    /** Returns true if field toUserId is set (has been asigned a value) and false otherwise */
30554
    public boolean isSetToUserId() {
30555
      return __isset_bit_vector.get(__TOUSERID_ISSET_ID);
553 chandransh 30556
    }
30557
 
771 rajveer 30558
    public void setToUserIdIsSet(boolean value) {
30559
      __isset_bit_vector.set(__TOUSERID_ISSET_ID, value);
553 chandransh 30560
    }
30561
 
30562
    public void setFieldValue(_Fields field, Object value) {
30563
      switch (field) {
771 rajveer 30564
      case FROM_USER_ID:
553 chandransh 30565
        if (value == null) {
771 rajveer 30566
          unsetFromUserId();
553 chandransh 30567
        } else {
771 rajveer 30568
          setFromUserId((Long)value);
553 chandransh 30569
        }
30570
        break;
30571
 
771 rajveer 30572
      case TO_USER_ID:
553 chandransh 30573
        if (value == null) {
771 rajveer 30574
          unsetToUserId();
553 chandransh 30575
        } else {
771 rajveer 30576
          setToUserId((Long)value);
553 chandransh 30577
        }
30578
        break;
30579
 
130 ashish 30580
      }
30581
    }
30582
 
553 chandransh 30583
    public void setFieldValue(int fieldID, Object value) {
30584
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 30585
    }
30586
 
553 chandransh 30587
    public Object getFieldValue(_Fields field) {
30588
      switch (field) {
771 rajveer 30589
      case FROM_USER_ID:
30590
        return new Long(getFromUserId());
553 chandransh 30591
 
771 rajveer 30592
      case TO_USER_ID:
30593
        return new Long(getToUserId());
553 chandransh 30594
 
30595
      }
30596
      throw new IllegalStateException();
30597
    }
30598
 
30599
    public Object getFieldValue(int fieldId) {
30600
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30601
    }
30602
 
30603
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30604
    public boolean isSet(_Fields field) {
30605
      switch (field) {
771 rajveer 30606
      case FROM_USER_ID:
30607
        return isSetFromUserId();
30608
      case TO_USER_ID:
30609
        return isSetToUserId();
553 chandransh 30610
      }
30611
      throw new IllegalStateException();
30612
    }
30613
 
30614
    public boolean isSet(int fieldID) {
30615
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30616
    }
30617
 
30618
    @Override
30619
    public boolean equals(Object that) {
30620
      if (that == null)
30621
        return false;
771 rajveer 30622
      if (that instanceof mergeBrowseHistory_args)
30623
        return this.equals((mergeBrowseHistory_args)that);
553 chandransh 30624
      return false;
30625
    }
30626
 
771 rajveer 30627
    public boolean equals(mergeBrowseHistory_args that) {
553 chandransh 30628
      if (that == null)
30629
        return false;
30630
 
771 rajveer 30631
      boolean this_present_fromUserId = true;
30632
      boolean that_present_fromUserId = true;
30633
      if (this_present_fromUserId || that_present_fromUserId) {
30634
        if (!(this_present_fromUserId && that_present_fromUserId))
553 chandransh 30635
          return false;
771 rajveer 30636
        if (this.fromUserId != that.fromUserId)
553 chandransh 30637
          return false;
30638
      }
30639
 
771 rajveer 30640
      boolean this_present_toUserId = true;
30641
      boolean that_present_toUserId = true;
30642
      if (this_present_toUserId || that_present_toUserId) {
30643
        if (!(this_present_toUserId && that_present_toUserId))
553 chandransh 30644
          return false;
771 rajveer 30645
        if (this.toUserId != that.toUserId)
553 chandransh 30646
          return false;
30647
      }
30648
 
30649
      return true;
30650
    }
30651
 
30652
    @Override
30653
    public int hashCode() {
30654
      return 0;
30655
    }
30656
 
771 rajveer 30657
    public int compareTo(mergeBrowseHistory_args other) {
553 chandransh 30658
      if (!getClass().equals(other.getClass())) {
30659
        return getClass().getName().compareTo(other.getClass().getName());
30660
      }
30661
 
30662
      int lastComparison = 0;
771 rajveer 30663
      mergeBrowseHistory_args typedOther = (mergeBrowseHistory_args)other;
553 chandransh 30664
 
771 rajveer 30665
      lastComparison = Boolean.valueOf(isSetFromUserId()).compareTo(isSetFromUserId());
553 chandransh 30666
      if (lastComparison != 0) {
30667
        return lastComparison;
30668
      }
771 rajveer 30669
      lastComparison = TBaseHelper.compareTo(fromUserId, typedOther.fromUserId);
553 chandransh 30670
      if (lastComparison != 0) {
30671
        return lastComparison;
30672
      }
771 rajveer 30673
      lastComparison = Boolean.valueOf(isSetToUserId()).compareTo(isSetToUserId());
553 chandransh 30674
      if (lastComparison != 0) {
30675
        return lastComparison;
30676
      }
771 rajveer 30677
      lastComparison = TBaseHelper.compareTo(toUserId, typedOther.toUserId);
553 chandransh 30678
      if (lastComparison != 0) {
30679
        return lastComparison;
30680
      }
30681
      return 0;
30682
    }
30683
 
30684
    public void read(TProtocol iprot) throws TException {
30685
      TField field;
30686
      iprot.readStructBegin();
30687
      while (true)
30688
      {
30689
        field = iprot.readFieldBegin();
30690
        if (field.type == TType.STOP) { 
30691
          break;
30692
        }
30693
        _Fields fieldId = _Fields.findByThriftId(field.id);
30694
        if (fieldId == null) {
30695
          TProtocolUtil.skip(iprot, field.type);
30696
        } else {
30697
          switch (fieldId) {
771 rajveer 30698
            case FROM_USER_ID:
553 chandransh 30699
              if (field.type == TType.I64) {
771 rajveer 30700
                this.fromUserId = iprot.readI64();
30701
                setFromUserIdIsSet(true);
553 chandransh 30702
              } else { 
30703
                TProtocolUtil.skip(iprot, field.type);
30704
              }
30705
              break;
771 rajveer 30706
            case TO_USER_ID:
553 chandransh 30707
              if (field.type == TType.I64) {
771 rajveer 30708
                this.toUserId = iprot.readI64();
30709
                setToUserIdIsSet(true);
553 chandransh 30710
              } else { 
30711
                TProtocolUtil.skip(iprot, field.type);
30712
              }
30713
              break;
30714
          }
30715
          iprot.readFieldEnd();
30716
        }
30717
      }
30718
      iprot.readStructEnd();
30719
      validate();
30720
    }
30721
 
30722
    public void write(TProtocol oprot) throws TException {
30723
      validate();
30724
 
30725
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 30726
      oprot.writeFieldBegin(FROM_USER_ID_FIELD_DESC);
30727
      oprot.writeI64(this.fromUserId);
553 chandransh 30728
      oprot.writeFieldEnd();
771 rajveer 30729
      oprot.writeFieldBegin(TO_USER_ID_FIELD_DESC);
30730
      oprot.writeI64(this.toUserId);
553 chandransh 30731
      oprot.writeFieldEnd();
30732
      oprot.writeFieldStop();
30733
      oprot.writeStructEnd();
30734
    }
30735
 
30736
    @Override
30737
    public String toString() {
771 rajveer 30738
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_args(");
553 chandransh 30739
      boolean first = true;
30740
 
771 rajveer 30741
      sb.append("fromUserId:");
30742
      sb.append(this.fromUserId);
553 chandransh 30743
      first = false;
30744
      if (!first) sb.append(", ");
771 rajveer 30745
      sb.append("toUserId:");
30746
      sb.append(this.toUserId);
553 chandransh 30747
      first = false;
30748
      sb.append(")");
30749
      return sb.toString();
30750
    }
30751
 
30752
    public void validate() throws TException {
30753
      // check for required fields
30754
    }
30755
 
30756
  }
30757
 
771 rajveer 30758
  public static class mergeBrowseHistory_result implements TBase<mergeBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_result>   {
30759
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_result");
553 chandransh 30760
 
30761
 
30762
 
30763
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30764
    public enum _Fields implements TFieldIdEnum {
30765
;
30766
 
30767
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30768
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30769
 
30770
      static {
30771
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30772
          byId.put((int)field._thriftId, field);
30773
          byName.put(field.getFieldName(), field);
30774
        }
30775
      }
30776
 
30777
      /**
30778
       * Find the _Fields constant that matches fieldId, or null if its not found.
30779
       */
30780
      public static _Fields findByThriftId(int fieldId) {
30781
        return byId.get(fieldId);
30782
      }
30783
 
30784
      /**
30785
       * Find the _Fields constant that matches fieldId, throwing an exception
30786
       * if it is not found.
30787
       */
30788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30789
        _Fields fields = findByThriftId(fieldId);
30790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30791
        return fields;
30792
      }
30793
 
30794
      /**
30795
       * Find the _Fields constant that matches name, or null if its not found.
30796
       */
30797
      public static _Fields findByName(String name) {
30798
        return byName.get(name);
30799
      }
30800
 
30801
      private final short _thriftId;
30802
      private final String _fieldName;
30803
 
30804
      _Fields(short thriftId, String fieldName) {
30805
        _thriftId = thriftId;
30806
        _fieldName = fieldName;
30807
      }
30808
 
30809
      public short getThriftFieldId() {
30810
        return _thriftId;
30811
      }
30812
 
30813
      public String getFieldName() {
30814
        return _fieldName;
30815
      }
30816
    }
30817
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30818
    }});
30819
 
30820
    static {
771 rajveer 30821
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_result.class, metaDataMap);
553 chandransh 30822
    }
30823
 
771 rajveer 30824
    public mergeBrowseHistory_result() {
553 chandransh 30825
    }
30826
 
30827
    /**
30828
     * Performs a deep copy on <i>other</i>.
30829
     */
771 rajveer 30830
    public mergeBrowseHistory_result(mergeBrowseHistory_result other) {
553 chandransh 30831
    }
30832
 
771 rajveer 30833
    public mergeBrowseHistory_result deepCopy() {
30834
      return new mergeBrowseHistory_result(this);
553 chandransh 30835
    }
30836
 
130 ashish 30837
    @Deprecated
771 rajveer 30838
    public mergeBrowseHistory_result clone() {
30839
      return new mergeBrowseHistory_result(this);
130 ashish 30840
    }
30841
 
553 chandransh 30842
    public void setFieldValue(_Fields field, Object value) {
30843
      switch (field) {
30844
      }
30845
    }
30846
 
30847
    public void setFieldValue(int fieldID, Object value) {
30848
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30849
    }
30850
 
30851
    public Object getFieldValue(_Fields field) {
30852
      switch (field) {
30853
      }
30854
      throw new IllegalStateException();
30855
    }
30856
 
30857
    public Object getFieldValue(int fieldId) {
30858
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30859
    }
30860
 
30861
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30862
    public boolean isSet(_Fields field) {
30863
      switch (field) {
30864
      }
30865
      throw new IllegalStateException();
30866
    }
30867
 
30868
    public boolean isSet(int fieldID) {
30869
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30870
    }
30871
 
30872
    @Override
30873
    public boolean equals(Object that) {
30874
      if (that == null)
30875
        return false;
771 rajveer 30876
      if (that instanceof mergeBrowseHistory_result)
30877
        return this.equals((mergeBrowseHistory_result)that);
553 chandransh 30878
      return false;
30879
    }
30880
 
771 rajveer 30881
    public boolean equals(mergeBrowseHistory_result that) {
553 chandransh 30882
      if (that == null)
30883
        return false;
30884
 
30885
      return true;
30886
    }
30887
 
30888
    @Override
30889
    public int hashCode() {
30890
      return 0;
30891
    }
30892
 
771 rajveer 30893
    public int compareTo(mergeBrowseHistory_result other) {
553 chandransh 30894
      if (!getClass().equals(other.getClass())) {
30895
        return getClass().getName().compareTo(other.getClass().getName());
30896
      }
30897
 
30898
      int lastComparison = 0;
771 rajveer 30899
      mergeBrowseHistory_result typedOther = (mergeBrowseHistory_result)other;
553 chandransh 30900
 
30901
      return 0;
30902
    }
30903
 
30904
    public void read(TProtocol iprot) throws TException {
30905
      TField field;
30906
      iprot.readStructBegin();
30907
      while (true)
30908
      {
30909
        field = iprot.readFieldBegin();
30910
        if (field.type == TType.STOP) { 
30911
          break;
30912
        }
30913
        _Fields fieldId = _Fields.findByThriftId(field.id);
30914
        if (fieldId == null) {
30915
          TProtocolUtil.skip(iprot, field.type);
30916
        } else {
30917
          switch (fieldId) {
30918
          }
30919
          iprot.readFieldEnd();
30920
        }
30921
      }
30922
      iprot.readStructEnd();
30923
      validate();
30924
    }
30925
 
30926
    public void write(TProtocol oprot) throws TException {
30927
      oprot.writeStructBegin(STRUCT_DESC);
30928
 
30929
      oprot.writeFieldStop();
30930
      oprot.writeStructEnd();
30931
    }
30932
 
30933
    @Override
30934
    public String toString() {
771 rajveer 30935
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_result(");
553 chandransh 30936
      boolean first = true;
30937
 
30938
      sb.append(")");
30939
      return sb.toString();
30940
    }
30941
 
30942
    public void validate() throws TException {
30943
      // check for required fields
30944
    }
30945
 
30946
  }
30947
 
48 ashish 30948
}