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
 
553 chandransh 72
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 73
 
553 chandransh 74
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 75
 
553 chandransh 76
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 77
 
553 chandransh 78
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 79
 
553 chandransh 80
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 81
 
553 chandransh 82
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 83
 
553 chandransh 84
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 85
 
553 chandransh 86
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 87
 
553 chandransh 88
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
89
 
90
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
91
 
92
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
93
 
578 chandransh 94
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 95
 
688 chandransh 96
    /**
97
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
98
     * 
99
     * @param cartId
100
     */
101
    public long createOrders(long cartId) throws ShoppingCartException, TException;
553 chandransh 102
 
688 chandransh 103
    /**
104
     * Validates that:
105
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
106
     * 2. None of the lines in the cart for an inactive item.
107
     * 3. The estimate for any of the lines in cart doesn't change.
108
     * Returns true only if all three hold.
109
     * 
110
     * @param cartId
111
     */
578 chandransh 112
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 113
 
688 chandransh 114
    /**
115
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
116
     * 
117
     * @param fromCartId
118
     * @param toCartId
119
     */
553 chandransh 120
    public void mergeCart(long fromCartId, long toCartId) throws TException;
121
 
688 chandransh 122
    /**
123
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
124
     * 
125
     * @param cartId
126
     */
127
    public boolean checkOut(long cartId) throws ShoppingCartException, TException;
128
 
129
    /**
130
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
131
     * This methods removes the specified quantiry of the specified item from the cart.
132
     * 
133
     * @param cartId
134
     * @param items
135
     */
708 rajveer 136
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException;
688 chandransh 137
 
771 rajveer 138
    /**
139
     * Widgets
140
     * 
141
     * @param userId
142
     */
143
    public Widget getMyResearch(long userId) throws WidgetException, TException;
553 chandransh 144
 
771 rajveer 145
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 146
 
771 rajveer 147
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 148
 
771 rajveer 149
    public void updateBrowseHistory(long userId, long itemId) throws TException;
553 chandransh 150
 
771 rajveer 151
    public Widget getBrowseHistory(long userId) throws WidgetException, TException;
553 chandransh 152
 
771 rajveer 153
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException;
553 chandransh 154
 
48 ashish 155
  }
156
 
157
  public static class Client implements Iface {
158
    public Client(TProtocol prot)
159
    {
160
      this(prot, prot);
161
    }
162
 
163
    public Client(TProtocol iprot, TProtocol oprot)
164
    {
165
      iprot_ = iprot;
166
      oprot_ = oprot;
167
    }
168
 
169
    protected TProtocol iprot_;
170
    protected TProtocol oprot_;
171
 
172
    protected int seqid_;
173
 
174
    public TProtocol getInputProtocol()
175
    {
176
      return this.iprot_;
177
    }
178
 
179
    public TProtocol getOutputProtocol()
180
    {
181
      return this.oprot_;
182
    }
183
 
764 rajveer 184
    public void closeSession() throws TException
185
    {
186
      send_closeSession();
187
      recv_closeSession();
188
    }
189
 
190
    public void send_closeSession() throws TException
191
    {
192
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
193
      closeSession_args args = new closeSession_args();
194
      args.write(oprot_);
195
      oprot_.writeMessageEnd();
196
      oprot_.getTransport().flush();
197
    }
198
 
199
    public void recv_closeSession() throws TException
200
    {
201
      TMessage msg = iprot_.readMessageBegin();
202
      if (msg.type == TMessageType.EXCEPTION) {
203
        TApplicationException x = TApplicationException.read(iprot_);
204
        iprot_.readMessageEnd();
205
        throw x;
206
      }
207
      closeSession_result result = new closeSession_result();
208
      result.read(iprot_);
209
      iprot_.readMessageEnd();
210
      return;
211
    }
212
 
553 chandransh 213
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 214
    {
553 chandransh 215
      send_createAnonymousUser(jsessionId);
216
      return recv_createAnonymousUser();
48 ashish 217
    }
218
 
553 chandransh 219
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 220
    {
553 chandransh 221
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
222
      createAnonymousUser_args args = new createAnonymousUser_args();
223
      args.jsessionId = jsessionId;
48 ashish 224
      args.write(oprot_);
225
      oprot_.writeMessageEnd();
226
      oprot_.getTransport().flush();
227
    }
228
 
553 chandransh 229
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 230
    {
231
      TMessage msg = iprot_.readMessageBegin();
232
      if (msg.type == TMessageType.EXCEPTION) {
233
        TApplicationException x = TApplicationException.read(iprot_);
234
        iprot_.readMessageEnd();
235
        throw x;
236
      }
553 chandransh 237
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 238
      result.read(iprot_);
239
      iprot_.readMessageEnd();
240
      if (result.isSetSuccess()) {
241
        return result.success;
242
      }
553 chandransh 243
      if (result.ucex != null) {
244
        throw result.ucex;
48 ashish 245
      }
553 chandransh 246
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 247
    }
248
 
553 chandransh 249
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 250
    {
553 chandransh 251
      send_getUserById(userId);
252
      return recv_getUserById();
48 ashish 253
    }
254
 
553 chandransh 255
    public void send_getUserById(long userId) throws TException
48 ashish 256
    {
553 chandransh 257
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
258
      getUserById_args args = new getUserById_args();
48 ashish 259
      args.userId = userId;
260
      args.write(oprot_);
261
      oprot_.writeMessageEnd();
262
      oprot_.getTransport().flush();
263
    }
264
 
553 chandransh 265
    public User recv_getUserById() throws UserContextException, TException
48 ashish 266
    {
267
      TMessage msg = iprot_.readMessageBegin();
268
      if (msg.type == TMessageType.EXCEPTION) {
269
        TApplicationException x = TApplicationException.read(iprot_);
270
        iprot_.readMessageEnd();
271
        throw x;
272
      }
553 chandransh 273
      getUserById_result result = new getUserById_result();
48 ashish 274
      result.read(iprot_);
275
      iprot_.readMessageEnd();
276
      if (result.isSetSuccess()) {
277
        return result.success;
278
      }
553 chandransh 279
      if (result.ucex != null) {
280
        throw result.ucex;
48 ashish 281
      }
553 chandransh 282
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 283
    }
284
 
553 chandransh 285
    public User createUser(User user) throws UserContextException, TException
48 ashish 286
    {
553 chandransh 287
      send_createUser(user);
288
      return recv_createUser();
48 ashish 289
    }
290
 
553 chandransh 291
    public void send_createUser(User user) throws TException
48 ashish 292
    {
553 chandransh 293
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
294
      createUser_args args = new createUser_args();
295
      args.user = user;
48 ashish 296
      args.write(oprot_);
297
      oprot_.writeMessageEnd();
298
      oprot_.getTransport().flush();
299
    }
300
 
553 chandransh 301
    public User recv_createUser() throws UserContextException, TException
48 ashish 302
    {
303
      TMessage msg = iprot_.readMessageBegin();
304
      if (msg.type == TMessageType.EXCEPTION) {
305
        TApplicationException x = TApplicationException.read(iprot_);
306
        iprot_.readMessageEnd();
307
        throw x;
308
      }
553 chandransh 309
      createUser_result result = new createUser_result();
48 ashish 310
      result.read(iprot_);
311
      iprot_.readMessageEnd();
312
      if (result.isSetSuccess()) {
313
        return result.success;
314
      }
553 chandransh 315
      if (result.ucex != null) {
316
        throw result.ucex;
48 ashish 317
      }
553 chandransh 318
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 319
    }
320
 
553 chandransh 321
    public User updateUser(User user) throws UserContextException, TException
48 ashish 322
    {
553 chandransh 323
      send_updateUser(user);
324
      return recv_updateUser();
48 ashish 325
    }
326
 
553 chandransh 327
    public void send_updateUser(User user) throws TException
48 ashish 328
    {
553 chandransh 329
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
330
      updateUser_args args = new updateUser_args();
331
      args.user = user;
48 ashish 332
      args.write(oprot_);
333
      oprot_.writeMessageEnd();
334
      oprot_.getTransport().flush();
335
    }
336
 
553 chandransh 337
    public User recv_updateUser() throws UserContextException, TException
48 ashish 338
    {
339
      TMessage msg = iprot_.readMessageBegin();
340
      if (msg.type == TMessageType.EXCEPTION) {
341
        TApplicationException x = TApplicationException.read(iprot_);
342
        iprot_.readMessageEnd();
343
        throw x;
344
      }
553 chandransh 345
      updateUser_result result = new updateUser_result();
48 ashish 346
      result.read(iprot_);
347
      iprot_.readMessageEnd();
348
      if (result.isSetSuccess()) {
349
        return result.success;
350
      }
553 chandransh 351
      if (result.ucex != null) {
352
        throw result.ucex;
48 ashish 353
      }
553 chandransh 354
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 355
    }
356
 
553 chandransh 357
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 358
    {
553 chandransh 359
      send_deleteUser(userId);
360
      return recv_deleteUser();
48 ashish 361
    }
362
 
553 chandransh 363
    public void send_deleteUser(long userId) throws TException
48 ashish 364
    {
553 chandransh 365
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
366
      deleteUser_args args = new deleteUser_args();
48 ashish 367
      args.userId = userId;
368
      args.write(oprot_);
369
      oprot_.writeMessageEnd();
370
      oprot_.getTransport().flush();
371
    }
372
 
553 chandransh 373
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 374
    {
375
      TMessage msg = iprot_.readMessageBegin();
376
      if (msg.type == TMessageType.EXCEPTION) {
377
        TApplicationException x = TApplicationException.read(iprot_);
378
        iprot_.readMessageEnd();
379
        throw x;
380
      }
553 chandransh 381
      deleteUser_result result = new deleteUser_result();
48 ashish 382
      result.read(iprot_);
383
      iprot_.readMessageEnd();
384
      if (result.isSetSuccess()) {
385
        return result.success;
386
      }
553 chandransh 387
      if (result.ucex != null) {
388
        throw result.ucex;
48 ashish 389
      }
553 chandransh 390
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 391
    }
392
 
553 chandransh 393
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 394
    {
553 chandransh 395
      send_getUserState(userId);
396
      return recv_getUserState();
48 ashish 397
    }
398
 
553 chandransh 399
    public void send_getUserState(long userId) throws TException
48 ashish 400
    {
553 chandransh 401
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
402
      getUserState_args args = new getUserState_args();
48 ashish 403
      args.userId = userId;
404
      args.write(oprot_);
405
      oprot_.writeMessageEnd();
406
      oprot_.getTransport().flush();
407
    }
408
 
553 chandransh 409
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 410
    {
411
      TMessage msg = iprot_.readMessageBegin();
412
      if (msg.type == TMessageType.EXCEPTION) {
413
        TApplicationException x = TApplicationException.read(iprot_);
414
        iprot_.readMessageEnd();
415
        throw x;
416
      }
553 chandransh 417
      getUserState_result result = new getUserState_result();
48 ashish 418
      result.read(iprot_);
419
      iprot_.readMessageEnd();
420
      if (result.isSetSuccess()) {
421
        return result.success;
422
      }
553 chandransh 423
      if (result.ucex != null) {
424
        throw result.ucex;
48 ashish 425
      }
553 chandransh 426
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 427
    }
428
 
553 chandransh 429
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 430
    {
553 chandransh 431
      send_authenticateUser(email, password);
123 ashish 432
      return recv_authenticateUser();
433
    }
434
 
553 chandransh 435
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 436
    {
437
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
438
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 439
      args.email = email;
123 ashish 440
      args.password = password;
441
      args.write(oprot_);
442
      oprot_.writeMessageEnd();
443
      oprot_.getTransport().flush();
444
    }
445
 
553 chandransh 446
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 447
    {
448
      TMessage msg = iprot_.readMessageBegin();
449
      if (msg.type == TMessageType.EXCEPTION) {
450
        TApplicationException x = TApplicationException.read(iprot_);
451
        iprot_.readMessageEnd();
452
        throw x;
453
      }
454
      authenticateUser_result result = new authenticateUser_result();
455
      result.read(iprot_);
456
      iprot_.readMessageEnd();
457
      if (result.isSetSuccess()) {
458
        return result.success;
459
      }
553 chandransh 460
      if (result.auex != null) {
461
        throw result.auex;
123 ashish 462
      }
463
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
464
    }
465
 
48 ashish 466
    public boolean userExists(String email) throws UserContextException, TException
467
    {
468
      send_userExists(email);
469
      return recv_userExists();
470
    }
471
 
472
    public void send_userExists(String email) throws TException
473
    {
474
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
475
      userExists_args args = new userExists_args();
476
      args.email = email;
477
      args.write(oprot_);
478
      oprot_.writeMessageEnd();
479
      oprot_.getTransport().flush();
480
    }
481
 
482
    public boolean recv_userExists() throws UserContextException, TException
483
    {
484
      TMessage msg = iprot_.readMessageBegin();
485
      if (msg.type == TMessageType.EXCEPTION) {
486
        TApplicationException x = TApplicationException.read(iprot_);
487
        iprot_.readMessageEnd();
488
        throw x;
489
      }
490
      userExists_result result = new userExists_result();
491
      result.read(iprot_);
492
      iprot_.readMessageEnd();
493
      if (result.isSetSuccess()) {
494
        return result.success;
495
      }
496
      if (result.ucx != null) {
497
        throw result.ucx;
498
      }
499
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
500
    }
501
 
571 rajveer 502
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 503
    {
571 rajveer 504
      send_addAddressForUser(userId, address, setDefault);
48 ashish 505
      return recv_addAddressForUser();
506
    }
507
 
571 rajveer 508
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 509
    {
510
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
511
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 512
      args.userId = userId;
48 ashish 513
      args.address = address;
513 rajveer 514
      args.setDefault = setDefault;
48 ashish 515
      args.write(oprot_);
516
      oprot_.writeMessageEnd();
517
      oprot_.getTransport().flush();
518
    }
519
 
571 rajveer 520
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 521
    {
522
      TMessage msg = iprot_.readMessageBegin();
523
      if (msg.type == TMessageType.EXCEPTION) {
524
        TApplicationException x = TApplicationException.read(iprot_);
525
        iprot_.readMessageEnd();
526
        throw x;
527
      }
528
      addAddressForUser_result result = new addAddressForUser_result();
529
      result.read(iprot_);
530
      iprot_.readMessageEnd();
531
      if (result.isSetSuccess()) {
532
        return result.success;
533
      }
534
      if (result.ucx != null) {
535
        throw result.ucx;
536
      }
537
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
538
    }
539
 
540
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
541
    {
542
      send_removeAddressForUser(userid, addressId);
543
      return recv_removeAddressForUser();
544
    }
545
 
546
    public void send_removeAddressForUser(long userid, long addressId) throws TException
547
    {
548
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
549
      removeAddressForUser_args args = new removeAddressForUser_args();
550
      args.userid = userid;
551
      args.addressId = addressId;
552
      args.write(oprot_);
553
      oprot_.writeMessageEnd();
554
      oprot_.getTransport().flush();
555
    }
556
 
557
    public boolean recv_removeAddressForUser() throws UserContextException, TException
558
    {
559
      TMessage msg = iprot_.readMessageBegin();
560
      if (msg.type == TMessageType.EXCEPTION) {
561
        TApplicationException x = TApplicationException.read(iprot_);
562
        iprot_.readMessageEnd();
563
        throw x;
564
      }
565
      removeAddressForUser_result result = new removeAddressForUser_result();
566
      result.read(iprot_);
567
      iprot_.readMessageEnd();
568
      if (result.isSetSuccess()) {
569
        return result.success;
570
      }
571
      if (result.ucx != null) {
572
        throw result.ucx;
573
      }
574
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
575
    }
576
 
577
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
578
    {
579
      send_setUserAsLoggedIn(userId, timestamp);
580
      return recv_setUserAsLoggedIn();
581
    }
582
 
583
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
584
    {
585
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
586
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
587
      args.userId = userId;
588
      args.timestamp = timestamp;
589
      args.write(oprot_);
590
      oprot_.writeMessageEnd();
591
      oprot_.getTransport().flush();
592
    }
593
 
594
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
595
    {
596
      TMessage msg = iprot_.readMessageBegin();
597
      if (msg.type == TMessageType.EXCEPTION) {
598
        TApplicationException x = TApplicationException.read(iprot_);
599
        iprot_.readMessageEnd();
600
        throw x;
601
      }
602
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
603
      result.read(iprot_);
604
      iprot_.readMessageEnd();
605
      if (result.isSetSuccess()) {
606
        return result.success;
607
      }
608
      if (result.ucx != null) {
609
        throw result.ucx;
610
      }
611
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
612
    }
613
 
614
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
615
    {
616
      send_setUserAsLoggedOut(userid, timestamp);
617
      return recv_setUserAsLoggedOut();
618
    }
619
 
620
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
621
    {
622
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
623
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
624
      args.userid = userid;
625
      args.timestamp = timestamp;
626
      args.write(oprot_);
627
      oprot_.writeMessageEnd();
628
      oprot_.getTransport().flush();
629
    }
630
 
631
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
632
    {
633
      TMessage msg = iprot_.readMessageBegin();
634
      if (msg.type == TMessageType.EXCEPTION) {
635
        TApplicationException x = TApplicationException.read(iprot_);
636
        iprot_.readMessageEnd();
637
        throw x;
638
      }
639
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
640
      result.read(iprot_);
641
      iprot_.readMessageEnd();
642
      if (result.isSetSuccess()) {
643
        return result.success;
644
      }
645
      if (result.ucx != null) {
646
        throw result.ucx;
647
      }
648
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
649
    }
650
 
506 rajveer 651
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
652
    {
653
      send_setDefaultAddress(userid, addressId);
654
      return recv_setDefaultAddress();
655
    }
656
 
657
    public void send_setDefaultAddress(long userid, long addressId) throws TException
658
    {
659
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
660
      setDefaultAddress_args args = new setDefaultAddress_args();
661
      args.userid = userid;
662
      args.addressId = addressId;
663
      args.write(oprot_);
664
      oprot_.writeMessageEnd();
665
      oprot_.getTransport().flush();
666
    }
667
 
668
    public boolean recv_setDefaultAddress() throws UserContextException, TException
669
    {
670
      TMessage msg = iprot_.readMessageBegin();
671
      if (msg.type == TMessageType.EXCEPTION) {
672
        TApplicationException x = TApplicationException.read(iprot_);
673
        iprot_.readMessageEnd();
674
        throw x;
675
      }
676
      setDefaultAddress_result result = new setDefaultAddress_result();
677
      result.read(iprot_);
678
      iprot_.readMessageEnd();
679
      if (result.isSetSuccess()) {
680
        return result.success;
681
      }
682
      if (result.ucx != null) {
683
        throw result.ucx;
684
      }
685
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
686
    }
687
 
593 rajveer 688
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 689
    {
593 rajveer 690
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 691
      return recv_updatePassword();
692
    }
693
 
593 rajveer 694
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 695
    {
696
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
697
      updatePassword_args args = new updatePassword_args();
698
      args.userid = userid;
593 rajveer 699
      args.oldPassword = oldPassword;
700
      args.newPassword = newPassword;
48 ashish 701
      args.write(oprot_);
702
      oprot_.writeMessageEnd();
703
      oprot_.getTransport().flush();
704
    }
705
 
706
    public boolean recv_updatePassword() throws UserContextException, TException
707
    {
708
      TMessage msg = iprot_.readMessageBegin();
709
      if (msg.type == TMessageType.EXCEPTION) {
710
        TApplicationException x = TApplicationException.read(iprot_);
711
        iprot_.readMessageEnd();
712
        throw x;
713
      }
714
      updatePassword_result result = new updatePassword_result();
715
      result.read(iprot_);
716
      iprot_.readMessageEnd();
717
      if (result.isSetSuccess()) {
718
        return result.success;
719
      }
720
      if (result.ucx != null) {
721
        throw result.ucx;
722
      }
723
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
724
    }
725
 
582 rajveer 726
    public boolean forgotPassword(String email) throws UserContextException, TException
727
    {
728
      send_forgotPassword(email);
729
      return recv_forgotPassword();
730
    }
731
 
732
    public void send_forgotPassword(String email) throws TException
733
    {
734
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
735
      forgotPassword_args args = new forgotPassword_args();
736
      args.email = email;
737
      args.write(oprot_);
738
      oprot_.writeMessageEnd();
739
      oprot_.getTransport().flush();
740
    }
741
 
742
    public boolean recv_forgotPassword() throws UserContextException, TException
743
    {
744
      TMessage msg = iprot_.readMessageBegin();
745
      if (msg.type == TMessageType.EXCEPTION) {
746
        TApplicationException x = TApplicationException.read(iprot_);
747
        iprot_.readMessageEnd();
748
        throw x;
749
      }
750
      forgotPassword_result result = new forgotPassword_result();
751
      result.read(iprot_);
752
      iprot_.readMessageEnd();
753
      if (result.isSetSuccess()) {
754
        return result.success;
755
      }
756
      if (result.ucx != null) {
757
        throw result.ucx;
758
      }
759
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
760
    }
761
 
593 rajveer 762
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
763
    {
764
      send_getAllAddressesForUser(userId);
765
      return recv_getAllAddressesForUser();
766
    }
767
 
768
    public void send_getAllAddressesForUser(long userId) throws TException
769
    {
770
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
771
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
772
      args.userId = userId;
773
      args.write(oprot_);
774
      oprot_.writeMessageEnd();
775
      oprot_.getTransport().flush();
776
    }
777
 
778
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
779
    {
780
      TMessage msg = iprot_.readMessageBegin();
781
      if (msg.type == TMessageType.EXCEPTION) {
782
        TApplicationException x = TApplicationException.read(iprot_);
783
        iprot_.readMessageEnd();
784
        throw x;
785
      }
786
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
787
      result.read(iprot_);
788
      iprot_.readMessageEnd();
789
      if (result.isSetSuccess()) {
790
        return result.success;
791
      }
792
      if (result.ucx != null) {
793
        throw result.ucx;
794
      }
795
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
796
    }
797
 
798
    public long getDefaultAddressId(long userId) throws UserContextException, TException
799
    {
800
      send_getDefaultAddressId(userId);
801
      return recv_getDefaultAddressId();
802
    }
803
 
804
    public void send_getDefaultAddressId(long userId) throws TException
805
    {
806
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
807
      getDefaultAddressId_args args = new getDefaultAddressId_args();
808
      args.userId = userId;
809
      args.write(oprot_);
810
      oprot_.writeMessageEnd();
811
      oprot_.getTransport().flush();
812
    }
813
 
814
    public long recv_getDefaultAddressId() throws UserContextException, TException
815
    {
816
      TMessage msg = iprot_.readMessageBegin();
817
      if (msg.type == TMessageType.EXCEPTION) {
818
        TApplicationException x = TApplicationException.read(iprot_);
819
        iprot_.readMessageEnd();
820
        throw x;
821
      }
822
      getDefaultAddressId_result result = new getDefaultAddressId_result();
823
      result.read(iprot_);
824
      iprot_.readMessageEnd();
825
      if (result.isSetSuccess()) {
826
        return result.success;
827
      }
828
      if (result.ucx != null) {
829
        throw result.ucx;
830
      }
831
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
832
    }
833
 
553 chandransh 834
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 835
    {
553 chandransh 836
      send_createCart(userId);
837
      return recv_createCart();
48 ashish 838
    }
839
 
553 chandransh 840
    public void send_createCart(long userId) throws TException
48 ashish 841
    {
553 chandransh 842
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
843
      createCart_args args = new createCart_args();
844
      args.userId = userId;
48 ashish 845
      args.write(oprot_);
846
      oprot_.writeMessageEnd();
847
      oprot_.getTransport().flush();
848
    }
849
 
553 chandransh 850
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 851
    {
852
      TMessage msg = iprot_.readMessageBegin();
853
      if (msg.type == TMessageType.EXCEPTION) {
854
        TApplicationException x = TApplicationException.read(iprot_);
855
        iprot_.readMessageEnd();
856
        throw x;
857
      }
553 chandransh 858
      createCart_result result = new createCart_result();
48 ashish 859
      result.read(iprot_);
860
      iprot_.readMessageEnd();
861
      if (result.isSetSuccess()) {
862
        return result.success;
863
      }
553 chandransh 864
      if (result.scx != null) {
865
        throw result.scx;
48 ashish 866
      }
553 chandransh 867
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 868
    }
869
 
553 chandransh 870
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 871
    {
553 chandransh 872
      send_getCurrentCart(userId);
873
      return recv_getCurrentCart();
48 ashish 874
    }
875
 
553 chandransh 876
    public void send_getCurrentCart(long userId) throws TException
48 ashish 877
    {
553 chandransh 878
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
879
      getCurrentCart_args args = new getCurrentCart_args();
880
      args.userId = userId;
48 ashish 881
      args.write(oprot_);
882
      oprot_.writeMessageEnd();
883
      oprot_.getTransport().flush();
884
    }
885
 
553 chandransh 886
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 887
    {
888
      TMessage msg = iprot_.readMessageBegin();
889
      if (msg.type == TMessageType.EXCEPTION) {
890
        TApplicationException x = TApplicationException.read(iprot_);
891
        iprot_.readMessageEnd();
892
        throw x;
893
      }
553 chandransh 894
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 895
      result.read(iprot_);
896
      iprot_.readMessageEnd();
897
      if (result.isSetSuccess()) {
898
        return result.success;
899
      }
553 chandransh 900
      if (result.scx != null) {
901
        throw result.scx;
48 ashish 902
      }
553 chandransh 903
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 904
    }
905
 
553 chandransh 906
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 907
    {
553 chandransh 908
      send_getCart(cartId);
909
      return recv_getCart();
48 ashish 910
    }
911
 
553 chandransh 912
    public void send_getCart(long cartId) throws TException
48 ashish 913
    {
553 chandransh 914
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
915
      getCart_args args = new getCart_args();
916
      args.cartId = cartId;
48 ashish 917
      args.write(oprot_);
918
      oprot_.writeMessageEnd();
919
      oprot_.getTransport().flush();
920
    }
921
 
553 chandransh 922
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 923
    {
924
      TMessage msg = iprot_.readMessageBegin();
925
      if (msg.type == TMessageType.EXCEPTION) {
926
        TApplicationException x = TApplicationException.read(iprot_);
927
        iprot_.readMessageEnd();
928
        throw x;
929
      }
553 chandransh 930
      getCart_result result = new getCart_result();
48 ashish 931
      result.read(iprot_);
932
      iprot_.readMessageEnd();
933
      if (result.isSetSuccess()) {
934
        return result.success;
935
      }
553 chandransh 936
      if (result.scx != null) {
937
        throw result.scx;
48 ashish 938
      }
553 chandransh 939
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 940
    }
941
 
553 chandransh 942
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 943
    {
553 chandransh 944
      send_getCartsForUser(userId, status);
945
      return recv_getCartsForUser();
48 ashish 946
    }
947
 
553 chandransh 948
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 949
    {
553 chandransh 950
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
951
      getCartsForUser_args args = new getCartsForUser_args();
952
      args.userId = userId;
953
      args.status = status;
48 ashish 954
      args.write(oprot_);
955
      oprot_.writeMessageEnd();
956
      oprot_.getTransport().flush();
957
    }
958
 
553 chandransh 959
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 960
    {
961
      TMessage msg = iprot_.readMessageBegin();
962
      if (msg.type == TMessageType.EXCEPTION) {
963
        TApplicationException x = TApplicationException.read(iprot_);
964
        iprot_.readMessageEnd();
965
        throw x;
966
      }
553 chandransh 967
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 968
      result.read(iprot_);
969
      iprot_.readMessageEnd();
970
      if (result.isSetSuccess()) {
971
        return result.success;
972
      }
553 chandransh 973
      if (result.scx != null) {
974
        throw result.scx;
48 ashish 975
      }
553 chandransh 976
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 977
    }
978
 
553 chandransh 979
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 980
    {
553 chandransh 981
      send_getCartsByStatus(status);
982
      return recv_getCartsByStatus();
48 ashish 983
    }
984
 
553 chandransh 985
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 986
    {
553 chandransh 987
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
988
      getCartsByStatus_args args = new getCartsByStatus_args();
989
      args.status = status;
48 ashish 990
      args.write(oprot_);
991
      oprot_.writeMessageEnd();
992
      oprot_.getTransport().flush();
993
    }
994
 
553 chandransh 995
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 996
    {
997
      TMessage msg = iprot_.readMessageBegin();
998
      if (msg.type == TMessageType.EXCEPTION) {
999
        TApplicationException x = TApplicationException.read(iprot_);
1000
        iprot_.readMessageEnd();
1001
        throw x;
1002
      }
553 chandransh 1003
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 1004
      result.read(iprot_);
1005
      iprot_.readMessageEnd();
1006
      if (result.isSetSuccess()) {
1007
        return result.success;
1008
      }
553 chandransh 1009
      if (result.scx != null) {
1010
        throw result.scx;
48 ashish 1011
      }
553 chandransh 1012
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 1013
    }
1014
 
553 chandransh 1015
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 1016
    {
553 chandransh 1017
      send_getCartsByTime(from_time, to_time, status);
1018
      return recv_getCartsByTime();
48 ashish 1019
    }
1020
 
553 chandransh 1021
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 1022
    {
553 chandransh 1023
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
1024
      getCartsByTime_args args = new getCartsByTime_args();
1025
      args.from_time = from_time;
1026
      args.to_time = to_time;
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_getCartsByTime() 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
      getCartsByTime_result result = new getCartsByTime_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, "getCartsByTime failed: unknown result");
48 ashish 1051
    }
1052
 
553 chandransh 1053
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 1054
    {
553 chandransh 1055
      send_changeCartStatus(cartId, status);
1056
      recv_changeCartStatus();
130 ashish 1057
    }
1058
 
553 chandransh 1059
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1060
    {
553 chandransh 1061
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1062
      changeCartStatus_args args = new changeCartStatus_args();
1063
      args.cartId = cartId;
1064
      args.status = status;
130 ashish 1065
      args.write(oprot_);
1066
      oprot_.writeMessageEnd();
1067
      oprot_.getTransport().flush();
1068
    }
1069
 
553 chandransh 1070
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 1071
    {
1072
      TMessage msg = iprot_.readMessageBegin();
1073
      if (msg.type == TMessageType.EXCEPTION) {
1074
        TApplicationException x = TApplicationException.read(iprot_);
1075
        iprot_.readMessageEnd();
1076
        throw x;
1077
      }
553 chandransh 1078
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1079
      result.read(iprot_);
1080
      iprot_.readMessageEnd();
553 chandransh 1081
      if (result.scx != null) {
1082
        throw result.scx;
1083
      }
1084
      return;
1085
    }
1086
 
1087
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1088
    {
1089
      send_addItemToCart(cartId, itemId, quantity);
1090
      recv_addItemToCart();
1091
    }
1092
 
1093
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1094
    {
1095
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1096
      addItemToCart_args args = new addItemToCart_args();
1097
      args.cartId = cartId;
1098
      args.itemId = itemId;
1099
      args.quantity = quantity;
1100
      args.write(oprot_);
1101
      oprot_.writeMessageEnd();
1102
      oprot_.getTransport().flush();
1103
    }
1104
 
1105
    public void recv_addItemToCart() throws ShoppingCartException, TException
1106
    {
1107
      TMessage msg = iprot_.readMessageBegin();
1108
      if (msg.type == TMessageType.EXCEPTION) {
1109
        TApplicationException x = TApplicationException.read(iprot_);
1110
        iprot_.readMessageEnd();
1111
        throw x;
1112
      }
1113
      addItemToCart_result result = new addItemToCart_result();
1114
      result.read(iprot_);
1115
      iprot_.readMessageEnd();
1116
      if (result.scx != null) {
1117
        throw result.scx;
1118
      }
1119
      return;
1120
    }
1121
 
1122
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1123
    {
1124
      send_deleteItemFromCart(cartId, itemId);
1125
      recv_deleteItemFromCart();
1126
    }
1127
 
1128
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1129
    {
1130
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1131
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1132
      args.cartId = cartId;
1133
      args.itemId = itemId;
1134
      args.write(oprot_);
1135
      oprot_.writeMessageEnd();
1136
      oprot_.getTransport().flush();
1137
    }
1138
 
1139
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1140
    {
1141
      TMessage msg = iprot_.readMessageBegin();
1142
      if (msg.type == TMessageType.EXCEPTION) {
1143
        TApplicationException x = TApplicationException.read(iprot_);
1144
        iprot_.readMessageEnd();
1145
        throw x;
1146
      }
1147
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1148
      result.read(iprot_);
1149
      iprot_.readMessageEnd();
1150
      if (result.scx != null) {
1151
        throw result.scx;
1152
      }
1153
      return;
1154
    }
1155
 
1156
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1157
    {
1158
      send_changeQuantity(cartId, itemId, quantity);
1159
      recv_changeQuantity();
1160
    }
1161
 
1162
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1163
    {
1164
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1165
      changeQuantity_args args = new changeQuantity_args();
1166
      args.cartId = cartId;
1167
      args.itemId = itemId;
1168
      args.quantity = quantity;
1169
      args.write(oprot_);
1170
      oprot_.writeMessageEnd();
1171
      oprot_.getTransport().flush();
1172
    }
1173
 
1174
    public void recv_changeQuantity() throws ShoppingCartException, TException
1175
    {
1176
      TMessage msg = iprot_.readMessageBegin();
1177
      if (msg.type == TMessageType.EXCEPTION) {
1178
        TApplicationException x = TApplicationException.read(iprot_);
1179
        iprot_.readMessageEnd();
1180
        throw x;
1181
      }
1182
      changeQuantity_result result = new changeQuantity_result();
1183
      result.read(iprot_);
1184
      iprot_.readMessageEnd();
1185
      if (result.scx != null) {
1186
        throw result.scx;
1187
      }
1188
      return;
1189
    }
1190
 
1191
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1192
    {
1193
      send_changeItemStatus(cartId, itemId, status);
1194
      recv_changeItemStatus();
1195
    }
1196
 
1197
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1198
    {
1199
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1200
      changeItemStatus_args args = new changeItemStatus_args();
1201
      args.cartId = cartId;
1202
      args.itemId = itemId;
1203
      args.status = status;
1204
      args.write(oprot_);
1205
      oprot_.writeMessageEnd();
1206
      oprot_.getTransport().flush();
1207
    }
1208
 
1209
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1210
    {
1211
      TMessage msg = iprot_.readMessageBegin();
1212
      if (msg.type == TMessageType.EXCEPTION) {
1213
        TApplicationException x = TApplicationException.read(iprot_);
1214
        iprot_.readMessageEnd();
1215
        throw x;
1216
      }
1217
      changeItemStatus_result result = new changeItemStatus_result();
1218
      result.read(iprot_);
1219
      iprot_.readMessageEnd();
1220
      if (result.scx != null) {
1221
        throw result.scx;
1222
      }
1223
      return;
1224
    }
1225
 
578 chandransh 1226
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1227
    {
1228
      send_addAddressToCart(cartId, addressId);
1229
      recv_addAddressToCart();
1230
    }
1231
 
1232
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1233
    {
1234
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1235
      addAddressToCart_args args = new addAddressToCart_args();
1236
      args.cartId = cartId;
1237
      args.addressId = addressId;
1238
      args.write(oprot_);
1239
      oprot_.writeMessageEnd();
1240
      oprot_.getTransport().flush();
1241
    }
1242
 
578 chandransh 1243
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1244
    {
1245
      TMessage msg = iprot_.readMessageBegin();
1246
      if (msg.type == TMessageType.EXCEPTION) {
1247
        TApplicationException x = TApplicationException.read(iprot_);
1248
        iprot_.readMessageEnd();
1249
        throw x;
1250
      }
1251
      addAddressToCart_result result = new addAddressToCart_result();
1252
      result.read(iprot_);
1253
      iprot_.readMessageEnd();
578 chandransh 1254
      if (result.scx != null) {
1255
        throw result.scx;
1256
      }
553 chandransh 1257
      return;
1258
    }
1259
 
688 chandransh 1260
    public long createOrders(long cartId) throws ShoppingCartException, TException
553 chandransh 1261
    {
688 chandransh 1262
      send_createOrders(cartId);
1263
      return recv_createOrders();
553 chandransh 1264
    }
1265
 
688 chandransh 1266
    public void send_createOrders(long cartId) throws TException
553 chandransh 1267
    {
688 chandransh 1268
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1269
      createOrders_args args = new createOrders_args();
553 chandransh 1270
      args.cartId = cartId;
1271
      args.write(oprot_);
1272
      oprot_.writeMessageEnd();
1273
      oprot_.getTransport().flush();
1274
    }
1275
 
688 chandransh 1276
    public long recv_createOrders() throws ShoppingCartException, TException
553 chandransh 1277
    {
1278
      TMessage msg = iprot_.readMessageBegin();
1279
      if (msg.type == TMessageType.EXCEPTION) {
1280
        TApplicationException x = TApplicationException.read(iprot_);
1281
        iprot_.readMessageEnd();
1282
        throw x;
1283
      }
688 chandransh 1284
      createOrders_result result = new createOrders_result();
553 chandransh 1285
      result.read(iprot_);
1286
      iprot_.readMessageEnd();
130 ashish 1287
      if (result.isSetSuccess()) {
1288
        return result.success;
1289
      }
553 chandransh 1290
      if (result.scx != null) {
1291
        throw result.scx;
130 ashish 1292
      }
688 chandransh 1293
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
130 ashish 1294
    }
1295
 
578 chandransh 1296
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1297
    {
553 chandransh 1298
      send_validateCart(cartId);
1299
      return recv_validateCart();
130 ashish 1300
    }
1301
 
553 chandransh 1302
    public void send_validateCart(long cartId) throws TException
130 ashish 1303
    {
553 chandransh 1304
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1305
      validateCart_args args = new validateCart_args();
1306
      args.cartId = cartId;
130 ashish 1307
      args.write(oprot_);
1308
      oprot_.writeMessageEnd();
1309
      oprot_.getTransport().flush();
1310
    }
1311
 
578 chandransh 1312
    public boolean recv_validateCart() throws ShoppingCartException, TException
130 ashish 1313
    {
1314
      TMessage msg = iprot_.readMessageBegin();
1315
      if (msg.type == TMessageType.EXCEPTION) {
1316
        TApplicationException x = TApplicationException.read(iprot_);
1317
        iprot_.readMessageEnd();
1318
        throw x;
1319
      }
553 chandransh 1320
      validateCart_result result = new validateCart_result();
130 ashish 1321
      result.read(iprot_);
1322
      iprot_.readMessageEnd();
1323
      if (result.isSetSuccess()) {
1324
        return result.success;
1325
      }
578 chandransh 1326
      if (result.scex != null) {
1327
        throw result.scex;
1328
      }
553 chandransh 1329
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1330
    }
1331
 
688 chandransh 1332
    public void mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1333
    {
688 chandransh 1334
      send_mergeCart(fromCartId, toCartId);
1335
      recv_mergeCart();
578 chandransh 1336
    }
1337
 
688 chandransh 1338
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1339
    {
688 chandransh 1340
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1341
      mergeCart_args args = new mergeCart_args();
1342
      args.fromCartId = fromCartId;
1343
      args.toCartId = toCartId;
1344
      args.write(oprot_);
1345
      oprot_.writeMessageEnd();
1346
      oprot_.getTransport().flush();
1347
    }
1348
 
1349
    public void recv_mergeCart() throws TException
1350
    {
1351
      TMessage msg = iprot_.readMessageBegin();
1352
      if (msg.type == TMessageType.EXCEPTION) {
1353
        TApplicationException x = TApplicationException.read(iprot_);
1354
        iprot_.readMessageEnd();
1355
        throw x;
1356
      }
1357
      mergeCart_result result = new mergeCart_result();
1358
      result.read(iprot_);
1359
      iprot_.readMessageEnd();
1360
      return;
1361
    }
1362
 
1363
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1364
    {
1365
      send_checkOut(cartId);
1366
      return recv_checkOut();
1367
    }
1368
 
1369
    public void send_checkOut(long cartId) throws TException
1370
    {
1371
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1372
      checkOut_args args = new checkOut_args();
578 chandransh 1373
      args.cartId = cartId;
1374
      args.write(oprot_);
1375
      oprot_.writeMessageEnd();
1376
      oprot_.getTransport().flush();
1377
    }
1378
 
688 chandransh 1379
    public boolean recv_checkOut() throws ShoppingCartException, TException
578 chandransh 1380
    {
1381
      TMessage msg = iprot_.readMessageBegin();
1382
      if (msg.type == TMessageType.EXCEPTION) {
1383
        TApplicationException x = TApplicationException.read(iprot_);
1384
        iprot_.readMessageEnd();
1385
        throw x;
1386
      }
688 chandransh 1387
      checkOut_result result = new checkOut_result();
578 chandransh 1388
      result.read(iprot_);
1389
      iprot_.readMessageEnd();
1390
      if (result.isSetSuccess()) {
1391
        return result.success;
1392
      }
1393
      if (result.scex != null) {
1394
        throw result.scex;
1395
      }
688 chandransh 1396
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
578 chandransh 1397
    }
1398
 
708 rajveer 1399
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException
553 chandransh 1400
    {
688 chandransh 1401
      send_resetCart(cartId, items);
1402
      return recv_resetCart();
553 chandransh 1403
    }
1404
 
708 rajveer 1405
    public void send_resetCart(long cartId, Map<Long,Double> items) throws TException
553 chandransh 1406
    {
688 chandransh 1407
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1408
      resetCart_args args = new resetCart_args();
1409
      args.cartId = cartId;
1410
      args.items = items;
553 chandransh 1411
      args.write(oprot_);
1412
      oprot_.writeMessageEnd();
1413
      oprot_.getTransport().flush();
1414
    }
1415
 
688 chandransh 1416
    public boolean recv_resetCart() throws ShoppingCartException, TException
553 chandransh 1417
    {
1418
      TMessage msg = iprot_.readMessageBegin();
1419
      if (msg.type == TMessageType.EXCEPTION) {
1420
        TApplicationException x = TApplicationException.read(iprot_);
1421
        iprot_.readMessageEnd();
1422
        throw x;
130 ashish 1423
      }
688 chandransh 1424
      resetCart_result result = new resetCart_result();
553 chandransh 1425
      result.read(iprot_);
1426
      iprot_.readMessageEnd();
688 chandransh 1427
      if (result.isSetSuccess()) {
1428
        return result.success;
1429
      }
1430
      if (result.scex != null) {
1431
        throw result.scex;
1432
      }
1433
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
130 ashish 1434
    }
1435
 
771 rajveer 1436
    public Widget getMyResearch(long userId) throws WidgetException, TException
553 chandransh 1437
    {
771 rajveer 1438
      send_getMyResearch(userId);
553 chandransh 1439
      return recv_getMyResearch();
1440
    }
1441
 
771 rajveer 1442
    public void send_getMyResearch(long userId) throws TException
553 chandransh 1443
    {
1444
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1445
      getMyResearch_args args = new getMyResearch_args();
771 rajveer 1446
      args.userId = userId;
553 chandransh 1447
      args.write(oprot_);
1448
      oprot_.writeMessageEnd();
1449
      oprot_.getTransport().flush();
1450
    }
1451
 
1452
    public Widget recv_getMyResearch() throws WidgetException, TException
1453
    {
1454
      TMessage msg = iprot_.readMessageBegin();
1455
      if (msg.type == TMessageType.EXCEPTION) {
1456
        TApplicationException x = TApplicationException.read(iprot_);
1457
        iprot_.readMessageEnd();
1458
        throw x;
1459
      }
1460
      getMyResearch_result result = new getMyResearch_result();
1461
      result.read(iprot_);
1462
      iprot_.readMessageEnd();
1463
      if (result.isSetSuccess()) {
1464
        return result.success;
1465
      }
1466
      if (result.scx != null) {
1467
        throw result.scx;
1468
      }
1469
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1470
    }
1471
 
771 rajveer 1472
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1473
    {
771 rajveer 1474
      send_updateMyResearch(userId, itemId);
553 chandransh 1475
      return recv_updateMyResearch();
1476
    }
1477
 
771 rajveer 1478
    public void send_updateMyResearch(long userId, long itemId) throws TException
553 chandransh 1479
    {
1480
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1481
      updateMyResearch_args args = new updateMyResearch_args();
771 rajveer 1482
      args.userId = userId;
1483
      args.itemId = itemId;
553 chandransh 1484
      args.write(oprot_);
1485
      oprot_.writeMessageEnd();
1486
      oprot_.getTransport().flush();
1487
    }
1488
 
1489
    public boolean recv_updateMyResearch() throws WidgetException, TException
1490
    {
1491
      TMessage msg = iprot_.readMessageBegin();
1492
      if (msg.type == TMessageType.EXCEPTION) {
1493
        TApplicationException x = TApplicationException.read(iprot_);
1494
        iprot_.readMessageEnd();
1495
        throw x;
1496
      }
1497
      updateMyResearch_result result = new updateMyResearch_result();
1498
      result.read(iprot_);
1499
      iprot_.readMessageEnd();
1500
      if (result.isSetSuccess()) {
1501
        return result.success;
1502
      }
1503
      if (result.scx != null) {
1504
        throw result.scx;
1505
      }
1506
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1507
    }
1508
 
771 rajveer 1509
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1510
    {
771 rajveer 1511
      send_deleteItemFromMyResearch(userId, itemId);
553 chandransh 1512
      recv_deleteItemFromMyResearch();
1513
    }
1514
 
771 rajveer 1515
    public void send_deleteItemFromMyResearch(long userId, long itemId) throws TException
553 chandransh 1516
    {
1517
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1518
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
771 rajveer 1519
      args.userId = userId;
1520
      args.itemId = itemId;
553 chandransh 1521
      args.write(oprot_);
1522
      oprot_.writeMessageEnd();
1523
      oprot_.getTransport().flush();
1524
    }
1525
 
1526
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1527
    {
1528
      TMessage msg = iprot_.readMessageBegin();
1529
      if (msg.type == TMessageType.EXCEPTION) {
1530
        TApplicationException x = TApplicationException.read(iprot_);
1531
        iprot_.readMessageEnd();
1532
        throw x;
1533
      }
1534
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1535
      result.read(iprot_);
1536
      iprot_.readMessageEnd();
1537
      if (result.scx != null) {
1538
        throw result.scx;
1539
      }
1540
      return;
1541
    }
1542
 
771 rajveer 1543
    public void updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1544
    {
771 rajveer 1545
      send_updateBrowseHistory(userId, itemId);
1546
      recv_updateBrowseHistory();
553 chandransh 1547
    }
1548
 
771 rajveer 1549
    public void send_updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1550
    {
771 rajveer 1551
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1552
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1553
      args.userId = userId;
1554
      args.itemId = itemId;
553 chandransh 1555
      args.write(oprot_);
1556
      oprot_.writeMessageEnd();
1557
      oprot_.getTransport().flush();
1558
    }
1559
 
771 rajveer 1560
    public void recv_updateBrowseHistory() throws TException
553 chandransh 1561
    {
1562
      TMessage msg = iprot_.readMessageBegin();
1563
      if (msg.type == TMessageType.EXCEPTION) {
1564
        TApplicationException x = TApplicationException.read(iprot_);
1565
        iprot_.readMessageEnd();
1566
        throw x;
1567
      }
771 rajveer 1568
      updateBrowseHistory_result result = new updateBrowseHistory_result();
553 chandransh 1569
      result.read(iprot_);
1570
      iprot_.readMessageEnd();
1571
      return;
1572
    }
1573
 
771 rajveer 1574
    public Widget getBrowseHistory(long userId) throws WidgetException, TException
553 chandransh 1575
    {
771 rajveer 1576
      send_getBrowseHistory(userId);
1577
      return recv_getBrowseHistory();
553 chandransh 1578
    }
1579
 
771 rajveer 1580
    public void send_getBrowseHistory(long userId) throws TException
553 chandransh 1581
    {
771 rajveer 1582
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1583
      getBrowseHistory_args args = new getBrowseHistory_args();
1584
      args.userId = userId;
553 chandransh 1585
      args.write(oprot_);
1586
      oprot_.writeMessageEnd();
1587
      oprot_.getTransport().flush();
1588
    }
1589
 
771 rajveer 1590
    public Widget recv_getBrowseHistory() throws WidgetException, TException
553 chandransh 1591
    {
1592
      TMessage msg = iprot_.readMessageBegin();
1593
      if (msg.type == TMessageType.EXCEPTION) {
1594
        TApplicationException x = TApplicationException.read(iprot_);
1595
        iprot_.readMessageEnd();
1596
        throw x;
1597
      }
771 rajveer 1598
      getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 1599
      result.read(iprot_);
1600
      iprot_.readMessageEnd();
1601
      if (result.isSetSuccess()) {
1602
        return result.success;
1603
      }
1604
      if (result.scx != null) {
1605
        throw result.scx;
1606
      }
771 rajveer 1607
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
553 chandransh 1608
    }
1609
 
771 rajveer 1610
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1611
    {
771 rajveer 1612
      send_mergeBrowseHistory(fromUserId, toUserId);
1613
      recv_mergeBrowseHistory();
553 chandransh 1614
    }
1615
 
771 rajveer 1616
    public void send_mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1617
    {
771 rajveer 1618
      oprot_.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.CALL, seqid_));
1619
      mergeBrowseHistory_args args = new mergeBrowseHistory_args();
1620
      args.fromUserId = fromUserId;
1621
      args.toUserId = toUserId;
553 chandransh 1622
      args.write(oprot_);
1623
      oprot_.writeMessageEnd();
1624
      oprot_.getTransport().flush();
1625
    }
1626
 
771 rajveer 1627
    public void recv_mergeBrowseHistory() throws TException
553 chandransh 1628
    {
1629
      TMessage msg = iprot_.readMessageBegin();
1630
      if (msg.type == TMessageType.EXCEPTION) {
1631
        TApplicationException x = TApplicationException.read(iprot_);
1632
        iprot_.readMessageEnd();
1633
        throw x;
1634
      }
771 rajveer 1635
      mergeBrowseHistory_result result = new mergeBrowseHistory_result();
553 chandransh 1636
      result.read(iprot_);
1637
      iprot_.readMessageEnd();
1638
      return;
1639
    }
1640
 
48 ashish 1641
  }
1642
  public static class Processor implements TProcessor {
1643
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1644
    public Processor(Iface iface)
1645
    {
1646
      iface_ = iface;
764 rajveer 1647
      processMap_.put("closeSession", new closeSession());
553 chandransh 1648
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1649
      processMap_.put("getUserById", new getUserById());
1650
      processMap_.put("createUser", new createUser());
1651
      processMap_.put("updateUser", new updateUser());
1652
      processMap_.put("deleteUser", new deleteUser());
1653
      processMap_.put("getUserState", new getUserState());
123 ashish 1654
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1655
      processMap_.put("userExists", new userExists());
1656
      processMap_.put("addAddressForUser", new addAddressForUser());
1657
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1658
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1659
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1660
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1661
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1662
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1663
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1664
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
553 chandransh 1665
      processMap_.put("createCart", new createCart());
1666
      processMap_.put("getCurrentCart", new getCurrentCart());
1667
      processMap_.put("getCart", new getCart());
1668
      processMap_.put("getCartsForUser", new getCartsForUser());
1669
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1670
      processMap_.put("getCartsByTime", new getCartsByTime());
1671
      processMap_.put("changeCartStatus", new changeCartStatus());
1672
      processMap_.put("addItemToCart", new addItemToCart());
1673
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1674
      processMap_.put("changeQuantity", new changeQuantity());
1675
      processMap_.put("changeItemStatus", new changeItemStatus());
1676
      processMap_.put("addAddressToCart", new addAddressToCart());
688 chandransh 1677
      processMap_.put("createOrders", new createOrders());
553 chandransh 1678
      processMap_.put("validateCart", new validateCart());
1679
      processMap_.put("mergeCart", new mergeCart());
688 chandransh 1680
      processMap_.put("checkOut", new checkOut());
1681
      processMap_.put("resetCart", new resetCart());
553 chandransh 1682
      processMap_.put("getMyResearch", new getMyResearch());
1683
      processMap_.put("updateMyResearch", new updateMyResearch());
1684
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1685
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1686
      processMap_.put("getBrowseHistory", new getBrowseHistory());
771 rajveer 1687
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
48 ashish 1688
    }
1689
 
1690
    protected static interface ProcessFunction {
1691
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1692
    }
1693
 
1694
    private Iface iface_;
1695
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1696
 
1697
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1698
    {
1699
      TMessage msg = iprot.readMessageBegin();
1700
      ProcessFunction fn = processMap_.get(msg.name);
1701
      if (fn == null) {
1702
        TProtocolUtil.skip(iprot, TType.STRUCT);
1703
        iprot.readMessageEnd();
1704
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1705
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1706
        x.write(oprot);
1707
        oprot.writeMessageEnd();
1708
        oprot.getTransport().flush();
1709
        return true;
1710
      }
1711
      fn.process(msg.seqid, iprot, oprot);
1712
      return true;
1713
    }
1714
 
764 rajveer 1715
    private class closeSession implements ProcessFunction {
1716
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1717
      {
1718
        closeSession_args args = new closeSession_args();
1719
        args.read(iprot);
1720
        iprot.readMessageEnd();
1721
        closeSession_result result = new closeSession_result();
1722
        iface_.closeSession();
1723
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1724
        result.write(oprot);
1725
        oprot.writeMessageEnd();
1726
        oprot.getTransport().flush();
1727
      }
1728
 
1729
    }
1730
 
553 chandransh 1731
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1732
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1733
      {
553 chandransh 1734
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1735
        args.read(iprot);
1736
        iprot.readMessageEnd();
553 chandransh 1737
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1738
        try {
553 chandransh 1739
          result.success = iface_.createAnonymousUser(args.jsessionId);
1740
        } catch (UserContextException ucex) {
1741
          result.ucex = ucex;
48 ashish 1742
        } catch (Throwable th) {
553 chandransh 1743
          LOGGER.error("Internal error processing createAnonymousUser", th);
1744
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1745
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1746
          x.write(oprot);
1747
          oprot.writeMessageEnd();
1748
          oprot.getTransport().flush();
1749
          return;
1750
        }
553 chandransh 1751
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1752
        result.write(oprot);
1753
        oprot.writeMessageEnd();
1754
        oprot.getTransport().flush();
1755
      }
1756
 
1757
    }
1758
 
553 chandransh 1759
    private class getUserById implements ProcessFunction {
48 ashish 1760
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1761
      {
553 chandransh 1762
        getUserById_args args = new getUserById_args();
48 ashish 1763
        args.read(iprot);
1764
        iprot.readMessageEnd();
553 chandransh 1765
        getUserById_result result = new getUserById_result();
48 ashish 1766
        try {
553 chandransh 1767
          result.success = iface_.getUserById(args.userId);
1768
        } catch (UserContextException ucex) {
1769
          result.ucex = ucex;
48 ashish 1770
        } catch (Throwable th) {
553 chandransh 1771
          LOGGER.error("Internal error processing getUserById", th);
1772
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1773
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1774
          x.write(oprot);
1775
          oprot.writeMessageEnd();
1776
          oprot.getTransport().flush();
1777
          return;
1778
        }
553 chandransh 1779
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1780
        result.write(oprot);
1781
        oprot.writeMessageEnd();
1782
        oprot.getTransport().flush();
1783
      }
1784
 
1785
    }
1786
 
553 chandransh 1787
    private class createUser implements ProcessFunction {
48 ashish 1788
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1789
      {
553 chandransh 1790
        createUser_args args = new createUser_args();
48 ashish 1791
        args.read(iprot);
1792
        iprot.readMessageEnd();
553 chandransh 1793
        createUser_result result = new createUser_result();
48 ashish 1794
        try {
553 chandransh 1795
          result.success = iface_.createUser(args.user);
1796
        } catch (UserContextException ucex) {
1797
          result.ucex = ucex;
48 ashish 1798
        } catch (Throwable th) {
553 chandransh 1799
          LOGGER.error("Internal error processing createUser", th);
1800
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
1801
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 1802
          x.write(oprot);
1803
          oprot.writeMessageEnd();
1804
          oprot.getTransport().flush();
1805
          return;
1806
        }
553 chandransh 1807
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 1808
        result.write(oprot);
1809
        oprot.writeMessageEnd();
1810
        oprot.getTransport().flush();
1811
      }
1812
 
1813
    }
1814
 
553 chandransh 1815
    private class updateUser implements ProcessFunction {
48 ashish 1816
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1817
      {
553 chandransh 1818
        updateUser_args args = new updateUser_args();
48 ashish 1819
        args.read(iprot);
1820
        iprot.readMessageEnd();
553 chandransh 1821
        updateUser_result result = new updateUser_result();
48 ashish 1822
        try {
553 chandransh 1823
          result.success = iface_.updateUser(args.user);
1824
        } catch (UserContextException ucex) {
1825
          result.ucex = ucex;
48 ashish 1826
        } catch (Throwable th) {
553 chandransh 1827
          LOGGER.error("Internal error processing updateUser", th);
1828
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
1829
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 1830
          x.write(oprot);
1831
          oprot.writeMessageEnd();
1832
          oprot.getTransport().flush();
1833
          return;
1834
        }
553 chandransh 1835
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 1836
        result.write(oprot);
1837
        oprot.writeMessageEnd();
1838
        oprot.getTransport().flush();
1839
      }
1840
 
1841
    }
1842
 
553 chandransh 1843
    private class deleteUser implements ProcessFunction {
48 ashish 1844
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1845
      {
553 chandransh 1846
        deleteUser_args args = new deleteUser_args();
48 ashish 1847
        args.read(iprot);
1848
        iprot.readMessageEnd();
553 chandransh 1849
        deleteUser_result result = new deleteUser_result();
48 ashish 1850
        try {
553 chandransh 1851
          result.success = iface_.deleteUser(args.userId);
1852
          result.setSuccessIsSet(true);
1853
        } catch (UserContextException ucex) {
1854
          result.ucex = ucex;
48 ashish 1855
        } catch (Throwable th) {
553 chandransh 1856
          LOGGER.error("Internal error processing deleteUser", th);
1857
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1858
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 1859
          x.write(oprot);
1860
          oprot.writeMessageEnd();
1861
          oprot.getTransport().flush();
1862
          return;
1863
        }
553 chandransh 1864
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 1865
        result.write(oprot);
1866
        oprot.writeMessageEnd();
1867
        oprot.getTransport().flush();
1868
      }
1869
 
1870
    }
1871
 
553 chandransh 1872
    private class getUserState implements ProcessFunction {
48 ashish 1873
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1874
      {
553 chandransh 1875
        getUserState_args args = new getUserState_args();
48 ashish 1876
        args.read(iprot);
1877
        iprot.readMessageEnd();
553 chandransh 1878
        getUserState_result result = new getUserState_result();
48 ashish 1879
        try {
553 chandransh 1880
          result.success = iface_.getUserState(args.userId);
1881
        } catch (UserContextException ucex) {
1882
          result.ucex = ucex;
48 ashish 1883
        } catch (Throwable th) {
553 chandransh 1884
          LOGGER.error("Internal error processing getUserState", th);
1885
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
1886
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 1887
          x.write(oprot);
1888
          oprot.writeMessageEnd();
1889
          oprot.getTransport().flush();
1890
          return;
1891
        }
553 chandransh 1892
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 1893
        result.write(oprot);
1894
        oprot.writeMessageEnd();
1895
        oprot.getTransport().flush();
1896
      }
1897
 
1898
    }
1899
 
123 ashish 1900
    private class authenticateUser implements ProcessFunction {
1901
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1902
      {
1903
        authenticateUser_args args = new authenticateUser_args();
1904
        args.read(iprot);
1905
        iprot.readMessageEnd();
1906
        authenticateUser_result result = new authenticateUser_result();
1907
        try {
553 chandransh 1908
          result.success = iface_.authenticateUser(args.email, args.password);
1909
        } catch (AuthenticationException auex) {
1910
          result.auex = auex;
123 ashish 1911
        } catch (Throwable th) {
1912
          LOGGER.error("Internal error processing authenticateUser", th);
1913
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
1914
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
1915
          x.write(oprot);
1916
          oprot.writeMessageEnd();
1917
          oprot.getTransport().flush();
1918
          return;
1919
        }
1920
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
1921
        result.write(oprot);
1922
        oprot.writeMessageEnd();
1923
        oprot.getTransport().flush();
1924
      }
1925
 
1926
    }
1927
 
48 ashish 1928
    private class userExists implements ProcessFunction {
1929
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1930
      {
1931
        userExists_args args = new userExists_args();
1932
        args.read(iprot);
1933
        iprot.readMessageEnd();
1934
        userExists_result result = new userExists_result();
1935
        try {
1936
          result.success = iface_.userExists(args.email);
1937
          result.setSuccessIsSet(true);
1938
        } catch (UserContextException ucx) {
1939
          result.ucx = ucx;
1940
        } catch (Throwable th) {
1941
          LOGGER.error("Internal error processing userExists", th);
1942
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
1943
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
1944
          x.write(oprot);
1945
          oprot.writeMessageEnd();
1946
          oprot.getTransport().flush();
1947
          return;
1948
        }
1949
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
1950
        result.write(oprot);
1951
        oprot.writeMessageEnd();
1952
        oprot.getTransport().flush();
1953
      }
1954
 
1955
    }
1956
 
1957
    private class addAddressForUser implements ProcessFunction {
1958
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1959
      {
1960
        addAddressForUser_args args = new addAddressForUser_args();
1961
        args.read(iprot);
1962
        iprot.readMessageEnd();
1963
        addAddressForUser_result result = new addAddressForUser_result();
1964
        try {
571 rajveer 1965
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 1966
          result.setSuccessIsSet(true);
1967
        } catch (UserContextException ucx) {
1968
          result.ucx = ucx;
1969
        } catch (Throwable th) {
1970
          LOGGER.error("Internal error processing addAddressForUser", th);
1971
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
1972
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
1973
          x.write(oprot);
1974
          oprot.writeMessageEnd();
1975
          oprot.getTransport().flush();
1976
          return;
1977
        }
1978
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
1979
        result.write(oprot);
1980
        oprot.writeMessageEnd();
1981
        oprot.getTransport().flush();
1982
      }
1983
 
1984
    }
1985
 
1986
    private class removeAddressForUser implements ProcessFunction {
1987
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1988
      {
1989
        removeAddressForUser_args args = new removeAddressForUser_args();
1990
        args.read(iprot);
1991
        iprot.readMessageEnd();
1992
        removeAddressForUser_result result = new removeAddressForUser_result();
1993
        try {
1994
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
1995
          result.setSuccessIsSet(true);
1996
        } catch (UserContextException ucx) {
1997
          result.ucx = ucx;
1998
        } catch (Throwable th) {
1999
          LOGGER.error("Internal error processing removeAddressForUser", th);
2000
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2001
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2002
          x.write(oprot);
2003
          oprot.writeMessageEnd();
2004
          oprot.getTransport().flush();
2005
          return;
2006
        }
2007
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2008
        result.write(oprot);
2009
        oprot.writeMessageEnd();
2010
        oprot.getTransport().flush();
2011
      }
2012
 
2013
    }
2014
 
2015
    private class setUserAsLoggedIn implements ProcessFunction {
2016
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2017
      {
2018
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2019
        args.read(iprot);
2020
        iprot.readMessageEnd();
2021
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2022
        try {
2023
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2024
          result.setSuccessIsSet(true);
2025
        } catch (UserContextException ucx) {
2026
          result.ucx = ucx;
2027
        } catch (Throwable th) {
2028
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2029
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2030
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2031
          x.write(oprot);
2032
          oprot.writeMessageEnd();
2033
          oprot.getTransport().flush();
2034
          return;
2035
        }
2036
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2037
        result.write(oprot);
2038
        oprot.writeMessageEnd();
2039
        oprot.getTransport().flush();
2040
      }
2041
 
2042
    }
2043
 
2044
    private class setUserAsLoggedOut implements ProcessFunction {
2045
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2046
      {
2047
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2048
        args.read(iprot);
2049
        iprot.readMessageEnd();
2050
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2051
        try {
2052
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2053
          result.setSuccessIsSet(true);
2054
        } catch (UserContextException ucx) {
2055
          result.ucx = ucx;
2056
        } catch (Throwable th) {
2057
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2058
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2059
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2060
          x.write(oprot);
2061
          oprot.writeMessageEnd();
2062
          oprot.getTransport().flush();
2063
          return;
2064
        }
2065
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2066
        result.write(oprot);
2067
        oprot.writeMessageEnd();
2068
        oprot.getTransport().flush();
2069
      }
2070
 
2071
    }
2072
 
506 rajveer 2073
    private class setDefaultAddress implements ProcessFunction {
2074
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2075
      {
2076
        setDefaultAddress_args args = new setDefaultAddress_args();
2077
        args.read(iprot);
2078
        iprot.readMessageEnd();
2079
        setDefaultAddress_result result = new setDefaultAddress_result();
2080
        try {
2081
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2082
          result.setSuccessIsSet(true);
2083
        } catch (UserContextException ucx) {
2084
          result.ucx = ucx;
2085
        } catch (Throwable th) {
2086
          LOGGER.error("Internal error processing setDefaultAddress", th);
2087
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2088
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2089
          x.write(oprot);
2090
          oprot.writeMessageEnd();
2091
          oprot.getTransport().flush();
2092
          return;
2093
        }
2094
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2095
        result.write(oprot);
2096
        oprot.writeMessageEnd();
2097
        oprot.getTransport().flush();
2098
      }
2099
 
2100
    }
2101
 
48 ashish 2102
    private class updatePassword implements ProcessFunction {
2103
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2104
      {
2105
        updatePassword_args args = new updatePassword_args();
2106
        args.read(iprot);
2107
        iprot.readMessageEnd();
2108
        updatePassword_result result = new updatePassword_result();
2109
        try {
593 rajveer 2110
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2111
          result.setSuccessIsSet(true);
2112
        } catch (UserContextException ucx) {
2113
          result.ucx = ucx;
2114
        } catch (Throwable th) {
2115
          LOGGER.error("Internal error processing updatePassword", th);
2116
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2117
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2118
          x.write(oprot);
2119
          oprot.writeMessageEnd();
2120
          oprot.getTransport().flush();
2121
          return;
2122
        }
2123
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2124
        result.write(oprot);
2125
        oprot.writeMessageEnd();
2126
        oprot.getTransport().flush();
2127
      }
2128
 
2129
    }
2130
 
582 rajveer 2131
    private class forgotPassword implements ProcessFunction {
2132
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2133
      {
2134
        forgotPassword_args args = new forgotPassword_args();
2135
        args.read(iprot);
2136
        iprot.readMessageEnd();
2137
        forgotPassword_result result = new forgotPassword_result();
2138
        try {
2139
          result.success = iface_.forgotPassword(args.email);
2140
          result.setSuccessIsSet(true);
2141
        } catch (UserContextException ucx) {
2142
          result.ucx = ucx;
2143
        } catch (Throwable th) {
2144
          LOGGER.error("Internal error processing forgotPassword", th);
2145
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2146
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2147
          x.write(oprot);
2148
          oprot.writeMessageEnd();
2149
          oprot.getTransport().flush();
2150
          return;
2151
        }
2152
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2153
        result.write(oprot);
2154
        oprot.writeMessageEnd();
2155
        oprot.getTransport().flush();
2156
      }
2157
 
2158
    }
2159
 
593 rajveer 2160
    private class getAllAddressesForUser implements ProcessFunction {
2161
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2162
      {
2163
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2164
        args.read(iprot);
2165
        iprot.readMessageEnd();
2166
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2167
        try {
2168
          result.success = iface_.getAllAddressesForUser(args.userId);
2169
        } catch (UserContextException ucx) {
2170
          result.ucx = ucx;
2171
        } catch (Throwable th) {
2172
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2173
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2174
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2175
          x.write(oprot);
2176
          oprot.writeMessageEnd();
2177
          oprot.getTransport().flush();
2178
          return;
2179
        }
2180
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2181
        result.write(oprot);
2182
        oprot.writeMessageEnd();
2183
        oprot.getTransport().flush();
2184
      }
2185
 
2186
    }
2187
 
2188
    private class getDefaultAddressId implements ProcessFunction {
2189
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2190
      {
2191
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2192
        args.read(iprot);
2193
        iprot.readMessageEnd();
2194
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2195
        try {
2196
          result.success = iface_.getDefaultAddressId(args.userId);
2197
          result.setSuccessIsSet(true);
2198
        } catch (UserContextException ucx) {
2199
          result.ucx = ucx;
2200
        } catch (Throwable th) {
2201
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2202
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2203
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2204
          x.write(oprot);
2205
          oprot.writeMessageEnd();
2206
          oprot.getTransport().flush();
2207
          return;
2208
        }
2209
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2210
        result.write(oprot);
2211
        oprot.writeMessageEnd();
2212
        oprot.getTransport().flush();
2213
      }
2214
 
2215
    }
2216
 
553 chandransh 2217
    private class createCart implements ProcessFunction {
48 ashish 2218
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2219
      {
553 chandransh 2220
        createCart_args args = new createCart_args();
48 ashish 2221
        args.read(iprot);
2222
        iprot.readMessageEnd();
553 chandransh 2223
        createCart_result result = new createCart_result();
48 ashish 2224
        try {
553 chandransh 2225
          result.success = iface_.createCart(args.userId);
48 ashish 2226
          result.setSuccessIsSet(true);
553 chandransh 2227
        } catch (ShoppingCartException scx) {
2228
          result.scx = scx;
48 ashish 2229
        } catch (Throwable th) {
553 chandransh 2230
          LOGGER.error("Internal error processing createCart", th);
2231
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2232
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2233
          x.write(oprot);
2234
          oprot.writeMessageEnd();
2235
          oprot.getTransport().flush();
2236
          return;
2237
        }
553 chandransh 2238
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2239
        result.write(oprot);
2240
        oprot.writeMessageEnd();
2241
        oprot.getTransport().flush();
2242
      }
2243
 
2244
    }
2245
 
553 chandransh 2246
    private class getCurrentCart implements ProcessFunction {
48 ashish 2247
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2248
      {
553 chandransh 2249
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2250
        args.read(iprot);
2251
        iprot.readMessageEnd();
553 chandransh 2252
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2253
        try {
553 chandransh 2254
          result.success = iface_.getCurrentCart(args.userId);
2255
        } catch (ShoppingCartException scx) {
2256
          result.scx = scx;
48 ashish 2257
        } catch (Throwable th) {
553 chandransh 2258
          LOGGER.error("Internal error processing getCurrentCart", th);
2259
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2260
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2261
          x.write(oprot);
2262
          oprot.writeMessageEnd();
2263
          oprot.getTransport().flush();
2264
          return;
2265
        }
553 chandransh 2266
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2267
        result.write(oprot);
2268
        oprot.writeMessageEnd();
2269
        oprot.getTransport().flush();
2270
      }
2271
 
2272
    }
2273
 
553 chandransh 2274
    private class getCart implements ProcessFunction {
48 ashish 2275
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2276
      {
553 chandransh 2277
        getCart_args args = new getCart_args();
48 ashish 2278
        args.read(iprot);
2279
        iprot.readMessageEnd();
553 chandransh 2280
        getCart_result result = new getCart_result();
48 ashish 2281
        try {
553 chandransh 2282
          result.success = iface_.getCart(args.cartId);
2283
        } catch (ShoppingCartException scx) {
2284
          result.scx = scx;
48 ashish 2285
        } catch (Throwable th) {
553 chandransh 2286
          LOGGER.error("Internal error processing getCart", th);
2287
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2288
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2289
          x.write(oprot);
2290
          oprot.writeMessageEnd();
2291
          oprot.getTransport().flush();
2292
          return;
2293
        }
553 chandransh 2294
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2295
        result.write(oprot);
2296
        oprot.writeMessageEnd();
2297
        oprot.getTransport().flush();
2298
      }
2299
 
2300
    }
2301
 
553 chandransh 2302
    private class getCartsForUser implements ProcessFunction {
48 ashish 2303
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2304
      {
553 chandransh 2305
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2306
        args.read(iprot);
2307
        iprot.readMessageEnd();
553 chandransh 2308
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2309
        try {
553 chandransh 2310
          result.success = iface_.getCartsForUser(args.userId, args.status);
2311
        } catch (ShoppingCartException scx) {
2312
          result.scx = scx;
48 ashish 2313
        } catch (Throwable th) {
553 chandransh 2314
          LOGGER.error("Internal error processing getCartsForUser", th);
2315
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2316
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2317
          x.write(oprot);
2318
          oprot.writeMessageEnd();
2319
          oprot.getTransport().flush();
2320
          return;
2321
        }
553 chandransh 2322
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2323
        result.write(oprot);
2324
        oprot.writeMessageEnd();
2325
        oprot.getTransport().flush();
2326
      }
2327
 
2328
    }
2329
 
553 chandransh 2330
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2331
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2332
      {
553 chandransh 2333
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2334
        args.read(iprot);
2335
        iprot.readMessageEnd();
553 chandransh 2336
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2337
        try {
553 chandransh 2338
          result.success = iface_.getCartsByStatus(args.status);
2339
        } catch (ShoppingCartException scx) {
2340
          result.scx = scx;
48 ashish 2341
        } catch (Throwable th) {
553 chandransh 2342
          LOGGER.error("Internal error processing getCartsByStatus", th);
2343
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2344
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2345
          x.write(oprot);
2346
          oprot.writeMessageEnd();
2347
          oprot.getTransport().flush();
2348
          return;
2349
        }
553 chandransh 2350
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2351
        result.write(oprot);
2352
        oprot.writeMessageEnd();
2353
        oprot.getTransport().flush();
2354
      }
2355
 
2356
    }
2357
 
553 chandransh 2358
    private class getCartsByTime implements ProcessFunction {
48 ashish 2359
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2360
      {
553 chandransh 2361
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2362
        args.read(iprot);
2363
        iprot.readMessageEnd();
553 chandransh 2364
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2365
        try {
553 chandransh 2366
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2367
        } catch (ShoppingCartException scx) {
2368
          result.scx = scx;
48 ashish 2369
        } catch (Throwable th) {
553 chandransh 2370
          LOGGER.error("Internal error processing getCartsByTime", th);
2371
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2372
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2373
          x.write(oprot);
2374
          oprot.writeMessageEnd();
2375
          oprot.getTransport().flush();
2376
          return;
2377
        }
553 chandransh 2378
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2379
        result.write(oprot);
2380
        oprot.writeMessageEnd();
2381
        oprot.getTransport().flush();
2382
      }
2383
 
2384
    }
2385
 
553 chandransh 2386
    private class changeCartStatus implements ProcessFunction {
130 ashish 2387
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2388
      {
553 chandransh 2389
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2390
        args.read(iprot);
2391
        iprot.readMessageEnd();
553 chandransh 2392
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2393
        try {
553 chandransh 2394
          iface_.changeCartStatus(args.cartId, args.status);
2395
        } catch (ShoppingCartException scx) {
2396
          result.scx = scx;
2397
        } catch (Throwable th) {
2398
          LOGGER.error("Internal error processing changeCartStatus", th);
2399
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2400
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2401
          x.write(oprot);
2402
          oprot.writeMessageEnd();
2403
          oprot.getTransport().flush();
2404
          return;
2405
        }
2406
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2407
        result.write(oprot);
2408
        oprot.writeMessageEnd();
2409
        oprot.getTransport().flush();
2410
      }
2411
 
2412
    }
2413
 
2414
    private class addItemToCart implements ProcessFunction {
2415
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2416
      {
2417
        addItemToCart_args args = new addItemToCart_args();
2418
        args.read(iprot);
2419
        iprot.readMessageEnd();
2420
        addItemToCart_result result = new addItemToCart_result();
2421
        try {
2422
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2423
        } catch (ShoppingCartException scx) {
2424
          result.scx = scx;
2425
        } catch (Throwable th) {
2426
          LOGGER.error("Internal error processing addItemToCart", th);
2427
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2428
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2429
          x.write(oprot);
2430
          oprot.writeMessageEnd();
2431
          oprot.getTransport().flush();
2432
          return;
2433
        }
2434
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2435
        result.write(oprot);
2436
        oprot.writeMessageEnd();
2437
        oprot.getTransport().flush();
2438
      }
2439
 
2440
    }
2441
 
2442
    private class deleteItemFromCart implements ProcessFunction {
2443
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2444
      {
2445
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2446
        args.read(iprot);
2447
        iprot.readMessageEnd();
2448
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2449
        try {
2450
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2451
        } catch (ShoppingCartException scx) {
2452
          result.scx = scx;
2453
        } catch (Throwable th) {
2454
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2455
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2456
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2457
          x.write(oprot);
2458
          oprot.writeMessageEnd();
2459
          oprot.getTransport().flush();
2460
          return;
2461
        }
2462
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2463
        result.write(oprot);
2464
        oprot.writeMessageEnd();
2465
        oprot.getTransport().flush();
2466
      }
2467
 
2468
    }
2469
 
2470
    private class changeQuantity implements ProcessFunction {
2471
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2472
      {
2473
        changeQuantity_args args = new changeQuantity_args();
2474
        args.read(iprot);
2475
        iprot.readMessageEnd();
2476
        changeQuantity_result result = new changeQuantity_result();
2477
        try {
2478
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2479
        } catch (ShoppingCartException scx) {
2480
          result.scx = scx;
2481
        } catch (Throwable th) {
2482
          LOGGER.error("Internal error processing changeQuantity", th);
2483
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2484
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2485
          x.write(oprot);
2486
          oprot.writeMessageEnd();
2487
          oprot.getTransport().flush();
2488
          return;
2489
        }
2490
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2491
        result.write(oprot);
2492
        oprot.writeMessageEnd();
2493
        oprot.getTransport().flush();
2494
      }
2495
 
2496
    }
2497
 
2498
    private class changeItemStatus implements ProcessFunction {
2499
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2500
      {
2501
        changeItemStatus_args args = new changeItemStatus_args();
2502
        args.read(iprot);
2503
        iprot.readMessageEnd();
2504
        changeItemStatus_result result = new changeItemStatus_result();
2505
        try {
2506
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2507
        } catch (ShoppingCartException scx) {
2508
          result.scx = scx;
2509
        } catch (Throwable th) {
2510
          LOGGER.error("Internal error processing changeItemStatus", th);
2511
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2512
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2513
          x.write(oprot);
2514
          oprot.writeMessageEnd();
2515
          oprot.getTransport().flush();
2516
          return;
2517
        }
2518
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2519
        result.write(oprot);
2520
        oprot.writeMessageEnd();
2521
        oprot.getTransport().flush();
2522
      }
2523
 
2524
    }
2525
 
2526
    private class addAddressToCart implements ProcessFunction {
2527
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2528
      {
2529
        addAddressToCart_args args = new addAddressToCart_args();
2530
        args.read(iprot);
2531
        iprot.readMessageEnd();
2532
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2533
        try {
2534
          iface_.addAddressToCart(args.cartId, args.addressId);
2535
        } catch (ShoppingCartException scx) {
2536
          result.scx = scx;
2537
        } catch (Throwable th) {
2538
          LOGGER.error("Internal error processing addAddressToCart", th);
2539
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2540
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2541
          x.write(oprot);
2542
          oprot.writeMessageEnd();
2543
          oprot.getTransport().flush();
2544
          return;
2545
        }
553 chandransh 2546
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2547
        result.write(oprot);
2548
        oprot.writeMessageEnd();
2549
        oprot.getTransport().flush();
2550
      }
2551
 
2552
    }
2553
 
688 chandransh 2554
    private class createOrders implements ProcessFunction {
553 chandransh 2555
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2556
      {
688 chandransh 2557
        createOrders_args args = new createOrders_args();
553 chandransh 2558
        args.read(iprot);
2559
        iprot.readMessageEnd();
688 chandransh 2560
        createOrders_result result = new createOrders_result();
553 chandransh 2561
        try {
688 chandransh 2562
          result.success = iface_.createOrders(args.cartId);
130 ashish 2563
          result.setSuccessIsSet(true);
553 chandransh 2564
        } catch (ShoppingCartException scx) {
2565
          result.scx = scx;
130 ashish 2566
        } catch (Throwable th) {
688 chandransh 2567
          LOGGER.error("Internal error processing createOrders", th);
2568
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
2569
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
130 ashish 2570
          x.write(oprot);
2571
          oprot.writeMessageEnd();
2572
          oprot.getTransport().flush();
2573
          return;
2574
        }
688 chandransh 2575
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
130 ashish 2576
        result.write(oprot);
2577
        oprot.writeMessageEnd();
2578
        oprot.getTransport().flush();
2579
      }
2580
 
2581
    }
2582
 
553 chandransh 2583
    private class validateCart implements ProcessFunction {
130 ashish 2584
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2585
      {
553 chandransh 2586
        validateCart_args args = new validateCart_args();
130 ashish 2587
        args.read(iprot);
2588
        iprot.readMessageEnd();
553 chandransh 2589
        validateCart_result result = new validateCart_result();
578 chandransh 2590
        try {
2591
          result.success = iface_.validateCart(args.cartId);
2592
          result.setSuccessIsSet(true);
2593
        } catch (ShoppingCartException scex) {
2594
          result.scex = scex;
2595
        } catch (Throwable th) {
2596
          LOGGER.error("Internal error processing validateCart", th);
2597
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2598
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2599
          x.write(oprot);
2600
          oprot.writeMessageEnd();
2601
          oprot.getTransport().flush();
2602
          return;
2603
        }
553 chandransh 2604
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2605
        result.write(oprot);
2606
        oprot.writeMessageEnd();
2607
        oprot.getTransport().flush();
2608
      }
2609
 
2610
    }
2611
 
688 chandransh 2612
    private class mergeCart implements ProcessFunction {
578 chandransh 2613
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2614
      {
688 chandransh 2615
        mergeCart_args args = new mergeCart_args();
578 chandransh 2616
        args.read(iprot);
2617
        iprot.readMessageEnd();
688 chandransh 2618
        mergeCart_result result = new mergeCart_result();
2619
        iface_.mergeCart(args.fromCartId, args.toCartId);
2620
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2621
        result.write(oprot);
2622
        oprot.writeMessageEnd();
2623
        oprot.getTransport().flush();
2624
      }
2625
 
2626
    }
2627
 
2628
    private class checkOut implements ProcessFunction {
2629
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2630
      {
2631
        checkOut_args args = new checkOut_args();
2632
        args.read(iprot);
2633
        iprot.readMessageEnd();
2634
        checkOut_result result = new checkOut_result();
578 chandransh 2635
        try {
688 chandransh 2636
          result.success = iface_.checkOut(args.cartId);
578 chandransh 2637
          result.setSuccessIsSet(true);
2638
        } catch (ShoppingCartException scex) {
2639
          result.scex = scex;
2640
        } catch (Throwable th) {
688 chandransh 2641
          LOGGER.error("Internal error processing checkOut", th);
2642
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
2643
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 2644
          x.write(oprot);
2645
          oprot.writeMessageEnd();
2646
          oprot.getTransport().flush();
2647
          return;
2648
        }
688 chandransh 2649
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 2650
        result.write(oprot);
2651
        oprot.writeMessageEnd();
2652
        oprot.getTransport().flush();
2653
      }
2654
 
2655
    }
2656
 
688 chandransh 2657
    private class resetCart implements ProcessFunction {
553 chandransh 2658
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2659
      {
688 chandransh 2660
        resetCart_args args = new resetCart_args();
553 chandransh 2661
        args.read(iprot);
2662
        iprot.readMessageEnd();
688 chandransh 2663
        resetCart_result result = new resetCart_result();
2664
        try {
2665
          result.success = iface_.resetCart(args.cartId, args.items);
2666
          result.setSuccessIsSet(true);
2667
        } catch (ShoppingCartException scex) {
2668
          result.scex = scex;
2669
        } catch (Throwable th) {
2670
          LOGGER.error("Internal error processing resetCart", th);
2671
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
2672
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
2673
          x.write(oprot);
2674
          oprot.writeMessageEnd();
2675
          oprot.getTransport().flush();
2676
          return;
2677
        }
2678
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 2679
        result.write(oprot);
2680
        oprot.writeMessageEnd();
2681
        oprot.getTransport().flush();
2682
      }
2683
 
2684
    }
2685
 
2686
    private class getMyResearch implements ProcessFunction {
2687
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2688
      {
2689
        getMyResearch_args args = new getMyResearch_args();
2690
        args.read(iprot);
2691
        iprot.readMessageEnd();
2692
        getMyResearch_result result = new getMyResearch_result();
2693
        try {
771 rajveer 2694
          result.success = iface_.getMyResearch(args.userId);
553 chandransh 2695
        } catch (WidgetException scx) {
2696
          result.scx = scx;
2697
        } catch (Throwable th) {
2698
          LOGGER.error("Internal error processing getMyResearch", th);
2699
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2700
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2701
          x.write(oprot);
2702
          oprot.writeMessageEnd();
2703
          oprot.getTransport().flush();
2704
          return;
2705
        }
2706
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2707
        result.write(oprot);
2708
        oprot.writeMessageEnd();
2709
        oprot.getTransport().flush();
2710
      }
2711
 
2712
    }
2713
 
2714
    private class updateMyResearch implements ProcessFunction {
2715
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2716
      {
2717
        updateMyResearch_args args = new updateMyResearch_args();
2718
        args.read(iprot);
2719
        iprot.readMessageEnd();
2720
        updateMyResearch_result result = new updateMyResearch_result();
2721
        try {
771 rajveer 2722
          result.success = iface_.updateMyResearch(args.userId, args.itemId);
130 ashish 2723
          result.setSuccessIsSet(true);
553 chandransh 2724
        } catch (WidgetException scx) {
2725
          result.scx = scx;
130 ashish 2726
        } catch (Throwable th) {
553 chandransh 2727
          LOGGER.error("Internal error processing updateMyResearch", th);
2728
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
2729
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 2730
          x.write(oprot);
2731
          oprot.writeMessageEnd();
2732
          oprot.getTransport().flush();
2733
          return;
2734
        }
553 chandransh 2735
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 2736
        result.write(oprot);
2737
        oprot.writeMessageEnd();
2738
        oprot.getTransport().flush();
2739
      }
2740
 
2741
    }
2742
 
553 chandransh 2743
    private class deleteItemFromMyResearch implements ProcessFunction {
2744
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2745
      {
2746
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
2747
        args.read(iprot);
2748
        iprot.readMessageEnd();
2749
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
2750
        try {
771 rajveer 2751
          iface_.deleteItemFromMyResearch(args.userId, args.itemId);
553 chandransh 2752
        } catch (WidgetException scx) {
2753
          result.scx = scx;
2754
        } catch (Throwable th) {
2755
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
2756
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
2757
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
2758
          x.write(oprot);
2759
          oprot.writeMessageEnd();
2760
          oprot.getTransport().flush();
2761
          return;
2762
        }
2763
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
2764
        result.write(oprot);
2765
        oprot.writeMessageEnd();
2766
        oprot.getTransport().flush();
2767
      }
2768
 
2769
    }
2770
 
771 rajveer 2771
    private class updateBrowseHistory implements ProcessFunction {
553 chandransh 2772
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2773
      {
771 rajveer 2774
        updateBrowseHistory_args args = new updateBrowseHistory_args();
553 chandransh 2775
        args.read(iprot);
2776
        iprot.readMessageEnd();
771 rajveer 2777
        updateBrowseHistory_result result = new updateBrowseHistory_result();
2778
        iface_.updateBrowseHistory(args.userId, args.itemId);
2779
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2780
        result.write(oprot);
2781
        oprot.writeMessageEnd();
2782
        oprot.getTransport().flush();
2783
      }
2784
 
2785
    }
2786
 
771 rajveer 2787
    private class getBrowseHistory implements ProcessFunction {
553 chandransh 2788
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2789
      {
771 rajveer 2790
        getBrowseHistory_args args = new getBrowseHistory_args();
553 chandransh 2791
        args.read(iprot);
2792
        iprot.readMessageEnd();
771 rajveer 2793
        getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 2794
        try {
771 rajveer 2795
          result.success = iface_.getBrowseHistory(args.userId);
553 chandransh 2796
        } catch (WidgetException scx) {
2797
          result.scx = scx;
2798
        } catch (Throwable th) {
771 rajveer 2799
          LOGGER.error("Internal error processing getBrowseHistory", th);
2800
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
2801
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
553 chandransh 2802
          x.write(oprot);
2803
          oprot.writeMessageEnd();
2804
          oprot.getTransport().flush();
2805
          return;
2806
        }
771 rajveer 2807
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2808
        result.write(oprot);
2809
        oprot.writeMessageEnd();
2810
        oprot.getTransport().flush();
2811
      }
2812
 
2813
    }
2814
 
771 rajveer 2815
    private class mergeBrowseHistory implements ProcessFunction {
553 chandransh 2816
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2817
      {
771 rajveer 2818
        mergeBrowseHistory_args args = new mergeBrowseHistory_args();
553 chandransh 2819
        args.read(iprot);
2820
        iprot.readMessageEnd();
771 rajveer 2821
        mergeBrowseHistory_result result = new mergeBrowseHistory_result();
2822
        iface_.mergeBrowseHistory(args.fromUserId, args.toUserId);
2823
        oprot.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2824
        result.write(oprot);
2825
        oprot.writeMessageEnd();
2826
        oprot.getTransport().flush();
2827
      }
2828
 
2829
    }
2830
 
48 ashish 2831
  }
2832
 
764 rajveer 2833
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2834
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2835
 
2836
 
2837
 
2838
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2839
    public enum _Fields implements TFieldIdEnum {
2840
;
2841
 
2842
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2844
 
2845
      static {
2846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2847
          byId.put((int)field._thriftId, field);
2848
          byName.put(field.getFieldName(), field);
2849
        }
2850
      }
2851
 
2852
      /**
2853
       * Find the _Fields constant that matches fieldId, or null if its not found.
2854
       */
2855
      public static _Fields findByThriftId(int fieldId) {
2856
        return byId.get(fieldId);
2857
      }
2858
 
2859
      /**
2860
       * Find the _Fields constant that matches fieldId, throwing an exception
2861
       * if it is not found.
2862
       */
2863
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2864
        _Fields fields = findByThriftId(fieldId);
2865
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2866
        return fields;
2867
      }
2868
 
2869
      /**
2870
       * Find the _Fields constant that matches name, or null if its not found.
2871
       */
2872
      public static _Fields findByName(String name) {
2873
        return byName.get(name);
2874
      }
2875
 
2876
      private final short _thriftId;
2877
      private final String _fieldName;
2878
 
2879
      _Fields(short thriftId, String fieldName) {
2880
        _thriftId = thriftId;
2881
        _fieldName = fieldName;
2882
      }
2883
 
2884
      public short getThriftFieldId() {
2885
        return _thriftId;
2886
      }
2887
 
2888
      public String getFieldName() {
2889
        return _fieldName;
2890
      }
2891
    }
2892
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2893
    }});
2894
 
2895
    static {
2896
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2897
    }
2898
 
2899
    public closeSession_args() {
2900
    }
2901
 
2902
    /**
2903
     * Performs a deep copy on <i>other</i>.
2904
     */
2905
    public closeSession_args(closeSession_args other) {
2906
    }
2907
 
2908
    public closeSession_args deepCopy() {
2909
      return new closeSession_args(this);
2910
    }
2911
 
2912
    @Deprecated
2913
    public closeSession_args clone() {
2914
      return new closeSession_args(this);
2915
    }
2916
 
2917
    public void setFieldValue(_Fields field, Object value) {
2918
      switch (field) {
2919
      }
2920
    }
2921
 
2922
    public void setFieldValue(int fieldID, Object value) {
2923
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2924
    }
2925
 
2926
    public Object getFieldValue(_Fields field) {
2927
      switch (field) {
2928
      }
2929
      throw new IllegalStateException();
2930
    }
2931
 
2932
    public Object getFieldValue(int fieldId) {
2933
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2934
    }
2935
 
2936
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2937
    public boolean isSet(_Fields field) {
2938
      switch (field) {
2939
      }
2940
      throw new IllegalStateException();
2941
    }
2942
 
2943
    public boolean isSet(int fieldID) {
2944
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2945
    }
2946
 
2947
    @Override
2948
    public boolean equals(Object that) {
2949
      if (that == null)
2950
        return false;
2951
      if (that instanceof closeSession_args)
2952
        return this.equals((closeSession_args)that);
2953
      return false;
2954
    }
2955
 
2956
    public boolean equals(closeSession_args that) {
2957
      if (that == null)
2958
        return false;
2959
 
2960
      return true;
2961
    }
2962
 
2963
    @Override
2964
    public int hashCode() {
2965
      return 0;
2966
    }
2967
 
2968
    public int compareTo(closeSession_args other) {
2969
      if (!getClass().equals(other.getClass())) {
2970
        return getClass().getName().compareTo(other.getClass().getName());
2971
      }
2972
 
2973
      int lastComparison = 0;
2974
      closeSession_args typedOther = (closeSession_args)other;
2975
 
2976
      return 0;
2977
    }
2978
 
2979
    public void read(TProtocol iprot) throws TException {
2980
      TField field;
2981
      iprot.readStructBegin();
2982
      while (true)
2983
      {
2984
        field = iprot.readFieldBegin();
2985
        if (field.type == TType.STOP) { 
2986
          break;
2987
        }
2988
        _Fields fieldId = _Fields.findByThriftId(field.id);
2989
        if (fieldId == null) {
2990
          TProtocolUtil.skip(iprot, field.type);
2991
        } else {
2992
          switch (fieldId) {
2993
          }
2994
          iprot.readFieldEnd();
2995
        }
2996
      }
2997
      iprot.readStructEnd();
2998
      validate();
2999
    }
3000
 
3001
    public void write(TProtocol oprot) throws TException {
3002
      validate();
3003
 
3004
      oprot.writeStructBegin(STRUCT_DESC);
3005
      oprot.writeFieldStop();
3006
      oprot.writeStructEnd();
3007
    }
3008
 
3009
    @Override
3010
    public String toString() {
3011
      StringBuilder sb = new StringBuilder("closeSession_args(");
3012
      boolean first = true;
3013
 
3014
      sb.append(")");
3015
      return sb.toString();
3016
    }
3017
 
3018
    public void validate() throws TException {
3019
      // check for required fields
3020
    }
3021
 
3022
  }
3023
 
3024
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3025
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3026
 
3027
 
3028
 
3029
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3030
    public enum _Fields implements TFieldIdEnum {
3031
;
3032
 
3033
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3034
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3035
 
3036
      static {
3037
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3038
          byId.put((int)field._thriftId, field);
3039
          byName.put(field.getFieldName(), field);
3040
        }
3041
      }
3042
 
3043
      /**
3044
       * Find the _Fields constant that matches fieldId, or null if its not found.
3045
       */
3046
      public static _Fields findByThriftId(int fieldId) {
3047
        return byId.get(fieldId);
3048
      }
3049
 
3050
      /**
3051
       * Find the _Fields constant that matches fieldId, throwing an exception
3052
       * if it is not found.
3053
       */
3054
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3055
        _Fields fields = findByThriftId(fieldId);
3056
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3057
        return fields;
3058
      }
3059
 
3060
      /**
3061
       * Find the _Fields constant that matches name, or null if its not found.
3062
       */
3063
      public static _Fields findByName(String name) {
3064
        return byName.get(name);
3065
      }
3066
 
3067
      private final short _thriftId;
3068
      private final String _fieldName;
3069
 
3070
      _Fields(short thriftId, String fieldName) {
3071
        _thriftId = thriftId;
3072
        _fieldName = fieldName;
3073
      }
3074
 
3075
      public short getThriftFieldId() {
3076
        return _thriftId;
3077
      }
3078
 
3079
      public String getFieldName() {
3080
        return _fieldName;
3081
      }
3082
    }
3083
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3084
    }});
3085
 
3086
    static {
3087
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3088
    }
3089
 
3090
    public closeSession_result() {
3091
    }
3092
 
3093
    /**
3094
     * Performs a deep copy on <i>other</i>.
3095
     */
3096
    public closeSession_result(closeSession_result other) {
3097
    }
3098
 
3099
    public closeSession_result deepCopy() {
3100
      return new closeSession_result(this);
3101
    }
3102
 
3103
    @Deprecated
3104
    public closeSession_result clone() {
3105
      return new closeSession_result(this);
3106
    }
3107
 
3108
    public void setFieldValue(_Fields field, Object value) {
3109
      switch (field) {
3110
      }
3111
    }
3112
 
3113
    public void setFieldValue(int fieldID, Object value) {
3114
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3115
    }
3116
 
3117
    public Object getFieldValue(_Fields field) {
3118
      switch (field) {
3119
      }
3120
      throw new IllegalStateException();
3121
    }
3122
 
3123
    public Object getFieldValue(int fieldId) {
3124
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3125
    }
3126
 
3127
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3128
    public boolean isSet(_Fields field) {
3129
      switch (field) {
3130
      }
3131
      throw new IllegalStateException();
3132
    }
3133
 
3134
    public boolean isSet(int fieldID) {
3135
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3136
    }
3137
 
3138
    @Override
3139
    public boolean equals(Object that) {
3140
      if (that == null)
3141
        return false;
3142
      if (that instanceof closeSession_result)
3143
        return this.equals((closeSession_result)that);
3144
      return false;
3145
    }
3146
 
3147
    public boolean equals(closeSession_result that) {
3148
      if (that == null)
3149
        return false;
3150
 
3151
      return true;
3152
    }
3153
 
3154
    @Override
3155
    public int hashCode() {
3156
      return 0;
3157
    }
3158
 
3159
    public int compareTo(closeSession_result other) {
3160
      if (!getClass().equals(other.getClass())) {
3161
        return getClass().getName().compareTo(other.getClass().getName());
3162
      }
3163
 
3164
      int lastComparison = 0;
3165
      closeSession_result typedOther = (closeSession_result)other;
3166
 
3167
      return 0;
3168
    }
3169
 
3170
    public void read(TProtocol iprot) throws TException {
3171
      TField field;
3172
      iprot.readStructBegin();
3173
      while (true)
3174
      {
3175
        field = iprot.readFieldBegin();
3176
        if (field.type == TType.STOP) { 
3177
          break;
3178
        }
3179
        _Fields fieldId = _Fields.findByThriftId(field.id);
3180
        if (fieldId == null) {
3181
          TProtocolUtil.skip(iprot, field.type);
3182
        } else {
3183
          switch (fieldId) {
3184
          }
3185
          iprot.readFieldEnd();
3186
        }
3187
      }
3188
      iprot.readStructEnd();
3189
      validate();
3190
    }
3191
 
3192
    public void write(TProtocol oprot) throws TException {
3193
      oprot.writeStructBegin(STRUCT_DESC);
3194
 
3195
      oprot.writeFieldStop();
3196
      oprot.writeStructEnd();
3197
    }
3198
 
3199
    @Override
3200
    public String toString() {
3201
      StringBuilder sb = new StringBuilder("closeSession_result(");
3202
      boolean first = true;
3203
 
3204
      sb.append(")");
3205
      return sb.toString();
3206
    }
3207
 
3208
    public void validate() throws TException {
3209
      // check for required fields
3210
    }
3211
 
3212
  }
3213
 
553 chandransh 3214
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3215
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3216
 
553 chandransh 3217
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3218
 
553 chandransh 3219
    private String jsessionId;
48 ashish 3220
 
3221
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3222
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3223
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3224
 
3225
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3226
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3227
 
3228
      static {
3229
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3230
          byId.put((int)field._thriftId, field);
3231
          byName.put(field.getFieldName(), field);
3232
        }
3233
      }
3234
 
3235
      /**
3236
       * Find the _Fields constant that matches fieldId, or null if its not found.
3237
       */
3238
      public static _Fields findByThriftId(int fieldId) {
3239
        return byId.get(fieldId);
3240
      }
3241
 
3242
      /**
3243
       * Find the _Fields constant that matches fieldId, throwing an exception
3244
       * if it is not found.
3245
       */
3246
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3247
        _Fields fields = findByThriftId(fieldId);
3248
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3249
        return fields;
3250
      }
3251
 
3252
      /**
3253
       * Find the _Fields constant that matches name, or null if its not found.
3254
       */
3255
      public static _Fields findByName(String name) {
3256
        return byName.get(name);
3257
      }
3258
 
3259
      private final short _thriftId;
3260
      private final String _fieldName;
3261
 
3262
      _Fields(short thriftId, String fieldName) {
3263
        _thriftId = thriftId;
3264
        _fieldName = fieldName;
3265
      }
3266
 
3267
      public short getThriftFieldId() {
3268
        return _thriftId;
3269
      }
3270
 
3271
      public String getFieldName() {
3272
        return _fieldName;
3273
      }
3274
    }
3275
 
3276
    // isset id assignments
3277
 
3278
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3279
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3280
          new FieldValueMetaData(TType.STRING)));
48 ashish 3281
    }});
3282
 
3283
    static {
553 chandransh 3284
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3285
    }
3286
 
553 chandransh 3287
    public createAnonymousUser_args() {
48 ashish 3288
    }
3289
 
553 chandransh 3290
    public createAnonymousUser_args(
3291
      String jsessionId)
48 ashish 3292
    {
3293
      this();
553 chandransh 3294
      this.jsessionId = jsessionId;
48 ashish 3295
    }
3296
 
3297
    /**
3298
     * Performs a deep copy on <i>other</i>.
3299
     */
553 chandransh 3300
    public createAnonymousUser_args(createAnonymousUser_args other) {
3301
      if (other.isSetJsessionId()) {
3302
        this.jsessionId = other.jsessionId;
48 ashish 3303
      }
3304
    }
3305
 
553 chandransh 3306
    public createAnonymousUser_args deepCopy() {
3307
      return new createAnonymousUser_args(this);
48 ashish 3308
    }
3309
 
3310
    @Deprecated
553 chandransh 3311
    public createAnonymousUser_args clone() {
3312
      return new createAnonymousUser_args(this);
48 ashish 3313
    }
3314
 
553 chandransh 3315
    public String getJsessionId() {
3316
      return this.jsessionId;
48 ashish 3317
    }
3318
 
553 chandransh 3319
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3320
      this.jsessionId = jsessionId;
48 ashish 3321
      return this;
3322
    }
3323
 
553 chandransh 3324
    public void unsetJsessionId() {
3325
      this.jsessionId = null;
48 ashish 3326
    }
3327
 
553 chandransh 3328
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3329
    public boolean isSetJsessionId() {
3330
      return this.jsessionId != null;
48 ashish 3331
    }
3332
 
553 chandransh 3333
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3334
      if (!value) {
553 chandransh 3335
        this.jsessionId = null;
48 ashish 3336
      }
3337
    }
3338
 
3339
    public void setFieldValue(_Fields field, Object value) {
3340
      switch (field) {
553 chandransh 3341
      case JSESSION_ID:
48 ashish 3342
        if (value == null) {
553 chandransh 3343
          unsetJsessionId();
48 ashish 3344
        } else {
553 chandransh 3345
          setJsessionId((String)value);
48 ashish 3346
        }
3347
        break;
3348
 
3349
      }
3350
    }
3351
 
3352
    public void setFieldValue(int fieldID, Object value) {
3353
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3354
    }
3355
 
3356
    public Object getFieldValue(_Fields field) {
3357
      switch (field) {
553 chandransh 3358
      case JSESSION_ID:
3359
        return getJsessionId();
48 ashish 3360
 
3361
      }
3362
      throw new IllegalStateException();
3363
    }
3364
 
3365
    public Object getFieldValue(int fieldId) {
3366
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3367
    }
3368
 
3369
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3370
    public boolean isSet(_Fields field) {
3371
      switch (field) {
553 chandransh 3372
      case JSESSION_ID:
3373
        return isSetJsessionId();
48 ashish 3374
      }
3375
      throw new IllegalStateException();
3376
    }
3377
 
3378
    public boolean isSet(int fieldID) {
3379
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3380
    }
3381
 
3382
    @Override
3383
    public boolean equals(Object that) {
3384
      if (that == null)
3385
        return false;
553 chandransh 3386
      if (that instanceof createAnonymousUser_args)
3387
        return this.equals((createAnonymousUser_args)that);
48 ashish 3388
      return false;
3389
    }
3390
 
553 chandransh 3391
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3392
      if (that == null)
3393
        return false;
3394
 
553 chandransh 3395
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3396
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3397
      if (this_present_jsessionId || that_present_jsessionId) {
3398
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3399
          return false;
553 chandransh 3400
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3401
          return false;
3402
      }
3403
 
3404
      return true;
3405
    }
3406
 
3407
    @Override
3408
    public int hashCode() {
3409
      return 0;
3410
    }
3411
 
553 chandransh 3412
    public int compareTo(createAnonymousUser_args other) {
3413
      if (!getClass().equals(other.getClass())) {
3414
        return getClass().getName().compareTo(other.getClass().getName());
3415
      }
3416
 
3417
      int lastComparison = 0;
3418
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3419
 
3420
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3421
      if (lastComparison != 0) {
3422
        return lastComparison;
3423
      }
3424
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3425
      if (lastComparison != 0) {
3426
        return lastComparison;
3427
      }
3428
      return 0;
3429
    }
3430
 
48 ashish 3431
    public void read(TProtocol iprot) throws TException {
3432
      TField field;
3433
      iprot.readStructBegin();
3434
      while (true)
3435
      {
3436
        field = iprot.readFieldBegin();
3437
        if (field.type == TType.STOP) { 
3438
          break;
3439
        }
3440
        _Fields fieldId = _Fields.findByThriftId(field.id);
3441
        if (fieldId == null) {
3442
          TProtocolUtil.skip(iprot, field.type);
3443
        } else {
3444
          switch (fieldId) {
553 chandransh 3445
            case JSESSION_ID:
3446
              if (field.type == TType.STRING) {
3447
                this.jsessionId = iprot.readString();
48 ashish 3448
              } else { 
3449
                TProtocolUtil.skip(iprot, field.type);
3450
              }
3451
              break;
3452
          }
3453
          iprot.readFieldEnd();
3454
        }
3455
      }
3456
      iprot.readStructEnd();
3457
      validate();
3458
    }
3459
 
3460
    public void write(TProtocol oprot) throws TException {
3461
      validate();
3462
 
3463
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3464
      if (this.jsessionId != null) {
3465
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3466
        oprot.writeString(this.jsessionId);
48 ashish 3467
        oprot.writeFieldEnd();
3468
      }
3469
      oprot.writeFieldStop();
3470
      oprot.writeStructEnd();
3471
    }
3472
 
3473
    @Override
3474
    public String toString() {
553 chandransh 3475
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3476
      boolean first = true;
3477
 
553 chandransh 3478
      sb.append("jsessionId:");
3479
      if (this.jsessionId == null) {
48 ashish 3480
        sb.append("null");
3481
      } else {
553 chandransh 3482
        sb.append(this.jsessionId);
48 ashish 3483
      }
3484
      first = false;
3485
      sb.append(")");
3486
      return sb.toString();
3487
    }
3488
 
3489
    public void validate() throws TException {
3490
      // check for required fields
3491
    }
3492
 
3493
  }
3494
 
571 rajveer 3495
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3496
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3497
 
3498
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3499
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3500
 
553 chandransh 3501
    private User success;
3502
    private UserContextException ucex;
48 ashish 3503
 
3504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3505
    public enum _Fields implements TFieldIdEnum {
3506
      SUCCESS((short)0, "success"),
553 chandransh 3507
      UCEX((short)1, "ucex");
48 ashish 3508
 
3509
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3510
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3511
 
3512
      static {
3513
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3514
          byId.put((int)field._thriftId, field);
3515
          byName.put(field.getFieldName(), field);
3516
        }
3517
      }
3518
 
3519
      /**
3520
       * Find the _Fields constant that matches fieldId, or null if its not found.
3521
       */
3522
      public static _Fields findByThriftId(int fieldId) {
3523
        return byId.get(fieldId);
3524
      }
3525
 
3526
      /**
3527
       * Find the _Fields constant that matches fieldId, throwing an exception
3528
       * if it is not found.
3529
       */
3530
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3531
        _Fields fields = findByThriftId(fieldId);
3532
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3533
        return fields;
3534
      }
3535
 
3536
      /**
3537
       * Find the _Fields constant that matches name, or null if its not found.
3538
       */
3539
      public static _Fields findByName(String name) {
3540
        return byName.get(name);
3541
      }
3542
 
3543
      private final short _thriftId;
3544
      private final String _fieldName;
3545
 
3546
      _Fields(short thriftId, String fieldName) {
3547
        _thriftId = thriftId;
3548
        _fieldName = fieldName;
3549
      }
3550
 
3551
      public short getThriftFieldId() {
3552
        return _thriftId;
3553
      }
3554
 
3555
      public String getFieldName() {
3556
        return _fieldName;
3557
      }
3558
    }
3559
 
3560
    // isset id assignments
3561
 
3562
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3563
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3564
          new StructMetaData(TType.STRUCT, User.class)));
3565
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3566
          new FieldValueMetaData(TType.STRUCT)));
3567
    }});
3568
 
3569
    static {
553 chandransh 3570
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3571
    }
3572
 
553 chandransh 3573
    public createAnonymousUser_result() {
48 ashish 3574
    }
3575
 
553 chandransh 3576
    public createAnonymousUser_result(
3577
      User success,
3578
      UserContextException ucex)
48 ashish 3579
    {
3580
      this();
3581
      this.success = success;
553 chandransh 3582
      this.ucex = ucex;
48 ashish 3583
    }
3584
 
3585
    /**
3586
     * Performs a deep copy on <i>other</i>.
3587
     */
553 chandransh 3588
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3589
      if (other.isSetSuccess()) {
553 chandransh 3590
        this.success = new User(other.success);
48 ashish 3591
      }
553 chandransh 3592
      if (other.isSetUcex()) {
3593
        this.ucex = new UserContextException(other.ucex);
48 ashish 3594
      }
3595
    }
3596
 
553 chandransh 3597
    public createAnonymousUser_result deepCopy() {
3598
      return new createAnonymousUser_result(this);
48 ashish 3599
    }
3600
 
3601
    @Deprecated
553 chandransh 3602
    public createAnonymousUser_result clone() {
3603
      return new createAnonymousUser_result(this);
48 ashish 3604
    }
3605
 
553 chandransh 3606
    public User getSuccess() {
48 ashish 3607
      return this.success;
3608
    }
3609
 
553 chandransh 3610
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3611
      this.success = success;
3612
      return this;
3613
    }
3614
 
3615
    public void unsetSuccess() {
3616
      this.success = null;
3617
    }
3618
 
3619
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3620
    public boolean isSetSuccess() {
3621
      return this.success != null;
3622
    }
3623
 
3624
    public void setSuccessIsSet(boolean value) {
3625
      if (!value) {
3626
        this.success = null;
3627
      }
3628
    }
3629
 
553 chandransh 3630
    public UserContextException getUcex() {
3631
      return this.ucex;
48 ashish 3632
    }
3633
 
553 chandransh 3634
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3635
      this.ucex = ucex;
48 ashish 3636
      return this;
3637
    }
3638
 
553 chandransh 3639
    public void unsetUcex() {
3640
      this.ucex = null;
48 ashish 3641
    }
3642
 
553 chandransh 3643
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3644
    public boolean isSetUcex() {
3645
      return this.ucex != null;
48 ashish 3646
    }
3647
 
553 chandransh 3648
    public void setUcexIsSet(boolean value) {
48 ashish 3649
      if (!value) {
553 chandransh 3650
        this.ucex = null;
48 ashish 3651
      }
3652
    }
3653
 
3654
    public void setFieldValue(_Fields field, Object value) {
3655
      switch (field) {
3656
      case SUCCESS:
3657
        if (value == null) {
3658
          unsetSuccess();
3659
        } else {
553 chandransh 3660
          setSuccess((User)value);
48 ashish 3661
        }
3662
        break;
3663
 
553 chandransh 3664
      case UCEX:
48 ashish 3665
        if (value == null) {
553 chandransh 3666
          unsetUcex();
48 ashish 3667
        } else {
553 chandransh 3668
          setUcex((UserContextException)value);
48 ashish 3669
        }
3670
        break;
3671
 
3672
      }
3673
    }
3674
 
3675
    public void setFieldValue(int fieldID, Object value) {
3676
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3677
    }
3678
 
3679
    public Object getFieldValue(_Fields field) {
3680
      switch (field) {
3681
      case SUCCESS:
3682
        return getSuccess();
3683
 
553 chandransh 3684
      case UCEX:
3685
        return getUcex();
48 ashish 3686
 
3687
      }
3688
      throw new IllegalStateException();
3689
    }
3690
 
3691
    public Object getFieldValue(int fieldId) {
3692
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3693
    }
3694
 
3695
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3696
    public boolean isSet(_Fields field) {
3697
      switch (field) {
3698
      case SUCCESS:
3699
        return isSetSuccess();
553 chandransh 3700
      case UCEX:
3701
        return isSetUcex();
48 ashish 3702
      }
3703
      throw new IllegalStateException();
3704
    }
3705
 
3706
    public boolean isSet(int fieldID) {
3707
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3708
    }
3709
 
3710
    @Override
3711
    public boolean equals(Object that) {
3712
      if (that == null)
3713
        return false;
553 chandransh 3714
      if (that instanceof createAnonymousUser_result)
3715
        return this.equals((createAnonymousUser_result)that);
48 ashish 3716
      return false;
3717
    }
3718
 
553 chandransh 3719
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3720
      if (that == null)
3721
        return false;
3722
 
3723
      boolean this_present_success = true && this.isSetSuccess();
3724
      boolean that_present_success = true && that.isSetSuccess();
3725
      if (this_present_success || that_present_success) {
3726
        if (!(this_present_success && that_present_success))
3727
          return false;
3728
        if (!this.success.equals(that.success))
3729
          return false;
3730
      }
3731
 
553 chandransh 3732
      boolean this_present_ucex = true && this.isSetUcex();
3733
      boolean that_present_ucex = true && that.isSetUcex();
3734
      if (this_present_ucex || that_present_ucex) {
3735
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3736
          return false;
553 chandransh 3737
        if (!this.ucex.equals(that.ucex))
48 ashish 3738
          return false;
3739
      }
3740
 
3741
      return true;
3742
    }
3743
 
3744
    @Override
3745
    public int hashCode() {
3746
      return 0;
3747
    }
3748
 
571 rajveer 3749
    public int compareTo(createAnonymousUser_result other) {
3750
      if (!getClass().equals(other.getClass())) {
3751
        return getClass().getName().compareTo(other.getClass().getName());
3752
      }
3753
 
3754
      int lastComparison = 0;
3755
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3756
 
3757
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3758
      if (lastComparison != 0) {
3759
        return lastComparison;
3760
      }
3761
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3762
      if (lastComparison != 0) {
3763
        return lastComparison;
3764
      }
3765
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3766
      if (lastComparison != 0) {
3767
        return lastComparison;
3768
      }
3769
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3770
      if (lastComparison != 0) {
3771
        return lastComparison;
3772
      }
3773
      return 0;
3774
    }
3775
 
48 ashish 3776
    public void read(TProtocol iprot) throws TException {
3777
      TField field;
3778
      iprot.readStructBegin();
3779
      while (true)
3780
      {
3781
        field = iprot.readFieldBegin();
3782
        if (field.type == TType.STOP) { 
3783
          break;
3784
        }
3785
        _Fields fieldId = _Fields.findByThriftId(field.id);
3786
        if (fieldId == null) {
3787
          TProtocolUtil.skip(iprot, field.type);
3788
        } else {
3789
          switch (fieldId) {
3790
            case SUCCESS:
3791
              if (field.type == TType.STRUCT) {
553 chandransh 3792
                this.success = new User();
48 ashish 3793
                this.success.read(iprot);
3794
              } else { 
3795
                TProtocolUtil.skip(iprot, field.type);
3796
              }
3797
              break;
553 chandransh 3798
            case UCEX:
48 ashish 3799
              if (field.type == TType.STRUCT) {
553 chandransh 3800
                this.ucex = new UserContextException();
3801
                this.ucex.read(iprot);
48 ashish 3802
              } else { 
3803
                TProtocolUtil.skip(iprot, field.type);
3804
              }
3805
              break;
3806
          }
3807
          iprot.readFieldEnd();
3808
        }
3809
      }
3810
      iprot.readStructEnd();
3811
      validate();
3812
    }
3813
 
3814
    public void write(TProtocol oprot) throws TException {
3815
      oprot.writeStructBegin(STRUCT_DESC);
3816
 
3817
      if (this.isSetSuccess()) {
3818
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3819
        this.success.write(oprot);
3820
        oprot.writeFieldEnd();
553 chandransh 3821
      } else if (this.isSetUcex()) {
3822
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3823
        this.ucex.write(oprot);
48 ashish 3824
        oprot.writeFieldEnd();
3825
      }
3826
      oprot.writeFieldStop();
3827
      oprot.writeStructEnd();
3828
    }
3829
 
3830
    @Override
3831
    public String toString() {
553 chandransh 3832
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3833
      boolean first = true;
3834
 
3835
      sb.append("success:");
3836
      if (this.success == null) {
3837
        sb.append("null");
3838
      } else {
3839
        sb.append(this.success);
3840
      }
3841
      first = false;
3842
      if (!first) sb.append(", ");
553 chandransh 3843
      sb.append("ucex:");
3844
      if (this.ucex == null) {
48 ashish 3845
        sb.append("null");
3846
      } else {
553 chandransh 3847
        sb.append(this.ucex);
48 ashish 3848
      }
3849
      first = false;
3850
      sb.append(")");
3851
      return sb.toString();
3852
    }
3853
 
3854
    public void validate() throws TException {
3855
      // check for required fields
3856
    }
3857
 
3858
  }
3859
 
553 chandransh 3860
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
3861
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 3862
 
3863
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
3864
 
3865
    private long userId;
3866
 
3867
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3868
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3869
      USER_ID((short)1, "userId");
48 ashish 3870
 
3871
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3872
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3873
 
3874
      static {
3875
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3876
          byId.put((int)field._thriftId, field);
3877
          byName.put(field.getFieldName(), field);
3878
        }
3879
      }
3880
 
3881
      /**
3882
       * Find the _Fields constant that matches fieldId, or null if its not found.
3883
       */
3884
      public static _Fields findByThriftId(int fieldId) {
3885
        return byId.get(fieldId);
3886
      }
3887
 
3888
      /**
3889
       * Find the _Fields constant that matches fieldId, throwing an exception
3890
       * if it is not found.
3891
       */
3892
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3893
        _Fields fields = findByThriftId(fieldId);
3894
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3895
        return fields;
3896
      }
3897
 
3898
      /**
3899
       * Find the _Fields constant that matches name, or null if its not found.
3900
       */
3901
      public static _Fields findByName(String name) {
3902
        return byName.get(name);
3903
      }
3904
 
3905
      private final short _thriftId;
3906
      private final String _fieldName;
3907
 
3908
      _Fields(short thriftId, String fieldName) {
3909
        _thriftId = thriftId;
3910
        _fieldName = fieldName;
3911
      }
3912
 
3913
      public short getThriftFieldId() {
3914
        return _thriftId;
3915
      }
3916
 
3917
      public String getFieldName() {
3918
        return _fieldName;
3919
      }
3920
    }
3921
 
3922
    // isset id assignments
3923
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 3924
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 3925
 
3926
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3927
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
3928
          new FieldValueMetaData(TType.I64)));
3929
    }});
3930
 
3931
    static {
553 chandransh 3932
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 3933
    }
3934
 
553 chandransh 3935
    public getUserById_args() {
48 ashish 3936
    }
3937
 
553 chandransh 3938
    public getUserById_args(
3939
      long userId)
48 ashish 3940
    {
3941
      this();
3942
      this.userId = userId;
3943
      setUserIdIsSet(true);
3944
    }
3945
 
3946
    /**
3947
     * Performs a deep copy on <i>other</i>.
3948
     */
553 chandransh 3949
    public getUserById_args(getUserById_args other) {
48 ashish 3950
      __isset_bit_vector.clear();
3951
      __isset_bit_vector.or(other.__isset_bit_vector);
3952
      this.userId = other.userId;
3953
    }
3954
 
553 chandransh 3955
    public getUserById_args deepCopy() {
3956
      return new getUserById_args(this);
48 ashish 3957
    }
3958
 
3959
    @Deprecated
553 chandransh 3960
    public getUserById_args clone() {
3961
      return new getUserById_args(this);
48 ashish 3962
    }
3963
 
3964
    public long getUserId() {
3965
      return this.userId;
3966
    }
3967
 
553 chandransh 3968
    public getUserById_args setUserId(long userId) {
48 ashish 3969
      this.userId = userId;
3970
      setUserIdIsSet(true);
3971
      return this;
3972
    }
3973
 
3974
    public void unsetUserId() {
3975
      __isset_bit_vector.clear(__USERID_ISSET_ID);
3976
    }
3977
 
3978
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
3979
    public boolean isSetUserId() {
3980
      return __isset_bit_vector.get(__USERID_ISSET_ID);
3981
    }
3982
 
3983
    public void setUserIdIsSet(boolean value) {
3984
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
3985
    }
3986
 
3987
    public void setFieldValue(_Fields field, Object value) {
3988
      switch (field) {
3989
      case USER_ID:
3990
        if (value == null) {
3991
          unsetUserId();
3992
        } else {
3993
          setUserId((Long)value);
3994
        }
3995
        break;
3996
 
3997
      }
3998
    }
3999
 
4000
    public void setFieldValue(int fieldID, Object value) {
4001
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4002
    }
4003
 
4004
    public Object getFieldValue(_Fields field) {
4005
      switch (field) {
4006
      case USER_ID:
4007
        return new Long(getUserId());
4008
 
4009
      }
4010
      throw new IllegalStateException();
4011
    }
4012
 
4013
    public Object getFieldValue(int fieldId) {
4014
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4015
    }
4016
 
4017
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4018
    public boolean isSet(_Fields field) {
4019
      switch (field) {
4020
      case USER_ID:
4021
        return isSetUserId();
4022
      }
4023
      throw new IllegalStateException();
4024
    }
4025
 
4026
    public boolean isSet(int fieldID) {
4027
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4028
    }
4029
 
4030
    @Override
4031
    public boolean equals(Object that) {
4032
      if (that == null)
4033
        return false;
553 chandransh 4034
      if (that instanceof getUserById_args)
4035
        return this.equals((getUserById_args)that);
48 ashish 4036
      return false;
4037
    }
4038
 
553 chandransh 4039
    public boolean equals(getUserById_args that) {
48 ashish 4040
      if (that == null)
4041
        return false;
4042
 
4043
      boolean this_present_userId = true;
4044
      boolean that_present_userId = true;
4045
      if (this_present_userId || that_present_userId) {
4046
        if (!(this_present_userId && that_present_userId))
4047
          return false;
4048
        if (this.userId != that.userId)
4049
          return false;
4050
      }
4051
 
4052
      return true;
4053
    }
4054
 
4055
    @Override
4056
    public int hashCode() {
4057
      return 0;
4058
    }
4059
 
553 chandransh 4060
    public int compareTo(getUserById_args other) {
48 ashish 4061
      if (!getClass().equals(other.getClass())) {
4062
        return getClass().getName().compareTo(other.getClass().getName());
4063
      }
4064
 
4065
      int lastComparison = 0;
553 chandransh 4066
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4067
 
4068
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4069
      if (lastComparison != 0) {
4070
        return lastComparison;
4071
      }
4072
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4073
      if (lastComparison != 0) {
4074
        return lastComparison;
4075
      }
4076
      return 0;
4077
    }
4078
 
4079
    public void read(TProtocol iprot) throws TException {
4080
      TField field;
4081
      iprot.readStructBegin();
4082
      while (true)
4083
      {
4084
        field = iprot.readFieldBegin();
4085
        if (field.type == TType.STOP) { 
4086
          break;
4087
        }
4088
        _Fields fieldId = _Fields.findByThriftId(field.id);
4089
        if (fieldId == null) {
4090
          TProtocolUtil.skip(iprot, field.type);
4091
        } else {
4092
          switch (fieldId) {
4093
            case USER_ID:
4094
              if (field.type == TType.I64) {
4095
                this.userId = iprot.readI64();
4096
                setUserIdIsSet(true);
4097
              } else { 
4098
                TProtocolUtil.skip(iprot, field.type);
4099
              }
4100
              break;
4101
          }
4102
          iprot.readFieldEnd();
4103
        }
4104
      }
4105
      iprot.readStructEnd();
4106
      validate();
4107
    }
4108
 
4109
    public void write(TProtocol oprot) throws TException {
4110
      validate();
4111
 
4112
      oprot.writeStructBegin(STRUCT_DESC);
4113
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4114
      oprot.writeI64(this.userId);
4115
      oprot.writeFieldEnd();
4116
      oprot.writeFieldStop();
4117
      oprot.writeStructEnd();
4118
    }
4119
 
4120
    @Override
4121
    public String toString() {
553 chandransh 4122
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4123
      boolean first = true;
4124
 
4125
      sb.append("userId:");
4126
      sb.append(this.userId);
4127
      first = false;
4128
      sb.append(")");
4129
      return sb.toString();
4130
    }
4131
 
4132
    public void validate() throws TException {
4133
      // check for required fields
4134
    }
4135
 
4136
  }
4137
 
571 rajveer 4138
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4139
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4140
 
4141
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4142
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4143
 
553 chandransh 4144
    private User success;
4145
    private UserContextException ucex;
48 ashish 4146
 
4147
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4148
    public enum _Fields implements TFieldIdEnum {
4149
      SUCCESS((short)0, "success"),
553 chandransh 4150
      UCEX((short)1, "ucex");
48 ashish 4151
 
4152
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4153
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4154
 
4155
      static {
4156
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4157
          byId.put((int)field._thriftId, field);
4158
          byName.put(field.getFieldName(), field);
4159
        }
4160
      }
4161
 
4162
      /**
4163
       * Find the _Fields constant that matches fieldId, or null if its not found.
4164
       */
4165
      public static _Fields findByThriftId(int fieldId) {
4166
        return byId.get(fieldId);
4167
      }
4168
 
4169
      /**
4170
       * Find the _Fields constant that matches fieldId, throwing an exception
4171
       * if it is not found.
4172
       */
4173
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4174
        _Fields fields = findByThriftId(fieldId);
4175
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4176
        return fields;
4177
      }
4178
 
4179
      /**
4180
       * Find the _Fields constant that matches name, or null if its not found.
4181
       */
4182
      public static _Fields findByName(String name) {
4183
        return byName.get(name);
4184
      }
4185
 
4186
      private final short _thriftId;
4187
      private final String _fieldName;
4188
 
4189
      _Fields(short thriftId, String fieldName) {
4190
        _thriftId = thriftId;
4191
        _fieldName = fieldName;
4192
      }
4193
 
4194
      public short getThriftFieldId() {
4195
        return _thriftId;
4196
      }
4197
 
4198
      public String getFieldName() {
4199
        return _fieldName;
4200
      }
4201
    }
4202
 
4203
    // isset id assignments
4204
 
4205
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4206
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4207
          new StructMetaData(TType.STRUCT, User.class)));
4208
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4209
          new FieldValueMetaData(TType.STRUCT)));
4210
    }});
4211
 
4212
    static {
553 chandransh 4213
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4214
    }
4215
 
553 chandransh 4216
    public getUserById_result() {
48 ashish 4217
    }
4218
 
553 chandransh 4219
    public getUserById_result(
4220
      User success,
4221
      UserContextException ucex)
48 ashish 4222
    {
4223
      this();
4224
      this.success = success;
553 chandransh 4225
      this.ucex = ucex;
48 ashish 4226
    }
4227
 
4228
    /**
4229
     * Performs a deep copy on <i>other</i>.
4230
     */
553 chandransh 4231
    public getUserById_result(getUserById_result other) {
48 ashish 4232
      if (other.isSetSuccess()) {
553 chandransh 4233
        this.success = new User(other.success);
48 ashish 4234
      }
553 chandransh 4235
      if (other.isSetUcex()) {
4236
        this.ucex = new UserContextException(other.ucex);
48 ashish 4237
      }
4238
    }
4239
 
553 chandransh 4240
    public getUserById_result deepCopy() {
4241
      return new getUserById_result(this);
48 ashish 4242
    }
4243
 
4244
    @Deprecated
553 chandransh 4245
    public getUserById_result clone() {
4246
      return new getUserById_result(this);
48 ashish 4247
    }
4248
 
553 chandransh 4249
    public User getSuccess() {
48 ashish 4250
      return this.success;
4251
    }
4252
 
553 chandransh 4253
    public getUserById_result setSuccess(User success) {
48 ashish 4254
      this.success = success;
4255
      return this;
4256
    }
4257
 
4258
    public void unsetSuccess() {
4259
      this.success = null;
4260
    }
4261
 
4262
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4263
    public boolean isSetSuccess() {
4264
      return this.success != null;
4265
    }
4266
 
4267
    public void setSuccessIsSet(boolean value) {
4268
      if (!value) {
4269
        this.success = null;
4270
      }
4271
    }
4272
 
553 chandransh 4273
    public UserContextException getUcex() {
4274
      return this.ucex;
48 ashish 4275
    }
4276
 
553 chandransh 4277
    public getUserById_result setUcex(UserContextException ucex) {
4278
      this.ucex = ucex;
48 ashish 4279
      return this;
4280
    }
4281
 
553 chandransh 4282
    public void unsetUcex() {
4283
      this.ucex = null;
48 ashish 4284
    }
4285
 
553 chandransh 4286
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4287
    public boolean isSetUcex() {
4288
      return this.ucex != null;
48 ashish 4289
    }
4290
 
553 chandransh 4291
    public void setUcexIsSet(boolean value) {
48 ashish 4292
      if (!value) {
553 chandransh 4293
        this.ucex = null;
48 ashish 4294
      }
4295
    }
4296
 
4297
    public void setFieldValue(_Fields field, Object value) {
4298
      switch (field) {
4299
      case SUCCESS:
4300
        if (value == null) {
4301
          unsetSuccess();
4302
        } else {
553 chandransh 4303
          setSuccess((User)value);
48 ashish 4304
        }
4305
        break;
4306
 
553 chandransh 4307
      case UCEX:
48 ashish 4308
        if (value == null) {
553 chandransh 4309
          unsetUcex();
48 ashish 4310
        } else {
553 chandransh 4311
          setUcex((UserContextException)value);
48 ashish 4312
        }
4313
        break;
4314
 
4315
      }
4316
    }
4317
 
4318
    public void setFieldValue(int fieldID, Object value) {
4319
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4320
    }
4321
 
4322
    public Object getFieldValue(_Fields field) {
4323
      switch (field) {
4324
      case SUCCESS:
4325
        return getSuccess();
4326
 
553 chandransh 4327
      case UCEX:
4328
        return getUcex();
48 ashish 4329
 
4330
      }
4331
      throw new IllegalStateException();
4332
    }
4333
 
4334
    public Object getFieldValue(int fieldId) {
4335
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4336
    }
4337
 
4338
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4339
    public boolean isSet(_Fields field) {
4340
      switch (field) {
4341
      case SUCCESS:
4342
        return isSetSuccess();
553 chandransh 4343
      case UCEX:
4344
        return isSetUcex();
48 ashish 4345
      }
4346
      throw new IllegalStateException();
4347
    }
4348
 
4349
    public boolean isSet(int fieldID) {
4350
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4351
    }
4352
 
4353
    @Override
4354
    public boolean equals(Object that) {
4355
      if (that == null)
4356
        return false;
553 chandransh 4357
      if (that instanceof getUserById_result)
4358
        return this.equals((getUserById_result)that);
48 ashish 4359
      return false;
4360
    }
4361
 
553 chandransh 4362
    public boolean equals(getUserById_result that) {
48 ashish 4363
      if (that == null)
4364
        return false;
4365
 
4366
      boolean this_present_success = true && this.isSetSuccess();
4367
      boolean that_present_success = true && that.isSetSuccess();
4368
      if (this_present_success || that_present_success) {
4369
        if (!(this_present_success && that_present_success))
4370
          return false;
4371
        if (!this.success.equals(that.success))
4372
          return false;
4373
      }
4374
 
553 chandransh 4375
      boolean this_present_ucex = true && this.isSetUcex();
4376
      boolean that_present_ucex = true && that.isSetUcex();
4377
      if (this_present_ucex || that_present_ucex) {
4378
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4379
          return false;
553 chandransh 4380
        if (!this.ucex.equals(that.ucex))
48 ashish 4381
          return false;
4382
      }
4383
 
4384
      return true;
4385
    }
4386
 
4387
    @Override
4388
    public int hashCode() {
4389
      return 0;
4390
    }
4391
 
571 rajveer 4392
    public int compareTo(getUserById_result other) {
4393
      if (!getClass().equals(other.getClass())) {
4394
        return getClass().getName().compareTo(other.getClass().getName());
4395
      }
4396
 
4397
      int lastComparison = 0;
4398
      getUserById_result typedOther = (getUserById_result)other;
4399
 
4400
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4401
      if (lastComparison != 0) {
4402
        return lastComparison;
4403
      }
4404
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4405
      if (lastComparison != 0) {
4406
        return lastComparison;
4407
      }
4408
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4409
      if (lastComparison != 0) {
4410
        return lastComparison;
4411
      }
4412
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4413
      if (lastComparison != 0) {
4414
        return lastComparison;
4415
      }
4416
      return 0;
4417
    }
4418
 
48 ashish 4419
    public void read(TProtocol iprot) throws TException {
4420
      TField field;
4421
      iprot.readStructBegin();
4422
      while (true)
4423
      {
4424
        field = iprot.readFieldBegin();
4425
        if (field.type == TType.STOP) { 
4426
          break;
4427
        }
4428
        _Fields fieldId = _Fields.findByThriftId(field.id);
4429
        if (fieldId == null) {
4430
          TProtocolUtil.skip(iprot, field.type);
4431
        } else {
4432
          switch (fieldId) {
4433
            case SUCCESS:
4434
              if (field.type == TType.STRUCT) {
553 chandransh 4435
                this.success = new User();
48 ashish 4436
                this.success.read(iprot);
4437
              } else { 
4438
                TProtocolUtil.skip(iprot, field.type);
4439
              }
4440
              break;
553 chandransh 4441
            case UCEX:
48 ashish 4442
              if (field.type == TType.STRUCT) {
553 chandransh 4443
                this.ucex = new UserContextException();
4444
                this.ucex.read(iprot);
48 ashish 4445
              } else { 
4446
                TProtocolUtil.skip(iprot, field.type);
4447
              }
4448
              break;
4449
          }
4450
          iprot.readFieldEnd();
4451
        }
4452
      }
4453
      iprot.readStructEnd();
4454
      validate();
4455
    }
4456
 
4457
    public void write(TProtocol oprot) throws TException {
4458
      oprot.writeStructBegin(STRUCT_DESC);
4459
 
4460
      if (this.isSetSuccess()) {
4461
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4462
        this.success.write(oprot);
4463
        oprot.writeFieldEnd();
553 chandransh 4464
      } else if (this.isSetUcex()) {
4465
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4466
        this.ucex.write(oprot);
48 ashish 4467
        oprot.writeFieldEnd();
4468
      }
4469
      oprot.writeFieldStop();
4470
      oprot.writeStructEnd();
4471
    }
4472
 
4473
    @Override
4474
    public String toString() {
553 chandransh 4475
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4476
      boolean first = true;
4477
 
4478
      sb.append("success:");
4479
      if (this.success == null) {
4480
        sb.append("null");
4481
      } else {
4482
        sb.append(this.success);
4483
      }
4484
      first = false;
4485
      if (!first) sb.append(", ");
553 chandransh 4486
      sb.append("ucex:");
4487
      if (this.ucex == null) {
48 ashish 4488
        sb.append("null");
4489
      } else {
553 chandransh 4490
        sb.append(this.ucex);
48 ashish 4491
      }
4492
      first = false;
4493
      sb.append(")");
4494
      return sb.toString();
4495
    }
4496
 
4497
    public void validate() throws TException {
4498
      // check for required fields
4499
    }
4500
 
4501
  }
4502
 
571 rajveer 4503
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4504
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4505
 
553 chandransh 4506
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4507
 
553 chandransh 4508
    private User user;
48 ashish 4509
 
4510
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4511
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4512
      USER((short)1, "user");
48 ashish 4513
 
4514
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4515
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4516
 
4517
      static {
4518
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4519
          byId.put((int)field._thriftId, field);
4520
          byName.put(field.getFieldName(), field);
4521
        }
4522
      }
4523
 
4524
      /**
4525
       * Find the _Fields constant that matches fieldId, or null if its not found.
4526
       */
4527
      public static _Fields findByThriftId(int fieldId) {
4528
        return byId.get(fieldId);
4529
      }
4530
 
4531
      /**
4532
       * Find the _Fields constant that matches fieldId, throwing an exception
4533
       * if it is not found.
4534
       */
4535
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4536
        _Fields fields = findByThriftId(fieldId);
4537
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4538
        return fields;
4539
      }
4540
 
4541
      /**
4542
       * Find the _Fields constant that matches name, or null if its not found.
4543
       */
4544
      public static _Fields findByName(String name) {
4545
        return byName.get(name);
4546
      }
4547
 
4548
      private final short _thriftId;
4549
      private final String _fieldName;
4550
 
4551
      _Fields(short thriftId, String fieldName) {
4552
        _thriftId = thriftId;
4553
        _fieldName = fieldName;
4554
      }
4555
 
4556
      public short getThriftFieldId() {
4557
        return _thriftId;
4558
      }
4559
 
4560
      public String getFieldName() {
4561
        return _fieldName;
4562
      }
4563
    }
4564
 
4565
    // isset id assignments
4566
 
4567
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4568
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4569
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4570
    }});
4571
 
4572
    static {
553 chandransh 4573
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4574
    }
4575
 
553 chandransh 4576
    public createUser_args() {
48 ashish 4577
    }
4578
 
553 chandransh 4579
    public createUser_args(
4580
      User user)
48 ashish 4581
    {
4582
      this();
553 chandransh 4583
      this.user = user;
48 ashish 4584
    }
4585
 
4586
    /**
4587
     * Performs a deep copy on <i>other</i>.
4588
     */
553 chandransh 4589
    public createUser_args(createUser_args other) {
4590
      if (other.isSetUser()) {
4591
        this.user = new User(other.user);
48 ashish 4592
      }
4593
    }
4594
 
553 chandransh 4595
    public createUser_args deepCopy() {
4596
      return new createUser_args(this);
48 ashish 4597
    }
4598
 
4599
    @Deprecated
553 chandransh 4600
    public createUser_args clone() {
4601
      return new createUser_args(this);
48 ashish 4602
    }
4603
 
553 chandransh 4604
    public User getUser() {
4605
      return this.user;
48 ashish 4606
    }
4607
 
553 chandransh 4608
    public createUser_args setUser(User user) {
4609
      this.user = user;
48 ashish 4610
      return this;
4611
    }
4612
 
553 chandransh 4613
    public void unsetUser() {
4614
      this.user = null;
48 ashish 4615
    }
4616
 
553 chandransh 4617
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4618
    public boolean isSetUser() {
4619
      return this.user != null;
48 ashish 4620
    }
4621
 
553 chandransh 4622
    public void setUserIsSet(boolean value) {
48 ashish 4623
      if (!value) {
553 chandransh 4624
        this.user = null;
48 ashish 4625
      }
4626
    }
4627
 
4628
    public void setFieldValue(_Fields field, Object value) {
4629
      switch (field) {
553 chandransh 4630
      case USER:
48 ashish 4631
        if (value == null) {
553 chandransh 4632
          unsetUser();
48 ashish 4633
        } else {
553 chandransh 4634
          setUser((User)value);
48 ashish 4635
        }
4636
        break;
4637
 
4638
      }
4639
    }
4640
 
4641
    public void setFieldValue(int fieldID, Object value) {
4642
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4643
    }
4644
 
4645
    public Object getFieldValue(_Fields field) {
4646
      switch (field) {
553 chandransh 4647
      case USER:
4648
        return getUser();
48 ashish 4649
 
4650
      }
4651
      throw new IllegalStateException();
4652
    }
4653
 
4654
    public Object getFieldValue(int fieldId) {
4655
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4656
    }
4657
 
4658
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4659
    public boolean isSet(_Fields field) {
4660
      switch (field) {
553 chandransh 4661
      case USER:
4662
        return isSetUser();
48 ashish 4663
      }
4664
      throw new IllegalStateException();
4665
    }
4666
 
4667
    public boolean isSet(int fieldID) {
4668
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4669
    }
4670
 
4671
    @Override
4672
    public boolean equals(Object that) {
4673
      if (that == null)
4674
        return false;
553 chandransh 4675
      if (that instanceof createUser_args)
4676
        return this.equals((createUser_args)that);
48 ashish 4677
      return false;
4678
    }
4679
 
553 chandransh 4680
    public boolean equals(createUser_args that) {
48 ashish 4681
      if (that == null)
4682
        return false;
4683
 
553 chandransh 4684
      boolean this_present_user = true && this.isSetUser();
4685
      boolean that_present_user = true && that.isSetUser();
4686
      if (this_present_user || that_present_user) {
4687
        if (!(this_present_user && that_present_user))
48 ashish 4688
          return false;
553 chandransh 4689
        if (!this.user.equals(that.user))
48 ashish 4690
          return false;
4691
      }
4692
 
4693
      return true;
4694
    }
4695
 
4696
    @Override
4697
    public int hashCode() {
4698
      return 0;
4699
    }
4700
 
571 rajveer 4701
    public int compareTo(createUser_args other) {
4702
      if (!getClass().equals(other.getClass())) {
4703
        return getClass().getName().compareTo(other.getClass().getName());
4704
      }
4705
 
4706
      int lastComparison = 0;
4707
      createUser_args typedOther = (createUser_args)other;
4708
 
4709
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4710
      if (lastComparison != 0) {
4711
        return lastComparison;
4712
      }
4713
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4714
      if (lastComparison != 0) {
4715
        return lastComparison;
4716
      }
4717
      return 0;
4718
    }
4719
 
48 ashish 4720
    public void read(TProtocol iprot) throws TException {
4721
      TField field;
4722
      iprot.readStructBegin();
4723
      while (true)
4724
      {
4725
        field = iprot.readFieldBegin();
4726
        if (field.type == TType.STOP) { 
4727
          break;
4728
        }
4729
        _Fields fieldId = _Fields.findByThriftId(field.id);
4730
        if (fieldId == null) {
4731
          TProtocolUtil.skip(iprot, field.type);
4732
        } else {
4733
          switch (fieldId) {
553 chandransh 4734
            case USER:
4735
              if (field.type == TType.STRUCT) {
4736
                this.user = new User();
4737
                this.user.read(iprot);
48 ashish 4738
              } else { 
4739
                TProtocolUtil.skip(iprot, field.type);
4740
              }
4741
              break;
4742
          }
4743
          iprot.readFieldEnd();
4744
        }
4745
      }
4746
      iprot.readStructEnd();
4747
      validate();
4748
    }
4749
 
4750
    public void write(TProtocol oprot) throws TException {
4751
      validate();
4752
 
4753
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4754
      if (this.user != null) {
4755
        oprot.writeFieldBegin(USER_FIELD_DESC);
4756
        this.user.write(oprot);
48 ashish 4757
        oprot.writeFieldEnd();
4758
      }
4759
      oprot.writeFieldStop();
4760
      oprot.writeStructEnd();
4761
    }
4762
 
4763
    @Override
4764
    public String toString() {
553 chandransh 4765
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4766
      boolean first = true;
4767
 
553 chandransh 4768
      sb.append("user:");
4769
      if (this.user == null) {
48 ashish 4770
        sb.append("null");
4771
      } else {
553 chandransh 4772
        sb.append(this.user);
48 ashish 4773
      }
4774
      first = false;
4775
      sb.append(")");
4776
      return sb.toString();
4777
    }
4778
 
4779
    public void validate() throws TException {
4780
      // check for required fields
4781
    }
4782
 
4783
  }
4784
 
571 rajveer 4785
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 4786
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4787
 
4788
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4789
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4790
 
553 chandransh 4791
    private User success;
4792
    private UserContextException ucex;
48 ashish 4793
 
4794
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4795
    public enum _Fields implements TFieldIdEnum {
4796
      SUCCESS((short)0, "success"),
553 chandransh 4797
      UCEX((short)1, "ucex");
48 ashish 4798
 
4799
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4800
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4801
 
4802
      static {
4803
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4804
          byId.put((int)field._thriftId, field);
4805
          byName.put(field.getFieldName(), field);
4806
        }
4807
      }
4808
 
4809
      /**
4810
       * Find the _Fields constant that matches fieldId, or null if its not found.
4811
       */
4812
      public static _Fields findByThriftId(int fieldId) {
4813
        return byId.get(fieldId);
4814
      }
4815
 
4816
      /**
4817
       * Find the _Fields constant that matches fieldId, throwing an exception
4818
       * if it is not found.
4819
       */
4820
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4821
        _Fields fields = findByThriftId(fieldId);
4822
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4823
        return fields;
4824
      }
4825
 
4826
      /**
4827
       * Find the _Fields constant that matches name, or null if its not found.
4828
       */
4829
      public static _Fields findByName(String name) {
4830
        return byName.get(name);
4831
      }
4832
 
4833
      private final short _thriftId;
4834
      private final String _fieldName;
4835
 
4836
      _Fields(short thriftId, String fieldName) {
4837
        _thriftId = thriftId;
4838
        _fieldName = fieldName;
4839
      }
4840
 
4841
      public short getThriftFieldId() {
4842
        return _thriftId;
4843
      }
4844
 
4845
      public String getFieldName() {
4846
        return _fieldName;
4847
      }
4848
    }
4849
 
4850
    // isset id assignments
4851
 
4852
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4853
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4854
          new StructMetaData(TType.STRUCT, User.class)));
4855
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4856
          new FieldValueMetaData(TType.STRUCT)));
4857
    }});
4858
 
4859
    static {
553 chandransh 4860
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 4861
    }
4862
 
553 chandransh 4863
    public createUser_result() {
48 ashish 4864
    }
4865
 
553 chandransh 4866
    public createUser_result(
4867
      User success,
4868
      UserContextException ucex)
48 ashish 4869
    {
4870
      this();
4871
      this.success = success;
553 chandransh 4872
      this.ucex = ucex;
48 ashish 4873
    }
4874
 
4875
    /**
4876
     * Performs a deep copy on <i>other</i>.
4877
     */
553 chandransh 4878
    public createUser_result(createUser_result other) {
48 ashish 4879
      if (other.isSetSuccess()) {
553 chandransh 4880
        this.success = new User(other.success);
48 ashish 4881
      }
553 chandransh 4882
      if (other.isSetUcex()) {
4883
        this.ucex = new UserContextException(other.ucex);
48 ashish 4884
      }
4885
    }
4886
 
553 chandransh 4887
    public createUser_result deepCopy() {
4888
      return new createUser_result(this);
48 ashish 4889
    }
4890
 
4891
    @Deprecated
553 chandransh 4892
    public createUser_result clone() {
4893
      return new createUser_result(this);
48 ashish 4894
    }
4895
 
553 chandransh 4896
    public User getSuccess() {
48 ashish 4897
      return this.success;
4898
    }
4899
 
553 chandransh 4900
    public createUser_result setSuccess(User success) {
48 ashish 4901
      this.success = success;
4902
      return this;
4903
    }
4904
 
4905
    public void unsetSuccess() {
4906
      this.success = null;
4907
    }
4908
 
4909
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4910
    public boolean isSetSuccess() {
4911
      return this.success != null;
4912
    }
4913
 
4914
    public void setSuccessIsSet(boolean value) {
4915
      if (!value) {
4916
        this.success = null;
4917
      }
4918
    }
4919
 
553 chandransh 4920
    public UserContextException getUcex() {
4921
      return this.ucex;
48 ashish 4922
    }
4923
 
553 chandransh 4924
    public createUser_result setUcex(UserContextException ucex) {
4925
      this.ucex = ucex;
48 ashish 4926
      return this;
4927
    }
4928
 
553 chandransh 4929
    public void unsetUcex() {
4930
      this.ucex = null;
48 ashish 4931
    }
4932
 
553 chandransh 4933
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4934
    public boolean isSetUcex() {
4935
      return this.ucex != null;
48 ashish 4936
    }
4937
 
553 chandransh 4938
    public void setUcexIsSet(boolean value) {
48 ashish 4939
      if (!value) {
553 chandransh 4940
        this.ucex = null;
48 ashish 4941
      }
4942
    }
4943
 
4944
    public void setFieldValue(_Fields field, Object value) {
4945
      switch (field) {
4946
      case SUCCESS:
4947
        if (value == null) {
4948
          unsetSuccess();
4949
        } else {
553 chandransh 4950
          setSuccess((User)value);
48 ashish 4951
        }
4952
        break;
4953
 
553 chandransh 4954
      case UCEX:
48 ashish 4955
        if (value == null) {
553 chandransh 4956
          unsetUcex();
48 ashish 4957
        } else {
553 chandransh 4958
          setUcex((UserContextException)value);
48 ashish 4959
        }
4960
        break;
4961
 
4962
      }
4963
    }
4964
 
4965
    public void setFieldValue(int fieldID, Object value) {
4966
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4967
    }
4968
 
4969
    public Object getFieldValue(_Fields field) {
4970
      switch (field) {
4971
      case SUCCESS:
4972
        return getSuccess();
4973
 
553 chandransh 4974
      case UCEX:
4975
        return getUcex();
48 ashish 4976
 
4977
      }
4978
      throw new IllegalStateException();
4979
    }
4980
 
4981
    public Object getFieldValue(int fieldId) {
4982
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4983
    }
4984
 
4985
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4986
    public boolean isSet(_Fields field) {
4987
      switch (field) {
4988
      case SUCCESS:
4989
        return isSetSuccess();
553 chandransh 4990
      case UCEX:
4991
        return isSetUcex();
48 ashish 4992
      }
4993
      throw new IllegalStateException();
4994
    }
4995
 
4996
    public boolean isSet(int fieldID) {
4997
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4998
    }
4999
 
5000
    @Override
5001
    public boolean equals(Object that) {
5002
      if (that == null)
5003
        return false;
553 chandransh 5004
      if (that instanceof createUser_result)
5005
        return this.equals((createUser_result)that);
48 ashish 5006
      return false;
5007
    }
5008
 
553 chandransh 5009
    public boolean equals(createUser_result that) {
48 ashish 5010
      if (that == null)
5011
        return false;
5012
 
5013
      boolean this_present_success = true && this.isSetSuccess();
5014
      boolean that_present_success = true && that.isSetSuccess();
5015
      if (this_present_success || that_present_success) {
5016
        if (!(this_present_success && that_present_success))
5017
          return false;
5018
        if (!this.success.equals(that.success))
5019
          return false;
5020
      }
5021
 
553 chandransh 5022
      boolean this_present_ucex = true && this.isSetUcex();
5023
      boolean that_present_ucex = true && that.isSetUcex();
5024
      if (this_present_ucex || that_present_ucex) {
5025
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5026
          return false;
553 chandransh 5027
        if (!this.ucex.equals(that.ucex))
48 ashish 5028
          return false;
5029
      }
5030
 
5031
      return true;
5032
    }
5033
 
5034
    @Override
5035
    public int hashCode() {
5036
      return 0;
5037
    }
5038
 
571 rajveer 5039
    public int compareTo(createUser_result other) {
5040
      if (!getClass().equals(other.getClass())) {
5041
        return getClass().getName().compareTo(other.getClass().getName());
5042
      }
5043
 
5044
      int lastComparison = 0;
5045
      createUser_result typedOther = (createUser_result)other;
5046
 
5047
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5048
      if (lastComparison != 0) {
5049
        return lastComparison;
5050
      }
5051
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5052
      if (lastComparison != 0) {
5053
        return lastComparison;
5054
      }
5055
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5056
      if (lastComparison != 0) {
5057
        return lastComparison;
5058
      }
5059
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5060
      if (lastComparison != 0) {
5061
        return lastComparison;
5062
      }
5063
      return 0;
5064
    }
5065
 
48 ashish 5066
    public void read(TProtocol iprot) throws TException {
5067
      TField field;
5068
      iprot.readStructBegin();
5069
      while (true)
5070
      {
5071
        field = iprot.readFieldBegin();
5072
        if (field.type == TType.STOP) { 
5073
          break;
5074
        }
5075
        _Fields fieldId = _Fields.findByThriftId(field.id);
5076
        if (fieldId == null) {
5077
          TProtocolUtil.skip(iprot, field.type);
5078
        } else {
5079
          switch (fieldId) {
5080
            case SUCCESS:
5081
              if (field.type == TType.STRUCT) {
553 chandransh 5082
                this.success = new User();
48 ashish 5083
                this.success.read(iprot);
5084
              } else { 
5085
                TProtocolUtil.skip(iprot, field.type);
5086
              }
5087
              break;
553 chandransh 5088
            case UCEX:
48 ashish 5089
              if (field.type == TType.STRUCT) {
553 chandransh 5090
                this.ucex = new UserContextException();
5091
                this.ucex.read(iprot);
48 ashish 5092
              } else { 
5093
                TProtocolUtil.skip(iprot, field.type);
5094
              }
5095
              break;
5096
          }
5097
          iprot.readFieldEnd();
5098
        }
5099
      }
5100
      iprot.readStructEnd();
5101
      validate();
5102
    }
5103
 
5104
    public void write(TProtocol oprot) throws TException {
5105
      oprot.writeStructBegin(STRUCT_DESC);
5106
 
5107
      if (this.isSetSuccess()) {
5108
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5109
        this.success.write(oprot);
5110
        oprot.writeFieldEnd();
553 chandransh 5111
      } else if (this.isSetUcex()) {
5112
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5113
        this.ucex.write(oprot);
48 ashish 5114
        oprot.writeFieldEnd();
5115
      }
5116
      oprot.writeFieldStop();
5117
      oprot.writeStructEnd();
5118
    }
5119
 
5120
    @Override
5121
    public String toString() {
553 chandransh 5122
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 5123
      boolean first = true;
5124
 
5125
      sb.append("success:");
5126
      if (this.success == null) {
5127
        sb.append("null");
5128
      } else {
5129
        sb.append(this.success);
5130
      }
5131
      first = false;
5132
      if (!first) sb.append(", ");
553 chandransh 5133
      sb.append("ucex:");
5134
      if (this.ucex == null) {
48 ashish 5135
        sb.append("null");
5136
      } else {
553 chandransh 5137
        sb.append(this.ucex);
48 ashish 5138
      }
5139
      first = false;
5140
      sb.append(")");
5141
      return sb.toString();
5142
    }
5143
 
5144
    public void validate() throws TException {
5145
      // check for required fields
5146
    }
5147
 
5148
  }
5149
 
571 rajveer 5150
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 5151
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 5152
 
553 chandransh 5153
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5154
 
553 chandransh 5155
    private User user;
48 ashish 5156
 
5157
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5158
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5159
      USER((short)1, "user");
48 ashish 5160
 
5161
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5162
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5163
 
5164
      static {
5165
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5166
          byId.put((int)field._thriftId, field);
5167
          byName.put(field.getFieldName(), field);
5168
        }
5169
      }
5170
 
5171
      /**
5172
       * Find the _Fields constant that matches fieldId, or null if its not found.
5173
       */
5174
      public static _Fields findByThriftId(int fieldId) {
5175
        return byId.get(fieldId);
5176
      }
5177
 
5178
      /**
5179
       * Find the _Fields constant that matches fieldId, throwing an exception
5180
       * if it is not found.
5181
       */
5182
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5183
        _Fields fields = findByThriftId(fieldId);
5184
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5185
        return fields;
5186
      }
5187
 
5188
      /**
5189
       * Find the _Fields constant that matches name, or null if its not found.
5190
       */
5191
      public static _Fields findByName(String name) {
5192
        return byName.get(name);
5193
      }
5194
 
5195
      private final short _thriftId;
5196
      private final String _fieldName;
5197
 
5198
      _Fields(short thriftId, String fieldName) {
5199
        _thriftId = thriftId;
5200
        _fieldName = fieldName;
5201
      }
5202
 
5203
      public short getThriftFieldId() {
5204
        return _thriftId;
5205
      }
5206
 
5207
      public String getFieldName() {
5208
        return _fieldName;
5209
      }
5210
    }
5211
 
5212
    // isset id assignments
5213
 
5214
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5215
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5216
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5217
    }});
5218
 
5219
    static {
553 chandransh 5220
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 5221
    }
5222
 
553 chandransh 5223
    public updateUser_args() {
48 ashish 5224
    }
5225
 
553 chandransh 5226
    public updateUser_args(
5227
      User user)
48 ashish 5228
    {
5229
      this();
553 chandransh 5230
      this.user = user;
48 ashish 5231
    }
5232
 
5233
    /**
5234
     * Performs a deep copy on <i>other</i>.
5235
     */
553 chandransh 5236
    public updateUser_args(updateUser_args other) {
5237
      if (other.isSetUser()) {
5238
        this.user = new User(other.user);
5239
      }
48 ashish 5240
    }
5241
 
553 chandransh 5242
    public updateUser_args deepCopy() {
5243
      return new updateUser_args(this);
48 ashish 5244
    }
5245
 
5246
    @Deprecated
553 chandransh 5247
    public updateUser_args clone() {
5248
      return new updateUser_args(this);
48 ashish 5249
    }
5250
 
553 chandransh 5251
    public User getUser() {
5252
      return this.user;
48 ashish 5253
    }
5254
 
553 chandransh 5255
    public updateUser_args setUser(User user) {
5256
      this.user = user;
48 ashish 5257
      return this;
5258
    }
5259
 
553 chandransh 5260
    public void unsetUser() {
5261
      this.user = null;
48 ashish 5262
    }
5263
 
553 chandransh 5264
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5265
    public boolean isSetUser() {
5266
      return this.user != null;
48 ashish 5267
    }
5268
 
553 chandransh 5269
    public void setUserIsSet(boolean value) {
5270
      if (!value) {
5271
        this.user = null;
5272
      }
48 ashish 5273
    }
5274
 
5275
    public void setFieldValue(_Fields field, Object value) {
5276
      switch (field) {
553 chandransh 5277
      case USER:
48 ashish 5278
        if (value == null) {
553 chandransh 5279
          unsetUser();
48 ashish 5280
        } else {
553 chandransh 5281
          setUser((User)value);
48 ashish 5282
        }
5283
        break;
5284
 
5285
      }
5286
    }
5287
 
5288
    public void setFieldValue(int fieldID, Object value) {
5289
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5290
    }
5291
 
5292
    public Object getFieldValue(_Fields field) {
5293
      switch (field) {
553 chandransh 5294
      case USER:
5295
        return getUser();
48 ashish 5296
 
5297
      }
5298
      throw new IllegalStateException();
5299
    }
5300
 
5301
    public Object getFieldValue(int fieldId) {
5302
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5303
    }
5304
 
5305
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5306
    public boolean isSet(_Fields field) {
5307
      switch (field) {
553 chandransh 5308
      case USER:
5309
        return isSetUser();
48 ashish 5310
      }
5311
      throw new IllegalStateException();
5312
    }
5313
 
5314
    public boolean isSet(int fieldID) {
5315
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5316
    }
5317
 
5318
    @Override
5319
    public boolean equals(Object that) {
5320
      if (that == null)
5321
        return false;
553 chandransh 5322
      if (that instanceof updateUser_args)
5323
        return this.equals((updateUser_args)that);
48 ashish 5324
      return false;
5325
    }
5326
 
553 chandransh 5327
    public boolean equals(updateUser_args that) {
48 ashish 5328
      if (that == null)
5329
        return false;
5330
 
553 chandransh 5331
      boolean this_present_user = true && this.isSetUser();
5332
      boolean that_present_user = true && that.isSetUser();
5333
      if (this_present_user || that_present_user) {
5334
        if (!(this_present_user && that_present_user))
48 ashish 5335
          return false;
553 chandransh 5336
        if (!this.user.equals(that.user))
48 ashish 5337
          return false;
5338
      }
5339
 
5340
      return true;
5341
    }
5342
 
5343
    @Override
5344
    public int hashCode() {
5345
      return 0;
5346
    }
5347
 
571 rajveer 5348
    public int compareTo(updateUser_args other) {
5349
      if (!getClass().equals(other.getClass())) {
5350
        return getClass().getName().compareTo(other.getClass().getName());
5351
      }
5352
 
5353
      int lastComparison = 0;
5354
      updateUser_args typedOther = (updateUser_args)other;
5355
 
5356
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5357
      if (lastComparison != 0) {
5358
        return lastComparison;
5359
      }
5360
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5361
      if (lastComparison != 0) {
5362
        return lastComparison;
5363
      }
5364
      return 0;
5365
    }
5366
 
48 ashish 5367
    public void read(TProtocol iprot) throws TException {
5368
      TField field;
5369
      iprot.readStructBegin();
5370
      while (true)
5371
      {
5372
        field = iprot.readFieldBegin();
5373
        if (field.type == TType.STOP) { 
5374
          break;
5375
        }
5376
        _Fields fieldId = _Fields.findByThriftId(field.id);
5377
        if (fieldId == null) {
5378
          TProtocolUtil.skip(iprot, field.type);
5379
        } else {
5380
          switch (fieldId) {
553 chandransh 5381
            case USER:
5382
              if (field.type == TType.STRUCT) {
5383
                this.user = new User();
5384
                this.user.read(iprot);
48 ashish 5385
              } else { 
5386
                TProtocolUtil.skip(iprot, field.type);
5387
              }
5388
              break;
5389
          }
5390
          iprot.readFieldEnd();
5391
        }
5392
      }
5393
      iprot.readStructEnd();
5394
      validate();
5395
    }
5396
 
5397
    public void write(TProtocol oprot) throws TException {
5398
      validate();
5399
 
5400
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5401
      if (this.user != null) {
5402
        oprot.writeFieldBegin(USER_FIELD_DESC);
5403
        this.user.write(oprot);
5404
        oprot.writeFieldEnd();
5405
      }
48 ashish 5406
      oprot.writeFieldStop();
5407
      oprot.writeStructEnd();
5408
    }
5409
 
5410
    @Override
5411
    public String toString() {
553 chandransh 5412
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5413
      boolean first = true;
5414
 
553 chandransh 5415
      sb.append("user:");
5416
      if (this.user == null) {
5417
        sb.append("null");
5418
      } else {
5419
        sb.append(this.user);
5420
      }
48 ashish 5421
      first = false;
5422
      sb.append(")");
5423
      return sb.toString();
5424
    }
5425
 
5426
    public void validate() throws TException {
5427
      // check for required fields
5428
    }
5429
 
5430
  }
5431
 
571 rajveer 5432
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5433
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5434
 
5435
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5436
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5437
 
553 chandransh 5438
    private User success;
5439
    private UserContextException ucex;
48 ashish 5440
 
5441
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5442
    public enum _Fields implements TFieldIdEnum {
5443
      SUCCESS((short)0, "success"),
553 chandransh 5444
      UCEX((short)1, "ucex");
48 ashish 5445
 
5446
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5447
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5448
 
5449
      static {
5450
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5451
          byId.put((int)field._thriftId, field);
5452
          byName.put(field.getFieldName(), field);
5453
        }
5454
      }
5455
 
5456
      /**
5457
       * Find the _Fields constant that matches fieldId, or null if its not found.
5458
       */
5459
      public static _Fields findByThriftId(int fieldId) {
5460
        return byId.get(fieldId);
5461
      }
5462
 
5463
      /**
5464
       * Find the _Fields constant that matches fieldId, throwing an exception
5465
       * if it is not found.
5466
       */
5467
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5468
        _Fields fields = findByThriftId(fieldId);
5469
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5470
        return fields;
5471
      }
5472
 
5473
      /**
5474
       * Find the _Fields constant that matches name, or null if its not found.
5475
       */
5476
      public static _Fields findByName(String name) {
5477
        return byName.get(name);
5478
      }
5479
 
5480
      private final short _thriftId;
5481
      private final String _fieldName;
5482
 
5483
      _Fields(short thriftId, String fieldName) {
5484
        _thriftId = thriftId;
5485
        _fieldName = fieldName;
5486
      }
5487
 
5488
      public short getThriftFieldId() {
5489
        return _thriftId;
5490
      }
5491
 
5492
      public String getFieldName() {
5493
        return _fieldName;
5494
      }
5495
    }
5496
 
5497
    // isset id assignments
5498
 
5499
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5500
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5501
          new StructMetaData(TType.STRUCT, User.class)));
5502
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5503
          new FieldValueMetaData(TType.STRUCT)));
5504
    }});
5505
 
5506
    static {
553 chandransh 5507
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5508
    }
5509
 
553 chandransh 5510
    public updateUser_result() {
48 ashish 5511
    }
5512
 
553 chandransh 5513
    public updateUser_result(
5514
      User success,
5515
      UserContextException ucex)
48 ashish 5516
    {
5517
      this();
5518
      this.success = success;
553 chandransh 5519
      this.ucex = ucex;
48 ashish 5520
    }
5521
 
5522
    /**
5523
     * Performs a deep copy on <i>other</i>.
5524
     */
553 chandransh 5525
    public updateUser_result(updateUser_result other) {
48 ashish 5526
      if (other.isSetSuccess()) {
553 chandransh 5527
        this.success = new User(other.success);
48 ashish 5528
      }
553 chandransh 5529
      if (other.isSetUcex()) {
5530
        this.ucex = new UserContextException(other.ucex);
48 ashish 5531
      }
5532
    }
5533
 
553 chandransh 5534
    public updateUser_result deepCopy() {
5535
      return new updateUser_result(this);
48 ashish 5536
    }
5537
 
5538
    @Deprecated
553 chandransh 5539
    public updateUser_result clone() {
5540
      return new updateUser_result(this);
48 ashish 5541
    }
5542
 
553 chandransh 5543
    public User getSuccess() {
48 ashish 5544
      return this.success;
5545
    }
5546
 
553 chandransh 5547
    public updateUser_result setSuccess(User success) {
48 ashish 5548
      this.success = success;
5549
      return this;
5550
    }
5551
 
5552
    public void unsetSuccess() {
5553
      this.success = null;
5554
    }
5555
 
5556
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5557
    public boolean isSetSuccess() {
5558
      return this.success != null;
5559
    }
5560
 
5561
    public void setSuccessIsSet(boolean value) {
5562
      if (!value) {
5563
        this.success = null;
5564
      }
5565
    }
5566
 
553 chandransh 5567
    public UserContextException getUcex() {
5568
      return this.ucex;
48 ashish 5569
    }
5570
 
553 chandransh 5571
    public updateUser_result setUcex(UserContextException ucex) {
5572
      this.ucex = ucex;
48 ashish 5573
      return this;
5574
    }
5575
 
553 chandransh 5576
    public void unsetUcex() {
5577
      this.ucex = null;
48 ashish 5578
    }
5579
 
553 chandransh 5580
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5581
    public boolean isSetUcex() {
5582
      return this.ucex != null;
48 ashish 5583
    }
5584
 
553 chandransh 5585
    public void setUcexIsSet(boolean value) {
48 ashish 5586
      if (!value) {
553 chandransh 5587
        this.ucex = null;
48 ashish 5588
      }
5589
    }
5590
 
5591
    public void setFieldValue(_Fields field, Object value) {
5592
      switch (field) {
5593
      case SUCCESS:
5594
        if (value == null) {
5595
          unsetSuccess();
5596
        } else {
553 chandransh 5597
          setSuccess((User)value);
48 ashish 5598
        }
5599
        break;
5600
 
553 chandransh 5601
      case UCEX:
48 ashish 5602
        if (value == null) {
553 chandransh 5603
          unsetUcex();
48 ashish 5604
        } else {
553 chandransh 5605
          setUcex((UserContextException)value);
48 ashish 5606
        }
5607
        break;
5608
 
5609
      }
5610
    }
5611
 
5612
    public void setFieldValue(int fieldID, Object value) {
5613
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5614
    }
5615
 
5616
    public Object getFieldValue(_Fields field) {
5617
      switch (field) {
5618
      case SUCCESS:
5619
        return getSuccess();
5620
 
553 chandransh 5621
      case UCEX:
5622
        return getUcex();
48 ashish 5623
 
5624
      }
5625
      throw new IllegalStateException();
5626
    }
5627
 
5628
    public Object getFieldValue(int fieldId) {
5629
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5630
    }
5631
 
5632
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5633
    public boolean isSet(_Fields field) {
5634
      switch (field) {
5635
      case SUCCESS:
5636
        return isSetSuccess();
553 chandransh 5637
      case UCEX:
5638
        return isSetUcex();
48 ashish 5639
      }
5640
      throw new IllegalStateException();
5641
    }
5642
 
5643
    public boolean isSet(int fieldID) {
5644
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5645
    }
5646
 
5647
    @Override
5648
    public boolean equals(Object that) {
5649
      if (that == null)
5650
        return false;
553 chandransh 5651
      if (that instanceof updateUser_result)
5652
        return this.equals((updateUser_result)that);
48 ashish 5653
      return false;
5654
    }
5655
 
553 chandransh 5656
    public boolean equals(updateUser_result that) {
48 ashish 5657
      if (that == null)
5658
        return false;
5659
 
5660
      boolean this_present_success = true && this.isSetSuccess();
5661
      boolean that_present_success = true && that.isSetSuccess();
5662
      if (this_present_success || that_present_success) {
5663
        if (!(this_present_success && that_present_success))
5664
          return false;
5665
        if (!this.success.equals(that.success))
5666
          return false;
5667
      }
5668
 
553 chandransh 5669
      boolean this_present_ucex = true && this.isSetUcex();
5670
      boolean that_present_ucex = true && that.isSetUcex();
5671
      if (this_present_ucex || that_present_ucex) {
5672
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5673
          return false;
553 chandransh 5674
        if (!this.ucex.equals(that.ucex))
48 ashish 5675
          return false;
5676
      }
5677
 
5678
      return true;
5679
    }
5680
 
5681
    @Override
5682
    public int hashCode() {
5683
      return 0;
5684
    }
5685
 
571 rajveer 5686
    public int compareTo(updateUser_result other) {
5687
      if (!getClass().equals(other.getClass())) {
5688
        return getClass().getName().compareTo(other.getClass().getName());
5689
      }
5690
 
5691
      int lastComparison = 0;
5692
      updateUser_result typedOther = (updateUser_result)other;
5693
 
5694
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5695
      if (lastComparison != 0) {
5696
        return lastComparison;
5697
      }
5698
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5699
      if (lastComparison != 0) {
5700
        return lastComparison;
5701
      }
5702
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5703
      if (lastComparison != 0) {
5704
        return lastComparison;
5705
      }
5706
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5707
      if (lastComparison != 0) {
5708
        return lastComparison;
5709
      }
5710
      return 0;
5711
    }
5712
 
48 ashish 5713
    public void read(TProtocol iprot) throws TException {
5714
      TField field;
5715
      iprot.readStructBegin();
5716
      while (true)
5717
      {
5718
        field = iprot.readFieldBegin();
5719
        if (field.type == TType.STOP) { 
5720
          break;
5721
        }
5722
        _Fields fieldId = _Fields.findByThriftId(field.id);
5723
        if (fieldId == null) {
5724
          TProtocolUtil.skip(iprot, field.type);
5725
        } else {
5726
          switch (fieldId) {
5727
            case SUCCESS:
5728
              if (field.type == TType.STRUCT) {
553 chandransh 5729
                this.success = new User();
48 ashish 5730
                this.success.read(iprot);
5731
              } else { 
5732
                TProtocolUtil.skip(iprot, field.type);
5733
              }
5734
              break;
553 chandransh 5735
            case UCEX:
48 ashish 5736
              if (field.type == TType.STRUCT) {
553 chandransh 5737
                this.ucex = new UserContextException();
5738
                this.ucex.read(iprot);
48 ashish 5739
              } else { 
5740
                TProtocolUtil.skip(iprot, field.type);
5741
              }
5742
              break;
5743
          }
5744
          iprot.readFieldEnd();
5745
        }
5746
      }
5747
      iprot.readStructEnd();
5748
      validate();
5749
    }
5750
 
5751
    public void write(TProtocol oprot) throws TException {
5752
      oprot.writeStructBegin(STRUCT_DESC);
5753
 
5754
      if (this.isSetSuccess()) {
5755
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5756
        this.success.write(oprot);
5757
        oprot.writeFieldEnd();
553 chandransh 5758
      } else if (this.isSetUcex()) {
5759
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5760
        this.ucex.write(oprot);
48 ashish 5761
        oprot.writeFieldEnd();
5762
      }
5763
      oprot.writeFieldStop();
5764
      oprot.writeStructEnd();
5765
    }
5766
 
5767
    @Override
5768
    public String toString() {
553 chandransh 5769
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5770
      boolean first = true;
5771
 
5772
      sb.append("success:");
5773
      if (this.success == null) {
5774
        sb.append("null");
5775
      } else {
5776
        sb.append(this.success);
5777
      }
5778
      first = false;
5779
      if (!first) sb.append(", ");
553 chandransh 5780
      sb.append("ucex:");
5781
      if (this.ucex == null) {
48 ashish 5782
        sb.append("null");
5783
      } else {
553 chandransh 5784
        sb.append(this.ucex);
48 ashish 5785
      }
5786
      first = false;
5787
      sb.append(")");
5788
      return sb.toString();
5789
    }
5790
 
5791
    public void validate() throws TException {
5792
      // check for required fields
5793
    }
5794
 
5795
  }
5796
 
553 chandransh 5797
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5798
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5799
 
5800
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5801
 
5802
    private long userId;
5803
 
5804
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5805
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5806
      USER_ID((short)1, "userId");
48 ashish 5807
 
5808
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5809
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5810
 
5811
      static {
5812
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5813
          byId.put((int)field._thriftId, field);
5814
          byName.put(field.getFieldName(), field);
5815
        }
5816
      }
5817
 
5818
      /**
5819
       * Find the _Fields constant that matches fieldId, or null if its not found.
5820
       */
5821
      public static _Fields findByThriftId(int fieldId) {
5822
        return byId.get(fieldId);
5823
      }
5824
 
5825
      /**
5826
       * Find the _Fields constant that matches fieldId, throwing an exception
5827
       * if it is not found.
5828
       */
5829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5830
        _Fields fields = findByThriftId(fieldId);
5831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5832
        return fields;
5833
      }
5834
 
5835
      /**
5836
       * Find the _Fields constant that matches name, or null if its not found.
5837
       */
5838
      public static _Fields findByName(String name) {
5839
        return byName.get(name);
5840
      }
5841
 
5842
      private final short _thriftId;
5843
      private final String _fieldName;
5844
 
5845
      _Fields(short thriftId, String fieldName) {
5846
        _thriftId = thriftId;
5847
        _fieldName = fieldName;
5848
      }
5849
 
5850
      public short getThriftFieldId() {
5851
        return _thriftId;
5852
      }
5853
 
5854
      public String getFieldName() {
5855
        return _fieldName;
5856
      }
5857
    }
5858
 
5859
    // isset id assignments
5860
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 5861
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 5862
 
5863
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5864
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
5865
          new FieldValueMetaData(TType.I64)));
5866
    }});
5867
 
5868
    static {
553 chandransh 5869
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 5870
    }
5871
 
553 chandransh 5872
    public deleteUser_args() {
48 ashish 5873
    }
5874
 
553 chandransh 5875
    public deleteUser_args(
5876
      long userId)
48 ashish 5877
    {
5878
      this();
5879
      this.userId = userId;
5880
      setUserIdIsSet(true);
5881
    }
5882
 
5883
    /**
5884
     * Performs a deep copy on <i>other</i>.
5885
     */
553 chandransh 5886
    public deleteUser_args(deleteUser_args other) {
48 ashish 5887
      __isset_bit_vector.clear();
5888
      __isset_bit_vector.or(other.__isset_bit_vector);
5889
      this.userId = other.userId;
5890
    }
5891
 
553 chandransh 5892
    public deleteUser_args deepCopy() {
5893
      return new deleteUser_args(this);
48 ashish 5894
    }
5895
 
5896
    @Deprecated
553 chandransh 5897
    public deleteUser_args clone() {
5898
      return new deleteUser_args(this);
48 ashish 5899
    }
5900
 
5901
    public long getUserId() {
5902
      return this.userId;
5903
    }
5904
 
553 chandransh 5905
    public deleteUser_args setUserId(long userId) {
48 ashish 5906
      this.userId = userId;
5907
      setUserIdIsSet(true);
5908
      return this;
5909
    }
5910
 
5911
    public void unsetUserId() {
5912
      __isset_bit_vector.clear(__USERID_ISSET_ID);
5913
    }
5914
 
5915
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
5916
    public boolean isSetUserId() {
5917
      return __isset_bit_vector.get(__USERID_ISSET_ID);
5918
    }
5919
 
5920
    public void setUserIdIsSet(boolean value) {
5921
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
5922
    }
5923
 
5924
    public void setFieldValue(_Fields field, Object value) {
5925
      switch (field) {
5926
      case USER_ID:
5927
        if (value == null) {
5928
          unsetUserId();
5929
        } else {
5930
          setUserId((Long)value);
5931
        }
5932
        break;
5933
 
5934
      }
5935
    }
5936
 
5937
    public void setFieldValue(int fieldID, Object value) {
5938
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5939
    }
5940
 
5941
    public Object getFieldValue(_Fields field) {
5942
      switch (field) {
5943
      case USER_ID:
5944
        return new Long(getUserId());
5945
 
5946
      }
5947
      throw new IllegalStateException();
5948
    }
5949
 
5950
    public Object getFieldValue(int fieldId) {
5951
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5952
    }
5953
 
5954
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5955
    public boolean isSet(_Fields field) {
5956
      switch (field) {
5957
      case USER_ID:
5958
        return isSetUserId();
5959
      }
5960
      throw new IllegalStateException();
5961
    }
5962
 
5963
    public boolean isSet(int fieldID) {
5964
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5965
    }
5966
 
5967
    @Override
5968
    public boolean equals(Object that) {
5969
      if (that == null)
5970
        return false;
553 chandransh 5971
      if (that instanceof deleteUser_args)
5972
        return this.equals((deleteUser_args)that);
48 ashish 5973
      return false;
5974
    }
5975
 
553 chandransh 5976
    public boolean equals(deleteUser_args that) {
48 ashish 5977
      if (that == null)
5978
        return false;
5979
 
5980
      boolean this_present_userId = true;
5981
      boolean that_present_userId = true;
5982
      if (this_present_userId || that_present_userId) {
5983
        if (!(this_present_userId && that_present_userId))
5984
          return false;
5985
        if (this.userId != that.userId)
5986
          return false;
5987
      }
5988
 
5989
      return true;
5990
    }
5991
 
5992
    @Override
5993
    public int hashCode() {
5994
      return 0;
5995
    }
5996
 
553 chandransh 5997
    public int compareTo(deleteUser_args other) {
48 ashish 5998
      if (!getClass().equals(other.getClass())) {
5999
        return getClass().getName().compareTo(other.getClass().getName());
6000
      }
6001
 
6002
      int lastComparison = 0;
553 chandransh 6003
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 6004
 
6005
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6006
      if (lastComparison != 0) {
6007
        return lastComparison;
6008
      }
6009
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6010
      if (lastComparison != 0) {
6011
        return lastComparison;
6012
      }
6013
      return 0;
6014
    }
6015
 
6016
    public void read(TProtocol iprot) throws TException {
6017
      TField field;
6018
      iprot.readStructBegin();
6019
      while (true)
6020
      {
6021
        field = iprot.readFieldBegin();
6022
        if (field.type == TType.STOP) { 
6023
          break;
6024
        }
6025
        _Fields fieldId = _Fields.findByThriftId(field.id);
6026
        if (fieldId == null) {
6027
          TProtocolUtil.skip(iprot, field.type);
6028
        } else {
6029
          switch (fieldId) {
6030
            case USER_ID:
6031
              if (field.type == TType.I64) {
6032
                this.userId = iprot.readI64();
6033
                setUserIdIsSet(true);
6034
              } else { 
6035
                TProtocolUtil.skip(iprot, field.type);
6036
              }
6037
              break;
6038
          }
6039
          iprot.readFieldEnd();
6040
        }
6041
      }
6042
      iprot.readStructEnd();
6043
      validate();
6044
    }
6045
 
6046
    public void write(TProtocol oprot) throws TException {
6047
      validate();
6048
 
6049
      oprot.writeStructBegin(STRUCT_DESC);
6050
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6051
      oprot.writeI64(this.userId);
6052
      oprot.writeFieldEnd();
6053
      oprot.writeFieldStop();
6054
      oprot.writeStructEnd();
6055
    }
6056
 
6057
    @Override
6058
    public String toString() {
553 chandransh 6059
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 6060
      boolean first = true;
6061
 
6062
      sb.append("userId:");
6063
      sb.append(this.userId);
6064
      first = false;
6065
      sb.append(")");
6066
      return sb.toString();
6067
    }
6068
 
6069
    public void validate() throws TException {
6070
      // check for required fields
6071
    }
6072
 
6073
  }
6074
 
553 chandransh 6075
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
6076
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 6077
 
553 chandransh 6078
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6079
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6080
 
553 chandransh 6081
    private boolean success;
6082
    private UserContextException ucex;
48 ashish 6083
 
6084
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6085
    public enum _Fields implements TFieldIdEnum {
6086
      SUCCESS((short)0, "success"),
553 chandransh 6087
      UCEX((short)1, "ucex");
48 ashish 6088
 
6089
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6090
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6091
 
6092
      static {
6093
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6094
          byId.put((int)field._thriftId, field);
6095
          byName.put(field.getFieldName(), field);
6096
        }
6097
      }
6098
 
6099
      /**
6100
       * Find the _Fields constant that matches fieldId, or null if its not found.
6101
       */
6102
      public static _Fields findByThriftId(int fieldId) {
6103
        return byId.get(fieldId);
6104
      }
6105
 
6106
      /**
6107
       * Find the _Fields constant that matches fieldId, throwing an exception
6108
       * if it is not found.
6109
       */
6110
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6111
        _Fields fields = findByThriftId(fieldId);
6112
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6113
        return fields;
6114
      }
6115
 
6116
      /**
6117
       * Find the _Fields constant that matches name, or null if its not found.
6118
       */
6119
      public static _Fields findByName(String name) {
6120
        return byName.get(name);
6121
      }
6122
 
6123
      private final short _thriftId;
6124
      private final String _fieldName;
6125
 
6126
      _Fields(short thriftId, String fieldName) {
6127
        _thriftId = thriftId;
6128
        _fieldName = fieldName;
6129
      }
6130
 
6131
      public short getThriftFieldId() {
6132
        return _thriftId;
6133
      }
6134
 
6135
      public String getFieldName() {
6136
        return _fieldName;
6137
      }
6138
    }
6139
 
6140
    // isset id assignments
553 chandransh 6141
    private static final int __SUCCESS_ISSET_ID = 0;
6142
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6143
 
6144
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6145
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6146
          new FieldValueMetaData(TType.BOOL)));
6147
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6148
          new FieldValueMetaData(TType.STRUCT)));
6149
    }});
6150
 
6151
    static {
553 chandransh 6152
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 6153
    }
6154
 
553 chandransh 6155
    public deleteUser_result() {
48 ashish 6156
    }
6157
 
553 chandransh 6158
    public deleteUser_result(
6159
      boolean success,
6160
      UserContextException ucex)
48 ashish 6161
    {
6162
      this();
6163
      this.success = success;
553 chandransh 6164
      setSuccessIsSet(true);
6165
      this.ucex = ucex;
48 ashish 6166
    }
6167
 
6168
    /**
6169
     * Performs a deep copy on <i>other</i>.
6170
     */
553 chandransh 6171
    public deleteUser_result(deleteUser_result other) {
6172
      __isset_bit_vector.clear();
6173
      __isset_bit_vector.or(other.__isset_bit_vector);
6174
      this.success = other.success;
6175
      if (other.isSetUcex()) {
6176
        this.ucex = new UserContextException(other.ucex);
48 ashish 6177
      }
6178
    }
6179
 
553 chandransh 6180
    public deleteUser_result deepCopy() {
6181
      return new deleteUser_result(this);
48 ashish 6182
    }
6183
 
6184
    @Deprecated
553 chandransh 6185
    public deleteUser_result clone() {
6186
      return new deleteUser_result(this);
48 ashish 6187
    }
6188
 
553 chandransh 6189
    public boolean isSuccess() {
48 ashish 6190
      return this.success;
6191
    }
6192
 
553 chandransh 6193
    public deleteUser_result setSuccess(boolean success) {
48 ashish 6194
      this.success = success;
553 chandransh 6195
      setSuccessIsSet(true);
48 ashish 6196
      return this;
6197
    }
6198
 
6199
    public void unsetSuccess() {
553 chandransh 6200
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 6201
    }
6202
 
6203
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6204
    public boolean isSetSuccess() {
553 chandransh 6205
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 6206
    }
6207
 
6208
    public void setSuccessIsSet(boolean value) {
553 chandransh 6209
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 6210
    }
6211
 
553 chandransh 6212
    public UserContextException getUcex() {
6213
      return this.ucex;
48 ashish 6214
    }
6215
 
553 chandransh 6216
    public deleteUser_result setUcex(UserContextException ucex) {
6217
      this.ucex = ucex;
48 ashish 6218
      return this;
6219
    }
6220
 
553 chandransh 6221
    public void unsetUcex() {
6222
      this.ucex = null;
48 ashish 6223
    }
6224
 
553 chandransh 6225
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6226
    public boolean isSetUcex() {
6227
      return this.ucex != null;
48 ashish 6228
    }
6229
 
553 chandransh 6230
    public void setUcexIsSet(boolean value) {
48 ashish 6231
      if (!value) {
553 chandransh 6232
        this.ucex = null;
48 ashish 6233
      }
6234
    }
6235
 
6236
    public void setFieldValue(_Fields field, Object value) {
6237
      switch (field) {
6238
      case SUCCESS:
6239
        if (value == null) {
6240
          unsetSuccess();
6241
        } else {
553 chandransh 6242
          setSuccess((Boolean)value);
48 ashish 6243
        }
6244
        break;
6245
 
553 chandransh 6246
      case UCEX:
48 ashish 6247
        if (value == null) {
553 chandransh 6248
          unsetUcex();
48 ashish 6249
        } else {
553 chandransh 6250
          setUcex((UserContextException)value);
48 ashish 6251
        }
6252
        break;
6253
 
6254
      }
6255
    }
6256
 
6257
    public void setFieldValue(int fieldID, Object value) {
6258
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6259
    }
6260
 
6261
    public Object getFieldValue(_Fields field) {
6262
      switch (field) {
6263
      case SUCCESS:
553 chandransh 6264
        return new Boolean(isSuccess());
48 ashish 6265
 
553 chandransh 6266
      case UCEX:
6267
        return getUcex();
48 ashish 6268
 
6269
      }
6270
      throw new IllegalStateException();
6271
    }
6272
 
6273
    public Object getFieldValue(int fieldId) {
6274
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6275
    }
6276
 
6277
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6278
    public boolean isSet(_Fields field) {
6279
      switch (field) {
6280
      case SUCCESS:
6281
        return isSetSuccess();
553 chandransh 6282
      case UCEX:
6283
        return isSetUcex();
48 ashish 6284
      }
6285
      throw new IllegalStateException();
6286
    }
6287
 
6288
    public boolean isSet(int fieldID) {
6289
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6290
    }
6291
 
6292
    @Override
6293
    public boolean equals(Object that) {
6294
      if (that == null)
6295
        return false;
553 chandransh 6296
      if (that instanceof deleteUser_result)
6297
        return this.equals((deleteUser_result)that);
48 ashish 6298
      return false;
6299
    }
6300
 
553 chandransh 6301
    public boolean equals(deleteUser_result that) {
48 ashish 6302
      if (that == null)
6303
        return false;
6304
 
553 chandransh 6305
      boolean this_present_success = true;
6306
      boolean that_present_success = true;
48 ashish 6307
      if (this_present_success || that_present_success) {
6308
        if (!(this_present_success && that_present_success))
6309
          return false;
553 chandransh 6310
        if (this.success != that.success)
48 ashish 6311
          return false;
6312
      }
6313
 
553 chandransh 6314
      boolean this_present_ucex = true && this.isSetUcex();
6315
      boolean that_present_ucex = true && that.isSetUcex();
6316
      if (this_present_ucex || that_present_ucex) {
6317
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6318
          return false;
553 chandransh 6319
        if (!this.ucex.equals(that.ucex))
48 ashish 6320
          return false;
6321
      }
6322
 
6323
      return true;
6324
    }
6325
 
6326
    @Override
6327
    public int hashCode() {
6328
      return 0;
6329
    }
6330
 
553 chandransh 6331
    public int compareTo(deleteUser_result other) {
6332
      if (!getClass().equals(other.getClass())) {
6333
        return getClass().getName().compareTo(other.getClass().getName());
6334
      }
6335
 
6336
      int lastComparison = 0;
6337
      deleteUser_result typedOther = (deleteUser_result)other;
6338
 
6339
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6340
      if (lastComparison != 0) {
6341
        return lastComparison;
6342
      }
6343
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6344
      if (lastComparison != 0) {
6345
        return lastComparison;
6346
      }
6347
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6348
      if (lastComparison != 0) {
6349
        return lastComparison;
6350
      }
6351
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6352
      if (lastComparison != 0) {
6353
        return lastComparison;
6354
      }
6355
      return 0;
6356
    }
6357
 
48 ashish 6358
    public void read(TProtocol iprot) throws TException {
6359
      TField field;
6360
      iprot.readStructBegin();
6361
      while (true)
6362
      {
6363
        field = iprot.readFieldBegin();
6364
        if (field.type == TType.STOP) { 
6365
          break;
6366
        }
6367
        _Fields fieldId = _Fields.findByThriftId(field.id);
6368
        if (fieldId == null) {
6369
          TProtocolUtil.skip(iprot, field.type);
6370
        } else {
6371
          switch (fieldId) {
6372
            case SUCCESS:
553 chandransh 6373
              if (field.type == TType.BOOL) {
6374
                this.success = iprot.readBool();
6375
                setSuccessIsSet(true);
48 ashish 6376
              } else { 
6377
                TProtocolUtil.skip(iprot, field.type);
6378
              }
6379
              break;
553 chandransh 6380
            case UCEX:
48 ashish 6381
              if (field.type == TType.STRUCT) {
553 chandransh 6382
                this.ucex = new UserContextException();
6383
                this.ucex.read(iprot);
48 ashish 6384
              } else { 
6385
                TProtocolUtil.skip(iprot, field.type);
6386
              }
6387
              break;
6388
          }
6389
          iprot.readFieldEnd();
6390
        }
6391
      }
6392
      iprot.readStructEnd();
6393
      validate();
6394
    }
6395
 
6396
    public void write(TProtocol oprot) throws TException {
6397
      oprot.writeStructBegin(STRUCT_DESC);
6398
 
6399
      if (this.isSetSuccess()) {
6400
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6401
        oprot.writeBool(this.success);
48 ashish 6402
        oprot.writeFieldEnd();
553 chandransh 6403
      } else if (this.isSetUcex()) {
6404
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6405
        this.ucex.write(oprot);
48 ashish 6406
        oprot.writeFieldEnd();
6407
      }
6408
      oprot.writeFieldStop();
6409
      oprot.writeStructEnd();
6410
    }
6411
 
6412
    @Override
6413
    public String toString() {
553 chandransh 6414
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6415
      boolean first = true;
6416
 
6417
      sb.append("success:");
553 chandransh 6418
      sb.append(this.success);
48 ashish 6419
      first = false;
6420
      if (!first) sb.append(", ");
553 chandransh 6421
      sb.append("ucex:");
6422
      if (this.ucex == null) {
48 ashish 6423
        sb.append("null");
6424
      } else {
553 chandransh 6425
        sb.append(this.ucex);
48 ashish 6426
      }
6427
      first = false;
6428
      sb.append(")");
6429
      return sb.toString();
6430
    }
6431
 
6432
    public void validate() throws TException {
6433
      // check for required fields
6434
    }
6435
 
6436
  }
6437
 
553 chandransh 6438
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6439
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6440
 
6441
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6442
 
6443
    private long userId;
6444
 
6445
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6446
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6447
      USER_ID((short)1, "userId");
48 ashish 6448
 
6449
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6450
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6451
 
6452
      static {
6453
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6454
          byId.put((int)field._thriftId, field);
6455
          byName.put(field.getFieldName(), field);
6456
        }
6457
      }
6458
 
6459
      /**
6460
       * Find the _Fields constant that matches fieldId, or null if its not found.
6461
       */
6462
      public static _Fields findByThriftId(int fieldId) {
6463
        return byId.get(fieldId);
6464
      }
6465
 
6466
      /**
6467
       * Find the _Fields constant that matches fieldId, throwing an exception
6468
       * if it is not found.
6469
       */
6470
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6471
        _Fields fields = findByThriftId(fieldId);
6472
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6473
        return fields;
6474
      }
6475
 
6476
      /**
6477
       * Find the _Fields constant that matches name, or null if its not found.
6478
       */
6479
      public static _Fields findByName(String name) {
6480
        return byName.get(name);
6481
      }
6482
 
6483
      private final short _thriftId;
6484
      private final String _fieldName;
6485
 
6486
      _Fields(short thriftId, String fieldName) {
6487
        _thriftId = thriftId;
6488
        _fieldName = fieldName;
6489
      }
6490
 
6491
      public short getThriftFieldId() {
6492
        return _thriftId;
6493
      }
6494
 
6495
      public String getFieldName() {
6496
        return _fieldName;
6497
      }
6498
    }
6499
 
6500
    // isset id assignments
6501
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6502
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6503
 
6504
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6505
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6506
          new FieldValueMetaData(TType.I64)));
6507
    }});
6508
 
6509
    static {
553 chandransh 6510
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6511
    }
6512
 
553 chandransh 6513
    public getUserState_args() {
48 ashish 6514
    }
6515
 
553 chandransh 6516
    public getUserState_args(
6517
      long userId)
48 ashish 6518
    {
6519
      this();
6520
      this.userId = userId;
6521
      setUserIdIsSet(true);
6522
    }
6523
 
6524
    /**
6525
     * Performs a deep copy on <i>other</i>.
6526
     */
553 chandransh 6527
    public getUserState_args(getUserState_args other) {
48 ashish 6528
      __isset_bit_vector.clear();
6529
      __isset_bit_vector.or(other.__isset_bit_vector);
6530
      this.userId = other.userId;
6531
    }
6532
 
553 chandransh 6533
    public getUserState_args deepCopy() {
6534
      return new getUserState_args(this);
48 ashish 6535
    }
6536
 
6537
    @Deprecated
553 chandransh 6538
    public getUserState_args clone() {
6539
      return new getUserState_args(this);
48 ashish 6540
    }
6541
 
6542
    public long getUserId() {
6543
      return this.userId;
6544
    }
6545
 
553 chandransh 6546
    public getUserState_args setUserId(long userId) {
48 ashish 6547
      this.userId = userId;
6548
      setUserIdIsSet(true);
6549
      return this;
6550
    }
6551
 
6552
    public void unsetUserId() {
6553
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6554
    }
6555
 
6556
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6557
    public boolean isSetUserId() {
6558
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6559
    }
6560
 
6561
    public void setUserIdIsSet(boolean value) {
6562
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6563
    }
6564
 
6565
    public void setFieldValue(_Fields field, Object value) {
6566
      switch (field) {
6567
      case USER_ID:
6568
        if (value == null) {
6569
          unsetUserId();
6570
        } else {
6571
          setUserId((Long)value);
6572
        }
6573
        break;
6574
 
6575
      }
6576
    }
6577
 
6578
    public void setFieldValue(int fieldID, Object value) {
6579
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6580
    }
6581
 
6582
    public Object getFieldValue(_Fields field) {
6583
      switch (field) {
6584
      case USER_ID:
6585
        return new Long(getUserId());
6586
 
6587
      }
6588
      throw new IllegalStateException();
6589
    }
6590
 
6591
    public Object getFieldValue(int fieldId) {
6592
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6593
    }
6594
 
6595
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6596
    public boolean isSet(_Fields field) {
6597
      switch (field) {
6598
      case USER_ID:
6599
        return isSetUserId();
6600
      }
6601
      throw new IllegalStateException();
6602
    }
6603
 
6604
    public boolean isSet(int fieldID) {
6605
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6606
    }
6607
 
6608
    @Override
6609
    public boolean equals(Object that) {
6610
      if (that == null)
6611
        return false;
553 chandransh 6612
      if (that instanceof getUserState_args)
6613
        return this.equals((getUserState_args)that);
48 ashish 6614
      return false;
6615
    }
6616
 
553 chandransh 6617
    public boolean equals(getUserState_args that) {
48 ashish 6618
      if (that == null)
6619
        return false;
6620
 
6621
      boolean this_present_userId = true;
6622
      boolean that_present_userId = true;
6623
      if (this_present_userId || that_present_userId) {
6624
        if (!(this_present_userId && that_present_userId))
6625
          return false;
6626
        if (this.userId != that.userId)
6627
          return false;
6628
      }
6629
 
6630
      return true;
6631
    }
6632
 
6633
    @Override
6634
    public int hashCode() {
6635
      return 0;
6636
    }
6637
 
553 chandransh 6638
    public int compareTo(getUserState_args other) {
48 ashish 6639
      if (!getClass().equals(other.getClass())) {
6640
        return getClass().getName().compareTo(other.getClass().getName());
6641
      }
6642
 
6643
      int lastComparison = 0;
553 chandransh 6644
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6645
 
6646
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6647
      if (lastComparison != 0) {
6648
        return lastComparison;
6649
      }
6650
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6651
      if (lastComparison != 0) {
6652
        return lastComparison;
6653
      }
6654
      return 0;
6655
    }
6656
 
6657
    public void read(TProtocol iprot) throws TException {
6658
      TField field;
6659
      iprot.readStructBegin();
6660
      while (true)
6661
      {
6662
        field = iprot.readFieldBegin();
6663
        if (field.type == TType.STOP) { 
6664
          break;
6665
        }
6666
        _Fields fieldId = _Fields.findByThriftId(field.id);
6667
        if (fieldId == null) {
6668
          TProtocolUtil.skip(iprot, field.type);
6669
        } else {
6670
          switch (fieldId) {
6671
            case USER_ID:
6672
              if (field.type == TType.I64) {
6673
                this.userId = iprot.readI64();
6674
                setUserIdIsSet(true);
6675
              } else { 
6676
                TProtocolUtil.skip(iprot, field.type);
6677
              }
6678
              break;
6679
          }
6680
          iprot.readFieldEnd();
6681
        }
6682
      }
6683
      iprot.readStructEnd();
6684
      validate();
6685
    }
6686
 
6687
    public void write(TProtocol oprot) throws TException {
6688
      validate();
6689
 
6690
      oprot.writeStructBegin(STRUCT_DESC);
6691
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6692
      oprot.writeI64(this.userId);
6693
      oprot.writeFieldEnd();
6694
      oprot.writeFieldStop();
6695
      oprot.writeStructEnd();
6696
    }
6697
 
6698
    @Override
6699
    public String toString() {
553 chandransh 6700
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6701
      boolean first = true;
6702
 
6703
      sb.append("userId:");
6704
      sb.append(this.userId);
6705
      first = false;
6706
      sb.append(")");
6707
      return sb.toString();
6708
    }
6709
 
6710
    public void validate() throws TException {
6711
      // check for required fields
6712
    }
6713
 
6714
  }
6715
 
553 chandransh 6716
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6717
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6718
 
6719
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6720
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6721
 
553 chandransh 6722
    private UserState success;
6723
    private UserContextException ucex;
48 ashish 6724
 
6725
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6726
    public enum _Fields implements TFieldIdEnum {
6727
      SUCCESS((short)0, "success"),
553 chandransh 6728
      UCEX((short)1, "ucex");
48 ashish 6729
 
6730
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6731
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6732
 
6733
      static {
6734
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6735
          byId.put((int)field._thriftId, field);
6736
          byName.put(field.getFieldName(), field);
6737
        }
6738
      }
6739
 
6740
      /**
6741
       * Find the _Fields constant that matches fieldId, or null if its not found.
6742
       */
6743
      public static _Fields findByThriftId(int fieldId) {
6744
        return byId.get(fieldId);
6745
      }
6746
 
6747
      /**
6748
       * Find the _Fields constant that matches fieldId, throwing an exception
6749
       * if it is not found.
6750
       */
6751
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6752
        _Fields fields = findByThriftId(fieldId);
6753
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6754
        return fields;
6755
      }
6756
 
6757
      /**
6758
       * Find the _Fields constant that matches name, or null if its not found.
6759
       */
6760
      public static _Fields findByName(String name) {
6761
        return byName.get(name);
6762
      }
6763
 
6764
      private final short _thriftId;
6765
      private final String _fieldName;
6766
 
6767
      _Fields(short thriftId, String fieldName) {
6768
        _thriftId = thriftId;
6769
        _fieldName = fieldName;
6770
      }
6771
 
6772
      public short getThriftFieldId() {
6773
        return _thriftId;
6774
      }
6775
 
6776
      public String getFieldName() {
6777
        return _fieldName;
6778
      }
6779
    }
6780
 
6781
    // isset id assignments
6782
 
6783
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6784
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6785
          new StructMetaData(TType.STRUCT, UserState.class)));
6786
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6787
          new FieldValueMetaData(TType.STRUCT)));
6788
    }});
6789
 
6790
    static {
553 chandransh 6791
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6792
    }
6793
 
553 chandransh 6794
    public getUserState_result() {
48 ashish 6795
    }
6796
 
553 chandransh 6797
    public getUserState_result(
6798
      UserState success,
6799
      UserContextException ucex)
48 ashish 6800
    {
6801
      this();
6802
      this.success = success;
553 chandransh 6803
      this.ucex = ucex;
48 ashish 6804
    }
6805
 
6806
    /**
6807
     * Performs a deep copy on <i>other</i>.
6808
     */
553 chandransh 6809
    public getUserState_result(getUserState_result other) {
48 ashish 6810
      if (other.isSetSuccess()) {
553 chandransh 6811
        this.success = new UserState(other.success);
48 ashish 6812
      }
553 chandransh 6813
      if (other.isSetUcex()) {
6814
        this.ucex = new UserContextException(other.ucex);
48 ashish 6815
      }
6816
    }
6817
 
553 chandransh 6818
    public getUserState_result deepCopy() {
6819
      return new getUserState_result(this);
48 ashish 6820
    }
6821
 
6822
    @Deprecated
553 chandransh 6823
    public getUserState_result clone() {
6824
      return new getUserState_result(this);
48 ashish 6825
    }
6826
 
553 chandransh 6827
    public UserState getSuccess() {
48 ashish 6828
      return this.success;
6829
    }
6830
 
553 chandransh 6831
    public getUserState_result setSuccess(UserState success) {
48 ashish 6832
      this.success = success;
6833
      return this;
6834
    }
6835
 
6836
    public void unsetSuccess() {
6837
      this.success = null;
6838
    }
6839
 
6840
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6841
    public boolean isSetSuccess() {
6842
      return this.success != null;
6843
    }
6844
 
6845
    public void setSuccessIsSet(boolean value) {
6846
      if (!value) {
6847
        this.success = null;
6848
      }
6849
    }
6850
 
553 chandransh 6851
    public UserContextException getUcex() {
6852
      return this.ucex;
48 ashish 6853
    }
6854
 
553 chandransh 6855
    public getUserState_result setUcex(UserContextException ucex) {
6856
      this.ucex = ucex;
48 ashish 6857
      return this;
6858
    }
6859
 
553 chandransh 6860
    public void unsetUcex() {
6861
      this.ucex = null;
48 ashish 6862
    }
6863
 
553 chandransh 6864
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6865
    public boolean isSetUcex() {
6866
      return this.ucex != null;
48 ashish 6867
    }
6868
 
553 chandransh 6869
    public void setUcexIsSet(boolean value) {
48 ashish 6870
      if (!value) {
553 chandransh 6871
        this.ucex = null;
48 ashish 6872
      }
6873
    }
6874
 
6875
    public void setFieldValue(_Fields field, Object value) {
6876
      switch (field) {
6877
      case SUCCESS:
6878
        if (value == null) {
6879
          unsetSuccess();
6880
        } else {
553 chandransh 6881
          setSuccess((UserState)value);
48 ashish 6882
        }
6883
        break;
6884
 
553 chandransh 6885
      case UCEX:
48 ashish 6886
        if (value == null) {
553 chandransh 6887
          unsetUcex();
48 ashish 6888
        } else {
553 chandransh 6889
          setUcex((UserContextException)value);
48 ashish 6890
        }
6891
        break;
6892
 
6893
      }
6894
    }
6895
 
6896
    public void setFieldValue(int fieldID, Object value) {
6897
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6898
    }
6899
 
6900
    public Object getFieldValue(_Fields field) {
6901
      switch (field) {
6902
      case SUCCESS:
6903
        return getSuccess();
6904
 
553 chandransh 6905
      case UCEX:
6906
        return getUcex();
48 ashish 6907
 
6908
      }
6909
      throw new IllegalStateException();
6910
    }
6911
 
6912
    public Object getFieldValue(int fieldId) {
6913
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6914
    }
6915
 
6916
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6917
    public boolean isSet(_Fields field) {
6918
      switch (field) {
6919
      case SUCCESS:
6920
        return isSetSuccess();
553 chandransh 6921
      case UCEX:
6922
        return isSetUcex();
48 ashish 6923
      }
6924
      throw new IllegalStateException();
6925
    }
6926
 
6927
    public boolean isSet(int fieldID) {
6928
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6929
    }
6930
 
6931
    @Override
6932
    public boolean equals(Object that) {
6933
      if (that == null)
6934
        return false;
553 chandransh 6935
      if (that instanceof getUserState_result)
6936
        return this.equals((getUserState_result)that);
48 ashish 6937
      return false;
6938
    }
6939
 
553 chandransh 6940
    public boolean equals(getUserState_result that) {
48 ashish 6941
      if (that == null)
6942
        return false;
6943
 
6944
      boolean this_present_success = true && this.isSetSuccess();
6945
      boolean that_present_success = true && that.isSetSuccess();
6946
      if (this_present_success || that_present_success) {
6947
        if (!(this_present_success && that_present_success))
6948
          return false;
6949
        if (!this.success.equals(that.success))
6950
          return false;
6951
      }
6952
 
553 chandransh 6953
      boolean this_present_ucex = true && this.isSetUcex();
6954
      boolean that_present_ucex = true && that.isSetUcex();
6955
      if (this_present_ucex || that_present_ucex) {
6956
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6957
          return false;
553 chandransh 6958
        if (!this.ucex.equals(that.ucex))
48 ashish 6959
          return false;
6960
      }
6961
 
6962
      return true;
6963
    }
6964
 
6965
    @Override
6966
    public int hashCode() {
6967
      return 0;
6968
    }
6969
 
553 chandransh 6970
    public int compareTo(getUserState_result other) {
48 ashish 6971
      if (!getClass().equals(other.getClass())) {
6972
        return getClass().getName().compareTo(other.getClass().getName());
6973
      }
6974
 
6975
      int lastComparison = 0;
553 chandransh 6976
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 6977
 
6978
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6979
      if (lastComparison != 0) {
6980
        return lastComparison;
6981
      }
6982
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6983
      if (lastComparison != 0) {
6984
        return lastComparison;
6985
      }
553 chandransh 6986
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 6987
      if (lastComparison != 0) {
6988
        return lastComparison;
6989
      }
553 chandransh 6990
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 6991
      if (lastComparison != 0) {
6992
        return lastComparison;
6993
      }
6994
      return 0;
6995
    }
6996
 
6997
    public void read(TProtocol iprot) throws TException {
6998
      TField field;
6999
      iprot.readStructBegin();
7000
      while (true)
7001
      {
7002
        field = iprot.readFieldBegin();
7003
        if (field.type == TType.STOP) { 
7004
          break;
7005
        }
7006
        _Fields fieldId = _Fields.findByThriftId(field.id);
7007
        if (fieldId == null) {
7008
          TProtocolUtil.skip(iprot, field.type);
7009
        } else {
7010
          switch (fieldId) {
7011
            case SUCCESS:
7012
              if (field.type == TType.STRUCT) {
553 chandransh 7013
                this.success = new UserState();
48 ashish 7014
                this.success.read(iprot);
7015
              } else { 
7016
                TProtocolUtil.skip(iprot, field.type);
7017
              }
7018
              break;
553 chandransh 7019
            case UCEX:
48 ashish 7020
              if (field.type == TType.STRUCT) {
553 chandransh 7021
                this.ucex = new UserContextException();
7022
                this.ucex.read(iprot);
48 ashish 7023
              } else { 
7024
                TProtocolUtil.skip(iprot, field.type);
7025
              }
7026
              break;
7027
          }
7028
          iprot.readFieldEnd();
7029
        }
7030
      }
7031
      iprot.readStructEnd();
7032
      validate();
7033
    }
7034
 
7035
    public void write(TProtocol oprot) throws TException {
7036
      oprot.writeStructBegin(STRUCT_DESC);
7037
 
7038
      if (this.isSetSuccess()) {
7039
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7040
        this.success.write(oprot);
7041
        oprot.writeFieldEnd();
553 chandransh 7042
      } else if (this.isSetUcex()) {
7043
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7044
        this.ucex.write(oprot);
48 ashish 7045
        oprot.writeFieldEnd();
7046
      }
7047
      oprot.writeFieldStop();
7048
      oprot.writeStructEnd();
7049
    }
7050
 
7051
    @Override
7052
    public String toString() {
553 chandransh 7053
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 7054
      boolean first = true;
7055
 
7056
      sb.append("success:");
7057
      if (this.success == null) {
7058
        sb.append("null");
7059
      } else {
7060
        sb.append(this.success);
7061
      }
7062
      first = false;
7063
      if (!first) sb.append(", ");
553 chandransh 7064
      sb.append("ucex:");
7065
      if (this.ucex == null) {
48 ashish 7066
        sb.append("null");
7067
      } else {
553 chandransh 7068
        sb.append(this.ucex);
48 ashish 7069
      }
7070
      first = false;
7071
      sb.append(")");
7072
      return sb.toString();
7073
    }
7074
 
7075
    public void validate() throws TException {
7076
      // check for required fields
7077
    }
7078
 
7079
  }
7080
 
553 chandransh 7081
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
7082
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 7083
 
7084
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7085
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7086
 
7087
    private String email;
7088
    private String password;
7089
 
7090
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7091
    public enum _Fields implements TFieldIdEnum {
7092
      EMAIL((short)1, "email"),
7093
      PASSWORD((short)2, "password");
7094
 
7095
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7097
 
7098
      static {
7099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7100
          byId.put((int)field._thriftId, field);
7101
          byName.put(field.getFieldName(), field);
7102
        }
7103
      }
7104
 
7105
      /**
7106
       * Find the _Fields constant that matches fieldId, or null if its not found.
7107
       */
7108
      public static _Fields findByThriftId(int fieldId) {
7109
        return byId.get(fieldId);
7110
      }
7111
 
7112
      /**
7113
       * Find the _Fields constant that matches fieldId, throwing an exception
7114
       * if it is not found.
7115
       */
7116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7117
        _Fields fields = findByThriftId(fieldId);
7118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7119
        return fields;
7120
      }
7121
 
7122
      /**
7123
       * Find the _Fields constant that matches name, or null if its not found.
7124
       */
7125
      public static _Fields findByName(String name) {
7126
        return byName.get(name);
7127
      }
7128
 
7129
      private final short _thriftId;
7130
      private final String _fieldName;
7131
 
7132
      _Fields(short thriftId, String fieldName) {
7133
        _thriftId = thriftId;
7134
        _fieldName = fieldName;
7135
      }
7136
 
7137
      public short getThriftFieldId() {
7138
        return _thriftId;
7139
      }
7140
 
7141
      public String getFieldName() {
7142
        return _fieldName;
7143
      }
7144
    }
7145
 
7146
    // isset id assignments
7147
 
7148
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7149
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7150
          new FieldValueMetaData(TType.STRING)));
7151
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
7152
          new FieldValueMetaData(TType.STRING)));
7153
    }});
7154
 
7155
    static {
553 chandransh 7156
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 7157
    }
7158
 
553 chandransh 7159
    public authenticateUser_args() {
48 ashish 7160
    }
7161
 
553 chandransh 7162
    public authenticateUser_args(
48 ashish 7163
      String email,
7164
      String password)
7165
    {
7166
      this();
7167
      this.email = email;
7168
      this.password = password;
7169
    }
7170
 
7171
    /**
7172
     * Performs a deep copy on <i>other</i>.
7173
     */
553 chandransh 7174
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 7175
      if (other.isSetEmail()) {
7176
        this.email = other.email;
7177
      }
7178
      if (other.isSetPassword()) {
7179
        this.password = other.password;
7180
      }
7181
    }
7182
 
553 chandransh 7183
    public authenticateUser_args deepCopy() {
7184
      return new authenticateUser_args(this);
48 ashish 7185
    }
7186
 
7187
    @Deprecated
553 chandransh 7188
    public authenticateUser_args clone() {
7189
      return new authenticateUser_args(this);
48 ashish 7190
    }
7191
 
7192
    public String getEmail() {
7193
      return this.email;
7194
    }
7195
 
553 chandransh 7196
    public authenticateUser_args setEmail(String email) {
48 ashish 7197
      this.email = email;
7198
      return this;
7199
    }
7200
 
7201
    public void unsetEmail() {
7202
      this.email = null;
7203
    }
7204
 
7205
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7206
    public boolean isSetEmail() {
7207
      return this.email != null;
7208
    }
7209
 
7210
    public void setEmailIsSet(boolean value) {
7211
      if (!value) {
7212
        this.email = null;
7213
      }
7214
    }
7215
 
7216
    public String getPassword() {
7217
      return this.password;
7218
    }
7219
 
553 chandransh 7220
    public authenticateUser_args setPassword(String password) {
48 ashish 7221
      this.password = password;
7222
      return this;
7223
    }
7224
 
7225
    public void unsetPassword() {
7226
      this.password = null;
7227
    }
7228
 
7229
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7230
    public boolean isSetPassword() {
7231
      return this.password != null;
7232
    }
7233
 
7234
    public void setPasswordIsSet(boolean value) {
7235
      if (!value) {
7236
        this.password = null;
7237
      }
7238
    }
7239
 
7240
    public void setFieldValue(_Fields field, Object value) {
7241
      switch (field) {
7242
      case EMAIL:
7243
        if (value == null) {
7244
          unsetEmail();
7245
        } else {
7246
          setEmail((String)value);
7247
        }
7248
        break;
7249
 
7250
      case PASSWORD:
7251
        if (value == null) {
7252
          unsetPassword();
7253
        } else {
7254
          setPassword((String)value);
7255
        }
7256
        break;
7257
 
7258
      }
7259
    }
7260
 
7261
    public void setFieldValue(int fieldID, Object value) {
7262
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7263
    }
7264
 
7265
    public Object getFieldValue(_Fields field) {
7266
      switch (field) {
7267
      case EMAIL:
7268
        return getEmail();
7269
 
7270
      case PASSWORD:
7271
        return getPassword();
7272
 
7273
      }
7274
      throw new IllegalStateException();
7275
    }
7276
 
7277
    public Object getFieldValue(int fieldId) {
7278
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7279
    }
7280
 
7281
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7282
    public boolean isSet(_Fields field) {
7283
      switch (field) {
7284
      case EMAIL:
7285
        return isSetEmail();
7286
      case PASSWORD:
7287
        return isSetPassword();
7288
      }
7289
      throw new IllegalStateException();
7290
    }
7291
 
7292
    public boolean isSet(int fieldID) {
7293
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7294
    }
7295
 
7296
    @Override
7297
    public boolean equals(Object that) {
7298
      if (that == null)
7299
        return false;
553 chandransh 7300
      if (that instanceof authenticateUser_args)
7301
        return this.equals((authenticateUser_args)that);
48 ashish 7302
      return false;
7303
    }
7304
 
553 chandransh 7305
    public boolean equals(authenticateUser_args that) {
48 ashish 7306
      if (that == null)
7307
        return false;
7308
 
7309
      boolean this_present_email = true && this.isSetEmail();
7310
      boolean that_present_email = true && that.isSetEmail();
7311
      if (this_present_email || that_present_email) {
7312
        if (!(this_present_email && that_present_email))
7313
          return false;
7314
        if (!this.email.equals(that.email))
7315
          return false;
7316
      }
7317
 
7318
      boolean this_present_password = true && this.isSetPassword();
7319
      boolean that_present_password = true && that.isSetPassword();
7320
      if (this_present_password || that_present_password) {
7321
        if (!(this_present_password && that_present_password))
7322
          return false;
7323
        if (!this.password.equals(that.password))
7324
          return false;
7325
      }
7326
 
7327
      return true;
7328
    }
7329
 
7330
    @Override
7331
    public int hashCode() {
7332
      return 0;
7333
    }
7334
 
553 chandransh 7335
    public int compareTo(authenticateUser_args other) {
48 ashish 7336
      if (!getClass().equals(other.getClass())) {
7337
        return getClass().getName().compareTo(other.getClass().getName());
7338
      }
7339
 
7340
      int lastComparison = 0;
553 chandransh 7341
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 7342
 
7343
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7344
      if (lastComparison != 0) {
7345
        return lastComparison;
7346
      }
7347
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7348
      if (lastComparison != 0) {
7349
        return lastComparison;
7350
      }
7351
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7352
      if (lastComparison != 0) {
7353
        return lastComparison;
7354
      }
7355
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7356
      if (lastComparison != 0) {
7357
        return lastComparison;
7358
      }
7359
      return 0;
7360
    }
7361
 
7362
    public void read(TProtocol iprot) throws TException {
7363
      TField field;
7364
      iprot.readStructBegin();
7365
      while (true)
7366
      {
7367
        field = iprot.readFieldBegin();
7368
        if (field.type == TType.STOP) { 
7369
          break;
7370
        }
7371
        _Fields fieldId = _Fields.findByThriftId(field.id);
7372
        if (fieldId == null) {
7373
          TProtocolUtil.skip(iprot, field.type);
7374
        } else {
7375
          switch (fieldId) {
7376
            case EMAIL:
7377
              if (field.type == TType.STRING) {
7378
                this.email = iprot.readString();
7379
              } else { 
7380
                TProtocolUtil.skip(iprot, field.type);
7381
              }
7382
              break;
7383
            case PASSWORD:
7384
              if (field.type == TType.STRING) {
7385
                this.password = iprot.readString();
7386
              } else { 
7387
                TProtocolUtil.skip(iprot, field.type);
7388
              }
7389
              break;
7390
          }
7391
          iprot.readFieldEnd();
7392
        }
7393
      }
7394
      iprot.readStructEnd();
7395
      validate();
7396
    }
7397
 
7398
    public void write(TProtocol oprot) throws TException {
7399
      validate();
7400
 
7401
      oprot.writeStructBegin(STRUCT_DESC);
7402
      if (this.email != null) {
7403
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7404
        oprot.writeString(this.email);
7405
        oprot.writeFieldEnd();
7406
      }
7407
      if (this.password != null) {
7408
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7409
        oprot.writeString(this.password);
7410
        oprot.writeFieldEnd();
7411
      }
7412
      oprot.writeFieldStop();
7413
      oprot.writeStructEnd();
7414
    }
7415
 
7416
    @Override
7417
    public String toString() {
553 chandransh 7418
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7419
      boolean first = true;
7420
 
7421
      sb.append("email:");
7422
      if (this.email == null) {
7423
        sb.append("null");
7424
      } else {
7425
        sb.append(this.email);
7426
      }
7427
      first = false;
7428
      if (!first) sb.append(", ");
7429
      sb.append("password:");
7430
      if (this.password == null) {
7431
        sb.append("null");
7432
      } else {
7433
        sb.append(this.password);
7434
      }
7435
      first = false;
7436
      sb.append(")");
7437
      return sb.toString();
7438
    }
7439
 
7440
    public void validate() throws TException {
7441
      // check for required fields
7442
    }
7443
 
7444
  }
7445
 
571 rajveer 7446
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7447
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7448
 
7449
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7450
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7451
 
553 chandransh 7452
    private User success;
7453
    private AuthenticationException auex;
48 ashish 7454
 
7455
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7456
    public enum _Fields implements TFieldIdEnum {
7457
      SUCCESS((short)0, "success"),
553 chandransh 7458
      AUEX((short)1, "auex");
48 ashish 7459
 
7460
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7461
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7462
 
7463
      static {
7464
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7465
          byId.put((int)field._thriftId, field);
7466
          byName.put(field.getFieldName(), field);
7467
        }
7468
      }
7469
 
7470
      /**
7471
       * Find the _Fields constant that matches fieldId, or null if its not found.
7472
       */
7473
      public static _Fields findByThriftId(int fieldId) {
7474
        return byId.get(fieldId);
7475
      }
7476
 
7477
      /**
7478
       * Find the _Fields constant that matches fieldId, throwing an exception
7479
       * if it is not found.
7480
       */
7481
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7482
        _Fields fields = findByThriftId(fieldId);
7483
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7484
        return fields;
7485
      }
7486
 
7487
      /**
7488
       * Find the _Fields constant that matches name, or null if its not found.
7489
       */
7490
      public static _Fields findByName(String name) {
7491
        return byName.get(name);
7492
      }
7493
 
7494
      private final short _thriftId;
7495
      private final String _fieldName;
7496
 
7497
      _Fields(short thriftId, String fieldName) {
7498
        _thriftId = thriftId;
7499
        _fieldName = fieldName;
7500
      }
7501
 
7502
      public short getThriftFieldId() {
7503
        return _thriftId;
7504
      }
7505
 
7506
      public String getFieldName() {
7507
        return _fieldName;
7508
      }
7509
    }
7510
 
7511
    // isset id assignments
7512
 
7513
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7514
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7515
          new StructMetaData(TType.STRUCT, User.class)));
7516
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7517
          new FieldValueMetaData(TType.STRUCT)));
7518
    }});
7519
 
7520
    static {
553 chandransh 7521
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7522
    }
7523
 
553 chandransh 7524
    public authenticateUser_result() {
48 ashish 7525
    }
7526
 
553 chandransh 7527
    public authenticateUser_result(
7528
      User success,
7529
      AuthenticationException auex)
48 ashish 7530
    {
7531
      this();
7532
      this.success = success;
553 chandransh 7533
      this.auex = auex;
48 ashish 7534
    }
7535
 
7536
    /**
7537
     * Performs a deep copy on <i>other</i>.
7538
     */
553 chandransh 7539
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7540
      if (other.isSetSuccess()) {
553 chandransh 7541
        this.success = new User(other.success);
48 ashish 7542
      }
553 chandransh 7543
      if (other.isSetAuex()) {
7544
        this.auex = new AuthenticationException(other.auex);
48 ashish 7545
      }
7546
    }
7547
 
553 chandransh 7548
    public authenticateUser_result deepCopy() {
7549
      return new authenticateUser_result(this);
48 ashish 7550
    }
7551
 
7552
    @Deprecated
553 chandransh 7553
    public authenticateUser_result clone() {
7554
      return new authenticateUser_result(this);
48 ashish 7555
    }
7556
 
553 chandransh 7557
    public User getSuccess() {
48 ashish 7558
      return this.success;
7559
    }
7560
 
553 chandransh 7561
    public authenticateUser_result setSuccess(User success) {
48 ashish 7562
      this.success = success;
7563
      return this;
7564
    }
7565
 
7566
    public void unsetSuccess() {
7567
      this.success = null;
7568
    }
7569
 
7570
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7571
    public boolean isSetSuccess() {
7572
      return this.success != null;
7573
    }
7574
 
7575
    public void setSuccessIsSet(boolean value) {
7576
      if (!value) {
7577
        this.success = null;
7578
      }
7579
    }
7580
 
553 chandransh 7581
    public AuthenticationException getAuex() {
7582
      return this.auex;
48 ashish 7583
    }
7584
 
553 chandransh 7585
    public authenticateUser_result setAuex(AuthenticationException auex) {
7586
      this.auex = auex;
48 ashish 7587
      return this;
7588
    }
7589
 
553 chandransh 7590
    public void unsetAuex() {
7591
      this.auex = null;
48 ashish 7592
    }
7593
 
553 chandransh 7594
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7595
    public boolean isSetAuex() {
7596
      return this.auex != null;
48 ashish 7597
    }
7598
 
553 chandransh 7599
    public void setAuexIsSet(boolean value) {
48 ashish 7600
      if (!value) {
553 chandransh 7601
        this.auex = null;
48 ashish 7602
      }
7603
    }
7604
 
7605
    public void setFieldValue(_Fields field, Object value) {
7606
      switch (field) {
7607
      case SUCCESS:
7608
        if (value == null) {
7609
          unsetSuccess();
7610
        } else {
553 chandransh 7611
          setSuccess((User)value);
48 ashish 7612
        }
7613
        break;
7614
 
553 chandransh 7615
      case AUEX:
48 ashish 7616
        if (value == null) {
553 chandransh 7617
          unsetAuex();
48 ashish 7618
        } else {
553 chandransh 7619
          setAuex((AuthenticationException)value);
48 ashish 7620
        }
7621
        break;
7622
 
7623
      }
7624
    }
7625
 
7626
    public void setFieldValue(int fieldID, Object value) {
7627
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7628
    }
7629
 
7630
    public Object getFieldValue(_Fields field) {
7631
      switch (field) {
7632
      case SUCCESS:
7633
        return getSuccess();
7634
 
553 chandransh 7635
      case AUEX:
7636
        return getAuex();
48 ashish 7637
 
7638
      }
7639
      throw new IllegalStateException();
7640
    }
7641
 
7642
    public Object getFieldValue(int fieldId) {
7643
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7644
    }
7645
 
7646
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7647
    public boolean isSet(_Fields field) {
7648
      switch (field) {
7649
      case SUCCESS:
7650
        return isSetSuccess();
553 chandransh 7651
      case AUEX:
7652
        return isSetAuex();
48 ashish 7653
      }
7654
      throw new IllegalStateException();
7655
    }
7656
 
7657
    public boolean isSet(int fieldID) {
7658
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7659
    }
7660
 
7661
    @Override
7662
    public boolean equals(Object that) {
7663
      if (that == null)
7664
        return false;
553 chandransh 7665
      if (that instanceof authenticateUser_result)
7666
        return this.equals((authenticateUser_result)that);
48 ashish 7667
      return false;
7668
    }
7669
 
553 chandransh 7670
    public boolean equals(authenticateUser_result that) {
48 ashish 7671
      if (that == null)
7672
        return false;
7673
 
7674
      boolean this_present_success = true && this.isSetSuccess();
7675
      boolean that_present_success = true && that.isSetSuccess();
7676
      if (this_present_success || that_present_success) {
7677
        if (!(this_present_success && that_present_success))
7678
          return false;
7679
        if (!this.success.equals(that.success))
7680
          return false;
7681
      }
7682
 
553 chandransh 7683
      boolean this_present_auex = true && this.isSetAuex();
7684
      boolean that_present_auex = true && that.isSetAuex();
7685
      if (this_present_auex || that_present_auex) {
7686
        if (!(this_present_auex && that_present_auex))
48 ashish 7687
          return false;
553 chandransh 7688
        if (!this.auex.equals(that.auex))
48 ashish 7689
          return false;
7690
      }
7691
 
7692
      return true;
7693
    }
7694
 
7695
    @Override
7696
    public int hashCode() {
7697
      return 0;
7698
    }
7699
 
571 rajveer 7700
    public int compareTo(authenticateUser_result other) {
7701
      if (!getClass().equals(other.getClass())) {
7702
        return getClass().getName().compareTo(other.getClass().getName());
7703
      }
7704
 
7705
      int lastComparison = 0;
7706
      authenticateUser_result typedOther = (authenticateUser_result)other;
7707
 
7708
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7709
      if (lastComparison != 0) {
7710
        return lastComparison;
7711
      }
7712
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7713
      if (lastComparison != 0) {
7714
        return lastComparison;
7715
      }
7716
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
7717
      if (lastComparison != 0) {
7718
        return lastComparison;
7719
      }
7720
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
7721
      if (lastComparison != 0) {
7722
        return lastComparison;
7723
      }
7724
      return 0;
7725
    }
7726
 
48 ashish 7727
    public void read(TProtocol iprot) throws TException {
7728
      TField field;
7729
      iprot.readStructBegin();
7730
      while (true)
7731
      {
7732
        field = iprot.readFieldBegin();
7733
        if (field.type == TType.STOP) { 
7734
          break;
7735
        }
7736
        _Fields fieldId = _Fields.findByThriftId(field.id);
7737
        if (fieldId == null) {
7738
          TProtocolUtil.skip(iprot, field.type);
7739
        } else {
7740
          switch (fieldId) {
7741
            case SUCCESS:
7742
              if (field.type == TType.STRUCT) {
553 chandransh 7743
                this.success = new User();
48 ashish 7744
                this.success.read(iprot);
7745
              } else { 
7746
                TProtocolUtil.skip(iprot, field.type);
7747
              }
7748
              break;
553 chandransh 7749
            case AUEX:
48 ashish 7750
              if (field.type == TType.STRUCT) {
553 chandransh 7751
                this.auex = new AuthenticationException();
7752
                this.auex.read(iprot);
48 ashish 7753
              } else { 
7754
                TProtocolUtil.skip(iprot, field.type);
7755
              }
7756
              break;
7757
          }
7758
          iprot.readFieldEnd();
7759
        }
7760
      }
7761
      iprot.readStructEnd();
7762
      validate();
7763
    }
7764
 
7765
    public void write(TProtocol oprot) throws TException {
7766
      oprot.writeStructBegin(STRUCT_DESC);
7767
 
7768
      if (this.isSetSuccess()) {
7769
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7770
        this.success.write(oprot);
7771
        oprot.writeFieldEnd();
553 chandransh 7772
      } else if (this.isSetAuex()) {
7773
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7774
        this.auex.write(oprot);
48 ashish 7775
        oprot.writeFieldEnd();
7776
      }
7777
      oprot.writeFieldStop();
7778
      oprot.writeStructEnd();
7779
    }
7780
 
7781
    @Override
7782
    public String toString() {
553 chandransh 7783
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7784
      boolean first = true;
7785
 
7786
      sb.append("success:");
7787
      if (this.success == null) {
7788
        sb.append("null");
7789
      } else {
7790
        sb.append(this.success);
7791
      }
7792
      first = false;
7793
      if (!first) sb.append(", ");
553 chandransh 7794
      sb.append("auex:");
7795
      if (this.auex == null) {
48 ashish 7796
        sb.append("null");
7797
      } else {
553 chandransh 7798
        sb.append(this.auex);
48 ashish 7799
      }
7800
      first = false;
7801
      sb.append(")");
7802
      return sb.toString();
7803
    }
7804
 
7805
    public void validate() throws TException {
7806
      // check for required fields
7807
    }
7808
 
7809
  }
7810
 
553 chandransh 7811
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7812
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7813
 
553 chandransh 7814
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7815
 
553 chandransh 7816
    private String email;
123 ashish 7817
 
7818
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7819
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7820
      EMAIL((short)1, "email");
123 ashish 7821
 
7822
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7823
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7824
 
7825
      static {
7826
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7827
          byId.put((int)field._thriftId, field);
7828
          byName.put(field.getFieldName(), field);
7829
        }
7830
      }
7831
 
7832
      /**
7833
       * Find the _Fields constant that matches fieldId, or null if its not found.
7834
       */
7835
      public static _Fields findByThriftId(int fieldId) {
7836
        return byId.get(fieldId);
7837
      }
7838
 
7839
      /**
7840
       * Find the _Fields constant that matches fieldId, throwing an exception
7841
       * if it is not found.
7842
       */
7843
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7844
        _Fields fields = findByThriftId(fieldId);
7845
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7846
        return fields;
7847
      }
7848
 
7849
      /**
7850
       * Find the _Fields constant that matches name, or null if its not found.
7851
       */
7852
      public static _Fields findByName(String name) {
7853
        return byName.get(name);
7854
      }
7855
 
7856
      private final short _thriftId;
7857
      private final String _fieldName;
7858
 
7859
      _Fields(short thriftId, String fieldName) {
7860
        _thriftId = thriftId;
7861
        _fieldName = fieldName;
7862
      }
7863
 
7864
      public short getThriftFieldId() {
7865
        return _thriftId;
7866
      }
7867
 
7868
      public String getFieldName() {
7869
        return _fieldName;
7870
      }
7871
    }
7872
 
7873
    // isset id assignments
553 chandransh 7874
 
7875
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7876
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7877
          new FieldValueMetaData(TType.STRING)));
7878
    }});
7879
 
7880
    static {
7881
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
7882
    }
7883
 
7884
    public userExists_args() {
7885
    }
7886
 
7887
    public userExists_args(
7888
      String email)
7889
    {
7890
      this();
7891
      this.email = email;
7892
    }
7893
 
7894
    /**
7895
     * Performs a deep copy on <i>other</i>.
7896
     */
7897
    public userExists_args(userExists_args other) {
7898
      if (other.isSetEmail()) {
7899
        this.email = other.email;
7900
      }
7901
    }
7902
 
7903
    public userExists_args deepCopy() {
7904
      return new userExists_args(this);
7905
    }
7906
 
7907
    @Deprecated
7908
    public userExists_args clone() {
7909
      return new userExists_args(this);
7910
    }
7911
 
7912
    public String getEmail() {
7913
      return this.email;
7914
    }
7915
 
7916
    public userExists_args setEmail(String email) {
7917
      this.email = email;
7918
      return this;
7919
    }
7920
 
7921
    public void unsetEmail() {
7922
      this.email = null;
7923
    }
7924
 
7925
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7926
    public boolean isSetEmail() {
7927
      return this.email != null;
7928
    }
7929
 
7930
    public void setEmailIsSet(boolean value) {
7931
      if (!value) {
7932
        this.email = null;
7933
      }
7934
    }
7935
 
7936
    public void setFieldValue(_Fields field, Object value) {
7937
      switch (field) {
7938
      case EMAIL:
7939
        if (value == null) {
7940
          unsetEmail();
7941
        } else {
7942
          setEmail((String)value);
7943
        }
7944
        break;
7945
 
7946
      }
7947
    }
7948
 
7949
    public void setFieldValue(int fieldID, Object value) {
7950
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7951
    }
7952
 
7953
    public Object getFieldValue(_Fields field) {
7954
      switch (field) {
7955
      case EMAIL:
7956
        return getEmail();
7957
 
7958
      }
7959
      throw new IllegalStateException();
7960
    }
7961
 
7962
    public Object getFieldValue(int fieldId) {
7963
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7964
    }
7965
 
7966
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7967
    public boolean isSet(_Fields field) {
7968
      switch (field) {
7969
      case EMAIL:
7970
        return isSetEmail();
7971
      }
7972
      throw new IllegalStateException();
7973
    }
7974
 
7975
    public boolean isSet(int fieldID) {
7976
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7977
    }
7978
 
7979
    @Override
7980
    public boolean equals(Object that) {
7981
      if (that == null)
7982
        return false;
7983
      if (that instanceof userExists_args)
7984
        return this.equals((userExists_args)that);
7985
      return false;
7986
    }
7987
 
7988
    public boolean equals(userExists_args that) {
7989
      if (that == null)
7990
        return false;
7991
 
7992
      boolean this_present_email = true && this.isSetEmail();
7993
      boolean that_present_email = true && that.isSetEmail();
7994
      if (this_present_email || that_present_email) {
7995
        if (!(this_present_email && that_present_email))
7996
          return false;
7997
        if (!this.email.equals(that.email))
7998
          return false;
7999
      }
8000
 
8001
      return true;
8002
    }
8003
 
8004
    @Override
8005
    public int hashCode() {
8006
      return 0;
8007
    }
8008
 
8009
    public int compareTo(userExists_args other) {
8010
      if (!getClass().equals(other.getClass())) {
8011
        return getClass().getName().compareTo(other.getClass().getName());
8012
      }
8013
 
8014
      int lastComparison = 0;
8015
      userExists_args typedOther = (userExists_args)other;
8016
 
8017
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8018
      if (lastComparison != 0) {
8019
        return lastComparison;
8020
      }
8021
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8022
      if (lastComparison != 0) {
8023
        return lastComparison;
8024
      }
8025
      return 0;
8026
    }
8027
 
8028
    public void read(TProtocol iprot) throws TException {
8029
      TField field;
8030
      iprot.readStructBegin();
8031
      while (true)
8032
      {
8033
        field = iprot.readFieldBegin();
8034
        if (field.type == TType.STOP) { 
8035
          break;
8036
        }
8037
        _Fields fieldId = _Fields.findByThriftId(field.id);
8038
        if (fieldId == null) {
8039
          TProtocolUtil.skip(iprot, field.type);
8040
        } else {
8041
          switch (fieldId) {
8042
            case EMAIL:
8043
              if (field.type == TType.STRING) {
8044
                this.email = iprot.readString();
8045
              } else { 
8046
                TProtocolUtil.skip(iprot, field.type);
8047
              }
8048
              break;
8049
          }
8050
          iprot.readFieldEnd();
8051
        }
8052
      }
8053
      iprot.readStructEnd();
8054
      validate();
8055
    }
8056
 
8057
    public void write(TProtocol oprot) throws TException {
8058
      validate();
8059
 
8060
      oprot.writeStructBegin(STRUCT_DESC);
8061
      if (this.email != null) {
8062
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8063
        oprot.writeString(this.email);
8064
        oprot.writeFieldEnd();
8065
      }
8066
      oprot.writeFieldStop();
8067
      oprot.writeStructEnd();
8068
    }
8069
 
8070
    @Override
8071
    public String toString() {
8072
      StringBuilder sb = new StringBuilder("userExists_args(");
8073
      boolean first = true;
8074
 
8075
      sb.append("email:");
8076
      if (this.email == null) {
8077
        sb.append("null");
8078
      } else {
8079
        sb.append(this.email);
8080
      }
8081
      first = false;
8082
      sb.append(")");
8083
      return sb.toString();
8084
    }
8085
 
8086
    public void validate() throws TException {
8087
      // check for required fields
8088
    }
8089
 
8090
  }
8091
 
8092
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
8093
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
8094
 
8095
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8096
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8097
 
8098
    private boolean success;
8099
    private UserContextException ucx;
8100
 
8101
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8102
    public enum _Fields implements TFieldIdEnum {
8103
      SUCCESS((short)0, "success"),
8104
      UCX((short)1, "ucx");
8105
 
8106
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8108
 
8109
      static {
8110
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8111
          byId.put((int)field._thriftId, field);
8112
          byName.put(field.getFieldName(), field);
8113
        }
8114
      }
8115
 
8116
      /**
8117
       * Find the _Fields constant that matches fieldId, or null if its not found.
8118
       */
8119
      public static _Fields findByThriftId(int fieldId) {
8120
        return byId.get(fieldId);
8121
      }
8122
 
8123
      /**
8124
       * Find the _Fields constant that matches fieldId, throwing an exception
8125
       * if it is not found.
8126
       */
8127
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8128
        _Fields fields = findByThriftId(fieldId);
8129
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8130
        return fields;
8131
      }
8132
 
8133
      /**
8134
       * Find the _Fields constant that matches name, or null if its not found.
8135
       */
8136
      public static _Fields findByName(String name) {
8137
        return byName.get(name);
8138
      }
8139
 
8140
      private final short _thriftId;
8141
      private final String _fieldName;
8142
 
8143
      _Fields(short thriftId, String fieldName) {
8144
        _thriftId = thriftId;
8145
        _fieldName = fieldName;
8146
      }
8147
 
8148
      public short getThriftFieldId() {
8149
        return _thriftId;
8150
      }
8151
 
8152
      public String getFieldName() {
8153
        return _fieldName;
8154
      }
8155
    }
8156
 
8157
    // isset id assignments
8158
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 8159
    private BitSet __isset_bit_vector = new BitSet(1);
8160
 
8161
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8162
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 8163
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 8164
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8165
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 8166
    }});
8167
 
8168
    static {
553 chandransh 8169
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 8170
    }
8171
 
553 chandransh 8172
    public userExists_result() {
123 ashish 8173
    }
8174
 
553 chandransh 8175
    public userExists_result(
8176
      boolean success,
8177
      UserContextException ucx)
123 ashish 8178
    {
8179
      this();
553 chandransh 8180
      this.success = success;
8181
      setSuccessIsSet(true);
8182
      this.ucx = ucx;
123 ashish 8183
    }
8184
 
8185
    /**
8186
     * Performs a deep copy on <i>other</i>.
8187
     */
553 chandransh 8188
    public userExists_result(userExists_result other) {
123 ashish 8189
      __isset_bit_vector.clear();
8190
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 8191
      this.success = other.success;
8192
      if (other.isSetUcx()) {
8193
        this.ucx = new UserContextException(other.ucx);
123 ashish 8194
      }
8195
    }
8196
 
553 chandransh 8197
    public userExists_result deepCopy() {
8198
      return new userExists_result(this);
123 ashish 8199
    }
8200
 
8201
    @Deprecated
553 chandransh 8202
    public userExists_result clone() {
8203
      return new userExists_result(this);
123 ashish 8204
    }
8205
 
553 chandransh 8206
    public boolean isSuccess() {
8207
      return this.success;
123 ashish 8208
    }
8209
 
553 chandransh 8210
    public userExists_result setSuccess(boolean success) {
8211
      this.success = success;
8212
      setSuccessIsSet(true);
123 ashish 8213
      return this;
8214
    }
8215
 
553 chandransh 8216
    public void unsetSuccess() {
8217
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 8218
    }
8219
 
553 chandransh 8220
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8221
    public boolean isSetSuccess() {
8222
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 8223
    }
8224
 
553 chandransh 8225
    public void setSuccessIsSet(boolean value) {
8226
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8227
    }
8228
 
8229
    public UserContextException getUcx() {
8230
      return this.ucx;
8231
    }
8232
 
8233
    public userExists_result setUcx(UserContextException ucx) {
8234
      this.ucx = ucx;
8235
      return this;
8236
    }
8237
 
8238
    public void unsetUcx() {
8239
      this.ucx = null;
8240
    }
8241
 
8242
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8243
    public boolean isSetUcx() {
8244
      return this.ucx != null;
8245
    }
8246
 
8247
    public void setUcxIsSet(boolean value) {
123 ashish 8248
      if (!value) {
553 chandransh 8249
        this.ucx = null;
123 ashish 8250
      }
8251
    }
8252
 
553 chandransh 8253
    public void setFieldValue(_Fields field, Object value) {
8254
      switch (field) {
8255
      case SUCCESS:
8256
        if (value == null) {
8257
          unsetSuccess();
8258
        } else {
8259
          setSuccess((Boolean)value);
8260
        }
8261
        break;
8262
 
8263
      case UCX:
8264
        if (value == null) {
8265
          unsetUcx();
8266
        } else {
8267
          setUcx((UserContextException)value);
8268
        }
8269
        break;
8270
 
8271
      }
123 ashish 8272
    }
8273
 
553 chandransh 8274
    public void setFieldValue(int fieldID, Object value) {
8275
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8276
    }
8277
 
8278
    public Object getFieldValue(_Fields field) {
8279
      switch (field) {
8280
      case SUCCESS:
8281
        return new Boolean(isSuccess());
8282
 
8283
      case UCX:
8284
        return getUcx();
8285
 
8286
      }
8287
      throw new IllegalStateException();
8288
    }
8289
 
8290
    public Object getFieldValue(int fieldId) {
8291
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8292
    }
8293
 
8294
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8295
    public boolean isSet(_Fields field) {
8296
      switch (field) {
8297
      case SUCCESS:
8298
        return isSetSuccess();
8299
      case UCX:
8300
        return isSetUcx();
8301
      }
8302
      throw new IllegalStateException();
8303
    }
8304
 
8305
    public boolean isSet(int fieldID) {
8306
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8307
    }
8308
 
8309
    @Override
8310
    public boolean equals(Object that) {
8311
      if (that == null)
8312
        return false;
8313
      if (that instanceof userExists_result)
8314
        return this.equals((userExists_result)that);
8315
      return false;
8316
    }
8317
 
8318
    public boolean equals(userExists_result that) {
8319
      if (that == null)
8320
        return false;
8321
 
8322
      boolean this_present_success = true;
8323
      boolean that_present_success = true;
8324
      if (this_present_success || that_present_success) {
8325
        if (!(this_present_success && that_present_success))
8326
          return false;
8327
        if (this.success != that.success)
8328
          return false;
8329
      }
8330
 
8331
      boolean this_present_ucx = true && this.isSetUcx();
8332
      boolean that_present_ucx = true && that.isSetUcx();
8333
      if (this_present_ucx || that_present_ucx) {
8334
        if (!(this_present_ucx && that_present_ucx))
8335
          return false;
8336
        if (!this.ucx.equals(that.ucx))
8337
          return false;
8338
      }
8339
 
8340
      return true;
8341
    }
8342
 
8343
    @Override
8344
    public int hashCode() {
8345
      return 0;
8346
    }
8347
 
8348
    public int compareTo(userExists_result other) {
8349
      if (!getClass().equals(other.getClass())) {
8350
        return getClass().getName().compareTo(other.getClass().getName());
8351
      }
8352
 
8353
      int lastComparison = 0;
8354
      userExists_result typedOther = (userExists_result)other;
8355
 
8356
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8357
      if (lastComparison != 0) {
8358
        return lastComparison;
8359
      }
8360
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8361
      if (lastComparison != 0) {
8362
        return lastComparison;
8363
      }
8364
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8365
      if (lastComparison != 0) {
8366
        return lastComparison;
8367
      }
8368
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8369
      if (lastComparison != 0) {
8370
        return lastComparison;
8371
      }
8372
      return 0;
8373
    }
8374
 
8375
    public void read(TProtocol iprot) throws TException {
8376
      TField field;
8377
      iprot.readStructBegin();
8378
      while (true)
8379
      {
8380
        field = iprot.readFieldBegin();
8381
        if (field.type == TType.STOP) { 
8382
          break;
8383
        }
8384
        _Fields fieldId = _Fields.findByThriftId(field.id);
8385
        if (fieldId == null) {
8386
          TProtocolUtil.skip(iprot, field.type);
8387
        } else {
8388
          switch (fieldId) {
8389
            case SUCCESS:
8390
              if (field.type == TType.BOOL) {
8391
                this.success = iprot.readBool();
8392
                setSuccessIsSet(true);
8393
              } else { 
8394
                TProtocolUtil.skip(iprot, field.type);
8395
              }
8396
              break;
8397
            case UCX:
8398
              if (field.type == TType.STRUCT) {
8399
                this.ucx = new UserContextException();
8400
                this.ucx.read(iprot);
8401
              } else { 
8402
                TProtocolUtil.skip(iprot, field.type);
8403
              }
8404
              break;
8405
          }
8406
          iprot.readFieldEnd();
8407
        }
8408
      }
8409
      iprot.readStructEnd();
8410
      validate();
8411
    }
8412
 
8413
    public void write(TProtocol oprot) throws TException {
8414
      oprot.writeStructBegin(STRUCT_DESC);
8415
 
8416
      if (this.isSetSuccess()) {
8417
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8418
        oprot.writeBool(this.success);
8419
        oprot.writeFieldEnd();
8420
      } else if (this.isSetUcx()) {
8421
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8422
        this.ucx.write(oprot);
8423
        oprot.writeFieldEnd();
8424
      }
8425
      oprot.writeFieldStop();
8426
      oprot.writeStructEnd();
8427
    }
8428
 
8429
    @Override
8430
    public String toString() {
8431
      StringBuilder sb = new StringBuilder("userExists_result(");
8432
      boolean first = true;
8433
 
8434
      sb.append("success:");
8435
      sb.append(this.success);
8436
      first = false;
8437
      if (!first) sb.append(", ");
8438
      sb.append("ucx:");
8439
      if (this.ucx == null) {
8440
        sb.append("null");
8441
      } else {
8442
        sb.append(this.ucx);
8443
      }
8444
      first = false;
8445
      sb.append(")");
8446
      return sb.toString();
8447
    }
8448
 
8449
    public void validate() throws TException {
8450
      // check for required fields
8451
    }
8452
 
8453
  }
8454
 
8455
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8456
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8457
 
8458
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8459
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8460
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8461
 
8462
    private long userId;
8463
    private Address address;
8464
    private boolean setDefault;
8465
 
8466
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8467
    public enum _Fields implements TFieldIdEnum {
8468
      USER_ID((short)1, "userId"),
8469
      ADDRESS((short)2, "address"),
571 rajveer 8470
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8471
 
8472
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8473
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8474
 
8475
      static {
8476
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8477
          byId.put((int)field._thriftId, field);
8478
          byName.put(field.getFieldName(), field);
8479
        }
8480
      }
8481
 
8482
      /**
8483
       * Find the _Fields constant that matches fieldId, or null if its not found.
8484
       */
8485
      public static _Fields findByThriftId(int fieldId) {
8486
        return byId.get(fieldId);
8487
      }
8488
 
8489
      /**
8490
       * Find the _Fields constant that matches fieldId, throwing an exception
8491
       * if it is not found.
8492
       */
8493
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8494
        _Fields fields = findByThriftId(fieldId);
8495
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8496
        return fields;
8497
      }
8498
 
8499
      /**
8500
       * Find the _Fields constant that matches name, or null if its not found.
8501
       */
8502
      public static _Fields findByName(String name) {
8503
        return byName.get(name);
8504
      }
8505
 
8506
      private final short _thriftId;
8507
      private final String _fieldName;
8508
 
8509
      _Fields(short thriftId, String fieldName) {
8510
        _thriftId = thriftId;
8511
        _fieldName = fieldName;
8512
      }
8513
 
8514
      public short getThriftFieldId() {
8515
        return _thriftId;
8516
      }
8517
 
8518
      public String getFieldName() {
8519
        return _fieldName;
8520
      }
8521
    }
8522
 
8523
    // isset id assignments
8524
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8525
    private static final int __SETDEFAULT_ISSET_ID = 1;
8526
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8527
 
8528
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8529
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8530
          new FieldValueMetaData(TType.I64)));
8531
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8532
          new StructMetaData(TType.STRUCT, Address.class)));
8533
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8534
          new FieldValueMetaData(TType.BOOL)));
8535
    }});
8536
 
8537
    static {
8538
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8539
    }
8540
 
8541
    public addAddressForUser_args() {
8542
    }
8543
 
8544
    public addAddressForUser_args(
8545
      long userId,
8546
      Address address,
8547
      boolean setDefault)
8548
    {
8549
      this();
8550
      this.userId = userId;
8551
      setUserIdIsSet(true);
8552
      this.address = address;
8553
      this.setDefault = setDefault;
8554
      setSetDefaultIsSet(true);
8555
    }
8556
 
8557
    /**
8558
     * Performs a deep copy on <i>other</i>.
8559
     */
8560
    public addAddressForUser_args(addAddressForUser_args other) {
8561
      __isset_bit_vector.clear();
8562
      __isset_bit_vector.or(other.__isset_bit_vector);
8563
      this.userId = other.userId;
8564
      if (other.isSetAddress()) {
8565
        this.address = new Address(other.address);
8566
      }
8567
      this.setDefault = other.setDefault;
8568
    }
8569
 
8570
    public addAddressForUser_args deepCopy() {
8571
      return new addAddressForUser_args(this);
8572
    }
8573
 
8574
    @Deprecated
8575
    public addAddressForUser_args clone() {
8576
      return new addAddressForUser_args(this);
8577
    }
8578
 
8579
    public long getUserId() {
8580
      return this.userId;
8581
    }
8582
 
8583
    public addAddressForUser_args setUserId(long userId) {
8584
      this.userId = userId;
8585
      setUserIdIsSet(true);
123 ashish 8586
      return this;
8587
    }
8588
 
553 chandransh 8589
    public void unsetUserId() {
8590
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8591
    }
8592
 
553 chandransh 8593
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8594
    public boolean isSetUserId() {
8595
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8596
    }
8597
 
553 chandransh 8598
    public void setUserIdIsSet(boolean value) {
8599
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8600
    }
8601
 
8602
    public Address getAddress() {
8603
      return this.address;
8604
    }
8605
 
8606
    public addAddressForUser_args setAddress(Address address) {
8607
      this.address = address;
8608
      return this;
8609
    }
8610
 
8611
    public void unsetAddress() {
8612
      this.address = null;
8613
    }
8614
 
8615
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8616
    public boolean isSetAddress() {
8617
      return this.address != null;
8618
    }
8619
 
8620
    public void setAddressIsSet(boolean value) {
123 ashish 8621
      if (!value) {
553 chandransh 8622
        this.address = null;
123 ashish 8623
      }
8624
    }
8625
 
553 chandransh 8626
    public boolean isSetDefault() {
8627
      return this.setDefault;
8628
    }
8629
 
8630
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8631
      this.setDefault = setDefault;
8632
      setSetDefaultIsSet(true);
8633
      return this;
8634
    }
8635
 
8636
    public void unsetSetDefault() {
8637
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8638
    }
8639
 
8640
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8641
    public boolean isSetSetDefault() {
8642
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8643
    }
8644
 
8645
    public void setSetDefaultIsSet(boolean value) {
8646
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8647
    }
8648
 
123 ashish 8649
    public void setFieldValue(_Fields field, Object value) {
8650
      switch (field) {
553 chandransh 8651
      case USER_ID:
123 ashish 8652
        if (value == null) {
553 chandransh 8653
          unsetUserId();
123 ashish 8654
        } else {
553 chandransh 8655
          setUserId((Long)value);
123 ashish 8656
        }
8657
        break;
8658
 
553 chandransh 8659
      case ADDRESS:
123 ashish 8660
        if (value == null) {
553 chandransh 8661
          unsetAddress();
123 ashish 8662
        } else {
553 chandransh 8663
          setAddress((Address)value);
123 ashish 8664
        }
8665
        break;
8666
 
553 chandransh 8667
      case SET_DEFAULT:
8668
        if (value == null) {
8669
          unsetSetDefault();
8670
        } else {
8671
          setSetDefault((Boolean)value);
8672
        }
8673
        break;
8674
 
123 ashish 8675
      }
8676
    }
8677
 
8678
    public void setFieldValue(int fieldID, Object value) {
8679
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8680
    }
8681
 
8682
    public Object getFieldValue(_Fields field) {
8683
      switch (field) {
553 chandransh 8684
      case USER_ID:
8685
        return new Long(getUserId());
123 ashish 8686
 
553 chandransh 8687
      case ADDRESS:
8688
        return getAddress();
123 ashish 8689
 
553 chandransh 8690
      case SET_DEFAULT:
8691
        return new Boolean(isSetDefault());
8692
 
123 ashish 8693
      }
8694
      throw new IllegalStateException();
8695
    }
8696
 
8697
    public Object getFieldValue(int fieldId) {
8698
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8699
    }
8700
 
8701
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8702
    public boolean isSet(_Fields field) {
8703
      switch (field) {
553 chandransh 8704
      case USER_ID:
8705
        return isSetUserId();
8706
      case ADDRESS:
8707
        return isSetAddress();
8708
      case SET_DEFAULT:
8709
        return isSetSetDefault();
123 ashish 8710
      }
8711
      throw new IllegalStateException();
8712
    }
8713
 
8714
    public boolean isSet(int fieldID) {
8715
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8716
    }
8717
 
8718
    @Override
8719
    public boolean equals(Object that) {
8720
      if (that == null)
8721
        return false;
553 chandransh 8722
      if (that instanceof addAddressForUser_args)
8723
        return this.equals((addAddressForUser_args)that);
123 ashish 8724
      return false;
8725
    }
8726
 
553 chandransh 8727
    public boolean equals(addAddressForUser_args that) {
123 ashish 8728
      if (that == null)
8729
        return false;
8730
 
553 chandransh 8731
      boolean this_present_userId = true;
8732
      boolean that_present_userId = true;
8733
      if (this_present_userId || that_present_userId) {
8734
        if (!(this_present_userId && that_present_userId))
123 ashish 8735
          return false;
553 chandransh 8736
        if (this.userId != that.userId)
123 ashish 8737
          return false;
8738
      }
8739
 
553 chandransh 8740
      boolean this_present_address = true && this.isSetAddress();
8741
      boolean that_present_address = true && that.isSetAddress();
8742
      if (this_present_address || that_present_address) {
8743
        if (!(this_present_address && that_present_address))
123 ashish 8744
          return false;
553 chandransh 8745
        if (!this.address.equals(that.address))
123 ashish 8746
          return false;
8747
      }
8748
 
553 chandransh 8749
      boolean this_present_setDefault = true;
8750
      boolean that_present_setDefault = true;
8751
      if (this_present_setDefault || that_present_setDefault) {
8752
        if (!(this_present_setDefault && that_present_setDefault))
8753
          return false;
8754
        if (this.setDefault != that.setDefault)
8755
          return false;
8756
      }
8757
 
123 ashish 8758
      return true;
8759
    }
8760
 
8761
    @Override
8762
    public int hashCode() {
8763
      return 0;
8764
    }
8765
 
553 chandransh 8766
    public int compareTo(addAddressForUser_args other) {
123 ashish 8767
      if (!getClass().equals(other.getClass())) {
8768
        return getClass().getName().compareTo(other.getClass().getName());
8769
      }
8770
 
8771
      int lastComparison = 0;
553 chandransh 8772
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8773
 
553 chandransh 8774
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8775
      if (lastComparison != 0) {
8776
        return lastComparison;
8777
      }
553 chandransh 8778
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8779
      if (lastComparison != 0) {
8780
        return lastComparison;
8781
      }
553 chandransh 8782
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8783
      if (lastComparison != 0) {
8784
        return lastComparison;
8785
      }
553 chandransh 8786
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8787
      if (lastComparison != 0) {
8788
        return lastComparison;
8789
      }
553 chandransh 8790
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8791
      if (lastComparison != 0) {
8792
        return lastComparison;
8793
      }
8794
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8795
      if (lastComparison != 0) {
8796
        return lastComparison;
8797
      }
123 ashish 8798
      return 0;
8799
    }
8800
 
8801
    public void read(TProtocol iprot) throws TException {
8802
      TField field;
8803
      iprot.readStructBegin();
8804
      while (true)
8805
      {
8806
        field = iprot.readFieldBegin();
8807
        if (field.type == TType.STOP) { 
8808
          break;
8809
        }
8810
        _Fields fieldId = _Fields.findByThriftId(field.id);
8811
        if (fieldId == null) {
8812
          TProtocolUtil.skip(iprot, field.type);
8813
        } else {
8814
          switch (fieldId) {
553 chandransh 8815
            case USER_ID:
8816
              if (field.type == TType.I64) {
8817
                this.userId = iprot.readI64();
8818
                setUserIdIsSet(true);
123 ashish 8819
              } else { 
8820
                TProtocolUtil.skip(iprot, field.type);
8821
              }
8822
              break;
553 chandransh 8823
            case ADDRESS:
8824
              if (field.type == TType.STRUCT) {
8825
                this.address = new Address();
8826
                this.address.read(iprot);
123 ashish 8827
              } else { 
8828
                TProtocolUtil.skip(iprot, field.type);
8829
              }
8830
              break;
553 chandransh 8831
            case SET_DEFAULT:
123 ashish 8832
              if (field.type == TType.BOOL) {
553 chandransh 8833
                this.setDefault = iprot.readBool();
8834
                setSetDefaultIsSet(true);
123 ashish 8835
              } else { 
8836
                TProtocolUtil.skip(iprot, field.type);
8837
              }
8838
              break;
8839
          }
8840
          iprot.readFieldEnd();
8841
        }
8842
      }
8843
      iprot.readStructEnd();
8844
      validate();
8845
    }
8846
 
8847
    public void write(TProtocol oprot) throws TException {
8848
      validate();
8849
 
8850
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8851
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8852
      oprot.writeI64(this.userId);
8853
      oprot.writeFieldEnd();
8854
      if (this.address != null) {
8855
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8856
        this.address.write(oprot);
123 ashish 8857
        oprot.writeFieldEnd();
8858
      }
553 chandransh 8859
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
8860
      oprot.writeBool(this.setDefault);
8861
      oprot.writeFieldEnd();
123 ashish 8862
      oprot.writeFieldStop();
8863
      oprot.writeStructEnd();
8864
    }
8865
 
8866
    @Override
8867
    public String toString() {
553 chandransh 8868
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 8869
      boolean first = true;
8870
 
553 chandransh 8871
      sb.append("userId:");
8872
      sb.append(this.userId);
123 ashish 8873
      first = false;
8874
      if (!first) sb.append(", ");
553 chandransh 8875
      sb.append("address:");
8876
      if (this.address == null) {
123 ashish 8877
        sb.append("null");
8878
      } else {
553 chandransh 8879
        sb.append(this.address);
123 ashish 8880
      }
8881
      first = false;
8882
      if (!first) sb.append(", ");
553 chandransh 8883
      sb.append("setDefault:");
8884
      sb.append(this.setDefault);
8885
      first = false;
123 ashish 8886
      sb.append(")");
8887
      return sb.toString();
8888
    }
8889
 
8890
    public void validate() throws TException {
8891
      // check for required fields
8892
    }
8893
 
8894
  }
8895
 
553 chandransh 8896
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
8897
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 8898
 
571 rajveer 8899
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 8900
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 8901
 
571 rajveer 8902
    private long success;
553 chandransh 8903
    private UserContextException ucx;
123 ashish 8904
 
8905
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8906
    public enum _Fields implements TFieldIdEnum {
8907
      SUCCESS((short)0, "success"),
553 chandransh 8908
      UCX((short)1, "ucx");
123 ashish 8909
 
8910
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8911
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8912
 
8913
      static {
8914
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8915
          byId.put((int)field._thriftId, field);
8916
          byName.put(field.getFieldName(), field);
8917
        }
8918
      }
8919
 
8920
      /**
8921
       * Find the _Fields constant that matches fieldId, or null if its not found.
8922
       */
8923
      public static _Fields findByThriftId(int fieldId) {
8924
        return byId.get(fieldId);
8925
      }
8926
 
8927
      /**
8928
       * Find the _Fields constant that matches fieldId, throwing an exception
8929
       * if it is not found.
8930
       */
8931
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8932
        _Fields fields = findByThriftId(fieldId);
8933
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8934
        return fields;
8935
      }
8936
 
8937
      /**
8938
       * Find the _Fields constant that matches name, or null if its not found.
8939
       */
8940
      public static _Fields findByName(String name) {
8941
        return byName.get(name);
8942
      }
8943
 
8944
      private final short _thriftId;
8945
      private final String _fieldName;
8946
 
8947
      _Fields(short thriftId, String fieldName) {
8948
        _thriftId = thriftId;
8949
        _fieldName = fieldName;
8950
      }
8951
 
8952
      public short getThriftFieldId() {
8953
        return _thriftId;
8954
      }
8955
 
8956
      public String getFieldName() {
8957
        return _fieldName;
8958
      }
8959
    }
8960
 
8961
    // isset id assignments
8962
    private static final int __SUCCESS_ISSET_ID = 0;
8963
    private BitSet __isset_bit_vector = new BitSet(1);
8964
 
8965
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8966
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 8967
          new FieldValueMetaData(TType.I64)));
553 chandransh 8968
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 8969
          new FieldValueMetaData(TType.STRUCT)));
8970
    }});
8971
 
8972
    static {
553 chandransh 8973
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 8974
    }
8975
 
553 chandransh 8976
    public addAddressForUser_result() {
123 ashish 8977
    }
8978
 
553 chandransh 8979
    public addAddressForUser_result(
571 rajveer 8980
      long success,
553 chandransh 8981
      UserContextException ucx)
123 ashish 8982
    {
8983
      this();
8984
      this.success = success;
8985
      setSuccessIsSet(true);
553 chandransh 8986
      this.ucx = ucx;
123 ashish 8987
    }
8988
 
8989
    /**
8990
     * Performs a deep copy on <i>other</i>.
8991
     */
553 chandransh 8992
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 8993
      __isset_bit_vector.clear();
8994
      __isset_bit_vector.or(other.__isset_bit_vector);
8995
      this.success = other.success;
553 chandransh 8996
      if (other.isSetUcx()) {
8997
        this.ucx = new UserContextException(other.ucx);
123 ashish 8998
      }
8999
    }
9000
 
553 chandransh 9001
    public addAddressForUser_result deepCopy() {
9002
      return new addAddressForUser_result(this);
123 ashish 9003
    }
9004
 
9005
    @Deprecated
553 chandransh 9006
    public addAddressForUser_result clone() {
9007
      return new addAddressForUser_result(this);
123 ashish 9008
    }
9009
 
571 rajveer 9010
    public long getSuccess() {
123 ashish 9011
      return this.success;
9012
    }
9013
 
571 rajveer 9014
    public addAddressForUser_result setSuccess(long success) {
123 ashish 9015
      this.success = success;
9016
      setSuccessIsSet(true);
9017
      return this;
9018
    }
9019
 
9020
    public void unsetSuccess() {
9021
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9022
    }
9023
 
9024
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9025
    public boolean isSetSuccess() {
9026
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9027
    }
9028
 
9029
    public void setSuccessIsSet(boolean value) {
9030
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9031
    }
9032
 
553 chandransh 9033
    public UserContextException getUcx() {
9034
      return this.ucx;
123 ashish 9035
    }
9036
 
553 chandransh 9037
    public addAddressForUser_result setUcx(UserContextException ucx) {
9038
      this.ucx = ucx;
123 ashish 9039
      return this;
9040
    }
9041
 
553 chandransh 9042
    public void unsetUcx() {
9043
      this.ucx = null;
123 ashish 9044
    }
9045
 
553 chandransh 9046
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9047
    public boolean isSetUcx() {
9048
      return this.ucx != null;
123 ashish 9049
    }
9050
 
553 chandransh 9051
    public void setUcxIsSet(boolean value) {
123 ashish 9052
      if (!value) {
553 chandransh 9053
        this.ucx = null;
123 ashish 9054
      }
9055
    }
9056
 
9057
    public void setFieldValue(_Fields field, Object value) {
9058
      switch (field) {
9059
      case SUCCESS:
9060
        if (value == null) {
9061
          unsetSuccess();
9062
        } else {
571 rajveer 9063
          setSuccess((Long)value);
123 ashish 9064
        }
9065
        break;
9066
 
553 chandransh 9067
      case UCX:
123 ashish 9068
        if (value == null) {
553 chandransh 9069
          unsetUcx();
123 ashish 9070
        } else {
553 chandransh 9071
          setUcx((UserContextException)value);
123 ashish 9072
        }
9073
        break;
9074
 
9075
      }
9076
    }
9077
 
9078
    public void setFieldValue(int fieldID, Object value) {
9079
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9080
    }
9081
 
9082
    public Object getFieldValue(_Fields field) {
9083
      switch (field) {
9084
      case SUCCESS:
571 rajveer 9085
        return new Long(getSuccess());
123 ashish 9086
 
553 chandransh 9087
      case UCX:
9088
        return getUcx();
123 ashish 9089
 
9090
      }
9091
      throw new IllegalStateException();
9092
    }
9093
 
9094
    public Object getFieldValue(int fieldId) {
9095
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9096
    }
9097
 
9098
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9099
    public boolean isSet(_Fields field) {
9100
      switch (field) {
9101
      case SUCCESS:
9102
        return isSetSuccess();
553 chandransh 9103
      case UCX:
9104
        return isSetUcx();
123 ashish 9105
      }
9106
      throw new IllegalStateException();
9107
    }
9108
 
9109
    public boolean isSet(int fieldID) {
9110
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9111
    }
9112
 
9113
    @Override
9114
    public boolean equals(Object that) {
9115
      if (that == null)
9116
        return false;
553 chandransh 9117
      if (that instanceof addAddressForUser_result)
9118
        return this.equals((addAddressForUser_result)that);
123 ashish 9119
      return false;
9120
    }
9121
 
553 chandransh 9122
    public boolean equals(addAddressForUser_result that) {
123 ashish 9123
      if (that == null)
9124
        return false;
9125
 
9126
      boolean this_present_success = true;
9127
      boolean that_present_success = true;
9128
      if (this_present_success || that_present_success) {
9129
        if (!(this_present_success && that_present_success))
9130
          return false;
9131
        if (this.success != that.success)
9132
          return false;
9133
      }
9134
 
553 chandransh 9135
      boolean this_present_ucx = true && this.isSetUcx();
9136
      boolean that_present_ucx = true && that.isSetUcx();
9137
      if (this_present_ucx || that_present_ucx) {
9138
        if (!(this_present_ucx && that_present_ucx))
123 ashish 9139
          return false;
553 chandransh 9140
        if (!this.ucx.equals(that.ucx))
123 ashish 9141
          return false;
9142
      }
9143
 
9144
      return true;
9145
    }
9146
 
9147
    @Override
9148
    public int hashCode() {
9149
      return 0;
9150
    }
9151
 
553 chandransh 9152
    public int compareTo(addAddressForUser_result other) {
123 ashish 9153
      if (!getClass().equals(other.getClass())) {
9154
        return getClass().getName().compareTo(other.getClass().getName());
9155
      }
9156
 
9157
      int lastComparison = 0;
553 chandransh 9158
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 9159
 
9160
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9161
      if (lastComparison != 0) {
9162
        return lastComparison;
9163
      }
9164
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9165
      if (lastComparison != 0) {
9166
        return lastComparison;
9167
      }
553 chandransh 9168
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 9169
      if (lastComparison != 0) {
9170
        return lastComparison;
9171
      }
553 chandransh 9172
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 9173
      if (lastComparison != 0) {
9174
        return lastComparison;
9175
      }
9176
      return 0;
9177
    }
9178
 
9179
    public void read(TProtocol iprot) throws TException {
9180
      TField field;
9181
      iprot.readStructBegin();
9182
      while (true)
9183
      {
9184
        field = iprot.readFieldBegin();
9185
        if (field.type == TType.STOP) { 
9186
          break;
9187
        }
9188
        _Fields fieldId = _Fields.findByThriftId(field.id);
9189
        if (fieldId == null) {
9190
          TProtocolUtil.skip(iprot, field.type);
9191
        } else {
9192
          switch (fieldId) {
9193
            case SUCCESS:
571 rajveer 9194
              if (field.type == TType.I64) {
9195
                this.success = iprot.readI64();
123 ashish 9196
                setSuccessIsSet(true);
9197
              } else { 
9198
                TProtocolUtil.skip(iprot, field.type);
9199
              }
9200
              break;
553 chandransh 9201
            case UCX:
123 ashish 9202
              if (field.type == TType.STRUCT) {
553 chandransh 9203
                this.ucx = new UserContextException();
9204
                this.ucx.read(iprot);
123 ashish 9205
              } else { 
9206
                TProtocolUtil.skip(iprot, field.type);
9207
              }
9208
              break;
9209
          }
9210
          iprot.readFieldEnd();
9211
        }
9212
      }
9213
      iprot.readStructEnd();
9214
      validate();
9215
    }
9216
 
9217
    public void write(TProtocol oprot) throws TException {
9218
      oprot.writeStructBegin(STRUCT_DESC);
9219
 
9220
      if (this.isSetSuccess()) {
9221
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 9222
        oprot.writeI64(this.success);
123 ashish 9223
        oprot.writeFieldEnd();
553 chandransh 9224
      } else if (this.isSetUcx()) {
9225
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9226
        this.ucx.write(oprot);
123 ashish 9227
        oprot.writeFieldEnd();
9228
      }
9229
      oprot.writeFieldStop();
9230
      oprot.writeStructEnd();
9231
    }
9232
 
9233
    @Override
9234
    public String toString() {
553 chandransh 9235
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 9236
      boolean first = true;
9237
 
9238
      sb.append("success:");
9239
      sb.append(this.success);
9240
      first = false;
9241
      if (!first) sb.append(", ");
553 chandransh 9242
      sb.append("ucx:");
9243
      if (this.ucx == null) {
123 ashish 9244
        sb.append("null");
9245
      } else {
553 chandransh 9246
        sb.append(this.ucx);
123 ashish 9247
      }
9248
      first = false;
9249
      sb.append(")");
9250
      return sb.toString();
9251
    }
9252
 
9253
    public void validate() throws TException {
9254
      // check for required fields
9255
    }
9256
 
9257
  }
9258
 
553 chandransh 9259
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9260
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 9261
 
553 chandransh 9262
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9263
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 9264
 
553 chandransh 9265
    private long userid;
9266
    private long addressId;
48 ashish 9267
 
9268
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9269
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9270
      USERID((short)1, "userid"),
9271
      ADDRESS_ID((short)2, "addressId");
48 ashish 9272
 
9273
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9274
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9275
 
9276
      static {
9277
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9278
          byId.put((int)field._thriftId, field);
9279
          byName.put(field.getFieldName(), field);
9280
        }
9281
      }
9282
 
9283
      /**
9284
       * Find the _Fields constant that matches fieldId, or null if its not found.
9285
       */
9286
      public static _Fields findByThriftId(int fieldId) {
9287
        return byId.get(fieldId);
9288
      }
9289
 
9290
      /**
9291
       * Find the _Fields constant that matches fieldId, throwing an exception
9292
       * if it is not found.
9293
       */
9294
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9295
        _Fields fields = findByThriftId(fieldId);
9296
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9297
        return fields;
9298
      }
9299
 
9300
      /**
9301
       * Find the _Fields constant that matches name, or null if its not found.
9302
       */
9303
      public static _Fields findByName(String name) {
9304
        return byName.get(name);
9305
      }
9306
 
9307
      private final short _thriftId;
9308
      private final String _fieldName;
9309
 
9310
      _Fields(short thriftId, String fieldName) {
9311
        _thriftId = thriftId;
9312
        _fieldName = fieldName;
9313
      }
9314
 
9315
      public short getThriftFieldId() {
9316
        return _thriftId;
9317
      }
9318
 
9319
      public String getFieldName() {
9320
        return _fieldName;
9321
      }
9322
    }
9323
 
9324
    // isset id assignments
553 chandransh 9325
    private static final int __USERID_ISSET_ID = 0;
9326
    private static final int __ADDRESSID_ISSET_ID = 1;
9327
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 9328
 
9329
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9330
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9331
          new FieldValueMetaData(TType.I64)));
9332
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9333
          new FieldValueMetaData(TType.I64)));
48 ashish 9334
    }});
9335
 
9336
    static {
553 chandransh 9337
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 9338
    }
9339
 
553 chandransh 9340
    public removeAddressForUser_args() {
48 ashish 9341
    }
9342
 
553 chandransh 9343
    public removeAddressForUser_args(
9344
      long userid,
9345
      long addressId)
48 ashish 9346
    {
9347
      this();
553 chandransh 9348
      this.userid = userid;
9349
      setUseridIsSet(true);
9350
      this.addressId = addressId;
9351
      setAddressIdIsSet(true);
48 ashish 9352
    }
9353
 
9354
    /**
9355
     * Performs a deep copy on <i>other</i>.
9356
     */
553 chandransh 9357
    public removeAddressForUser_args(removeAddressForUser_args other) {
9358
      __isset_bit_vector.clear();
9359
      __isset_bit_vector.or(other.__isset_bit_vector);
9360
      this.userid = other.userid;
9361
      this.addressId = other.addressId;
48 ashish 9362
    }
9363
 
553 chandransh 9364
    public removeAddressForUser_args deepCopy() {
9365
      return new removeAddressForUser_args(this);
48 ashish 9366
    }
9367
 
9368
    @Deprecated
553 chandransh 9369
    public removeAddressForUser_args clone() {
9370
      return new removeAddressForUser_args(this);
48 ashish 9371
    }
9372
 
553 chandransh 9373
    public long getUserid() {
9374
      return this.userid;
48 ashish 9375
    }
9376
 
553 chandransh 9377
    public removeAddressForUser_args setUserid(long userid) {
9378
      this.userid = userid;
9379
      setUseridIsSet(true);
48 ashish 9380
      return this;
9381
    }
9382
 
553 chandransh 9383
    public void unsetUserid() {
9384
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9385
    }
9386
 
553 chandransh 9387
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9388
    public boolean isSetUserid() {
9389
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9390
    }
9391
 
553 chandransh 9392
    public void setUseridIsSet(boolean value) {
9393
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9394
    }
9395
 
553 chandransh 9396
    public long getAddressId() {
9397
      return this.addressId;
9398
    }
9399
 
9400
    public removeAddressForUser_args setAddressId(long addressId) {
9401
      this.addressId = addressId;
9402
      setAddressIdIsSet(true);
9403
      return this;
9404
    }
9405
 
9406
    public void unsetAddressId() {
9407
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9408
    }
9409
 
9410
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9411
    public boolean isSetAddressId() {
9412
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9413
    }
9414
 
9415
    public void setAddressIdIsSet(boolean value) {
9416
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9417
    }
9418
 
48 ashish 9419
    public void setFieldValue(_Fields field, Object value) {
9420
      switch (field) {
553 chandransh 9421
      case USERID:
48 ashish 9422
        if (value == null) {
553 chandransh 9423
          unsetUserid();
48 ashish 9424
        } else {
553 chandransh 9425
          setUserid((Long)value);
48 ashish 9426
        }
9427
        break;
9428
 
553 chandransh 9429
      case ADDRESS_ID:
9430
        if (value == null) {
9431
          unsetAddressId();
9432
        } else {
9433
          setAddressId((Long)value);
9434
        }
9435
        break;
9436
 
48 ashish 9437
      }
9438
    }
9439
 
9440
    public void setFieldValue(int fieldID, Object value) {
9441
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9442
    }
9443
 
9444
    public Object getFieldValue(_Fields field) {
9445
      switch (field) {
553 chandransh 9446
      case USERID:
9447
        return new Long(getUserid());
48 ashish 9448
 
553 chandransh 9449
      case ADDRESS_ID:
9450
        return new Long(getAddressId());
9451
 
48 ashish 9452
      }
9453
      throw new IllegalStateException();
9454
    }
9455
 
9456
    public Object getFieldValue(int fieldId) {
9457
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9458
    }
9459
 
9460
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9461
    public boolean isSet(_Fields field) {
9462
      switch (field) {
553 chandransh 9463
      case USERID:
9464
        return isSetUserid();
9465
      case ADDRESS_ID:
9466
        return isSetAddressId();
48 ashish 9467
      }
9468
      throw new IllegalStateException();
9469
    }
9470
 
9471
    public boolean isSet(int fieldID) {
9472
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9473
    }
9474
 
9475
    @Override
9476
    public boolean equals(Object that) {
9477
      if (that == null)
9478
        return false;
553 chandransh 9479
      if (that instanceof removeAddressForUser_args)
9480
        return this.equals((removeAddressForUser_args)that);
48 ashish 9481
      return false;
9482
    }
9483
 
553 chandransh 9484
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9485
      if (that == null)
9486
        return false;
9487
 
553 chandransh 9488
      boolean this_present_userid = true;
9489
      boolean that_present_userid = true;
9490
      if (this_present_userid || that_present_userid) {
9491
        if (!(this_present_userid && that_present_userid))
48 ashish 9492
          return false;
553 chandransh 9493
        if (this.userid != that.userid)
48 ashish 9494
          return false;
9495
      }
9496
 
553 chandransh 9497
      boolean this_present_addressId = true;
9498
      boolean that_present_addressId = true;
9499
      if (this_present_addressId || that_present_addressId) {
9500
        if (!(this_present_addressId && that_present_addressId))
9501
          return false;
9502
        if (this.addressId != that.addressId)
9503
          return false;
9504
      }
9505
 
48 ashish 9506
      return true;
9507
    }
9508
 
9509
    @Override
9510
    public int hashCode() {
9511
      return 0;
9512
    }
9513
 
553 chandransh 9514
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9515
      if (!getClass().equals(other.getClass())) {
9516
        return getClass().getName().compareTo(other.getClass().getName());
9517
      }
9518
 
9519
      int lastComparison = 0;
553 chandransh 9520
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9521
 
553 chandransh 9522
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9523
      if (lastComparison != 0) {
9524
        return lastComparison;
9525
      }
553 chandransh 9526
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9527
      if (lastComparison != 0) {
9528
        return lastComparison;
9529
      }
553 chandransh 9530
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9531
      if (lastComparison != 0) {
9532
        return lastComparison;
9533
      }
9534
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9535
      if (lastComparison != 0) {
9536
        return lastComparison;
9537
      }
48 ashish 9538
      return 0;
9539
    }
9540
 
9541
    public void read(TProtocol iprot) throws TException {
9542
      TField field;
9543
      iprot.readStructBegin();
9544
      while (true)
9545
      {
9546
        field = iprot.readFieldBegin();
9547
        if (field.type == TType.STOP) { 
9548
          break;
9549
        }
9550
        _Fields fieldId = _Fields.findByThriftId(field.id);
9551
        if (fieldId == null) {
9552
          TProtocolUtil.skip(iprot, field.type);
9553
        } else {
9554
          switch (fieldId) {
553 chandransh 9555
            case USERID:
9556
              if (field.type == TType.I64) {
9557
                this.userid = iprot.readI64();
9558
                setUseridIsSet(true);
48 ashish 9559
              } else { 
9560
                TProtocolUtil.skip(iprot, field.type);
9561
              }
9562
              break;
553 chandransh 9563
            case ADDRESS_ID:
9564
              if (field.type == TType.I64) {
9565
                this.addressId = iprot.readI64();
9566
                setAddressIdIsSet(true);
9567
              } else { 
9568
                TProtocolUtil.skip(iprot, field.type);
9569
              }
9570
              break;
48 ashish 9571
          }
9572
          iprot.readFieldEnd();
9573
        }
9574
      }
9575
      iprot.readStructEnd();
9576
      validate();
9577
    }
9578
 
9579
    public void write(TProtocol oprot) throws TException {
9580
      validate();
9581
 
9582
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9583
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9584
      oprot.writeI64(this.userid);
9585
      oprot.writeFieldEnd();
9586
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9587
      oprot.writeI64(this.addressId);
9588
      oprot.writeFieldEnd();
48 ashish 9589
      oprot.writeFieldStop();
9590
      oprot.writeStructEnd();
9591
    }
9592
 
9593
    @Override
9594
    public String toString() {
553 chandransh 9595
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9596
      boolean first = true;
9597
 
553 chandransh 9598
      sb.append("userid:");
9599
      sb.append(this.userid);
48 ashish 9600
      first = false;
553 chandransh 9601
      if (!first) sb.append(", ");
9602
      sb.append("addressId:");
9603
      sb.append(this.addressId);
9604
      first = false;
48 ashish 9605
      sb.append(")");
9606
      return sb.toString();
9607
    }
9608
 
9609
    public void validate() throws TException {
9610
      // check for required fields
9611
    }
9612
 
9613
  }
9614
 
553 chandransh 9615
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9616
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9617
 
9618
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9619
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9620
 
9621
    private boolean success;
9622
    private UserContextException ucx;
9623
 
9624
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9625
    public enum _Fields implements TFieldIdEnum {
9626
      SUCCESS((short)0, "success"),
9627
      UCX((short)1, "ucx");
9628
 
9629
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9630
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9631
 
9632
      static {
9633
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9634
          byId.put((int)field._thriftId, field);
9635
          byName.put(field.getFieldName(), field);
9636
        }
9637
      }
9638
 
9639
      /**
9640
       * Find the _Fields constant that matches fieldId, or null if its not found.
9641
       */
9642
      public static _Fields findByThriftId(int fieldId) {
9643
        return byId.get(fieldId);
9644
      }
9645
 
9646
      /**
9647
       * Find the _Fields constant that matches fieldId, throwing an exception
9648
       * if it is not found.
9649
       */
9650
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9651
        _Fields fields = findByThriftId(fieldId);
9652
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9653
        return fields;
9654
      }
9655
 
9656
      /**
9657
       * Find the _Fields constant that matches name, or null if its not found.
9658
       */
9659
      public static _Fields findByName(String name) {
9660
        return byName.get(name);
9661
      }
9662
 
9663
      private final short _thriftId;
9664
      private final String _fieldName;
9665
 
9666
      _Fields(short thriftId, String fieldName) {
9667
        _thriftId = thriftId;
9668
        _fieldName = fieldName;
9669
      }
9670
 
9671
      public short getThriftFieldId() {
9672
        return _thriftId;
9673
      }
9674
 
9675
      public String getFieldName() {
9676
        return _fieldName;
9677
      }
9678
    }
9679
 
9680
    // isset id assignments
9681
    private static final int __SUCCESS_ISSET_ID = 0;
9682
    private BitSet __isset_bit_vector = new BitSet(1);
9683
 
9684
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9685
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9686
          new FieldValueMetaData(TType.BOOL)));
9687
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9688
          new FieldValueMetaData(TType.STRUCT)));
9689
    }});
9690
 
9691
    static {
553 chandransh 9692
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9693
    }
9694
 
553 chandransh 9695
    public removeAddressForUser_result() {
48 ashish 9696
    }
9697
 
553 chandransh 9698
    public removeAddressForUser_result(
48 ashish 9699
      boolean success,
9700
      UserContextException ucx)
9701
    {
9702
      this();
9703
      this.success = success;
9704
      setSuccessIsSet(true);
9705
      this.ucx = ucx;
9706
    }
9707
 
9708
    /**
9709
     * Performs a deep copy on <i>other</i>.
9710
     */
553 chandransh 9711
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9712
      __isset_bit_vector.clear();
9713
      __isset_bit_vector.or(other.__isset_bit_vector);
9714
      this.success = other.success;
9715
      if (other.isSetUcx()) {
9716
        this.ucx = new UserContextException(other.ucx);
9717
      }
9718
    }
9719
 
553 chandransh 9720
    public removeAddressForUser_result deepCopy() {
9721
      return new removeAddressForUser_result(this);
48 ashish 9722
    }
9723
 
9724
    @Deprecated
553 chandransh 9725
    public removeAddressForUser_result clone() {
9726
      return new removeAddressForUser_result(this);
48 ashish 9727
    }
9728
 
9729
    public boolean isSuccess() {
9730
      return this.success;
9731
    }
9732
 
553 chandransh 9733
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9734
      this.success = success;
9735
      setSuccessIsSet(true);
9736
      return this;
9737
    }
9738
 
9739
    public void unsetSuccess() {
9740
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9741
    }
9742
 
9743
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9744
    public boolean isSetSuccess() {
9745
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9746
    }
9747
 
9748
    public void setSuccessIsSet(boolean value) {
9749
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9750
    }
9751
 
9752
    public UserContextException getUcx() {
9753
      return this.ucx;
9754
    }
9755
 
553 chandransh 9756
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9757
      this.ucx = ucx;
9758
      return this;
9759
    }
9760
 
9761
    public void unsetUcx() {
9762
      this.ucx = null;
9763
    }
9764
 
9765
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9766
    public boolean isSetUcx() {
9767
      return this.ucx != null;
9768
    }
9769
 
9770
    public void setUcxIsSet(boolean value) {
9771
      if (!value) {
9772
        this.ucx = null;
9773
      }
9774
    }
9775
 
9776
    public void setFieldValue(_Fields field, Object value) {
9777
      switch (field) {
9778
      case SUCCESS:
9779
        if (value == null) {
9780
          unsetSuccess();
9781
        } else {
9782
          setSuccess((Boolean)value);
9783
        }
9784
        break;
9785
 
9786
      case UCX:
9787
        if (value == null) {
9788
          unsetUcx();
9789
        } else {
9790
          setUcx((UserContextException)value);
9791
        }
9792
        break;
9793
 
9794
      }
9795
    }
9796
 
9797
    public void setFieldValue(int fieldID, Object value) {
9798
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9799
    }
9800
 
9801
    public Object getFieldValue(_Fields field) {
9802
      switch (field) {
9803
      case SUCCESS:
9804
        return new Boolean(isSuccess());
9805
 
9806
      case UCX:
9807
        return getUcx();
9808
 
9809
      }
9810
      throw new IllegalStateException();
9811
    }
9812
 
9813
    public Object getFieldValue(int fieldId) {
9814
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9815
    }
9816
 
9817
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9818
    public boolean isSet(_Fields field) {
9819
      switch (field) {
9820
      case SUCCESS:
9821
        return isSetSuccess();
9822
      case UCX:
9823
        return isSetUcx();
9824
      }
9825
      throw new IllegalStateException();
9826
    }
9827
 
9828
    public boolean isSet(int fieldID) {
9829
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9830
    }
9831
 
9832
    @Override
9833
    public boolean equals(Object that) {
9834
      if (that == null)
9835
        return false;
553 chandransh 9836
      if (that instanceof removeAddressForUser_result)
9837
        return this.equals((removeAddressForUser_result)that);
48 ashish 9838
      return false;
9839
    }
9840
 
553 chandransh 9841
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9842
      if (that == null)
9843
        return false;
9844
 
9845
      boolean this_present_success = true;
9846
      boolean that_present_success = true;
9847
      if (this_present_success || that_present_success) {
9848
        if (!(this_present_success && that_present_success))
9849
          return false;
9850
        if (this.success != that.success)
9851
          return false;
9852
      }
9853
 
9854
      boolean this_present_ucx = true && this.isSetUcx();
9855
      boolean that_present_ucx = true && that.isSetUcx();
9856
      if (this_present_ucx || that_present_ucx) {
9857
        if (!(this_present_ucx && that_present_ucx))
9858
          return false;
9859
        if (!this.ucx.equals(that.ucx))
9860
          return false;
9861
      }
9862
 
9863
      return true;
9864
    }
9865
 
9866
    @Override
9867
    public int hashCode() {
9868
      return 0;
9869
    }
9870
 
553 chandransh 9871
    public int compareTo(removeAddressForUser_result other) {
48 ashish 9872
      if (!getClass().equals(other.getClass())) {
9873
        return getClass().getName().compareTo(other.getClass().getName());
9874
      }
9875
 
9876
      int lastComparison = 0;
553 chandransh 9877
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 9878
 
9879
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9880
      if (lastComparison != 0) {
9881
        return lastComparison;
9882
      }
9883
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9884
      if (lastComparison != 0) {
9885
        return lastComparison;
9886
      }
9887
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9888
      if (lastComparison != 0) {
9889
        return lastComparison;
9890
      }
9891
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9892
      if (lastComparison != 0) {
9893
        return lastComparison;
9894
      }
9895
      return 0;
9896
    }
9897
 
9898
    public void read(TProtocol iprot) throws TException {
9899
      TField field;
9900
      iprot.readStructBegin();
9901
      while (true)
9902
      {
9903
        field = iprot.readFieldBegin();
9904
        if (field.type == TType.STOP) { 
9905
          break;
9906
        }
9907
        _Fields fieldId = _Fields.findByThriftId(field.id);
9908
        if (fieldId == null) {
9909
          TProtocolUtil.skip(iprot, field.type);
9910
        } else {
9911
          switch (fieldId) {
9912
            case SUCCESS:
9913
              if (field.type == TType.BOOL) {
9914
                this.success = iprot.readBool();
9915
                setSuccessIsSet(true);
9916
              } else { 
9917
                TProtocolUtil.skip(iprot, field.type);
9918
              }
9919
              break;
9920
            case UCX:
9921
              if (field.type == TType.STRUCT) {
9922
                this.ucx = new UserContextException();
9923
                this.ucx.read(iprot);
9924
              } else { 
9925
                TProtocolUtil.skip(iprot, field.type);
9926
              }
9927
              break;
9928
          }
9929
          iprot.readFieldEnd();
9930
        }
9931
      }
9932
      iprot.readStructEnd();
9933
      validate();
9934
    }
9935
 
9936
    public void write(TProtocol oprot) throws TException {
9937
      oprot.writeStructBegin(STRUCT_DESC);
9938
 
9939
      if (this.isSetSuccess()) {
9940
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9941
        oprot.writeBool(this.success);
9942
        oprot.writeFieldEnd();
9943
      } else if (this.isSetUcx()) {
9944
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9945
        this.ucx.write(oprot);
9946
        oprot.writeFieldEnd();
9947
      }
9948
      oprot.writeFieldStop();
9949
      oprot.writeStructEnd();
9950
    }
9951
 
9952
    @Override
9953
    public String toString() {
553 chandransh 9954
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 9955
      boolean first = true;
9956
 
9957
      sb.append("success:");
9958
      sb.append(this.success);
9959
      first = false;
9960
      if (!first) sb.append(", ");
9961
      sb.append("ucx:");
9962
      if (this.ucx == null) {
9963
        sb.append("null");
9964
      } else {
9965
        sb.append(this.ucx);
9966
      }
9967
      first = false;
9968
      sb.append(")");
9969
      return sb.toString();
9970
    }
9971
 
9972
    public void validate() throws TException {
9973
      // check for required fields
9974
    }
9975
 
9976
  }
9977
 
553 chandransh 9978
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
9979
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 9980
 
553 chandransh 9981
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 9982
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
9983
 
553 chandransh 9984
    private long userId;
48 ashish 9985
    private long timestamp;
9986
 
9987
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9988
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9989
      USER_ID((short)1, "userId"),
9990
      TIMESTAMP((short)2, "timestamp");
48 ashish 9991
 
9992
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9993
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9994
 
9995
      static {
9996
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9997
          byId.put((int)field._thriftId, field);
9998
          byName.put(field.getFieldName(), field);
9999
        }
10000
      }
10001
 
10002
      /**
10003
       * Find the _Fields constant that matches fieldId, or null if its not found.
10004
       */
10005
      public static _Fields findByThriftId(int fieldId) {
10006
        return byId.get(fieldId);
10007
      }
10008
 
10009
      /**
10010
       * Find the _Fields constant that matches fieldId, throwing an exception
10011
       * if it is not found.
10012
       */
10013
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10014
        _Fields fields = findByThriftId(fieldId);
10015
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10016
        return fields;
10017
      }
10018
 
10019
      /**
10020
       * Find the _Fields constant that matches name, or null if its not found.
10021
       */
10022
      public static _Fields findByName(String name) {
10023
        return byName.get(name);
10024
      }
10025
 
10026
      private final short _thriftId;
10027
      private final String _fieldName;
10028
 
10029
      _Fields(short thriftId, String fieldName) {
10030
        _thriftId = thriftId;
10031
        _fieldName = fieldName;
10032
      }
10033
 
10034
      public short getThriftFieldId() {
10035
        return _thriftId;
10036
      }
10037
 
10038
      public String getFieldName() {
10039
        return _fieldName;
10040
      }
10041
    }
10042
 
10043
    // isset id assignments
553 chandransh 10044
    private static final int __USERID_ISSET_ID = 0;
10045
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 10046
    private BitSet __isset_bit_vector = new BitSet(2);
10047
 
10048
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10049
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10050
          new FieldValueMetaData(TType.I64)));
48 ashish 10051
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10052
          new FieldValueMetaData(TType.I64)));
10053
    }});
10054
 
10055
    static {
553 chandransh 10056
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 10057
    }
10058
 
553 chandransh 10059
    public setUserAsLoggedIn_args() {
48 ashish 10060
    }
10061
 
553 chandransh 10062
    public setUserAsLoggedIn_args(
10063
      long userId,
10064
      long timestamp)
48 ashish 10065
    {
10066
      this();
553 chandransh 10067
      this.userId = userId;
10068
      setUserIdIsSet(true);
48 ashish 10069
      this.timestamp = timestamp;
10070
      setTimestampIsSet(true);
10071
    }
10072
 
10073
    /**
10074
     * Performs a deep copy on <i>other</i>.
10075
     */
553 chandransh 10076
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 10077
      __isset_bit_vector.clear();
10078
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 10079
      this.userId = other.userId;
48 ashish 10080
      this.timestamp = other.timestamp;
10081
    }
10082
 
553 chandransh 10083
    public setUserAsLoggedIn_args deepCopy() {
10084
      return new setUserAsLoggedIn_args(this);
48 ashish 10085
    }
10086
 
10087
    @Deprecated
553 chandransh 10088
    public setUserAsLoggedIn_args clone() {
10089
      return new setUserAsLoggedIn_args(this);
48 ashish 10090
    }
10091
 
553 chandransh 10092
    public long getUserId() {
10093
      return this.userId;
48 ashish 10094
    }
10095
 
553 chandransh 10096
    public setUserAsLoggedIn_args setUserId(long userId) {
10097
      this.userId = userId;
10098
      setUserIdIsSet(true);
48 ashish 10099
      return this;
10100
    }
10101
 
553 chandransh 10102
    public void unsetUserId() {
10103
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10104
    }
10105
 
553 chandransh 10106
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10107
    public boolean isSetUserId() {
10108
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10109
    }
10110
 
553 chandransh 10111
    public void setUserIdIsSet(boolean value) {
10112
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10113
    }
10114
 
10115
    public long getTimestamp() {
10116
      return this.timestamp;
10117
    }
10118
 
553 chandransh 10119
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 10120
      this.timestamp = timestamp;
10121
      setTimestampIsSet(true);
10122
      return this;
10123
    }
10124
 
10125
    public void unsetTimestamp() {
10126
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10127
    }
10128
 
10129
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10130
    public boolean isSetTimestamp() {
10131
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10132
    }
10133
 
10134
    public void setTimestampIsSet(boolean value) {
10135
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10136
    }
10137
 
10138
    public void setFieldValue(_Fields field, Object value) {
10139
      switch (field) {
553 chandransh 10140
      case USER_ID:
48 ashish 10141
        if (value == null) {
553 chandransh 10142
          unsetUserId();
48 ashish 10143
        } else {
553 chandransh 10144
          setUserId((Long)value);
48 ashish 10145
        }
10146
        break;
10147
 
10148
      case TIMESTAMP:
10149
        if (value == null) {
10150
          unsetTimestamp();
10151
        } else {
10152
          setTimestamp((Long)value);
10153
        }
10154
        break;
10155
 
10156
      }
10157
    }
10158
 
10159
    public void setFieldValue(int fieldID, Object value) {
10160
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10161
    }
10162
 
10163
    public Object getFieldValue(_Fields field) {
10164
      switch (field) {
553 chandransh 10165
      case USER_ID:
10166
        return new Long(getUserId());
48 ashish 10167
 
10168
      case TIMESTAMP:
10169
        return new Long(getTimestamp());
10170
 
10171
      }
10172
      throw new IllegalStateException();
10173
    }
10174
 
10175
    public Object getFieldValue(int fieldId) {
10176
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10177
    }
10178
 
10179
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10180
    public boolean isSet(_Fields field) {
10181
      switch (field) {
553 chandransh 10182
      case USER_ID:
10183
        return isSetUserId();
48 ashish 10184
      case TIMESTAMP:
10185
        return isSetTimestamp();
10186
      }
10187
      throw new IllegalStateException();
10188
    }
10189
 
10190
    public boolean isSet(int fieldID) {
10191
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10192
    }
10193
 
10194
    @Override
10195
    public boolean equals(Object that) {
10196
      if (that == null)
10197
        return false;
553 chandransh 10198
      if (that instanceof setUserAsLoggedIn_args)
10199
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 10200
      return false;
10201
    }
10202
 
553 chandransh 10203
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 10204
      if (that == null)
10205
        return false;
10206
 
553 chandransh 10207
      boolean this_present_userId = true;
10208
      boolean that_present_userId = true;
10209
      if (this_present_userId || that_present_userId) {
10210
        if (!(this_present_userId && that_present_userId))
48 ashish 10211
          return false;
553 chandransh 10212
        if (this.userId != that.userId)
48 ashish 10213
          return false;
10214
      }
10215
 
10216
      boolean this_present_timestamp = true;
10217
      boolean that_present_timestamp = true;
10218
      if (this_present_timestamp || that_present_timestamp) {
10219
        if (!(this_present_timestamp && that_present_timestamp))
10220
          return false;
10221
        if (this.timestamp != that.timestamp)
10222
          return false;
10223
      }
10224
 
10225
      return true;
10226
    }
10227
 
10228
    @Override
10229
    public int hashCode() {
10230
      return 0;
10231
    }
10232
 
553 chandransh 10233
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 10234
      if (!getClass().equals(other.getClass())) {
10235
        return getClass().getName().compareTo(other.getClass().getName());
10236
      }
10237
 
10238
      int lastComparison = 0;
553 chandransh 10239
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 10240
 
553 chandransh 10241
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 10242
      if (lastComparison != 0) {
10243
        return lastComparison;
10244
      }
553 chandransh 10245
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 10246
      if (lastComparison != 0) {
10247
        return lastComparison;
10248
      }
10249
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10250
      if (lastComparison != 0) {
10251
        return lastComparison;
10252
      }
10253
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10254
      if (lastComparison != 0) {
10255
        return lastComparison;
10256
      }
10257
      return 0;
10258
    }
10259
 
10260
    public void read(TProtocol iprot) throws TException {
10261
      TField field;
10262
      iprot.readStructBegin();
10263
      while (true)
10264
      {
10265
        field = iprot.readFieldBegin();
10266
        if (field.type == TType.STOP) { 
10267
          break;
10268
        }
10269
        _Fields fieldId = _Fields.findByThriftId(field.id);
10270
        if (fieldId == null) {
10271
          TProtocolUtil.skip(iprot, field.type);
10272
        } else {
10273
          switch (fieldId) {
553 chandransh 10274
            case USER_ID:
10275
              if (field.type == TType.I64) {
10276
                this.userId = iprot.readI64();
10277
                setUserIdIsSet(true);
48 ashish 10278
              } else { 
10279
                TProtocolUtil.skip(iprot, field.type);
10280
              }
10281
              break;
10282
            case TIMESTAMP:
10283
              if (field.type == TType.I64) {
10284
                this.timestamp = iprot.readI64();
10285
                setTimestampIsSet(true);
10286
              } else { 
10287
                TProtocolUtil.skip(iprot, field.type);
10288
              }
10289
              break;
10290
          }
10291
          iprot.readFieldEnd();
10292
        }
10293
      }
10294
      iprot.readStructEnd();
10295
      validate();
10296
    }
10297
 
10298
    public void write(TProtocol oprot) throws TException {
10299
      validate();
10300
 
10301
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10302
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10303
      oprot.writeI64(this.userId);
10304
      oprot.writeFieldEnd();
48 ashish 10305
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10306
      oprot.writeI64(this.timestamp);
10307
      oprot.writeFieldEnd();
10308
      oprot.writeFieldStop();
10309
      oprot.writeStructEnd();
10310
    }
10311
 
10312
    @Override
10313
    public String toString() {
553 chandransh 10314
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 10315
      boolean first = true;
10316
 
553 chandransh 10317
      sb.append("userId:");
10318
      sb.append(this.userId);
48 ashish 10319
      first = false;
10320
      if (!first) sb.append(", ");
10321
      sb.append("timestamp:");
10322
      sb.append(this.timestamp);
10323
      first = false;
10324
      sb.append(")");
10325
      return sb.toString();
10326
    }
10327
 
10328
    public void validate() throws TException {
10329
      // check for required fields
10330
    }
10331
 
10332
  }
10333
 
553 chandransh 10334
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10335
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 10336
 
10337
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10338
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10339
 
10340
    private boolean success;
10341
    private UserContextException ucx;
10342
 
10343
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10344
    public enum _Fields implements TFieldIdEnum {
10345
      SUCCESS((short)0, "success"),
10346
      UCX((short)1, "ucx");
10347
 
10348
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10349
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10350
 
10351
      static {
10352
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10353
          byId.put((int)field._thriftId, field);
10354
          byName.put(field.getFieldName(), field);
10355
        }
10356
      }
10357
 
10358
      /**
10359
       * Find the _Fields constant that matches fieldId, or null if its not found.
10360
       */
10361
      public static _Fields findByThriftId(int fieldId) {
10362
        return byId.get(fieldId);
10363
      }
10364
 
10365
      /**
10366
       * Find the _Fields constant that matches fieldId, throwing an exception
10367
       * if it is not found.
10368
       */
10369
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10370
        _Fields fields = findByThriftId(fieldId);
10371
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10372
        return fields;
10373
      }
10374
 
10375
      /**
10376
       * Find the _Fields constant that matches name, or null if its not found.
10377
       */
10378
      public static _Fields findByName(String name) {
10379
        return byName.get(name);
10380
      }
10381
 
10382
      private final short _thriftId;
10383
      private final String _fieldName;
10384
 
10385
      _Fields(short thriftId, String fieldName) {
10386
        _thriftId = thriftId;
10387
        _fieldName = fieldName;
10388
      }
10389
 
10390
      public short getThriftFieldId() {
10391
        return _thriftId;
10392
      }
10393
 
10394
      public String getFieldName() {
10395
        return _fieldName;
10396
      }
10397
    }
10398
 
10399
    // isset id assignments
10400
    private static final int __SUCCESS_ISSET_ID = 0;
10401
    private BitSet __isset_bit_vector = new BitSet(1);
10402
 
10403
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10404
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10405
          new FieldValueMetaData(TType.BOOL)));
10406
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10407
          new FieldValueMetaData(TType.STRUCT)));
10408
    }});
10409
 
10410
    static {
553 chandransh 10411
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10412
    }
10413
 
553 chandransh 10414
    public setUserAsLoggedIn_result() {
48 ashish 10415
    }
10416
 
553 chandransh 10417
    public setUserAsLoggedIn_result(
48 ashish 10418
      boolean success,
10419
      UserContextException ucx)
10420
    {
10421
      this();
10422
      this.success = success;
10423
      setSuccessIsSet(true);
10424
      this.ucx = ucx;
10425
    }
10426
 
10427
    /**
10428
     * Performs a deep copy on <i>other</i>.
10429
     */
553 chandransh 10430
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10431
      __isset_bit_vector.clear();
10432
      __isset_bit_vector.or(other.__isset_bit_vector);
10433
      this.success = other.success;
10434
      if (other.isSetUcx()) {
10435
        this.ucx = new UserContextException(other.ucx);
10436
      }
10437
    }
10438
 
553 chandransh 10439
    public setUserAsLoggedIn_result deepCopy() {
10440
      return new setUserAsLoggedIn_result(this);
48 ashish 10441
    }
10442
 
10443
    @Deprecated
553 chandransh 10444
    public setUserAsLoggedIn_result clone() {
10445
      return new setUserAsLoggedIn_result(this);
48 ashish 10446
    }
10447
 
10448
    public boolean isSuccess() {
10449
      return this.success;
10450
    }
10451
 
553 chandransh 10452
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10453
      this.success = success;
10454
      setSuccessIsSet(true);
10455
      return this;
10456
    }
10457
 
10458
    public void unsetSuccess() {
10459
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10460
    }
10461
 
10462
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10463
    public boolean isSetSuccess() {
10464
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10465
    }
10466
 
10467
    public void setSuccessIsSet(boolean value) {
10468
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10469
    }
10470
 
10471
    public UserContextException getUcx() {
10472
      return this.ucx;
10473
    }
10474
 
553 chandransh 10475
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10476
      this.ucx = ucx;
10477
      return this;
10478
    }
10479
 
10480
    public void unsetUcx() {
10481
      this.ucx = null;
10482
    }
10483
 
10484
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10485
    public boolean isSetUcx() {
10486
      return this.ucx != null;
10487
    }
10488
 
10489
    public void setUcxIsSet(boolean value) {
10490
      if (!value) {
10491
        this.ucx = null;
10492
      }
10493
    }
10494
 
10495
    public void setFieldValue(_Fields field, Object value) {
10496
      switch (field) {
10497
      case SUCCESS:
10498
        if (value == null) {
10499
          unsetSuccess();
10500
        } else {
10501
          setSuccess((Boolean)value);
10502
        }
10503
        break;
10504
 
10505
      case UCX:
10506
        if (value == null) {
10507
          unsetUcx();
10508
        } else {
10509
          setUcx((UserContextException)value);
10510
        }
10511
        break;
10512
 
10513
      }
10514
    }
10515
 
10516
    public void setFieldValue(int fieldID, Object value) {
10517
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10518
    }
10519
 
10520
    public Object getFieldValue(_Fields field) {
10521
      switch (field) {
10522
      case SUCCESS:
10523
        return new Boolean(isSuccess());
10524
 
10525
      case UCX:
10526
        return getUcx();
10527
 
10528
      }
10529
      throw new IllegalStateException();
10530
    }
10531
 
10532
    public Object getFieldValue(int fieldId) {
10533
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10534
    }
10535
 
10536
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10537
    public boolean isSet(_Fields field) {
10538
      switch (field) {
10539
      case SUCCESS:
10540
        return isSetSuccess();
10541
      case UCX:
10542
        return isSetUcx();
10543
      }
10544
      throw new IllegalStateException();
10545
    }
10546
 
10547
    public boolean isSet(int fieldID) {
10548
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10549
    }
10550
 
10551
    @Override
10552
    public boolean equals(Object that) {
10553
      if (that == null)
10554
        return false;
553 chandransh 10555
      if (that instanceof setUserAsLoggedIn_result)
10556
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10557
      return false;
10558
    }
10559
 
553 chandransh 10560
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10561
      if (that == null)
10562
        return false;
10563
 
10564
      boolean this_present_success = true;
10565
      boolean that_present_success = true;
10566
      if (this_present_success || that_present_success) {
10567
        if (!(this_present_success && that_present_success))
10568
          return false;
10569
        if (this.success != that.success)
10570
          return false;
10571
      }
10572
 
10573
      boolean this_present_ucx = true && this.isSetUcx();
10574
      boolean that_present_ucx = true && that.isSetUcx();
10575
      if (this_present_ucx || that_present_ucx) {
10576
        if (!(this_present_ucx && that_present_ucx))
10577
          return false;
10578
        if (!this.ucx.equals(that.ucx))
10579
          return false;
10580
      }
10581
 
10582
      return true;
10583
    }
10584
 
10585
    @Override
10586
    public int hashCode() {
10587
      return 0;
10588
    }
10589
 
553 chandransh 10590
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10591
      if (!getClass().equals(other.getClass())) {
10592
        return getClass().getName().compareTo(other.getClass().getName());
10593
      }
10594
 
10595
      int lastComparison = 0;
553 chandransh 10596
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10597
 
10598
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10599
      if (lastComparison != 0) {
10600
        return lastComparison;
10601
      }
10602
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10603
      if (lastComparison != 0) {
10604
        return lastComparison;
10605
      }
10606
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10607
      if (lastComparison != 0) {
10608
        return lastComparison;
10609
      }
10610
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10611
      if (lastComparison != 0) {
10612
        return lastComparison;
10613
      }
10614
      return 0;
10615
    }
10616
 
10617
    public void read(TProtocol iprot) throws TException {
10618
      TField field;
10619
      iprot.readStructBegin();
10620
      while (true)
10621
      {
10622
        field = iprot.readFieldBegin();
10623
        if (field.type == TType.STOP) { 
10624
          break;
10625
        }
10626
        _Fields fieldId = _Fields.findByThriftId(field.id);
10627
        if (fieldId == null) {
10628
          TProtocolUtil.skip(iprot, field.type);
10629
        } else {
10630
          switch (fieldId) {
10631
            case SUCCESS:
10632
              if (field.type == TType.BOOL) {
10633
                this.success = iprot.readBool();
10634
                setSuccessIsSet(true);
10635
              } else { 
10636
                TProtocolUtil.skip(iprot, field.type);
10637
              }
10638
              break;
10639
            case UCX:
10640
              if (field.type == TType.STRUCT) {
10641
                this.ucx = new UserContextException();
10642
                this.ucx.read(iprot);
10643
              } else { 
10644
                TProtocolUtil.skip(iprot, field.type);
10645
              }
10646
              break;
10647
          }
10648
          iprot.readFieldEnd();
10649
        }
10650
      }
10651
      iprot.readStructEnd();
10652
      validate();
10653
    }
10654
 
10655
    public void write(TProtocol oprot) throws TException {
10656
      oprot.writeStructBegin(STRUCT_DESC);
10657
 
10658
      if (this.isSetSuccess()) {
10659
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10660
        oprot.writeBool(this.success);
10661
        oprot.writeFieldEnd();
10662
      } else if (this.isSetUcx()) {
10663
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10664
        this.ucx.write(oprot);
10665
        oprot.writeFieldEnd();
10666
      }
10667
      oprot.writeFieldStop();
10668
      oprot.writeStructEnd();
10669
    }
10670
 
10671
    @Override
10672
    public String toString() {
553 chandransh 10673
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10674
      boolean first = true;
10675
 
10676
      sb.append("success:");
10677
      sb.append(this.success);
10678
      first = false;
10679
      if (!first) sb.append(", ");
10680
      sb.append("ucx:");
10681
      if (this.ucx == null) {
10682
        sb.append("null");
10683
      } else {
10684
        sb.append(this.ucx);
10685
      }
10686
      first = false;
10687
      sb.append(")");
10688
      return sb.toString();
10689
    }
10690
 
10691
    public void validate() throws TException {
10692
      // check for required fields
10693
    }
10694
 
10695
  }
10696
 
553 chandransh 10697
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10698
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10699
 
553 chandransh 10700
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10701
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10702
 
10703
    private long userid;
10704
    private long timestamp;
10705
 
10706
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10707
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10708
      USERID((short)1, "userid"),
10709
      TIMESTAMP((short)2, "timestamp");
48 ashish 10710
 
10711
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10713
 
10714
      static {
10715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10716
          byId.put((int)field._thriftId, field);
10717
          byName.put(field.getFieldName(), field);
10718
        }
10719
      }
10720
 
10721
      /**
10722
       * Find the _Fields constant that matches fieldId, or null if its not found.
10723
       */
10724
      public static _Fields findByThriftId(int fieldId) {
10725
        return byId.get(fieldId);
10726
      }
10727
 
10728
      /**
10729
       * Find the _Fields constant that matches fieldId, throwing an exception
10730
       * if it is not found.
10731
       */
10732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10733
        _Fields fields = findByThriftId(fieldId);
10734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10735
        return fields;
10736
      }
10737
 
10738
      /**
10739
       * Find the _Fields constant that matches name, or null if its not found.
10740
       */
10741
      public static _Fields findByName(String name) {
10742
        return byName.get(name);
10743
      }
10744
 
10745
      private final short _thriftId;
10746
      private final String _fieldName;
10747
 
10748
      _Fields(short thriftId, String fieldName) {
10749
        _thriftId = thriftId;
10750
        _fieldName = fieldName;
10751
      }
10752
 
10753
      public short getThriftFieldId() {
10754
        return _thriftId;
10755
      }
10756
 
10757
      public String getFieldName() {
10758
        return _fieldName;
10759
      }
10760
    }
10761
 
10762
    // isset id assignments
10763
    private static final int __USERID_ISSET_ID = 0;
10764
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10765
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10766
 
10767
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10768
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10769
          new FieldValueMetaData(TType.I64)));
10770
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10771
          new FieldValueMetaData(TType.I64)));
10772
    }});
10773
 
10774
    static {
553 chandransh 10775
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10776
    }
10777
 
553 chandransh 10778
    public setUserAsLoggedOut_args() {
48 ashish 10779
    }
10780
 
553 chandransh 10781
    public setUserAsLoggedOut_args(
48 ashish 10782
      long userid,
553 chandransh 10783
      long timestamp)
48 ashish 10784
    {
10785
      this();
10786
      this.userid = userid;
10787
      setUseridIsSet(true);
10788
      this.timestamp = timestamp;
10789
      setTimestampIsSet(true);
10790
    }
10791
 
10792
    /**
10793
     * Performs a deep copy on <i>other</i>.
10794
     */
553 chandransh 10795
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10796
      __isset_bit_vector.clear();
10797
      __isset_bit_vector.or(other.__isset_bit_vector);
10798
      this.userid = other.userid;
10799
      this.timestamp = other.timestamp;
10800
    }
10801
 
553 chandransh 10802
    public setUserAsLoggedOut_args deepCopy() {
10803
      return new setUserAsLoggedOut_args(this);
48 ashish 10804
    }
10805
 
10806
    @Deprecated
553 chandransh 10807
    public setUserAsLoggedOut_args clone() {
10808
      return new setUserAsLoggedOut_args(this);
48 ashish 10809
    }
10810
 
10811
    public long getUserid() {
10812
      return this.userid;
10813
    }
10814
 
553 chandransh 10815
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10816
      this.userid = userid;
10817
      setUseridIsSet(true);
10818
      return this;
10819
    }
10820
 
10821
    public void unsetUserid() {
10822
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10823
    }
10824
 
10825
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10826
    public boolean isSetUserid() {
10827
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10828
    }
10829
 
10830
    public void setUseridIsSet(boolean value) {
10831
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10832
    }
10833
 
10834
    public long getTimestamp() {
10835
      return this.timestamp;
10836
    }
10837
 
553 chandransh 10838
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10839
      this.timestamp = timestamp;
10840
      setTimestampIsSet(true);
10841
      return this;
10842
    }
10843
 
10844
    public void unsetTimestamp() {
10845
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10846
    }
10847
 
10848
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10849
    public boolean isSetTimestamp() {
10850
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10851
    }
10852
 
10853
    public void setTimestampIsSet(boolean value) {
10854
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10855
    }
10856
 
10857
    public void setFieldValue(_Fields field, Object value) {
10858
      switch (field) {
10859
      case USERID:
10860
        if (value == null) {
10861
          unsetUserid();
10862
        } else {
10863
          setUserid((Long)value);
10864
        }
10865
        break;
10866
 
10867
      case TIMESTAMP:
10868
        if (value == null) {
10869
          unsetTimestamp();
10870
        } else {
10871
          setTimestamp((Long)value);
10872
        }
10873
        break;
10874
 
10875
      }
10876
    }
10877
 
10878
    public void setFieldValue(int fieldID, Object value) {
10879
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10880
    }
10881
 
10882
    public Object getFieldValue(_Fields field) {
10883
      switch (field) {
10884
      case USERID:
10885
        return new Long(getUserid());
10886
 
10887
      case TIMESTAMP:
10888
        return new Long(getTimestamp());
10889
 
10890
      }
10891
      throw new IllegalStateException();
10892
    }
10893
 
10894
    public Object getFieldValue(int fieldId) {
10895
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10896
    }
10897
 
10898
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10899
    public boolean isSet(_Fields field) {
10900
      switch (field) {
10901
      case USERID:
10902
        return isSetUserid();
10903
      case TIMESTAMP:
10904
        return isSetTimestamp();
10905
      }
10906
      throw new IllegalStateException();
10907
    }
10908
 
10909
    public boolean isSet(int fieldID) {
10910
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10911
    }
10912
 
10913
    @Override
10914
    public boolean equals(Object that) {
10915
      if (that == null)
10916
        return false;
553 chandransh 10917
      if (that instanceof setUserAsLoggedOut_args)
10918
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 10919
      return false;
10920
    }
10921
 
553 chandransh 10922
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 10923
      if (that == null)
10924
        return false;
10925
 
10926
      boolean this_present_userid = true;
10927
      boolean that_present_userid = true;
10928
      if (this_present_userid || that_present_userid) {
10929
        if (!(this_present_userid && that_present_userid))
10930
          return false;
10931
        if (this.userid != that.userid)
10932
          return false;
10933
      }
10934
 
10935
      boolean this_present_timestamp = true;
10936
      boolean that_present_timestamp = true;
10937
      if (this_present_timestamp || that_present_timestamp) {
10938
        if (!(this_present_timestamp && that_present_timestamp))
10939
          return false;
10940
        if (this.timestamp != that.timestamp)
10941
          return false;
10942
      }
10943
 
10944
      return true;
10945
    }
10946
 
10947
    @Override
10948
    public int hashCode() {
10949
      return 0;
10950
    }
10951
 
553 chandransh 10952
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 10953
      if (!getClass().equals(other.getClass())) {
10954
        return getClass().getName().compareTo(other.getClass().getName());
10955
      }
10956
 
10957
      int lastComparison = 0;
553 chandransh 10958
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 10959
 
10960
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
10961
      if (lastComparison != 0) {
10962
        return lastComparison;
10963
      }
10964
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
10965
      if (lastComparison != 0) {
10966
        return lastComparison;
10967
      }
10968
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10969
      if (lastComparison != 0) {
10970
        return lastComparison;
10971
      }
10972
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10973
      if (lastComparison != 0) {
10974
        return lastComparison;
10975
      }
10976
      return 0;
10977
    }
10978
 
10979
    public void read(TProtocol iprot) throws TException {
10980
      TField field;
10981
      iprot.readStructBegin();
10982
      while (true)
10983
      {
10984
        field = iprot.readFieldBegin();
10985
        if (field.type == TType.STOP) { 
10986
          break;
10987
        }
10988
        _Fields fieldId = _Fields.findByThriftId(field.id);
10989
        if (fieldId == null) {
10990
          TProtocolUtil.skip(iprot, field.type);
10991
        } else {
10992
          switch (fieldId) {
10993
            case USERID:
10994
              if (field.type == TType.I64) {
10995
                this.userid = iprot.readI64();
10996
                setUseridIsSet(true);
10997
              } else { 
10998
                TProtocolUtil.skip(iprot, field.type);
10999
              }
11000
              break;
11001
            case TIMESTAMP:
11002
              if (field.type == TType.I64) {
11003
                this.timestamp = iprot.readI64();
11004
                setTimestampIsSet(true);
11005
              } else { 
11006
                TProtocolUtil.skip(iprot, field.type);
11007
              }
11008
              break;
11009
          }
11010
          iprot.readFieldEnd();
11011
        }
11012
      }
11013
      iprot.readStructEnd();
11014
      validate();
11015
    }
11016
 
11017
    public void write(TProtocol oprot) throws TException {
11018
      validate();
11019
 
11020
      oprot.writeStructBegin(STRUCT_DESC);
11021
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11022
      oprot.writeI64(this.userid);
11023
      oprot.writeFieldEnd();
11024
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11025
      oprot.writeI64(this.timestamp);
11026
      oprot.writeFieldEnd();
11027
      oprot.writeFieldStop();
11028
      oprot.writeStructEnd();
11029
    }
11030
 
11031
    @Override
11032
    public String toString() {
553 chandransh 11033
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 11034
      boolean first = true;
11035
 
11036
      sb.append("userid:");
11037
      sb.append(this.userid);
11038
      first = false;
11039
      if (!first) sb.append(", ");
11040
      sb.append("timestamp:");
11041
      sb.append(this.timestamp);
11042
      first = false;
11043
      sb.append(")");
11044
      return sb.toString();
11045
    }
11046
 
11047
    public void validate() throws TException {
11048
      // check for required fields
11049
    }
11050
 
11051
  }
11052
 
553 chandransh 11053
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11054
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 11055
 
11056
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11057
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11058
 
11059
    private boolean success;
11060
    private UserContextException ucx;
11061
 
11062
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11063
    public enum _Fields implements TFieldIdEnum {
11064
      SUCCESS((short)0, "success"),
11065
      UCX((short)1, "ucx");
11066
 
11067
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11068
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11069
 
11070
      static {
11071
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11072
          byId.put((int)field._thriftId, field);
11073
          byName.put(field.getFieldName(), field);
11074
        }
11075
      }
11076
 
11077
      /**
11078
       * Find the _Fields constant that matches fieldId, or null if its not found.
11079
       */
11080
      public static _Fields findByThriftId(int fieldId) {
11081
        return byId.get(fieldId);
11082
      }
11083
 
11084
      /**
11085
       * Find the _Fields constant that matches fieldId, throwing an exception
11086
       * if it is not found.
11087
       */
11088
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11089
        _Fields fields = findByThriftId(fieldId);
11090
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11091
        return fields;
11092
      }
11093
 
11094
      /**
11095
       * Find the _Fields constant that matches name, or null if its not found.
11096
       */
11097
      public static _Fields findByName(String name) {
11098
        return byName.get(name);
11099
      }
11100
 
11101
      private final short _thriftId;
11102
      private final String _fieldName;
11103
 
11104
      _Fields(short thriftId, String fieldName) {
11105
        _thriftId = thriftId;
11106
        _fieldName = fieldName;
11107
      }
11108
 
11109
      public short getThriftFieldId() {
11110
        return _thriftId;
11111
      }
11112
 
11113
      public String getFieldName() {
11114
        return _fieldName;
11115
      }
11116
    }
11117
 
11118
    // isset id assignments
11119
    private static final int __SUCCESS_ISSET_ID = 0;
11120
    private BitSet __isset_bit_vector = new BitSet(1);
11121
 
11122
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11123
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11124
          new FieldValueMetaData(TType.BOOL)));
11125
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11126
          new FieldValueMetaData(TType.STRUCT)));
11127
    }});
11128
 
11129
    static {
553 chandransh 11130
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 11131
    }
11132
 
553 chandransh 11133
    public setUserAsLoggedOut_result() {
48 ashish 11134
    }
11135
 
553 chandransh 11136
    public setUserAsLoggedOut_result(
48 ashish 11137
      boolean success,
11138
      UserContextException ucx)
11139
    {
11140
      this();
11141
      this.success = success;
11142
      setSuccessIsSet(true);
11143
      this.ucx = ucx;
11144
    }
11145
 
11146
    /**
11147
     * Performs a deep copy on <i>other</i>.
11148
     */
553 chandransh 11149
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 11150
      __isset_bit_vector.clear();
11151
      __isset_bit_vector.or(other.__isset_bit_vector);
11152
      this.success = other.success;
11153
      if (other.isSetUcx()) {
11154
        this.ucx = new UserContextException(other.ucx);
11155
      }
11156
    }
11157
 
553 chandransh 11158
    public setUserAsLoggedOut_result deepCopy() {
11159
      return new setUserAsLoggedOut_result(this);
48 ashish 11160
    }
11161
 
11162
    @Deprecated
553 chandransh 11163
    public setUserAsLoggedOut_result clone() {
11164
      return new setUserAsLoggedOut_result(this);
48 ashish 11165
    }
11166
 
11167
    public boolean isSuccess() {
11168
      return this.success;
11169
    }
11170
 
553 chandransh 11171
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 11172
      this.success = success;
11173
      setSuccessIsSet(true);
11174
      return this;
11175
    }
11176
 
11177
    public void unsetSuccess() {
11178
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11179
    }
11180
 
11181
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11182
    public boolean isSetSuccess() {
11183
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11184
    }
11185
 
11186
    public void setSuccessIsSet(boolean value) {
11187
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11188
    }
11189
 
11190
    public UserContextException getUcx() {
11191
      return this.ucx;
11192
    }
11193
 
553 chandransh 11194
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 11195
      this.ucx = ucx;
11196
      return this;
11197
    }
11198
 
11199
    public void unsetUcx() {
11200
      this.ucx = null;
11201
    }
11202
 
11203
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11204
    public boolean isSetUcx() {
11205
      return this.ucx != null;
11206
    }
11207
 
11208
    public void setUcxIsSet(boolean value) {
11209
      if (!value) {
11210
        this.ucx = null;
11211
      }
11212
    }
11213
 
11214
    public void setFieldValue(_Fields field, Object value) {
11215
      switch (field) {
11216
      case SUCCESS:
11217
        if (value == null) {
11218
          unsetSuccess();
11219
        } else {
11220
          setSuccess((Boolean)value);
11221
        }
11222
        break;
11223
 
11224
      case UCX:
11225
        if (value == null) {
11226
          unsetUcx();
11227
        } else {
11228
          setUcx((UserContextException)value);
11229
        }
11230
        break;
11231
 
11232
      }
11233
    }
11234
 
11235
    public void setFieldValue(int fieldID, Object value) {
11236
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11237
    }
11238
 
11239
    public Object getFieldValue(_Fields field) {
11240
      switch (field) {
11241
      case SUCCESS:
11242
        return new Boolean(isSuccess());
11243
 
11244
      case UCX:
11245
        return getUcx();
11246
 
11247
      }
11248
      throw new IllegalStateException();
11249
    }
11250
 
11251
    public Object getFieldValue(int fieldId) {
11252
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11253
    }
11254
 
11255
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11256
    public boolean isSet(_Fields field) {
11257
      switch (field) {
11258
      case SUCCESS:
11259
        return isSetSuccess();
11260
      case UCX:
11261
        return isSetUcx();
11262
      }
11263
      throw new IllegalStateException();
11264
    }
11265
 
11266
    public boolean isSet(int fieldID) {
11267
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11268
    }
11269
 
11270
    @Override
11271
    public boolean equals(Object that) {
11272
      if (that == null)
11273
        return false;
553 chandransh 11274
      if (that instanceof setUserAsLoggedOut_result)
11275
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 11276
      return false;
11277
    }
11278
 
553 chandransh 11279
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 11280
      if (that == null)
11281
        return false;
11282
 
11283
      boolean this_present_success = true;
11284
      boolean that_present_success = true;
11285
      if (this_present_success || that_present_success) {
11286
        if (!(this_present_success && that_present_success))
11287
          return false;
11288
        if (this.success != that.success)
11289
          return false;
11290
      }
11291
 
11292
      boolean this_present_ucx = true && this.isSetUcx();
11293
      boolean that_present_ucx = true && that.isSetUcx();
11294
      if (this_present_ucx || that_present_ucx) {
11295
        if (!(this_present_ucx && that_present_ucx))
11296
          return false;
11297
        if (!this.ucx.equals(that.ucx))
11298
          return false;
11299
      }
11300
 
11301
      return true;
11302
    }
11303
 
11304
    @Override
11305
    public int hashCode() {
11306
      return 0;
11307
    }
11308
 
553 chandransh 11309
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 11310
      if (!getClass().equals(other.getClass())) {
11311
        return getClass().getName().compareTo(other.getClass().getName());
11312
      }
11313
 
11314
      int lastComparison = 0;
553 chandransh 11315
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 11316
 
11317
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11318
      if (lastComparison != 0) {
11319
        return lastComparison;
11320
      }
11321
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11322
      if (lastComparison != 0) {
11323
        return lastComparison;
11324
      }
11325
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11326
      if (lastComparison != 0) {
11327
        return lastComparison;
11328
      }
11329
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11330
      if (lastComparison != 0) {
11331
        return lastComparison;
11332
      }
11333
      return 0;
11334
    }
11335
 
11336
    public void read(TProtocol iprot) throws TException {
11337
      TField field;
11338
      iprot.readStructBegin();
11339
      while (true)
11340
      {
11341
        field = iprot.readFieldBegin();
11342
        if (field.type == TType.STOP) { 
11343
          break;
11344
        }
11345
        _Fields fieldId = _Fields.findByThriftId(field.id);
11346
        if (fieldId == null) {
11347
          TProtocolUtil.skip(iprot, field.type);
11348
        } else {
11349
          switch (fieldId) {
11350
            case SUCCESS:
11351
              if (field.type == TType.BOOL) {
11352
                this.success = iprot.readBool();
11353
                setSuccessIsSet(true);
11354
              } else { 
11355
                TProtocolUtil.skip(iprot, field.type);
11356
              }
11357
              break;
11358
            case UCX:
11359
              if (field.type == TType.STRUCT) {
11360
                this.ucx = new UserContextException();
11361
                this.ucx.read(iprot);
11362
              } else { 
11363
                TProtocolUtil.skip(iprot, field.type);
11364
              }
11365
              break;
11366
          }
11367
          iprot.readFieldEnd();
11368
        }
11369
      }
11370
      iprot.readStructEnd();
11371
      validate();
11372
    }
11373
 
11374
    public void write(TProtocol oprot) throws TException {
11375
      oprot.writeStructBegin(STRUCT_DESC);
11376
 
11377
      if (this.isSetSuccess()) {
11378
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11379
        oprot.writeBool(this.success);
11380
        oprot.writeFieldEnd();
11381
      } else if (this.isSetUcx()) {
11382
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11383
        this.ucx.write(oprot);
11384
        oprot.writeFieldEnd();
11385
      }
11386
      oprot.writeFieldStop();
11387
      oprot.writeStructEnd();
11388
    }
11389
 
11390
    @Override
11391
    public String toString() {
553 chandransh 11392
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11393
      boolean first = true;
11394
 
11395
      sb.append("success:");
11396
      sb.append(this.success);
11397
      first = false;
11398
      if (!first) sb.append(", ");
11399
      sb.append("ucx:");
11400
      if (this.ucx == null) {
11401
        sb.append("null");
11402
      } else {
11403
        sb.append(this.ucx);
11404
      }
11405
      first = false;
11406
      sb.append(")");
11407
      return sb.toString();
11408
    }
11409
 
11410
    public void validate() throws TException {
11411
      // check for required fields
11412
    }
11413
 
11414
  }
11415
 
553 chandransh 11416
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11417
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11418
 
11419
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11420
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11421
 
11422
    private long userid;
11423
    private long addressId;
11424
 
11425
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11426
    public enum _Fields implements TFieldIdEnum {
11427
      USERID((short)1, "userid"),
11428
      ADDRESS_ID((short)2, "addressId");
11429
 
11430
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11431
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11432
 
11433
      static {
11434
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11435
          byId.put((int)field._thriftId, field);
11436
          byName.put(field.getFieldName(), field);
11437
        }
11438
      }
11439
 
11440
      /**
11441
       * Find the _Fields constant that matches fieldId, or null if its not found.
11442
       */
11443
      public static _Fields findByThriftId(int fieldId) {
11444
        return byId.get(fieldId);
11445
      }
11446
 
11447
      /**
11448
       * Find the _Fields constant that matches fieldId, throwing an exception
11449
       * if it is not found.
11450
       */
11451
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11452
        _Fields fields = findByThriftId(fieldId);
11453
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11454
        return fields;
11455
      }
11456
 
11457
      /**
11458
       * Find the _Fields constant that matches name, or null if its not found.
11459
       */
11460
      public static _Fields findByName(String name) {
11461
        return byName.get(name);
11462
      }
11463
 
11464
      private final short _thriftId;
11465
      private final String _fieldName;
11466
 
11467
      _Fields(short thriftId, String fieldName) {
11468
        _thriftId = thriftId;
11469
        _fieldName = fieldName;
11470
      }
11471
 
11472
      public short getThriftFieldId() {
11473
        return _thriftId;
11474
      }
11475
 
11476
      public String getFieldName() {
11477
        return _fieldName;
11478
      }
11479
    }
11480
 
11481
    // isset id assignments
11482
    private static final int __USERID_ISSET_ID = 0;
11483
    private static final int __ADDRESSID_ISSET_ID = 1;
11484
    private BitSet __isset_bit_vector = new BitSet(2);
11485
 
11486
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11487
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11488
          new FieldValueMetaData(TType.I64)));
11489
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11490
          new FieldValueMetaData(TType.I64)));
11491
    }});
11492
 
11493
    static {
553 chandransh 11494
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11495
    }
11496
 
553 chandransh 11497
    public setDefaultAddress_args() {
48 ashish 11498
    }
11499
 
553 chandransh 11500
    public setDefaultAddress_args(
48 ashish 11501
      long userid,
11502
      long addressId)
11503
    {
11504
      this();
11505
      this.userid = userid;
11506
      setUseridIsSet(true);
11507
      this.addressId = addressId;
11508
      setAddressIdIsSet(true);
11509
    }
11510
 
11511
    /**
11512
     * Performs a deep copy on <i>other</i>.
11513
     */
553 chandransh 11514
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11515
      __isset_bit_vector.clear();
11516
      __isset_bit_vector.or(other.__isset_bit_vector);
11517
      this.userid = other.userid;
11518
      this.addressId = other.addressId;
11519
    }
11520
 
553 chandransh 11521
    public setDefaultAddress_args deepCopy() {
11522
      return new setDefaultAddress_args(this);
48 ashish 11523
    }
11524
 
11525
    @Deprecated
553 chandransh 11526
    public setDefaultAddress_args clone() {
11527
      return new setDefaultAddress_args(this);
48 ashish 11528
    }
11529
 
11530
    public long getUserid() {
11531
      return this.userid;
11532
    }
11533
 
553 chandransh 11534
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11535
      this.userid = userid;
11536
      setUseridIsSet(true);
11537
      return this;
11538
    }
11539
 
11540
    public void unsetUserid() {
11541
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11542
    }
11543
 
11544
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11545
    public boolean isSetUserid() {
11546
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11547
    }
11548
 
11549
    public void setUseridIsSet(boolean value) {
11550
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11551
    }
11552
 
11553
    public long getAddressId() {
11554
      return this.addressId;
11555
    }
11556
 
553 chandransh 11557
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11558
      this.addressId = addressId;
11559
      setAddressIdIsSet(true);
11560
      return this;
11561
    }
11562
 
11563
    public void unsetAddressId() {
11564
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11565
    }
11566
 
11567
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11568
    public boolean isSetAddressId() {
11569
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11570
    }
11571
 
11572
    public void setAddressIdIsSet(boolean value) {
11573
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11574
    }
11575
 
11576
    public void setFieldValue(_Fields field, Object value) {
11577
      switch (field) {
11578
      case USERID:
11579
        if (value == null) {
11580
          unsetUserid();
11581
        } else {
11582
          setUserid((Long)value);
11583
        }
11584
        break;
11585
 
11586
      case ADDRESS_ID:
11587
        if (value == null) {
11588
          unsetAddressId();
11589
        } else {
11590
          setAddressId((Long)value);
11591
        }
11592
        break;
11593
 
11594
      }
11595
    }
11596
 
11597
    public void setFieldValue(int fieldID, Object value) {
11598
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11599
    }
11600
 
11601
    public Object getFieldValue(_Fields field) {
11602
      switch (field) {
11603
      case USERID:
11604
        return new Long(getUserid());
11605
 
11606
      case ADDRESS_ID:
11607
        return new Long(getAddressId());
11608
 
11609
      }
11610
      throw new IllegalStateException();
11611
    }
11612
 
11613
    public Object getFieldValue(int fieldId) {
11614
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11615
    }
11616
 
11617
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11618
    public boolean isSet(_Fields field) {
11619
      switch (field) {
11620
      case USERID:
11621
        return isSetUserid();
11622
      case ADDRESS_ID:
11623
        return isSetAddressId();
11624
      }
11625
      throw new IllegalStateException();
11626
    }
11627
 
11628
    public boolean isSet(int fieldID) {
11629
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11630
    }
11631
 
11632
    @Override
11633
    public boolean equals(Object that) {
11634
      if (that == null)
11635
        return false;
553 chandransh 11636
      if (that instanceof setDefaultAddress_args)
11637
        return this.equals((setDefaultAddress_args)that);
48 ashish 11638
      return false;
11639
    }
11640
 
553 chandransh 11641
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11642
      if (that == null)
11643
        return false;
11644
 
11645
      boolean this_present_userid = true;
11646
      boolean that_present_userid = true;
11647
      if (this_present_userid || that_present_userid) {
11648
        if (!(this_present_userid && that_present_userid))
11649
          return false;
11650
        if (this.userid != that.userid)
11651
          return false;
11652
      }
11653
 
11654
      boolean this_present_addressId = true;
11655
      boolean that_present_addressId = true;
11656
      if (this_present_addressId || that_present_addressId) {
11657
        if (!(this_present_addressId && that_present_addressId))
11658
          return false;
11659
        if (this.addressId != that.addressId)
11660
          return false;
11661
      }
11662
 
11663
      return true;
11664
    }
11665
 
11666
    @Override
11667
    public int hashCode() {
11668
      return 0;
11669
    }
11670
 
553 chandransh 11671
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11672
      if (!getClass().equals(other.getClass())) {
11673
        return getClass().getName().compareTo(other.getClass().getName());
11674
      }
11675
 
11676
      int lastComparison = 0;
553 chandransh 11677
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11678
 
11679
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11680
      if (lastComparison != 0) {
11681
        return lastComparison;
11682
      }
11683
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11684
      if (lastComparison != 0) {
11685
        return lastComparison;
11686
      }
11687
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11688
      if (lastComparison != 0) {
11689
        return lastComparison;
11690
      }
11691
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11692
      if (lastComparison != 0) {
11693
        return lastComparison;
11694
      }
11695
      return 0;
11696
    }
11697
 
11698
    public void read(TProtocol iprot) throws TException {
11699
      TField field;
11700
      iprot.readStructBegin();
11701
      while (true)
11702
      {
11703
        field = iprot.readFieldBegin();
11704
        if (field.type == TType.STOP) { 
11705
          break;
11706
        }
11707
        _Fields fieldId = _Fields.findByThriftId(field.id);
11708
        if (fieldId == null) {
11709
          TProtocolUtil.skip(iprot, field.type);
11710
        } else {
11711
          switch (fieldId) {
11712
            case USERID:
11713
              if (field.type == TType.I64) {
11714
                this.userid = iprot.readI64();
11715
                setUseridIsSet(true);
11716
              } else { 
11717
                TProtocolUtil.skip(iprot, field.type);
11718
              }
11719
              break;
11720
            case ADDRESS_ID:
11721
              if (field.type == TType.I64) {
11722
                this.addressId = iprot.readI64();
11723
                setAddressIdIsSet(true);
11724
              } else { 
11725
                TProtocolUtil.skip(iprot, field.type);
11726
              }
11727
              break;
11728
          }
11729
          iprot.readFieldEnd();
11730
        }
11731
      }
11732
      iprot.readStructEnd();
11733
      validate();
11734
    }
11735
 
11736
    public void write(TProtocol oprot) throws TException {
11737
      validate();
11738
 
11739
      oprot.writeStructBegin(STRUCT_DESC);
11740
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11741
      oprot.writeI64(this.userid);
11742
      oprot.writeFieldEnd();
11743
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11744
      oprot.writeI64(this.addressId);
11745
      oprot.writeFieldEnd();
11746
      oprot.writeFieldStop();
11747
      oprot.writeStructEnd();
11748
    }
11749
 
11750
    @Override
11751
    public String toString() {
553 chandransh 11752
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11753
      boolean first = true;
11754
 
11755
      sb.append("userid:");
11756
      sb.append(this.userid);
11757
      first = false;
11758
      if (!first) sb.append(", ");
11759
      sb.append("addressId:");
11760
      sb.append(this.addressId);
11761
      first = false;
11762
      sb.append(")");
11763
      return sb.toString();
11764
    }
11765
 
11766
    public void validate() throws TException {
11767
      // check for required fields
11768
    }
11769
 
11770
  }
11771
 
553 chandransh 11772
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11773
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11774
 
11775
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11776
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11777
 
11778
    private boolean success;
11779
    private UserContextException ucx;
11780
 
11781
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11782
    public enum _Fields implements TFieldIdEnum {
11783
      SUCCESS((short)0, "success"),
11784
      UCX((short)1, "ucx");
11785
 
11786
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11787
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11788
 
11789
      static {
11790
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11791
          byId.put((int)field._thriftId, field);
11792
          byName.put(field.getFieldName(), field);
11793
        }
11794
      }
11795
 
11796
      /**
11797
       * Find the _Fields constant that matches fieldId, or null if its not found.
11798
       */
11799
      public static _Fields findByThriftId(int fieldId) {
11800
        return byId.get(fieldId);
11801
      }
11802
 
11803
      /**
11804
       * Find the _Fields constant that matches fieldId, throwing an exception
11805
       * if it is not found.
11806
       */
11807
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11808
        _Fields fields = findByThriftId(fieldId);
11809
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11810
        return fields;
11811
      }
11812
 
11813
      /**
11814
       * Find the _Fields constant that matches name, or null if its not found.
11815
       */
11816
      public static _Fields findByName(String name) {
11817
        return byName.get(name);
11818
      }
11819
 
11820
      private final short _thriftId;
11821
      private final String _fieldName;
11822
 
11823
      _Fields(short thriftId, String fieldName) {
11824
        _thriftId = thriftId;
11825
        _fieldName = fieldName;
11826
      }
11827
 
11828
      public short getThriftFieldId() {
11829
        return _thriftId;
11830
      }
11831
 
11832
      public String getFieldName() {
11833
        return _fieldName;
11834
      }
11835
    }
11836
 
11837
    // isset id assignments
11838
    private static final int __SUCCESS_ISSET_ID = 0;
11839
    private BitSet __isset_bit_vector = new BitSet(1);
11840
 
11841
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11842
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11843
          new FieldValueMetaData(TType.BOOL)));
11844
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11845
          new FieldValueMetaData(TType.STRUCT)));
11846
    }});
11847
 
11848
    static {
553 chandransh 11849
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11850
    }
11851
 
553 chandransh 11852
    public setDefaultAddress_result() {
48 ashish 11853
    }
11854
 
553 chandransh 11855
    public setDefaultAddress_result(
48 ashish 11856
      boolean success,
11857
      UserContextException ucx)
11858
    {
11859
      this();
11860
      this.success = success;
11861
      setSuccessIsSet(true);
11862
      this.ucx = ucx;
11863
    }
11864
 
11865
    /**
11866
     * Performs a deep copy on <i>other</i>.
11867
     */
553 chandransh 11868
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 11869
      __isset_bit_vector.clear();
11870
      __isset_bit_vector.or(other.__isset_bit_vector);
11871
      this.success = other.success;
11872
      if (other.isSetUcx()) {
11873
        this.ucx = new UserContextException(other.ucx);
11874
      }
11875
    }
11876
 
553 chandransh 11877
    public setDefaultAddress_result deepCopy() {
11878
      return new setDefaultAddress_result(this);
48 ashish 11879
    }
11880
 
11881
    @Deprecated
553 chandransh 11882
    public setDefaultAddress_result clone() {
11883
      return new setDefaultAddress_result(this);
48 ashish 11884
    }
11885
 
11886
    public boolean isSuccess() {
11887
      return this.success;
11888
    }
11889
 
553 chandransh 11890
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 11891
      this.success = success;
11892
      setSuccessIsSet(true);
11893
      return this;
11894
    }
11895
 
11896
    public void unsetSuccess() {
11897
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11898
    }
11899
 
11900
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11901
    public boolean isSetSuccess() {
11902
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11903
    }
11904
 
11905
    public void setSuccessIsSet(boolean value) {
11906
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11907
    }
11908
 
11909
    public UserContextException getUcx() {
11910
      return this.ucx;
11911
    }
11912
 
553 chandransh 11913
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 11914
      this.ucx = ucx;
11915
      return this;
11916
    }
11917
 
11918
    public void unsetUcx() {
11919
      this.ucx = null;
11920
    }
11921
 
11922
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11923
    public boolean isSetUcx() {
11924
      return this.ucx != null;
11925
    }
11926
 
11927
    public void setUcxIsSet(boolean value) {
11928
      if (!value) {
11929
        this.ucx = null;
11930
      }
11931
    }
11932
 
11933
    public void setFieldValue(_Fields field, Object value) {
11934
      switch (field) {
11935
      case SUCCESS:
11936
        if (value == null) {
11937
          unsetSuccess();
11938
        } else {
11939
          setSuccess((Boolean)value);
11940
        }
11941
        break;
11942
 
11943
      case UCX:
11944
        if (value == null) {
11945
          unsetUcx();
11946
        } else {
11947
          setUcx((UserContextException)value);
11948
        }
11949
        break;
11950
 
11951
      }
11952
    }
11953
 
11954
    public void setFieldValue(int fieldID, Object value) {
11955
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11956
    }
11957
 
11958
    public Object getFieldValue(_Fields field) {
11959
      switch (field) {
11960
      case SUCCESS:
11961
        return new Boolean(isSuccess());
11962
 
11963
      case UCX:
11964
        return getUcx();
11965
 
11966
      }
11967
      throw new IllegalStateException();
11968
    }
11969
 
11970
    public Object getFieldValue(int fieldId) {
11971
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11972
    }
11973
 
11974
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11975
    public boolean isSet(_Fields field) {
11976
      switch (field) {
11977
      case SUCCESS:
11978
        return isSetSuccess();
11979
      case UCX:
11980
        return isSetUcx();
11981
      }
11982
      throw new IllegalStateException();
11983
    }
11984
 
11985
    public boolean isSet(int fieldID) {
11986
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11987
    }
11988
 
11989
    @Override
11990
    public boolean equals(Object that) {
11991
      if (that == null)
11992
        return false;
553 chandransh 11993
      if (that instanceof setDefaultAddress_result)
11994
        return this.equals((setDefaultAddress_result)that);
48 ashish 11995
      return false;
11996
    }
11997
 
553 chandransh 11998
    public boolean equals(setDefaultAddress_result that) {
48 ashish 11999
      if (that == null)
12000
        return false;
12001
 
12002
      boolean this_present_success = true;
12003
      boolean that_present_success = true;
12004
      if (this_present_success || that_present_success) {
12005
        if (!(this_present_success && that_present_success))
12006
          return false;
12007
        if (this.success != that.success)
12008
          return false;
12009
      }
12010
 
12011
      boolean this_present_ucx = true && this.isSetUcx();
12012
      boolean that_present_ucx = true && that.isSetUcx();
12013
      if (this_present_ucx || that_present_ucx) {
12014
        if (!(this_present_ucx && that_present_ucx))
12015
          return false;
12016
        if (!this.ucx.equals(that.ucx))
12017
          return false;
12018
      }
12019
 
12020
      return true;
12021
    }
12022
 
12023
    @Override
12024
    public int hashCode() {
12025
      return 0;
12026
    }
12027
 
553 chandransh 12028
    public int compareTo(setDefaultAddress_result other) {
48 ashish 12029
      if (!getClass().equals(other.getClass())) {
12030
        return getClass().getName().compareTo(other.getClass().getName());
12031
      }
12032
 
12033
      int lastComparison = 0;
553 chandransh 12034
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 12035
 
12036
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12037
      if (lastComparison != 0) {
12038
        return lastComparison;
12039
      }
12040
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12041
      if (lastComparison != 0) {
12042
        return lastComparison;
12043
      }
12044
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12045
      if (lastComparison != 0) {
12046
        return lastComparison;
12047
      }
12048
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12049
      if (lastComparison != 0) {
12050
        return lastComparison;
12051
      }
12052
      return 0;
12053
    }
12054
 
12055
    public void read(TProtocol iprot) throws TException {
12056
      TField field;
12057
      iprot.readStructBegin();
12058
      while (true)
12059
      {
12060
        field = iprot.readFieldBegin();
12061
        if (field.type == TType.STOP) { 
12062
          break;
12063
        }
12064
        _Fields fieldId = _Fields.findByThriftId(field.id);
12065
        if (fieldId == null) {
12066
          TProtocolUtil.skip(iprot, field.type);
12067
        } else {
12068
          switch (fieldId) {
12069
            case SUCCESS:
12070
              if (field.type == TType.BOOL) {
12071
                this.success = iprot.readBool();
12072
                setSuccessIsSet(true);
12073
              } else { 
12074
                TProtocolUtil.skip(iprot, field.type);
12075
              }
12076
              break;
12077
            case UCX:
12078
              if (field.type == TType.STRUCT) {
12079
                this.ucx = new UserContextException();
12080
                this.ucx.read(iprot);
12081
              } else { 
12082
                TProtocolUtil.skip(iprot, field.type);
12083
              }
12084
              break;
12085
          }
12086
          iprot.readFieldEnd();
12087
        }
12088
      }
12089
      iprot.readStructEnd();
12090
      validate();
12091
    }
12092
 
12093
    public void write(TProtocol oprot) throws TException {
12094
      oprot.writeStructBegin(STRUCT_DESC);
12095
 
12096
      if (this.isSetSuccess()) {
12097
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12098
        oprot.writeBool(this.success);
12099
        oprot.writeFieldEnd();
12100
      } else if (this.isSetUcx()) {
12101
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12102
        this.ucx.write(oprot);
12103
        oprot.writeFieldEnd();
12104
      }
12105
      oprot.writeFieldStop();
12106
      oprot.writeStructEnd();
12107
    }
12108
 
12109
    @Override
12110
    public String toString() {
553 chandransh 12111
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 12112
      boolean first = true;
12113
 
12114
      sb.append("success:");
12115
      sb.append(this.success);
12116
      first = false;
12117
      if (!first) sb.append(", ");
12118
      sb.append("ucx:");
12119
      if (this.ucx == null) {
12120
        sb.append("null");
12121
      } else {
12122
        sb.append(this.ucx);
12123
      }
12124
      first = false;
12125
      sb.append(")");
12126
      return sb.toString();
12127
    }
12128
 
12129
    public void validate() throws TException {
12130
      // check for required fields
12131
    }
12132
 
12133
  }
12134
 
553 chandransh 12135
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12136
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 12137
 
553 chandransh 12138
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 12139
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
12140
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 12141
 
553 chandransh 12142
    private long userid;
593 rajveer 12143
    private String oldPassword;
12144
    private String newPassword;
48 ashish 12145
 
12146
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12147
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12148
      USERID((short)1, "userid"),
593 rajveer 12149
      OLD_PASSWORD((short)2, "oldPassword"),
12150
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 12151
 
12152
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12153
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12154
 
12155
      static {
12156
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12157
          byId.put((int)field._thriftId, field);
12158
          byName.put(field.getFieldName(), field);
12159
        }
12160
      }
12161
 
12162
      /**
12163
       * Find the _Fields constant that matches fieldId, or null if its not found.
12164
       */
12165
      public static _Fields findByThriftId(int fieldId) {
12166
        return byId.get(fieldId);
12167
      }
12168
 
12169
      /**
12170
       * Find the _Fields constant that matches fieldId, throwing an exception
12171
       * if it is not found.
12172
       */
12173
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12174
        _Fields fields = findByThriftId(fieldId);
12175
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12176
        return fields;
12177
      }
12178
 
12179
      /**
12180
       * Find the _Fields constant that matches name, or null if its not found.
12181
       */
12182
      public static _Fields findByName(String name) {
12183
        return byName.get(name);
12184
      }
12185
 
12186
      private final short _thriftId;
12187
      private final String _fieldName;
12188
 
12189
      _Fields(short thriftId, String fieldName) {
12190
        _thriftId = thriftId;
12191
        _fieldName = fieldName;
12192
      }
12193
 
12194
      public short getThriftFieldId() {
12195
        return _thriftId;
12196
      }
12197
 
12198
      public String getFieldName() {
12199
        return _fieldName;
12200
      }
12201
    }
12202
 
12203
    // isset id assignments
12204
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12205
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12206
 
12207
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12208
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 12209
          new FieldValueMetaData(TType.I64)));
593 rajveer 12210
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 12211
          new FieldValueMetaData(TType.STRING)));
593 rajveer 12212
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
12213
          new FieldValueMetaData(TType.STRING)));
48 ashish 12214
    }});
12215
 
12216
    static {
553 chandransh 12217
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 12218
    }
12219
 
553 chandransh 12220
    public updatePassword_args() {
48 ashish 12221
    }
12222
 
553 chandransh 12223
    public updatePassword_args(
12224
      long userid,
593 rajveer 12225
      String oldPassword,
12226
      String newPassword)
48 ashish 12227
    {
12228
      this();
553 chandransh 12229
      this.userid = userid;
12230
      setUseridIsSet(true);
593 rajveer 12231
      this.oldPassword = oldPassword;
12232
      this.newPassword = newPassword;
48 ashish 12233
    }
12234
 
12235
    /**
12236
     * Performs a deep copy on <i>other</i>.
12237
     */
553 chandransh 12238
    public updatePassword_args(updatePassword_args other) {
48 ashish 12239
      __isset_bit_vector.clear();
12240
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12241
      this.userid = other.userid;
593 rajveer 12242
      if (other.isSetOldPassword()) {
12243
        this.oldPassword = other.oldPassword;
553 chandransh 12244
      }
593 rajveer 12245
      if (other.isSetNewPassword()) {
12246
        this.newPassword = other.newPassword;
12247
      }
48 ashish 12248
    }
12249
 
553 chandransh 12250
    public updatePassword_args deepCopy() {
12251
      return new updatePassword_args(this);
48 ashish 12252
    }
12253
 
12254
    @Deprecated
553 chandransh 12255
    public updatePassword_args clone() {
12256
      return new updatePassword_args(this);
48 ashish 12257
    }
12258
 
553 chandransh 12259
    public long getUserid() {
12260
      return this.userid;
48 ashish 12261
    }
12262
 
553 chandransh 12263
    public updatePassword_args setUserid(long userid) {
12264
      this.userid = userid;
12265
      setUseridIsSet(true);
48 ashish 12266
      return this;
12267
    }
12268
 
553 chandransh 12269
    public void unsetUserid() {
48 ashish 12270
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12271
    }
12272
 
553 chandransh 12273
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12274
    public boolean isSetUserid() {
48 ashish 12275
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12276
    }
12277
 
553 chandransh 12278
    public void setUseridIsSet(boolean value) {
48 ashish 12279
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12280
    }
12281
 
593 rajveer 12282
    public String getOldPassword() {
12283
      return this.oldPassword;
48 ashish 12284
    }
12285
 
593 rajveer 12286
    public updatePassword_args setOldPassword(String oldPassword) {
12287
      this.oldPassword = oldPassword;
48 ashish 12288
      return this;
12289
    }
12290
 
593 rajveer 12291
    public void unsetOldPassword() {
12292
      this.oldPassword = null;
48 ashish 12293
    }
12294
 
593 rajveer 12295
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
12296
    public boolean isSetOldPassword() {
12297
      return this.oldPassword != null;
48 ashish 12298
    }
12299
 
593 rajveer 12300
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 12301
      if (!value) {
593 rajveer 12302
        this.oldPassword = null;
553 chandransh 12303
      }
48 ashish 12304
    }
12305
 
593 rajveer 12306
    public String getNewPassword() {
12307
      return this.newPassword;
12308
    }
12309
 
12310
    public updatePassword_args setNewPassword(String newPassword) {
12311
      this.newPassword = newPassword;
12312
      return this;
12313
    }
12314
 
12315
    public void unsetNewPassword() {
12316
      this.newPassword = null;
12317
    }
12318
 
12319
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
12320
    public boolean isSetNewPassword() {
12321
      return this.newPassword != null;
12322
    }
12323
 
12324
    public void setNewPasswordIsSet(boolean value) {
12325
      if (!value) {
12326
        this.newPassword = null;
12327
      }
12328
    }
12329
 
48 ashish 12330
    public void setFieldValue(_Fields field, Object value) {
12331
      switch (field) {
553 chandransh 12332
      case USERID:
48 ashish 12333
        if (value == null) {
553 chandransh 12334
          unsetUserid();
48 ashish 12335
        } else {
553 chandransh 12336
          setUserid((Long)value);
48 ashish 12337
        }
12338
        break;
12339
 
593 rajveer 12340
      case OLD_PASSWORD:
48 ashish 12341
        if (value == null) {
593 rajveer 12342
          unsetOldPassword();
48 ashish 12343
        } else {
593 rajveer 12344
          setOldPassword((String)value);
48 ashish 12345
        }
12346
        break;
12347
 
593 rajveer 12348
      case NEW_PASSWORD:
12349
        if (value == null) {
12350
          unsetNewPassword();
12351
        } else {
12352
          setNewPassword((String)value);
12353
        }
12354
        break;
12355
 
48 ashish 12356
      }
12357
    }
12358
 
12359
    public void setFieldValue(int fieldID, Object value) {
12360
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12361
    }
12362
 
12363
    public Object getFieldValue(_Fields field) {
12364
      switch (field) {
553 chandransh 12365
      case USERID:
12366
        return new Long(getUserid());
48 ashish 12367
 
593 rajveer 12368
      case OLD_PASSWORD:
12369
        return getOldPassword();
48 ashish 12370
 
593 rajveer 12371
      case NEW_PASSWORD:
12372
        return getNewPassword();
12373
 
48 ashish 12374
      }
12375
      throw new IllegalStateException();
12376
    }
12377
 
12378
    public Object getFieldValue(int fieldId) {
12379
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12380
    }
12381
 
12382
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12383
    public boolean isSet(_Fields field) {
12384
      switch (field) {
553 chandransh 12385
      case USERID:
12386
        return isSetUserid();
593 rajveer 12387
      case OLD_PASSWORD:
12388
        return isSetOldPassword();
12389
      case NEW_PASSWORD:
12390
        return isSetNewPassword();
48 ashish 12391
      }
12392
      throw new IllegalStateException();
12393
    }
12394
 
12395
    public boolean isSet(int fieldID) {
12396
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12397
    }
12398
 
12399
    @Override
12400
    public boolean equals(Object that) {
12401
      if (that == null)
12402
        return false;
553 chandransh 12403
      if (that instanceof updatePassword_args)
12404
        return this.equals((updatePassword_args)that);
48 ashish 12405
      return false;
12406
    }
12407
 
553 chandransh 12408
    public boolean equals(updatePassword_args that) {
48 ashish 12409
      if (that == null)
12410
        return false;
12411
 
553 chandransh 12412
      boolean this_present_userid = true;
12413
      boolean that_present_userid = true;
12414
      if (this_present_userid || that_present_userid) {
12415
        if (!(this_present_userid && that_present_userid))
48 ashish 12416
          return false;
553 chandransh 12417
        if (this.userid != that.userid)
48 ashish 12418
          return false;
12419
      }
12420
 
593 rajveer 12421
      boolean this_present_oldPassword = true && this.isSetOldPassword();
12422
      boolean that_present_oldPassword = true && that.isSetOldPassword();
12423
      if (this_present_oldPassword || that_present_oldPassword) {
12424
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 12425
          return false;
593 rajveer 12426
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 12427
          return false;
12428
      }
12429
 
593 rajveer 12430
      boolean this_present_newPassword = true && this.isSetNewPassword();
12431
      boolean that_present_newPassword = true && that.isSetNewPassword();
12432
      if (this_present_newPassword || that_present_newPassword) {
12433
        if (!(this_present_newPassword && that_present_newPassword))
12434
          return false;
12435
        if (!this.newPassword.equals(that.newPassword))
12436
          return false;
12437
      }
12438
 
48 ashish 12439
      return true;
12440
    }
12441
 
12442
    @Override
12443
    public int hashCode() {
12444
      return 0;
12445
    }
12446
 
553 chandransh 12447
    public int compareTo(updatePassword_args other) {
48 ashish 12448
      if (!getClass().equals(other.getClass())) {
12449
        return getClass().getName().compareTo(other.getClass().getName());
12450
      }
12451
 
12452
      int lastComparison = 0;
553 chandransh 12453
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12454
 
553 chandransh 12455
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12456
      if (lastComparison != 0) {
12457
        return lastComparison;
12458
      }
553 chandransh 12459
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12460
      if (lastComparison != 0) {
12461
        return lastComparison;
12462
      }
593 rajveer 12463
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 12464
      if (lastComparison != 0) {
12465
        return lastComparison;
12466
      }
593 rajveer 12467
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 12468
      if (lastComparison != 0) {
12469
        return lastComparison;
12470
      }
593 rajveer 12471
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
12472
      if (lastComparison != 0) {
12473
        return lastComparison;
12474
      }
12475
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
12476
      if (lastComparison != 0) {
12477
        return lastComparison;
12478
      }
48 ashish 12479
      return 0;
12480
    }
12481
 
12482
    public void read(TProtocol iprot) throws TException {
12483
      TField field;
12484
      iprot.readStructBegin();
12485
      while (true)
12486
      {
12487
        field = iprot.readFieldBegin();
12488
        if (field.type == TType.STOP) { 
12489
          break;
12490
        }
12491
        _Fields fieldId = _Fields.findByThriftId(field.id);
12492
        if (fieldId == null) {
12493
          TProtocolUtil.skip(iprot, field.type);
12494
        } else {
12495
          switch (fieldId) {
553 chandransh 12496
            case USERID:
48 ashish 12497
              if (field.type == TType.I64) {
553 chandransh 12498
                this.userid = iprot.readI64();
12499
                setUseridIsSet(true);
48 ashish 12500
              } else { 
12501
                TProtocolUtil.skip(iprot, field.type);
12502
              }
12503
              break;
593 rajveer 12504
            case OLD_PASSWORD:
553 chandransh 12505
              if (field.type == TType.STRING) {
593 rajveer 12506
                this.oldPassword = iprot.readString();
48 ashish 12507
              } else { 
12508
                TProtocolUtil.skip(iprot, field.type);
12509
              }
12510
              break;
593 rajveer 12511
            case NEW_PASSWORD:
12512
              if (field.type == TType.STRING) {
12513
                this.newPassword = iprot.readString();
12514
              } else { 
12515
                TProtocolUtil.skip(iprot, field.type);
12516
              }
12517
              break;
48 ashish 12518
          }
12519
          iprot.readFieldEnd();
12520
        }
12521
      }
12522
      iprot.readStructEnd();
12523
      validate();
12524
    }
12525
 
12526
    public void write(TProtocol oprot) throws TException {
12527
      validate();
12528
 
12529
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12530
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12531
      oprot.writeI64(this.userid);
48 ashish 12532
      oprot.writeFieldEnd();
593 rajveer 12533
      if (this.oldPassword != null) {
12534
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
12535
        oprot.writeString(this.oldPassword);
553 chandransh 12536
        oprot.writeFieldEnd();
12537
      }
593 rajveer 12538
      if (this.newPassword != null) {
12539
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
12540
        oprot.writeString(this.newPassword);
12541
        oprot.writeFieldEnd();
12542
      }
48 ashish 12543
      oprot.writeFieldStop();
12544
      oprot.writeStructEnd();
12545
    }
12546
 
12547
    @Override
12548
    public String toString() {
553 chandransh 12549
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12550
      boolean first = true;
12551
 
553 chandransh 12552
      sb.append("userid:");
12553
      sb.append(this.userid);
48 ashish 12554
      first = false;
12555
      if (!first) sb.append(", ");
593 rajveer 12556
      sb.append("oldPassword:");
12557
      if (this.oldPassword == null) {
553 chandransh 12558
        sb.append("null");
12559
      } else {
593 rajveer 12560
        sb.append(this.oldPassword);
553 chandransh 12561
      }
48 ashish 12562
      first = false;
593 rajveer 12563
      if (!first) sb.append(", ");
12564
      sb.append("newPassword:");
12565
      if (this.newPassword == null) {
12566
        sb.append("null");
12567
      } else {
12568
        sb.append(this.newPassword);
12569
      }
12570
      first = false;
48 ashish 12571
      sb.append(")");
12572
      return sb.toString();
12573
    }
12574
 
12575
    public void validate() throws TException {
12576
      // check for required fields
12577
    }
12578
 
12579
  }
12580
 
553 chandransh 12581
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12582
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12583
 
12584
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12585
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12586
 
12587
    private boolean success;
12588
    private UserContextException ucx;
12589
 
12590
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12591
    public enum _Fields implements TFieldIdEnum {
12592
      SUCCESS((short)0, "success"),
12593
      UCX((short)1, "ucx");
12594
 
12595
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12596
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12597
 
12598
      static {
12599
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12600
          byId.put((int)field._thriftId, field);
12601
          byName.put(field.getFieldName(), field);
12602
        }
12603
      }
12604
 
12605
      /**
12606
       * Find the _Fields constant that matches fieldId, or null if its not found.
12607
       */
12608
      public static _Fields findByThriftId(int fieldId) {
12609
        return byId.get(fieldId);
12610
      }
12611
 
12612
      /**
12613
       * Find the _Fields constant that matches fieldId, throwing an exception
12614
       * if it is not found.
12615
       */
12616
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12617
        _Fields fields = findByThriftId(fieldId);
12618
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12619
        return fields;
12620
      }
12621
 
12622
      /**
12623
       * Find the _Fields constant that matches name, or null if its not found.
12624
       */
12625
      public static _Fields findByName(String name) {
12626
        return byName.get(name);
12627
      }
12628
 
12629
      private final short _thriftId;
12630
      private final String _fieldName;
12631
 
12632
      _Fields(short thriftId, String fieldName) {
12633
        _thriftId = thriftId;
12634
        _fieldName = fieldName;
12635
      }
12636
 
12637
      public short getThriftFieldId() {
12638
        return _thriftId;
12639
      }
12640
 
12641
      public String getFieldName() {
12642
        return _fieldName;
12643
      }
12644
    }
12645
 
12646
    // isset id assignments
12647
    private static final int __SUCCESS_ISSET_ID = 0;
12648
    private BitSet __isset_bit_vector = new BitSet(1);
12649
 
12650
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12651
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12652
          new FieldValueMetaData(TType.BOOL)));
12653
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12654
          new FieldValueMetaData(TType.STRUCT)));
12655
    }});
12656
 
12657
    static {
553 chandransh 12658
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12659
    }
12660
 
553 chandransh 12661
    public updatePassword_result() {
48 ashish 12662
    }
12663
 
553 chandransh 12664
    public updatePassword_result(
48 ashish 12665
      boolean success,
12666
      UserContextException ucx)
12667
    {
12668
      this();
12669
      this.success = success;
12670
      setSuccessIsSet(true);
12671
      this.ucx = ucx;
12672
    }
12673
 
12674
    /**
12675
     * Performs a deep copy on <i>other</i>.
12676
     */
553 chandransh 12677
    public updatePassword_result(updatePassword_result other) {
48 ashish 12678
      __isset_bit_vector.clear();
12679
      __isset_bit_vector.or(other.__isset_bit_vector);
12680
      this.success = other.success;
12681
      if (other.isSetUcx()) {
12682
        this.ucx = new UserContextException(other.ucx);
12683
      }
12684
    }
12685
 
553 chandransh 12686
    public updatePassword_result deepCopy() {
12687
      return new updatePassword_result(this);
48 ashish 12688
    }
12689
 
12690
    @Deprecated
553 chandransh 12691
    public updatePassword_result clone() {
12692
      return new updatePassword_result(this);
48 ashish 12693
    }
12694
 
12695
    public boolean isSuccess() {
12696
      return this.success;
12697
    }
12698
 
553 chandransh 12699
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12700
      this.success = success;
12701
      setSuccessIsSet(true);
12702
      return this;
12703
    }
12704
 
12705
    public void unsetSuccess() {
12706
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12707
    }
12708
 
12709
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12710
    public boolean isSetSuccess() {
12711
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12712
    }
12713
 
12714
    public void setSuccessIsSet(boolean value) {
12715
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12716
    }
12717
 
12718
    public UserContextException getUcx() {
12719
      return this.ucx;
12720
    }
12721
 
553 chandransh 12722
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12723
      this.ucx = ucx;
12724
      return this;
12725
    }
12726
 
12727
    public void unsetUcx() {
12728
      this.ucx = null;
12729
    }
12730
 
12731
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12732
    public boolean isSetUcx() {
12733
      return this.ucx != null;
12734
    }
12735
 
12736
    public void setUcxIsSet(boolean value) {
12737
      if (!value) {
12738
        this.ucx = null;
12739
      }
12740
    }
12741
 
12742
    public void setFieldValue(_Fields field, Object value) {
12743
      switch (field) {
12744
      case SUCCESS:
12745
        if (value == null) {
12746
          unsetSuccess();
12747
        } else {
12748
          setSuccess((Boolean)value);
12749
        }
12750
        break;
12751
 
12752
      case UCX:
12753
        if (value == null) {
12754
          unsetUcx();
12755
        } else {
12756
          setUcx((UserContextException)value);
12757
        }
12758
        break;
12759
 
12760
      }
12761
    }
12762
 
12763
    public void setFieldValue(int fieldID, Object value) {
12764
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12765
    }
12766
 
12767
    public Object getFieldValue(_Fields field) {
12768
      switch (field) {
12769
      case SUCCESS:
12770
        return new Boolean(isSuccess());
12771
 
12772
      case UCX:
12773
        return getUcx();
12774
 
12775
      }
12776
      throw new IllegalStateException();
12777
    }
12778
 
12779
    public Object getFieldValue(int fieldId) {
12780
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12781
    }
12782
 
12783
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12784
    public boolean isSet(_Fields field) {
12785
      switch (field) {
12786
      case SUCCESS:
12787
        return isSetSuccess();
12788
      case UCX:
12789
        return isSetUcx();
12790
      }
12791
      throw new IllegalStateException();
12792
    }
12793
 
12794
    public boolean isSet(int fieldID) {
12795
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12796
    }
12797
 
12798
    @Override
12799
    public boolean equals(Object that) {
12800
      if (that == null)
12801
        return false;
553 chandransh 12802
      if (that instanceof updatePassword_result)
12803
        return this.equals((updatePassword_result)that);
48 ashish 12804
      return false;
12805
    }
12806
 
553 chandransh 12807
    public boolean equals(updatePassword_result that) {
48 ashish 12808
      if (that == null)
12809
        return false;
12810
 
12811
      boolean this_present_success = true;
12812
      boolean that_present_success = true;
12813
      if (this_present_success || that_present_success) {
12814
        if (!(this_present_success && that_present_success))
12815
          return false;
12816
        if (this.success != that.success)
12817
          return false;
12818
      }
12819
 
12820
      boolean this_present_ucx = true && this.isSetUcx();
12821
      boolean that_present_ucx = true && that.isSetUcx();
12822
      if (this_present_ucx || that_present_ucx) {
12823
        if (!(this_present_ucx && that_present_ucx))
12824
          return false;
12825
        if (!this.ucx.equals(that.ucx))
12826
          return false;
12827
      }
12828
 
12829
      return true;
12830
    }
12831
 
12832
    @Override
12833
    public int hashCode() {
12834
      return 0;
12835
    }
12836
 
553 chandransh 12837
    public int compareTo(updatePassword_result other) {
48 ashish 12838
      if (!getClass().equals(other.getClass())) {
12839
        return getClass().getName().compareTo(other.getClass().getName());
12840
      }
12841
 
12842
      int lastComparison = 0;
553 chandransh 12843
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12844
 
12845
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12846
      if (lastComparison != 0) {
12847
        return lastComparison;
12848
      }
12849
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12850
      if (lastComparison != 0) {
12851
        return lastComparison;
12852
      }
12853
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12854
      if (lastComparison != 0) {
12855
        return lastComparison;
12856
      }
12857
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12858
      if (lastComparison != 0) {
12859
        return lastComparison;
12860
      }
12861
      return 0;
12862
    }
12863
 
12864
    public void read(TProtocol iprot) throws TException {
12865
      TField field;
12866
      iprot.readStructBegin();
12867
      while (true)
12868
      {
12869
        field = iprot.readFieldBegin();
12870
        if (field.type == TType.STOP) { 
12871
          break;
12872
        }
12873
        _Fields fieldId = _Fields.findByThriftId(field.id);
12874
        if (fieldId == null) {
12875
          TProtocolUtil.skip(iprot, field.type);
12876
        } else {
12877
          switch (fieldId) {
12878
            case SUCCESS:
12879
              if (field.type == TType.BOOL) {
12880
                this.success = iprot.readBool();
12881
                setSuccessIsSet(true);
12882
              } else { 
12883
                TProtocolUtil.skip(iprot, field.type);
12884
              }
12885
              break;
12886
            case UCX:
12887
              if (field.type == TType.STRUCT) {
12888
                this.ucx = new UserContextException();
12889
                this.ucx.read(iprot);
12890
              } else { 
12891
                TProtocolUtil.skip(iprot, field.type);
12892
              }
12893
              break;
12894
          }
12895
          iprot.readFieldEnd();
12896
        }
12897
      }
12898
      iprot.readStructEnd();
12899
      validate();
12900
    }
12901
 
12902
    public void write(TProtocol oprot) throws TException {
12903
      oprot.writeStructBegin(STRUCT_DESC);
12904
 
12905
      if (this.isSetSuccess()) {
12906
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12907
        oprot.writeBool(this.success);
12908
        oprot.writeFieldEnd();
12909
      } else if (this.isSetUcx()) {
12910
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12911
        this.ucx.write(oprot);
12912
        oprot.writeFieldEnd();
12913
      }
12914
      oprot.writeFieldStop();
12915
      oprot.writeStructEnd();
12916
    }
12917
 
12918
    @Override
12919
    public String toString() {
553 chandransh 12920
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 12921
      boolean first = true;
12922
 
12923
      sb.append("success:");
12924
      sb.append(this.success);
12925
      first = false;
12926
      if (!first) sb.append(", ");
12927
      sb.append("ucx:");
12928
      if (this.ucx == null) {
12929
        sb.append("null");
12930
      } else {
12931
        sb.append(this.ucx);
12932
      }
12933
      first = false;
12934
      sb.append(")");
12935
      return sb.toString();
12936
    }
12937
 
12938
    public void validate() throws TException {
12939
      // check for required fields
12940
    }
12941
 
12942
  }
12943
 
582 rajveer 12944
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
12945
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
12946
 
12947
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
12948
 
12949
    private String email;
12950
 
12951
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12952
    public enum _Fields implements TFieldIdEnum {
12953
      EMAIL((short)1, "email");
12954
 
12955
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12956
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12957
 
12958
      static {
12959
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12960
          byId.put((int)field._thriftId, field);
12961
          byName.put(field.getFieldName(), field);
12962
        }
12963
      }
12964
 
12965
      /**
12966
       * Find the _Fields constant that matches fieldId, or null if its not found.
12967
       */
12968
      public static _Fields findByThriftId(int fieldId) {
12969
        return byId.get(fieldId);
12970
      }
12971
 
12972
      /**
12973
       * Find the _Fields constant that matches fieldId, throwing an exception
12974
       * if it is not found.
12975
       */
12976
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12977
        _Fields fields = findByThriftId(fieldId);
12978
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12979
        return fields;
12980
      }
12981
 
12982
      /**
12983
       * Find the _Fields constant that matches name, or null if its not found.
12984
       */
12985
      public static _Fields findByName(String name) {
12986
        return byName.get(name);
12987
      }
12988
 
12989
      private final short _thriftId;
12990
      private final String _fieldName;
12991
 
12992
      _Fields(short thriftId, String fieldName) {
12993
        _thriftId = thriftId;
12994
        _fieldName = fieldName;
12995
      }
12996
 
12997
      public short getThriftFieldId() {
12998
        return _thriftId;
12999
      }
13000
 
13001
      public String getFieldName() {
13002
        return _fieldName;
13003
      }
13004
    }
13005
 
13006
    // isset id assignments
13007
 
13008
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13009
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
13010
          new FieldValueMetaData(TType.STRING)));
13011
    }});
13012
 
13013
    static {
13014
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
13015
    }
13016
 
13017
    public forgotPassword_args() {
13018
    }
13019
 
13020
    public forgotPassword_args(
13021
      String email)
13022
    {
13023
      this();
13024
      this.email = email;
13025
    }
13026
 
13027
    /**
13028
     * Performs a deep copy on <i>other</i>.
13029
     */
13030
    public forgotPassword_args(forgotPassword_args other) {
13031
      if (other.isSetEmail()) {
13032
        this.email = other.email;
13033
      }
13034
    }
13035
 
13036
    public forgotPassword_args deepCopy() {
13037
      return new forgotPassword_args(this);
13038
    }
13039
 
13040
    @Deprecated
13041
    public forgotPassword_args clone() {
13042
      return new forgotPassword_args(this);
13043
    }
13044
 
13045
    public String getEmail() {
13046
      return this.email;
13047
    }
13048
 
13049
    public forgotPassword_args setEmail(String email) {
13050
      this.email = email;
13051
      return this;
13052
    }
13053
 
13054
    public void unsetEmail() {
13055
      this.email = null;
13056
    }
13057
 
13058
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
13059
    public boolean isSetEmail() {
13060
      return this.email != null;
13061
    }
13062
 
13063
    public void setEmailIsSet(boolean value) {
13064
      if (!value) {
13065
        this.email = null;
13066
      }
13067
    }
13068
 
13069
    public void setFieldValue(_Fields field, Object value) {
13070
      switch (field) {
13071
      case EMAIL:
13072
        if (value == null) {
13073
          unsetEmail();
13074
        } else {
13075
          setEmail((String)value);
13076
        }
13077
        break;
13078
 
13079
      }
13080
    }
13081
 
13082
    public void setFieldValue(int fieldID, Object value) {
13083
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13084
    }
13085
 
13086
    public Object getFieldValue(_Fields field) {
13087
      switch (field) {
13088
      case EMAIL:
13089
        return getEmail();
13090
 
13091
      }
13092
      throw new IllegalStateException();
13093
    }
13094
 
13095
    public Object getFieldValue(int fieldId) {
13096
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13097
    }
13098
 
13099
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13100
    public boolean isSet(_Fields field) {
13101
      switch (field) {
13102
      case EMAIL:
13103
        return isSetEmail();
13104
      }
13105
      throw new IllegalStateException();
13106
    }
13107
 
13108
    public boolean isSet(int fieldID) {
13109
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13110
    }
13111
 
13112
    @Override
13113
    public boolean equals(Object that) {
13114
      if (that == null)
13115
        return false;
13116
      if (that instanceof forgotPassword_args)
13117
        return this.equals((forgotPassword_args)that);
13118
      return false;
13119
    }
13120
 
13121
    public boolean equals(forgotPassword_args that) {
13122
      if (that == null)
13123
        return false;
13124
 
13125
      boolean this_present_email = true && this.isSetEmail();
13126
      boolean that_present_email = true && that.isSetEmail();
13127
      if (this_present_email || that_present_email) {
13128
        if (!(this_present_email && that_present_email))
13129
          return false;
13130
        if (!this.email.equals(that.email))
13131
          return false;
13132
      }
13133
 
13134
      return true;
13135
    }
13136
 
13137
    @Override
13138
    public int hashCode() {
13139
      return 0;
13140
    }
13141
 
13142
    public int compareTo(forgotPassword_args other) {
13143
      if (!getClass().equals(other.getClass())) {
13144
        return getClass().getName().compareTo(other.getClass().getName());
13145
      }
13146
 
13147
      int lastComparison = 0;
13148
      forgotPassword_args typedOther = (forgotPassword_args)other;
13149
 
13150
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
13151
      if (lastComparison != 0) {
13152
        return lastComparison;
13153
      }
13154
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
13155
      if (lastComparison != 0) {
13156
        return lastComparison;
13157
      }
13158
      return 0;
13159
    }
13160
 
13161
    public void read(TProtocol iprot) throws TException {
13162
      TField field;
13163
      iprot.readStructBegin();
13164
      while (true)
13165
      {
13166
        field = iprot.readFieldBegin();
13167
        if (field.type == TType.STOP) { 
13168
          break;
13169
        }
13170
        _Fields fieldId = _Fields.findByThriftId(field.id);
13171
        if (fieldId == null) {
13172
          TProtocolUtil.skip(iprot, field.type);
13173
        } else {
13174
          switch (fieldId) {
13175
            case EMAIL:
13176
              if (field.type == TType.STRING) {
13177
                this.email = iprot.readString();
13178
              } else { 
13179
                TProtocolUtil.skip(iprot, field.type);
13180
              }
13181
              break;
13182
          }
13183
          iprot.readFieldEnd();
13184
        }
13185
      }
13186
      iprot.readStructEnd();
13187
      validate();
13188
    }
13189
 
13190
    public void write(TProtocol oprot) throws TException {
13191
      validate();
13192
 
13193
      oprot.writeStructBegin(STRUCT_DESC);
13194
      if (this.email != null) {
13195
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
13196
        oprot.writeString(this.email);
13197
        oprot.writeFieldEnd();
13198
      }
13199
      oprot.writeFieldStop();
13200
      oprot.writeStructEnd();
13201
    }
13202
 
13203
    @Override
13204
    public String toString() {
13205
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
13206
      boolean first = true;
13207
 
13208
      sb.append("email:");
13209
      if (this.email == null) {
13210
        sb.append("null");
13211
      } else {
13212
        sb.append(this.email);
13213
      }
13214
      first = false;
13215
      sb.append(")");
13216
      return sb.toString();
13217
    }
13218
 
13219
    public void validate() throws TException {
13220
      // check for required fields
13221
    }
13222
 
13223
  }
13224
 
13225
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
13226
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
13227
 
13228
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13229
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13230
 
13231
    private boolean success;
13232
    private UserContextException ucx;
13233
 
13234
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13235
    public enum _Fields implements TFieldIdEnum {
13236
      SUCCESS((short)0, "success"),
13237
      UCX((short)1, "ucx");
13238
 
13239
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13240
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13241
 
13242
      static {
13243
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13244
          byId.put((int)field._thriftId, field);
13245
          byName.put(field.getFieldName(), field);
13246
        }
13247
      }
13248
 
13249
      /**
13250
       * Find the _Fields constant that matches fieldId, or null if its not found.
13251
       */
13252
      public static _Fields findByThriftId(int fieldId) {
13253
        return byId.get(fieldId);
13254
      }
13255
 
13256
      /**
13257
       * Find the _Fields constant that matches fieldId, throwing an exception
13258
       * if it is not found.
13259
       */
13260
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13261
        _Fields fields = findByThriftId(fieldId);
13262
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13263
        return fields;
13264
      }
13265
 
13266
      /**
13267
       * Find the _Fields constant that matches name, or null if its not found.
13268
       */
13269
      public static _Fields findByName(String name) {
13270
        return byName.get(name);
13271
      }
13272
 
13273
      private final short _thriftId;
13274
      private final String _fieldName;
13275
 
13276
      _Fields(short thriftId, String fieldName) {
13277
        _thriftId = thriftId;
13278
        _fieldName = fieldName;
13279
      }
13280
 
13281
      public short getThriftFieldId() {
13282
        return _thriftId;
13283
      }
13284
 
13285
      public String getFieldName() {
13286
        return _fieldName;
13287
      }
13288
    }
13289
 
13290
    // isset id assignments
13291
    private static final int __SUCCESS_ISSET_ID = 0;
13292
    private BitSet __isset_bit_vector = new BitSet(1);
13293
 
13294
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13295
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13296
          new FieldValueMetaData(TType.BOOL)));
13297
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13298
          new FieldValueMetaData(TType.STRUCT)));
13299
    }});
13300
 
13301
    static {
13302
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
13303
    }
13304
 
13305
    public forgotPassword_result() {
13306
    }
13307
 
13308
    public forgotPassword_result(
13309
      boolean success,
13310
      UserContextException ucx)
13311
    {
13312
      this();
13313
      this.success = success;
13314
      setSuccessIsSet(true);
13315
      this.ucx = ucx;
13316
    }
13317
 
13318
    /**
13319
     * Performs a deep copy on <i>other</i>.
13320
     */
13321
    public forgotPassword_result(forgotPassword_result other) {
13322
      __isset_bit_vector.clear();
13323
      __isset_bit_vector.or(other.__isset_bit_vector);
13324
      this.success = other.success;
13325
      if (other.isSetUcx()) {
13326
        this.ucx = new UserContextException(other.ucx);
13327
      }
13328
    }
13329
 
13330
    public forgotPassword_result deepCopy() {
13331
      return new forgotPassword_result(this);
13332
    }
13333
 
13334
    @Deprecated
13335
    public forgotPassword_result clone() {
13336
      return new forgotPassword_result(this);
13337
    }
13338
 
13339
    public boolean isSuccess() {
13340
      return this.success;
13341
    }
13342
 
13343
    public forgotPassword_result setSuccess(boolean success) {
13344
      this.success = success;
13345
      setSuccessIsSet(true);
13346
      return this;
13347
    }
13348
 
13349
    public void unsetSuccess() {
13350
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13351
    }
13352
 
13353
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13354
    public boolean isSetSuccess() {
13355
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13356
    }
13357
 
13358
    public void setSuccessIsSet(boolean value) {
13359
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13360
    }
13361
 
13362
    public UserContextException getUcx() {
13363
      return this.ucx;
13364
    }
13365
 
13366
    public forgotPassword_result setUcx(UserContextException ucx) {
13367
      this.ucx = ucx;
13368
      return this;
13369
    }
13370
 
13371
    public void unsetUcx() {
13372
      this.ucx = null;
13373
    }
13374
 
13375
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13376
    public boolean isSetUcx() {
13377
      return this.ucx != null;
13378
    }
13379
 
13380
    public void setUcxIsSet(boolean value) {
13381
      if (!value) {
13382
        this.ucx = null;
13383
      }
13384
    }
13385
 
13386
    public void setFieldValue(_Fields field, Object value) {
13387
      switch (field) {
13388
      case SUCCESS:
13389
        if (value == null) {
13390
          unsetSuccess();
13391
        } else {
13392
          setSuccess((Boolean)value);
13393
        }
13394
        break;
13395
 
13396
      case UCX:
13397
        if (value == null) {
13398
          unsetUcx();
13399
        } else {
13400
          setUcx((UserContextException)value);
13401
        }
13402
        break;
13403
 
13404
      }
13405
    }
13406
 
13407
    public void setFieldValue(int fieldID, Object value) {
13408
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13409
    }
13410
 
13411
    public Object getFieldValue(_Fields field) {
13412
      switch (field) {
13413
      case SUCCESS:
13414
        return new Boolean(isSuccess());
13415
 
13416
      case UCX:
13417
        return getUcx();
13418
 
13419
      }
13420
      throw new IllegalStateException();
13421
    }
13422
 
13423
    public Object getFieldValue(int fieldId) {
13424
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13425
    }
13426
 
13427
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13428
    public boolean isSet(_Fields field) {
13429
      switch (field) {
13430
      case SUCCESS:
13431
        return isSetSuccess();
13432
      case UCX:
13433
        return isSetUcx();
13434
      }
13435
      throw new IllegalStateException();
13436
    }
13437
 
13438
    public boolean isSet(int fieldID) {
13439
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13440
    }
13441
 
13442
    @Override
13443
    public boolean equals(Object that) {
13444
      if (that == null)
13445
        return false;
13446
      if (that instanceof forgotPassword_result)
13447
        return this.equals((forgotPassword_result)that);
13448
      return false;
13449
    }
13450
 
13451
    public boolean equals(forgotPassword_result that) {
13452
      if (that == null)
13453
        return false;
13454
 
13455
      boolean this_present_success = true;
13456
      boolean that_present_success = true;
13457
      if (this_present_success || that_present_success) {
13458
        if (!(this_present_success && that_present_success))
13459
          return false;
13460
        if (this.success != that.success)
13461
          return false;
13462
      }
13463
 
13464
      boolean this_present_ucx = true && this.isSetUcx();
13465
      boolean that_present_ucx = true && that.isSetUcx();
13466
      if (this_present_ucx || that_present_ucx) {
13467
        if (!(this_present_ucx && that_present_ucx))
13468
          return false;
13469
        if (!this.ucx.equals(that.ucx))
13470
          return false;
13471
      }
13472
 
13473
      return true;
13474
    }
13475
 
13476
    @Override
13477
    public int hashCode() {
13478
      return 0;
13479
    }
13480
 
13481
    public int compareTo(forgotPassword_result other) {
13482
      if (!getClass().equals(other.getClass())) {
13483
        return getClass().getName().compareTo(other.getClass().getName());
13484
      }
13485
 
13486
      int lastComparison = 0;
13487
      forgotPassword_result typedOther = (forgotPassword_result)other;
13488
 
13489
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13490
      if (lastComparison != 0) {
13491
        return lastComparison;
13492
      }
13493
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13494
      if (lastComparison != 0) {
13495
        return lastComparison;
13496
      }
13497
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13498
      if (lastComparison != 0) {
13499
        return lastComparison;
13500
      }
13501
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13502
      if (lastComparison != 0) {
13503
        return lastComparison;
13504
      }
13505
      return 0;
13506
    }
13507
 
13508
    public void read(TProtocol iprot) throws TException {
13509
      TField field;
13510
      iprot.readStructBegin();
13511
      while (true)
13512
      {
13513
        field = iprot.readFieldBegin();
13514
        if (field.type == TType.STOP) { 
13515
          break;
13516
        }
13517
        _Fields fieldId = _Fields.findByThriftId(field.id);
13518
        if (fieldId == null) {
13519
          TProtocolUtil.skip(iprot, field.type);
13520
        } else {
13521
          switch (fieldId) {
13522
            case SUCCESS:
13523
              if (field.type == TType.BOOL) {
13524
                this.success = iprot.readBool();
13525
                setSuccessIsSet(true);
13526
              } else { 
13527
                TProtocolUtil.skip(iprot, field.type);
13528
              }
13529
              break;
13530
            case UCX:
13531
              if (field.type == TType.STRUCT) {
13532
                this.ucx = new UserContextException();
13533
                this.ucx.read(iprot);
13534
              } else { 
13535
                TProtocolUtil.skip(iprot, field.type);
13536
              }
13537
              break;
13538
          }
13539
          iprot.readFieldEnd();
13540
        }
13541
      }
13542
      iprot.readStructEnd();
13543
      validate();
13544
    }
13545
 
13546
    public void write(TProtocol oprot) throws TException {
13547
      oprot.writeStructBegin(STRUCT_DESC);
13548
 
13549
      if (this.isSetSuccess()) {
13550
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13551
        oprot.writeBool(this.success);
13552
        oprot.writeFieldEnd();
13553
      } else if (this.isSetUcx()) {
13554
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13555
        this.ucx.write(oprot);
13556
        oprot.writeFieldEnd();
13557
      }
13558
      oprot.writeFieldStop();
13559
      oprot.writeStructEnd();
13560
    }
13561
 
13562
    @Override
13563
    public String toString() {
13564
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
13565
      boolean first = true;
13566
 
13567
      sb.append("success:");
13568
      sb.append(this.success);
13569
      first = false;
13570
      if (!first) sb.append(", ");
13571
      sb.append("ucx:");
13572
      if (this.ucx == null) {
13573
        sb.append("null");
13574
      } else {
13575
        sb.append(this.ucx);
13576
      }
13577
      first = false;
13578
      sb.append(")");
13579
      return sb.toString();
13580
    }
13581
 
13582
    public void validate() throws TException {
13583
      // check for required fields
13584
    }
13585
 
13586
  }
13587
 
593 rajveer 13588
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
13589
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
13590
 
13591
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
13592
 
13593
    private long userId;
13594
 
13595
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13596
    public enum _Fields implements TFieldIdEnum {
13597
      USER_ID((short)1, "userId");
13598
 
13599
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13600
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13601
 
13602
      static {
13603
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13604
          byId.put((int)field._thriftId, field);
13605
          byName.put(field.getFieldName(), field);
13606
        }
13607
      }
13608
 
13609
      /**
13610
       * Find the _Fields constant that matches fieldId, or null if its not found.
13611
       */
13612
      public static _Fields findByThriftId(int fieldId) {
13613
        return byId.get(fieldId);
13614
      }
13615
 
13616
      /**
13617
       * Find the _Fields constant that matches fieldId, throwing an exception
13618
       * if it is not found.
13619
       */
13620
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13621
        _Fields fields = findByThriftId(fieldId);
13622
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13623
        return fields;
13624
      }
13625
 
13626
      /**
13627
       * Find the _Fields constant that matches name, or null if its not found.
13628
       */
13629
      public static _Fields findByName(String name) {
13630
        return byName.get(name);
13631
      }
13632
 
13633
      private final short _thriftId;
13634
      private final String _fieldName;
13635
 
13636
      _Fields(short thriftId, String fieldName) {
13637
        _thriftId = thriftId;
13638
        _fieldName = fieldName;
13639
      }
13640
 
13641
      public short getThriftFieldId() {
13642
        return _thriftId;
13643
      }
13644
 
13645
      public String getFieldName() {
13646
        return _fieldName;
13647
      }
13648
    }
13649
 
13650
    // isset id assignments
13651
    private static final int __USERID_ISSET_ID = 0;
13652
    private BitSet __isset_bit_vector = new BitSet(1);
13653
 
13654
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13655
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
13656
          new FieldValueMetaData(TType.I64)));
13657
    }});
13658
 
13659
    static {
13660
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
13661
    }
13662
 
13663
    public getAllAddressesForUser_args() {
13664
    }
13665
 
13666
    public getAllAddressesForUser_args(
13667
      long userId)
13668
    {
13669
      this();
13670
      this.userId = userId;
13671
      setUserIdIsSet(true);
13672
    }
13673
 
13674
    /**
13675
     * Performs a deep copy on <i>other</i>.
13676
     */
13677
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
13678
      __isset_bit_vector.clear();
13679
      __isset_bit_vector.or(other.__isset_bit_vector);
13680
      this.userId = other.userId;
13681
    }
13682
 
13683
    public getAllAddressesForUser_args deepCopy() {
13684
      return new getAllAddressesForUser_args(this);
13685
    }
13686
 
13687
    @Deprecated
13688
    public getAllAddressesForUser_args clone() {
13689
      return new getAllAddressesForUser_args(this);
13690
    }
13691
 
13692
    public long getUserId() {
13693
      return this.userId;
13694
    }
13695
 
13696
    public getAllAddressesForUser_args setUserId(long userId) {
13697
      this.userId = userId;
13698
      setUserIdIsSet(true);
13699
      return this;
13700
    }
13701
 
13702
    public void unsetUserId() {
13703
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13704
    }
13705
 
13706
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13707
    public boolean isSetUserId() {
13708
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13709
    }
13710
 
13711
    public void setUserIdIsSet(boolean value) {
13712
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13713
    }
13714
 
13715
    public void setFieldValue(_Fields field, Object value) {
13716
      switch (field) {
13717
      case USER_ID:
13718
        if (value == null) {
13719
          unsetUserId();
13720
        } else {
13721
          setUserId((Long)value);
13722
        }
13723
        break;
13724
 
13725
      }
13726
    }
13727
 
13728
    public void setFieldValue(int fieldID, Object value) {
13729
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13730
    }
13731
 
13732
    public Object getFieldValue(_Fields field) {
13733
      switch (field) {
13734
      case USER_ID:
13735
        return new Long(getUserId());
13736
 
13737
      }
13738
      throw new IllegalStateException();
13739
    }
13740
 
13741
    public Object getFieldValue(int fieldId) {
13742
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13743
    }
13744
 
13745
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13746
    public boolean isSet(_Fields field) {
13747
      switch (field) {
13748
      case USER_ID:
13749
        return isSetUserId();
13750
      }
13751
      throw new IllegalStateException();
13752
    }
13753
 
13754
    public boolean isSet(int fieldID) {
13755
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13756
    }
13757
 
13758
    @Override
13759
    public boolean equals(Object that) {
13760
      if (that == null)
13761
        return false;
13762
      if (that instanceof getAllAddressesForUser_args)
13763
        return this.equals((getAllAddressesForUser_args)that);
13764
      return false;
13765
    }
13766
 
13767
    public boolean equals(getAllAddressesForUser_args that) {
13768
      if (that == null)
13769
        return false;
13770
 
13771
      boolean this_present_userId = true;
13772
      boolean that_present_userId = true;
13773
      if (this_present_userId || that_present_userId) {
13774
        if (!(this_present_userId && that_present_userId))
13775
          return false;
13776
        if (this.userId != that.userId)
13777
          return false;
13778
      }
13779
 
13780
      return true;
13781
    }
13782
 
13783
    @Override
13784
    public int hashCode() {
13785
      return 0;
13786
    }
13787
 
13788
    public int compareTo(getAllAddressesForUser_args other) {
13789
      if (!getClass().equals(other.getClass())) {
13790
        return getClass().getName().compareTo(other.getClass().getName());
13791
      }
13792
 
13793
      int lastComparison = 0;
13794
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
13795
 
13796
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
13797
      if (lastComparison != 0) {
13798
        return lastComparison;
13799
      }
13800
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
13801
      if (lastComparison != 0) {
13802
        return lastComparison;
13803
      }
13804
      return 0;
13805
    }
13806
 
13807
    public void read(TProtocol iprot) throws TException {
13808
      TField field;
13809
      iprot.readStructBegin();
13810
      while (true)
13811
      {
13812
        field = iprot.readFieldBegin();
13813
        if (field.type == TType.STOP) { 
13814
          break;
13815
        }
13816
        _Fields fieldId = _Fields.findByThriftId(field.id);
13817
        if (fieldId == null) {
13818
          TProtocolUtil.skip(iprot, field.type);
13819
        } else {
13820
          switch (fieldId) {
13821
            case USER_ID:
13822
              if (field.type == TType.I64) {
13823
                this.userId = iprot.readI64();
13824
                setUserIdIsSet(true);
13825
              } else { 
13826
                TProtocolUtil.skip(iprot, field.type);
13827
              }
13828
              break;
13829
          }
13830
          iprot.readFieldEnd();
13831
        }
13832
      }
13833
      iprot.readStructEnd();
13834
      validate();
13835
    }
13836
 
13837
    public void write(TProtocol oprot) throws TException {
13838
      validate();
13839
 
13840
      oprot.writeStructBegin(STRUCT_DESC);
13841
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
13842
      oprot.writeI64(this.userId);
13843
      oprot.writeFieldEnd();
13844
      oprot.writeFieldStop();
13845
      oprot.writeStructEnd();
13846
    }
13847
 
13848
    @Override
13849
    public String toString() {
13850
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
13851
      boolean first = true;
13852
 
13853
      sb.append("userId:");
13854
      sb.append(this.userId);
13855
      first = false;
13856
      sb.append(")");
13857
      return sb.toString();
13858
    }
13859
 
13860
    public void validate() throws TException {
13861
      // check for required fields
13862
    }
13863
 
13864
  }
13865
 
13866
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
13867
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
13868
 
13869
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
13870
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13871
 
13872
    private List<Address> success;
13873
    private UserContextException ucx;
13874
 
13875
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13876
    public enum _Fields implements TFieldIdEnum {
13877
      SUCCESS((short)0, "success"),
13878
      UCX((short)1, "ucx");
13879
 
13880
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13881
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13882
 
13883
      static {
13884
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13885
          byId.put((int)field._thriftId, field);
13886
          byName.put(field.getFieldName(), field);
13887
        }
13888
      }
13889
 
13890
      /**
13891
       * Find the _Fields constant that matches fieldId, or null if its not found.
13892
       */
13893
      public static _Fields findByThriftId(int fieldId) {
13894
        return byId.get(fieldId);
13895
      }
13896
 
13897
      /**
13898
       * Find the _Fields constant that matches fieldId, throwing an exception
13899
       * if it is not found.
13900
       */
13901
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13902
        _Fields fields = findByThriftId(fieldId);
13903
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13904
        return fields;
13905
      }
13906
 
13907
      /**
13908
       * Find the _Fields constant that matches name, or null if its not found.
13909
       */
13910
      public static _Fields findByName(String name) {
13911
        return byName.get(name);
13912
      }
13913
 
13914
      private final short _thriftId;
13915
      private final String _fieldName;
13916
 
13917
      _Fields(short thriftId, String fieldName) {
13918
        _thriftId = thriftId;
13919
        _fieldName = fieldName;
13920
      }
13921
 
13922
      public short getThriftFieldId() {
13923
        return _thriftId;
13924
      }
13925
 
13926
      public String getFieldName() {
13927
        return _fieldName;
13928
      }
13929
    }
13930
 
13931
    // isset id assignments
13932
 
13933
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13934
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13935
          new ListMetaData(TType.LIST, 
13936
              new StructMetaData(TType.STRUCT, Address.class))));
13937
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13938
          new FieldValueMetaData(TType.STRUCT)));
13939
    }});
13940
 
13941
    static {
13942
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
13943
    }
13944
 
13945
    public getAllAddressesForUser_result() {
13946
    }
13947
 
13948
    public getAllAddressesForUser_result(
13949
      List<Address> success,
13950
      UserContextException ucx)
13951
    {
13952
      this();
13953
      this.success = success;
13954
      this.ucx = ucx;
13955
    }
13956
 
13957
    /**
13958
     * Performs a deep copy on <i>other</i>.
13959
     */
13960
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
13961
      if (other.isSetSuccess()) {
13962
        List<Address> __this__success = new ArrayList<Address>();
13963
        for (Address other_element : other.success) {
13964
          __this__success.add(new Address(other_element));
13965
        }
13966
        this.success = __this__success;
13967
      }
13968
      if (other.isSetUcx()) {
13969
        this.ucx = new UserContextException(other.ucx);
13970
      }
13971
    }
13972
 
13973
    public getAllAddressesForUser_result deepCopy() {
13974
      return new getAllAddressesForUser_result(this);
13975
    }
13976
 
13977
    @Deprecated
13978
    public getAllAddressesForUser_result clone() {
13979
      return new getAllAddressesForUser_result(this);
13980
    }
13981
 
13982
    public int getSuccessSize() {
13983
      return (this.success == null) ? 0 : this.success.size();
13984
    }
13985
 
13986
    public java.util.Iterator<Address> getSuccessIterator() {
13987
      return (this.success == null) ? null : this.success.iterator();
13988
    }
13989
 
13990
    public void addToSuccess(Address elem) {
13991
      if (this.success == null) {
13992
        this.success = new ArrayList<Address>();
13993
      }
13994
      this.success.add(elem);
13995
    }
13996
 
13997
    public List<Address> getSuccess() {
13998
      return this.success;
13999
    }
14000
 
14001
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
14002
      this.success = success;
14003
      return this;
14004
    }
14005
 
14006
    public void unsetSuccess() {
14007
      this.success = null;
14008
    }
14009
 
14010
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14011
    public boolean isSetSuccess() {
14012
      return this.success != null;
14013
    }
14014
 
14015
    public void setSuccessIsSet(boolean value) {
14016
      if (!value) {
14017
        this.success = null;
14018
      }
14019
    }
14020
 
14021
    public UserContextException getUcx() {
14022
      return this.ucx;
14023
    }
14024
 
14025
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
14026
      this.ucx = ucx;
14027
      return this;
14028
    }
14029
 
14030
    public void unsetUcx() {
14031
      this.ucx = null;
14032
    }
14033
 
14034
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14035
    public boolean isSetUcx() {
14036
      return this.ucx != null;
14037
    }
14038
 
14039
    public void setUcxIsSet(boolean value) {
14040
      if (!value) {
14041
        this.ucx = null;
14042
      }
14043
    }
14044
 
14045
    public void setFieldValue(_Fields field, Object value) {
14046
      switch (field) {
14047
      case SUCCESS:
14048
        if (value == null) {
14049
          unsetSuccess();
14050
        } else {
14051
          setSuccess((List<Address>)value);
14052
        }
14053
        break;
14054
 
14055
      case UCX:
14056
        if (value == null) {
14057
          unsetUcx();
14058
        } else {
14059
          setUcx((UserContextException)value);
14060
        }
14061
        break;
14062
 
14063
      }
14064
    }
14065
 
14066
    public void setFieldValue(int fieldID, Object value) {
14067
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14068
    }
14069
 
14070
    public Object getFieldValue(_Fields field) {
14071
      switch (field) {
14072
      case SUCCESS:
14073
        return getSuccess();
14074
 
14075
      case UCX:
14076
        return getUcx();
14077
 
14078
      }
14079
      throw new IllegalStateException();
14080
    }
14081
 
14082
    public Object getFieldValue(int fieldId) {
14083
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14084
    }
14085
 
14086
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14087
    public boolean isSet(_Fields field) {
14088
      switch (field) {
14089
      case SUCCESS:
14090
        return isSetSuccess();
14091
      case UCX:
14092
        return isSetUcx();
14093
      }
14094
      throw new IllegalStateException();
14095
    }
14096
 
14097
    public boolean isSet(int fieldID) {
14098
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14099
    }
14100
 
14101
    @Override
14102
    public boolean equals(Object that) {
14103
      if (that == null)
14104
        return false;
14105
      if (that instanceof getAllAddressesForUser_result)
14106
        return this.equals((getAllAddressesForUser_result)that);
14107
      return false;
14108
    }
14109
 
14110
    public boolean equals(getAllAddressesForUser_result that) {
14111
      if (that == null)
14112
        return false;
14113
 
14114
      boolean this_present_success = true && this.isSetSuccess();
14115
      boolean that_present_success = true && that.isSetSuccess();
14116
      if (this_present_success || that_present_success) {
14117
        if (!(this_present_success && that_present_success))
14118
          return false;
14119
        if (!this.success.equals(that.success))
14120
          return false;
14121
      }
14122
 
14123
      boolean this_present_ucx = true && this.isSetUcx();
14124
      boolean that_present_ucx = true && that.isSetUcx();
14125
      if (this_present_ucx || that_present_ucx) {
14126
        if (!(this_present_ucx && that_present_ucx))
14127
          return false;
14128
        if (!this.ucx.equals(that.ucx))
14129
          return false;
14130
      }
14131
 
14132
      return true;
14133
    }
14134
 
14135
    @Override
14136
    public int hashCode() {
14137
      return 0;
14138
    }
14139
 
14140
    public int compareTo(getAllAddressesForUser_result other) {
14141
      if (!getClass().equals(other.getClass())) {
14142
        return getClass().getName().compareTo(other.getClass().getName());
14143
      }
14144
 
14145
      int lastComparison = 0;
14146
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
14147
 
14148
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14149
      if (lastComparison != 0) {
14150
        return lastComparison;
14151
      }
14152
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14153
      if (lastComparison != 0) {
14154
        return lastComparison;
14155
      }
14156
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14157
      if (lastComparison != 0) {
14158
        return lastComparison;
14159
      }
14160
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14161
      if (lastComparison != 0) {
14162
        return lastComparison;
14163
      }
14164
      return 0;
14165
    }
14166
 
14167
    public void read(TProtocol iprot) throws TException {
14168
      TField field;
14169
      iprot.readStructBegin();
14170
      while (true)
14171
      {
14172
        field = iprot.readFieldBegin();
14173
        if (field.type == TType.STOP) { 
14174
          break;
14175
        }
14176
        _Fields fieldId = _Fields.findByThriftId(field.id);
14177
        if (fieldId == null) {
14178
          TProtocolUtil.skip(iprot, field.type);
14179
        } else {
14180
          switch (fieldId) {
14181
            case SUCCESS:
14182
              if (field.type == TType.LIST) {
14183
                {
771 rajveer 14184
                  TList _list16 = iprot.readListBegin();
14185
                  this.success = new ArrayList<Address>(_list16.size);
14186
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
593 rajveer 14187
                  {
771 rajveer 14188
                    Address _elem18;
14189
                    _elem18 = new Address();
14190
                    _elem18.read(iprot);
14191
                    this.success.add(_elem18);
593 rajveer 14192
                  }
14193
                  iprot.readListEnd();
14194
                }
14195
              } else { 
14196
                TProtocolUtil.skip(iprot, field.type);
14197
              }
14198
              break;
14199
            case UCX:
14200
              if (field.type == TType.STRUCT) {
14201
                this.ucx = new UserContextException();
14202
                this.ucx.read(iprot);
14203
              } else { 
14204
                TProtocolUtil.skip(iprot, field.type);
14205
              }
14206
              break;
14207
          }
14208
          iprot.readFieldEnd();
14209
        }
14210
      }
14211
      iprot.readStructEnd();
14212
      validate();
14213
    }
14214
 
14215
    public void write(TProtocol oprot) throws TException {
14216
      oprot.writeStructBegin(STRUCT_DESC);
14217
 
14218
      if (this.isSetSuccess()) {
14219
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14220
        {
14221
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 14222
          for (Address _iter19 : this.success)
593 rajveer 14223
          {
771 rajveer 14224
            _iter19.write(oprot);
593 rajveer 14225
          }
14226
          oprot.writeListEnd();
14227
        }
14228
        oprot.writeFieldEnd();
14229
      } else if (this.isSetUcx()) {
14230
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14231
        this.ucx.write(oprot);
14232
        oprot.writeFieldEnd();
14233
      }
14234
      oprot.writeFieldStop();
14235
      oprot.writeStructEnd();
14236
    }
14237
 
14238
    @Override
14239
    public String toString() {
14240
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
14241
      boolean first = true;
14242
 
14243
      sb.append("success:");
14244
      if (this.success == null) {
14245
        sb.append("null");
14246
      } else {
14247
        sb.append(this.success);
14248
      }
14249
      first = false;
14250
      if (!first) sb.append(", ");
14251
      sb.append("ucx:");
14252
      if (this.ucx == null) {
14253
        sb.append("null");
14254
      } else {
14255
        sb.append(this.ucx);
14256
      }
14257
      first = false;
14258
      sb.append(")");
14259
      return sb.toString();
14260
    }
14261
 
14262
    public void validate() throws TException {
14263
      // check for required fields
14264
    }
14265
 
14266
  }
14267
 
14268
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
14269
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
14270
 
14271
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14272
 
14273
    private long userId;
14274
 
14275
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14276
    public enum _Fields implements TFieldIdEnum {
14277
      USER_ID((short)1, "userId");
14278
 
14279
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14280
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14281
 
14282
      static {
14283
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14284
          byId.put((int)field._thriftId, field);
14285
          byName.put(field.getFieldName(), field);
14286
        }
14287
      }
14288
 
14289
      /**
14290
       * Find the _Fields constant that matches fieldId, or null if its not found.
14291
       */
14292
      public static _Fields findByThriftId(int fieldId) {
14293
        return byId.get(fieldId);
14294
      }
14295
 
14296
      /**
14297
       * Find the _Fields constant that matches fieldId, throwing an exception
14298
       * if it is not found.
14299
       */
14300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14301
        _Fields fields = findByThriftId(fieldId);
14302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14303
        return fields;
14304
      }
14305
 
14306
      /**
14307
       * Find the _Fields constant that matches name, or null if its not found.
14308
       */
14309
      public static _Fields findByName(String name) {
14310
        return byName.get(name);
14311
      }
14312
 
14313
      private final short _thriftId;
14314
      private final String _fieldName;
14315
 
14316
      _Fields(short thriftId, String fieldName) {
14317
        _thriftId = thriftId;
14318
        _fieldName = fieldName;
14319
      }
14320
 
14321
      public short getThriftFieldId() {
14322
        return _thriftId;
14323
      }
14324
 
14325
      public String getFieldName() {
14326
        return _fieldName;
14327
      }
14328
    }
14329
 
14330
    // isset id assignments
14331
    private static final int __USERID_ISSET_ID = 0;
14332
    private BitSet __isset_bit_vector = new BitSet(1);
14333
 
14334
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14335
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14336
          new FieldValueMetaData(TType.I64)));
14337
    }});
14338
 
14339
    static {
14340
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
14341
    }
14342
 
14343
    public getDefaultAddressId_args() {
14344
    }
14345
 
14346
    public getDefaultAddressId_args(
14347
      long userId)
14348
    {
14349
      this();
14350
      this.userId = userId;
14351
      setUserIdIsSet(true);
14352
    }
14353
 
14354
    /**
14355
     * Performs a deep copy on <i>other</i>.
14356
     */
14357
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
14358
      __isset_bit_vector.clear();
14359
      __isset_bit_vector.or(other.__isset_bit_vector);
14360
      this.userId = other.userId;
14361
    }
14362
 
14363
    public getDefaultAddressId_args deepCopy() {
14364
      return new getDefaultAddressId_args(this);
14365
    }
14366
 
14367
    @Deprecated
14368
    public getDefaultAddressId_args clone() {
14369
      return new getDefaultAddressId_args(this);
14370
    }
14371
 
14372
    public long getUserId() {
14373
      return this.userId;
14374
    }
14375
 
14376
    public getDefaultAddressId_args setUserId(long userId) {
14377
      this.userId = userId;
14378
      setUserIdIsSet(true);
14379
      return this;
14380
    }
14381
 
14382
    public void unsetUserId() {
14383
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14384
    }
14385
 
14386
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14387
    public boolean isSetUserId() {
14388
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14389
    }
14390
 
14391
    public void setUserIdIsSet(boolean value) {
14392
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14393
    }
14394
 
14395
    public void setFieldValue(_Fields field, Object value) {
14396
      switch (field) {
14397
      case USER_ID:
14398
        if (value == null) {
14399
          unsetUserId();
14400
        } else {
14401
          setUserId((Long)value);
14402
        }
14403
        break;
14404
 
14405
      }
14406
    }
14407
 
14408
    public void setFieldValue(int fieldID, Object value) {
14409
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14410
    }
14411
 
14412
    public Object getFieldValue(_Fields field) {
14413
      switch (field) {
14414
      case USER_ID:
14415
        return new Long(getUserId());
14416
 
14417
      }
14418
      throw new IllegalStateException();
14419
    }
14420
 
14421
    public Object getFieldValue(int fieldId) {
14422
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14423
    }
14424
 
14425
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14426
    public boolean isSet(_Fields field) {
14427
      switch (field) {
14428
      case USER_ID:
14429
        return isSetUserId();
14430
      }
14431
      throw new IllegalStateException();
14432
    }
14433
 
14434
    public boolean isSet(int fieldID) {
14435
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14436
    }
14437
 
14438
    @Override
14439
    public boolean equals(Object that) {
14440
      if (that == null)
14441
        return false;
14442
      if (that instanceof getDefaultAddressId_args)
14443
        return this.equals((getDefaultAddressId_args)that);
14444
      return false;
14445
    }
14446
 
14447
    public boolean equals(getDefaultAddressId_args that) {
14448
      if (that == null)
14449
        return false;
14450
 
14451
      boolean this_present_userId = true;
14452
      boolean that_present_userId = true;
14453
      if (this_present_userId || that_present_userId) {
14454
        if (!(this_present_userId && that_present_userId))
14455
          return false;
14456
        if (this.userId != that.userId)
14457
          return false;
14458
      }
14459
 
14460
      return true;
14461
    }
14462
 
14463
    @Override
14464
    public int hashCode() {
14465
      return 0;
14466
    }
14467
 
14468
    public int compareTo(getDefaultAddressId_args other) {
14469
      if (!getClass().equals(other.getClass())) {
14470
        return getClass().getName().compareTo(other.getClass().getName());
14471
      }
14472
 
14473
      int lastComparison = 0;
14474
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
14475
 
14476
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14477
      if (lastComparison != 0) {
14478
        return lastComparison;
14479
      }
14480
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14481
      if (lastComparison != 0) {
14482
        return lastComparison;
14483
      }
14484
      return 0;
14485
    }
14486
 
14487
    public void read(TProtocol iprot) throws TException {
14488
      TField field;
14489
      iprot.readStructBegin();
14490
      while (true)
14491
      {
14492
        field = iprot.readFieldBegin();
14493
        if (field.type == TType.STOP) { 
14494
          break;
14495
        }
14496
        _Fields fieldId = _Fields.findByThriftId(field.id);
14497
        if (fieldId == null) {
14498
          TProtocolUtil.skip(iprot, field.type);
14499
        } else {
14500
          switch (fieldId) {
14501
            case USER_ID:
14502
              if (field.type == TType.I64) {
14503
                this.userId = iprot.readI64();
14504
                setUserIdIsSet(true);
14505
              } else { 
14506
                TProtocolUtil.skip(iprot, field.type);
14507
              }
14508
              break;
14509
          }
14510
          iprot.readFieldEnd();
14511
        }
14512
      }
14513
      iprot.readStructEnd();
14514
      validate();
14515
    }
14516
 
14517
    public void write(TProtocol oprot) throws TException {
14518
      validate();
14519
 
14520
      oprot.writeStructBegin(STRUCT_DESC);
14521
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14522
      oprot.writeI64(this.userId);
14523
      oprot.writeFieldEnd();
14524
      oprot.writeFieldStop();
14525
      oprot.writeStructEnd();
14526
    }
14527
 
14528
    @Override
14529
    public String toString() {
14530
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
14531
      boolean first = true;
14532
 
14533
      sb.append("userId:");
14534
      sb.append(this.userId);
14535
      first = false;
14536
      sb.append(")");
14537
      return sb.toString();
14538
    }
14539
 
14540
    public void validate() throws TException {
14541
      // check for required fields
14542
    }
14543
 
14544
  }
14545
 
14546
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
14547
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
14548
 
14549
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
14550
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14551
 
14552
    private long success;
14553
    private UserContextException ucx;
14554
 
14555
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14556
    public enum _Fields implements TFieldIdEnum {
14557
      SUCCESS((short)0, "success"),
14558
      UCX((short)1, "ucx");
14559
 
14560
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14561
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14562
 
14563
      static {
14564
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14565
          byId.put((int)field._thriftId, field);
14566
          byName.put(field.getFieldName(), field);
14567
        }
14568
      }
14569
 
14570
      /**
14571
       * Find the _Fields constant that matches fieldId, or null if its not found.
14572
       */
14573
      public static _Fields findByThriftId(int fieldId) {
14574
        return byId.get(fieldId);
14575
      }
14576
 
14577
      /**
14578
       * Find the _Fields constant that matches fieldId, throwing an exception
14579
       * if it is not found.
14580
       */
14581
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14582
        _Fields fields = findByThriftId(fieldId);
14583
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14584
        return fields;
14585
      }
14586
 
14587
      /**
14588
       * Find the _Fields constant that matches name, or null if its not found.
14589
       */
14590
      public static _Fields findByName(String name) {
14591
        return byName.get(name);
14592
      }
14593
 
14594
      private final short _thriftId;
14595
      private final String _fieldName;
14596
 
14597
      _Fields(short thriftId, String fieldName) {
14598
        _thriftId = thriftId;
14599
        _fieldName = fieldName;
14600
      }
14601
 
14602
      public short getThriftFieldId() {
14603
        return _thriftId;
14604
      }
14605
 
14606
      public String getFieldName() {
14607
        return _fieldName;
14608
      }
14609
    }
14610
 
14611
    // isset id assignments
14612
    private static final int __SUCCESS_ISSET_ID = 0;
14613
    private BitSet __isset_bit_vector = new BitSet(1);
14614
 
14615
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14616
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14617
          new FieldValueMetaData(TType.I64)));
14618
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14619
          new FieldValueMetaData(TType.STRUCT)));
14620
    }});
14621
 
14622
    static {
14623
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
14624
    }
14625
 
14626
    public getDefaultAddressId_result() {
14627
    }
14628
 
14629
    public getDefaultAddressId_result(
14630
      long success,
14631
      UserContextException ucx)
14632
    {
14633
      this();
14634
      this.success = success;
14635
      setSuccessIsSet(true);
14636
      this.ucx = ucx;
14637
    }
14638
 
14639
    /**
14640
     * Performs a deep copy on <i>other</i>.
14641
     */
14642
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
14643
      __isset_bit_vector.clear();
14644
      __isset_bit_vector.or(other.__isset_bit_vector);
14645
      this.success = other.success;
14646
      if (other.isSetUcx()) {
14647
        this.ucx = new UserContextException(other.ucx);
14648
      }
14649
    }
14650
 
14651
    public getDefaultAddressId_result deepCopy() {
14652
      return new getDefaultAddressId_result(this);
14653
    }
14654
 
14655
    @Deprecated
14656
    public getDefaultAddressId_result clone() {
14657
      return new getDefaultAddressId_result(this);
14658
    }
14659
 
14660
    public long getSuccess() {
14661
      return this.success;
14662
    }
14663
 
14664
    public getDefaultAddressId_result setSuccess(long success) {
14665
      this.success = success;
14666
      setSuccessIsSet(true);
14667
      return this;
14668
    }
14669
 
14670
    public void unsetSuccess() {
14671
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14672
    }
14673
 
14674
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14675
    public boolean isSetSuccess() {
14676
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14677
    }
14678
 
14679
    public void setSuccessIsSet(boolean value) {
14680
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14681
    }
14682
 
14683
    public UserContextException getUcx() {
14684
      return this.ucx;
14685
    }
14686
 
14687
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
14688
      this.ucx = ucx;
14689
      return this;
14690
    }
14691
 
14692
    public void unsetUcx() {
14693
      this.ucx = null;
14694
    }
14695
 
14696
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14697
    public boolean isSetUcx() {
14698
      return this.ucx != null;
14699
    }
14700
 
14701
    public void setUcxIsSet(boolean value) {
14702
      if (!value) {
14703
        this.ucx = null;
14704
      }
14705
    }
14706
 
14707
    public void setFieldValue(_Fields field, Object value) {
14708
      switch (field) {
14709
      case SUCCESS:
14710
        if (value == null) {
14711
          unsetSuccess();
14712
        } else {
14713
          setSuccess((Long)value);
14714
        }
14715
        break;
14716
 
14717
      case UCX:
14718
        if (value == null) {
14719
          unsetUcx();
14720
        } else {
14721
          setUcx((UserContextException)value);
14722
        }
14723
        break;
14724
 
14725
      }
14726
    }
14727
 
14728
    public void setFieldValue(int fieldID, Object value) {
14729
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14730
    }
14731
 
14732
    public Object getFieldValue(_Fields field) {
14733
      switch (field) {
14734
      case SUCCESS:
14735
        return new Long(getSuccess());
14736
 
14737
      case UCX:
14738
        return getUcx();
14739
 
14740
      }
14741
      throw new IllegalStateException();
14742
    }
14743
 
14744
    public Object getFieldValue(int fieldId) {
14745
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14746
    }
14747
 
14748
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14749
    public boolean isSet(_Fields field) {
14750
      switch (field) {
14751
      case SUCCESS:
14752
        return isSetSuccess();
14753
      case UCX:
14754
        return isSetUcx();
14755
      }
14756
      throw new IllegalStateException();
14757
    }
14758
 
14759
    public boolean isSet(int fieldID) {
14760
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14761
    }
14762
 
14763
    @Override
14764
    public boolean equals(Object that) {
14765
      if (that == null)
14766
        return false;
14767
      if (that instanceof getDefaultAddressId_result)
14768
        return this.equals((getDefaultAddressId_result)that);
14769
      return false;
14770
    }
14771
 
14772
    public boolean equals(getDefaultAddressId_result that) {
14773
      if (that == null)
14774
        return false;
14775
 
14776
      boolean this_present_success = true;
14777
      boolean that_present_success = true;
14778
      if (this_present_success || that_present_success) {
14779
        if (!(this_present_success && that_present_success))
14780
          return false;
14781
        if (this.success != that.success)
14782
          return false;
14783
      }
14784
 
14785
      boolean this_present_ucx = true && this.isSetUcx();
14786
      boolean that_present_ucx = true && that.isSetUcx();
14787
      if (this_present_ucx || that_present_ucx) {
14788
        if (!(this_present_ucx && that_present_ucx))
14789
          return false;
14790
        if (!this.ucx.equals(that.ucx))
14791
          return false;
14792
      }
14793
 
14794
      return true;
14795
    }
14796
 
14797
    @Override
14798
    public int hashCode() {
14799
      return 0;
14800
    }
14801
 
14802
    public int compareTo(getDefaultAddressId_result other) {
14803
      if (!getClass().equals(other.getClass())) {
14804
        return getClass().getName().compareTo(other.getClass().getName());
14805
      }
14806
 
14807
      int lastComparison = 0;
14808
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
14809
 
14810
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14811
      if (lastComparison != 0) {
14812
        return lastComparison;
14813
      }
14814
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14815
      if (lastComparison != 0) {
14816
        return lastComparison;
14817
      }
14818
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14819
      if (lastComparison != 0) {
14820
        return lastComparison;
14821
      }
14822
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14823
      if (lastComparison != 0) {
14824
        return lastComparison;
14825
      }
14826
      return 0;
14827
    }
14828
 
14829
    public void read(TProtocol iprot) throws TException {
14830
      TField field;
14831
      iprot.readStructBegin();
14832
      while (true)
14833
      {
14834
        field = iprot.readFieldBegin();
14835
        if (field.type == TType.STOP) { 
14836
          break;
14837
        }
14838
        _Fields fieldId = _Fields.findByThriftId(field.id);
14839
        if (fieldId == null) {
14840
          TProtocolUtil.skip(iprot, field.type);
14841
        } else {
14842
          switch (fieldId) {
14843
            case SUCCESS:
14844
              if (field.type == TType.I64) {
14845
                this.success = iprot.readI64();
14846
                setSuccessIsSet(true);
14847
              } else { 
14848
                TProtocolUtil.skip(iprot, field.type);
14849
              }
14850
              break;
14851
            case UCX:
14852
              if (field.type == TType.STRUCT) {
14853
                this.ucx = new UserContextException();
14854
                this.ucx.read(iprot);
14855
              } else { 
14856
                TProtocolUtil.skip(iprot, field.type);
14857
              }
14858
              break;
14859
          }
14860
          iprot.readFieldEnd();
14861
        }
14862
      }
14863
      iprot.readStructEnd();
14864
      validate();
14865
    }
14866
 
14867
    public void write(TProtocol oprot) throws TException {
14868
      oprot.writeStructBegin(STRUCT_DESC);
14869
 
14870
      if (this.isSetSuccess()) {
14871
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14872
        oprot.writeI64(this.success);
14873
        oprot.writeFieldEnd();
14874
      } else if (this.isSetUcx()) {
14875
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14876
        this.ucx.write(oprot);
14877
        oprot.writeFieldEnd();
14878
      }
14879
      oprot.writeFieldStop();
14880
      oprot.writeStructEnd();
14881
    }
14882
 
14883
    @Override
14884
    public String toString() {
14885
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
14886
      boolean first = true;
14887
 
14888
      sb.append("success:");
14889
      sb.append(this.success);
14890
      first = false;
14891
      if (!first) sb.append(", ");
14892
      sb.append("ucx:");
14893
      if (this.ucx == null) {
14894
        sb.append("null");
14895
      } else {
14896
        sb.append(this.ucx);
14897
      }
14898
      first = false;
14899
      sb.append(")");
14900
      return sb.toString();
14901
    }
14902
 
14903
    public void validate() throws TException {
14904
      // check for required fields
14905
    }
14906
 
14907
  }
14908
 
553 chandransh 14909
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
14910
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 14911
 
553 chandransh 14912
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 14913
 
553 chandransh 14914
    private long userId;
48 ashish 14915
 
14916
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14917
    public enum _Fields implements TFieldIdEnum {
553 chandransh 14918
      USER_ID((short)1, "userId");
48 ashish 14919
 
14920
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14922
 
14923
      static {
14924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14925
          byId.put((int)field._thriftId, field);
14926
          byName.put(field.getFieldName(), field);
14927
        }
14928
      }
14929
 
14930
      /**
14931
       * Find the _Fields constant that matches fieldId, or null if its not found.
14932
       */
14933
      public static _Fields findByThriftId(int fieldId) {
14934
        return byId.get(fieldId);
14935
      }
14936
 
14937
      /**
14938
       * Find the _Fields constant that matches fieldId, throwing an exception
14939
       * if it is not found.
14940
       */
14941
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14942
        _Fields fields = findByThriftId(fieldId);
14943
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14944
        return fields;
14945
      }
14946
 
14947
      /**
14948
       * Find the _Fields constant that matches name, or null if its not found.
14949
       */
14950
      public static _Fields findByName(String name) {
14951
        return byName.get(name);
14952
      }
14953
 
14954
      private final short _thriftId;
14955
      private final String _fieldName;
14956
 
14957
      _Fields(short thriftId, String fieldName) {
14958
        _thriftId = thriftId;
14959
        _fieldName = fieldName;
14960
      }
14961
 
14962
      public short getThriftFieldId() {
14963
        return _thriftId;
14964
      }
14965
 
14966
      public String getFieldName() {
14967
        return _fieldName;
14968
      }
14969
    }
14970
 
14971
    // isset id assignments
14972
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 14973
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 14974
 
14975
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 14976
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 14977
          new FieldValueMetaData(TType.I64)));
14978
    }});
14979
 
14980
    static {
553 chandransh 14981
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 14982
    }
14983
 
553 chandransh 14984
    public createCart_args() {
48 ashish 14985
    }
14986
 
553 chandransh 14987
    public createCart_args(
14988
      long userId)
48 ashish 14989
    {
14990
      this();
553 chandransh 14991
      this.userId = userId;
14992
      setUserIdIsSet(true);
48 ashish 14993
    }
14994
 
14995
    /**
14996
     * Performs a deep copy on <i>other</i>.
14997
     */
553 chandransh 14998
    public createCart_args(createCart_args other) {
48 ashish 14999
      __isset_bit_vector.clear();
15000
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15001
      this.userId = other.userId;
48 ashish 15002
    }
15003
 
553 chandransh 15004
    public createCart_args deepCopy() {
15005
      return new createCart_args(this);
48 ashish 15006
    }
15007
 
15008
    @Deprecated
553 chandransh 15009
    public createCart_args clone() {
15010
      return new createCart_args(this);
48 ashish 15011
    }
15012
 
553 chandransh 15013
    public long getUserId() {
15014
      return this.userId;
48 ashish 15015
    }
15016
 
553 chandransh 15017
    public createCart_args setUserId(long userId) {
15018
      this.userId = userId;
15019
      setUserIdIsSet(true);
48 ashish 15020
      return this;
15021
    }
15022
 
553 chandransh 15023
    public void unsetUserId() {
48 ashish 15024
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15025
    }
15026
 
553 chandransh 15027
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15028
    public boolean isSetUserId() {
48 ashish 15029
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15030
    }
15031
 
553 chandransh 15032
    public void setUserIdIsSet(boolean value) {
48 ashish 15033
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15034
    }
15035
 
15036
    public void setFieldValue(_Fields field, Object value) {
15037
      switch (field) {
553 chandransh 15038
      case USER_ID:
48 ashish 15039
        if (value == null) {
553 chandransh 15040
          unsetUserId();
48 ashish 15041
        } else {
553 chandransh 15042
          setUserId((Long)value);
48 ashish 15043
        }
15044
        break;
15045
 
15046
      }
15047
    }
15048
 
15049
    public void setFieldValue(int fieldID, Object value) {
15050
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15051
    }
15052
 
15053
    public Object getFieldValue(_Fields field) {
15054
      switch (field) {
553 chandransh 15055
      case USER_ID:
15056
        return new Long(getUserId());
48 ashish 15057
 
15058
      }
15059
      throw new IllegalStateException();
15060
    }
15061
 
15062
    public Object getFieldValue(int fieldId) {
15063
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15064
    }
15065
 
15066
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15067
    public boolean isSet(_Fields field) {
15068
      switch (field) {
553 chandransh 15069
      case USER_ID:
15070
        return isSetUserId();
48 ashish 15071
      }
15072
      throw new IllegalStateException();
15073
    }
15074
 
15075
    public boolean isSet(int fieldID) {
15076
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15077
    }
15078
 
15079
    @Override
15080
    public boolean equals(Object that) {
15081
      if (that == null)
15082
        return false;
553 chandransh 15083
      if (that instanceof createCart_args)
15084
        return this.equals((createCart_args)that);
48 ashish 15085
      return false;
15086
    }
15087
 
553 chandransh 15088
    public boolean equals(createCart_args that) {
48 ashish 15089
      if (that == null)
15090
        return false;
15091
 
553 chandransh 15092
      boolean this_present_userId = true;
15093
      boolean that_present_userId = true;
15094
      if (this_present_userId || that_present_userId) {
15095
        if (!(this_present_userId && that_present_userId))
48 ashish 15096
          return false;
553 chandransh 15097
        if (this.userId != that.userId)
48 ashish 15098
          return false;
15099
      }
15100
 
15101
      return true;
15102
    }
15103
 
15104
    @Override
15105
    public int hashCode() {
15106
      return 0;
15107
    }
15108
 
553 chandransh 15109
    public int compareTo(createCart_args other) {
48 ashish 15110
      if (!getClass().equals(other.getClass())) {
15111
        return getClass().getName().compareTo(other.getClass().getName());
15112
      }
15113
 
15114
      int lastComparison = 0;
553 chandransh 15115
      createCart_args typedOther = (createCart_args)other;
48 ashish 15116
 
553 chandransh 15117
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 15118
      if (lastComparison != 0) {
15119
        return lastComparison;
15120
      }
553 chandransh 15121
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 15122
      if (lastComparison != 0) {
15123
        return lastComparison;
15124
      }
15125
      return 0;
15126
    }
15127
 
15128
    public void read(TProtocol iprot) throws TException {
15129
      TField field;
15130
      iprot.readStructBegin();
15131
      while (true)
15132
      {
15133
        field = iprot.readFieldBegin();
15134
        if (field.type == TType.STOP) { 
15135
          break;
15136
        }
15137
        _Fields fieldId = _Fields.findByThriftId(field.id);
15138
        if (fieldId == null) {
15139
          TProtocolUtil.skip(iprot, field.type);
15140
        } else {
15141
          switch (fieldId) {
553 chandransh 15142
            case USER_ID:
48 ashish 15143
              if (field.type == TType.I64) {
553 chandransh 15144
                this.userId = iprot.readI64();
15145
                setUserIdIsSet(true);
48 ashish 15146
              } else { 
15147
                TProtocolUtil.skip(iprot, field.type);
15148
              }
15149
              break;
15150
          }
15151
          iprot.readFieldEnd();
15152
        }
15153
      }
15154
      iprot.readStructEnd();
15155
      validate();
15156
    }
15157
 
15158
    public void write(TProtocol oprot) throws TException {
15159
      validate();
15160
 
15161
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 15162
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15163
      oprot.writeI64(this.userId);
48 ashish 15164
      oprot.writeFieldEnd();
15165
      oprot.writeFieldStop();
15166
      oprot.writeStructEnd();
15167
    }
15168
 
15169
    @Override
15170
    public String toString() {
553 chandransh 15171
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 15172
      boolean first = true;
15173
 
553 chandransh 15174
      sb.append("userId:");
15175
      sb.append(this.userId);
48 ashish 15176
      first = false;
15177
      sb.append(")");
15178
      return sb.toString();
15179
    }
15180
 
15181
    public void validate() throws TException {
15182
      // check for required fields
15183
    }
15184
 
15185
  }
15186
 
553 chandransh 15187
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
15188
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 15189
 
553 chandransh 15190
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15191
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 15192
 
553 chandransh 15193
    private long success;
15194
    private ShoppingCartException scx;
48 ashish 15195
 
15196
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15197
    public enum _Fields implements TFieldIdEnum {
15198
      SUCCESS((short)0, "success"),
553 chandransh 15199
      SCX((short)1, "scx");
48 ashish 15200
 
15201
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15202
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15203
 
15204
      static {
15205
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15206
          byId.put((int)field._thriftId, field);
15207
          byName.put(field.getFieldName(), field);
15208
        }
15209
      }
15210
 
15211
      /**
15212
       * Find the _Fields constant that matches fieldId, or null if its not found.
15213
       */
15214
      public static _Fields findByThriftId(int fieldId) {
15215
        return byId.get(fieldId);
15216
      }
15217
 
15218
      /**
15219
       * Find the _Fields constant that matches fieldId, throwing an exception
15220
       * if it is not found.
15221
       */
15222
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15223
        _Fields fields = findByThriftId(fieldId);
15224
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15225
        return fields;
15226
      }
15227
 
15228
      /**
15229
       * Find the _Fields constant that matches name, or null if its not found.
15230
       */
15231
      public static _Fields findByName(String name) {
15232
        return byName.get(name);
15233
      }
15234
 
15235
      private final short _thriftId;
15236
      private final String _fieldName;
15237
 
15238
      _Fields(short thriftId, String fieldName) {
15239
        _thriftId = thriftId;
15240
        _fieldName = fieldName;
15241
      }
15242
 
15243
      public short getThriftFieldId() {
15244
        return _thriftId;
15245
      }
15246
 
15247
      public String getFieldName() {
15248
        return _fieldName;
15249
      }
15250
    }
15251
 
15252
    // isset id assignments
15253
    private static final int __SUCCESS_ISSET_ID = 0;
15254
    private BitSet __isset_bit_vector = new BitSet(1);
15255
 
15256
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15257
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 15258
          new FieldValueMetaData(TType.I64)));
15259
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 15260
          new FieldValueMetaData(TType.STRUCT)));
15261
    }});
15262
 
15263
    static {
553 chandransh 15264
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 15265
    }
15266
 
553 chandransh 15267
    public createCart_result() {
48 ashish 15268
    }
15269
 
553 chandransh 15270
    public createCart_result(
15271
      long success,
15272
      ShoppingCartException scx)
48 ashish 15273
    {
15274
      this();
15275
      this.success = success;
15276
      setSuccessIsSet(true);
553 chandransh 15277
      this.scx = scx;
48 ashish 15278
    }
15279
 
15280
    /**
15281
     * Performs a deep copy on <i>other</i>.
15282
     */
553 chandransh 15283
    public createCart_result(createCart_result other) {
48 ashish 15284
      __isset_bit_vector.clear();
15285
      __isset_bit_vector.or(other.__isset_bit_vector);
15286
      this.success = other.success;
553 chandransh 15287
      if (other.isSetScx()) {
15288
        this.scx = new ShoppingCartException(other.scx);
48 ashish 15289
      }
15290
    }
15291
 
553 chandransh 15292
    public createCart_result deepCopy() {
15293
      return new createCart_result(this);
48 ashish 15294
    }
15295
 
15296
    @Deprecated
553 chandransh 15297
    public createCart_result clone() {
15298
      return new createCart_result(this);
48 ashish 15299
    }
15300
 
553 chandransh 15301
    public long getSuccess() {
48 ashish 15302
      return this.success;
15303
    }
15304
 
553 chandransh 15305
    public createCart_result setSuccess(long success) {
48 ashish 15306
      this.success = success;
15307
      setSuccessIsSet(true);
15308
      return this;
15309
    }
15310
 
15311
    public void unsetSuccess() {
15312
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15313
    }
15314
 
15315
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15316
    public boolean isSetSuccess() {
15317
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15318
    }
15319
 
15320
    public void setSuccessIsSet(boolean value) {
15321
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15322
    }
15323
 
553 chandransh 15324
    public ShoppingCartException getScx() {
15325
      return this.scx;
48 ashish 15326
    }
15327
 
553 chandransh 15328
    public createCart_result setScx(ShoppingCartException scx) {
15329
      this.scx = scx;
48 ashish 15330
      return this;
15331
    }
15332
 
553 chandransh 15333
    public void unsetScx() {
15334
      this.scx = null;
48 ashish 15335
    }
15336
 
553 chandransh 15337
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15338
    public boolean isSetScx() {
15339
      return this.scx != null;
48 ashish 15340
    }
15341
 
553 chandransh 15342
    public void setScxIsSet(boolean value) {
48 ashish 15343
      if (!value) {
553 chandransh 15344
        this.scx = null;
48 ashish 15345
      }
15346
    }
15347
 
15348
    public void setFieldValue(_Fields field, Object value) {
15349
      switch (field) {
15350
      case SUCCESS:
15351
        if (value == null) {
15352
          unsetSuccess();
15353
        } else {
553 chandransh 15354
          setSuccess((Long)value);
48 ashish 15355
        }
15356
        break;
15357
 
553 chandransh 15358
      case SCX:
48 ashish 15359
        if (value == null) {
553 chandransh 15360
          unsetScx();
48 ashish 15361
        } else {
553 chandransh 15362
          setScx((ShoppingCartException)value);
48 ashish 15363
        }
15364
        break;
15365
 
15366
      }
15367
    }
15368
 
15369
    public void setFieldValue(int fieldID, Object value) {
15370
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15371
    }
15372
 
15373
    public Object getFieldValue(_Fields field) {
15374
      switch (field) {
15375
      case SUCCESS:
553 chandransh 15376
        return new Long(getSuccess());
48 ashish 15377
 
553 chandransh 15378
      case SCX:
15379
        return getScx();
48 ashish 15380
 
15381
      }
15382
      throw new IllegalStateException();
15383
    }
15384
 
15385
    public Object getFieldValue(int fieldId) {
15386
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15387
    }
15388
 
15389
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15390
    public boolean isSet(_Fields field) {
15391
      switch (field) {
15392
      case SUCCESS:
15393
        return isSetSuccess();
553 chandransh 15394
      case SCX:
15395
        return isSetScx();
48 ashish 15396
      }
15397
      throw new IllegalStateException();
15398
    }
15399
 
15400
    public boolean isSet(int fieldID) {
15401
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15402
    }
15403
 
15404
    @Override
15405
    public boolean equals(Object that) {
15406
      if (that == null)
15407
        return false;
553 chandransh 15408
      if (that instanceof createCart_result)
15409
        return this.equals((createCart_result)that);
48 ashish 15410
      return false;
15411
    }
15412
 
553 chandransh 15413
    public boolean equals(createCart_result that) {
48 ashish 15414
      if (that == null)
15415
        return false;
15416
 
15417
      boolean this_present_success = true;
15418
      boolean that_present_success = true;
15419
      if (this_present_success || that_present_success) {
15420
        if (!(this_present_success && that_present_success))
15421
          return false;
15422
        if (this.success != that.success)
15423
          return false;
15424
      }
15425
 
553 chandransh 15426
      boolean this_present_scx = true && this.isSetScx();
15427
      boolean that_present_scx = true && that.isSetScx();
15428
      if (this_present_scx || that_present_scx) {
15429
        if (!(this_present_scx && that_present_scx))
48 ashish 15430
          return false;
553 chandransh 15431
        if (!this.scx.equals(that.scx))
48 ashish 15432
          return false;
15433
      }
15434
 
15435
      return true;
15436
    }
15437
 
15438
    @Override
15439
    public int hashCode() {
15440
      return 0;
15441
    }
15442
 
553 chandransh 15443
    public int compareTo(createCart_result other) {
48 ashish 15444
      if (!getClass().equals(other.getClass())) {
15445
        return getClass().getName().compareTo(other.getClass().getName());
15446
      }
15447
 
15448
      int lastComparison = 0;
553 chandransh 15449
      createCart_result typedOther = (createCart_result)other;
48 ashish 15450
 
15451
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15452
      if (lastComparison != 0) {
15453
        return lastComparison;
15454
      }
15455
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15456
      if (lastComparison != 0) {
15457
        return lastComparison;
15458
      }
553 chandransh 15459
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 15460
      if (lastComparison != 0) {
15461
        return lastComparison;
15462
      }
553 chandransh 15463
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 15464
      if (lastComparison != 0) {
15465
        return lastComparison;
15466
      }
15467
      return 0;
15468
    }
15469
 
15470
    public void read(TProtocol iprot) throws TException {
15471
      TField field;
15472
      iprot.readStructBegin();
15473
      while (true)
15474
      {
15475
        field = iprot.readFieldBegin();
15476
        if (field.type == TType.STOP) { 
15477
          break;
15478
        }
15479
        _Fields fieldId = _Fields.findByThriftId(field.id);
15480
        if (fieldId == null) {
15481
          TProtocolUtil.skip(iprot, field.type);
15482
        } else {
15483
          switch (fieldId) {
15484
            case SUCCESS:
553 chandransh 15485
              if (field.type == TType.I64) {
15486
                this.success = iprot.readI64();
48 ashish 15487
                setSuccessIsSet(true);
15488
              } else { 
15489
                TProtocolUtil.skip(iprot, field.type);
15490
              }
15491
              break;
553 chandransh 15492
            case SCX:
48 ashish 15493
              if (field.type == TType.STRUCT) {
553 chandransh 15494
                this.scx = new ShoppingCartException();
15495
                this.scx.read(iprot);
48 ashish 15496
              } else { 
15497
                TProtocolUtil.skip(iprot, field.type);
15498
              }
15499
              break;
15500
          }
15501
          iprot.readFieldEnd();
15502
        }
15503
      }
15504
      iprot.readStructEnd();
15505
      validate();
15506
    }
15507
 
15508
    public void write(TProtocol oprot) throws TException {
15509
      oprot.writeStructBegin(STRUCT_DESC);
15510
 
15511
      if (this.isSetSuccess()) {
15512
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 15513
        oprot.writeI64(this.success);
48 ashish 15514
        oprot.writeFieldEnd();
553 chandransh 15515
      } else if (this.isSetScx()) {
15516
        oprot.writeFieldBegin(SCX_FIELD_DESC);
15517
        this.scx.write(oprot);
48 ashish 15518
        oprot.writeFieldEnd();
15519
      }
15520
      oprot.writeFieldStop();
15521
      oprot.writeStructEnd();
15522
    }
15523
 
15524
    @Override
15525
    public String toString() {
553 chandransh 15526
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 15527
      boolean first = true;
15528
 
15529
      sb.append("success:");
15530
      sb.append(this.success);
15531
      first = false;
15532
      if (!first) sb.append(", ");
553 chandransh 15533
      sb.append("scx:");
15534
      if (this.scx == null) {
48 ashish 15535
        sb.append("null");
15536
      } else {
553 chandransh 15537
        sb.append(this.scx);
48 ashish 15538
      }
15539
      first = false;
15540
      sb.append(")");
15541
      return sb.toString();
15542
    }
15543
 
15544
    public void validate() throws TException {
15545
      // check for required fields
15546
    }
15547
 
15548
  }
15549
 
553 chandransh 15550
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
15551
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 15552
 
553 chandransh 15553
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 15554
 
553 chandransh 15555
    private long userId;
506 rajveer 15556
 
15557
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15558
    public enum _Fields implements TFieldIdEnum {
553 chandransh 15559
      USER_ID((short)1, "userId");
506 rajveer 15560
 
15561
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15562
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15563
 
15564
      static {
15565
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15566
          byId.put((int)field._thriftId, field);
15567
          byName.put(field.getFieldName(), field);
15568
        }
15569
      }
15570
 
15571
      /**
15572
       * Find the _Fields constant that matches fieldId, or null if its not found.
15573
       */
15574
      public static _Fields findByThriftId(int fieldId) {
15575
        return byId.get(fieldId);
15576
      }
15577
 
15578
      /**
15579
       * Find the _Fields constant that matches fieldId, throwing an exception
15580
       * if it is not found.
15581
       */
15582
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15583
        _Fields fields = findByThriftId(fieldId);
15584
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15585
        return fields;
15586
      }
15587
 
15588
      /**
15589
       * Find the _Fields constant that matches name, or null if its not found.
15590
       */
15591
      public static _Fields findByName(String name) {
15592
        return byName.get(name);
15593
      }
15594
 
15595
      private final short _thriftId;
15596
      private final String _fieldName;
15597
 
15598
      _Fields(short thriftId, String fieldName) {
15599
        _thriftId = thriftId;
15600
        _fieldName = fieldName;
15601
      }
15602
 
15603
      public short getThriftFieldId() {
15604
        return _thriftId;
15605
      }
15606
 
15607
      public String getFieldName() {
15608
        return _fieldName;
15609
      }
15610
    }
15611
 
15612
    // isset id assignments
15613
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 15614
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 15615
 
15616
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 15617
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 15618
          new FieldValueMetaData(TType.I64)));
15619
    }});
15620
 
15621
    static {
553 chandransh 15622
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 15623
    }
15624
 
553 chandransh 15625
    public getCurrentCart_args() {
506 rajveer 15626
    }
15627
 
553 chandransh 15628
    public getCurrentCart_args(
15629
      long userId)
506 rajveer 15630
    {
15631
      this();
553 chandransh 15632
      this.userId = userId;
15633
      setUserIdIsSet(true);
506 rajveer 15634
    }
15635
 
15636
    /**
15637
     * Performs a deep copy on <i>other</i>.
15638
     */
553 chandransh 15639
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 15640
      __isset_bit_vector.clear();
15641
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 15642
      this.userId = other.userId;
506 rajveer 15643
    }
15644
 
553 chandransh 15645
    public getCurrentCart_args deepCopy() {
15646
      return new getCurrentCart_args(this);
506 rajveer 15647
    }
15648
 
15649
    @Deprecated
553 chandransh 15650
    public getCurrentCart_args clone() {
15651
      return new getCurrentCart_args(this);
506 rajveer 15652
    }
15653
 
553 chandransh 15654
    public long getUserId() {
15655
      return this.userId;
506 rajveer 15656
    }
15657
 
553 chandransh 15658
    public getCurrentCart_args setUserId(long userId) {
15659
      this.userId = userId;
15660
      setUserIdIsSet(true);
506 rajveer 15661
      return this;
15662
    }
15663
 
553 chandransh 15664
    public void unsetUserId() {
506 rajveer 15665
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15666
    }
15667
 
553 chandransh 15668
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15669
    public boolean isSetUserId() {
506 rajveer 15670
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15671
    }
15672
 
553 chandransh 15673
    public void setUserIdIsSet(boolean value) {
506 rajveer 15674
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15675
    }
15676
 
553 chandransh 15677
    public void setFieldValue(_Fields field, Object value) {
15678
      switch (field) {
15679
      case USER_ID:
15680
        if (value == null) {
15681
          unsetUserId();
15682
        } else {
15683
          setUserId((Long)value);
15684
        }
15685
        break;
15686
 
15687
      }
506 rajveer 15688
    }
15689
 
553 chandransh 15690
    public void setFieldValue(int fieldID, Object value) {
15691
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15692
    }
15693
 
15694
    public Object getFieldValue(_Fields field) {
15695
      switch (field) {
15696
      case USER_ID:
15697
        return new Long(getUserId());
15698
 
15699
      }
15700
      throw new IllegalStateException();
15701
    }
15702
 
15703
    public Object getFieldValue(int fieldId) {
15704
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15705
    }
15706
 
15707
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15708
    public boolean isSet(_Fields field) {
15709
      switch (field) {
15710
      case USER_ID:
15711
        return isSetUserId();
15712
      }
15713
      throw new IllegalStateException();
15714
    }
15715
 
15716
    public boolean isSet(int fieldID) {
15717
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15718
    }
15719
 
15720
    @Override
15721
    public boolean equals(Object that) {
15722
      if (that == null)
15723
        return false;
15724
      if (that instanceof getCurrentCart_args)
15725
        return this.equals((getCurrentCart_args)that);
15726
      return false;
15727
    }
15728
 
15729
    public boolean equals(getCurrentCart_args that) {
15730
      if (that == null)
15731
        return false;
15732
 
15733
      boolean this_present_userId = true;
15734
      boolean that_present_userId = true;
15735
      if (this_present_userId || that_present_userId) {
15736
        if (!(this_present_userId && that_present_userId))
15737
          return false;
15738
        if (this.userId != that.userId)
15739
          return false;
15740
      }
15741
 
15742
      return true;
15743
    }
15744
 
15745
    @Override
15746
    public int hashCode() {
15747
      return 0;
15748
    }
15749
 
15750
    public int compareTo(getCurrentCart_args other) {
15751
      if (!getClass().equals(other.getClass())) {
15752
        return getClass().getName().compareTo(other.getClass().getName());
15753
      }
15754
 
15755
      int lastComparison = 0;
15756
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
15757
 
15758
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15759
      if (lastComparison != 0) {
15760
        return lastComparison;
15761
      }
15762
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15763
      if (lastComparison != 0) {
15764
        return lastComparison;
15765
      }
15766
      return 0;
15767
    }
15768
 
15769
    public void read(TProtocol iprot) throws TException {
15770
      TField field;
15771
      iprot.readStructBegin();
15772
      while (true)
15773
      {
15774
        field = iprot.readFieldBegin();
15775
        if (field.type == TType.STOP) { 
15776
          break;
15777
        }
15778
        _Fields fieldId = _Fields.findByThriftId(field.id);
15779
        if (fieldId == null) {
15780
          TProtocolUtil.skip(iprot, field.type);
15781
        } else {
15782
          switch (fieldId) {
15783
            case USER_ID:
15784
              if (field.type == TType.I64) {
15785
                this.userId = iprot.readI64();
15786
                setUserIdIsSet(true);
15787
              } else { 
15788
                TProtocolUtil.skip(iprot, field.type);
15789
              }
15790
              break;
15791
          }
15792
          iprot.readFieldEnd();
15793
        }
15794
      }
15795
      iprot.readStructEnd();
15796
      validate();
15797
    }
15798
 
15799
    public void write(TProtocol oprot) throws TException {
15800
      validate();
15801
 
15802
      oprot.writeStructBegin(STRUCT_DESC);
15803
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15804
      oprot.writeI64(this.userId);
15805
      oprot.writeFieldEnd();
15806
      oprot.writeFieldStop();
15807
      oprot.writeStructEnd();
15808
    }
15809
 
15810
    @Override
15811
    public String toString() {
15812
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
15813
      boolean first = true;
15814
 
15815
      sb.append("userId:");
15816
      sb.append(this.userId);
15817
      first = false;
15818
      sb.append(")");
15819
      return sb.toString();
15820
    }
15821
 
15822
    public void validate() throws TException {
15823
      // check for required fields
15824
    }
15825
 
15826
  }
15827
 
15828
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
15829
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
15830
 
15831
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
15832
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
15833
 
15834
    private Cart success;
15835
    private ShoppingCartException scx;
15836
 
15837
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15838
    public enum _Fields implements TFieldIdEnum {
15839
      SUCCESS((short)0, "success"),
15840
      SCX((short)1, "scx");
15841
 
15842
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15844
 
15845
      static {
15846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15847
          byId.put((int)field._thriftId, field);
15848
          byName.put(field.getFieldName(), field);
15849
        }
15850
      }
15851
 
15852
      /**
15853
       * Find the _Fields constant that matches fieldId, or null if its not found.
15854
       */
15855
      public static _Fields findByThriftId(int fieldId) {
15856
        return byId.get(fieldId);
15857
      }
15858
 
15859
      /**
15860
       * Find the _Fields constant that matches fieldId, throwing an exception
15861
       * if it is not found.
15862
       */
15863
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15864
        _Fields fields = findByThriftId(fieldId);
15865
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15866
        return fields;
15867
      }
15868
 
15869
      /**
15870
       * Find the _Fields constant that matches name, or null if its not found.
15871
       */
15872
      public static _Fields findByName(String name) {
15873
        return byName.get(name);
15874
      }
15875
 
15876
      private final short _thriftId;
15877
      private final String _fieldName;
15878
 
15879
      _Fields(short thriftId, String fieldName) {
15880
        _thriftId = thriftId;
15881
        _fieldName = fieldName;
15882
      }
15883
 
15884
      public short getThriftFieldId() {
15885
        return _thriftId;
15886
      }
15887
 
15888
      public String getFieldName() {
15889
        return _fieldName;
15890
      }
15891
    }
15892
 
15893
    // isset id assignments
15894
 
15895
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15896
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15897
          new StructMetaData(TType.STRUCT, Cart.class)));
15898
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
15899
          new FieldValueMetaData(TType.STRUCT)));
15900
    }});
15901
 
15902
    static {
15903
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
15904
    }
15905
 
15906
    public getCurrentCart_result() {
15907
    }
15908
 
15909
    public getCurrentCart_result(
15910
      Cart success,
15911
      ShoppingCartException scx)
15912
    {
15913
      this();
15914
      this.success = success;
15915
      this.scx = scx;
15916
    }
15917
 
15918
    /**
15919
     * Performs a deep copy on <i>other</i>.
15920
     */
15921
    public getCurrentCart_result(getCurrentCart_result other) {
15922
      if (other.isSetSuccess()) {
15923
        this.success = new Cart(other.success);
15924
      }
15925
      if (other.isSetScx()) {
15926
        this.scx = new ShoppingCartException(other.scx);
15927
      }
15928
    }
15929
 
15930
    public getCurrentCart_result deepCopy() {
15931
      return new getCurrentCart_result(this);
15932
    }
15933
 
15934
    @Deprecated
15935
    public getCurrentCart_result clone() {
15936
      return new getCurrentCart_result(this);
15937
    }
15938
 
15939
    public Cart getSuccess() {
15940
      return this.success;
15941
    }
15942
 
15943
    public getCurrentCart_result setSuccess(Cart success) {
15944
      this.success = success;
506 rajveer 15945
      return this;
15946
    }
15947
 
553 chandransh 15948
    public void unsetSuccess() {
15949
      this.success = null;
506 rajveer 15950
    }
15951
 
553 chandransh 15952
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15953
    public boolean isSetSuccess() {
15954
      return this.success != null;
506 rajveer 15955
    }
15956
 
553 chandransh 15957
    public void setSuccessIsSet(boolean value) {
15958
      if (!value) {
15959
        this.success = null;
15960
      }
506 rajveer 15961
    }
15962
 
553 chandransh 15963
    public ShoppingCartException getScx() {
15964
      return this.scx;
15965
    }
15966
 
15967
    public getCurrentCart_result setScx(ShoppingCartException scx) {
15968
      this.scx = scx;
15969
      return this;
15970
    }
15971
 
15972
    public void unsetScx() {
15973
      this.scx = null;
15974
    }
15975
 
15976
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
15977
    public boolean isSetScx() {
15978
      return this.scx != null;
15979
    }
15980
 
15981
    public void setScxIsSet(boolean value) {
15982
      if (!value) {
15983
        this.scx = null;
15984
      }
15985
    }
15986
 
506 rajveer 15987
    public void setFieldValue(_Fields field, Object value) {
15988
      switch (field) {
553 chandransh 15989
      case SUCCESS:
506 rajveer 15990
        if (value == null) {
553 chandransh 15991
          unsetSuccess();
506 rajveer 15992
        } else {
553 chandransh 15993
          setSuccess((Cart)value);
506 rajveer 15994
        }
15995
        break;
15996
 
553 chandransh 15997
      case SCX:
506 rajveer 15998
        if (value == null) {
553 chandransh 15999
          unsetScx();
506 rajveer 16000
        } else {
553 chandransh 16001
          setScx((ShoppingCartException)value);
506 rajveer 16002
        }
16003
        break;
16004
 
16005
      }
16006
    }
16007
 
16008
    public void setFieldValue(int fieldID, Object value) {
16009
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16010
    }
16011
 
16012
    public Object getFieldValue(_Fields field) {
16013
      switch (field) {
553 chandransh 16014
      case SUCCESS:
16015
        return getSuccess();
506 rajveer 16016
 
553 chandransh 16017
      case SCX:
16018
        return getScx();
506 rajveer 16019
 
16020
      }
16021
      throw new IllegalStateException();
16022
    }
16023
 
16024
    public Object getFieldValue(int fieldId) {
16025
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16026
    }
16027
 
16028
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16029
    public boolean isSet(_Fields field) {
16030
      switch (field) {
553 chandransh 16031
      case SUCCESS:
16032
        return isSetSuccess();
16033
      case SCX:
16034
        return isSetScx();
506 rajveer 16035
      }
16036
      throw new IllegalStateException();
16037
    }
16038
 
16039
    public boolean isSet(int fieldID) {
16040
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16041
    }
16042
 
16043
    @Override
16044
    public boolean equals(Object that) {
16045
      if (that == null)
16046
        return false;
553 chandransh 16047
      if (that instanceof getCurrentCart_result)
16048
        return this.equals((getCurrentCart_result)that);
506 rajveer 16049
      return false;
16050
    }
16051
 
553 chandransh 16052
    public boolean equals(getCurrentCart_result that) {
506 rajveer 16053
      if (that == null)
16054
        return false;
16055
 
553 chandransh 16056
      boolean this_present_success = true && this.isSetSuccess();
16057
      boolean that_present_success = true && that.isSetSuccess();
16058
      if (this_present_success || that_present_success) {
16059
        if (!(this_present_success && that_present_success))
506 rajveer 16060
          return false;
553 chandransh 16061
        if (!this.success.equals(that.success))
506 rajveer 16062
          return false;
16063
      }
16064
 
553 chandransh 16065
      boolean this_present_scx = true && this.isSetScx();
16066
      boolean that_present_scx = true && that.isSetScx();
16067
      if (this_present_scx || that_present_scx) {
16068
        if (!(this_present_scx && that_present_scx))
506 rajveer 16069
          return false;
553 chandransh 16070
        if (!this.scx.equals(that.scx))
506 rajveer 16071
          return false;
16072
      }
16073
 
16074
      return true;
16075
    }
16076
 
16077
    @Override
16078
    public int hashCode() {
16079
      return 0;
16080
    }
16081
 
553 chandransh 16082
    public int compareTo(getCurrentCart_result other) {
506 rajveer 16083
      if (!getClass().equals(other.getClass())) {
16084
        return getClass().getName().compareTo(other.getClass().getName());
16085
      }
16086
 
16087
      int lastComparison = 0;
553 chandransh 16088
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 16089
 
553 chandransh 16090
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 16091
      if (lastComparison != 0) {
16092
        return lastComparison;
16093
      }
553 chandransh 16094
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 16095
      if (lastComparison != 0) {
16096
        return lastComparison;
16097
      }
553 chandransh 16098
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 16099
      if (lastComparison != 0) {
16100
        return lastComparison;
16101
      }
553 chandransh 16102
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 16103
      if (lastComparison != 0) {
16104
        return lastComparison;
16105
      }
16106
      return 0;
16107
    }
16108
 
16109
    public void read(TProtocol iprot) throws TException {
16110
      TField field;
16111
      iprot.readStructBegin();
16112
      while (true)
16113
      {
16114
        field = iprot.readFieldBegin();
16115
        if (field.type == TType.STOP) { 
16116
          break;
16117
        }
16118
        _Fields fieldId = _Fields.findByThriftId(field.id);
16119
        if (fieldId == null) {
16120
          TProtocolUtil.skip(iprot, field.type);
16121
        } else {
16122
          switch (fieldId) {
553 chandransh 16123
            case SUCCESS:
16124
              if (field.type == TType.STRUCT) {
16125
                this.success = new Cart();
16126
                this.success.read(iprot);
506 rajveer 16127
              } else { 
16128
                TProtocolUtil.skip(iprot, field.type);
16129
              }
16130
              break;
553 chandransh 16131
            case SCX:
16132
              if (field.type == TType.STRUCT) {
16133
                this.scx = new ShoppingCartException();
16134
                this.scx.read(iprot);
16135
              } else { 
16136
                TProtocolUtil.skip(iprot, field.type);
16137
              }
16138
              break;
16139
          }
16140
          iprot.readFieldEnd();
16141
        }
16142
      }
16143
      iprot.readStructEnd();
16144
      validate();
16145
    }
16146
 
16147
    public void write(TProtocol oprot) throws TException {
16148
      oprot.writeStructBegin(STRUCT_DESC);
16149
 
16150
      if (this.isSetSuccess()) {
16151
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16152
        this.success.write(oprot);
16153
        oprot.writeFieldEnd();
16154
      } else if (this.isSetScx()) {
16155
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16156
        this.scx.write(oprot);
16157
        oprot.writeFieldEnd();
16158
      }
16159
      oprot.writeFieldStop();
16160
      oprot.writeStructEnd();
16161
    }
16162
 
16163
    @Override
16164
    public String toString() {
16165
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
16166
      boolean first = true;
16167
 
16168
      sb.append("success:");
16169
      if (this.success == null) {
16170
        sb.append("null");
16171
      } else {
16172
        sb.append(this.success);
16173
      }
16174
      first = false;
16175
      if (!first) sb.append(", ");
16176
      sb.append("scx:");
16177
      if (this.scx == null) {
16178
        sb.append("null");
16179
      } else {
16180
        sb.append(this.scx);
16181
      }
16182
      first = false;
16183
      sb.append(")");
16184
      return sb.toString();
16185
    }
16186
 
16187
    public void validate() throws TException {
16188
      // check for required fields
16189
    }
16190
 
16191
  }
16192
 
16193
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
16194
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
16195
 
16196
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
16197
 
16198
    private long cartId;
16199
 
16200
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16201
    public enum _Fields implements TFieldIdEnum {
16202
      CART_ID((short)1, "cartId");
16203
 
16204
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16205
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16206
 
16207
      static {
16208
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16209
          byId.put((int)field._thriftId, field);
16210
          byName.put(field.getFieldName(), field);
16211
        }
16212
      }
16213
 
16214
      /**
16215
       * Find the _Fields constant that matches fieldId, or null if its not found.
16216
       */
16217
      public static _Fields findByThriftId(int fieldId) {
16218
        return byId.get(fieldId);
16219
      }
16220
 
16221
      /**
16222
       * Find the _Fields constant that matches fieldId, throwing an exception
16223
       * if it is not found.
16224
       */
16225
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16226
        _Fields fields = findByThriftId(fieldId);
16227
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16228
        return fields;
16229
      }
16230
 
16231
      /**
16232
       * Find the _Fields constant that matches name, or null if its not found.
16233
       */
16234
      public static _Fields findByName(String name) {
16235
        return byName.get(name);
16236
      }
16237
 
16238
      private final short _thriftId;
16239
      private final String _fieldName;
16240
 
16241
      _Fields(short thriftId, String fieldName) {
16242
        _thriftId = thriftId;
16243
        _fieldName = fieldName;
16244
      }
16245
 
16246
      public short getThriftFieldId() {
16247
        return _thriftId;
16248
      }
16249
 
16250
      public String getFieldName() {
16251
        return _fieldName;
16252
      }
16253
    }
16254
 
16255
    // isset id assignments
16256
    private static final int __CARTID_ISSET_ID = 0;
16257
    private BitSet __isset_bit_vector = new BitSet(1);
16258
 
16259
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16260
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
16261
          new FieldValueMetaData(TType.I64)));
16262
    }});
16263
 
16264
    static {
16265
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
16266
    }
16267
 
16268
    public getCart_args() {
16269
    }
16270
 
16271
    public getCart_args(
16272
      long cartId)
16273
    {
16274
      this();
16275
      this.cartId = cartId;
16276
      setCartIdIsSet(true);
16277
    }
16278
 
16279
    /**
16280
     * Performs a deep copy on <i>other</i>.
16281
     */
16282
    public getCart_args(getCart_args other) {
16283
      __isset_bit_vector.clear();
16284
      __isset_bit_vector.or(other.__isset_bit_vector);
16285
      this.cartId = other.cartId;
16286
    }
16287
 
16288
    public getCart_args deepCopy() {
16289
      return new getCart_args(this);
16290
    }
16291
 
16292
    @Deprecated
16293
    public getCart_args clone() {
16294
      return new getCart_args(this);
16295
    }
16296
 
16297
    public long getCartId() {
16298
      return this.cartId;
16299
    }
16300
 
16301
    public getCart_args setCartId(long cartId) {
16302
      this.cartId = cartId;
16303
      setCartIdIsSet(true);
16304
      return this;
16305
    }
16306
 
16307
    public void unsetCartId() {
16308
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
16309
    }
16310
 
16311
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
16312
    public boolean isSetCartId() {
16313
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
16314
    }
16315
 
16316
    public void setCartIdIsSet(boolean value) {
16317
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
16318
    }
16319
 
16320
    public void setFieldValue(_Fields field, Object value) {
16321
      switch (field) {
16322
      case CART_ID:
16323
        if (value == null) {
16324
          unsetCartId();
16325
        } else {
16326
          setCartId((Long)value);
16327
        }
16328
        break;
16329
 
16330
      }
16331
    }
16332
 
16333
    public void setFieldValue(int fieldID, Object value) {
16334
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16335
    }
16336
 
16337
    public Object getFieldValue(_Fields field) {
16338
      switch (field) {
16339
      case CART_ID:
16340
        return new Long(getCartId());
16341
 
16342
      }
16343
      throw new IllegalStateException();
16344
    }
16345
 
16346
    public Object getFieldValue(int fieldId) {
16347
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16348
    }
16349
 
16350
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16351
    public boolean isSet(_Fields field) {
16352
      switch (field) {
16353
      case CART_ID:
16354
        return isSetCartId();
16355
      }
16356
      throw new IllegalStateException();
16357
    }
16358
 
16359
    public boolean isSet(int fieldID) {
16360
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16361
    }
16362
 
16363
    @Override
16364
    public boolean equals(Object that) {
16365
      if (that == null)
16366
        return false;
16367
      if (that instanceof getCart_args)
16368
        return this.equals((getCart_args)that);
16369
      return false;
16370
    }
16371
 
16372
    public boolean equals(getCart_args that) {
16373
      if (that == null)
16374
        return false;
16375
 
16376
      boolean this_present_cartId = true;
16377
      boolean that_present_cartId = true;
16378
      if (this_present_cartId || that_present_cartId) {
16379
        if (!(this_present_cartId && that_present_cartId))
16380
          return false;
16381
        if (this.cartId != that.cartId)
16382
          return false;
16383
      }
16384
 
16385
      return true;
16386
    }
16387
 
16388
    @Override
16389
    public int hashCode() {
16390
      return 0;
16391
    }
16392
 
16393
    public int compareTo(getCart_args other) {
16394
      if (!getClass().equals(other.getClass())) {
16395
        return getClass().getName().compareTo(other.getClass().getName());
16396
      }
16397
 
16398
      int lastComparison = 0;
16399
      getCart_args typedOther = (getCart_args)other;
16400
 
16401
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
16402
      if (lastComparison != 0) {
16403
        return lastComparison;
16404
      }
16405
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
16406
      if (lastComparison != 0) {
16407
        return lastComparison;
16408
      }
16409
      return 0;
16410
    }
16411
 
16412
    public void read(TProtocol iprot) throws TException {
16413
      TField field;
16414
      iprot.readStructBegin();
16415
      while (true)
16416
      {
16417
        field = iprot.readFieldBegin();
16418
        if (field.type == TType.STOP) { 
16419
          break;
16420
        }
16421
        _Fields fieldId = _Fields.findByThriftId(field.id);
16422
        if (fieldId == null) {
16423
          TProtocolUtil.skip(iprot, field.type);
16424
        } else {
16425
          switch (fieldId) {
16426
            case CART_ID:
506 rajveer 16427
              if (field.type == TType.I64) {
553 chandransh 16428
                this.cartId = iprot.readI64();
16429
                setCartIdIsSet(true);
506 rajveer 16430
              } else { 
16431
                TProtocolUtil.skip(iprot, field.type);
16432
              }
16433
              break;
16434
          }
16435
          iprot.readFieldEnd();
16436
        }
16437
      }
16438
      iprot.readStructEnd();
16439
      validate();
16440
    }
16441
 
16442
    public void write(TProtocol oprot) throws TException {
16443
      validate();
16444
 
16445
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 16446
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
16447
      oprot.writeI64(this.cartId);
506 rajveer 16448
      oprot.writeFieldEnd();
16449
      oprot.writeFieldStop();
16450
      oprot.writeStructEnd();
16451
    }
16452
 
16453
    @Override
16454
    public String toString() {
553 chandransh 16455
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 16456
      boolean first = true;
16457
 
553 chandransh 16458
      sb.append("cartId:");
16459
      sb.append(this.cartId);
506 rajveer 16460
      first = false;
16461
      sb.append(")");
16462
      return sb.toString();
16463
    }
16464
 
16465
    public void validate() throws TException {
16466
      // check for required fields
16467
    }
16468
 
16469
  }
16470
 
553 chandransh 16471
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
16472
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 16473
 
553 chandransh 16474
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
16475
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 16476
 
553 chandransh 16477
    private Cart success;
16478
    private ShoppingCartException scx;
506 rajveer 16479
 
16480
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16481
    public enum _Fields implements TFieldIdEnum {
16482
      SUCCESS((short)0, "success"),
553 chandransh 16483
      SCX((short)1, "scx");
506 rajveer 16484
 
16485
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16486
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16487
 
16488
      static {
16489
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16490
          byId.put((int)field._thriftId, field);
16491
          byName.put(field.getFieldName(), field);
16492
        }
16493
      }
16494
 
16495
      /**
16496
       * Find the _Fields constant that matches fieldId, or null if its not found.
16497
       */
16498
      public static _Fields findByThriftId(int fieldId) {
16499
        return byId.get(fieldId);
16500
      }
16501
 
16502
      /**
16503
       * Find the _Fields constant that matches fieldId, throwing an exception
16504
       * if it is not found.
16505
       */
16506
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16507
        _Fields fields = findByThriftId(fieldId);
16508
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16509
        return fields;
16510
      }
16511
 
16512
      /**
16513
       * Find the _Fields constant that matches name, or null if its not found.
16514
       */
16515
      public static _Fields findByName(String name) {
16516
        return byName.get(name);
16517
      }
16518
 
16519
      private final short _thriftId;
16520
      private final String _fieldName;
16521
 
16522
      _Fields(short thriftId, String fieldName) {
16523
        _thriftId = thriftId;
16524
        _fieldName = fieldName;
16525
      }
16526
 
16527
      public short getThriftFieldId() {
16528
        return _thriftId;
16529
      }
16530
 
16531
      public String getFieldName() {
16532
        return _fieldName;
16533
      }
16534
    }
16535
 
16536
    // isset id assignments
16537
 
16538
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16539
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 16540
          new StructMetaData(TType.STRUCT, Cart.class)));
16541
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 16542
          new FieldValueMetaData(TType.STRUCT)));
16543
    }});
16544
 
16545
    static {
553 chandransh 16546
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 16547
    }
16548
 
553 chandransh 16549
    public getCart_result() {
506 rajveer 16550
    }
16551
 
553 chandransh 16552
    public getCart_result(
16553
      Cart success,
16554
      ShoppingCartException scx)
506 rajveer 16555
    {
16556
      this();
16557
      this.success = success;
553 chandransh 16558
      this.scx = scx;
506 rajveer 16559
    }
16560
 
16561
    /**
16562
     * Performs a deep copy on <i>other</i>.
16563
     */
553 chandransh 16564
    public getCart_result(getCart_result other) {
16565
      if (other.isSetSuccess()) {
16566
        this.success = new Cart(other.success);
506 rajveer 16567
      }
553 chandransh 16568
      if (other.isSetScx()) {
16569
        this.scx = new ShoppingCartException(other.scx);
16570
      }
506 rajveer 16571
    }
16572
 
553 chandransh 16573
    public getCart_result deepCopy() {
16574
      return new getCart_result(this);
506 rajveer 16575
    }
16576
 
16577
    @Deprecated
553 chandransh 16578
    public getCart_result clone() {
16579
      return new getCart_result(this);
506 rajveer 16580
    }
16581
 
553 chandransh 16582
    public Cart getSuccess() {
506 rajveer 16583
      return this.success;
16584
    }
16585
 
553 chandransh 16586
    public getCart_result setSuccess(Cart success) {
506 rajveer 16587
      this.success = success;
16588
      return this;
16589
    }
16590
 
16591
    public void unsetSuccess() {
553 chandransh 16592
      this.success = null;
506 rajveer 16593
    }
16594
 
16595
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16596
    public boolean isSetSuccess() {
553 chandransh 16597
      return this.success != null;
506 rajveer 16598
    }
16599
 
16600
    public void setSuccessIsSet(boolean value) {
553 chandransh 16601
      if (!value) {
16602
        this.success = null;
16603
      }
506 rajveer 16604
    }
16605
 
553 chandransh 16606
    public ShoppingCartException getScx() {
16607
      return this.scx;
506 rajveer 16608
    }
16609
 
553 chandransh 16610
    public getCart_result setScx(ShoppingCartException scx) {
16611
      this.scx = scx;
506 rajveer 16612
      return this;
16613
    }
16614
 
553 chandransh 16615
    public void unsetScx() {
16616
      this.scx = null;
506 rajveer 16617
    }
16618
 
553 chandransh 16619
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
16620
    public boolean isSetScx() {
16621
      return this.scx != null;
506 rajveer 16622
    }
16623
 
553 chandransh 16624
    public void setScxIsSet(boolean value) {
506 rajveer 16625
      if (!value) {
553 chandransh 16626
        this.scx = null;
506 rajveer 16627
      }
16628
    }
16629
 
16630
    public void setFieldValue(_Fields field, Object value) {
16631
      switch (field) {
16632
      case SUCCESS:
16633
        if (value == null) {
16634
          unsetSuccess();
16635
        } else {
553 chandransh 16636
          setSuccess((Cart)value);
506 rajveer 16637
        }
16638
        break;
16639
 
553 chandransh 16640
      case SCX:
506 rajveer 16641
        if (value == null) {
553 chandransh 16642
          unsetScx();
506 rajveer 16643
        } else {
553 chandransh 16644
          setScx((ShoppingCartException)value);
506 rajveer 16645
        }
16646
        break;
16647
 
16648
      }
16649
    }
16650
 
16651
    public void setFieldValue(int fieldID, Object value) {
16652
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16653
    }
16654
 
16655
    public Object getFieldValue(_Fields field) {
16656
      switch (field) {
16657
      case SUCCESS:
553 chandransh 16658
        return getSuccess();
506 rajveer 16659
 
553 chandransh 16660
      case SCX:
16661
        return getScx();
506 rajveer 16662
 
16663
      }
16664
      throw new IllegalStateException();
16665
    }
16666
 
16667
    public Object getFieldValue(int fieldId) {
16668
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16669
    }
16670
 
16671
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16672
    public boolean isSet(_Fields field) {
16673
      switch (field) {
16674
      case SUCCESS:
16675
        return isSetSuccess();
553 chandransh 16676
      case SCX:
16677
        return isSetScx();
506 rajveer 16678
      }
16679
      throw new IllegalStateException();
16680
    }
16681
 
16682
    public boolean isSet(int fieldID) {
16683
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16684
    }
16685
 
16686
    @Override
16687
    public boolean equals(Object that) {
16688
      if (that == null)
16689
        return false;
553 chandransh 16690
      if (that instanceof getCart_result)
16691
        return this.equals((getCart_result)that);
506 rajveer 16692
      return false;
16693
    }
16694
 
553 chandransh 16695
    public boolean equals(getCart_result that) {
506 rajveer 16696
      if (that == null)
16697
        return false;
16698
 
553 chandransh 16699
      boolean this_present_success = true && this.isSetSuccess();
16700
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 16701
      if (this_present_success || that_present_success) {
16702
        if (!(this_present_success && that_present_success))
16703
          return false;
553 chandransh 16704
        if (!this.success.equals(that.success))
506 rajveer 16705
          return false;
16706
      }
16707
 
553 chandransh 16708
      boolean this_present_scx = true && this.isSetScx();
16709
      boolean that_present_scx = true && that.isSetScx();
16710
      if (this_present_scx || that_present_scx) {
16711
        if (!(this_present_scx && that_present_scx))
506 rajveer 16712
          return false;
553 chandransh 16713
        if (!this.scx.equals(that.scx))
506 rajveer 16714
          return false;
16715
      }
16716
 
16717
      return true;
16718
    }
16719
 
16720
    @Override
16721
    public int hashCode() {
16722
      return 0;
16723
    }
16724
 
553 chandransh 16725
    public int compareTo(getCart_result other) {
506 rajveer 16726
      if (!getClass().equals(other.getClass())) {
16727
        return getClass().getName().compareTo(other.getClass().getName());
16728
      }
16729
 
16730
      int lastComparison = 0;
553 chandransh 16731
      getCart_result typedOther = (getCart_result)other;
506 rajveer 16732
 
16733
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16734
      if (lastComparison != 0) {
16735
        return lastComparison;
16736
      }
16737
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16738
      if (lastComparison != 0) {
16739
        return lastComparison;
16740
      }
553 chandransh 16741
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 16742
      if (lastComparison != 0) {
16743
        return lastComparison;
16744
      }
553 chandransh 16745
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 16746
      if (lastComparison != 0) {
16747
        return lastComparison;
16748
      }
16749
      return 0;
16750
    }
16751
 
16752
    public void read(TProtocol iprot) throws TException {
16753
      TField field;
16754
      iprot.readStructBegin();
16755
      while (true)
16756
      {
16757
        field = iprot.readFieldBegin();
16758
        if (field.type == TType.STOP) { 
16759
          break;
16760
        }
16761
        _Fields fieldId = _Fields.findByThriftId(field.id);
16762
        if (fieldId == null) {
16763
          TProtocolUtil.skip(iprot, field.type);
16764
        } else {
16765
          switch (fieldId) {
16766
            case SUCCESS:
553 chandransh 16767
              if (field.type == TType.STRUCT) {
16768
                this.success = new Cart();
16769
                this.success.read(iprot);
506 rajveer 16770
              } else { 
16771
                TProtocolUtil.skip(iprot, field.type);
16772
              }
16773
              break;
553 chandransh 16774
            case SCX:
506 rajveer 16775
              if (field.type == TType.STRUCT) {
553 chandransh 16776
                this.scx = new ShoppingCartException();
16777
                this.scx.read(iprot);
506 rajveer 16778
              } else { 
16779
                TProtocolUtil.skip(iprot, field.type);
16780
              }
16781
              break;
16782
          }
16783
          iprot.readFieldEnd();
16784
        }
16785
      }
16786
      iprot.readStructEnd();
16787
      validate();
16788
    }
16789
 
16790
    public void write(TProtocol oprot) throws TException {
16791
      oprot.writeStructBegin(STRUCT_DESC);
16792
 
16793
      if (this.isSetSuccess()) {
16794
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 16795
        this.success.write(oprot);
506 rajveer 16796
        oprot.writeFieldEnd();
553 chandransh 16797
      } else if (this.isSetScx()) {
16798
        oprot.writeFieldBegin(SCX_FIELD_DESC);
16799
        this.scx.write(oprot);
506 rajveer 16800
        oprot.writeFieldEnd();
16801
      }
16802
      oprot.writeFieldStop();
16803
      oprot.writeStructEnd();
16804
    }
16805
 
16806
    @Override
16807
    public String toString() {
553 chandransh 16808
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 16809
      boolean first = true;
16810
 
16811
      sb.append("success:");
553 chandransh 16812
      if (this.success == null) {
16813
        sb.append("null");
16814
      } else {
16815
        sb.append(this.success);
16816
      }
506 rajveer 16817
      first = false;
16818
      if (!first) sb.append(", ");
553 chandransh 16819
      sb.append("scx:");
16820
      if (this.scx == null) {
506 rajveer 16821
        sb.append("null");
16822
      } else {
553 chandransh 16823
        sb.append(this.scx);
506 rajveer 16824
      }
16825
      first = false;
16826
      sb.append(")");
16827
      return sb.toString();
16828
    }
16829
 
16830
    public void validate() throws TException {
16831
      // check for required fields
16832
    }
16833
 
16834
  }
16835
 
553 chandransh 16836
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
16837
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 16838
 
553 chandransh 16839
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
16840
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 16841
 
553 chandransh 16842
    private long userId;
16843
    private CartStatus status;
48 ashish 16844
 
16845
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16846
    public enum _Fields implements TFieldIdEnum {
553 chandransh 16847
      USER_ID((short)1, "userId"),
16848
      /**
16849
       * 
16850
       * @see CartStatus
16851
       */
16852
      STATUS((short)2, "status");
48 ashish 16853
 
16854
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16855
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16856
 
16857
      static {
16858
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16859
          byId.put((int)field._thriftId, field);
16860
          byName.put(field.getFieldName(), field);
16861
        }
16862
      }
16863
 
16864
      /**
16865
       * Find the _Fields constant that matches fieldId, or null if its not found.
16866
       */
16867
      public static _Fields findByThriftId(int fieldId) {
16868
        return byId.get(fieldId);
16869
      }
16870
 
16871
      /**
16872
       * Find the _Fields constant that matches fieldId, throwing an exception
16873
       * if it is not found.
16874
       */
16875
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16876
        _Fields fields = findByThriftId(fieldId);
16877
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16878
        return fields;
16879
      }
16880
 
16881
      /**
16882
       * Find the _Fields constant that matches name, or null if its not found.
16883
       */
16884
      public static _Fields findByName(String name) {
16885
        return byName.get(name);
16886
      }
16887
 
16888
      private final short _thriftId;
16889
      private final String _fieldName;
16890
 
16891
      _Fields(short thriftId, String fieldName) {
16892
        _thriftId = thriftId;
16893
        _fieldName = fieldName;
16894
      }
16895
 
16896
      public short getThriftFieldId() {
16897
        return _thriftId;
16898
      }
16899
 
16900
      public String getFieldName() {
16901
        return _fieldName;
16902
      }
16903
    }
16904
 
16905
    // isset id assignments
16906
    private static final int __USERID_ISSET_ID = 0;
16907
    private BitSet __isset_bit_vector = new BitSet(1);
16908
 
16909
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 16910
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 16911
          new FieldValueMetaData(TType.I64)));
553 chandransh 16912
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16913
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 16914
    }});
16915
 
16916
    static {
553 chandransh 16917
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 16918
    }
16919
 
553 chandransh 16920
    public getCartsForUser_args() {
48 ashish 16921
    }
16922
 
553 chandransh 16923
    public getCartsForUser_args(
16924
      long userId,
16925
      CartStatus status)
48 ashish 16926
    {
16927
      this();
553 chandransh 16928
      this.userId = userId;
16929
      setUserIdIsSet(true);
16930
      this.status = status;
48 ashish 16931
    }
16932
 
16933
    /**
16934
     * Performs a deep copy on <i>other</i>.
16935
     */
553 chandransh 16936
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 16937
      __isset_bit_vector.clear();
16938
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 16939
      this.userId = other.userId;
16940
      if (other.isSetStatus()) {
16941
        this.status = other.status;
48 ashish 16942
      }
16943
    }
16944
 
553 chandransh 16945
    public getCartsForUser_args deepCopy() {
16946
      return new getCartsForUser_args(this);
48 ashish 16947
    }
16948
 
16949
    @Deprecated
553 chandransh 16950
    public getCartsForUser_args clone() {
16951
      return new getCartsForUser_args(this);
48 ashish 16952
    }
16953
 
553 chandransh 16954
    public long getUserId() {
16955
      return this.userId;
48 ashish 16956
    }
16957
 
553 chandransh 16958
    public getCartsForUser_args setUserId(long userId) {
16959
      this.userId = userId;
16960
      setUserIdIsSet(true);
48 ashish 16961
      return this;
16962
    }
16963
 
553 chandransh 16964
    public void unsetUserId() {
48 ashish 16965
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16966
    }
16967
 
553 chandransh 16968
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16969
    public boolean isSetUserId() {
48 ashish 16970
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16971
    }
16972
 
553 chandransh 16973
    public void setUserIdIsSet(boolean value) {
48 ashish 16974
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16975
    }
16976
 
553 chandransh 16977
    /**
16978
     * 
16979
     * @see CartStatus
16980
     */
16981
    public CartStatus getStatus() {
16982
      return this.status;
48 ashish 16983
    }
16984
 
553 chandransh 16985
    /**
16986
     * 
16987
     * @see CartStatus
16988
     */
16989
    public getCartsForUser_args setStatus(CartStatus status) {
16990
      this.status = status;
48 ashish 16991
      return this;
16992
    }
16993
 
553 chandransh 16994
    public void unsetStatus() {
16995
      this.status = null;
48 ashish 16996
    }
16997
 
553 chandransh 16998
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16999
    public boolean isSetStatus() {
17000
      return this.status != null;
48 ashish 17001
    }
17002
 
553 chandransh 17003
    public void setStatusIsSet(boolean value) {
48 ashish 17004
      if (!value) {
553 chandransh 17005
        this.status = null;
48 ashish 17006
      }
17007
    }
17008
 
17009
    public void setFieldValue(_Fields field, Object value) {
17010
      switch (field) {
553 chandransh 17011
      case USER_ID:
48 ashish 17012
        if (value == null) {
553 chandransh 17013
          unsetUserId();
48 ashish 17014
        } else {
553 chandransh 17015
          setUserId((Long)value);
48 ashish 17016
        }
17017
        break;
17018
 
553 chandransh 17019
      case STATUS:
48 ashish 17020
        if (value == null) {
553 chandransh 17021
          unsetStatus();
48 ashish 17022
        } else {
553 chandransh 17023
          setStatus((CartStatus)value);
48 ashish 17024
        }
17025
        break;
17026
 
17027
      }
17028
    }
17029
 
17030
    public void setFieldValue(int fieldID, Object value) {
17031
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17032
    }
17033
 
17034
    public Object getFieldValue(_Fields field) {
17035
      switch (field) {
553 chandransh 17036
      case USER_ID:
17037
        return new Long(getUserId());
48 ashish 17038
 
553 chandransh 17039
      case STATUS:
17040
        return getStatus();
48 ashish 17041
 
17042
      }
17043
      throw new IllegalStateException();
17044
    }
17045
 
17046
    public Object getFieldValue(int fieldId) {
17047
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17048
    }
17049
 
17050
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17051
    public boolean isSet(_Fields field) {
17052
      switch (field) {
553 chandransh 17053
      case USER_ID:
17054
        return isSetUserId();
17055
      case STATUS:
17056
        return isSetStatus();
48 ashish 17057
      }
17058
      throw new IllegalStateException();
17059
    }
17060
 
17061
    public boolean isSet(int fieldID) {
17062
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17063
    }
17064
 
17065
    @Override
17066
    public boolean equals(Object that) {
17067
      if (that == null)
17068
        return false;
553 chandransh 17069
      if (that instanceof getCartsForUser_args)
17070
        return this.equals((getCartsForUser_args)that);
48 ashish 17071
      return false;
17072
    }
17073
 
553 chandransh 17074
    public boolean equals(getCartsForUser_args that) {
48 ashish 17075
      if (that == null)
17076
        return false;
17077
 
553 chandransh 17078
      boolean this_present_userId = true;
17079
      boolean that_present_userId = true;
17080
      if (this_present_userId || that_present_userId) {
17081
        if (!(this_present_userId && that_present_userId))
48 ashish 17082
          return false;
553 chandransh 17083
        if (this.userId != that.userId)
48 ashish 17084
          return false;
17085
      }
17086
 
553 chandransh 17087
      boolean this_present_status = true && this.isSetStatus();
17088
      boolean that_present_status = true && that.isSetStatus();
17089
      if (this_present_status || that_present_status) {
17090
        if (!(this_present_status && that_present_status))
48 ashish 17091
          return false;
553 chandransh 17092
        if (!this.status.equals(that.status))
48 ashish 17093
          return false;
17094
      }
17095
 
17096
      return true;
17097
    }
17098
 
17099
    @Override
17100
    public int hashCode() {
17101
      return 0;
17102
    }
17103
 
553 chandransh 17104
    public int compareTo(getCartsForUser_args other) {
48 ashish 17105
      if (!getClass().equals(other.getClass())) {
17106
        return getClass().getName().compareTo(other.getClass().getName());
17107
      }
17108
 
17109
      int lastComparison = 0;
553 chandransh 17110
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 17111
 
553 chandransh 17112
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 17113
      if (lastComparison != 0) {
17114
        return lastComparison;
17115
      }
553 chandransh 17116
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 17117
      if (lastComparison != 0) {
17118
        return lastComparison;
17119
      }
553 chandransh 17120
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 17121
      if (lastComparison != 0) {
17122
        return lastComparison;
17123
      }
553 chandransh 17124
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 17125
      if (lastComparison != 0) {
17126
        return lastComparison;
17127
      }
17128
      return 0;
17129
    }
17130
 
17131
    public void read(TProtocol iprot) throws TException {
17132
      TField field;
17133
      iprot.readStructBegin();
17134
      while (true)
17135
      {
17136
        field = iprot.readFieldBegin();
17137
        if (field.type == TType.STOP) { 
17138
          break;
17139
        }
17140
        _Fields fieldId = _Fields.findByThriftId(field.id);
17141
        if (fieldId == null) {
17142
          TProtocolUtil.skip(iprot, field.type);
17143
        } else {
17144
          switch (fieldId) {
553 chandransh 17145
            case USER_ID:
48 ashish 17146
              if (field.type == TType.I64) {
553 chandransh 17147
                this.userId = iprot.readI64();
17148
                setUserIdIsSet(true);
48 ashish 17149
              } else { 
17150
                TProtocolUtil.skip(iprot, field.type);
17151
              }
17152
              break;
553 chandransh 17153
            case STATUS:
17154
              if (field.type == TType.I32) {
17155
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 17156
              } else { 
17157
                TProtocolUtil.skip(iprot, field.type);
17158
              }
17159
              break;
17160
          }
17161
          iprot.readFieldEnd();
17162
        }
17163
      }
17164
      iprot.readStructEnd();
17165
      validate();
17166
    }
17167
 
17168
    public void write(TProtocol oprot) throws TException {
17169
      validate();
17170
 
17171
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17172
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17173
      oprot.writeI64(this.userId);
48 ashish 17174
      oprot.writeFieldEnd();
553 chandransh 17175
      if (this.status != null) {
17176
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17177
        oprot.writeI32(this.status.getValue());
48 ashish 17178
        oprot.writeFieldEnd();
17179
      }
17180
      oprot.writeFieldStop();
17181
      oprot.writeStructEnd();
17182
    }
17183
 
17184
    @Override
17185
    public String toString() {
553 chandransh 17186
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 17187
      boolean first = true;
17188
 
553 chandransh 17189
      sb.append("userId:");
17190
      sb.append(this.userId);
48 ashish 17191
      first = false;
17192
      if (!first) sb.append(", ");
553 chandransh 17193
      sb.append("status:");
17194
      if (this.status == null) {
48 ashish 17195
        sb.append("null");
17196
      } else {
553 chandransh 17197
        String status_name = status.name();
17198
        if (status_name != null) {
17199
          sb.append(status_name);
17200
          sb.append(" (");
17201
        }
17202
        sb.append(this.status);
17203
        if (status_name != null) {
17204
          sb.append(")");
17205
        }
48 ashish 17206
      }
17207
      first = false;
17208
      sb.append(")");
17209
      return sb.toString();
17210
    }
17211
 
17212
    public void validate() throws TException {
17213
      // check for required fields
17214
    }
17215
 
17216
  }
17217
 
553 chandransh 17218
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
17219
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 17220
 
553 chandransh 17221
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17222
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17223
 
553 chandransh 17224
    private List<Cart> success;
17225
    private ShoppingCartException scx;
48 ashish 17226
 
17227
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17228
    public enum _Fields implements TFieldIdEnum {
17229
      SUCCESS((short)0, "success"),
553 chandransh 17230
      SCX((short)1, "scx");
48 ashish 17231
 
17232
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17233
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17234
 
17235
      static {
17236
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17237
          byId.put((int)field._thriftId, field);
17238
          byName.put(field.getFieldName(), field);
17239
        }
17240
      }
17241
 
17242
      /**
17243
       * Find the _Fields constant that matches fieldId, or null if its not found.
17244
       */
17245
      public static _Fields findByThriftId(int fieldId) {
17246
        return byId.get(fieldId);
17247
      }
17248
 
17249
      /**
17250
       * Find the _Fields constant that matches fieldId, throwing an exception
17251
       * if it is not found.
17252
       */
17253
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17254
        _Fields fields = findByThriftId(fieldId);
17255
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17256
        return fields;
17257
      }
17258
 
17259
      /**
17260
       * Find the _Fields constant that matches name, or null if its not found.
17261
       */
17262
      public static _Fields findByName(String name) {
17263
        return byName.get(name);
17264
      }
17265
 
17266
      private final short _thriftId;
17267
      private final String _fieldName;
17268
 
17269
      _Fields(short thriftId, String fieldName) {
17270
        _thriftId = thriftId;
17271
        _fieldName = fieldName;
17272
      }
17273
 
17274
      public short getThriftFieldId() {
17275
        return _thriftId;
17276
      }
17277
 
17278
      public String getFieldName() {
17279
        return _fieldName;
17280
      }
17281
    }
17282
 
17283
    // isset id assignments
17284
 
17285
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17286
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17287
          new ListMetaData(TType.LIST, 
17288
              new StructMetaData(TType.STRUCT, Cart.class))));
17289
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17290
          new FieldValueMetaData(TType.STRUCT)));
17291
    }});
17292
 
17293
    static {
553 chandransh 17294
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 17295
    }
17296
 
553 chandransh 17297
    public getCartsForUser_result() {
48 ashish 17298
    }
17299
 
553 chandransh 17300
    public getCartsForUser_result(
17301
      List<Cart> success,
17302
      ShoppingCartException scx)
48 ashish 17303
    {
17304
      this();
17305
      this.success = success;
553 chandransh 17306
      this.scx = scx;
48 ashish 17307
    }
17308
 
17309
    /**
17310
     * Performs a deep copy on <i>other</i>.
17311
     */
553 chandransh 17312
    public getCartsForUser_result(getCartsForUser_result other) {
17313
      if (other.isSetSuccess()) {
17314
        List<Cart> __this__success = new ArrayList<Cart>();
17315
        for (Cart other_element : other.success) {
17316
          __this__success.add(new Cart(other_element));
17317
        }
17318
        this.success = __this__success;
48 ashish 17319
      }
553 chandransh 17320
      if (other.isSetScx()) {
17321
        this.scx = new ShoppingCartException(other.scx);
17322
      }
48 ashish 17323
    }
17324
 
553 chandransh 17325
    public getCartsForUser_result deepCopy() {
17326
      return new getCartsForUser_result(this);
48 ashish 17327
    }
17328
 
17329
    @Deprecated
553 chandransh 17330
    public getCartsForUser_result clone() {
17331
      return new getCartsForUser_result(this);
48 ashish 17332
    }
17333
 
553 chandransh 17334
    public int getSuccessSize() {
17335
      return (this.success == null) ? 0 : this.success.size();
17336
    }
17337
 
17338
    public java.util.Iterator<Cart> getSuccessIterator() {
17339
      return (this.success == null) ? null : this.success.iterator();
17340
    }
17341
 
17342
    public void addToSuccess(Cart elem) {
17343
      if (this.success == null) {
17344
        this.success = new ArrayList<Cart>();
17345
      }
17346
      this.success.add(elem);
17347
    }
17348
 
17349
    public List<Cart> getSuccess() {
48 ashish 17350
      return this.success;
17351
    }
17352
 
553 chandransh 17353
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 17354
      this.success = success;
17355
      return this;
17356
    }
17357
 
17358
    public void unsetSuccess() {
553 chandransh 17359
      this.success = null;
48 ashish 17360
    }
17361
 
17362
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17363
    public boolean isSetSuccess() {
553 chandransh 17364
      return this.success != null;
48 ashish 17365
    }
17366
 
17367
    public void setSuccessIsSet(boolean value) {
553 chandransh 17368
      if (!value) {
17369
        this.success = null;
17370
      }
48 ashish 17371
    }
17372
 
553 chandransh 17373
    public ShoppingCartException getScx() {
17374
      return this.scx;
48 ashish 17375
    }
17376
 
553 chandransh 17377
    public getCartsForUser_result setScx(ShoppingCartException scx) {
17378
      this.scx = scx;
48 ashish 17379
      return this;
17380
    }
17381
 
553 chandransh 17382
    public void unsetScx() {
17383
      this.scx = null;
48 ashish 17384
    }
17385
 
553 chandransh 17386
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17387
    public boolean isSetScx() {
17388
      return this.scx != null;
48 ashish 17389
    }
17390
 
553 chandransh 17391
    public void setScxIsSet(boolean value) {
48 ashish 17392
      if (!value) {
553 chandransh 17393
        this.scx = null;
48 ashish 17394
      }
17395
    }
17396
 
17397
    public void setFieldValue(_Fields field, Object value) {
17398
      switch (field) {
17399
      case SUCCESS:
17400
        if (value == null) {
17401
          unsetSuccess();
17402
        } else {
553 chandransh 17403
          setSuccess((List<Cart>)value);
48 ashish 17404
        }
17405
        break;
17406
 
553 chandransh 17407
      case SCX:
48 ashish 17408
        if (value == null) {
553 chandransh 17409
          unsetScx();
48 ashish 17410
        } else {
553 chandransh 17411
          setScx((ShoppingCartException)value);
48 ashish 17412
        }
17413
        break;
17414
 
17415
      }
17416
    }
17417
 
17418
    public void setFieldValue(int fieldID, Object value) {
17419
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17420
    }
17421
 
17422
    public Object getFieldValue(_Fields field) {
17423
      switch (field) {
17424
      case SUCCESS:
553 chandransh 17425
        return getSuccess();
48 ashish 17426
 
553 chandransh 17427
      case SCX:
17428
        return getScx();
48 ashish 17429
 
17430
      }
17431
      throw new IllegalStateException();
17432
    }
17433
 
17434
    public Object getFieldValue(int fieldId) {
17435
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17436
    }
17437
 
17438
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17439
    public boolean isSet(_Fields field) {
17440
      switch (field) {
17441
      case SUCCESS:
17442
        return isSetSuccess();
553 chandransh 17443
      case SCX:
17444
        return isSetScx();
48 ashish 17445
      }
17446
      throw new IllegalStateException();
17447
    }
17448
 
17449
    public boolean isSet(int fieldID) {
17450
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17451
    }
17452
 
17453
    @Override
17454
    public boolean equals(Object that) {
17455
      if (that == null)
17456
        return false;
553 chandransh 17457
      if (that instanceof getCartsForUser_result)
17458
        return this.equals((getCartsForUser_result)that);
48 ashish 17459
      return false;
17460
    }
17461
 
553 chandransh 17462
    public boolean equals(getCartsForUser_result that) {
48 ashish 17463
      if (that == null)
17464
        return false;
17465
 
553 chandransh 17466
      boolean this_present_success = true && this.isSetSuccess();
17467
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 17468
      if (this_present_success || that_present_success) {
17469
        if (!(this_present_success && that_present_success))
17470
          return false;
553 chandransh 17471
        if (!this.success.equals(that.success))
48 ashish 17472
          return false;
17473
      }
17474
 
553 chandransh 17475
      boolean this_present_scx = true && this.isSetScx();
17476
      boolean that_present_scx = true && that.isSetScx();
17477
      if (this_present_scx || that_present_scx) {
17478
        if (!(this_present_scx && that_present_scx))
48 ashish 17479
          return false;
553 chandransh 17480
        if (!this.scx.equals(that.scx))
48 ashish 17481
          return false;
17482
      }
17483
 
17484
      return true;
17485
    }
17486
 
17487
    @Override
17488
    public int hashCode() {
17489
      return 0;
17490
    }
17491
 
553 chandransh 17492
    public int compareTo(getCartsForUser_result other) {
48 ashish 17493
      if (!getClass().equals(other.getClass())) {
17494
        return getClass().getName().compareTo(other.getClass().getName());
17495
      }
17496
 
17497
      int lastComparison = 0;
553 chandransh 17498
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 17499
 
17500
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17501
      if (lastComparison != 0) {
17502
        return lastComparison;
17503
      }
17504
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17505
      if (lastComparison != 0) {
17506
        return lastComparison;
17507
      }
553 chandransh 17508
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 17509
      if (lastComparison != 0) {
17510
        return lastComparison;
17511
      }
553 chandransh 17512
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 17513
      if (lastComparison != 0) {
17514
        return lastComparison;
17515
      }
17516
      return 0;
17517
    }
17518
 
17519
    public void read(TProtocol iprot) throws TException {
17520
      TField field;
17521
      iprot.readStructBegin();
17522
      while (true)
17523
      {
17524
        field = iprot.readFieldBegin();
17525
        if (field.type == TType.STOP) { 
17526
          break;
17527
        }
17528
        _Fields fieldId = _Fields.findByThriftId(field.id);
17529
        if (fieldId == null) {
17530
          TProtocolUtil.skip(iprot, field.type);
17531
        } else {
17532
          switch (fieldId) {
17533
            case SUCCESS:
553 chandransh 17534
              if (field.type == TType.LIST) {
17535
                {
771 rajveer 17536
                  TList _list20 = iprot.readListBegin();
17537
                  this.success = new ArrayList<Cart>(_list20.size);
17538
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
553 chandransh 17539
                  {
771 rajveer 17540
                    Cart _elem22;
17541
                    _elem22 = new Cart();
17542
                    _elem22.read(iprot);
17543
                    this.success.add(_elem22);
553 chandransh 17544
                  }
17545
                  iprot.readListEnd();
17546
                }
48 ashish 17547
              } else { 
17548
                TProtocolUtil.skip(iprot, field.type);
17549
              }
17550
              break;
553 chandransh 17551
            case SCX:
48 ashish 17552
              if (field.type == TType.STRUCT) {
553 chandransh 17553
                this.scx = new ShoppingCartException();
17554
                this.scx.read(iprot);
48 ashish 17555
              } else { 
17556
                TProtocolUtil.skip(iprot, field.type);
17557
              }
17558
              break;
17559
          }
17560
          iprot.readFieldEnd();
17561
        }
17562
      }
17563
      iprot.readStructEnd();
17564
      validate();
17565
    }
17566
 
17567
    public void write(TProtocol oprot) throws TException {
17568
      oprot.writeStructBegin(STRUCT_DESC);
17569
 
17570
      if (this.isSetSuccess()) {
17571
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 17572
        {
17573
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 17574
          for (Cart _iter23 : this.success)
553 chandransh 17575
          {
771 rajveer 17576
            _iter23.write(oprot);
553 chandransh 17577
          }
17578
          oprot.writeListEnd();
17579
        }
48 ashish 17580
        oprot.writeFieldEnd();
553 chandransh 17581
      } else if (this.isSetScx()) {
17582
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17583
        this.scx.write(oprot);
48 ashish 17584
        oprot.writeFieldEnd();
17585
      }
17586
      oprot.writeFieldStop();
17587
      oprot.writeStructEnd();
17588
    }
17589
 
17590
    @Override
17591
    public String toString() {
553 chandransh 17592
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 17593
      boolean first = true;
17594
 
17595
      sb.append("success:");
553 chandransh 17596
      if (this.success == null) {
17597
        sb.append("null");
17598
      } else {
17599
        sb.append(this.success);
17600
      }
48 ashish 17601
      first = false;
17602
      if (!first) sb.append(", ");
553 chandransh 17603
      sb.append("scx:");
17604
      if (this.scx == null) {
48 ashish 17605
        sb.append("null");
17606
      } else {
553 chandransh 17607
        sb.append(this.scx);
48 ashish 17608
      }
17609
      first = false;
17610
      sb.append(")");
17611
      return sb.toString();
17612
    }
17613
 
17614
    public void validate() throws TException {
17615
      // check for required fields
17616
    }
17617
 
17618
  }
17619
 
553 chandransh 17620
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
17621
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 17622
 
553 chandransh 17623
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 17624
 
553 chandransh 17625
    private CartStatus status;
48 ashish 17626
 
17627
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17628
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17629
      /**
17630
       * 
17631
       * @see CartStatus
17632
       */
17633
      STATUS((short)1, "status");
48 ashish 17634
 
17635
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17636
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17637
 
17638
      static {
17639
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17640
          byId.put((int)field._thriftId, field);
17641
          byName.put(field.getFieldName(), field);
17642
        }
17643
      }
17644
 
17645
      /**
17646
       * Find the _Fields constant that matches fieldId, or null if its not found.
17647
       */
17648
      public static _Fields findByThriftId(int fieldId) {
17649
        return byId.get(fieldId);
17650
      }
17651
 
17652
      /**
17653
       * Find the _Fields constant that matches fieldId, throwing an exception
17654
       * if it is not found.
17655
       */
17656
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17657
        _Fields fields = findByThriftId(fieldId);
17658
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17659
        return fields;
17660
      }
17661
 
17662
      /**
17663
       * Find the _Fields constant that matches name, or null if its not found.
17664
       */
17665
      public static _Fields findByName(String name) {
17666
        return byName.get(name);
17667
      }
17668
 
17669
      private final short _thriftId;
17670
      private final String _fieldName;
17671
 
17672
      _Fields(short thriftId, String fieldName) {
17673
        _thriftId = thriftId;
17674
        _fieldName = fieldName;
17675
      }
17676
 
17677
      public short getThriftFieldId() {
17678
        return _thriftId;
17679
      }
17680
 
17681
      public String getFieldName() {
17682
        return _fieldName;
17683
      }
17684
    }
17685
 
17686
    // isset id assignments
553 chandransh 17687
 
17688
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17689
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
17690
          new EnumMetaData(TType.ENUM, CartStatus.class)));
17691
    }});
17692
 
17693
    static {
17694
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
17695
    }
17696
 
17697
    public getCartsByStatus_args() {
17698
    }
17699
 
17700
    public getCartsByStatus_args(
17701
      CartStatus status)
17702
    {
17703
      this();
17704
      this.status = status;
17705
    }
17706
 
17707
    /**
17708
     * Performs a deep copy on <i>other</i>.
17709
     */
17710
    public getCartsByStatus_args(getCartsByStatus_args other) {
17711
      if (other.isSetStatus()) {
17712
        this.status = other.status;
17713
      }
17714
    }
17715
 
17716
    public getCartsByStatus_args deepCopy() {
17717
      return new getCartsByStatus_args(this);
17718
    }
17719
 
17720
    @Deprecated
17721
    public getCartsByStatus_args clone() {
17722
      return new getCartsByStatus_args(this);
17723
    }
17724
 
17725
    /**
17726
     * 
17727
     * @see CartStatus
17728
     */
17729
    public CartStatus getStatus() {
17730
      return this.status;
17731
    }
17732
 
17733
    /**
17734
     * 
17735
     * @see CartStatus
17736
     */
17737
    public getCartsByStatus_args setStatus(CartStatus status) {
17738
      this.status = status;
17739
      return this;
17740
    }
17741
 
17742
    public void unsetStatus() {
17743
      this.status = null;
17744
    }
17745
 
17746
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
17747
    public boolean isSetStatus() {
17748
      return this.status != null;
17749
    }
17750
 
17751
    public void setStatusIsSet(boolean value) {
17752
      if (!value) {
17753
        this.status = null;
17754
      }
17755
    }
17756
 
17757
    public void setFieldValue(_Fields field, Object value) {
17758
      switch (field) {
17759
      case STATUS:
17760
        if (value == null) {
17761
          unsetStatus();
17762
        } else {
17763
          setStatus((CartStatus)value);
17764
        }
17765
        break;
17766
 
17767
      }
17768
    }
17769
 
17770
    public void setFieldValue(int fieldID, Object value) {
17771
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17772
    }
17773
 
17774
    public Object getFieldValue(_Fields field) {
17775
      switch (field) {
17776
      case STATUS:
17777
        return getStatus();
17778
 
17779
      }
17780
      throw new IllegalStateException();
17781
    }
17782
 
17783
    public Object getFieldValue(int fieldId) {
17784
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17785
    }
17786
 
17787
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17788
    public boolean isSet(_Fields field) {
17789
      switch (field) {
17790
      case STATUS:
17791
        return isSetStatus();
17792
      }
17793
      throw new IllegalStateException();
17794
    }
17795
 
17796
    public boolean isSet(int fieldID) {
17797
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17798
    }
17799
 
17800
    @Override
17801
    public boolean equals(Object that) {
17802
      if (that == null)
17803
        return false;
17804
      if (that instanceof getCartsByStatus_args)
17805
        return this.equals((getCartsByStatus_args)that);
17806
      return false;
17807
    }
17808
 
17809
    public boolean equals(getCartsByStatus_args that) {
17810
      if (that == null)
17811
        return false;
17812
 
17813
      boolean this_present_status = true && this.isSetStatus();
17814
      boolean that_present_status = true && that.isSetStatus();
17815
      if (this_present_status || that_present_status) {
17816
        if (!(this_present_status && that_present_status))
17817
          return false;
17818
        if (!this.status.equals(that.status))
17819
          return false;
17820
      }
17821
 
17822
      return true;
17823
    }
17824
 
17825
    @Override
17826
    public int hashCode() {
17827
      return 0;
17828
    }
17829
 
17830
    public int compareTo(getCartsByStatus_args other) {
17831
      if (!getClass().equals(other.getClass())) {
17832
        return getClass().getName().compareTo(other.getClass().getName());
17833
      }
17834
 
17835
      int lastComparison = 0;
17836
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
17837
 
17838
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
17839
      if (lastComparison != 0) {
17840
        return lastComparison;
17841
      }
17842
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
17843
      if (lastComparison != 0) {
17844
        return lastComparison;
17845
      }
17846
      return 0;
17847
    }
17848
 
17849
    public void read(TProtocol iprot) throws TException {
17850
      TField field;
17851
      iprot.readStructBegin();
17852
      while (true)
17853
      {
17854
        field = iprot.readFieldBegin();
17855
        if (field.type == TType.STOP) { 
17856
          break;
17857
        }
17858
        _Fields fieldId = _Fields.findByThriftId(field.id);
17859
        if (fieldId == null) {
17860
          TProtocolUtil.skip(iprot, field.type);
17861
        } else {
17862
          switch (fieldId) {
17863
            case STATUS:
17864
              if (field.type == TType.I32) {
17865
                this.status = CartStatus.findByValue(iprot.readI32());
17866
              } else { 
17867
                TProtocolUtil.skip(iprot, field.type);
17868
              }
17869
              break;
17870
          }
17871
          iprot.readFieldEnd();
17872
        }
17873
      }
17874
      iprot.readStructEnd();
17875
      validate();
17876
    }
17877
 
17878
    public void write(TProtocol oprot) throws TException {
17879
      validate();
17880
 
17881
      oprot.writeStructBegin(STRUCT_DESC);
17882
      if (this.status != null) {
17883
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
17884
        oprot.writeI32(this.status.getValue());
17885
        oprot.writeFieldEnd();
17886
      }
17887
      oprot.writeFieldStop();
17888
      oprot.writeStructEnd();
17889
    }
17890
 
17891
    @Override
17892
    public String toString() {
17893
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
17894
      boolean first = true;
17895
 
17896
      sb.append("status:");
17897
      if (this.status == null) {
17898
        sb.append("null");
17899
      } else {
17900
        String status_name = status.name();
17901
        if (status_name != null) {
17902
          sb.append(status_name);
17903
          sb.append(" (");
17904
        }
17905
        sb.append(this.status);
17906
        if (status_name != null) {
17907
          sb.append(")");
17908
        }
17909
      }
17910
      first = false;
17911
      sb.append(")");
17912
      return sb.toString();
17913
    }
17914
 
17915
    public void validate() throws TException {
17916
      // check for required fields
17917
    }
17918
 
17919
  }
17920
 
17921
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
17922
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
17923
 
17924
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
17925
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
17926
 
17927
    private List<Cart> success;
17928
    private ShoppingCartException scx;
17929
 
17930
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17931
    public enum _Fields implements TFieldIdEnum {
17932
      SUCCESS((short)0, "success"),
17933
      SCX((short)1, "scx");
17934
 
17935
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17936
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17937
 
17938
      static {
17939
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17940
          byId.put((int)field._thriftId, field);
17941
          byName.put(field.getFieldName(), field);
17942
        }
17943
      }
17944
 
17945
      /**
17946
       * Find the _Fields constant that matches fieldId, or null if its not found.
17947
       */
17948
      public static _Fields findByThriftId(int fieldId) {
17949
        return byId.get(fieldId);
17950
      }
17951
 
17952
      /**
17953
       * Find the _Fields constant that matches fieldId, throwing an exception
17954
       * if it is not found.
17955
       */
17956
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17957
        _Fields fields = findByThriftId(fieldId);
17958
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17959
        return fields;
17960
      }
17961
 
17962
      /**
17963
       * Find the _Fields constant that matches name, or null if its not found.
17964
       */
17965
      public static _Fields findByName(String name) {
17966
        return byName.get(name);
17967
      }
17968
 
17969
      private final short _thriftId;
17970
      private final String _fieldName;
17971
 
17972
      _Fields(short thriftId, String fieldName) {
17973
        _thriftId = thriftId;
17974
        _fieldName = fieldName;
17975
      }
17976
 
17977
      public short getThriftFieldId() {
17978
        return _thriftId;
17979
      }
17980
 
17981
      public String getFieldName() {
17982
        return _fieldName;
17983
      }
17984
    }
17985
 
17986
    // isset id assignments
17987
 
17988
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17989
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17990
          new ListMetaData(TType.LIST, 
17991
              new StructMetaData(TType.STRUCT, Cart.class))));
17992
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
17993
          new FieldValueMetaData(TType.STRUCT)));
17994
    }});
17995
 
17996
    static {
17997
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
17998
    }
17999
 
18000
    public getCartsByStatus_result() {
18001
    }
18002
 
18003
    public getCartsByStatus_result(
18004
      List<Cart> success,
18005
      ShoppingCartException scx)
18006
    {
18007
      this();
18008
      this.success = success;
18009
      this.scx = scx;
18010
    }
18011
 
18012
    /**
18013
     * Performs a deep copy on <i>other</i>.
18014
     */
18015
    public getCartsByStatus_result(getCartsByStatus_result other) {
18016
      if (other.isSetSuccess()) {
18017
        List<Cart> __this__success = new ArrayList<Cart>();
18018
        for (Cart other_element : other.success) {
18019
          __this__success.add(new Cart(other_element));
18020
        }
18021
        this.success = __this__success;
18022
      }
18023
      if (other.isSetScx()) {
18024
        this.scx = new ShoppingCartException(other.scx);
18025
      }
18026
    }
18027
 
18028
    public getCartsByStatus_result deepCopy() {
18029
      return new getCartsByStatus_result(this);
18030
    }
18031
 
18032
    @Deprecated
18033
    public getCartsByStatus_result clone() {
18034
      return new getCartsByStatus_result(this);
18035
    }
18036
 
18037
    public int getSuccessSize() {
18038
      return (this.success == null) ? 0 : this.success.size();
18039
    }
18040
 
18041
    public java.util.Iterator<Cart> getSuccessIterator() {
18042
      return (this.success == null) ? null : this.success.iterator();
18043
    }
18044
 
18045
    public void addToSuccess(Cart elem) {
18046
      if (this.success == null) {
18047
        this.success = new ArrayList<Cart>();
18048
      }
18049
      this.success.add(elem);
18050
    }
18051
 
18052
    public List<Cart> getSuccess() {
18053
      return this.success;
18054
    }
18055
 
18056
    public getCartsByStatus_result setSuccess(List<Cart> success) {
18057
      this.success = success;
18058
      return this;
18059
    }
18060
 
18061
    public void unsetSuccess() {
18062
      this.success = null;
18063
    }
18064
 
18065
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18066
    public boolean isSetSuccess() {
18067
      return this.success != null;
18068
    }
18069
 
18070
    public void setSuccessIsSet(boolean value) {
18071
      if (!value) {
18072
        this.success = null;
18073
      }
18074
    }
18075
 
18076
    public ShoppingCartException getScx() {
18077
      return this.scx;
18078
    }
18079
 
18080
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
18081
      this.scx = scx;
18082
      return this;
18083
    }
18084
 
18085
    public void unsetScx() {
18086
      this.scx = null;
18087
    }
18088
 
18089
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18090
    public boolean isSetScx() {
18091
      return this.scx != null;
18092
    }
18093
 
18094
    public void setScxIsSet(boolean value) {
18095
      if (!value) {
18096
        this.scx = null;
18097
      }
18098
    }
18099
 
18100
    public void setFieldValue(_Fields field, Object value) {
18101
      switch (field) {
18102
      case SUCCESS:
18103
        if (value == null) {
18104
          unsetSuccess();
18105
        } else {
18106
          setSuccess((List<Cart>)value);
18107
        }
18108
        break;
18109
 
18110
      case SCX:
18111
        if (value == null) {
18112
          unsetScx();
18113
        } else {
18114
          setScx((ShoppingCartException)value);
18115
        }
18116
        break;
18117
 
18118
      }
18119
    }
18120
 
18121
    public void setFieldValue(int fieldID, Object value) {
18122
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18123
    }
18124
 
18125
    public Object getFieldValue(_Fields field) {
18126
      switch (field) {
18127
      case SUCCESS:
18128
        return getSuccess();
18129
 
18130
      case SCX:
18131
        return getScx();
18132
 
18133
      }
18134
      throw new IllegalStateException();
18135
    }
18136
 
18137
    public Object getFieldValue(int fieldId) {
18138
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18139
    }
18140
 
18141
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18142
    public boolean isSet(_Fields field) {
18143
      switch (field) {
18144
      case SUCCESS:
18145
        return isSetSuccess();
18146
      case SCX:
18147
        return isSetScx();
18148
      }
18149
      throw new IllegalStateException();
18150
    }
18151
 
18152
    public boolean isSet(int fieldID) {
18153
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18154
    }
18155
 
18156
    @Override
18157
    public boolean equals(Object that) {
18158
      if (that == null)
18159
        return false;
18160
      if (that instanceof getCartsByStatus_result)
18161
        return this.equals((getCartsByStatus_result)that);
18162
      return false;
18163
    }
18164
 
18165
    public boolean equals(getCartsByStatus_result that) {
18166
      if (that == null)
18167
        return false;
18168
 
18169
      boolean this_present_success = true && this.isSetSuccess();
18170
      boolean that_present_success = true && that.isSetSuccess();
18171
      if (this_present_success || that_present_success) {
18172
        if (!(this_present_success && that_present_success))
18173
          return false;
18174
        if (!this.success.equals(that.success))
18175
          return false;
18176
      }
18177
 
18178
      boolean this_present_scx = true && this.isSetScx();
18179
      boolean that_present_scx = true && that.isSetScx();
18180
      if (this_present_scx || that_present_scx) {
18181
        if (!(this_present_scx && that_present_scx))
18182
          return false;
18183
        if (!this.scx.equals(that.scx))
18184
          return false;
18185
      }
18186
 
18187
      return true;
18188
    }
18189
 
18190
    @Override
18191
    public int hashCode() {
18192
      return 0;
18193
    }
18194
 
18195
    public int compareTo(getCartsByStatus_result other) {
18196
      if (!getClass().equals(other.getClass())) {
18197
        return getClass().getName().compareTo(other.getClass().getName());
18198
      }
18199
 
18200
      int lastComparison = 0;
18201
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
18202
 
18203
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18204
      if (lastComparison != 0) {
18205
        return lastComparison;
18206
      }
18207
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18208
      if (lastComparison != 0) {
18209
        return lastComparison;
18210
      }
18211
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
18212
      if (lastComparison != 0) {
18213
        return lastComparison;
18214
      }
18215
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
18216
      if (lastComparison != 0) {
18217
        return lastComparison;
18218
      }
18219
      return 0;
18220
    }
18221
 
18222
    public void read(TProtocol iprot) throws TException {
18223
      TField field;
18224
      iprot.readStructBegin();
18225
      while (true)
18226
      {
18227
        field = iprot.readFieldBegin();
18228
        if (field.type == TType.STOP) { 
18229
          break;
18230
        }
18231
        _Fields fieldId = _Fields.findByThriftId(field.id);
18232
        if (fieldId == null) {
18233
          TProtocolUtil.skip(iprot, field.type);
18234
        } else {
18235
          switch (fieldId) {
18236
            case SUCCESS:
18237
              if (field.type == TType.LIST) {
18238
                {
771 rajveer 18239
                  TList _list24 = iprot.readListBegin();
18240
                  this.success = new ArrayList<Cart>(_list24.size);
18241
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
553 chandransh 18242
                  {
771 rajveer 18243
                    Cart _elem26;
18244
                    _elem26 = new Cart();
18245
                    _elem26.read(iprot);
18246
                    this.success.add(_elem26);
553 chandransh 18247
                  }
18248
                  iprot.readListEnd();
18249
                }
18250
              } else { 
18251
                TProtocolUtil.skip(iprot, field.type);
18252
              }
18253
              break;
18254
            case SCX:
18255
              if (field.type == TType.STRUCT) {
18256
                this.scx = new ShoppingCartException();
18257
                this.scx.read(iprot);
18258
              } else { 
18259
                TProtocolUtil.skip(iprot, field.type);
18260
              }
18261
              break;
18262
          }
18263
          iprot.readFieldEnd();
18264
        }
18265
      }
18266
      iprot.readStructEnd();
18267
      validate();
18268
    }
18269
 
18270
    public void write(TProtocol oprot) throws TException {
18271
      oprot.writeStructBegin(STRUCT_DESC);
18272
 
18273
      if (this.isSetSuccess()) {
18274
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18275
        {
18276
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 18277
          for (Cart _iter27 : this.success)
553 chandransh 18278
          {
771 rajveer 18279
            _iter27.write(oprot);
553 chandransh 18280
          }
18281
          oprot.writeListEnd();
18282
        }
18283
        oprot.writeFieldEnd();
18284
      } else if (this.isSetScx()) {
18285
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18286
        this.scx.write(oprot);
18287
        oprot.writeFieldEnd();
18288
      }
18289
      oprot.writeFieldStop();
18290
      oprot.writeStructEnd();
18291
    }
18292
 
18293
    @Override
18294
    public String toString() {
18295
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
18296
      boolean first = true;
18297
 
18298
      sb.append("success:");
18299
      if (this.success == null) {
18300
        sb.append("null");
18301
      } else {
18302
        sb.append(this.success);
18303
      }
18304
      first = false;
18305
      if (!first) sb.append(", ");
18306
      sb.append("scx:");
18307
      if (this.scx == null) {
18308
        sb.append("null");
18309
      } else {
18310
        sb.append(this.scx);
18311
      }
18312
      first = false;
18313
      sb.append(")");
18314
      return sb.toString();
18315
    }
18316
 
18317
    public void validate() throws TException {
18318
      // check for required fields
18319
    }
18320
 
18321
  }
18322
 
18323
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
18324
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
18325
 
18326
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
18327
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
18328
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
18329
 
18330
    private long from_time;
18331
    private long to_time;
18332
    private CartStatus status;
18333
 
18334
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18335
    public enum _Fields implements TFieldIdEnum {
18336
      FROM_TIME((short)1, "from_time"),
18337
      TO_TIME((short)2, "to_time"),
18338
      /**
18339
       * 
18340
       * @see CartStatus
18341
       */
18342
      STATUS((short)3, "status");
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
18396
    private static final int __FROM_TIME_ISSET_ID = 0;
18397
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 18398
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 18399
 
18400
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18401
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 18402
          new FieldValueMetaData(TType.I64)));
553 chandransh 18403
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
18404
          new FieldValueMetaData(TType.I64)));
18405
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
18406
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 18407
    }});
18408
 
18409
    static {
553 chandransh 18410
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 18411
    }
18412
 
553 chandransh 18413
    public getCartsByTime_args() {
48 ashish 18414
    }
18415
 
553 chandransh 18416
    public getCartsByTime_args(
18417
      long from_time,
18418
      long to_time,
18419
      CartStatus status)
48 ashish 18420
    {
18421
      this();
553 chandransh 18422
      this.from_time = from_time;
18423
      setFrom_timeIsSet(true);
18424
      this.to_time = to_time;
18425
      setTo_timeIsSet(true);
18426
      this.status = status;
48 ashish 18427
    }
18428
 
18429
    /**
18430
     * Performs a deep copy on <i>other</i>.
18431
     */
553 chandransh 18432
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 18433
      __isset_bit_vector.clear();
18434
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 18435
      this.from_time = other.from_time;
18436
      this.to_time = other.to_time;
18437
      if (other.isSetStatus()) {
18438
        this.status = other.status;
18439
      }
48 ashish 18440
    }
18441
 
553 chandransh 18442
    public getCartsByTime_args deepCopy() {
18443
      return new getCartsByTime_args(this);
48 ashish 18444
    }
18445
 
18446
    @Deprecated
553 chandransh 18447
    public getCartsByTime_args clone() {
18448
      return new getCartsByTime_args(this);
48 ashish 18449
    }
18450
 
553 chandransh 18451
    public long getFrom_time() {
18452
      return this.from_time;
48 ashish 18453
    }
18454
 
553 chandransh 18455
    public getCartsByTime_args setFrom_time(long from_time) {
18456
      this.from_time = from_time;
18457
      setFrom_timeIsSet(true);
48 ashish 18458
      return this;
18459
    }
18460
 
553 chandransh 18461
    public void unsetFrom_time() {
18462
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 18463
    }
18464
 
553 chandransh 18465
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
18466
    public boolean isSetFrom_time() {
18467
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 18468
    }
18469
 
553 chandransh 18470
    public void setFrom_timeIsSet(boolean value) {
18471
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 18472
    }
18473
 
553 chandransh 18474
    public long getTo_time() {
18475
      return this.to_time;
123 ashish 18476
    }
18477
 
553 chandransh 18478
    public getCartsByTime_args setTo_time(long to_time) {
18479
      this.to_time = to_time;
18480
      setTo_timeIsSet(true);
123 ashish 18481
      return this;
18482
    }
18483
 
553 chandransh 18484
    public void unsetTo_time() {
18485
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 18486
    }
18487
 
553 chandransh 18488
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
18489
    public boolean isSetTo_time() {
18490
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 18491
    }
18492
 
553 chandransh 18493
    public void setTo_timeIsSet(boolean value) {
18494
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 18495
    }
18496
 
553 chandransh 18497
    /**
18498
     * 
18499
     * @see CartStatus
18500
     */
18501
    public CartStatus getStatus() {
18502
      return this.status;
18503
    }
18504
 
18505
    /**
18506
     * 
18507
     * @see CartStatus
18508
     */
18509
    public getCartsByTime_args setStatus(CartStatus status) {
18510
      this.status = status;
18511
      return this;
18512
    }
18513
 
18514
    public void unsetStatus() {
18515
      this.status = null;
18516
    }
18517
 
18518
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
18519
    public boolean isSetStatus() {
18520
      return this.status != null;
18521
    }
18522
 
18523
    public void setStatusIsSet(boolean value) {
18524
      if (!value) {
18525
        this.status = null;
18526
      }
18527
    }
18528
 
48 ashish 18529
    public void setFieldValue(_Fields field, Object value) {
18530
      switch (field) {
553 chandransh 18531
      case FROM_TIME:
48 ashish 18532
        if (value == null) {
553 chandransh 18533
          unsetFrom_time();
48 ashish 18534
        } else {
553 chandransh 18535
          setFrom_time((Long)value);
48 ashish 18536
        }
18537
        break;
18538
 
553 chandransh 18539
      case TO_TIME:
123 ashish 18540
        if (value == null) {
553 chandransh 18541
          unsetTo_time();
123 ashish 18542
        } else {
553 chandransh 18543
          setTo_time((Long)value);
123 ashish 18544
        }
18545
        break;
18546
 
553 chandransh 18547
      case STATUS:
18548
        if (value == null) {
18549
          unsetStatus();
18550
        } else {
18551
          setStatus((CartStatus)value);
18552
        }
18553
        break;
18554
 
48 ashish 18555
      }
18556
    }
18557
 
18558
    public void setFieldValue(int fieldID, Object value) {
18559
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18560
    }
18561
 
18562
    public Object getFieldValue(_Fields field) {
18563
      switch (field) {
553 chandransh 18564
      case FROM_TIME:
18565
        return new Long(getFrom_time());
48 ashish 18566
 
553 chandransh 18567
      case TO_TIME:
18568
        return new Long(getTo_time());
123 ashish 18569
 
553 chandransh 18570
      case STATUS:
18571
        return getStatus();
18572
 
48 ashish 18573
      }
18574
      throw new IllegalStateException();
18575
    }
18576
 
18577
    public Object getFieldValue(int fieldId) {
18578
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18579
    }
18580
 
18581
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18582
    public boolean isSet(_Fields field) {
18583
      switch (field) {
553 chandransh 18584
      case FROM_TIME:
18585
        return isSetFrom_time();
18586
      case TO_TIME:
18587
        return isSetTo_time();
18588
      case STATUS:
18589
        return isSetStatus();
48 ashish 18590
      }
18591
      throw new IllegalStateException();
18592
    }
18593
 
18594
    public boolean isSet(int fieldID) {
18595
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18596
    }
18597
 
18598
    @Override
18599
    public boolean equals(Object that) {
18600
      if (that == null)
18601
        return false;
553 chandransh 18602
      if (that instanceof getCartsByTime_args)
18603
        return this.equals((getCartsByTime_args)that);
48 ashish 18604
      return false;
18605
    }
18606
 
553 chandransh 18607
    public boolean equals(getCartsByTime_args that) {
48 ashish 18608
      if (that == null)
18609
        return false;
18610
 
553 chandransh 18611
      boolean this_present_from_time = true;
18612
      boolean that_present_from_time = true;
18613
      if (this_present_from_time || that_present_from_time) {
18614
        if (!(this_present_from_time && that_present_from_time))
48 ashish 18615
          return false;
553 chandransh 18616
        if (this.from_time != that.from_time)
48 ashish 18617
          return false;
18618
      }
18619
 
553 chandransh 18620
      boolean this_present_to_time = true;
18621
      boolean that_present_to_time = true;
18622
      if (this_present_to_time || that_present_to_time) {
18623
        if (!(this_present_to_time && that_present_to_time))
123 ashish 18624
          return false;
553 chandransh 18625
        if (this.to_time != that.to_time)
123 ashish 18626
          return false;
18627
      }
18628
 
553 chandransh 18629
      boolean this_present_status = true && this.isSetStatus();
18630
      boolean that_present_status = true && that.isSetStatus();
18631
      if (this_present_status || that_present_status) {
18632
        if (!(this_present_status && that_present_status))
18633
          return false;
18634
        if (!this.status.equals(that.status))
18635
          return false;
18636
      }
18637
 
48 ashish 18638
      return true;
18639
    }
18640
 
18641
    @Override
18642
    public int hashCode() {
18643
      return 0;
18644
    }
18645
 
553 chandransh 18646
    public int compareTo(getCartsByTime_args other) {
48 ashish 18647
      if (!getClass().equals(other.getClass())) {
18648
        return getClass().getName().compareTo(other.getClass().getName());
18649
      }
18650
 
18651
      int lastComparison = 0;
553 chandransh 18652
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 18653
 
553 chandransh 18654
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 18655
      if (lastComparison != 0) {
18656
        return lastComparison;
18657
      }
553 chandransh 18658
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 18659
      if (lastComparison != 0) {
18660
        return lastComparison;
18661
      }
553 chandransh 18662
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 18663
      if (lastComparison != 0) {
18664
        return lastComparison;
18665
      }
553 chandransh 18666
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 18667
      if (lastComparison != 0) {
18668
        return lastComparison;
18669
      }
553 chandransh 18670
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
18671
      if (lastComparison != 0) {
18672
        return lastComparison;
18673
      }
18674
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
18675
      if (lastComparison != 0) {
18676
        return lastComparison;
18677
      }
48 ashish 18678
      return 0;
18679
    }
18680
 
18681
    public void read(TProtocol iprot) throws TException {
18682
      TField field;
18683
      iprot.readStructBegin();
18684
      while (true)
18685
      {
18686
        field = iprot.readFieldBegin();
18687
        if (field.type == TType.STOP) { 
18688
          break;
18689
        }
18690
        _Fields fieldId = _Fields.findByThriftId(field.id);
18691
        if (fieldId == null) {
18692
          TProtocolUtil.skip(iprot, field.type);
18693
        } else {
18694
          switch (fieldId) {
553 chandransh 18695
            case FROM_TIME:
48 ashish 18696
              if (field.type == TType.I64) {
553 chandransh 18697
                this.from_time = iprot.readI64();
18698
                setFrom_timeIsSet(true);
48 ashish 18699
              } else { 
18700
                TProtocolUtil.skip(iprot, field.type);
18701
              }
18702
              break;
553 chandransh 18703
            case TO_TIME:
18704
              if (field.type == TType.I64) {
18705
                this.to_time = iprot.readI64();
18706
                setTo_timeIsSet(true);
123 ashish 18707
              } else { 
18708
                TProtocolUtil.skip(iprot, field.type);
18709
              }
18710
              break;
553 chandransh 18711
            case STATUS:
18712
              if (field.type == TType.I32) {
18713
                this.status = CartStatus.findByValue(iprot.readI32());
18714
              } else { 
18715
                TProtocolUtil.skip(iprot, field.type);
18716
              }
18717
              break;
48 ashish 18718
          }
18719
          iprot.readFieldEnd();
18720
        }
18721
      }
18722
      iprot.readStructEnd();
18723
      validate();
18724
    }
18725
 
18726
    public void write(TProtocol oprot) throws TException {
18727
      validate();
18728
 
18729
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 18730
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
18731
      oprot.writeI64(this.from_time);
48 ashish 18732
      oprot.writeFieldEnd();
553 chandransh 18733
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
18734
      oprot.writeI64(this.to_time);
123 ashish 18735
      oprot.writeFieldEnd();
553 chandransh 18736
      if (this.status != null) {
18737
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
18738
        oprot.writeI32(this.status.getValue());
18739
        oprot.writeFieldEnd();
18740
      }
48 ashish 18741
      oprot.writeFieldStop();
18742
      oprot.writeStructEnd();
18743
    }
18744
 
18745
    @Override
18746
    public String toString() {
553 chandransh 18747
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 18748
      boolean first = true;
18749
 
553 chandransh 18750
      sb.append("from_time:");
18751
      sb.append(this.from_time);
48 ashish 18752
      first = false;
123 ashish 18753
      if (!first) sb.append(", ");
553 chandransh 18754
      sb.append("to_time:");
18755
      sb.append(this.to_time);
123 ashish 18756
      first = false;
553 chandransh 18757
      if (!first) sb.append(", ");
18758
      sb.append("status:");
18759
      if (this.status == null) {
18760
        sb.append("null");
18761
      } else {
18762
        String status_name = status.name();
18763
        if (status_name != null) {
18764
          sb.append(status_name);
18765
          sb.append(" (");
18766
        }
18767
        sb.append(this.status);
18768
        if (status_name != null) {
18769
          sb.append(")");
18770
        }
18771
      }
18772
      first = false;
48 ashish 18773
      sb.append(")");
18774
      return sb.toString();
18775
    }
18776
 
18777
    public void validate() throws TException {
18778
      // check for required fields
18779
    }
18780
 
18781
  }
18782
 
553 chandransh 18783
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
18784
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 18785
 
553 chandransh 18786
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
18787
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 18788
 
553 chandransh 18789
    private List<Cart> success;
18790
    private ShoppingCartException scx;
48 ashish 18791
 
18792
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18793
    public enum _Fields implements TFieldIdEnum {
18794
      SUCCESS((short)0, "success"),
553 chandransh 18795
      SCX((short)1, "scx");
48 ashish 18796
 
18797
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18798
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18799
 
18800
      static {
18801
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18802
          byId.put((int)field._thriftId, field);
18803
          byName.put(field.getFieldName(), field);
18804
        }
18805
      }
18806
 
18807
      /**
18808
       * Find the _Fields constant that matches fieldId, or null if its not found.
18809
       */
18810
      public static _Fields findByThriftId(int fieldId) {
18811
        return byId.get(fieldId);
18812
      }
18813
 
18814
      /**
18815
       * Find the _Fields constant that matches fieldId, throwing an exception
18816
       * if it is not found.
18817
       */
18818
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18819
        _Fields fields = findByThriftId(fieldId);
18820
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18821
        return fields;
18822
      }
18823
 
18824
      /**
18825
       * Find the _Fields constant that matches name, or null if its not found.
18826
       */
18827
      public static _Fields findByName(String name) {
18828
        return byName.get(name);
18829
      }
18830
 
18831
      private final short _thriftId;
18832
      private final String _fieldName;
18833
 
18834
      _Fields(short thriftId, String fieldName) {
18835
        _thriftId = thriftId;
18836
        _fieldName = fieldName;
18837
      }
18838
 
18839
      public short getThriftFieldId() {
18840
        return _thriftId;
18841
      }
18842
 
18843
      public String getFieldName() {
18844
        return _fieldName;
18845
      }
18846
    }
18847
 
18848
    // isset id assignments
18849
 
18850
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18851
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 18852
          new ListMetaData(TType.LIST, 
18853
              new StructMetaData(TType.STRUCT, Cart.class))));
18854
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 18855
          new FieldValueMetaData(TType.STRUCT)));
18856
    }});
18857
 
18858
    static {
553 chandransh 18859
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 18860
    }
18861
 
553 chandransh 18862
    public getCartsByTime_result() {
48 ashish 18863
    }
18864
 
553 chandransh 18865
    public getCartsByTime_result(
18866
      List<Cart> success,
18867
      ShoppingCartException scx)
48 ashish 18868
    {
18869
      this();
18870
      this.success = success;
553 chandransh 18871
      this.scx = scx;
48 ashish 18872
    }
18873
 
18874
    /**
18875
     * Performs a deep copy on <i>other</i>.
18876
     */
553 chandransh 18877
    public getCartsByTime_result(getCartsByTime_result other) {
18878
      if (other.isSetSuccess()) {
18879
        List<Cart> __this__success = new ArrayList<Cart>();
18880
        for (Cart other_element : other.success) {
18881
          __this__success.add(new Cart(other_element));
18882
        }
18883
        this.success = __this__success;
48 ashish 18884
      }
553 chandransh 18885
      if (other.isSetScx()) {
18886
        this.scx = new ShoppingCartException(other.scx);
18887
      }
48 ashish 18888
    }
18889
 
553 chandransh 18890
    public getCartsByTime_result deepCopy() {
18891
      return new getCartsByTime_result(this);
48 ashish 18892
    }
18893
 
18894
    @Deprecated
553 chandransh 18895
    public getCartsByTime_result clone() {
18896
      return new getCartsByTime_result(this);
48 ashish 18897
    }
18898
 
553 chandransh 18899
    public int getSuccessSize() {
18900
      return (this.success == null) ? 0 : this.success.size();
18901
    }
18902
 
18903
    public java.util.Iterator<Cart> getSuccessIterator() {
18904
      return (this.success == null) ? null : this.success.iterator();
18905
    }
18906
 
18907
    public void addToSuccess(Cart elem) {
18908
      if (this.success == null) {
18909
        this.success = new ArrayList<Cart>();
18910
      }
18911
      this.success.add(elem);
18912
    }
18913
 
18914
    public List<Cart> getSuccess() {
48 ashish 18915
      return this.success;
18916
    }
18917
 
553 chandransh 18918
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 18919
      this.success = success;
18920
      return this;
18921
    }
18922
 
18923
    public void unsetSuccess() {
553 chandransh 18924
      this.success = null;
48 ashish 18925
    }
18926
 
18927
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18928
    public boolean isSetSuccess() {
553 chandransh 18929
      return this.success != null;
48 ashish 18930
    }
18931
 
18932
    public void setSuccessIsSet(boolean value) {
553 chandransh 18933
      if (!value) {
18934
        this.success = null;
18935
      }
48 ashish 18936
    }
18937
 
553 chandransh 18938
    public ShoppingCartException getScx() {
18939
      return this.scx;
48 ashish 18940
    }
18941
 
553 chandransh 18942
    public getCartsByTime_result setScx(ShoppingCartException scx) {
18943
      this.scx = scx;
48 ashish 18944
      return this;
18945
    }
18946
 
553 chandransh 18947
    public void unsetScx() {
18948
      this.scx = null;
48 ashish 18949
    }
18950
 
553 chandransh 18951
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18952
    public boolean isSetScx() {
18953
      return this.scx != null;
48 ashish 18954
    }
18955
 
553 chandransh 18956
    public void setScxIsSet(boolean value) {
48 ashish 18957
      if (!value) {
553 chandransh 18958
        this.scx = null;
48 ashish 18959
      }
18960
    }
18961
 
18962
    public void setFieldValue(_Fields field, Object value) {
18963
      switch (field) {
18964
      case SUCCESS:
18965
        if (value == null) {
18966
          unsetSuccess();
18967
        } else {
553 chandransh 18968
          setSuccess((List<Cart>)value);
48 ashish 18969
        }
18970
        break;
18971
 
553 chandransh 18972
      case SCX:
48 ashish 18973
        if (value == null) {
553 chandransh 18974
          unsetScx();
48 ashish 18975
        } else {
553 chandransh 18976
          setScx((ShoppingCartException)value);
48 ashish 18977
        }
18978
        break;
18979
 
18980
      }
18981
    }
18982
 
18983
    public void setFieldValue(int fieldID, Object value) {
18984
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18985
    }
18986
 
18987
    public Object getFieldValue(_Fields field) {
18988
      switch (field) {
18989
      case SUCCESS:
553 chandransh 18990
        return getSuccess();
48 ashish 18991
 
553 chandransh 18992
      case SCX:
18993
        return getScx();
48 ashish 18994
 
18995
      }
18996
      throw new IllegalStateException();
18997
    }
18998
 
18999
    public Object getFieldValue(int fieldId) {
19000
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19001
    }
19002
 
19003
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19004
    public boolean isSet(_Fields field) {
19005
      switch (field) {
19006
      case SUCCESS:
19007
        return isSetSuccess();
553 chandransh 19008
      case SCX:
19009
        return isSetScx();
48 ashish 19010
      }
19011
      throw new IllegalStateException();
19012
    }
19013
 
19014
    public boolean isSet(int fieldID) {
19015
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19016
    }
19017
 
19018
    @Override
19019
    public boolean equals(Object that) {
19020
      if (that == null)
19021
        return false;
553 chandransh 19022
      if (that instanceof getCartsByTime_result)
19023
        return this.equals((getCartsByTime_result)that);
48 ashish 19024
      return false;
19025
    }
19026
 
553 chandransh 19027
    public boolean equals(getCartsByTime_result that) {
48 ashish 19028
      if (that == null)
19029
        return false;
19030
 
553 chandransh 19031
      boolean this_present_success = true && this.isSetSuccess();
19032
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 19033
      if (this_present_success || that_present_success) {
19034
        if (!(this_present_success && that_present_success))
19035
          return false;
553 chandransh 19036
        if (!this.success.equals(that.success))
48 ashish 19037
          return false;
19038
      }
19039
 
553 chandransh 19040
      boolean this_present_scx = true && this.isSetScx();
19041
      boolean that_present_scx = true && that.isSetScx();
19042
      if (this_present_scx || that_present_scx) {
19043
        if (!(this_present_scx && that_present_scx))
48 ashish 19044
          return false;
553 chandransh 19045
        if (!this.scx.equals(that.scx))
48 ashish 19046
          return false;
19047
      }
19048
 
19049
      return true;
19050
    }
19051
 
19052
    @Override
19053
    public int hashCode() {
19054
      return 0;
19055
    }
19056
 
553 chandransh 19057
    public int compareTo(getCartsByTime_result other) {
48 ashish 19058
      if (!getClass().equals(other.getClass())) {
19059
        return getClass().getName().compareTo(other.getClass().getName());
19060
      }
19061
 
19062
      int lastComparison = 0;
553 chandransh 19063
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 19064
 
19065
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19066
      if (lastComparison != 0) {
19067
        return lastComparison;
19068
      }
19069
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19070
      if (lastComparison != 0) {
19071
        return lastComparison;
19072
      }
553 chandransh 19073
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 19074
      if (lastComparison != 0) {
19075
        return lastComparison;
19076
      }
553 chandransh 19077
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 19078
      if (lastComparison != 0) {
19079
        return lastComparison;
19080
      }
19081
      return 0;
19082
    }
19083
 
19084
    public void read(TProtocol iprot) throws TException {
19085
      TField field;
19086
      iprot.readStructBegin();
19087
      while (true)
19088
      {
19089
        field = iprot.readFieldBegin();
19090
        if (field.type == TType.STOP) { 
19091
          break;
19092
        }
19093
        _Fields fieldId = _Fields.findByThriftId(field.id);
19094
        if (fieldId == null) {
19095
          TProtocolUtil.skip(iprot, field.type);
19096
        } else {
19097
          switch (fieldId) {
19098
            case SUCCESS:
553 chandransh 19099
              if (field.type == TType.LIST) {
19100
                {
771 rajveer 19101
                  TList _list28 = iprot.readListBegin();
19102
                  this.success = new ArrayList<Cart>(_list28.size);
19103
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
553 chandransh 19104
                  {
771 rajveer 19105
                    Cart _elem30;
19106
                    _elem30 = new Cart();
19107
                    _elem30.read(iprot);
19108
                    this.success.add(_elem30);
553 chandransh 19109
                  }
19110
                  iprot.readListEnd();
19111
                }
48 ashish 19112
              } else { 
19113
                TProtocolUtil.skip(iprot, field.type);
19114
              }
19115
              break;
553 chandransh 19116
            case SCX:
48 ashish 19117
              if (field.type == TType.STRUCT) {
553 chandransh 19118
                this.scx = new ShoppingCartException();
19119
                this.scx.read(iprot);
48 ashish 19120
              } else { 
19121
                TProtocolUtil.skip(iprot, field.type);
19122
              }
19123
              break;
19124
          }
19125
          iprot.readFieldEnd();
19126
        }
19127
      }
19128
      iprot.readStructEnd();
19129
      validate();
19130
    }
19131
 
19132
    public void write(TProtocol oprot) throws TException {
19133
      oprot.writeStructBegin(STRUCT_DESC);
19134
 
19135
      if (this.isSetSuccess()) {
19136
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 19137
        {
19138
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 19139
          for (Cart _iter31 : this.success)
553 chandransh 19140
          {
771 rajveer 19141
            _iter31.write(oprot);
553 chandransh 19142
          }
19143
          oprot.writeListEnd();
19144
        }
48 ashish 19145
        oprot.writeFieldEnd();
553 chandransh 19146
      } else if (this.isSetScx()) {
19147
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19148
        this.scx.write(oprot);
48 ashish 19149
        oprot.writeFieldEnd();
19150
      }
19151
      oprot.writeFieldStop();
19152
      oprot.writeStructEnd();
19153
    }
19154
 
19155
    @Override
19156
    public String toString() {
553 chandransh 19157
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 19158
      boolean first = true;
19159
 
19160
      sb.append("success:");
553 chandransh 19161
      if (this.success == null) {
19162
        sb.append("null");
19163
      } else {
19164
        sb.append(this.success);
19165
      }
48 ashish 19166
      first = false;
19167
      if (!first) sb.append(", ");
553 chandransh 19168
      sb.append("scx:");
19169
      if (this.scx == null) {
48 ashish 19170
        sb.append("null");
19171
      } else {
553 chandransh 19172
        sb.append(this.scx);
48 ashish 19173
      }
19174
      first = false;
19175
      sb.append(")");
19176
      return sb.toString();
19177
    }
19178
 
19179
    public void validate() throws TException {
19180
      // check for required fields
19181
    }
19182
 
19183
  }
19184
 
553 chandransh 19185
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
19186
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 19187
 
553 chandransh 19188
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19189
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 19190
 
553 chandransh 19191
    private long cartId;
19192
    private CartStatus status;
48 ashish 19193
 
19194
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19195
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19196
      CART_ID((short)1, "cartId"),
19197
      /**
19198
       * 
19199
       * @see CartStatus
19200
       */
19201
      STATUS((short)2, "status");
48 ashish 19202
 
19203
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19204
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19205
 
19206
      static {
19207
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19208
          byId.put((int)field._thriftId, field);
19209
          byName.put(field.getFieldName(), field);
19210
        }
19211
      }
19212
 
19213
      /**
19214
       * Find the _Fields constant that matches fieldId, or null if its not found.
19215
       */
19216
      public static _Fields findByThriftId(int fieldId) {
19217
        return byId.get(fieldId);
19218
      }
19219
 
19220
      /**
19221
       * Find the _Fields constant that matches fieldId, throwing an exception
19222
       * if it is not found.
19223
       */
19224
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19225
        _Fields fields = findByThriftId(fieldId);
19226
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19227
        return fields;
19228
      }
19229
 
19230
      /**
19231
       * Find the _Fields constant that matches name, or null if its not found.
19232
       */
19233
      public static _Fields findByName(String name) {
19234
        return byName.get(name);
19235
      }
19236
 
19237
      private final short _thriftId;
19238
      private final String _fieldName;
19239
 
19240
      _Fields(short thriftId, String fieldName) {
19241
        _thriftId = thriftId;
19242
        _fieldName = fieldName;
19243
      }
19244
 
19245
      public short getThriftFieldId() {
19246
        return _thriftId;
19247
      }
19248
 
19249
      public String getFieldName() {
19250
        return _fieldName;
19251
      }
19252
    }
19253
 
19254
    // isset id assignments
553 chandransh 19255
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 19256
    private BitSet __isset_bit_vector = new BitSet(1);
19257
 
19258
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19259
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 19260
          new FieldValueMetaData(TType.I64)));
553 chandransh 19261
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19262
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 19263
    }});
19264
 
19265
    static {
553 chandransh 19266
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 19267
    }
19268
 
553 chandransh 19269
    public changeCartStatus_args() {
48 ashish 19270
    }
19271
 
553 chandransh 19272
    public changeCartStatus_args(
19273
      long cartId,
19274
      CartStatus status)
48 ashish 19275
    {
19276
      this();
553 chandransh 19277
      this.cartId = cartId;
19278
      setCartIdIsSet(true);
19279
      this.status = status;
48 ashish 19280
    }
19281
 
19282
    /**
19283
     * Performs a deep copy on <i>other</i>.
19284
     */
553 chandransh 19285
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 19286
      __isset_bit_vector.clear();
19287
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19288
      this.cartId = other.cartId;
19289
      if (other.isSetStatus()) {
19290
        this.status = other.status;
19291
      }
48 ashish 19292
    }
19293
 
553 chandransh 19294
    public changeCartStatus_args deepCopy() {
19295
      return new changeCartStatus_args(this);
48 ashish 19296
    }
19297
 
19298
    @Deprecated
553 chandransh 19299
    public changeCartStatus_args clone() {
19300
      return new changeCartStatus_args(this);
48 ashish 19301
    }
19302
 
553 chandransh 19303
    public long getCartId() {
19304
      return this.cartId;
48 ashish 19305
    }
19306
 
553 chandransh 19307
    public changeCartStatus_args setCartId(long cartId) {
19308
      this.cartId = cartId;
19309
      setCartIdIsSet(true);
48 ashish 19310
      return this;
19311
    }
19312
 
553 chandransh 19313
    public void unsetCartId() {
19314
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 19315
    }
19316
 
553 chandransh 19317
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19318
    public boolean isSetCartId() {
19319
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 19320
    }
19321
 
553 chandransh 19322
    public void setCartIdIsSet(boolean value) {
19323
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 19324
    }
19325
 
553 chandransh 19326
    /**
19327
     * 
19328
     * @see CartStatus
19329
     */
19330
    public CartStatus getStatus() {
19331
      return this.status;
19332
    }
19333
 
19334
    /**
19335
     * 
19336
     * @see CartStatus
19337
     */
19338
    public changeCartStatus_args setStatus(CartStatus status) {
19339
      this.status = status;
19340
      return this;
19341
    }
19342
 
19343
    public void unsetStatus() {
19344
      this.status = null;
19345
    }
19346
 
19347
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19348
    public boolean isSetStatus() {
19349
      return this.status != null;
19350
    }
19351
 
19352
    public void setStatusIsSet(boolean value) {
19353
      if (!value) {
19354
        this.status = null;
19355
      }
19356
    }
19357
 
48 ashish 19358
    public void setFieldValue(_Fields field, Object value) {
19359
      switch (field) {
553 chandransh 19360
      case CART_ID:
48 ashish 19361
        if (value == null) {
553 chandransh 19362
          unsetCartId();
48 ashish 19363
        } else {
553 chandransh 19364
          setCartId((Long)value);
48 ashish 19365
        }
19366
        break;
19367
 
553 chandransh 19368
      case STATUS:
19369
        if (value == null) {
19370
          unsetStatus();
19371
        } else {
19372
          setStatus((CartStatus)value);
19373
        }
19374
        break;
19375
 
48 ashish 19376
      }
19377
    }
19378
 
19379
    public void setFieldValue(int fieldID, Object value) {
19380
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19381
    }
19382
 
19383
    public Object getFieldValue(_Fields field) {
19384
      switch (field) {
553 chandransh 19385
      case CART_ID:
19386
        return new Long(getCartId());
48 ashish 19387
 
553 chandransh 19388
      case STATUS:
19389
        return getStatus();
19390
 
48 ashish 19391
      }
19392
      throw new IllegalStateException();
19393
    }
19394
 
19395
    public Object getFieldValue(int fieldId) {
19396
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19397
    }
19398
 
19399
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19400
    public boolean isSet(_Fields field) {
19401
      switch (field) {
553 chandransh 19402
      case CART_ID:
19403
        return isSetCartId();
19404
      case STATUS:
19405
        return isSetStatus();
48 ashish 19406
      }
19407
      throw new IllegalStateException();
19408
    }
19409
 
19410
    public boolean isSet(int fieldID) {
19411
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19412
    }
19413
 
19414
    @Override
19415
    public boolean equals(Object that) {
19416
      if (that == null)
19417
        return false;
553 chandransh 19418
      if (that instanceof changeCartStatus_args)
19419
        return this.equals((changeCartStatus_args)that);
48 ashish 19420
      return false;
19421
    }
19422
 
553 chandransh 19423
    public boolean equals(changeCartStatus_args that) {
48 ashish 19424
      if (that == null)
19425
        return false;
19426
 
553 chandransh 19427
      boolean this_present_cartId = true;
19428
      boolean that_present_cartId = true;
19429
      if (this_present_cartId || that_present_cartId) {
19430
        if (!(this_present_cartId && that_present_cartId))
48 ashish 19431
          return false;
553 chandransh 19432
        if (this.cartId != that.cartId)
48 ashish 19433
          return false;
19434
      }
19435
 
553 chandransh 19436
      boolean this_present_status = true && this.isSetStatus();
19437
      boolean that_present_status = true && that.isSetStatus();
19438
      if (this_present_status || that_present_status) {
19439
        if (!(this_present_status && that_present_status))
19440
          return false;
19441
        if (!this.status.equals(that.status))
19442
          return false;
19443
      }
19444
 
48 ashish 19445
      return true;
19446
    }
19447
 
19448
    @Override
19449
    public int hashCode() {
19450
      return 0;
19451
    }
19452
 
553 chandransh 19453
    public int compareTo(changeCartStatus_args other) {
48 ashish 19454
      if (!getClass().equals(other.getClass())) {
19455
        return getClass().getName().compareTo(other.getClass().getName());
19456
      }
19457
 
19458
      int lastComparison = 0;
553 chandransh 19459
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 19460
 
553 chandransh 19461
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 19462
      if (lastComparison != 0) {
19463
        return lastComparison;
19464
      }
553 chandransh 19465
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 19466
      if (lastComparison != 0) {
19467
        return lastComparison;
19468
      }
553 chandransh 19469
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19470
      if (lastComparison != 0) {
19471
        return lastComparison;
19472
      }
19473
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19474
      if (lastComparison != 0) {
19475
        return lastComparison;
19476
      }
48 ashish 19477
      return 0;
19478
    }
19479
 
19480
    public void read(TProtocol iprot) throws TException {
19481
      TField field;
19482
      iprot.readStructBegin();
19483
      while (true)
19484
      {
19485
        field = iprot.readFieldBegin();
19486
        if (field.type == TType.STOP) { 
19487
          break;
19488
        }
19489
        _Fields fieldId = _Fields.findByThriftId(field.id);
19490
        if (fieldId == null) {
19491
          TProtocolUtil.skip(iprot, field.type);
19492
        } else {
19493
          switch (fieldId) {
553 chandransh 19494
            case CART_ID:
48 ashish 19495
              if (field.type == TType.I64) {
553 chandransh 19496
                this.cartId = iprot.readI64();
19497
                setCartIdIsSet(true);
48 ashish 19498
              } else { 
19499
                TProtocolUtil.skip(iprot, field.type);
19500
              }
19501
              break;
553 chandransh 19502
            case STATUS:
19503
              if (field.type == TType.I32) {
19504
                this.status = CartStatus.findByValue(iprot.readI32());
19505
              } else { 
19506
                TProtocolUtil.skip(iprot, field.type);
19507
              }
19508
              break;
48 ashish 19509
          }
19510
          iprot.readFieldEnd();
19511
        }
19512
      }
19513
      iprot.readStructEnd();
19514
      validate();
19515
    }
19516
 
19517
    public void write(TProtocol oprot) throws TException {
19518
      validate();
19519
 
19520
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19521
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19522
      oprot.writeI64(this.cartId);
48 ashish 19523
      oprot.writeFieldEnd();
553 chandransh 19524
      if (this.status != null) {
19525
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19526
        oprot.writeI32(this.status.getValue());
19527
        oprot.writeFieldEnd();
19528
      }
48 ashish 19529
      oprot.writeFieldStop();
19530
      oprot.writeStructEnd();
19531
    }
19532
 
19533
    @Override
19534
    public String toString() {
553 chandransh 19535
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 19536
      boolean first = true;
19537
 
553 chandransh 19538
      sb.append("cartId:");
19539
      sb.append(this.cartId);
48 ashish 19540
      first = false;
553 chandransh 19541
      if (!first) sb.append(", ");
19542
      sb.append("status:");
19543
      if (this.status == null) {
19544
        sb.append("null");
19545
      } else {
19546
        String status_name = status.name();
19547
        if (status_name != null) {
19548
          sb.append(status_name);
19549
          sb.append(" (");
19550
        }
19551
        sb.append(this.status);
19552
        if (status_name != null) {
19553
          sb.append(")");
19554
        }
19555
      }
19556
      first = false;
48 ashish 19557
      sb.append(")");
19558
      return sb.toString();
19559
    }
19560
 
19561
    public void validate() throws TException {
19562
      // check for required fields
19563
    }
19564
 
19565
  }
19566
 
553 chandransh 19567
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
19568
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 19569
 
553 chandransh 19570
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19571
 
553 chandransh 19572
    private ShoppingCartException scx;
48 ashish 19573
 
19574
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19575
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19576
      SCX((short)1, "scx");
48 ashish 19577
 
19578
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19579
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19580
 
19581
      static {
19582
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19583
          byId.put((int)field._thriftId, field);
19584
          byName.put(field.getFieldName(), field);
19585
        }
19586
      }
19587
 
19588
      /**
19589
       * Find the _Fields constant that matches fieldId, or null if its not found.
19590
       */
19591
      public static _Fields findByThriftId(int fieldId) {
19592
        return byId.get(fieldId);
19593
      }
19594
 
19595
      /**
19596
       * Find the _Fields constant that matches fieldId, throwing an exception
19597
       * if it is not found.
19598
       */
19599
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19600
        _Fields fields = findByThriftId(fieldId);
19601
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19602
        return fields;
19603
      }
19604
 
19605
      /**
19606
       * Find the _Fields constant that matches name, or null if its not found.
19607
       */
19608
      public static _Fields findByName(String name) {
19609
        return byName.get(name);
19610
      }
19611
 
19612
      private final short _thriftId;
19613
      private final String _fieldName;
19614
 
19615
      _Fields(short thriftId, String fieldName) {
19616
        _thriftId = thriftId;
19617
        _fieldName = fieldName;
19618
      }
19619
 
19620
      public short getThriftFieldId() {
19621
        return _thriftId;
19622
      }
19623
 
19624
      public String getFieldName() {
19625
        return _fieldName;
19626
      }
19627
    }
19628
 
19629
    // isset id assignments
19630
 
19631
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19632
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19633
          new FieldValueMetaData(TType.STRUCT)));
19634
    }});
19635
 
19636
    static {
553 chandransh 19637
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 19638
    }
19639
 
553 chandransh 19640
    public changeCartStatus_result() {
48 ashish 19641
    }
19642
 
553 chandransh 19643
    public changeCartStatus_result(
19644
      ShoppingCartException scx)
48 ashish 19645
    {
19646
      this();
553 chandransh 19647
      this.scx = scx;
48 ashish 19648
    }
19649
 
19650
    /**
19651
     * Performs a deep copy on <i>other</i>.
19652
     */
553 chandransh 19653
    public changeCartStatus_result(changeCartStatus_result other) {
19654
      if (other.isSetScx()) {
19655
        this.scx = new ShoppingCartException(other.scx);
19656
      }
19657
    }
19658
 
19659
    public changeCartStatus_result deepCopy() {
19660
      return new changeCartStatus_result(this);
19661
    }
19662
 
19663
    @Deprecated
19664
    public changeCartStatus_result clone() {
19665
      return new changeCartStatus_result(this);
19666
    }
19667
 
19668
    public ShoppingCartException getScx() {
19669
      return this.scx;
19670
    }
19671
 
19672
    public changeCartStatus_result setScx(ShoppingCartException scx) {
19673
      this.scx = scx;
19674
      return this;
19675
    }
19676
 
19677
    public void unsetScx() {
19678
      this.scx = null;
19679
    }
19680
 
19681
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19682
    public boolean isSetScx() {
19683
      return this.scx != null;
19684
    }
19685
 
19686
    public void setScxIsSet(boolean value) {
19687
      if (!value) {
19688
        this.scx = null;
19689
      }
19690
    }
19691
 
19692
    public void setFieldValue(_Fields field, Object value) {
19693
      switch (field) {
19694
      case SCX:
19695
        if (value == null) {
19696
          unsetScx();
19697
        } else {
19698
          setScx((ShoppingCartException)value);
19699
        }
19700
        break;
19701
 
19702
      }
19703
    }
19704
 
19705
    public void setFieldValue(int fieldID, Object value) {
19706
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19707
    }
19708
 
19709
    public Object getFieldValue(_Fields field) {
19710
      switch (field) {
19711
      case SCX:
19712
        return getScx();
19713
 
19714
      }
19715
      throw new IllegalStateException();
19716
    }
19717
 
19718
    public Object getFieldValue(int fieldId) {
19719
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19720
    }
19721
 
19722
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19723
    public boolean isSet(_Fields field) {
19724
      switch (field) {
19725
      case SCX:
19726
        return isSetScx();
19727
      }
19728
      throw new IllegalStateException();
19729
    }
19730
 
19731
    public boolean isSet(int fieldID) {
19732
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19733
    }
19734
 
19735
    @Override
19736
    public boolean equals(Object that) {
19737
      if (that == null)
19738
        return false;
19739
      if (that instanceof changeCartStatus_result)
19740
        return this.equals((changeCartStatus_result)that);
19741
      return false;
19742
    }
19743
 
19744
    public boolean equals(changeCartStatus_result that) {
19745
      if (that == null)
19746
        return false;
19747
 
19748
      boolean this_present_scx = true && this.isSetScx();
19749
      boolean that_present_scx = true && that.isSetScx();
19750
      if (this_present_scx || that_present_scx) {
19751
        if (!(this_present_scx && that_present_scx))
19752
          return false;
19753
        if (!this.scx.equals(that.scx))
19754
          return false;
19755
      }
19756
 
19757
      return true;
19758
    }
19759
 
19760
    @Override
19761
    public int hashCode() {
19762
      return 0;
19763
    }
19764
 
19765
    public int compareTo(changeCartStatus_result other) {
19766
      if (!getClass().equals(other.getClass())) {
19767
        return getClass().getName().compareTo(other.getClass().getName());
19768
      }
19769
 
19770
      int lastComparison = 0;
19771
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
19772
 
19773
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
19774
      if (lastComparison != 0) {
19775
        return lastComparison;
19776
      }
19777
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
19778
      if (lastComparison != 0) {
19779
        return lastComparison;
19780
      }
19781
      return 0;
19782
    }
19783
 
19784
    public void read(TProtocol iprot) throws TException {
19785
      TField field;
19786
      iprot.readStructBegin();
19787
      while (true)
19788
      {
19789
        field = iprot.readFieldBegin();
19790
        if (field.type == TType.STOP) { 
19791
          break;
19792
        }
19793
        _Fields fieldId = _Fields.findByThriftId(field.id);
19794
        if (fieldId == null) {
19795
          TProtocolUtil.skip(iprot, field.type);
19796
        } else {
19797
          switch (fieldId) {
19798
            case SCX:
19799
              if (field.type == TType.STRUCT) {
19800
                this.scx = new ShoppingCartException();
19801
                this.scx.read(iprot);
19802
              } else { 
19803
                TProtocolUtil.skip(iprot, field.type);
19804
              }
19805
              break;
19806
          }
19807
          iprot.readFieldEnd();
19808
        }
19809
      }
19810
      iprot.readStructEnd();
19811
      validate();
19812
    }
19813
 
19814
    public void write(TProtocol oprot) throws TException {
19815
      oprot.writeStructBegin(STRUCT_DESC);
19816
 
19817
      if (this.isSetScx()) {
19818
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19819
        this.scx.write(oprot);
19820
        oprot.writeFieldEnd();
19821
      }
19822
      oprot.writeFieldStop();
19823
      oprot.writeStructEnd();
19824
    }
19825
 
19826
    @Override
19827
    public String toString() {
19828
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
19829
      boolean first = true;
19830
 
19831
      sb.append("scx:");
19832
      if (this.scx == null) {
19833
        sb.append("null");
19834
      } else {
19835
        sb.append(this.scx);
19836
      }
19837
      first = false;
19838
      sb.append(")");
19839
      return sb.toString();
19840
    }
19841
 
19842
    public void validate() throws TException {
19843
      // check for required fields
19844
    }
19845
 
19846
  }
19847
 
19848
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
19849
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
19850
 
19851
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
19852
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
19853
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
19854
 
19855
    private long cartId;
19856
    private long itemId;
19857
    private long quantity;
19858
 
19859
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19860
    public enum _Fields implements TFieldIdEnum {
19861
      CART_ID((short)1, "cartId"),
19862
      ITEM_ID((short)2, "itemId"),
19863
      QUANTITY((short)3, "quantity");
19864
 
19865
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19866
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19867
 
19868
      static {
19869
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19870
          byId.put((int)field._thriftId, field);
19871
          byName.put(field.getFieldName(), field);
19872
        }
19873
      }
19874
 
19875
      /**
19876
       * Find the _Fields constant that matches fieldId, or null if its not found.
19877
       */
19878
      public static _Fields findByThriftId(int fieldId) {
19879
        return byId.get(fieldId);
19880
      }
19881
 
19882
      /**
19883
       * Find the _Fields constant that matches fieldId, throwing an exception
19884
       * if it is not found.
19885
       */
19886
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19887
        _Fields fields = findByThriftId(fieldId);
19888
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19889
        return fields;
19890
      }
19891
 
19892
      /**
19893
       * Find the _Fields constant that matches name, or null if its not found.
19894
       */
19895
      public static _Fields findByName(String name) {
19896
        return byName.get(name);
19897
      }
19898
 
19899
      private final short _thriftId;
19900
      private final String _fieldName;
19901
 
19902
      _Fields(short thriftId, String fieldName) {
19903
        _thriftId = thriftId;
19904
        _fieldName = fieldName;
19905
      }
19906
 
19907
      public short getThriftFieldId() {
19908
        return _thriftId;
19909
      }
19910
 
19911
      public String getFieldName() {
19912
        return _fieldName;
19913
      }
19914
    }
19915
 
19916
    // isset id assignments
19917
    private static final int __CARTID_ISSET_ID = 0;
19918
    private static final int __ITEMID_ISSET_ID = 1;
19919
    private static final int __QUANTITY_ISSET_ID = 2;
19920
    private BitSet __isset_bit_vector = new BitSet(3);
19921
 
19922
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19923
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
19924
          new FieldValueMetaData(TType.I64)));
19925
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
19926
          new FieldValueMetaData(TType.I64)));
19927
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
19928
          new FieldValueMetaData(TType.I64)));
19929
    }});
19930
 
19931
    static {
19932
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
19933
    }
19934
 
19935
    public addItemToCart_args() {
19936
    }
19937
 
19938
    public addItemToCart_args(
19939
      long cartId,
19940
      long itemId,
19941
      long quantity)
19942
    {
19943
      this();
19944
      this.cartId = cartId;
19945
      setCartIdIsSet(true);
19946
      this.itemId = itemId;
19947
      setItemIdIsSet(true);
19948
      this.quantity = quantity;
19949
      setQuantityIsSet(true);
19950
    }
19951
 
19952
    /**
19953
     * Performs a deep copy on <i>other</i>.
19954
     */
19955
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 19956
      __isset_bit_vector.clear();
19957
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19958
      this.cartId = other.cartId;
19959
      this.itemId = other.itemId;
19960
      this.quantity = other.quantity;
48 ashish 19961
    }
19962
 
553 chandransh 19963
    public addItemToCart_args deepCopy() {
19964
      return new addItemToCart_args(this);
48 ashish 19965
    }
19966
 
19967
    @Deprecated
553 chandransh 19968
    public addItemToCart_args clone() {
19969
      return new addItemToCart_args(this);
48 ashish 19970
    }
19971
 
553 chandransh 19972
    public long getCartId() {
19973
      return this.cartId;
48 ashish 19974
    }
19975
 
553 chandransh 19976
    public addItemToCart_args setCartId(long cartId) {
19977
      this.cartId = cartId;
19978
      setCartIdIsSet(true);
48 ashish 19979
      return this;
19980
    }
19981
 
553 chandransh 19982
    public void unsetCartId() {
19983
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 19984
    }
19985
 
553 chandransh 19986
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19987
    public boolean isSetCartId() {
19988
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 19989
    }
19990
 
553 chandransh 19991
    public void setCartIdIsSet(boolean value) {
19992
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 19993
    }
19994
 
553 chandransh 19995
    public long getItemId() {
19996
      return this.itemId;
48 ashish 19997
    }
19998
 
553 chandransh 19999
    public addItemToCart_args setItemId(long itemId) {
20000
      this.itemId = itemId;
20001
      setItemIdIsSet(true);
48 ashish 20002
      return this;
20003
    }
20004
 
553 chandransh 20005
    public void unsetItemId() {
20006
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 20007
    }
20008
 
553 chandransh 20009
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
20010
    public boolean isSetItemId() {
20011
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 20012
    }
20013
 
553 chandransh 20014
    public void setItemIdIsSet(boolean value) {
20015
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
20016
    }
20017
 
20018
    public long getQuantity() {
20019
      return this.quantity;
20020
    }
20021
 
20022
    public addItemToCart_args setQuantity(long quantity) {
20023
      this.quantity = quantity;
20024
      setQuantityIsSet(true);
20025
      return this;
20026
    }
20027
 
20028
    public void unsetQuantity() {
20029
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
20030
    }
20031
 
20032
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
20033
    public boolean isSetQuantity() {
20034
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
20035
    }
20036
 
20037
    public void setQuantityIsSet(boolean value) {
20038
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
20039
    }
20040
 
20041
    public void setFieldValue(_Fields field, Object value) {
20042
      switch (field) {
20043
      case CART_ID:
20044
        if (value == null) {
20045
          unsetCartId();
20046
        } else {
20047
          setCartId((Long)value);
20048
        }
20049
        break;
20050
 
20051
      case ITEM_ID:
20052
        if (value == null) {
20053
          unsetItemId();
20054
        } else {
20055
          setItemId((Long)value);
20056
        }
20057
        break;
20058
 
20059
      case QUANTITY:
20060
        if (value == null) {
20061
          unsetQuantity();
20062
        } else {
20063
          setQuantity((Long)value);
20064
        }
20065
        break;
20066
 
20067
      }
20068
    }
20069
 
20070
    public void setFieldValue(int fieldID, Object value) {
20071
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20072
    }
20073
 
20074
    public Object getFieldValue(_Fields field) {
20075
      switch (field) {
20076
      case CART_ID:
20077
        return new Long(getCartId());
20078
 
20079
      case ITEM_ID:
20080
        return new Long(getItemId());
20081
 
20082
      case QUANTITY:
20083
        return new Long(getQuantity());
20084
 
20085
      }
20086
      throw new IllegalStateException();
20087
    }
20088
 
20089
    public Object getFieldValue(int fieldId) {
20090
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20091
    }
20092
 
20093
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20094
    public boolean isSet(_Fields field) {
20095
      switch (field) {
20096
      case CART_ID:
20097
        return isSetCartId();
20098
      case ITEM_ID:
20099
        return isSetItemId();
20100
      case QUANTITY:
20101
        return isSetQuantity();
20102
      }
20103
      throw new IllegalStateException();
20104
    }
20105
 
20106
    public boolean isSet(int fieldID) {
20107
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20108
    }
20109
 
20110
    @Override
20111
    public boolean equals(Object that) {
20112
      if (that == null)
20113
        return false;
20114
      if (that instanceof addItemToCart_args)
20115
        return this.equals((addItemToCart_args)that);
20116
      return false;
20117
    }
20118
 
20119
    public boolean equals(addItemToCart_args that) {
20120
      if (that == null)
20121
        return false;
20122
 
20123
      boolean this_present_cartId = true;
20124
      boolean that_present_cartId = true;
20125
      if (this_present_cartId || that_present_cartId) {
20126
        if (!(this_present_cartId && that_present_cartId))
20127
          return false;
20128
        if (this.cartId != that.cartId)
20129
          return false;
20130
      }
20131
 
20132
      boolean this_present_itemId = true;
20133
      boolean that_present_itemId = true;
20134
      if (this_present_itemId || that_present_itemId) {
20135
        if (!(this_present_itemId && that_present_itemId))
20136
          return false;
20137
        if (this.itemId != that.itemId)
20138
          return false;
20139
      }
20140
 
20141
      boolean this_present_quantity = true;
20142
      boolean that_present_quantity = true;
20143
      if (this_present_quantity || that_present_quantity) {
20144
        if (!(this_present_quantity && that_present_quantity))
20145
          return false;
20146
        if (this.quantity != that.quantity)
20147
          return false;
20148
      }
20149
 
20150
      return true;
20151
    }
20152
 
20153
    @Override
20154
    public int hashCode() {
20155
      return 0;
20156
    }
20157
 
20158
    public int compareTo(addItemToCart_args other) {
20159
      if (!getClass().equals(other.getClass())) {
20160
        return getClass().getName().compareTo(other.getClass().getName());
20161
      }
20162
 
20163
      int lastComparison = 0;
20164
      addItemToCart_args typedOther = (addItemToCart_args)other;
20165
 
20166
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
20167
      if (lastComparison != 0) {
20168
        return lastComparison;
20169
      }
20170
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
20171
      if (lastComparison != 0) {
20172
        return lastComparison;
20173
      }
20174
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
20175
      if (lastComparison != 0) {
20176
        return lastComparison;
20177
      }
20178
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
20179
      if (lastComparison != 0) {
20180
        return lastComparison;
20181
      }
20182
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
20183
      if (lastComparison != 0) {
20184
        return lastComparison;
20185
      }
20186
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
20187
      if (lastComparison != 0) {
20188
        return lastComparison;
20189
      }
20190
      return 0;
20191
    }
20192
 
20193
    public void read(TProtocol iprot) throws TException {
20194
      TField field;
20195
      iprot.readStructBegin();
20196
      while (true)
20197
      {
20198
        field = iprot.readFieldBegin();
20199
        if (field.type == TType.STOP) { 
20200
          break;
20201
        }
20202
        _Fields fieldId = _Fields.findByThriftId(field.id);
20203
        if (fieldId == null) {
20204
          TProtocolUtil.skip(iprot, field.type);
20205
        } else {
20206
          switch (fieldId) {
20207
            case CART_ID:
20208
              if (field.type == TType.I64) {
20209
                this.cartId = iprot.readI64();
20210
                setCartIdIsSet(true);
20211
              } else { 
20212
                TProtocolUtil.skip(iprot, field.type);
20213
              }
20214
              break;
20215
            case ITEM_ID:
20216
              if (field.type == TType.I64) {
20217
                this.itemId = iprot.readI64();
20218
                setItemIdIsSet(true);
20219
              } else { 
20220
                TProtocolUtil.skip(iprot, field.type);
20221
              }
20222
              break;
20223
            case QUANTITY:
20224
              if (field.type == TType.I64) {
20225
                this.quantity = iprot.readI64();
20226
                setQuantityIsSet(true);
20227
              } else { 
20228
                TProtocolUtil.skip(iprot, field.type);
20229
              }
20230
              break;
20231
          }
20232
          iprot.readFieldEnd();
20233
        }
20234
      }
20235
      iprot.readStructEnd();
20236
      validate();
20237
    }
20238
 
20239
    public void write(TProtocol oprot) throws TException {
20240
      validate();
20241
 
20242
      oprot.writeStructBegin(STRUCT_DESC);
20243
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20244
      oprot.writeI64(this.cartId);
20245
      oprot.writeFieldEnd();
20246
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20247
      oprot.writeI64(this.itemId);
20248
      oprot.writeFieldEnd();
20249
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
20250
      oprot.writeI64(this.quantity);
20251
      oprot.writeFieldEnd();
20252
      oprot.writeFieldStop();
20253
      oprot.writeStructEnd();
20254
    }
20255
 
20256
    @Override
20257
    public String toString() {
20258
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
20259
      boolean first = true;
20260
 
20261
      sb.append("cartId:");
20262
      sb.append(this.cartId);
20263
      first = false;
20264
      if (!first) sb.append(", ");
20265
      sb.append("itemId:");
20266
      sb.append(this.itemId);
20267
      first = false;
20268
      if (!first) sb.append(", ");
20269
      sb.append("quantity:");
20270
      sb.append(this.quantity);
20271
      first = false;
20272
      sb.append(")");
20273
      return sb.toString();
20274
    }
20275
 
20276
    public void validate() throws TException {
20277
      // check for required fields
20278
    }
20279
 
20280
  }
20281
 
20282
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
20283
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
20284
 
20285
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20286
 
20287
    private ShoppingCartException scx;
20288
 
20289
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20290
    public enum _Fields implements TFieldIdEnum {
20291
      SCX((short)1, "scx");
20292
 
20293
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20294
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20295
 
20296
      static {
20297
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20298
          byId.put((int)field._thriftId, field);
20299
          byName.put(field.getFieldName(), field);
20300
        }
20301
      }
20302
 
20303
      /**
20304
       * Find the _Fields constant that matches fieldId, or null if its not found.
20305
       */
20306
      public static _Fields findByThriftId(int fieldId) {
20307
        return byId.get(fieldId);
20308
      }
20309
 
20310
      /**
20311
       * Find the _Fields constant that matches fieldId, throwing an exception
20312
       * if it is not found.
20313
       */
20314
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20315
        _Fields fields = findByThriftId(fieldId);
20316
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20317
        return fields;
20318
      }
20319
 
20320
      /**
20321
       * Find the _Fields constant that matches name, or null if its not found.
20322
       */
20323
      public static _Fields findByName(String name) {
20324
        return byName.get(name);
20325
      }
20326
 
20327
      private final short _thriftId;
20328
      private final String _fieldName;
20329
 
20330
      _Fields(short thriftId, String fieldName) {
20331
        _thriftId = thriftId;
20332
        _fieldName = fieldName;
20333
      }
20334
 
20335
      public short getThriftFieldId() {
20336
        return _thriftId;
20337
      }
20338
 
20339
      public String getFieldName() {
20340
        return _fieldName;
20341
      }
20342
    }
20343
 
20344
    // isset id assignments
20345
 
20346
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20347
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20348
          new FieldValueMetaData(TType.STRUCT)));
20349
    }});
20350
 
20351
    static {
20352
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
20353
    }
20354
 
20355
    public addItemToCart_result() {
20356
    }
20357
 
20358
    public addItemToCart_result(
20359
      ShoppingCartException scx)
20360
    {
20361
      this();
20362
      this.scx = scx;
20363
    }
20364
 
20365
    /**
20366
     * Performs a deep copy on <i>other</i>.
20367
     */
20368
    public addItemToCart_result(addItemToCart_result other) {
20369
      if (other.isSetScx()) {
20370
        this.scx = new ShoppingCartException(other.scx);
20371
      }
20372
    }
20373
 
20374
    public addItemToCart_result deepCopy() {
20375
      return new addItemToCart_result(this);
20376
    }
20377
 
20378
    @Deprecated
20379
    public addItemToCart_result clone() {
20380
      return new addItemToCart_result(this);
20381
    }
20382
 
20383
    public ShoppingCartException getScx() {
20384
      return this.scx;
20385
    }
20386
 
20387
    public addItemToCart_result setScx(ShoppingCartException scx) {
20388
      this.scx = scx;
20389
      return this;
20390
    }
20391
 
20392
    public void unsetScx() {
20393
      this.scx = null;
20394
    }
20395
 
20396
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20397
    public boolean isSetScx() {
20398
      return this.scx != null;
20399
    }
20400
 
20401
    public void setScxIsSet(boolean value) {
48 ashish 20402
      if (!value) {
553 chandransh 20403
        this.scx = null;
48 ashish 20404
      }
20405
    }
20406
 
20407
    public void setFieldValue(_Fields field, Object value) {
20408
      switch (field) {
553 chandransh 20409
      case SCX:
48 ashish 20410
        if (value == null) {
553 chandransh 20411
          unsetScx();
48 ashish 20412
        } else {
553 chandransh 20413
          setScx((ShoppingCartException)value);
48 ashish 20414
        }
20415
        break;
20416
 
553 chandransh 20417
      }
20418
    }
20419
 
20420
    public void setFieldValue(int fieldID, Object value) {
20421
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20422
    }
20423
 
20424
    public Object getFieldValue(_Fields field) {
20425
      switch (field) {
20426
      case SCX:
20427
        return getScx();
20428
 
20429
      }
20430
      throw new IllegalStateException();
20431
    }
20432
 
20433
    public Object getFieldValue(int fieldId) {
20434
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20435
    }
20436
 
20437
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20438
    public boolean isSet(_Fields field) {
20439
      switch (field) {
20440
      case SCX:
20441
        return isSetScx();
20442
      }
20443
      throw new IllegalStateException();
20444
    }
20445
 
20446
    public boolean isSet(int fieldID) {
20447
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20448
    }
20449
 
20450
    @Override
20451
    public boolean equals(Object that) {
20452
      if (that == null)
20453
        return false;
20454
      if (that instanceof addItemToCart_result)
20455
        return this.equals((addItemToCart_result)that);
20456
      return false;
20457
    }
20458
 
20459
    public boolean equals(addItemToCart_result that) {
20460
      if (that == null)
20461
        return false;
20462
 
20463
      boolean this_present_scx = true && this.isSetScx();
20464
      boolean that_present_scx = true && that.isSetScx();
20465
      if (this_present_scx || that_present_scx) {
20466
        if (!(this_present_scx && that_present_scx))
20467
          return false;
20468
        if (!this.scx.equals(that.scx))
20469
          return false;
20470
      }
20471
 
20472
      return true;
20473
    }
20474
 
20475
    @Override
20476
    public int hashCode() {
20477
      return 0;
20478
    }
20479
 
20480
    public int compareTo(addItemToCart_result other) {
20481
      if (!getClass().equals(other.getClass())) {
20482
        return getClass().getName().compareTo(other.getClass().getName());
20483
      }
20484
 
20485
      int lastComparison = 0;
20486
      addItemToCart_result typedOther = (addItemToCart_result)other;
20487
 
20488
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20489
      if (lastComparison != 0) {
20490
        return lastComparison;
20491
      }
20492
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20493
      if (lastComparison != 0) {
20494
        return lastComparison;
20495
      }
20496
      return 0;
20497
    }
20498
 
20499
    public void read(TProtocol iprot) throws TException {
20500
      TField field;
20501
      iprot.readStructBegin();
20502
      while (true)
20503
      {
20504
        field = iprot.readFieldBegin();
20505
        if (field.type == TType.STOP) { 
20506
          break;
20507
        }
20508
        _Fields fieldId = _Fields.findByThriftId(field.id);
20509
        if (fieldId == null) {
20510
          TProtocolUtil.skip(iprot, field.type);
20511
        } else {
20512
          switch (fieldId) {
20513
            case SCX:
20514
              if (field.type == TType.STRUCT) {
20515
                this.scx = new ShoppingCartException();
20516
                this.scx.read(iprot);
20517
              } else { 
20518
                TProtocolUtil.skip(iprot, field.type);
20519
              }
20520
              break;
20521
          }
20522
          iprot.readFieldEnd();
20523
        }
20524
      }
20525
      iprot.readStructEnd();
20526
      validate();
20527
    }
20528
 
20529
    public void write(TProtocol oprot) throws TException {
20530
      oprot.writeStructBegin(STRUCT_DESC);
20531
 
20532
      if (this.isSetScx()) {
20533
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20534
        this.scx.write(oprot);
20535
        oprot.writeFieldEnd();
20536
      }
20537
      oprot.writeFieldStop();
20538
      oprot.writeStructEnd();
20539
    }
20540
 
20541
    @Override
20542
    public String toString() {
20543
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
20544
      boolean first = true;
20545
 
20546
      sb.append("scx:");
20547
      if (this.scx == null) {
20548
        sb.append("null");
20549
      } else {
20550
        sb.append(this.scx);
20551
      }
20552
      first = false;
20553
      sb.append(")");
20554
      return sb.toString();
20555
    }
20556
 
20557
    public void validate() throws TException {
20558
      // check for required fields
20559
    }
20560
 
20561
  }
20562
 
20563
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
20564
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
20565
 
20566
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
20567
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
20568
 
20569
    private long cartId;
20570
    private long itemId;
20571
 
20572
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20573
    public enum _Fields implements TFieldIdEnum {
20574
      CART_ID((short)1, "cartId"),
20575
      ITEM_ID((short)2, "itemId");
20576
 
20577
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20578
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20579
 
20580
      static {
20581
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20582
          byId.put((int)field._thriftId, field);
20583
          byName.put(field.getFieldName(), field);
20584
        }
20585
      }
20586
 
20587
      /**
20588
       * Find the _Fields constant that matches fieldId, or null if its not found.
20589
       */
20590
      public static _Fields findByThriftId(int fieldId) {
20591
        return byId.get(fieldId);
20592
      }
20593
 
20594
      /**
20595
       * Find the _Fields constant that matches fieldId, throwing an exception
20596
       * if it is not found.
20597
       */
20598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20599
        _Fields fields = findByThriftId(fieldId);
20600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20601
        return fields;
20602
      }
20603
 
20604
      /**
20605
       * Find the _Fields constant that matches name, or null if its not found.
20606
       */
20607
      public static _Fields findByName(String name) {
20608
        return byName.get(name);
20609
      }
20610
 
20611
      private final short _thriftId;
20612
      private final String _fieldName;
20613
 
20614
      _Fields(short thriftId, String fieldName) {
20615
        _thriftId = thriftId;
20616
        _fieldName = fieldName;
20617
      }
20618
 
20619
      public short getThriftFieldId() {
20620
        return _thriftId;
20621
      }
20622
 
20623
      public String getFieldName() {
20624
        return _fieldName;
20625
      }
20626
    }
20627
 
20628
    // isset id assignments
20629
    private static final int __CARTID_ISSET_ID = 0;
20630
    private static final int __ITEMID_ISSET_ID = 1;
20631
    private BitSet __isset_bit_vector = new BitSet(2);
20632
 
20633
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20634
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
20635
          new FieldValueMetaData(TType.I64)));
20636
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
20637
          new FieldValueMetaData(TType.I64)));
20638
    }});
20639
 
20640
    static {
20641
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
20642
    }
20643
 
20644
    public deleteItemFromCart_args() {
20645
    }
20646
 
20647
    public deleteItemFromCart_args(
20648
      long cartId,
20649
      long itemId)
20650
    {
20651
      this();
20652
      this.cartId = cartId;
20653
      setCartIdIsSet(true);
20654
      this.itemId = itemId;
20655
      setItemIdIsSet(true);
20656
    }
20657
 
20658
    /**
20659
     * Performs a deep copy on <i>other</i>.
20660
     */
20661
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
20662
      __isset_bit_vector.clear();
20663
      __isset_bit_vector.or(other.__isset_bit_vector);
20664
      this.cartId = other.cartId;
20665
      this.itemId = other.itemId;
20666
    }
20667
 
20668
    public deleteItemFromCart_args deepCopy() {
20669
      return new deleteItemFromCart_args(this);
20670
    }
20671
 
20672
    @Deprecated
20673
    public deleteItemFromCart_args clone() {
20674
      return new deleteItemFromCart_args(this);
20675
    }
20676
 
20677
    public long getCartId() {
20678
      return this.cartId;
20679
    }
20680
 
20681
    public deleteItemFromCart_args setCartId(long cartId) {
20682
      this.cartId = cartId;
20683
      setCartIdIsSet(true);
20684
      return this;
20685
    }
20686
 
20687
    public void unsetCartId() {
20688
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
20689
    }
20690
 
20691
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
20692
    public boolean isSetCartId() {
20693
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
20694
    }
20695
 
20696
    public void setCartIdIsSet(boolean value) {
20697
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
20698
    }
20699
 
20700
    public long getItemId() {
20701
      return this.itemId;
20702
    }
20703
 
20704
    public deleteItemFromCart_args setItemId(long itemId) {
20705
      this.itemId = itemId;
20706
      setItemIdIsSet(true);
20707
      return this;
20708
    }
20709
 
20710
    public void unsetItemId() {
20711
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
20712
    }
20713
 
20714
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
20715
    public boolean isSetItemId() {
20716
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
20717
    }
20718
 
20719
    public void setItemIdIsSet(boolean value) {
20720
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
20721
    }
20722
 
20723
    public void setFieldValue(_Fields field, Object value) {
20724
      switch (field) {
20725
      case CART_ID:
48 ashish 20726
        if (value == null) {
553 chandransh 20727
          unsetCartId();
48 ashish 20728
        } else {
553 chandransh 20729
          setCartId((Long)value);
48 ashish 20730
        }
20731
        break;
20732
 
553 chandransh 20733
      case ITEM_ID:
20734
        if (value == null) {
20735
          unsetItemId();
20736
        } else {
20737
          setItemId((Long)value);
20738
        }
20739
        break;
20740
 
48 ashish 20741
      }
20742
    }
20743
 
20744
    public void setFieldValue(int fieldID, Object value) {
20745
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20746
    }
20747
 
20748
    public Object getFieldValue(_Fields field) {
20749
      switch (field) {
553 chandransh 20750
      case CART_ID:
20751
        return new Long(getCartId());
48 ashish 20752
 
553 chandransh 20753
      case ITEM_ID:
20754
        return new Long(getItemId());
48 ashish 20755
 
20756
      }
20757
      throw new IllegalStateException();
20758
    }
20759
 
20760
    public Object getFieldValue(int fieldId) {
20761
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20762
    }
20763
 
20764
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20765
    public boolean isSet(_Fields field) {
20766
      switch (field) {
553 chandransh 20767
      case CART_ID:
20768
        return isSetCartId();
20769
      case ITEM_ID:
20770
        return isSetItemId();
48 ashish 20771
      }
20772
      throw new IllegalStateException();
20773
    }
20774
 
20775
    public boolean isSet(int fieldID) {
20776
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20777
    }
20778
 
20779
    @Override
20780
    public boolean equals(Object that) {
20781
      if (that == null)
20782
        return false;
553 chandransh 20783
      if (that instanceof deleteItemFromCart_args)
20784
        return this.equals((deleteItemFromCart_args)that);
48 ashish 20785
      return false;
20786
    }
20787
 
553 chandransh 20788
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 20789
      if (that == null)
20790
        return false;
20791
 
553 chandransh 20792
      boolean this_present_cartId = true;
20793
      boolean that_present_cartId = true;
20794
      if (this_present_cartId || that_present_cartId) {
20795
        if (!(this_present_cartId && that_present_cartId))
48 ashish 20796
          return false;
553 chandransh 20797
        if (this.cartId != that.cartId)
48 ashish 20798
          return false;
20799
      }
20800
 
553 chandransh 20801
      boolean this_present_itemId = true;
20802
      boolean that_present_itemId = true;
20803
      if (this_present_itemId || that_present_itemId) {
20804
        if (!(this_present_itemId && that_present_itemId))
48 ashish 20805
          return false;
553 chandransh 20806
        if (this.itemId != that.itemId)
48 ashish 20807
          return false;
20808
      }
20809
 
20810
      return true;
20811
    }
20812
 
20813
    @Override
20814
    public int hashCode() {
20815
      return 0;
20816
    }
20817
 
553 chandransh 20818
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 20819
      if (!getClass().equals(other.getClass())) {
20820
        return getClass().getName().compareTo(other.getClass().getName());
20821
      }
20822
 
20823
      int lastComparison = 0;
553 chandransh 20824
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 20825
 
553 chandransh 20826
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 20827
      if (lastComparison != 0) {
20828
        return lastComparison;
20829
      }
553 chandransh 20830
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 20831
      if (lastComparison != 0) {
20832
        return lastComparison;
20833
      }
553 chandransh 20834
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 20835
      if (lastComparison != 0) {
20836
        return lastComparison;
20837
      }
553 chandransh 20838
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 20839
      if (lastComparison != 0) {
20840
        return lastComparison;
20841
      }
20842
      return 0;
20843
    }
20844
 
20845
    public void read(TProtocol iprot) throws TException {
20846
      TField field;
20847
      iprot.readStructBegin();
20848
      while (true)
20849
      {
20850
        field = iprot.readFieldBegin();
20851
        if (field.type == TType.STOP) { 
20852
          break;
20853
        }
20854
        _Fields fieldId = _Fields.findByThriftId(field.id);
20855
        if (fieldId == null) {
20856
          TProtocolUtil.skip(iprot, field.type);
20857
        } else {
20858
          switch (fieldId) {
553 chandransh 20859
            case CART_ID:
20860
              if (field.type == TType.I64) {
20861
                this.cartId = iprot.readI64();
20862
                setCartIdIsSet(true);
48 ashish 20863
              } else { 
20864
                TProtocolUtil.skip(iprot, field.type);
20865
              }
20866
              break;
553 chandransh 20867
            case ITEM_ID:
20868
              if (field.type == TType.I64) {
20869
                this.itemId = iprot.readI64();
20870
                setItemIdIsSet(true);
20871
              } else { 
20872
                TProtocolUtil.skip(iprot, field.type);
20873
              }
20874
              break;
20875
          }
20876
          iprot.readFieldEnd();
20877
        }
20878
      }
20879
      iprot.readStructEnd();
20880
      validate();
20881
    }
20882
 
20883
    public void write(TProtocol oprot) throws TException {
20884
      validate();
20885
 
20886
      oprot.writeStructBegin(STRUCT_DESC);
20887
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
20888
      oprot.writeI64(this.cartId);
20889
      oprot.writeFieldEnd();
20890
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
20891
      oprot.writeI64(this.itemId);
20892
      oprot.writeFieldEnd();
20893
      oprot.writeFieldStop();
20894
      oprot.writeStructEnd();
20895
    }
20896
 
20897
    @Override
20898
    public String toString() {
20899
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
20900
      boolean first = true;
20901
 
20902
      sb.append("cartId:");
20903
      sb.append(this.cartId);
20904
      first = false;
20905
      if (!first) sb.append(", ");
20906
      sb.append("itemId:");
20907
      sb.append(this.itemId);
20908
      first = false;
20909
      sb.append(")");
20910
      return sb.toString();
20911
    }
20912
 
20913
    public void validate() throws TException {
20914
      // check for required fields
20915
    }
20916
 
20917
  }
20918
 
20919
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
20920
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
20921
 
20922
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20923
 
20924
    private ShoppingCartException scx;
20925
 
20926
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20927
    public enum _Fields implements TFieldIdEnum {
20928
      SCX((short)1, "scx");
20929
 
20930
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20931
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20932
 
20933
      static {
20934
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20935
          byId.put((int)field._thriftId, field);
20936
          byName.put(field.getFieldName(), field);
20937
        }
20938
      }
20939
 
20940
      /**
20941
       * Find the _Fields constant that matches fieldId, or null if its not found.
20942
       */
20943
      public static _Fields findByThriftId(int fieldId) {
20944
        return byId.get(fieldId);
20945
      }
20946
 
20947
      /**
20948
       * Find the _Fields constant that matches fieldId, throwing an exception
20949
       * if it is not found.
20950
       */
20951
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20952
        _Fields fields = findByThriftId(fieldId);
20953
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20954
        return fields;
20955
      }
20956
 
20957
      /**
20958
       * Find the _Fields constant that matches name, or null if its not found.
20959
       */
20960
      public static _Fields findByName(String name) {
20961
        return byName.get(name);
20962
      }
20963
 
20964
      private final short _thriftId;
20965
      private final String _fieldName;
20966
 
20967
      _Fields(short thriftId, String fieldName) {
20968
        _thriftId = thriftId;
20969
        _fieldName = fieldName;
20970
      }
20971
 
20972
      public short getThriftFieldId() {
20973
        return _thriftId;
20974
      }
20975
 
20976
      public String getFieldName() {
20977
        return _fieldName;
20978
      }
20979
    }
20980
 
20981
    // isset id assignments
20982
 
20983
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20984
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20985
          new FieldValueMetaData(TType.STRUCT)));
20986
    }});
20987
 
20988
    static {
20989
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
20990
    }
20991
 
20992
    public deleteItemFromCart_result() {
20993
    }
20994
 
20995
    public deleteItemFromCart_result(
20996
      ShoppingCartException scx)
20997
    {
20998
      this();
20999
      this.scx = scx;
21000
    }
21001
 
21002
    /**
21003
     * Performs a deep copy on <i>other</i>.
21004
     */
21005
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
21006
      if (other.isSetScx()) {
21007
        this.scx = new ShoppingCartException(other.scx);
21008
      }
21009
    }
21010
 
21011
    public deleteItemFromCart_result deepCopy() {
21012
      return new deleteItemFromCart_result(this);
21013
    }
21014
 
21015
    @Deprecated
21016
    public deleteItemFromCart_result clone() {
21017
      return new deleteItemFromCart_result(this);
21018
    }
21019
 
21020
    public ShoppingCartException getScx() {
21021
      return this.scx;
21022
    }
21023
 
21024
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
21025
      this.scx = scx;
21026
      return this;
21027
    }
21028
 
21029
    public void unsetScx() {
21030
      this.scx = null;
21031
    }
21032
 
21033
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21034
    public boolean isSetScx() {
21035
      return this.scx != null;
21036
    }
21037
 
21038
    public void setScxIsSet(boolean value) {
21039
      if (!value) {
21040
        this.scx = null;
21041
      }
21042
    }
21043
 
21044
    public void setFieldValue(_Fields field, Object value) {
21045
      switch (field) {
21046
      case SCX:
21047
        if (value == null) {
21048
          unsetScx();
21049
        } else {
21050
          setScx((ShoppingCartException)value);
21051
        }
21052
        break;
21053
 
21054
      }
21055
    }
21056
 
21057
    public void setFieldValue(int fieldID, Object value) {
21058
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21059
    }
21060
 
21061
    public Object getFieldValue(_Fields field) {
21062
      switch (field) {
21063
      case SCX:
21064
        return getScx();
21065
 
21066
      }
21067
      throw new IllegalStateException();
21068
    }
21069
 
21070
    public Object getFieldValue(int fieldId) {
21071
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21072
    }
21073
 
21074
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21075
    public boolean isSet(_Fields field) {
21076
      switch (field) {
21077
      case SCX:
21078
        return isSetScx();
21079
      }
21080
      throw new IllegalStateException();
21081
    }
21082
 
21083
    public boolean isSet(int fieldID) {
21084
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21085
    }
21086
 
21087
    @Override
21088
    public boolean equals(Object that) {
21089
      if (that == null)
21090
        return false;
21091
      if (that instanceof deleteItemFromCart_result)
21092
        return this.equals((deleteItemFromCart_result)that);
21093
      return false;
21094
    }
21095
 
21096
    public boolean equals(deleteItemFromCart_result that) {
21097
      if (that == null)
21098
        return false;
21099
 
21100
      boolean this_present_scx = true && this.isSetScx();
21101
      boolean that_present_scx = true && that.isSetScx();
21102
      if (this_present_scx || that_present_scx) {
21103
        if (!(this_present_scx && that_present_scx))
21104
          return false;
21105
        if (!this.scx.equals(that.scx))
21106
          return false;
21107
      }
21108
 
21109
      return true;
21110
    }
21111
 
21112
    @Override
21113
    public int hashCode() {
21114
      return 0;
21115
    }
21116
 
21117
    public int compareTo(deleteItemFromCart_result other) {
21118
      if (!getClass().equals(other.getClass())) {
21119
        return getClass().getName().compareTo(other.getClass().getName());
21120
      }
21121
 
21122
      int lastComparison = 0;
21123
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
21124
 
21125
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21126
      if (lastComparison != 0) {
21127
        return lastComparison;
21128
      }
21129
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21130
      if (lastComparison != 0) {
21131
        return lastComparison;
21132
      }
21133
      return 0;
21134
    }
21135
 
21136
    public void read(TProtocol iprot) throws TException {
21137
      TField field;
21138
      iprot.readStructBegin();
21139
      while (true)
21140
      {
21141
        field = iprot.readFieldBegin();
21142
        if (field.type == TType.STOP) { 
21143
          break;
21144
        }
21145
        _Fields fieldId = _Fields.findByThriftId(field.id);
21146
        if (fieldId == null) {
21147
          TProtocolUtil.skip(iprot, field.type);
21148
        } else {
21149
          switch (fieldId) {
21150
            case SCX:
48 ashish 21151
              if (field.type == TType.STRUCT) {
553 chandransh 21152
                this.scx = new ShoppingCartException();
21153
                this.scx.read(iprot);
48 ashish 21154
              } else { 
21155
                TProtocolUtil.skip(iprot, field.type);
21156
              }
21157
              break;
21158
          }
21159
          iprot.readFieldEnd();
21160
        }
21161
      }
21162
      iprot.readStructEnd();
21163
      validate();
21164
    }
21165
 
21166
    public void write(TProtocol oprot) throws TException {
21167
      oprot.writeStructBegin(STRUCT_DESC);
21168
 
553 chandransh 21169
      if (this.isSetScx()) {
21170
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21171
        this.scx.write(oprot);
48 ashish 21172
        oprot.writeFieldEnd();
21173
      }
21174
      oprot.writeFieldStop();
21175
      oprot.writeStructEnd();
21176
    }
21177
 
21178
    @Override
21179
    public String toString() {
553 chandransh 21180
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 21181
      boolean first = true;
21182
 
553 chandransh 21183
      sb.append("scx:");
21184
      if (this.scx == null) {
48 ashish 21185
        sb.append("null");
21186
      } else {
553 chandransh 21187
        sb.append(this.scx);
48 ashish 21188
      }
21189
      first = false;
21190
      sb.append(")");
21191
      return sb.toString();
21192
    }
21193
 
21194
    public void validate() throws TException {
21195
      // check for required fields
21196
    }
21197
 
21198
  }
21199
 
553 chandransh 21200
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
21201
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 21202
 
553 chandransh 21203
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21204
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21205
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 21206
 
553 chandransh 21207
    private long cartId;
21208
    private long itemId;
21209
    private long quantity;
48 ashish 21210
 
21211
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21212
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21213
      CART_ID((short)1, "cartId"),
21214
      ITEM_ID((short)2, "itemId"),
21215
      QUANTITY((short)3, "quantity");
48 ashish 21216
 
21217
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21218
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21219
 
21220
      static {
21221
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21222
          byId.put((int)field._thriftId, field);
21223
          byName.put(field.getFieldName(), field);
21224
        }
21225
      }
21226
 
21227
      /**
21228
       * Find the _Fields constant that matches fieldId, or null if its not found.
21229
       */
21230
      public static _Fields findByThriftId(int fieldId) {
21231
        return byId.get(fieldId);
21232
      }
21233
 
21234
      /**
21235
       * Find the _Fields constant that matches fieldId, throwing an exception
21236
       * if it is not found.
21237
       */
21238
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21239
        _Fields fields = findByThriftId(fieldId);
21240
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21241
        return fields;
21242
      }
21243
 
21244
      /**
21245
       * Find the _Fields constant that matches name, or null if its not found.
21246
       */
21247
      public static _Fields findByName(String name) {
21248
        return byName.get(name);
21249
      }
21250
 
21251
      private final short _thriftId;
21252
      private final String _fieldName;
21253
 
21254
      _Fields(short thriftId, String fieldName) {
21255
        _thriftId = thriftId;
21256
        _fieldName = fieldName;
21257
      }
21258
 
21259
      public short getThriftFieldId() {
21260
        return _thriftId;
21261
      }
21262
 
21263
      public String getFieldName() {
21264
        return _fieldName;
21265
      }
21266
    }
21267
 
21268
    // isset id assignments
553 chandransh 21269
    private static final int __CARTID_ISSET_ID = 0;
21270
    private static final int __ITEMID_ISSET_ID = 1;
21271
    private static final int __QUANTITY_ISSET_ID = 2;
21272
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 21273
 
21274
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21275
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21276
          new FieldValueMetaData(TType.I64)));
553 chandransh 21277
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21278
          new FieldValueMetaData(TType.I64)));
21279
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
21280
          new FieldValueMetaData(TType.I64)));
48 ashish 21281
    }});
21282
 
21283
    static {
553 chandransh 21284
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 21285
    }
21286
 
553 chandransh 21287
    public changeQuantity_args() {
48 ashish 21288
    }
21289
 
553 chandransh 21290
    public changeQuantity_args(
21291
      long cartId,
21292
      long itemId,
21293
      long quantity)
48 ashish 21294
    {
21295
      this();
553 chandransh 21296
      this.cartId = cartId;
21297
      setCartIdIsSet(true);
21298
      this.itemId = itemId;
21299
      setItemIdIsSet(true);
21300
      this.quantity = quantity;
21301
      setQuantityIsSet(true);
48 ashish 21302
    }
21303
 
21304
    /**
21305
     * Performs a deep copy on <i>other</i>.
21306
     */
553 chandransh 21307
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 21308
      __isset_bit_vector.clear();
21309
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21310
      this.cartId = other.cartId;
21311
      this.itemId = other.itemId;
21312
      this.quantity = other.quantity;
48 ashish 21313
    }
21314
 
553 chandransh 21315
    public changeQuantity_args deepCopy() {
21316
      return new changeQuantity_args(this);
48 ashish 21317
    }
21318
 
21319
    @Deprecated
553 chandransh 21320
    public changeQuantity_args clone() {
21321
      return new changeQuantity_args(this);
48 ashish 21322
    }
21323
 
553 chandransh 21324
    public long getCartId() {
21325
      return this.cartId;
48 ashish 21326
    }
21327
 
553 chandransh 21328
    public changeQuantity_args setCartId(long cartId) {
21329
      this.cartId = cartId;
21330
      setCartIdIsSet(true);
48 ashish 21331
      return this;
21332
    }
21333
 
553 chandransh 21334
    public void unsetCartId() {
21335
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21336
    }
21337
 
553 chandransh 21338
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21339
    public boolean isSetCartId() {
21340
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21341
    }
21342
 
553 chandransh 21343
    public void setCartIdIsSet(boolean value) {
21344
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21345
    }
21346
 
553 chandransh 21347
    public long getItemId() {
21348
      return this.itemId;
21349
    }
21350
 
21351
    public changeQuantity_args setItemId(long itemId) {
21352
      this.itemId = itemId;
21353
      setItemIdIsSet(true);
21354
      return this;
21355
    }
21356
 
21357
    public void unsetItemId() {
21358
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
21359
    }
21360
 
21361
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
21362
    public boolean isSetItemId() {
21363
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
21364
    }
21365
 
21366
    public void setItemIdIsSet(boolean value) {
21367
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
21368
    }
21369
 
21370
    public long getQuantity() {
21371
      return this.quantity;
21372
    }
21373
 
21374
    public changeQuantity_args setQuantity(long quantity) {
21375
      this.quantity = quantity;
21376
      setQuantityIsSet(true);
21377
      return this;
21378
    }
21379
 
21380
    public void unsetQuantity() {
21381
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
21382
    }
21383
 
21384
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
21385
    public boolean isSetQuantity() {
21386
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
21387
    }
21388
 
21389
    public void setQuantityIsSet(boolean value) {
21390
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
21391
    }
21392
 
48 ashish 21393
    public void setFieldValue(_Fields field, Object value) {
21394
      switch (field) {
553 chandransh 21395
      case CART_ID:
48 ashish 21396
        if (value == null) {
553 chandransh 21397
          unsetCartId();
48 ashish 21398
        } else {
553 chandransh 21399
          setCartId((Long)value);
48 ashish 21400
        }
21401
        break;
21402
 
553 chandransh 21403
      case ITEM_ID:
21404
        if (value == null) {
21405
          unsetItemId();
21406
        } else {
21407
          setItemId((Long)value);
21408
        }
21409
        break;
21410
 
21411
      case QUANTITY:
21412
        if (value == null) {
21413
          unsetQuantity();
21414
        } else {
21415
          setQuantity((Long)value);
21416
        }
21417
        break;
21418
 
48 ashish 21419
      }
21420
    }
21421
 
21422
    public void setFieldValue(int fieldID, Object value) {
21423
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21424
    }
21425
 
21426
    public Object getFieldValue(_Fields field) {
21427
      switch (field) {
553 chandransh 21428
      case CART_ID:
21429
        return new Long(getCartId());
48 ashish 21430
 
553 chandransh 21431
      case ITEM_ID:
21432
        return new Long(getItemId());
21433
 
21434
      case QUANTITY:
21435
        return new Long(getQuantity());
21436
 
48 ashish 21437
      }
21438
      throw new IllegalStateException();
21439
    }
21440
 
21441
    public Object getFieldValue(int fieldId) {
21442
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21443
    }
21444
 
21445
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21446
    public boolean isSet(_Fields field) {
21447
      switch (field) {
553 chandransh 21448
      case CART_ID:
21449
        return isSetCartId();
21450
      case ITEM_ID:
21451
        return isSetItemId();
21452
      case QUANTITY:
21453
        return isSetQuantity();
48 ashish 21454
      }
21455
      throw new IllegalStateException();
21456
    }
21457
 
21458
    public boolean isSet(int fieldID) {
21459
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21460
    }
21461
 
21462
    @Override
21463
    public boolean equals(Object that) {
21464
      if (that == null)
21465
        return false;
553 chandransh 21466
      if (that instanceof changeQuantity_args)
21467
        return this.equals((changeQuantity_args)that);
48 ashish 21468
      return false;
21469
    }
21470
 
553 chandransh 21471
    public boolean equals(changeQuantity_args that) {
48 ashish 21472
      if (that == null)
21473
        return false;
21474
 
553 chandransh 21475
      boolean this_present_cartId = true;
21476
      boolean that_present_cartId = true;
21477
      if (this_present_cartId || that_present_cartId) {
21478
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21479
          return false;
553 chandransh 21480
        if (this.cartId != that.cartId)
48 ashish 21481
          return false;
21482
      }
21483
 
553 chandransh 21484
      boolean this_present_itemId = true;
21485
      boolean that_present_itemId = true;
21486
      if (this_present_itemId || that_present_itemId) {
21487
        if (!(this_present_itemId && that_present_itemId))
21488
          return false;
21489
        if (this.itemId != that.itemId)
21490
          return false;
21491
      }
21492
 
21493
      boolean this_present_quantity = true;
21494
      boolean that_present_quantity = true;
21495
      if (this_present_quantity || that_present_quantity) {
21496
        if (!(this_present_quantity && that_present_quantity))
21497
          return false;
21498
        if (this.quantity != that.quantity)
21499
          return false;
21500
      }
21501
 
48 ashish 21502
      return true;
21503
    }
21504
 
21505
    @Override
21506
    public int hashCode() {
21507
      return 0;
21508
    }
21509
 
553 chandransh 21510
    public int compareTo(changeQuantity_args other) {
48 ashish 21511
      if (!getClass().equals(other.getClass())) {
21512
        return getClass().getName().compareTo(other.getClass().getName());
21513
      }
21514
 
21515
      int lastComparison = 0;
553 chandransh 21516
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 21517
 
553 chandransh 21518
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21519
      if (lastComparison != 0) {
21520
        return lastComparison;
21521
      }
553 chandransh 21522
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21523
      if (lastComparison != 0) {
21524
        return lastComparison;
21525
      }
553 chandransh 21526
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
21527
      if (lastComparison != 0) {
21528
        return lastComparison;
21529
      }
21530
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
21531
      if (lastComparison != 0) {
21532
        return lastComparison;
21533
      }
21534
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
21535
      if (lastComparison != 0) {
21536
        return lastComparison;
21537
      }
21538
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
21539
      if (lastComparison != 0) {
21540
        return lastComparison;
21541
      }
48 ashish 21542
      return 0;
21543
    }
21544
 
21545
    public void read(TProtocol iprot) throws TException {
21546
      TField field;
21547
      iprot.readStructBegin();
21548
      while (true)
21549
      {
21550
        field = iprot.readFieldBegin();
21551
        if (field.type == TType.STOP) { 
21552
          break;
21553
        }
21554
        _Fields fieldId = _Fields.findByThriftId(field.id);
21555
        if (fieldId == null) {
21556
          TProtocolUtil.skip(iprot, field.type);
21557
        } else {
21558
          switch (fieldId) {
553 chandransh 21559
            case CART_ID:
48 ashish 21560
              if (field.type == TType.I64) {
553 chandransh 21561
                this.cartId = iprot.readI64();
21562
                setCartIdIsSet(true);
48 ashish 21563
              } else { 
21564
                TProtocolUtil.skip(iprot, field.type);
21565
              }
21566
              break;
553 chandransh 21567
            case ITEM_ID:
21568
              if (field.type == TType.I64) {
21569
                this.itemId = iprot.readI64();
21570
                setItemIdIsSet(true);
21571
              } else { 
21572
                TProtocolUtil.skip(iprot, field.type);
21573
              }
21574
              break;
21575
            case QUANTITY:
21576
              if (field.type == TType.I64) {
21577
                this.quantity = iprot.readI64();
21578
                setQuantityIsSet(true);
21579
              } else { 
21580
                TProtocolUtil.skip(iprot, field.type);
21581
              }
21582
              break;
48 ashish 21583
          }
21584
          iprot.readFieldEnd();
21585
        }
21586
      }
21587
      iprot.readStructEnd();
21588
      validate();
21589
    }
21590
 
21591
    public void write(TProtocol oprot) throws TException {
21592
      validate();
21593
 
21594
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21595
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21596
      oprot.writeI64(this.cartId);
48 ashish 21597
      oprot.writeFieldEnd();
553 chandransh 21598
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
21599
      oprot.writeI64(this.itemId);
21600
      oprot.writeFieldEnd();
21601
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
21602
      oprot.writeI64(this.quantity);
21603
      oprot.writeFieldEnd();
48 ashish 21604
      oprot.writeFieldStop();
21605
      oprot.writeStructEnd();
21606
    }
21607
 
21608
    @Override
21609
    public String toString() {
553 chandransh 21610
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 21611
      boolean first = true;
21612
 
553 chandransh 21613
      sb.append("cartId:");
21614
      sb.append(this.cartId);
48 ashish 21615
      first = false;
553 chandransh 21616
      if (!first) sb.append(", ");
21617
      sb.append("itemId:");
21618
      sb.append(this.itemId);
21619
      first = false;
21620
      if (!first) sb.append(", ");
21621
      sb.append("quantity:");
21622
      sb.append(this.quantity);
21623
      first = false;
48 ashish 21624
      sb.append(")");
21625
      return sb.toString();
21626
    }
21627
 
21628
    public void validate() throws TException {
21629
      // check for required fields
21630
    }
21631
 
21632
  }
21633
 
553 chandransh 21634
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
21635
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 21636
 
553 chandransh 21637
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 21638
 
553 chandransh 21639
    private ShoppingCartException scx;
48 ashish 21640
 
21641
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21642
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21643
      SCX((short)1, "scx");
48 ashish 21644
 
21645
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21646
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21647
 
21648
      static {
21649
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21650
          byId.put((int)field._thriftId, field);
21651
          byName.put(field.getFieldName(), field);
21652
        }
21653
      }
21654
 
21655
      /**
21656
       * Find the _Fields constant that matches fieldId, or null if its not found.
21657
       */
21658
      public static _Fields findByThriftId(int fieldId) {
21659
        return byId.get(fieldId);
21660
      }
21661
 
21662
      /**
21663
       * Find the _Fields constant that matches fieldId, throwing an exception
21664
       * if it is not found.
21665
       */
21666
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21667
        _Fields fields = findByThriftId(fieldId);
21668
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21669
        return fields;
21670
      }
21671
 
21672
      /**
21673
       * Find the _Fields constant that matches name, or null if its not found.
21674
       */
21675
      public static _Fields findByName(String name) {
21676
        return byName.get(name);
21677
      }
21678
 
21679
      private final short _thriftId;
21680
      private final String _fieldName;
21681
 
21682
      _Fields(short thriftId, String fieldName) {
21683
        _thriftId = thriftId;
21684
        _fieldName = fieldName;
21685
      }
21686
 
21687
      public short getThriftFieldId() {
21688
        return _thriftId;
21689
      }
21690
 
21691
      public String getFieldName() {
21692
        return _fieldName;
21693
      }
21694
    }
21695
 
21696
    // isset id assignments
21697
 
21698
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21699
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 21700
          new FieldValueMetaData(TType.STRUCT)));
21701
    }});
21702
 
21703
    static {
553 chandransh 21704
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 21705
    }
21706
 
553 chandransh 21707
    public changeQuantity_result() {
48 ashish 21708
    }
21709
 
553 chandransh 21710
    public changeQuantity_result(
21711
      ShoppingCartException scx)
48 ashish 21712
    {
21713
      this();
553 chandransh 21714
      this.scx = scx;
48 ashish 21715
    }
21716
 
21717
    /**
21718
     * Performs a deep copy on <i>other</i>.
21719
     */
553 chandransh 21720
    public changeQuantity_result(changeQuantity_result other) {
21721
      if (other.isSetScx()) {
21722
        this.scx = new ShoppingCartException(other.scx);
21723
      }
21724
    }
21725
 
21726
    public changeQuantity_result deepCopy() {
21727
      return new changeQuantity_result(this);
21728
    }
21729
 
21730
    @Deprecated
21731
    public changeQuantity_result clone() {
21732
      return new changeQuantity_result(this);
21733
    }
21734
 
21735
    public ShoppingCartException getScx() {
21736
      return this.scx;
21737
    }
21738
 
21739
    public changeQuantity_result setScx(ShoppingCartException scx) {
21740
      this.scx = scx;
21741
      return this;
21742
    }
21743
 
21744
    public void unsetScx() {
21745
      this.scx = null;
21746
    }
21747
 
21748
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21749
    public boolean isSetScx() {
21750
      return this.scx != null;
21751
    }
21752
 
21753
    public void setScxIsSet(boolean value) {
21754
      if (!value) {
21755
        this.scx = null;
21756
      }
21757
    }
21758
 
21759
    public void setFieldValue(_Fields field, Object value) {
21760
      switch (field) {
21761
      case SCX:
21762
        if (value == null) {
21763
          unsetScx();
21764
        } else {
21765
          setScx((ShoppingCartException)value);
21766
        }
21767
        break;
21768
 
21769
      }
21770
    }
21771
 
21772
    public void setFieldValue(int fieldID, Object value) {
21773
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21774
    }
21775
 
21776
    public Object getFieldValue(_Fields field) {
21777
      switch (field) {
21778
      case SCX:
21779
        return getScx();
21780
 
21781
      }
21782
      throw new IllegalStateException();
21783
    }
21784
 
21785
    public Object getFieldValue(int fieldId) {
21786
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21787
    }
21788
 
21789
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21790
    public boolean isSet(_Fields field) {
21791
      switch (field) {
21792
      case SCX:
21793
        return isSetScx();
21794
      }
21795
      throw new IllegalStateException();
21796
    }
21797
 
21798
    public boolean isSet(int fieldID) {
21799
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21800
    }
21801
 
21802
    @Override
21803
    public boolean equals(Object that) {
21804
      if (that == null)
21805
        return false;
21806
      if (that instanceof changeQuantity_result)
21807
        return this.equals((changeQuantity_result)that);
21808
      return false;
21809
    }
21810
 
21811
    public boolean equals(changeQuantity_result that) {
21812
      if (that == null)
21813
        return false;
21814
 
21815
      boolean this_present_scx = true && this.isSetScx();
21816
      boolean that_present_scx = true && that.isSetScx();
21817
      if (this_present_scx || that_present_scx) {
21818
        if (!(this_present_scx && that_present_scx))
21819
          return false;
21820
        if (!this.scx.equals(that.scx))
21821
          return false;
21822
      }
21823
 
21824
      return true;
21825
    }
21826
 
21827
    @Override
21828
    public int hashCode() {
21829
      return 0;
21830
    }
21831
 
21832
    public int compareTo(changeQuantity_result other) {
21833
      if (!getClass().equals(other.getClass())) {
21834
        return getClass().getName().compareTo(other.getClass().getName());
21835
      }
21836
 
21837
      int lastComparison = 0;
21838
      changeQuantity_result typedOther = (changeQuantity_result)other;
21839
 
21840
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21841
      if (lastComparison != 0) {
21842
        return lastComparison;
21843
      }
21844
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21845
      if (lastComparison != 0) {
21846
        return lastComparison;
21847
      }
21848
      return 0;
21849
    }
21850
 
21851
    public void read(TProtocol iprot) throws TException {
21852
      TField field;
21853
      iprot.readStructBegin();
21854
      while (true)
21855
      {
21856
        field = iprot.readFieldBegin();
21857
        if (field.type == TType.STOP) { 
21858
          break;
21859
        }
21860
        _Fields fieldId = _Fields.findByThriftId(field.id);
21861
        if (fieldId == null) {
21862
          TProtocolUtil.skip(iprot, field.type);
21863
        } else {
21864
          switch (fieldId) {
21865
            case SCX:
21866
              if (field.type == TType.STRUCT) {
21867
                this.scx = new ShoppingCartException();
21868
                this.scx.read(iprot);
21869
              } else { 
21870
                TProtocolUtil.skip(iprot, field.type);
21871
              }
21872
              break;
21873
          }
21874
          iprot.readFieldEnd();
21875
        }
21876
      }
21877
      iprot.readStructEnd();
21878
      validate();
21879
    }
21880
 
21881
    public void write(TProtocol oprot) throws TException {
21882
      oprot.writeStructBegin(STRUCT_DESC);
21883
 
21884
      if (this.isSetScx()) {
21885
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21886
        this.scx.write(oprot);
21887
        oprot.writeFieldEnd();
21888
      }
21889
      oprot.writeFieldStop();
21890
      oprot.writeStructEnd();
21891
    }
21892
 
21893
    @Override
21894
    public String toString() {
21895
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
21896
      boolean first = true;
21897
 
21898
      sb.append("scx:");
21899
      if (this.scx == null) {
21900
        sb.append("null");
21901
      } else {
21902
        sb.append(this.scx);
21903
      }
21904
      first = false;
21905
      sb.append(")");
21906
      return sb.toString();
21907
    }
21908
 
21909
    public void validate() throws TException {
21910
      // check for required fields
21911
    }
21912
 
21913
  }
21914
 
21915
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
21916
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
21917
 
21918
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21919
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21920
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
21921
 
21922
    private long cartId;
21923
    private long itemId;
21924
    private LineStatus status;
21925
 
21926
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21927
    public enum _Fields implements TFieldIdEnum {
21928
      CART_ID((short)1, "cartId"),
21929
      ITEM_ID((short)2, "itemId"),
21930
      /**
21931
       * 
21932
       * @see LineStatus
21933
       */
21934
      STATUS((short)3, "status");
21935
 
21936
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21937
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21938
 
21939
      static {
21940
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21941
          byId.put((int)field._thriftId, field);
21942
          byName.put(field.getFieldName(), field);
21943
        }
21944
      }
21945
 
21946
      /**
21947
       * Find the _Fields constant that matches fieldId, or null if its not found.
21948
       */
21949
      public static _Fields findByThriftId(int fieldId) {
21950
        return byId.get(fieldId);
21951
      }
21952
 
21953
      /**
21954
       * Find the _Fields constant that matches fieldId, throwing an exception
21955
       * if it is not found.
21956
       */
21957
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21958
        _Fields fields = findByThriftId(fieldId);
21959
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21960
        return fields;
21961
      }
21962
 
21963
      /**
21964
       * Find the _Fields constant that matches name, or null if its not found.
21965
       */
21966
      public static _Fields findByName(String name) {
21967
        return byName.get(name);
21968
      }
21969
 
21970
      private final short _thriftId;
21971
      private final String _fieldName;
21972
 
21973
      _Fields(short thriftId, String fieldName) {
21974
        _thriftId = thriftId;
21975
        _fieldName = fieldName;
21976
      }
21977
 
21978
      public short getThriftFieldId() {
21979
        return _thriftId;
21980
      }
21981
 
21982
      public String getFieldName() {
21983
        return _fieldName;
21984
      }
21985
    }
21986
 
21987
    // isset id assignments
21988
    private static final int __CARTID_ISSET_ID = 0;
21989
    private static final int __ITEMID_ISSET_ID = 1;
21990
    private BitSet __isset_bit_vector = new BitSet(2);
21991
 
21992
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21993
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
21994
          new FieldValueMetaData(TType.I64)));
21995
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
21996
          new FieldValueMetaData(TType.I64)));
21997
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
21998
          new EnumMetaData(TType.ENUM, LineStatus.class)));
21999
    }});
22000
 
22001
    static {
22002
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
22003
    }
22004
 
22005
    public changeItemStatus_args() {
22006
    }
22007
 
22008
    public changeItemStatus_args(
22009
      long cartId,
22010
      long itemId,
22011
      LineStatus status)
22012
    {
22013
      this();
22014
      this.cartId = cartId;
22015
      setCartIdIsSet(true);
22016
      this.itemId = itemId;
22017
      setItemIdIsSet(true);
22018
      this.status = status;
22019
    }
22020
 
22021
    /**
22022
     * Performs a deep copy on <i>other</i>.
22023
     */
22024
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 22025
      __isset_bit_vector.clear();
22026
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22027
      this.cartId = other.cartId;
22028
      this.itemId = other.itemId;
22029
      if (other.isSetStatus()) {
22030
        this.status = other.status;
48 ashish 22031
      }
22032
    }
22033
 
553 chandransh 22034
    public changeItemStatus_args deepCopy() {
22035
      return new changeItemStatus_args(this);
48 ashish 22036
    }
22037
 
22038
    @Deprecated
553 chandransh 22039
    public changeItemStatus_args clone() {
22040
      return new changeItemStatus_args(this);
48 ashish 22041
    }
22042
 
553 chandransh 22043
    public long getCartId() {
22044
      return this.cartId;
48 ashish 22045
    }
22046
 
553 chandransh 22047
    public changeItemStatus_args setCartId(long cartId) {
22048
      this.cartId = cartId;
22049
      setCartIdIsSet(true);
48 ashish 22050
      return this;
22051
    }
22052
 
553 chandransh 22053
    public void unsetCartId() {
22054
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22055
    }
22056
 
553 chandransh 22057
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22058
    public boolean isSetCartId() {
22059
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22060
    }
22061
 
553 chandransh 22062
    public void setCartIdIsSet(boolean value) {
22063
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22064
    }
22065
 
553 chandransh 22066
    public long getItemId() {
22067
      return this.itemId;
48 ashish 22068
    }
22069
 
553 chandransh 22070
    public changeItemStatus_args setItemId(long itemId) {
22071
      this.itemId = itemId;
22072
      setItemIdIsSet(true);
48 ashish 22073
      return this;
22074
    }
22075
 
553 chandransh 22076
    public void unsetItemId() {
22077
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 22078
    }
22079
 
553 chandransh 22080
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22081
    public boolean isSetItemId() {
22082
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 22083
    }
22084
 
553 chandransh 22085
    public void setItemIdIsSet(boolean value) {
22086
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22087
    }
22088
 
22089
    /**
22090
     * 
22091
     * @see LineStatus
22092
     */
22093
    public LineStatus getStatus() {
22094
      return this.status;
22095
    }
22096
 
22097
    /**
22098
     * 
22099
     * @see LineStatus
22100
     */
22101
    public changeItemStatus_args setStatus(LineStatus status) {
22102
      this.status = status;
22103
      return this;
22104
    }
22105
 
22106
    public void unsetStatus() {
22107
      this.status = null;
22108
    }
22109
 
22110
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
22111
    public boolean isSetStatus() {
22112
      return this.status != null;
22113
    }
22114
 
22115
    public void setStatusIsSet(boolean value) {
48 ashish 22116
      if (!value) {
553 chandransh 22117
        this.status = null;
48 ashish 22118
      }
22119
    }
22120
 
22121
    public void setFieldValue(_Fields field, Object value) {
22122
      switch (field) {
553 chandransh 22123
      case CART_ID:
48 ashish 22124
        if (value == null) {
553 chandransh 22125
          unsetCartId();
48 ashish 22126
        } else {
553 chandransh 22127
          setCartId((Long)value);
48 ashish 22128
        }
22129
        break;
22130
 
553 chandransh 22131
      case ITEM_ID:
48 ashish 22132
        if (value == null) {
553 chandransh 22133
          unsetItemId();
48 ashish 22134
        } else {
553 chandransh 22135
          setItemId((Long)value);
48 ashish 22136
        }
22137
        break;
22138
 
553 chandransh 22139
      case STATUS:
22140
        if (value == null) {
22141
          unsetStatus();
22142
        } else {
22143
          setStatus((LineStatus)value);
22144
        }
22145
        break;
22146
 
48 ashish 22147
      }
22148
    }
22149
 
22150
    public void setFieldValue(int fieldID, Object value) {
22151
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22152
    }
22153
 
22154
    public Object getFieldValue(_Fields field) {
22155
      switch (field) {
553 chandransh 22156
      case CART_ID:
22157
        return new Long(getCartId());
48 ashish 22158
 
553 chandransh 22159
      case ITEM_ID:
22160
        return new Long(getItemId());
48 ashish 22161
 
553 chandransh 22162
      case STATUS:
22163
        return getStatus();
22164
 
48 ashish 22165
      }
22166
      throw new IllegalStateException();
22167
    }
22168
 
22169
    public Object getFieldValue(int fieldId) {
22170
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22171
    }
22172
 
22173
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22174
    public boolean isSet(_Fields field) {
22175
      switch (field) {
553 chandransh 22176
      case CART_ID:
22177
        return isSetCartId();
22178
      case ITEM_ID:
22179
        return isSetItemId();
22180
      case STATUS:
22181
        return isSetStatus();
48 ashish 22182
      }
22183
      throw new IllegalStateException();
22184
    }
22185
 
22186
    public boolean isSet(int fieldID) {
22187
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22188
    }
22189
 
22190
    @Override
22191
    public boolean equals(Object that) {
22192
      if (that == null)
22193
        return false;
553 chandransh 22194
      if (that instanceof changeItemStatus_args)
22195
        return this.equals((changeItemStatus_args)that);
48 ashish 22196
      return false;
22197
    }
22198
 
553 chandransh 22199
    public boolean equals(changeItemStatus_args that) {
48 ashish 22200
      if (that == null)
22201
        return false;
22202
 
553 chandransh 22203
      boolean this_present_cartId = true;
22204
      boolean that_present_cartId = true;
22205
      if (this_present_cartId || that_present_cartId) {
22206
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22207
          return false;
553 chandransh 22208
        if (this.cartId != that.cartId)
48 ashish 22209
          return false;
22210
      }
22211
 
553 chandransh 22212
      boolean this_present_itemId = true;
22213
      boolean that_present_itemId = true;
22214
      if (this_present_itemId || that_present_itemId) {
22215
        if (!(this_present_itemId && that_present_itemId))
48 ashish 22216
          return false;
553 chandransh 22217
        if (this.itemId != that.itemId)
48 ashish 22218
          return false;
22219
      }
22220
 
553 chandransh 22221
      boolean this_present_status = true && this.isSetStatus();
22222
      boolean that_present_status = true && that.isSetStatus();
22223
      if (this_present_status || that_present_status) {
22224
        if (!(this_present_status && that_present_status))
22225
          return false;
22226
        if (!this.status.equals(that.status))
22227
          return false;
22228
      }
22229
 
48 ashish 22230
      return true;
22231
    }
22232
 
22233
    @Override
22234
    public int hashCode() {
22235
      return 0;
22236
    }
22237
 
553 chandransh 22238
    public int compareTo(changeItemStatus_args other) {
48 ashish 22239
      if (!getClass().equals(other.getClass())) {
22240
        return getClass().getName().compareTo(other.getClass().getName());
22241
      }
22242
 
22243
      int lastComparison = 0;
553 chandransh 22244
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 22245
 
553 chandransh 22246
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22247
      if (lastComparison != 0) {
22248
        return lastComparison;
22249
      }
553 chandransh 22250
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22251
      if (lastComparison != 0) {
22252
        return lastComparison;
22253
      }
553 chandransh 22254
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 22255
      if (lastComparison != 0) {
22256
        return lastComparison;
22257
      }
553 chandransh 22258
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 22259
      if (lastComparison != 0) {
22260
        return lastComparison;
22261
      }
553 chandransh 22262
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
22263
      if (lastComparison != 0) {
22264
        return lastComparison;
22265
      }
22266
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
22267
      if (lastComparison != 0) {
22268
        return lastComparison;
22269
      }
48 ashish 22270
      return 0;
22271
    }
22272
 
22273
    public void read(TProtocol iprot) throws TException {
22274
      TField field;
22275
      iprot.readStructBegin();
22276
      while (true)
22277
      {
22278
        field = iprot.readFieldBegin();
22279
        if (field.type == TType.STOP) { 
22280
          break;
22281
        }
22282
        _Fields fieldId = _Fields.findByThriftId(field.id);
22283
        if (fieldId == null) {
22284
          TProtocolUtil.skip(iprot, field.type);
22285
        } else {
22286
          switch (fieldId) {
553 chandransh 22287
            case CART_ID:
22288
              if (field.type == TType.I64) {
22289
                this.cartId = iprot.readI64();
22290
                setCartIdIsSet(true);
48 ashish 22291
              } else { 
22292
                TProtocolUtil.skip(iprot, field.type);
22293
              }
22294
              break;
553 chandransh 22295
            case ITEM_ID:
22296
              if (field.type == TType.I64) {
22297
                this.itemId = iprot.readI64();
22298
                setItemIdIsSet(true);
48 ashish 22299
              } else { 
22300
                TProtocolUtil.skip(iprot, field.type);
22301
              }
22302
              break;
553 chandransh 22303
            case STATUS:
22304
              if (field.type == TType.I32) {
22305
                this.status = LineStatus.findByValue(iprot.readI32());
22306
              } else { 
22307
                TProtocolUtil.skip(iprot, field.type);
22308
              }
22309
              break;
48 ashish 22310
          }
22311
          iprot.readFieldEnd();
22312
        }
22313
      }
22314
      iprot.readStructEnd();
22315
      validate();
22316
    }
22317
 
22318
    public void write(TProtocol oprot) throws TException {
553 chandransh 22319
      validate();
22320
 
48 ashish 22321
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22322
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22323
      oprot.writeI64(this.cartId);
22324
      oprot.writeFieldEnd();
22325
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22326
      oprot.writeI64(this.itemId);
22327
      oprot.writeFieldEnd();
22328
      if (this.status != null) {
22329
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
22330
        oprot.writeI32(this.status.getValue());
48 ashish 22331
        oprot.writeFieldEnd();
22332
      }
22333
      oprot.writeFieldStop();
22334
      oprot.writeStructEnd();
22335
    }
22336
 
22337
    @Override
22338
    public String toString() {
553 chandransh 22339
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 22340
      boolean first = true;
22341
 
553 chandransh 22342
      sb.append("cartId:");
22343
      sb.append(this.cartId);
48 ashish 22344
      first = false;
22345
      if (!first) sb.append(", ");
553 chandransh 22346
      sb.append("itemId:");
22347
      sb.append(this.itemId);
22348
      first = false;
22349
      if (!first) sb.append(", ");
22350
      sb.append("status:");
22351
      if (this.status == null) {
48 ashish 22352
        sb.append("null");
22353
      } else {
553 chandransh 22354
        String status_name = status.name();
22355
        if (status_name != null) {
22356
          sb.append(status_name);
22357
          sb.append(" (");
22358
        }
22359
        sb.append(this.status);
22360
        if (status_name != null) {
22361
          sb.append(")");
22362
        }
48 ashish 22363
      }
22364
      first = false;
22365
      sb.append(")");
22366
      return sb.toString();
22367
    }
22368
 
22369
    public void validate() throws TException {
22370
      // check for required fields
22371
    }
22372
 
22373
  }
22374
 
553 chandransh 22375
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
22376
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 22377
 
553 chandransh 22378
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22379
 
553 chandransh 22380
    private ShoppingCartException scx;
48 ashish 22381
 
22382
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22383
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22384
      SCX((short)1, "scx");
48 ashish 22385
 
22386
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22387
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22388
 
22389
      static {
22390
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22391
          byId.put((int)field._thriftId, field);
22392
          byName.put(field.getFieldName(), field);
22393
        }
22394
      }
22395
 
22396
      /**
22397
       * Find the _Fields constant that matches fieldId, or null if its not found.
22398
       */
22399
      public static _Fields findByThriftId(int fieldId) {
22400
        return byId.get(fieldId);
22401
      }
22402
 
22403
      /**
22404
       * Find the _Fields constant that matches fieldId, throwing an exception
22405
       * if it is not found.
22406
       */
22407
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22408
        _Fields fields = findByThriftId(fieldId);
22409
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22410
        return fields;
22411
      }
22412
 
22413
      /**
22414
       * Find the _Fields constant that matches name, or null if its not found.
22415
       */
22416
      public static _Fields findByName(String name) {
22417
        return byName.get(name);
22418
      }
22419
 
22420
      private final short _thriftId;
22421
      private final String _fieldName;
22422
 
22423
      _Fields(short thriftId, String fieldName) {
22424
        _thriftId = thriftId;
22425
        _fieldName = fieldName;
22426
      }
22427
 
22428
      public short getThriftFieldId() {
22429
        return _thriftId;
22430
      }
22431
 
22432
      public String getFieldName() {
22433
        return _fieldName;
22434
      }
22435
    }
22436
 
22437
    // isset id assignments
553 chandransh 22438
 
22439
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22440
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22441
          new FieldValueMetaData(TType.STRUCT)));
22442
    }});
22443
 
22444
    static {
22445
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
22446
    }
22447
 
22448
    public changeItemStatus_result() {
22449
    }
22450
 
22451
    public changeItemStatus_result(
22452
      ShoppingCartException scx)
22453
    {
22454
      this();
22455
      this.scx = scx;
22456
    }
22457
 
22458
    /**
22459
     * Performs a deep copy on <i>other</i>.
22460
     */
22461
    public changeItemStatus_result(changeItemStatus_result other) {
22462
      if (other.isSetScx()) {
22463
        this.scx = new ShoppingCartException(other.scx);
22464
      }
22465
    }
22466
 
22467
    public changeItemStatus_result deepCopy() {
22468
      return new changeItemStatus_result(this);
22469
    }
22470
 
22471
    @Deprecated
22472
    public changeItemStatus_result clone() {
22473
      return new changeItemStatus_result(this);
22474
    }
22475
 
22476
    public ShoppingCartException getScx() {
22477
      return this.scx;
22478
    }
22479
 
22480
    public changeItemStatus_result setScx(ShoppingCartException scx) {
22481
      this.scx = scx;
22482
      return this;
22483
    }
22484
 
22485
    public void unsetScx() {
22486
      this.scx = null;
22487
    }
22488
 
22489
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22490
    public boolean isSetScx() {
22491
      return this.scx != null;
22492
    }
22493
 
22494
    public void setScxIsSet(boolean value) {
22495
      if (!value) {
22496
        this.scx = null;
22497
      }
22498
    }
22499
 
22500
    public void setFieldValue(_Fields field, Object value) {
22501
      switch (field) {
22502
      case SCX:
22503
        if (value == null) {
22504
          unsetScx();
22505
        } else {
22506
          setScx((ShoppingCartException)value);
22507
        }
22508
        break;
22509
 
22510
      }
22511
    }
22512
 
22513
    public void setFieldValue(int fieldID, Object value) {
22514
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22515
    }
22516
 
22517
    public Object getFieldValue(_Fields field) {
22518
      switch (field) {
22519
      case SCX:
22520
        return getScx();
22521
 
22522
      }
22523
      throw new IllegalStateException();
22524
    }
22525
 
22526
    public Object getFieldValue(int fieldId) {
22527
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22528
    }
22529
 
22530
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22531
    public boolean isSet(_Fields field) {
22532
      switch (field) {
22533
      case SCX:
22534
        return isSetScx();
22535
      }
22536
      throw new IllegalStateException();
22537
    }
22538
 
22539
    public boolean isSet(int fieldID) {
22540
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22541
    }
22542
 
22543
    @Override
22544
    public boolean equals(Object that) {
22545
      if (that == null)
22546
        return false;
22547
      if (that instanceof changeItemStatus_result)
22548
        return this.equals((changeItemStatus_result)that);
22549
      return false;
22550
    }
22551
 
22552
    public boolean equals(changeItemStatus_result that) {
22553
      if (that == null)
22554
        return false;
22555
 
22556
      boolean this_present_scx = true && this.isSetScx();
22557
      boolean that_present_scx = true && that.isSetScx();
22558
      if (this_present_scx || that_present_scx) {
22559
        if (!(this_present_scx && that_present_scx))
22560
          return false;
22561
        if (!this.scx.equals(that.scx))
22562
          return false;
22563
      }
22564
 
22565
      return true;
22566
    }
22567
 
22568
    @Override
22569
    public int hashCode() {
22570
      return 0;
22571
    }
22572
 
22573
    public int compareTo(changeItemStatus_result other) {
22574
      if (!getClass().equals(other.getClass())) {
22575
        return getClass().getName().compareTo(other.getClass().getName());
22576
      }
22577
 
22578
      int lastComparison = 0;
22579
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
22580
 
22581
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22582
      if (lastComparison != 0) {
22583
        return lastComparison;
22584
      }
22585
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22586
      if (lastComparison != 0) {
22587
        return lastComparison;
22588
      }
22589
      return 0;
22590
    }
22591
 
22592
    public void read(TProtocol iprot) throws TException {
22593
      TField field;
22594
      iprot.readStructBegin();
22595
      while (true)
22596
      {
22597
        field = iprot.readFieldBegin();
22598
        if (field.type == TType.STOP) { 
22599
          break;
22600
        }
22601
        _Fields fieldId = _Fields.findByThriftId(field.id);
22602
        if (fieldId == null) {
22603
          TProtocolUtil.skip(iprot, field.type);
22604
        } else {
22605
          switch (fieldId) {
22606
            case SCX:
22607
              if (field.type == TType.STRUCT) {
22608
                this.scx = new ShoppingCartException();
22609
                this.scx.read(iprot);
22610
              } else { 
22611
                TProtocolUtil.skip(iprot, field.type);
22612
              }
22613
              break;
22614
          }
22615
          iprot.readFieldEnd();
22616
        }
22617
      }
22618
      iprot.readStructEnd();
22619
      validate();
22620
    }
22621
 
22622
    public void write(TProtocol oprot) throws TException {
22623
      oprot.writeStructBegin(STRUCT_DESC);
22624
 
22625
      if (this.isSetScx()) {
22626
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22627
        this.scx.write(oprot);
22628
        oprot.writeFieldEnd();
22629
      }
22630
      oprot.writeFieldStop();
22631
      oprot.writeStructEnd();
22632
    }
22633
 
22634
    @Override
22635
    public String toString() {
22636
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
22637
      boolean first = true;
22638
 
22639
      sb.append("scx:");
22640
      if (this.scx == null) {
22641
        sb.append("null");
22642
      } else {
22643
        sb.append(this.scx);
22644
      }
22645
      first = false;
22646
      sb.append(")");
22647
      return sb.toString();
22648
    }
22649
 
22650
    public void validate() throws TException {
22651
      // check for required fields
22652
    }
22653
 
22654
  }
22655
 
22656
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
22657
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
22658
 
22659
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22660
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
22661
 
22662
    private long cartId;
22663
    private long addressId;
22664
 
22665
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22666
    public enum _Fields implements TFieldIdEnum {
22667
      CART_ID((short)1, "cartId"),
22668
      ADDRESS_ID((short)2, "addressId");
22669
 
22670
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22671
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22672
 
22673
      static {
22674
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22675
          byId.put((int)field._thriftId, field);
22676
          byName.put(field.getFieldName(), field);
22677
        }
22678
      }
22679
 
22680
      /**
22681
       * Find the _Fields constant that matches fieldId, or null if its not found.
22682
       */
22683
      public static _Fields findByThriftId(int fieldId) {
22684
        return byId.get(fieldId);
22685
      }
22686
 
22687
      /**
22688
       * Find the _Fields constant that matches fieldId, throwing an exception
22689
       * if it is not found.
22690
       */
22691
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22692
        _Fields fields = findByThriftId(fieldId);
22693
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22694
        return fields;
22695
      }
22696
 
22697
      /**
22698
       * Find the _Fields constant that matches name, or null if its not found.
22699
       */
22700
      public static _Fields findByName(String name) {
22701
        return byName.get(name);
22702
      }
22703
 
22704
      private final short _thriftId;
22705
      private final String _fieldName;
22706
 
22707
      _Fields(short thriftId, String fieldName) {
22708
        _thriftId = thriftId;
22709
        _fieldName = fieldName;
22710
      }
22711
 
22712
      public short getThriftFieldId() {
22713
        return _thriftId;
22714
      }
22715
 
22716
      public String getFieldName() {
22717
        return _fieldName;
22718
      }
22719
    }
22720
 
22721
    // isset id assignments
22722
    private static final int __CARTID_ISSET_ID = 0;
22723
    private static final int __ADDRESSID_ISSET_ID = 1;
22724
    private BitSet __isset_bit_vector = new BitSet(2);
22725
 
22726
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22727
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22728
          new FieldValueMetaData(TType.I64)));
22729
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
22730
          new FieldValueMetaData(TType.I64)));
22731
    }});
22732
 
22733
    static {
22734
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
22735
    }
22736
 
22737
    public addAddressToCart_args() {
22738
    }
22739
 
22740
    public addAddressToCart_args(
22741
      long cartId,
22742
      long addressId)
22743
    {
22744
      this();
22745
      this.cartId = cartId;
22746
      setCartIdIsSet(true);
22747
      this.addressId = addressId;
22748
      setAddressIdIsSet(true);
22749
    }
22750
 
22751
    /**
22752
     * Performs a deep copy on <i>other</i>.
22753
     */
22754
    public addAddressToCart_args(addAddressToCart_args other) {
22755
      __isset_bit_vector.clear();
22756
      __isset_bit_vector.or(other.__isset_bit_vector);
22757
      this.cartId = other.cartId;
22758
      this.addressId = other.addressId;
22759
    }
22760
 
22761
    public addAddressToCart_args deepCopy() {
22762
      return new addAddressToCart_args(this);
22763
    }
22764
 
22765
    @Deprecated
22766
    public addAddressToCart_args clone() {
22767
      return new addAddressToCart_args(this);
22768
    }
22769
 
22770
    public long getCartId() {
22771
      return this.cartId;
22772
    }
22773
 
22774
    public addAddressToCart_args setCartId(long cartId) {
22775
      this.cartId = cartId;
22776
      setCartIdIsSet(true);
22777
      return this;
22778
    }
22779
 
22780
    public void unsetCartId() {
22781
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
22782
    }
22783
 
22784
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22785
    public boolean isSetCartId() {
22786
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
22787
    }
22788
 
22789
    public void setCartIdIsSet(boolean value) {
22790
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
22791
    }
22792
 
22793
    public long getAddressId() {
22794
      return this.addressId;
22795
    }
22796
 
22797
    public addAddressToCart_args setAddressId(long addressId) {
22798
      this.addressId = addressId;
22799
      setAddressIdIsSet(true);
22800
      return this;
22801
    }
22802
 
22803
    public void unsetAddressId() {
22804
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
22805
    }
22806
 
22807
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
22808
    public boolean isSetAddressId() {
22809
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
22810
    }
22811
 
22812
    public void setAddressIdIsSet(boolean value) {
22813
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
22814
    }
22815
 
22816
    public void setFieldValue(_Fields field, Object value) {
22817
      switch (field) {
22818
      case CART_ID:
22819
        if (value == null) {
22820
          unsetCartId();
22821
        } else {
22822
          setCartId((Long)value);
22823
        }
22824
        break;
22825
 
22826
      case ADDRESS_ID:
22827
        if (value == null) {
22828
          unsetAddressId();
22829
        } else {
22830
          setAddressId((Long)value);
22831
        }
22832
        break;
22833
 
22834
      }
22835
    }
22836
 
22837
    public void setFieldValue(int fieldID, Object value) {
22838
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22839
    }
22840
 
22841
    public Object getFieldValue(_Fields field) {
22842
      switch (field) {
22843
      case CART_ID:
22844
        return new Long(getCartId());
22845
 
22846
      case ADDRESS_ID:
22847
        return new Long(getAddressId());
22848
 
22849
      }
22850
      throw new IllegalStateException();
22851
    }
22852
 
22853
    public Object getFieldValue(int fieldId) {
22854
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22855
    }
22856
 
22857
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22858
    public boolean isSet(_Fields field) {
22859
      switch (field) {
22860
      case CART_ID:
22861
        return isSetCartId();
22862
      case ADDRESS_ID:
22863
        return isSetAddressId();
22864
      }
22865
      throw new IllegalStateException();
22866
    }
22867
 
22868
    public boolean isSet(int fieldID) {
22869
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22870
    }
22871
 
22872
    @Override
22873
    public boolean equals(Object that) {
22874
      if (that == null)
22875
        return false;
22876
      if (that instanceof addAddressToCart_args)
22877
        return this.equals((addAddressToCart_args)that);
22878
      return false;
22879
    }
22880
 
22881
    public boolean equals(addAddressToCart_args that) {
22882
      if (that == null)
22883
        return false;
22884
 
22885
      boolean this_present_cartId = true;
22886
      boolean that_present_cartId = true;
22887
      if (this_present_cartId || that_present_cartId) {
22888
        if (!(this_present_cartId && that_present_cartId))
22889
          return false;
22890
        if (this.cartId != that.cartId)
22891
          return false;
22892
      }
22893
 
22894
      boolean this_present_addressId = true;
22895
      boolean that_present_addressId = true;
22896
      if (this_present_addressId || that_present_addressId) {
22897
        if (!(this_present_addressId && that_present_addressId))
22898
          return false;
22899
        if (this.addressId != that.addressId)
22900
          return false;
22901
      }
22902
 
22903
      return true;
22904
    }
22905
 
22906
    @Override
22907
    public int hashCode() {
22908
      return 0;
22909
    }
22910
 
22911
    public int compareTo(addAddressToCart_args other) {
22912
      if (!getClass().equals(other.getClass())) {
22913
        return getClass().getName().compareTo(other.getClass().getName());
22914
      }
22915
 
22916
      int lastComparison = 0;
22917
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
22918
 
22919
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
22920
      if (lastComparison != 0) {
22921
        return lastComparison;
22922
      }
22923
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
22924
      if (lastComparison != 0) {
22925
        return lastComparison;
22926
      }
22927
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
22928
      if (lastComparison != 0) {
22929
        return lastComparison;
22930
      }
22931
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
22932
      if (lastComparison != 0) {
22933
        return lastComparison;
22934
      }
22935
      return 0;
22936
    }
22937
 
22938
    public void read(TProtocol iprot) throws TException {
22939
      TField field;
22940
      iprot.readStructBegin();
22941
      while (true)
22942
      {
22943
        field = iprot.readFieldBegin();
22944
        if (field.type == TType.STOP) { 
22945
          break;
22946
        }
22947
        _Fields fieldId = _Fields.findByThriftId(field.id);
22948
        if (fieldId == null) {
22949
          TProtocolUtil.skip(iprot, field.type);
22950
        } else {
22951
          switch (fieldId) {
22952
            case CART_ID:
22953
              if (field.type == TType.I64) {
22954
                this.cartId = iprot.readI64();
22955
                setCartIdIsSet(true);
22956
              } else { 
22957
                TProtocolUtil.skip(iprot, field.type);
22958
              }
22959
              break;
22960
            case ADDRESS_ID:
22961
              if (field.type == TType.I64) {
22962
                this.addressId = iprot.readI64();
22963
                setAddressIdIsSet(true);
22964
              } else { 
22965
                TProtocolUtil.skip(iprot, field.type);
22966
              }
22967
              break;
22968
          }
22969
          iprot.readFieldEnd();
22970
        }
22971
      }
22972
      iprot.readStructEnd();
22973
      validate();
22974
    }
22975
 
22976
    public void write(TProtocol oprot) throws TException {
22977
      validate();
22978
 
22979
      oprot.writeStructBegin(STRUCT_DESC);
22980
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22981
      oprot.writeI64(this.cartId);
22982
      oprot.writeFieldEnd();
22983
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
22984
      oprot.writeI64(this.addressId);
22985
      oprot.writeFieldEnd();
22986
      oprot.writeFieldStop();
22987
      oprot.writeStructEnd();
22988
    }
22989
 
22990
    @Override
22991
    public String toString() {
22992
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
22993
      boolean first = true;
22994
 
22995
      sb.append("cartId:");
22996
      sb.append(this.cartId);
22997
      first = false;
22998
      if (!first) sb.append(", ");
22999
      sb.append("addressId:");
23000
      sb.append(this.addressId);
23001
      first = false;
23002
      sb.append(")");
23003
      return sb.toString();
23004
    }
23005
 
23006
    public void validate() throws TException {
23007
      // check for required fields
23008
    }
23009
 
23010
  }
23011
 
23012
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
23013
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
23014
 
578 chandransh 23015
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 23016
 
578 chandransh 23017
    private ShoppingCartException scx;
553 chandransh 23018
 
23019
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23020
    public enum _Fields implements TFieldIdEnum {
578 chandransh 23021
      SCX((short)1, "scx");
553 chandransh 23022
 
23023
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23024
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23025
 
23026
      static {
23027
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23028
          byId.put((int)field._thriftId, field);
23029
          byName.put(field.getFieldName(), field);
23030
        }
23031
      }
23032
 
23033
      /**
23034
       * Find the _Fields constant that matches fieldId, or null if its not found.
23035
       */
23036
      public static _Fields findByThriftId(int fieldId) {
23037
        return byId.get(fieldId);
23038
      }
23039
 
23040
      /**
23041
       * Find the _Fields constant that matches fieldId, throwing an exception
23042
       * if it is not found.
23043
       */
23044
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23045
        _Fields fields = findByThriftId(fieldId);
23046
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23047
        return fields;
23048
      }
23049
 
23050
      /**
23051
       * Find the _Fields constant that matches name, or null if its not found.
23052
       */
23053
      public static _Fields findByName(String name) {
23054
        return byName.get(name);
23055
      }
23056
 
23057
      private final short _thriftId;
23058
      private final String _fieldName;
23059
 
23060
      _Fields(short thriftId, String fieldName) {
23061
        _thriftId = thriftId;
23062
        _fieldName = fieldName;
23063
      }
23064
 
23065
      public short getThriftFieldId() {
23066
        return _thriftId;
23067
      }
23068
 
23069
      public String getFieldName() {
23070
        return _fieldName;
23071
      }
23072
    }
578 chandransh 23073
 
23074
    // isset id assignments
23075
 
553 chandransh 23076
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 23077
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23078
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 23079
    }});
23080
 
23081
    static {
23082
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
23083
    }
23084
 
23085
    public addAddressToCart_result() {
23086
    }
23087
 
578 chandransh 23088
    public addAddressToCart_result(
23089
      ShoppingCartException scx)
23090
    {
23091
      this();
23092
      this.scx = scx;
23093
    }
23094
 
553 chandransh 23095
    /**
23096
     * Performs a deep copy on <i>other</i>.
23097
     */
23098
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 23099
      if (other.isSetScx()) {
23100
        this.scx = new ShoppingCartException(other.scx);
23101
      }
553 chandransh 23102
    }
23103
 
23104
    public addAddressToCart_result deepCopy() {
23105
      return new addAddressToCart_result(this);
23106
    }
23107
 
23108
    @Deprecated
23109
    public addAddressToCart_result clone() {
23110
      return new addAddressToCart_result(this);
23111
    }
23112
 
578 chandransh 23113
    public ShoppingCartException getScx() {
23114
      return this.scx;
23115
    }
23116
 
23117
    public addAddressToCart_result setScx(ShoppingCartException scx) {
23118
      this.scx = scx;
23119
      return this;
23120
    }
23121
 
23122
    public void unsetScx() {
23123
      this.scx = null;
23124
    }
23125
 
23126
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23127
    public boolean isSetScx() {
23128
      return this.scx != null;
23129
    }
23130
 
23131
    public void setScxIsSet(boolean value) {
23132
      if (!value) {
23133
        this.scx = null;
23134
      }
23135
    }
23136
 
553 chandransh 23137
    public void setFieldValue(_Fields field, Object value) {
23138
      switch (field) {
578 chandransh 23139
      case SCX:
23140
        if (value == null) {
23141
          unsetScx();
23142
        } else {
23143
          setScx((ShoppingCartException)value);
23144
        }
23145
        break;
23146
 
553 chandransh 23147
      }
23148
    }
23149
 
23150
    public void setFieldValue(int fieldID, Object value) {
23151
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23152
    }
23153
 
23154
    public Object getFieldValue(_Fields field) {
23155
      switch (field) {
578 chandransh 23156
      case SCX:
23157
        return getScx();
23158
 
553 chandransh 23159
      }
23160
      throw new IllegalStateException();
23161
    }
23162
 
23163
    public Object getFieldValue(int fieldId) {
23164
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23165
    }
23166
 
23167
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23168
    public boolean isSet(_Fields field) {
23169
      switch (field) {
578 chandransh 23170
      case SCX:
23171
        return isSetScx();
553 chandransh 23172
      }
23173
      throw new IllegalStateException();
23174
    }
23175
 
23176
    public boolean isSet(int fieldID) {
23177
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23178
    }
23179
 
23180
    @Override
23181
    public boolean equals(Object that) {
23182
      if (that == null)
23183
        return false;
23184
      if (that instanceof addAddressToCart_result)
23185
        return this.equals((addAddressToCart_result)that);
23186
      return false;
23187
    }
23188
 
23189
    public boolean equals(addAddressToCart_result that) {
23190
      if (that == null)
23191
        return false;
23192
 
578 chandransh 23193
      boolean this_present_scx = true && this.isSetScx();
23194
      boolean that_present_scx = true && that.isSetScx();
23195
      if (this_present_scx || that_present_scx) {
23196
        if (!(this_present_scx && that_present_scx))
23197
          return false;
23198
        if (!this.scx.equals(that.scx))
23199
          return false;
23200
      }
23201
 
553 chandransh 23202
      return true;
23203
    }
23204
 
23205
    @Override
23206
    public int hashCode() {
23207
      return 0;
23208
    }
23209
 
23210
    public int compareTo(addAddressToCart_result other) {
23211
      if (!getClass().equals(other.getClass())) {
23212
        return getClass().getName().compareTo(other.getClass().getName());
23213
      }
23214
 
23215
      int lastComparison = 0;
23216
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
23217
 
578 chandransh 23218
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23219
      if (lastComparison != 0) {
23220
        return lastComparison;
23221
      }
23222
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23223
      if (lastComparison != 0) {
23224
        return lastComparison;
23225
      }
553 chandransh 23226
      return 0;
23227
    }
23228
 
23229
    public void read(TProtocol iprot) throws TException {
23230
      TField field;
23231
      iprot.readStructBegin();
23232
      while (true)
23233
      {
23234
        field = iprot.readFieldBegin();
23235
        if (field.type == TType.STOP) { 
23236
          break;
23237
        }
23238
        _Fields fieldId = _Fields.findByThriftId(field.id);
23239
        if (fieldId == null) {
23240
          TProtocolUtil.skip(iprot, field.type);
23241
        } else {
23242
          switch (fieldId) {
578 chandransh 23243
            case SCX:
23244
              if (field.type == TType.STRUCT) {
23245
                this.scx = new ShoppingCartException();
23246
                this.scx.read(iprot);
23247
              } else { 
23248
                TProtocolUtil.skip(iprot, field.type);
23249
              }
23250
              break;
553 chandransh 23251
          }
23252
          iprot.readFieldEnd();
23253
        }
23254
      }
23255
      iprot.readStructEnd();
23256
      validate();
23257
    }
23258
 
23259
    public void write(TProtocol oprot) throws TException {
23260
      oprot.writeStructBegin(STRUCT_DESC);
23261
 
578 chandransh 23262
      if (this.isSetScx()) {
23263
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23264
        this.scx.write(oprot);
23265
        oprot.writeFieldEnd();
23266
      }
553 chandransh 23267
      oprot.writeFieldStop();
23268
      oprot.writeStructEnd();
23269
    }
23270
 
23271
    @Override
23272
    public String toString() {
23273
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
23274
      boolean first = true;
23275
 
578 chandransh 23276
      sb.append("scx:");
23277
      if (this.scx == null) {
23278
        sb.append("null");
23279
      } else {
23280
        sb.append(this.scx);
23281
      }
23282
      first = false;
553 chandransh 23283
      sb.append(")");
23284
      return sb.toString();
23285
    }
23286
 
23287
    public void validate() throws TException {
23288
      // check for required fields
23289
    }
23290
 
23291
  }
23292
 
688 chandransh 23293
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
23294
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 23295
 
23296
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23297
 
23298
    private long cartId;
23299
 
23300
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23301
    public enum _Fields implements TFieldIdEnum {
23302
      CART_ID((short)1, "cartId");
23303
 
23304
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23305
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23306
 
23307
      static {
23308
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23309
          byId.put((int)field._thriftId, field);
23310
          byName.put(field.getFieldName(), field);
23311
        }
23312
      }
23313
 
23314
      /**
23315
       * Find the _Fields constant that matches fieldId, or null if its not found.
23316
       */
23317
      public static _Fields findByThriftId(int fieldId) {
23318
        return byId.get(fieldId);
23319
      }
23320
 
23321
      /**
23322
       * Find the _Fields constant that matches fieldId, throwing an exception
23323
       * if it is not found.
23324
       */
23325
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23326
        _Fields fields = findByThriftId(fieldId);
23327
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23328
        return fields;
23329
      }
23330
 
23331
      /**
23332
       * Find the _Fields constant that matches name, or null if its not found.
23333
       */
23334
      public static _Fields findByName(String name) {
23335
        return byName.get(name);
23336
      }
23337
 
23338
      private final short _thriftId;
23339
      private final String _fieldName;
23340
 
23341
      _Fields(short thriftId, String fieldName) {
23342
        _thriftId = thriftId;
23343
        _fieldName = fieldName;
23344
      }
23345
 
23346
      public short getThriftFieldId() {
23347
        return _thriftId;
23348
      }
23349
 
23350
      public String getFieldName() {
23351
        return _fieldName;
23352
      }
23353
    }
23354
 
23355
    // isset id assignments
23356
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 23357
    private BitSet __isset_bit_vector = new BitSet(1);
23358
 
23359
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23360
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 23361
          new FieldValueMetaData(TType.I64)));
23362
    }});
23363
 
23364
    static {
688 chandransh 23365
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 23366
    }
23367
 
688 chandransh 23368
    public createOrders_args() {
48 ashish 23369
    }
23370
 
688 chandransh 23371
    public createOrders_args(
553 chandransh 23372
      long cartId)
48 ashish 23373
    {
23374
      this();
553 chandransh 23375
      this.cartId = cartId;
23376
      setCartIdIsSet(true);
48 ashish 23377
    }
23378
 
23379
    /**
23380
     * Performs a deep copy on <i>other</i>.
23381
     */
688 chandransh 23382
    public createOrders_args(createOrders_args other) {
48 ashish 23383
      __isset_bit_vector.clear();
23384
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 23385
      this.cartId = other.cartId;
48 ashish 23386
    }
23387
 
688 chandransh 23388
    public createOrders_args deepCopy() {
23389
      return new createOrders_args(this);
48 ashish 23390
    }
23391
 
23392
    @Deprecated
688 chandransh 23393
    public createOrders_args clone() {
23394
      return new createOrders_args(this);
48 ashish 23395
    }
23396
 
553 chandransh 23397
    public long getCartId() {
23398
      return this.cartId;
48 ashish 23399
    }
23400
 
688 chandransh 23401
    public createOrders_args setCartId(long cartId) {
553 chandransh 23402
      this.cartId = cartId;
23403
      setCartIdIsSet(true);
48 ashish 23404
      return this;
23405
    }
23406
 
553 chandransh 23407
    public void unsetCartId() {
23408
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 23409
    }
23410
 
553 chandransh 23411
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23412
    public boolean isSetCartId() {
23413
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 23414
    }
23415
 
553 chandransh 23416
    public void setCartIdIsSet(boolean value) {
23417
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 23418
    }
23419
 
23420
    public void setFieldValue(_Fields field, Object value) {
23421
      switch (field) {
553 chandransh 23422
      case CART_ID:
48 ashish 23423
        if (value == null) {
553 chandransh 23424
          unsetCartId();
48 ashish 23425
        } else {
553 chandransh 23426
          setCartId((Long)value);
48 ashish 23427
        }
23428
        break;
23429
 
23430
      }
23431
    }
23432
 
23433
    public void setFieldValue(int fieldID, Object value) {
23434
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23435
    }
23436
 
23437
    public Object getFieldValue(_Fields field) {
23438
      switch (field) {
553 chandransh 23439
      case CART_ID:
23440
        return new Long(getCartId());
48 ashish 23441
 
23442
      }
23443
      throw new IllegalStateException();
23444
    }
23445
 
23446
    public Object getFieldValue(int fieldId) {
23447
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23448
    }
23449
 
23450
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23451
    public boolean isSet(_Fields field) {
23452
      switch (field) {
553 chandransh 23453
      case CART_ID:
23454
        return isSetCartId();
48 ashish 23455
      }
23456
      throw new IllegalStateException();
23457
    }
23458
 
23459
    public boolean isSet(int fieldID) {
23460
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23461
    }
23462
 
23463
    @Override
23464
    public boolean equals(Object that) {
23465
      if (that == null)
23466
        return false;
688 chandransh 23467
      if (that instanceof createOrders_args)
23468
        return this.equals((createOrders_args)that);
48 ashish 23469
      return false;
23470
    }
23471
 
688 chandransh 23472
    public boolean equals(createOrders_args that) {
48 ashish 23473
      if (that == null)
23474
        return false;
23475
 
553 chandransh 23476
      boolean this_present_cartId = true;
23477
      boolean that_present_cartId = true;
23478
      if (this_present_cartId || that_present_cartId) {
23479
        if (!(this_present_cartId && that_present_cartId))
48 ashish 23480
          return false;
553 chandransh 23481
        if (this.cartId != that.cartId)
48 ashish 23482
          return false;
23483
      }
23484
 
23485
      return true;
23486
    }
23487
 
23488
    @Override
23489
    public int hashCode() {
23490
      return 0;
23491
    }
23492
 
688 chandransh 23493
    public int compareTo(createOrders_args other) {
48 ashish 23494
      if (!getClass().equals(other.getClass())) {
23495
        return getClass().getName().compareTo(other.getClass().getName());
23496
      }
23497
 
23498
      int lastComparison = 0;
688 chandransh 23499
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 23500
 
553 chandransh 23501
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 23502
      if (lastComparison != 0) {
23503
        return lastComparison;
23504
      }
553 chandransh 23505
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 23506
      if (lastComparison != 0) {
23507
        return lastComparison;
23508
      }
23509
      return 0;
23510
    }
23511
 
23512
    public void read(TProtocol iprot) throws TException {
23513
      TField field;
23514
      iprot.readStructBegin();
23515
      while (true)
23516
      {
23517
        field = iprot.readFieldBegin();
23518
        if (field.type == TType.STOP) { 
23519
          break;
23520
        }
23521
        _Fields fieldId = _Fields.findByThriftId(field.id);
23522
        if (fieldId == null) {
23523
          TProtocolUtil.skip(iprot, field.type);
23524
        } else {
23525
          switch (fieldId) {
553 chandransh 23526
            case CART_ID:
48 ashish 23527
              if (field.type == TType.I64) {
553 chandransh 23528
                this.cartId = iprot.readI64();
23529
                setCartIdIsSet(true);
48 ashish 23530
              } else { 
23531
                TProtocolUtil.skip(iprot, field.type);
23532
              }
23533
              break;
23534
          }
23535
          iprot.readFieldEnd();
23536
        }
23537
      }
23538
      iprot.readStructEnd();
23539
      validate();
23540
    }
23541
 
23542
    public void write(TProtocol oprot) throws TException {
23543
      validate();
23544
 
23545
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 23546
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23547
      oprot.writeI64(this.cartId);
48 ashish 23548
      oprot.writeFieldEnd();
23549
      oprot.writeFieldStop();
23550
      oprot.writeStructEnd();
23551
    }
23552
 
23553
    @Override
23554
    public String toString() {
688 chandransh 23555
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 23556
      boolean first = true;
23557
 
553 chandransh 23558
      sb.append("cartId:");
23559
      sb.append(this.cartId);
48 ashish 23560
      first = false;
23561
      sb.append(")");
23562
      return sb.toString();
23563
    }
23564
 
23565
    public void validate() throws TException {
23566
      // check for required fields
23567
    }
23568
 
23569
  }
23570
 
688 chandransh 23571
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
23572
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 23573
 
578 chandransh 23574
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 23575
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 23576
 
578 chandransh 23577
    private long success;
553 chandransh 23578
    private ShoppingCartException scx;
48 ashish 23579
 
23580
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23581
    public enum _Fields implements TFieldIdEnum {
23582
      SUCCESS((short)0, "success"),
553 chandransh 23583
      SCX((short)1, "scx");
48 ashish 23584
 
23585
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23586
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23587
 
23588
      static {
23589
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23590
          byId.put((int)field._thriftId, field);
23591
          byName.put(field.getFieldName(), field);
23592
        }
23593
      }
23594
 
23595
      /**
23596
       * Find the _Fields constant that matches fieldId, or null if its not found.
23597
       */
23598
      public static _Fields findByThriftId(int fieldId) {
23599
        return byId.get(fieldId);
23600
      }
23601
 
23602
      /**
23603
       * Find the _Fields constant that matches fieldId, throwing an exception
23604
       * if it is not found.
23605
       */
23606
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23607
        _Fields fields = findByThriftId(fieldId);
23608
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23609
        return fields;
23610
      }
23611
 
23612
      /**
23613
       * Find the _Fields constant that matches name, or null if its not found.
23614
       */
23615
      public static _Fields findByName(String name) {
23616
        return byName.get(name);
23617
      }
23618
 
23619
      private final short _thriftId;
23620
      private final String _fieldName;
23621
 
23622
      _Fields(short thriftId, String fieldName) {
23623
        _thriftId = thriftId;
23624
        _fieldName = fieldName;
23625
      }
23626
 
23627
      public short getThriftFieldId() {
23628
        return _thriftId;
23629
      }
23630
 
23631
      public String getFieldName() {
23632
        return _fieldName;
23633
      }
23634
    }
23635
 
23636
    // isset id assignments
23637
    private static final int __SUCCESS_ISSET_ID = 0;
23638
    private BitSet __isset_bit_vector = new BitSet(1);
23639
 
23640
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23641
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 23642
          new FieldValueMetaData(TType.I64)));
553 chandransh 23643
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 23644
          new FieldValueMetaData(TType.STRUCT)));
23645
    }});
23646
 
23647
    static {
688 chandransh 23648
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 23649
    }
23650
 
688 chandransh 23651
    public createOrders_result() {
48 ashish 23652
    }
23653
 
688 chandransh 23654
    public createOrders_result(
578 chandransh 23655
      long success,
553 chandransh 23656
      ShoppingCartException scx)
48 ashish 23657
    {
23658
      this();
23659
      this.success = success;
23660
      setSuccessIsSet(true);
553 chandransh 23661
      this.scx = scx;
48 ashish 23662
    }
23663
 
23664
    /**
23665
     * Performs a deep copy on <i>other</i>.
23666
     */
688 chandransh 23667
    public createOrders_result(createOrders_result other) {
48 ashish 23668
      __isset_bit_vector.clear();
23669
      __isset_bit_vector.or(other.__isset_bit_vector);
23670
      this.success = other.success;
553 chandransh 23671
      if (other.isSetScx()) {
23672
        this.scx = new ShoppingCartException(other.scx);
48 ashish 23673
      }
23674
    }
23675
 
688 chandransh 23676
    public createOrders_result deepCopy() {
23677
      return new createOrders_result(this);
48 ashish 23678
    }
23679
 
23680
    @Deprecated
688 chandransh 23681
    public createOrders_result clone() {
23682
      return new createOrders_result(this);
48 ashish 23683
    }
23684
 
578 chandransh 23685
    public long getSuccess() {
48 ashish 23686
      return this.success;
23687
    }
23688
 
688 chandransh 23689
    public createOrders_result setSuccess(long success) {
48 ashish 23690
      this.success = success;
23691
      setSuccessIsSet(true);
23692
      return this;
23693
    }
23694
 
23695
    public void unsetSuccess() {
23696
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
23697
    }
23698
 
23699
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
23700
    public boolean isSetSuccess() {
23701
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
23702
    }
23703
 
23704
    public void setSuccessIsSet(boolean value) {
23705
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
23706
    }
23707
 
553 chandransh 23708
    public ShoppingCartException getScx() {
23709
      return this.scx;
48 ashish 23710
    }
23711
 
688 chandransh 23712
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 23713
      this.scx = scx;
48 ashish 23714
      return this;
23715
    }
23716
 
553 chandransh 23717
    public void unsetScx() {
23718
      this.scx = null;
48 ashish 23719
    }
23720
 
553 chandransh 23721
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23722
    public boolean isSetScx() {
23723
      return this.scx != null;
48 ashish 23724
    }
23725
 
553 chandransh 23726
    public void setScxIsSet(boolean value) {
48 ashish 23727
      if (!value) {
553 chandransh 23728
        this.scx = null;
48 ashish 23729
      }
23730
    }
23731
 
23732
    public void setFieldValue(_Fields field, Object value) {
23733
      switch (field) {
23734
      case SUCCESS:
23735
        if (value == null) {
23736
          unsetSuccess();
23737
        } else {
578 chandransh 23738
          setSuccess((Long)value);
48 ashish 23739
        }
23740
        break;
23741
 
553 chandransh 23742
      case SCX:
48 ashish 23743
        if (value == null) {
553 chandransh 23744
          unsetScx();
48 ashish 23745
        } else {
553 chandransh 23746
          setScx((ShoppingCartException)value);
48 ashish 23747
        }
23748
        break;
23749
 
23750
      }
23751
    }
23752
 
23753
    public void setFieldValue(int fieldID, Object value) {
23754
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23755
    }
23756
 
23757
    public Object getFieldValue(_Fields field) {
23758
      switch (field) {
23759
      case SUCCESS:
578 chandransh 23760
        return new Long(getSuccess());
48 ashish 23761
 
553 chandransh 23762
      case SCX:
23763
        return getScx();
48 ashish 23764
 
23765
      }
23766
      throw new IllegalStateException();
23767
    }
23768
 
23769
    public Object getFieldValue(int fieldId) {
23770
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23771
    }
23772
 
23773
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23774
    public boolean isSet(_Fields field) {
23775
      switch (field) {
23776
      case SUCCESS:
23777
        return isSetSuccess();
553 chandransh 23778
      case SCX:
23779
        return isSetScx();
48 ashish 23780
      }
23781
      throw new IllegalStateException();
23782
    }
23783
 
23784
    public boolean isSet(int fieldID) {
23785
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23786
    }
23787
 
23788
    @Override
23789
    public boolean equals(Object that) {
23790
      if (that == null)
23791
        return false;
688 chandransh 23792
      if (that instanceof createOrders_result)
23793
        return this.equals((createOrders_result)that);
48 ashish 23794
      return false;
23795
    }
23796
 
688 chandransh 23797
    public boolean equals(createOrders_result that) {
48 ashish 23798
      if (that == null)
23799
        return false;
23800
 
23801
      boolean this_present_success = true;
23802
      boolean that_present_success = true;
23803
      if (this_present_success || that_present_success) {
23804
        if (!(this_present_success && that_present_success))
23805
          return false;
23806
        if (this.success != that.success)
23807
          return false;
23808
      }
23809
 
553 chandransh 23810
      boolean this_present_scx = true && this.isSetScx();
23811
      boolean that_present_scx = true && that.isSetScx();
23812
      if (this_present_scx || that_present_scx) {
23813
        if (!(this_present_scx && that_present_scx))
48 ashish 23814
          return false;
553 chandransh 23815
        if (!this.scx.equals(that.scx))
48 ashish 23816
          return false;
23817
      }
23818
 
23819
      return true;
23820
    }
23821
 
23822
    @Override
23823
    public int hashCode() {
23824
      return 0;
23825
    }
23826
 
688 chandransh 23827
    public int compareTo(createOrders_result other) {
48 ashish 23828
      if (!getClass().equals(other.getClass())) {
23829
        return getClass().getName().compareTo(other.getClass().getName());
23830
      }
23831
 
23832
      int lastComparison = 0;
688 chandransh 23833
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 23834
 
23835
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
23836
      if (lastComparison != 0) {
23837
        return lastComparison;
23838
      }
23839
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
23840
      if (lastComparison != 0) {
23841
        return lastComparison;
23842
      }
553 chandransh 23843
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 23844
      if (lastComparison != 0) {
23845
        return lastComparison;
23846
      }
553 chandransh 23847
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 23848
      if (lastComparison != 0) {
23849
        return lastComparison;
23850
      }
23851
      return 0;
23852
    }
23853
 
23854
    public void read(TProtocol iprot) throws TException {
23855
      TField field;
23856
      iprot.readStructBegin();
23857
      while (true)
23858
      {
23859
        field = iprot.readFieldBegin();
23860
        if (field.type == TType.STOP) { 
23861
          break;
23862
        }
23863
        _Fields fieldId = _Fields.findByThriftId(field.id);
23864
        if (fieldId == null) {
23865
          TProtocolUtil.skip(iprot, field.type);
23866
        } else {
23867
          switch (fieldId) {
23868
            case SUCCESS:
578 chandransh 23869
              if (field.type == TType.I64) {
23870
                this.success = iprot.readI64();
48 ashish 23871
                setSuccessIsSet(true);
23872
              } else { 
23873
                TProtocolUtil.skip(iprot, field.type);
23874
              }
23875
              break;
553 chandransh 23876
            case SCX:
48 ashish 23877
              if (field.type == TType.STRUCT) {
553 chandransh 23878
                this.scx = new ShoppingCartException();
23879
                this.scx.read(iprot);
48 ashish 23880
              } else { 
23881
                TProtocolUtil.skip(iprot, field.type);
23882
              }
23883
              break;
23884
          }
23885
          iprot.readFieldEnd();
23886
        }
23887
      }
23888
      iprot.readStructEnd();
23889
      validate();
23890
    }
23891
 
23892
    public void write(TProtocol oprot) throws TException {
23893
      oprot.writeStructBegin(STRUCT_DESC);
23894
 
23895
      if (this.isSetSuccess()) {
23896
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 23897
        oprot.writeI64(this.success);
48 ashish 23898
        oprot.writeFieldEnd();
553 chandransh 23899
      } else if (this.isSetScx()) {
23900
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23901
        this.scx.write(oprot);
48 ashish 23902
        oprot.writeFieldEnd();
23903
      }
23904
      oprot.writeFieldStop();
23905
      oprot.writeStructEnd();
23906
    }
23907
 
23908
    @Override
23909
    public String toString() {
688 chandransh 23910
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 23911
      boolean first = true;
23912
 
23913
      sb.append("success:");
23914
      sb.append(this.success);
23915
      first = false;
23916
      if (!first) sb.append(", ");
553 chandransh 23917
      sb.append("scx:");
23918
      if (this.scx == null) {
48 ashish 23919
        sb.append("null");
23920
      } else {
553 chandransh 23921
        sb.append(this.scx);
48 ashish 23922
      }
23923
      first = false;
23924
      sb.append(")");
23925
      return sb.toString();
23926
    }
23927
 
23928
    public void validate() throws TException {
23929
      // check for required fields
23930
    }
23931
 
23932
  }
23933
 
553 chandransh 23934
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
23935
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 23936
 
553 chandransh 23937
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 23938
 
553 chandransh 23939
    private long cartId;
48 ashish 23940
 
23941
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23942
    public enum _Fields implements TFieldIdEnum {
553 chandransh 23943
      CART_ID((short)1, "cartId");
48 ashish 23944
 
23945
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23946
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23947
 
23948
      static {
23949
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23950
          byId.put((int)field._thriftId, field);
23951
          byName.put(field.getFieldName(), field);
23952
        }
23953
      }
23954
 
23955
      /**
23956
       * Find the _Fields constant that matches fieldId, or null if its not found.
23957
       */
23958
      public static _Fields findByThriftId(int fieldId) {
23959
        return byId.get(fieldId);
23960
      }
23961
 
23962
      /**
23963
       * Find the _Fields constant that matches fieldId, throwing an exception
23964
       * if it is not found.
23965
       */
23966
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23967
        _Fields fields = findByThriftId(fieldId);
23968
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23969
        return fields;
23970
      }
23971
 
23972
      /**
23973
       * Find the _Fields constant that matches name, or null if its not found.
23974
       */
23975
      public static _Fields findByName(String name) {
23976
        return byName.get(name);
23977
      }
23978
 
23979
      private final short _thriftId;
23980
      private final String _fieldName;
23981
 
23982
      _Fields(short thriftId, String fieldName) {
23983
        _thriftId = thriftId;
23984
        _fieldName = fieldName;
23985
      }
23986
 
23987
      public short getThriftFieldId() {
23988
        return _thriftId;
23989
      }
23990
 
23991
      public String getFieldName() {
23992
        return _fieldName;
23993
      }
23994
    }
23995
 
23996
    // isset id assignments
553 chandransh 23997
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 23998
    private BitSet __isset_bit_vector = new BitSet(1);
23999
 
24000
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24001
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24002
          new FieldValueMetaData(TType.I64)));
24003
    }});
24004
 
24005
    static {
553 chandransh 24006
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 24007
    }
24008
 
553 chandransh 24009
    public validateCart_args() {
48 ashish 24010
    }
24011
 
553 chandransh 24012
    public validateCart_args(
24013
      long cartId)
48 ashish 24014
    {
24015
      this();
553 chandransh 24016
      this.cartId = cartId;
24017
      setCartIdIsSet(true);
48 ashish 24018
    }
24019
 
24020
    /**
24021
     * Performs a deep copy on <i>other</i>.
24022
     */
553 chandransh 24023
    public validateCart_args(validateCart_args other) {
48 ashish 24024
      __isset_bit_vector.clear();
24025
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24026
      this.cartId = other.cartId;
48 ashish 24027
    }
24028
 
553 chandransh 24029
    public validateCart_args deepCopy() {
24030
      return new validateCart_args(this);
48 ashish 24031
    }
24032
 
24033
    @Deprecated
553 chandransh 24034
    public validateCart_args clone() {
24035
      return new validateCart_args(this);
48 ashish 24036
    }
24037
 
553 chandransh 24038
    public long getCartId() {
24039
      return this.cartId;
48 ashish 24040
    }
24041
 
553 chandransh 24042
    public validateCart_args setCartId(long cartId) {
24043
      this.cartId = cartId;
24044
      setCartIdIsSet(true);
48 ashish 24045
      return this;
24046
    }
24047
 
553 chandransh 24048
    public void unsetCartId() {
24049
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24050
    }
24051
 
553 chandransh 24052
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24053
    public boolean isSetCartId() {
24054
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24055
    }
24056
 
553 chandransh 24057
    public void setCartIdIsSet(boolean value) {
24058
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24059
    }
24060
 
24061
    public void setFieldValue(_Fields field, Object value) {
24062
      switch (field) {
553 chandransh 24063
      case CART_ID:
48 ashish 24064
        if (value == null) {
553 chandransh 24065
          unsetCartId();
48 ashish 24066
        } else {
553 chandransh 24067
          setCartId((Long)value);
48 ashish 24068
        }
24069
        break;
24070
 
24071
      }
24072
    }
24073
 
24074
    public void setFieldValue(int fieldID, Object value) {
24075
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24076
    }
24077
 
24078
    public Object getFieldValue(_Fields field) {
24079
      switch (field) {
553 chandransh 24080
      case CART_ID:
24081
        return new Long(getCartId());
48 ashish 24082
 
24083
      }
24084
      throw new IllegalStateException();
24085
    }
24086
 
24087
    public Object getFieldValue(int fieldId) {
24088
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24089
    }
24090
 
24091
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24092
    public boolean isSet(_Fields field) {
24093
      switch (field) {
553 chandransh 24094
      case CART_ID:
24095
        return isSetCartId();
48 ashish 24096
      }
24097
      throw new IllegalStateException();
24098
    }
24099
 
24100
    public boolean isSet(int fieldID) {
24101
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24102
    }
24103
 
24104
    @Override
24105
    public boolean equals(Object that) {
24106
      if (that == null)
24107
        return false;
553 chandransh 24108
      if (that instanceof validateCart_args)
24109
        return this.equals((validateCart_args)that);
48 ashish 24110
      return false;
24111
    }
24112
 
553 chandransh 24113
    public boolean equals(validateCart_args that) {
48 ashish 24114
      if (that == null)
24115
        return false;
24116
 
553 chandransh 24117
      boolean this_present_cartId = true;
24118
      boolean that_present_cartId = true;
24119
      if (this_present_cartId || that_present_cartId) {
24120
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24121
          return false;
553 chandransh 24122
        if (this.cartId != that.cartId)
48 ashish 24123
          return false;
24124
      }
24125
 
24126
      return true;
24127
    }
24128
 
24129
    @Override
24130
    public int hashCode() {
24131
      return 0;
24132
    }
24133
 
553 chandransh 24134
    public int compareTo(validateCart_args other) {
48 ashish 24135
      if (!getClass().equals(other.getClass())) {
24136
        return getClass().getName().compareTo(other.getClass().getName());
24137
      }
24138
 
24139
      int lastComparison = 0;
553 chandransh 24140
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 24141
 
553 chandransh 24142
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24143
      if (lastComparison != 0) {
24144
        return lastComparison;
24145
      }
553 chandransh 24146
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24147
      if (lastComparison != 0) {
24148
        return lastComparison;
24149
      }
24150
      return 0;
24151
    }
24152
 
24153
    public void read(TProtocol iprot) throws TException {
24154
      TField field;
24155
      iprot.readStructBegin();
24156
      while (true)
24157
      {
24158
        field = iprot.readFieldBegin();
24159
        if (field.type == TType.STOP) { 
24160
          break;
24161
        }
24162
        _Fields fieldId = _Fields.findByThriftId(field.id);
24163
        if (fieldId == null) {
24164
          TProtocolUtil.skip(iprot, field.type);
24165
        } else {
24166
          switch (fieldId) {
553 chandransh 24167
            case CART_ID:
48 ashish 24168
              if (field.type == TType.I64) {
553 chandransh 24169
                this.cartId = iprot.readI64();
24170
                setCartIdIsSet(true);
48 ashish 24171
              } else { 
24172
                TProtocolUtil.skip(iprot, field.type);
24173
              }
24174
              break;
24175
          }
24176
          iprot.readFieldEnd();
24177
        }
24178
      }
24179
      iprot.readStructEnd();
24180
      validate();
24181
    }
24182
 
24183
    public void write(TProtocol oprot) throws TException {
24184
      validate();
24185
 
24186
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24187
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24188
      oprot.writeI64(this.cartId);
48 ashish 24189
      oprot.writeFieldEnd();
24190
      oprot.writeFieldStop();
24191
      oprot.writeStructEnd();
24192
    }
24193
 
24194
    @Override
24195
    public String toString() {
553 chandransh 24196
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 24197
      boolean first = true;
24198
 
553 chandransh 24199
      sb.append("cartId:");
24200
      sb.append(this.cartId);
48 ashish 24201
      first = false;
24202
      sb.append(")");
24203
      return sb.toString();
24204
    }
24205
 
24206
    public void validate() throws TException {
24207
      // check for required fields
24208
    }
24209
 
24210
  }
24211
 
553 chandransh 24212
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
24213
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 24214
 
24215
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
578 chandransh 24216
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 24217
 
24218
    private boolean success;
578 chandransh 24219
    private ShoppingCartException scex;
48 ashish 24220
 
24221
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24222
    public enum _Fields implements TFieldIdEnum {
578 chandransh 24223
      SUCCESS((short)0, "success"),
24224
      SCEX((short)1, "scex");
48 ashish 24225
 
24226
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24227
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24228
 
24229
      static {
24230
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24231
          byId.put((int)field._thriftId, field);
24232
          byName.put(field.getFieldName(), field);
24233
        }
24234
      }
24235
 
24236
      /**
24237
       * Find the _Fields constant that matches fieldId, or null if its not found.
24238
       */
24239
      public static _Fields findByThriftId(int fieldId) {
24240
        return byId.get(fieldId);
24241
      }
24242
 
24243
      /**
24244
       * Find the _Fields constant that matches fieldId, throwing an exception
24245
       * if it is not found.
24246
       */
24247
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24248
        _Fields fields = findByThriftId(fieldId);
24249
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24250
        return fields;
24251
      }
24252
 
24253
      /**
24254
       * Find the _Fields constant that matches name, or null if its not found.
24255
       */
24256
      public static _Fields findByName(String name) {
24257
        return byName.get(name);
24258
      }
24259
 
24260
      private final short _thriftId;
24261
      private final String _fieldName;
24262
 
24263
      _Fields(short thriftId, String fieldName) {
24264
        _thriftId = thriftId;
24265
        _fieldName = fieldName;
24266
      }
24267
 
24268
      public short getThriftFieldId() {
24269
        return _thriftId;
24270
      }
24271
 
24272
      public String getFieldName() {
24273
        return _fieldName;
24274
      }
24275
    }
24276
 
24277
    // isset id assignments
24278
    private static final int __SUCCESS_ISSET_ID = 0;
24279
    private BitSet __isset_bit_vector = new BitSet(1);
24280
 
24281
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24282
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24283
          new FieldValueMetaData(TType.BOOL)));
578 chandransh 24284
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
24285
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 24286
    }});
24287
 
24288
    static {
553 chandransh 24289
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 24290
    }
24291
 
553 chandransh 24292
    public validateCart_result() {
48 ashish 24293
    }
24294
 
553 chandransh 24295
    public validateCart_result(
578 chandransh 24296
      boolean success,
24297
      ShoppingCartException scex)
48 ashish 24298
    {
24299
      this();
24300
      this.success = success;
24301
      setSuccessIsSet(true);
578 chandransh 24302
      this.scex = scex;
48 ashish 24303
    }
24304
 
24305
    /**
24306
     * Performs a deep copy on <i>other</i>.
24307
     */
553 chandransh 24308
    public validateCart_result(validateCart_result other) {
48 ashish 24309
      __isset_bit_vector.clear();
24310
      __isset_bit_vector.or(other.__isset_bit_vector);
24311
      this.success = other.success;
578 chandransh 24312
      if (other.isSetScex()) {
24313
        this.scex = new ShoppingCartException(other.scex);
24314
      }
48 ashish 24315
    }
24316
 
553 chandransh 24317
    public validateCart_result deepCopy() {
24318
      return new validateCart_result(this);
48 ashish 24319
    }
24320
 
24321
    @Deprecated
553 chandransh 24322
    public validateCart_result clone() {
24323
      return new validateCart_result(this);
48 ashish 24324
    }
24325
 
24326
    public boolean isSuccess() {
24327
      return this.success;
24328
    }
24329
 
553 chandransh 24330
    public validateCart_result setSuccess(boolean success) {
48 ashish 24331
      this.success = success;
24332
      setSuccessIsSet(true);
24333
      return this;
24334
    }
24335
 
24336
    public void unsetSuccess() {
24337
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
24338
    }
24339
 
24340
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24341
    public boolean isSetSuccess() {
24342
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
24343
    }
24344
 
24345
    public void setSuccessIsSet(boolean value) {
24346
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
24347
    }
24348
 
578 chandransh 24349
    public ShoppingCartException getScex() {
24350
      return this.scex;
24351
    }
24352
 
24353
    public validateCart_result setScex(ShoppingCartException scex) {
24354
      this.scex = scex;
24355
      return this;
24356
    }
24357
 
24358
    public void unsetScex() {
24359
      this.scex = null;
24360
    }
24361
 
24362
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
24363
    public boolean isSetScex() {
24364
      return this.scex != null;
24365
    }
24366
 
24367
    public void setScexIsSet(boolean value) {
24368
      if (!value) {
24369
        this.scex = null;
24370
      }
24371
    }
24372
 
553 chandransh 24373
    public void setFieldValue(_Fields field, Object value) {
24374
      switch (field) {
24375
      case SUCCESS:
24376
        if (value == null) {
24377
          unsetSuccess();
24378
        } else {
24379
          setSuccess((Boolean)value);
24380
        }
24381
        break;
24382
 
578 chandransh 24383
      case SCEX:
24384
        if (value == null) {
24385
          unsetScex();
24386
        } else {
24387
          setScex((ShoppingCartException)value);
24388
        }
24389
        break;
24390
 
553 chandransh 24391
      }
48 ashish 24392
    }
24393
 
553 chandransh 24394
    public void setFieldValue(int fieldID, Object value) {
24395
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24396
    }
24397
 
24398
    public Object getFieldValue(_Fields field) {
24399
      switch (field) {
24400
      case SUCCESS:
24401
        return new Boolean(isSuccess());
24402
 
578 chandransh 24403
      case SCEX:
24404
        return getScex();
24405
 
553 chandransh 24406
      }
24407
      throw new IllegalStateException();
24408
    }
24409
 
24410
    public Object getFieldValue(int fieldId) {
24411
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24412
    }
24413
 
24414
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24415
    public boolean isSet(_Fields field) {
24416
      switch (field) {
24417
      case SUCCESS:
24418
        return isSetSuccess();
578 chandransh 24419
      case SCEX:
24420
        return isSetScex();
553 chandransh 24421
      }
24422
      throw new IllegalStateException();
24423
    }
24424
 
24425
    public boolean isSet(int fieldID) {
24426
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24427
    }
24428
 
24429
    @Override
24430
    public boolean equals(Object that) {
24431
      if (that == null)
24432
        return false;
24433
      if (that instanceof validateCart_result)
24434
        return this.equals((validateCart_result)that);
24435
      return false;
24436
    }
24437
 
24438
    public boolean equals(validateCart_result that) {
24439
      if (that == null)
24440
        return false;
24441
 
24442
      boolean this_present_success = true;
24443
      boolean that_present_success = true;
24444
      if (this_present_success || that_present_success) {
24445
        if (!(this_present_success && that_present_success))
24446
          return false;
24447
        if (this.success != that.success)
24448
          return false;
24449
      }
24450
 
578 chandransh 24451
      boolean this_present_scex = true && this.isSetScex();
24452
      boolean that_present_scex = true && that.isSetScex();
24453
      if (this_present_scex || that_present_scex) {
24454
        if (!(this_present_scex && that_present_scex))
24455
          return false;
24456
        if (!this.scex.equals(that.scex))
24457
          return false;
24458
      }
24459
 
553 chandransh 24460
      return true;
24461
    }
24462
 
24463
    @Override
24464
    public int hashCode() {
24465
      return 0;
24466
    }
24467
 
24468
    public int compareTo(validateCart_result other) {
24469
      if (!getClass().equals(other.getClass())) {
24470
        return getClass().getName().compareTo(other.getClass().getName());
24471
      }
24472
 
24473
      int lastComparison = 0;
24474
      validateCart_result typedOther = (validateCart_result)other;
24475
 
24476
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24477
      if (lastComparison != 0) {
24478
        return lastComparison;
24479
      }
24480
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24481
      if (lastComparison != 0) {
24482
        return lastComparison;
24483
      }
578 chandransh 24484
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
24485
      if (lastComparison != 0) {
24486
        return lastComparison;
24487
      }
24488
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
24489
      if (lastComparison != 0) {
24490
        return lastComparison;
24491
      }
553 chandransh 24492
      return 0;
24493
    }
24494
 
24495
    public void read(TProtocol iprot) throws TException {
24496
      TField field;
24497
      iprot.readStructBegin();
24498
      while (true)
24499
      {
24500
        field = iprot.readFieldBegin();
24501
        if (field.type == TType.STOP) { 
24502
          break;
24503
        }
24504
        _Fields fieldId = _Fields.findByThriftId(field.id);
24505
        if (fieldId == null) {
24506
          TProtocolUtil.skip(iprot, field.type);
24507
        } else {
24508
          switch (fieldId) {
24509
            case SUCCESS:
24510
              if (field.type == TType.BOOL) {
24511
                this.success = iprot.readBool();
24512
                setSuccessIsSet(true);
24513
              } else { 
24514
                TProtocolUtil.skip(iprot, field.type);
24515
              }
24516
              break;
578 chandransh 24517
            case SCEX:
24518
              if (field.type == TType.STRUCT) {
24519
                this.scex = new ShoppingCartException();
24520
                this.scex.read(iprot);
24521
              } else { 
24522
                TProtocolUtil.skip(iprot, field.type);
24523
              }
24524
              break;
553 chandransh 24525
          }
24526
          iprot.readFieldEnd();
24527
        }
24528
      }
24529
      iprot.readStructEnd();
24530
      validate();
24531
    }
24532
 
24533
    public void write(TProtocol oprot) throws TException {
24534
      oprot.writeStructBegin(STRUCT_DESC);
24535
 
24536
      if (this.isSetSuccess()) {
24537
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24538
        oprot.writeBool(this.success);
24539
        oprot.writeFieldEnd();
578 chandransh 24540
      } else if (this.isSetScex()) {
24541
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
24542
        this.scex.write(oprot);
24543
        oprot.writeFieldEnd();
553 chandransh 24544
      }
24545
      oprot.writeFieldStop();
24546
      oprot.writeStructEnd();
24547
    }
24548
 
24549
    @Override
24550
    public String toString() {
24551
      StringBuilder sb = new StringBuilder("validateCart_result(");
24552
      boolean first = true;
24553
 
24554
      sb.append("success:");
24555
      sb.append(this.success);
24556
      first = false;
578 chandransh 24557
      if (!first) sb.append(", ");
24558
      sb.append("scex:");
24559
      if (this.scex == null) {
24560
        sb.append("null");
24561
      } else {
24562
        sb.append(this.scex);
24563
      }
24564
      first = false;
553 chandransh 24565
      sb.append(")");
24566
      return sb.toString();
24567
    }
24568
 
24569
    public void validate() throws TException {
24570
      // check for required fields
24571
    }
24572
 
24573
  }
24574
 
688 chandransh 24575
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
24576
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
578 chandransh 24577
 
688 chandransh 24578
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
24579
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
24580
 
24581
    private long fromCartId;
24582
    private long toCartId;
24583
 
24584
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24585
    public enum _Fields implements TFieldIdEnum {
24586
      FROM_CART_ID((short)1, "fromCartId"),
24587
      TO_CART_ID((short)2, "toCartId");
24588
 
24589
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24590
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24591
 
24592
      static {
24593
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24594
          byId.put((int)field._thriftId, field);
24595
          byName.put(field.getFieldName(), field);
24596
        }
24597
      }
24598
 
24599
      /**
24600
       * Find the _Fields constant that matches fieldId, or null if its not found.
24601
       */
24602
      public static _Fields findByThriftId(int fieldId) {
24603
        return byId.get(fieldId);
24604
      }
24605
 
24606
      /**
24607
       * Find the _Fields constant that matches fieldId, throwing an exception
24608
       * if it is not found.
24609
       */
24610
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24611
        _Fields fields = findByThriftId(fieldId);
24612
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24613
        return fields;
24614
      }
24615
 
24616
      /**
24617
       * Find the _Fields constant that matches name, or null if its not found.
24618
       */
24619
      public static _Fields findByName(String name) {
24620
        return byName.get(name);
24621
      }
24622
 
24623
      private final short _thriftId;
24624
      private final String _fieldName;
24625
 
24626
      _Fields(short thriftId, String fieldName) {
24627
        _thriftId = thriftId;
24628
        _fieldName = fieldName;
24629
      }
24630
 
24631
      public short getThriftFieldId() {
24632
        return _thriftId;
24633
      }
24634
 
24635
      public String getFieldName() {
24636
        return _fieldName;
24637
      }
24638
    }
24639
 
24640
    // isset id assignments
24641
    private static final int __FROMCARTID_ISSET_ID = 0;
24642
    private static final int __TOCARTID_ISSET_ID = 1;
24643
    private BitSet __isset_bit_vector = new BitSet(2);
24644
 
24645
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24646
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
24647
          new FieldValueMetaData(TType.I64)));
24648
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
24649
          new FieldValueMetaData(TType.I64)));
24650
    }});
24651
 
24652
    static {
24653
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
24654
    }
24655
 
24656
    public mergeCart_args() {
24657
    }
24658
 
24659
    public mergeCart_args(
24660
      long fromCartId,
24661
      long toCartId)
24662
    {
24663
      this();
24664
      this.fromCartId = fromCartId;
24665
      setFromCartIdIsSet(true);
24666
      this.toCartId = toCartId;
24667
      setToCartIdIsSet(true);
24668
    }
24669
 
24670
    /**
24671
     * Performs a deep copy on <i>other</i>.
24672
     */
24673
    public mergeCart_args(mergeCart_args other) {
24674
      __isset_bit_vector.clear();
24675
      __isset_bit_vector.or(other.__isset_bit_vector);
24676
      this.fromCartId = other.fromCartId;
24677
      this.toCartId = other.toCartId;
24678
    }
24679
 
24680
    public mergeCart_args deepCopy() {
24681
      return new mergeCart_args(this);
24682
    }
24683
 
24684
    @Deprecated
24685
    public mergeCart_args clone() {
24686
      return new mergeCart_args(this);
24687
    }
24688
 
24689
    public long getFromCartId() {
24690
      return this.fromCartId;
24691
    }
24692
 
24693
    public mergeCart_args setFromCartId(long fromCartId) {
24694
      this.fromCartId = fromCartId;
24695
      setFromCartIdIsSet(true);
24696
      return this;
24697
    }
24698
 
24699
    public void unsetFromCartId() {
24700
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
24701
    }
24702
 
24703
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
24704
    public boolean isSetFromCartId() {
24705
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
24706
    }
24707
 
24708
    public void setFromCartIdIsSet(boolean value) {
24709
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
24710
    }
24711
 
24712
    public long getToCartId() {
24713
      return this.toCartId;
24714
    }
24715
 
24716
    public mergeCart_args setToCartId(long toCartId) {
24717
      this.toCartId = toCartId;
24718
      setToCartIdIsSet(true);
24719
      return this;
24720
    }
24721
 
24722
    public void unsetToCartId() {
24723
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
24724
    }
24725
 
24726
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
24727
    public boolean isSetToCartId() {
24728
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
24729
    }
24730
 
24731
    public void setToCartIdIsSet(boolean value) {
24732
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
24733
    }
24734
 
24735
    public void setFieldValue(_Fields field, Object value) {
24736
      switch (field) {
24737
      case FROM_CART_ID:
24738
        if (value == null) {
24739
          unsetFromCartId();
24740
        } else {
24741
          setFromCartId((Long)value);
24742
        }
24743
        break;
24744
 
24745
      case TO_CART_ID:
24746
        if (value == null) {
24747
          unsetToCartId();
24748
        } else {
24749
          setToCartId((Long)value);
24750
        }
24751
        break;
24752
 
24753
      }
24754
    }
24755
 
24756
    public void setFieldValue(int fieldID, Object value) {
24757
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24758
    }
24759
 
24760
    public Object getFieldValue(_Fields field) {
24761
      switch (field) {
24762
      case FROM_CART_ID:
24763
        return new Long(getFromCartId());
24764
 
24765
      case TO_CART_ID:
24766
        return new Long(getToCartId());
24767
 
24768
      }
24769
      throw new IllegalStateException();
24770
    }
24771
 
24772
    public Object getFieldValue(int fieldId) {
24773
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24774
    }
24775
 
24776
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24777
    public boolean isSet(_Fields field) {
24778
      switch (field) {
24779
      case FROM_CART_ID:
24780
        return isSetFromCartId();
24781
      case TO_CART_ID:
24782
        return isSetToCartId();
24783
      }
24784
      throw new IllegalStateException();
24785
    }
24786
 
24787
    public boolean isSet(int fieldID) {
24788
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24789
    }
24790
 
24791
    @Override
24792
    public boolean equals(Object that) {
24793
      if (that == null)
24794
        return false;
24795
      if (that instanceof mergeCart_args)
24796
        return this.equals((mergeCart_args)that);
24797
      return false;
24798
    }
24799
 
24800
    public boolean equals(mergeCart_args that) {
24801
      if (that == null)
24802
        return false;
24803
 
24804
      boolean this_present_fromCartId = true;
24805
      boolean that_present_fromCartId = true;
24806
      if (this_present_fromCartId || that_present_fromCartId) {
24807
        if (!(this_present_fromCartId && that_present_fromCartId))
24808
          return false;
24809
        if (this.fromCartId != that.fromCartId)
24810
          return false;
24811
      }
24812
 
24813
      boolean this_present_toCartId = true;
24814
      boolean that_present_toCartId = true;
24815
      if (this_present_toCartId || that_present_toCartId) {
24816
        if (!(this_present_toCartId && that_present_toCartId))
24817
          return false;
24818
        if (this.toCartId != that.toCartId)
24819
          return false;
24820
      }
24821
 
24822
      return true;
24823
    }
24824
 
24825
    @Override
24826
    public int hashCode() {
24827
      return 0;
24828
    }
24829
 
24830
    public int compareTo(mergeCart_args other) {
24831
      if (!getClass().equals(other.getClass())) {
24832
        return getClass().getName().compareTo(other.getClass().getName());
24833
      }
24834
 
24835
      int lastComparison = 0;
24836
      mergeCart_args typedOther = (mergeCart_args)other;
24837
 
24838
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
24839
      if (lastComparison != 0) {
24840
        return lastComparison;
24841
      }
24842
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
24843
      if (lastComparison != 0) {
24844
        return lastComparison;
24845
      }
24846
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
24847
      if (lastComparison != 0) {
24848
        return lastComparison;
24849
      }
24850
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
24851
      if (lastComparison != 0) {
24852
        return lastComparison;
24853
      }
24854
      return 0;
24855
    }
24856
 
24857
    public void read(TProtocol iprot) throws TException {
24858
      TField field;
24859
      iprot.readStructBegin();
24860
      while (true)
24861
      {
24862
        field = iprot.readFieldBegin();
24863
        if (field.type == TType.STOP) { 
24864
          break;
24865
        }
24866
        _Fields fieldId = _Fields.findByThriftId(field.id);
24867
        if (fieldId == null) {
24868
          TProtocolUtil.skip(iprot, field.type);
24869
        } else {
24870
          switch (fieldId) {
24871
            case FROM_CART_ID:
24872
              if (field.type == TType.I64) {
24873
                this.fromCartId = iprot.readI64();
24874
                setFromCartIdIsSet(true);
24875
              } else { 
24876
                TProtocolUtil.skip(iprot, field.type);
24877
              }
24878
              break;
24879
            case TO_CART_ID:
24880
              if (field.type == TType.I64) {
24881
                this.toCartId = iprot.readI64();
24882
                setToCartIdIsSet(true);
24883
              } else { 
24884
                TProtocolUtil.skip(iprot, field.type);
24885
              }
24886
              break;
24887
          }
24888
          iprot.readFieldEnd();
24889
        }
24890
      }
24891
      iprot.readStructEnd();
24892
      validate();
24893
    }
24894
 
24895
    public void write(TProtocol oprot) throws TException {
24896
      validate();
24897
 
24898
      oprot.writeStructBegin(STRUCT_DESC);
24899
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
24900
      oprot.writeI64(this.fromCartId);
24901
      oprot.writeFieldEnd();
24902
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
24903
      oprot.writeI64(this.toCartId);
24904
      oprot.writeFieldEnd();
24905
      oprot.writeFieldStop();
24906
      oprot.writeStructEnd();
24907
    }
24908
 
24909
    @Override
24910
    public String toString() {
24911
      StringBuilder sb = new StringBuilder("mergeCart_args(");
24912
      boolean first = true;
24913
 
24914
      sb.append("fromCartId:");
24915
      sb.append(this.fromCartId);
24916
      first = false;
24917
      if (!first) sb.append(", ");
24918
      sb.append("toCartId:");
24919
      sb.append(this.toCartId);
24920
      first = false;
24921
      sb.append(")");
24922
      return sb.toString();
24923
    }
24924
 
24925
    public void validate() throws TException {
24926
      // check for required fields
24927
    }
24928
 
24929
  }
24930
 
24931
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
24932
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
24933
 
24934
 
24935
 
24936
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24937
    public enum _Fields implements TFieldIdEnum {
24938
;
24939
 
24940
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24942
 
24943
      static {
24944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24945
          byId.put((int)field._thriftId, field);
24946
          byName.put(field.getFieldName(), field);
24947
        }
24948
      }
24949
 
24950
      /**
24951
       * Find the _Fields constant that matches fieldId, or null if its not found.
24952
       */
24953
      public static _Fields findByThriftId(int fieldId) {
24954
        return byId.get(fieldId);
24955
      }
24956
 
24957
      /**
24958
       * Find the _Fields constant that matches fieldId, throwing an exception
24959
       * if it is not found.
24960
       */
24961
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24962
        _Fields fields = findByThriftId(fieldId);
24963
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24964
        return fields;
24965
      }
24966
 
24967
      /**
24968
       * Find the _Fields constant that matches name, or null if its not found.
24969
       */
24970
      public static _Fields findByName(String name) {
24971
        return byName.get(name);
24972
      }
24973
 
24974
      private final short _thriftId;
24975
      private final String _fieldName;
24976
 
24977
      _Fields(short thriftId, String fieldName) {
24978
        _thriftId = thriftId;
24979
        _fieldName = fieldName;
24980
      }
24981
 
24982
      public short getThriftFieldId() {
24983
        return _thriftId;
24984
      }
24985
 
24986
      public String getFieldName() {
24987
        return _fieldName;
24988
      }
24989
    }
24990
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24991
    }});
24992
 
24993
    static {
24994
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
24995
    }
24996
 
24997
    public mergeCart_result() {
24998
    }
24999
 
25000
    /**
25001
     * Performs a deep copy on <i>other</i>.
25002
     */
25003
    public mergeCart_result(mergeCart_result other) {
25004
    }
25005
 
25006
    public mergeCart_result deepCopy() {
25007
      return new mergeCart_result(this);
25008
    }
25009
 
25010
    @Deprecated
25011
    public mergeCart_result clone() {
25012
      return new mergeCart_result(this);
25013
    }
25014
 
25015
    public void setFieldValue(_Fields field, Object value) {
25016
      switch (field) {
25017
      }
25018
    }
25019
 
25020
    public void setFieldValue(int fieldID, Object value) {
25021
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25022
    }
25023
 
25024
    public Object getFieldValue(_Fields field) {
25025
      switch (field) {
25026
      }
25027
      throw new IllegalStateException();
25028
    }
25029
 
25030
    public Object getFieldValue(int fieldId) {
25031
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25032
    }
25033
 
25034
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25035
    public boolean isSet(_Fields field) {
25036
      switch (field) {
25037
      }
25038
      throw new IllegalStateException();
25039
    }
25040
 
25041
    public boolean isSet(int fieldID) {
25042
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25043
    }
25044
 
25045
    @Override
25046
    public boolean equals(Object that) {
25047
      if (that == null)
25048
        return false;
25049
      if (that instanceof mergeCart_result)
25050
        return this.equals((mergeCart_result)that);
25051
      return false;
25052
    }
25053
 
25054
    public boolean equals(mergeCart_result that) {
25055
      if (that == null)
25056
        return false;
25057
 
25058
      return true;
25059
    }
25060
 
25061
    @Override
25062
    public int hashCode() {
25063
      return 0;
25064
    }
25065
 
25066
    public int compareTo(mergeCart_result other) {
25067
      if (!getClass().equals(other.getClass())) {
25068
        return getClass().getName().compareTo(other.getClass().getName());
25069
      }
25070
 
25071
      int lastComparison = 0;
25072
      mergeCart_result typedOther = (mergeCart_result)other;
25073
 
25074
      return 0;
25075
    }
25076
 
25077
    public void read(TProtocol iprot) throws TException {
25078
      TField field;
25079
      iprot.readStructBegin();
25080
      while (true)
25081
      {
25082
        field = iprot.readFieldBegin();
25083
        if (field.type == TType.STOP) { 
25084
          break;
25085
        }
25086
        _Fields fieldId = _Fields.findByThriftId(field.id);
25087
        if (fieldId == null) {
25088
          TProtocolUtil.skip(iprot, field.type);
25089
        } else {
25090
          switch (fieldId) {
25091
          }
25092
          iprot.readFieldEnd();
25093
        }
25094
      }
25095
      iprot.readStructEnd();
25096
      validate();
25097
    }
25098
 
25099
    public void write(TProtocol oprot) throws TException {
25100
      oprot.writeStructBegin(STRUCT_DESC);
25101
 
25102
      oprot.writeFieldStop();
25103
      oprot.writeStructEnd();
25104
    }
25105
 
25106
    @Override
25107
    public String toString() {
25108
      StringBuilder sb = new StringBuilder("mergeCart_result(");
25109
      boolean first = true;
25110
 
25111
      sb.append(")");
25112
      return sb.toString();
25113
    }
25114
 
25115
    public void validate() throws TException {
25116
      // check for required fields
25117
    }
25118
 
25119
  }
25120
 
25121
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
25122
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
25123
 
578 chandransh 25124
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25125
 
25126
    private long cartId;
25127
 
25128
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25129
    public enum _Fields implements TFieldIdEnum {
25130
      CART_ID((short)1, "cartId");
25131
 
25132
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25133
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25134
 
25135
      static {
25136
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25137
          byId.put((int)field._thriftId, field);
25138
          byName.put(field.getFieldName(), field);
25139
        }
25140
      }
25141
 
25142
      /**
25143
       * Find the _Fields constant that matches fieldId, or null if its not found.
25144
       */
25145
      public static _Fields findByThriftId(int fieldId) {
25146
        return byId.get(fieldId);
25147
      }
25148
 
25149
      /**
25150
       * Find the _Fields constant that matches fieldId, throwing an exception
25151
       * if it is not found.
25152
       */
25153
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25154
        _Fields fields = findByThriftId(fieldId);
25155
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25156
        return fields;
25157
      }
25158
 
25159
      /**
25160
       * Find the _Fields constant that matches name, or null if its not found.
25161
       */
25162
      public static _Fields findByName(String name) {
25163
        return byName.get(name);
25164
      }
25165
 
25166
      private final short _thriftId;
25167
      private final String _fieldName;
25168
 
25169
      _Fields(short thriftId, String fieldName) {
25170
        _thriftId = thriftId;
25171
        _fieldName = fieldName;
25172
      }
25173
 
25174
      public short getThriftFieldId() {
25175
        return _thriftId;
25176
      }
25177
 
25178
      public String getFieldName() {
25179
        return _fieldName;
25180
      }
25181
    }
25182
 
25183
    // isset id assignments
25184
    private static final int __CARTID_ISSET_ID = 0;
25185
    private BitSet __isset_bit_vector = new BitSet(1);
25186
 
25187
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25188
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25189
          new FieldValueMetaData(TType.I64)));
25190
    }});
25191
 
25192
    static {
688 chandransh 25193
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
578 chandransh 25194
    }
25195
 
688 chandransh 25196
    public checkOut_args() {
578 chandransh 25197
    }
25198
 
688 chandransh 25199
    public checkOut_args(
578 chandransh 25200
      long cartId)
25201
    {
25202
      this();
25203
      this.cartId = cartId;
25204
      setCartIdIsSet(true);
25205
    }
25206
 
25207
    /**
25208
     * Performs a deep copy on <i>other</i>.
25209
     */
688 chandransh 25210
    public checkOut_args(checkOut_args other) {
578 chandransh 25211
      __isset_bit_vector.clear();
25212
      __isset_bit_vector.or(other.__isset_bit_vector);
25213
      this.cartId = other.cartId;
25214
    }
25215
 
688 chandransh 25216
    public checkOut_args deepCopy() {
25217
      return new checkOut_args(this);
578 chandransh 25218
    }
25219
 
25220
    @Deprecated
688 chandransh 25221
    public checkOut_args clone() {
25222
      return new checkOut_args(this);
578 chandransh 25223
    }
25224
 
25225
    public long getCartId() {
25226
      return this.cartId;
25227
    }
25228
 
688 chandransh 25229
    public checkOut_args setCartId(long cartId) {
578 chandransh 25230
      this.cartId = cartId;
25231
      setCartIdIsSet(true);
25232
      return this;
25233
    }
25234
 
25235
    public void unsetCartId() {
25236
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
25237
    }
25238
 
25239
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25240
    public boolean isSetCartId() {
25241
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
25242
    }
25243
 
25244
    public void setCartIdIsSet(boolean value) {
25245
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
25246
    }
25247
 
25248
    public void setFieldValue(_Fields field, Object value) {
25249
      switch (field) {
25250
      case CART_ID:
25251
        if (value == null) {
25252
          unsetCartId();
25253
        } else {
25254
          setCartId((Long)value);
25255
        }
25256
        break;
25257
 
25258
      }
25259
    }
25260
 
25261
    public void setFieldValue(int fieldID, Object value) {
25262
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25263
    }
25264
 
25265
    public Object getFieldValue(_Fields field) {
25266
      switch (field) {
25267
      case CART_ID:
25268
        return new Long(getCartId());
25269
 
25270
      }
25271
      throw new IllegalStateException();
25272
    }
25273
 
25274
    public Object getFieldValue(int fieldId) {
25275
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25276
    }
25277
 
25278
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25279
    public boolean isSet(_Fields field) {
25280
      switch (field) {
25281
      case CART_ID:
25282
        return isSetCartId();
25283
      }
25284
      throw new IllegalStateException();
25285
    }
25286
 
25287
    public boolean isSet(int fieldID) {
25288
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25289
    }
25290
 
25291
    @Override
25292
    public boolean equals(Object that) {
25293
      if (that == null)
25294
        return false;
688 chandransh 25295
      if (that instanceof checkOut_args)
25296
        return this.equals((checkOut_args)that);
578 chandransh 25297
      return false;
25298
    }
25299
 
688 chandransh 25300
    public boolean equals(checkOut_args that) {
578 chandransh 25301
      if (that == null)
25302
        return false;
25303
 
25304
      boolean this_present_cartId = true;
25305
      boolean that_present_cartId = true;
25306
      if (this_present_cartId || that_present_cartId) {
25307
        if (!(this_present_cartId && that_present_cartId))
25308
          return false;
25309
        if (this.cartId != that.cartId)
25310
          return false;
25311
      }
25312
 
25313
      return true;
25314
    }
25315
 
25316
    @Override
25317
    public int hashCode() {
25318
      return 0;
25319
    }
25320
 
688 chandransh 25321
    public int compareTo(checkOut_args other) {
578 chandransh 25322
      if (!getClass().equals(other.getClass())) {
25323
        return getClass().getName().compareTo(other.getClass().getName());
25324
      }
25325
 
25326
      int lastComparison = 0;
688 chandransh 25327
      checkOut_args typedOther = (checkOut_args)other;
578 chandransh 25328
 
25329
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
25330
      if (lastComparison != 0) {
25331
        return lastComparison;
25332
      }
25333
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
25334
      if (lastComparison != 0) {
25335
        return lastComparison;
25336
      }
25337
      return 0;
25338
    }
25339
 
25340
    public void read(TProtocol iprot) throws TException {
25341
      TField field;
25342
      iprot.readStructBegin();
25343
      while (true)
25344
      {
25345
        field = iprot.readFieldBegin();
25346
        if (field.type == TType.STOP) { 
25347
          break;
25348
        }
25349
        _Fields fieldId = _Fields.findByThriftId(field.id);
25350
        if (fieldId == null) {
25351
          TProtocolUtil.skip(iprot, field.type);
25352
        } else {
25353
          switch (fieldId) {
25354
            case CART_ID:
25355
              if (field.type == TType.I64) {
25356
                this.cartId = iprot.readI64();
25357
                setCartIdIsSet(true);
25358
              } else { 
25359
                TProtocolUtil.skip(iprot, field.type);
25360
              }
25361
              break;
25362
          }
25363
          iprot.readFieldEnd();
25364
        }
25365
      }
25366
      iprot.readStructEnd();
25367
      validate();
25368
    }
25369
 
25370
    public void write(TProtocol oprot) throws TException {
25371
      validate();
25372
 
25373
      oprot.writeStructBegin(STRUCT_DESC);
25374
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25375
      oprot.writeI64(this.cartId);
25376
      oprot.writeFieldEnd();
25377
      oprot.writeFieldStop();
25378
      oprot.writeStructEnd();
25379
    }
25380
 
25381
    @Override
25382
    public String toString() {
688 chandransh 25383
      StringBuilder sb = new StringBuilder("checkOut_args(");
578 chandransh 25384
      boolean first = true;
25385
 
25386
      sb.append("cartId:");
25387
      sb.append(this.cartId);
25388
      first = false;
25389
      sb.append(")");
25390
      return sb.toString();
25391
    }
25392
 
25393
    public void validate() throws TException {
25394
      // check for required fields
25395
    }
25396
 
25397
  }
25398
 
688 chandransh 25399
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
25400
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
578 chandransh 25401
 
25402
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
25403
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
25404
 
25405
    private boolean success;
25406
    private ShoppingCartException scex;
25407
 
25408
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25409
    public enum _Fields implements TFieldIdEnum {
25410
      SUCCESS((short)0, "success"),
25411
      SCEX((short)1, "scex");
25412
 
25413
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25414
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25415
 
25416
      static {
25417
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25418
          byId.put((int)field._thriftId, field);
25419
          byName.put(field.getFieldName(), field);
25420
        }
25421
      }
25422
 
25423
      /**
25424
       * Find the _Fields constant that matches fieldId, or null if its not found.
25425
       */
25426
      public static _Fields findByThriftId(int fieldId) {
25427
        return byId.get(fieldId);
25428
      }
25429
 
25430
      /**
25431
       * Find the _Fields constant that matches fieldId, throwing an exception
25432
       * if it is not found.
25433
       */
25434
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25435
        _Fields fields = findByThriftId(fieldId);
25436
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25437
        return fields;
25438
      }
25439
 
25440
      /**
25441
       * Find the _Fields constant that matches name, or null if its not found.
25442
       */
25443
      public static _Fields findByName(String name) {
25444
        return byName.get(name);
25445
      }
25446
 
25447
      private final short _thriftId;
25448
      private final String _fieldName;
25449
 
25450
      _Fields(short thriftId, String fieldName) {
25451
        _thriftId = thriftId;
25452
        _fieldName = fieldName;
25453
      }
25454
 
25455
      public short getThriftFieldId() {
25456
        return _thriftId;
25457
      }
25458
 
25459
      public String getFieldName() {
25460
        return _fieldName;
25461
      }
25462
    }
25463
 
25464
    // isset id assignments
25465
    private static final int __SUCCESS_ISSET_ID = 0;
25466
    private BitSet __isset_bit_vector = new BitSet(1);
25467
 
25468
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25469
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25470
          new FieldValueMetaData(TType.BOOL)));
25471
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
25472
          new FieldValueMetaData(TType.STRUCT)));
25473
    }});
25474
 
25475
    static {
688 chandransh 25476
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
578 chandransh 25477
    }
25478
 
688 chandransh 25479
    public checkOut_result() {
578 chandransh 25480
    }
25481
 
688 chandransh 25482
    public checkOut_result(
578 chandransh 25483
      boolean success,
25484
      ShoppingCartException scex)
25485
    {
25486
      this();
25487
      this.success = success;
25488
      setSuccessIsSet(true);
25489
      this.scex = scex;
25490
    }
25491
 
25492
    /**
25493
     * Performs a deep copy on <i>other</i>.
25494
     */
688 chandransh 25495
    public checkOut_result(checkOut_result other) {
578 chandransh 25496
      __isset_bit_vector.clear();
25497
      __isset_bit_vector.or(other.__isset_bit_vector);
25498
      this.success = other.success;
25499
      if (other.isSetScex()) {
25500
        this.scex = new ShoppingCartException(other.scex);
25501
      }
25502
    }
25503
 
688 chandransh 25504
    public checkOut_result deepCopy() {
25505
      return new checkOut_result(this);
578 chandransh 25506
    }
25507
 
25508
    @Deprecated
688 chandransh 25509
    public checkOut_result clone() {
25510
      return new checkOut_result(this);
578 chandransh 25511
    }
25512
 
25513
    public boolean isSuccess() {
25514
      return this.success;
25515
    }
25516
 
688 chandransh 25517
    public checkOut_result setSuccess(boolean success) {
578 chandransh 25518
      this.success = success;
25519
      setSuccessIsSet(true);
25520
      return this;
25521
    }
25522
 
25523
    public void unsetSuccess() {
25524
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
25525
    }
25526
 
25527
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25528
    public boolean isSetSuccess() {
25529
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
25530
    }
25531
 
25532
    public void setSuccessIsSet(boolean value) {
25533
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
25534
    }
25535
 
25536
    public ShoppingCartException getScex() {
25537
      return this.scex;
25538
    }
25539
 
688 chandransh 25540
    public checkOut_result setScex(ShoppingCartException scex) {
578 chandransh 25541
      this.scex = scex;
25542
      return this;
25543
    }
25544
 
25545
    public void unsetScex() {
25546
      this.scex = null;
25547
    }
25548
 
25549
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
25550
    public boolean isSetScex() {
25551
      return this.scex != null;
25552
    }
25553
 
25554
    public void setScexIsSet(boolean value) {
25555
      if (!value) {
25556
        this.scex = null;
25557
      }
25558
    }
25559
 
25560
    public void setFieldValue(_Fields field, Object value) {
25561
      switch (field) {
25562
      case SUCCESS:
25563
        if (value == null) {
25564
          unsetSuccess();
25565
        } else {
25566
          setSuccess((Boolean)value);
25567
        }
25568
        break;
25569
 
25570
      case SCEX:
25571
        if (value == null) {
25572
          unsetScex();
25573
        } else {
25574
          setScex((ShoppingCartException)value);
25575
        }
25576
        break;
25577
 
25578
      }
25579
    }
25580
 
25581
    public void setFieldValue(int fieldID, Object value) {
25582
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25583
    }
25584
 
25585
    public Object getFieldValue(_Fields field) {
25586
      switch (field) {
25587
      case SUCCESS:
25588
        return new Boolean(isSuccess());
25589
 
25590
      case SCEX:
25591
        return getScex();
25592
 
25593
      }
25594
      throw new IllegalStateException();
25595
    }
25596
 
25597
    public Object getFieldValue(int fieldId) {
25598
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25599
    }
25600
 
25601
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25602
    public boolean isSet(_Fields field) {
25603
      switch (field) {
25604
      case SUCCESS:
25605
        return isSetSuccess();
25606
      case SCEX:
25607
        return isSetScex();
25608
      }
25609
      throw new IllegalStateException();
25610
    }
25611
 
25612
    public boolean isSet(int fieldID) {
25613
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25614
    }
25615
 
25616
    @Override
25617
    public boolean equals(Object that) {
25618
      if (that == null)
25619
        return false;
688 chandransh 25620
      if (that instanceof checkOut_result)
25621
        return this.equals((checkOut_result)that);
578 chandransh 25622
      return false;
25623
    }
25624
 
688 chandransh 25625
    public boolean equals(checkOut_result that) {
578 chandransh 25626
      if (that == null)
25627
        return false;
25628
 
25629
      boolean this_present_success = true;
25630
      boolean that_present_success = true;
25631
      if (this_present_success || that_present_success) {
25632
        if (!(this_present_success && that_present_success))
25633
          return false;
25634
        if (this.success != that.success)
25635
          return false;
25636
      }
25637
 
25638
      boolean this_present_scex = true && this.isSetScex();
25639
      boolean that_present_scex = true && that.isSetScex();
25640
      if (this_present_scex || that_present_scex) {
25641
        if (!(this_present_scex && that_present_scex))
25642
          return false;
25643
        if (!this.scex.equals(that.scex))
25644
          return false;
25645
      }
25646
 
25647
      return true;
25648
    }
25649
 
25650
    @Override
25651
    public int hashCode() {
25652
      return 0;
25653
    }
25654
 
688 chandransh 25655
    public int compareTo(checkOut_result other) {
578 chandransh 25656
      if (!getClass().equals(other.getClass())) {
25657
        return getClass().getName().compareTo(other.getClass().getName());
25658
      }
25659
 
25660
      int lastComparison = 0;
688 chandransh 25661
      checkOut_result typedOther = (checkOut_result)other;
578 chandransh 25662
 
25663
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25664
      if (lastComparison != 0) {
25665
        return lastComparison;
25666
      }
25667
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25668
      if (lastComparison != 0) {
25669
        return lastComparison;
25670
      }
25671
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
25672
      if (lastComparison != 0) {
25673
        return lastComparison;
25674
      }
25675
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
25676
      if (lastComparison != 0) {
25677
        return lastComparison;
25678
      }
25679
      return 0;
25680
    }
25681
 
25682
    public void read(TProtocol iprot) throws TException {
25683
      TField field;
25684
      iprot.readStructBegin();
25685
      while (true)
25686
      {
25687
        field = iprot.readFieldBegin();
25688
        if (field.type == TType.STOP) { 
25689
          break;
25690
        }
25691
        _Fields fieldId = _Fields.findByThriftId(field.id);
25692
        if (fieldId == null) {
25693
          TProtocolUtil.skip(iprot, field.type);
25694
        } else {
25695
          switch (fieldId) {
25696
            case SUCCESS:
25697
              if (field.type == TType.BOOL) {
25698
                this.success = iprot.readBool();
25699
                setSuccessIsSet(true);
25700
              } else { 
25701
                TProtocolUtil.skip(iprot, field.type);
25702
              }
25703
              break;
25704
            case SCEX:
25705
              if (field.type == TType.STRUCT) {
25706
                this.scex = new ShoppingCartException();
25707
                this.scex.read(iprot);
25708
              } else { 
25709
                TProtocolUtil.skip(iprot, field.type);
25710
              }
25711
              break;
25712
          }
25713
          iprot.readFieldEnd();
25714
        }
25715
      }
25716
      iprot.readStructEnd();
25717
      validate();
25718
    }
25719
 
25720
    public void write(TProtocol oprot) throws TException {
25721
      oprot.writeStructBegin(STRUCT_DESC);
25722
 
25723
      if (this.isSetSuccess()) {
25724
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25725
        oprot.writeBool(this.success);
25726
        oprot.writeFieldEnd();
25727
      } else if (this.isSetScex()) {
25728
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
25729
        this.scex.write(oprot);
25730
        oprot.writeFieldEnd();
25731
      }
25732
      oprot.writeFieldStop();
25733
      oprot.writeStructEnd();
25734
    }
25735
 
25736
    @Override
25737
    public String toString() {
688 chandransh 25738
      StringBuilder sb = new StringBuilder("checkOut_result(");
578 chandransh 25739
      boolean first = true;
25740
 
25741
      sb.append("success:");
25742
      sb.append(this.success);
25743
      first = false;
25744
      if (!first) sb.append(", ");
25745
      sb.append("scex:");
25746
      if (this.scex == null) {
25747
        sb.append("null");
25748
      } else {
25749
        sb.append(this.scex);
25750
      }
25751
      first = false;
25752
      sb.append(")");
25753
      return sb.toString();
25754
    }
25755
 
25756
    public void validate() throws TException {
25757
      // check for required fields
25758
    }
25759
 
25760
  }
25761
 
688 chandransh 25762
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
25763
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
553 chandransh 25764
 
688 chandransh 25765
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25766
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
553 chandransh 25767
 
688 chandransh 25768
    private long cartId;
708 rajveer 25769
    private Map<Long,Double> items;
553 chandransh 25770
 
25771
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25772
    public enum _Fields implements TFieldIdEnum {
688 chandransh 25773
      CART_ID((short)1, "cartId"),
25774
      ITEMS((short)2, "items");
553 chandransh 25775
 
25776
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25777
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25778
 
25779
      static {
25780
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25781
          byId.put((int)field._thriftId, field);
25782
          byName.put(field.getFieldName(), field);
25783
        }
25784
      }
25785
 
25786
      /**
25787
       * Find the _Fields constant that matches fieldId, or null if its not found.
25788
       */
25789
      public static _Fields findByThriftId(int fieldId) {
25790
        return byId.get(fieldId);
25791
      }
25792
 
25793
      /**
25794
       * Find the _Fields constant that matches fieldId, throwing an exception
25795
       * if it is not found.
25796
       */
25797
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25798
        _Fields fields = findByThriftId(fieldId);
25799
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25800
        return fields;
25801
      }
25802
 
25803
      /**
25804
       * Find the _Fields constant that matches name, or null if its not found.
25805
       */
25806
      public static _Fields findByName(String name) {
25807
        return byName.get(name);
25808
      }
25809
 
25810
      private final short _thriftId;
25811
      private final String _fieldName;
25812
 
25813
      _Fields(short thriftId, String fieldName) {
25814
        _thriftId = thriftId;
25815
        _fieldName = fieldName;
25816
      }
25817
 
25818
      public short getThriftFieldId() {
25819
        return _thriftId;
25820
      }
25821
 
25822
      public String getFieldName() {
25823
        return _fieldName;
25824
      }
25825
    }
25826
 
25827
    // isset id assignments
688 chandransh 25828
    private static final int __CARTID_ISSET_ID = 0;
25829
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 25830
 
25831
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 25832
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
553 chandransh 25833
          new FieldValueMetaData(TType.I64)));
688 chandransh 25834
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
25835
          new MapMetaData(TType.MAP, 
25836
              new FieldValueMetaData(TType.I64), 
708 rajveer 25837
              new FieldValueMetaData(TType.DOUBLE))));
553 chandransh 25838
    }});
25839
 
25840
    static {
688 chandransh 25841
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
553 chandransh 25842
    }
25843
 
688 chandransh 25844
    public resetCart_args() {
553 chandransh 25845
    }
25846
 
688 chandransh 25847
    public resetCart_args(
25848
      long cartId,
708 rajveer 25849
      Map<Long,Double> items)
553 chandransh 25850
    {
25851
      this();
688 chandransh 25852
      this.cartId = cartId;
25853
      setCartIdIsSet(true);
25854
      this.items = items;
553 chandransh 25855
    }
25856
 
25857
    /**
25858
     * Performs a deep copy on <i>other</i>.
25859
     */
688 chandransh 25860
    public resetCart_args(resetCart_args other) {
553 chandransh 25861
      __isset_bit_vector.clear();
25862
      __isset_bit_vector.or(other.__isset_bit_vector);
688 chandransh 25863
      this.cartId = other.cartId;
25864
      if (other.isSetItems()) {
708 rajveer 25865
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
25866
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {
688 chandransh 25867
 
25868
          Long other_element_key = other_element.getKey();
708 rajveer 25869
          Double other_element_value = other_element.getValue();
688 chandransh 25870
 
25871
          Long __this__items_copy_key = other_element_key;
25872
 
708 rajveer 25873
          Double __this__items_copy_value = other_element_value;
688 chandransh 25874
 
25875
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
25876
        }
25877
        this.items = __this__items;
25878
      }
553 chandransh 25879
    }
25880
 
688 chandransh 25881
    public resetCart_args deepCopy() {
25882
      return new resetCart_args(this);
553 chandransh 25883
    }
25884
 
25885
    @Deprecated
688 chandransh 25886
    public resetCart_args clone() {
25887
      return new resetCart_args(this);
553 chandransh 25888
    }
25889
 
688 chandransh 25890
    public long getCartId() {
25891
      return this.cartId;
553 chandransh 25892
    }
25893
 
688 chandransh 25894
    public resetCart_args setCartId(long cartId) {
25895
      this.cartId = cartId;
25896
      setCartIdIsSet(true);
48 ashish 25897
      return this;
25898
    }
25899
 
688 chandransh 25900
    public void unsetCartId() {
25901
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 25902
    }
25903
 
688 chandransh 25904
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25905
    public boolean isSetCartId() {
25906
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 25907
    }
25908
 
688 chandransh 25909
    public void setCartIdIsSet(boolean value) {
25910
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 25911
    }
25912
 
688 chandransh 25913
    public int getItemsSize() {
25914
      return (this.items == null) ? 0 : this.items.size();
553 chandransh 25915
    }
25916
 
708 rajveer 25917
    public void putToItems(long key, double val) {
688 chandransh 25918
      if (this.items == null) {
708 rajveer 25919
        this.items = new HashMap<Long,Double>();
688 chandransh 25920
      }
25921
      this.items.put(key, val);
25922
    }
25923
 
708 rajveer 25924
    public Map<Long,Double> getItems() {
688 chandransh 25925
      return this.items;
25926
    }
25927
 
708 rajveer 25928
    public resetCart_args setItems(Map<Long,Double> items) {
688 chandransh 25929
      this.items = items;
553 chandransh 25930
      return this;
25931
    }
25932
 
688 chandransh 25933
    public void unsetItems() {
25934
      this.items = null;
553 chandransh 25935
    }
25936
 
688 chandransh 25937
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
25938
    public boolean isSetItems() {
25939
      return this.items != null;
553 chandransh 25940
    }
25941
 
688 chandransh 25942
    public void setItemsIsSet(boolean value) {
25943
      if (!value) {
25944
        this.items = null;
25945
      }
553 chandransh 25946
    }
25947
 
25948
    public void setFieldValue(_Fields field, Object value) {
25949
      switch (field) {
688 chandransh 25950
      case CART_ID:
553 chandransh 25951
        if (value == null) {
688 chandransh 25952
          unsetCartId();
553 chandransh 25953
        } else {
688 chandransh 25954
          setCartId((Long)value);
553 chandransh 25955
        }
25956
        break;
25957
 
688 chandransh 25958
      case ITEMS:
553 chandransh 25959
        if (value == null) {
688 chandransh 25960
          unsetItems();
553 chandransh 25961
        } else {
708 rajveer 25962
          setItems((Map<Long,Double>)value);
553 chandransh 25963
        }
25964
        break;
25965
 
25966
      }
25967
    }
25968
 
25969
    public void setFieldValue(int fieldID, Object value) {
25970
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25971
    }
25972
 
25973
    public Object getFieldValue(_Fields field) {
25974
      switch (field) {
688 chandransh 25975
      case CART_ID:
25976
        return new Long(getCartId());
553 chandransh 25977
 
688 chandransh 25978
      case ITEMS:
25979
        return getItems();
553 chandransh 25980
 
25981
      }
25982
      throw new IllegalStateException();
25983
    }
25984
 
25985
    public Object getFieldValue(int fieldId) {
25986
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25987
    }
25988
 
25989
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25990
    public boolean isSet(_Fields field) {
25991
      switch (field) {
688 chandransh 25992
      case CART_ID:
25993
        return isSetCartId();
25994
      case ITEMS:
25995
        return isSetItems();
553 chandransh 25996
      }
25997
      throw new IllegalStateException();
25998
    }
25999
 
26000
    public boolean isSet(int fieldID) {
26001
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26002
    }
26003
 
26004
    @Override
26005
    public boolean equals(Object that) {
26006
      if (that == null)
26007
        return false;
688 chandransh 26008
      if (that instanceof resetCart_args)
26009
        return this.equals((resetCart_args)that);
553 chandransh 26010
      return false;
26011
    }
26012
 
688 chandransh 26013
    public boolean equals(resetCart_args that) {
553 chandransh 26014
      if (that == null)
26015
        return false;
26016
 
688 chandransh 26017
      boolean this_present_cartId = true;
26018
      boolean that_present_cartId = true;
26019
      if (this_present_cartId || that_present_cartId) {
26020
        if (!(this_present_cartId && that_present_cartId))
553 chandransh 26021
          return false;
688 chandransh 26022
        if (this.cartId != that.cartId)
553 chandransh 26023
          return false;
26024
      }
26025
 
688 chandransh 26026
      boolean this_present_items = true && this.isSetItems();
26027
      boolean that_present_items = true && that.isSetItems();
26028
      if (this_present_items || that_present_items) {
26029
        if (!(this_present_items && that_present_items))
553 chandransh 26030
          return false;
688 chandransh 26031
        if (!this.items.equals(that.items))
553 chandransh 26032
          return false;
26033
      }
26034
 
26035
      return true;
26036
    }
26037
 
26038
    @Override
26039
    public int hashCode() {
26040
      return 0;
26041
    }
26042
 
26043
    public void read(TProtocol iprot) throws TException {
26044
      TField field;
26045
      iprot.readStructBegin();
26046
      while (true)
26047
      {
26048
        field = iprot.readFieldBegin();
26049
        if (field.type == TType.STOP) { 
26050
          break;
26051
        }
26052
        _Fields fieldId = _Fields.findByThriftId(field.id);
26053
        if (fieldId == null) {
26054
          TProtocolUtil.skip(iprot, field.type);
26055
        } else {
26056
          switch (fieldId) {
688 chandransh 26057
            case CART_ID:
553 chandransh 26058
              if (field.type == TType.I64) {
688 chandransh 26059
                this.cartId = iprot.readI64();
26060
                setCartIdIsSet(true);
553 chandransh 26061
              } else { 
26062
                TProtocolUtil.skip(iprot, field.type);
26063
              }
26064
              break;
688 chandransh 26065
            case ITEMS:
26066
              if (field.type == TType.MAP) {
26067
                {
771 rajveer 26068
                  TMap _map32 = iprot.readMapBegin();
26069
                  this.items = new HashMap<Long,Double>(2*_map32.size);
26070
                  for (int _i33 = 0; _i33 < _map32.size; ++_i33)
688 chandransh 26071
                  {
771 rajveer 26072
                    long _key34;
26073
                    double _val35;
26074
                    _key34 = iprot.readI64();
26075
                    _val35 = iprot.readDouble();
26076
                    this.items.put(_key34, _val35);
688 chandransh 26077
                  }
26078
                  iprot.readMapEnd();
26079
                }
553 chandransh 26080
              } else { 
26081
                TProtocolUtil.skip(iprot, field.type);
26082
              }
26083
              break;
26084
          }
26085
          iprot.readFieldEnd();
26086
        }
26087
      }
26088
      iprot.readStructEnd();
26089
      validate();
26090
    }
26091
 
26092
    public void write(TProtocol oprot) throws TException {
26093
      validate();
26094
 
26095
      oprot.writeStructBegin(STRUCT_DESC);
688 chandransh 26096
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26097
      oprot.writeI64(this.cartId);
553 chandransh 26098
      oprot.writeFieldEnd();
688 chandransh 26099
      if (this.items != null) {
26100
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
26101
        {
708 rajveer 26102
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
771 rajveer 26103
          for (Map.Entry<Long, Double> _iter36 : this.items.entrySet())
688 chandransh 26104
          {
771 rajveer 26105
            oprot.writeI64(_iter36.getKey());
26106
            oprot.writeDouble(_iter36.getValue());
688 chandransh 26107
          }
26108
          oprot.writeMapEnd();
26109
        }
26110
        oprot.writeFieldEnd();
26111
      }
553 chandransh 26112
      oprot.writeFieldStop();
26113
      oprot.writeStructEnd();
26114
    }
26115
 
26116
    @Override
26117
    public String toString() {
688 chandransh 26118
      StringBuilder sb = new StringBuilder("resetCart_args(");
553 chandransh 26119
      boolean first = true;
26120
 
688 chandransh 26121
      sb.append("cartId:");
26122
      sb.append(this.cartId);
553 chandransh 26123
      first = false;
26124
      if (!first) sb.append(", ");
688 chandransh 26125
      sb.append("items:");
26126
      if (this.items == null) {
26127
        sb.append("null");
26128
      } else {
26129
        sb.append(this.items);
26130
      }
553 chandransh 26131
      first = false;
26132
      sb.append(")");
26133
      return sb.toString();
26134
    }
26135
 
26136
    public void validate() throws TException {
26137
      // check for required fields
26138
    }
26139
 
26140
  }
26141
 
688 chandransh 26142
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
26143
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
553 chandransh 26144
 
688 chandransh 26145
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
26146
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
553 chandransh 26147
 
688 chandransh 26148
    private boolean success;
26149
    private ShoppingCartException scex;
553 chandransh 26150
 
26151
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26152
    public enum _Fields implements TFieldIdEnum {
688 chandransh 26153
      SUCCESS((short)0, "success"),
26154
      SCEX((short)1, "scex");
553 chandransh 26155
 
26156
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26157
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26158
 
26159
      static {
26160
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26161
          byId.put((int)field._thriftId, field);
26162
          byName.put(field.getFieldName(), field);
26163
        }
26164
      }
26165
 
26166
      /**
26167
       * Find the _Fields constant that matches fieldId, or null if its not found.
26168
       */
26169
      public static _Fields findByThriftId(int fieldId) {
26170
        return byId.get(fieldId);
26171
      }
26172
 
26173
      /**
26174
       * Find the _Fields constant that matches fieldId, throwing an exception
26175
       * if it is not found.
26176
       */
26177
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26178
        _Fields fields = findByThriftId(fieldId);
26179
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26180
        return fields;
26181
      }
26182
 
26183
      /**
26184
       * Find the _Fields constant that matches name, or null if its not found.
26185
       */
26186
      public static _Fields findByName(String name) {
26187
        return byName.get(name);
26188
      }
26189
 
26190
      private final short _thriftId;
26191
      private final String _fieldName;
26192
 
26193
      _Fields(short thriftId, String fieldName) {
26194
        _thriftId = thriftId;
26195
        _fieldName = fieldName;
26196
      }
26197
 
26198
      public short getThriftFieldId() {
26199
        return _thriftId;
26200
      }
26201
 
26202
      public String getFieldName() {
26203
        return _fieldName;
26204
      }
26205
    }
688 chandransh 26206
 
26207
    // isset id assignments
26208
    private static final int __SUCCESS_ISSET_ID = 0;
26209
    private BitSet __isset_bit_vector = new BitSet(1);
26210
 
553 chandransh 26211
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 26212
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26213
          new FieldValueMetaData(TType.BOOL)));
26214
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
26215
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 26216
    }});
26217
 
26218
    static {
688 chandransh 26219
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
553 chandransh 26220
    }
26221
 
688 chandransh 26222
    public resetCart_result() {
553 chandransh 26223
    }
26224
 
688 chandransh 26225
    public resetCart_result(
26226
      boolean success,
26227
      ShoppingCartException scex)
26228
    {
26229
      this();
26230
      this.success = success;
26231
      setSuccessIsSet(true);
26232
      this.scex = scex;
26233
    }
26234
 
553 chandransh 26235
    /**
26236
     * Performs a deep copy on <i>other</i>.
26237
     */
688 chandransh 26238
    public resetCart_result(resetCart_result other) {
26239
      __isset_bit_vector.clear();
26240
      __isset_bit_vector.or(other.__isset_bit_vector);
26241
      this.success = other.success;
26242
      if (other.isSetScex()) {
26243
        this.scex = new ShoppingCartException(other.scex);
26244
      }
553 chandransh 26245
    }
26246
 
688 chandransh 26247
    public resetCart_result deepCopy() {
26248
      return new resetCart_result(this);
553 chandransh 26249
    }
26250
 
26251
    @Deprecated
688 chandransh 26252
    public resetCart_result clone() {
26253
      return new resetCart_result(this);
553 chandransh 26254
    }
26255
 
688 chandransh 26256
    public boolean isSuccess() {
26257
      return this.success;
26258
    }
26259
 
26260
    public resetCart_result setSuccess(boolean success) {
26261
      this.success = success;
26262
      setSuccessIsSet(true);
26263
      return this;
26264
    }
26265
 
26266
    public void unsetSuccess() {
26267
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26268
    }
26269
 
26270
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26271
    public boolean isSetSuccess() {
26272
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26273
    }
26274
 
26275
    public void setSuccessIsSet(boolean value) {
26276
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26277
    }
26278
 
26279
    public ShoppingCartException getScex() {
26280
      return this.scex;
26281
    }
26282
 
26283
    public resetCart_result setScex(ShoppingCartException scex) {
26284
      this.scex = scex;
26285
      return this;
26286
    }
26287
 
26288
    public void unsetScex() {
26289
      this.scex = null;
26290
    }
26291
 
26292
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
26293
    public boolean isSetScex() {
26294
      return this.scex != null;
26295
    }
26296
 
26297
    public void setScexIsSet(boolean value) {
26298
      if (!value) {
26299
        this.scex = null;
26300
      }
26301
    }
26302
 
553 chandransh 26303
    public void setFieldValue(_Fields field, Object value) {
26304
      switch (field) {
688 chandransh 26305
      case SUCCESS:
26306
        if (value == null) {
26307
          unsetSuccess();
26308
        } else {
26309
          setSuccess((Boolean)value);
26310
        }
26311
        break;
26312
 
26313
      case SCEX:
26314
        if (value == null) {
26315
          unsetScex();
26316
        } else {
26317
          setScex((ShoppingCartException)value);
26318
        }
26319
        break;
26320
 
553 chandransh 26321
      }
26322
    }
26323
 
26324
    public void setFieldValue(int fieldID, Object value) {
26325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26326
    }
26327
 
26328
    public Object getFieldValue(_Fields field) {
26329
      switch (field) {
688 chandransh 26330
      case SUCCESS:
26331
        return new Boolean(isSuccess());
26332
 
26333
      case SCEX:
26334
        return getScex();
26335
 
553 chandransh 26336
      }
26337
      throw new IllegalStateException();
26338
    }
26339
 
26340
    public Object getFieldValue(int fieldId) {
26341
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26342
    }
26343
 
26344
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26345
    public boolean isSet(_Fields field) {
26346
      switch (field) {
688 chandransh 26347
      case SUCCESS:
26348
        return isSetSuccess();
26349
      case SCEX:
26350
        return isSetScex();
553 chandransh 26351
      }
26352
      throw new IllegalStateException();
26353
    }
26354
 
26355
    public boolean isSet(int fieldID) {
26356
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26357
    }
26358
 
26359
    @Override
26360
    public boolean equals(Object that) {
26361
      if (that == null)
26362
        return false;
688 chandransh 26363
      if (that instanceof resetCart_result)
26364
        return this.equals((resetCart_result)that);
553 chandransh 26365
      return false;
26366
    }
26367
 
688 chandransh 26368
    public boolean equals(resetCart_result that) {
553 chandransh 26369
      if (that == null)
26370
        return false;
26371
 
688 chandransh 26372
      boolean this_present_success = true;
26373
      boolean that_present_success = true;
26374
      if (this_present_success || that_present_success) {
26375
        if (!(this_present_success && that_present_success))
26376
          return false;
26377
        if (this.success != that.success)
26378
          return false;
26379
      }
26380
 
26381
      boolean this_present_scex = true && this.isSetScex();
26382
      boolean that_present_scex = true && that.isSetScex();
26383
      if (this_present_scex || that_present_scex) {
26384
        if (!(this_present_scex && that_present_scex))
26385
          return false;
26386
        if (!this.scex.equals(that.scex))
26387
          return false;
26388
      }
26389
 
553 chandransh 26390
      return true;
26391
    }
26392
 
26393
    @Override
26394
    public int hashCode() {
26395
      return 0;
26396
    }
26397
 
688 chandransh 26398
    public int compareTo(resetCart_result other) {
553 chandransh 26399
      if (!getClass().equals(other.getClass())) {
26400
        return getClass().getName().compareTo(other.getClass().getName());
26401
      }
26402
 
26403
      int lastComparison = 0;
688 chandransh 26404
      resetCart_result typedOther = (resetCart_result)other;
553 chandransh 26405
 
688 chandransh 26406
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26407
      if (lastComparison != 0) {
26408
        return lastComparison;
26409
      }
26410
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26411
      if (lastComparison != 0) {
26412
        return lastComparison;
26413
      }
26414
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
26415
      if (lastComparison != 0) {
26416
        return lastComparison;
26417
      }
26418
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
26419
      if (lastComparison != 0) {
26420
        return lastComparison;
26421
      }
553 chandransh 26422
      return 0;
26423
    }
26424
 
26425
    public void read(TProtocol iprot) throws TException {
26426
      TField field;
26427
      iprot.readStructBegin();
26428
      while (true)
26429
      {
26430
        field = iprot.readFieldBegin();
26431
        if (field.type == TType.STOP) { 
26432
          break;
26433
        }
26434
        _Fields fieldId = _Fields.findByThriftId(field.id);
26435
        if (fieldId == null) {
26436
          TProtocolUtil.skip(iprot, field.type);
26437
        } else {
26438
          switch (fieldId) {
688 chandransh 26439
            case SUCCESS:
26440
              if (field.type == TType.BOOL) {
26441
                this.success = iprot.readBool();
26442
                setSuccessIsSet(true);
26443
              } else { 
26444
                TProtocolUtil.skip(iprot, field.type);
26445
              }
26446
              break;
26447
            case SCEX:
26448
              if (field.type == TType.STRUCT) {
26449
                this.scex = new ShoppingCartException();
26450
                this.scex.read(iprot);
26451
              } else { 
26452
                TProtocolUtil.skip(iprot, field.type);
26453
              }
26454
              break;
553 chandransh 26455
          }
26456
          iprot.readFieldEnd();
26457
        }
26458
      }
26459
      iprot.readStructEnd();
26460
      validate();
26461
    }
26462
 
26463
    public void write(TProtocol oprot) throws TException {
26464
      oprot.writeStructBegin(STRUCT_DESC);
26465
 
688 chandransh 26466
      if (this.isSetSuccess()) {
26467
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26468
        oprot.writeBool(this.success);
26469
        oprot.writeFieldEnd();
26470
      } else if (this.isSetScex()) {
26471
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
26472
        this.scex.write(oprot);
26473
        oprot.writeFieldEnd();
26474
      }
553 chandransh 26475
      oprot.writeFieldStop();
26476
      oprot.writeStructEnd();
26477
    }
26478
 
26479
    @Override
26480
    public String toString() {
688 chandransh 26481
      StringBuilder sb = new StringBuilder("resetCart_result(");
553 chandransh 26482
      boolean first = true;
26483
 
688 chandransh 26484
      sb.append("success:");
26485
      sb.append(this.success);
26486
      first = false;
26487
      if (!first) sb.append(", ");
26488
      sb.append("scex:");
26489
      if (this.scex == null) {
26490
        sb.append("null");
26491
      } else {
26492
        sb.append(this.scex);
26493
      }
26494
      first = false;
553 chandransh 26495
      sb.append(")");
26496
      return sb.toString();
26497
    }
26498
 
26499
    public void validate() throws TException {
26500
      // check for required fields
26501
    }
26502
 
26503
  }
26504
 
771 rajveer 26505
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
26506
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
553 chandransh 26507
 
771 rajveer 26508
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 26509
 
26510
    private long userId;
26511
 
26512
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26513
    public enum _Fields implements TFieldIdEnum {
771 rajveer 26514
      USER_ID((short)1, "userId");
553 chandransh 26515
 
26516
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26517
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26518
 
26519
      static {
26520
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26521
          byId.put((int)field._thriftId, field);
26522
          byName.put(field.getFieldName(), field);
26523
        }
26524
      }
26525
 
26526
      /**
26527
       * Find the _Fields constant that matches fieldId, or null if its not found.
26528
       */
26529
      public static _Fields findByThriftId(int fieldId) {
26530
        return byId.get(fieldId);
26531
      }
26532
 
26533
      /**
26534
       * Find the _Fields constant that matches fieldId, throwing an exception
26535
       * if it is not found.
26536
       */
26537
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26538
        _Fields fields = findByThriftId(fieldId);
26539
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26540
        return fields;
26541
      }
26542
 
26543
      /**
26544
       * Find the _Fields constant that matches name, or null if its not found.
26545
       */
26546
      public static _Fields findByName(String name) {
26547
        return byName.get(name);
26548
      }
26549
 
26550
      private final short _thriftId;
26551
      private final String _fieldName;
26552
 
26553
      _Fields(short thriftId, String fieldName) {
26554
        _thriftId = thriftId;
26555
        _fieldName = fieldName;
26556
      }
26557
 
26558
      public short getThriftFieldId() {
26559
        return _thriftId;
26560
      }
26561
 
26562
      public String getFieldName() {
26563
        return _fieldName;
26564
      }
26565
    }
26566
 
26567
    // isset id assignments
26568
    private static final int __USERID_ISSET_ID = 0;
771 rajveer 26569
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 26570
 
26571
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26572
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
26573
          new FieldValueMetaData(TType.I64)));
26574
    }});
26575
 
26576
    static {
771 rajveer 26577
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
553 chandransh 26578
    }
26579
 
771 rajveer 26580
    public getMyResearch_args() {
553 chandransh 26581
    }
26582
 
771 rajveer 26583
    public getMyResearch_args(
26584
      long userId)
553 chandransh 26585
    {
26586
      this();
26587
      this.userId = userId;
26588
      setUserIdIsSet(true);
26589
    }
26590
 
26591
    /**
26592
     * Performs a deep copy on <i>other</i>.
26593
     */
771 rajveer 26594
    public getMyResearch_args(getMyResearch_args other) {
553 chandransh 26595
      __isset_bit_vector.clear();
26596
      __isset_bit_vector.or(other.__isset_bit_vector);
26597
      this.userId = other.userId;
26598
    }
26599
 
771 rajveer 26600
    public getMyResearch_args deepCopy() {
26601
      return new getMyResearch_args(this);
553 chandransh 26602
    }
26603
 
26604
    @Deprecated
771 rajveer 26605
    public getMyResearch_args clone() {
26606
      return new getMyResearch_args(this);
553 chandransh 26607
    }
26608
 
26609
    public long getUserId() {
26610
      return this.userId;
26611
    }
26612
 
771 rajveer 26613
    public getMyResearch_args setUserId(long userId) {
553 chandransh 26614
      this.userId = userId;
26615
      setUserIdIsSet(true);
26616
      return this;
26617
    }
26618
 
26619
    public void unsetUserId() {
26620
      __isset_bit_vector.clear(__USERID_ISSET_ID);
26621
    }
26622
 
26623
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
26624
    public boolean isSetUserId() {
26625
      return __isset_bit_vector.get(__USERID_ISSET_ID);
26626
    }
26627
 
26628
    public void setUserIdIsSet(boolean value) {
26629
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
26630
    }
26631
 
48 ashish 26632
    public void setFieldValue(_Fields field, Object value) {
26633
      switch (field) {
553 chandransh 26634
      case USER_ID:
48 ashish 26635
        if (value == null) {
553 chandransh 26636
          unsetUserId();
48 ashish 26637
        } else {
553 chandransh 26638
          setUserId((Long)value);
48 ashish 26639
        }
26640
        break;
26641
 
26642
      }
26643
    }
26644
 
26645
    public void setFieldValue(int fieldID, Object value) {
26646
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26647
    }
26648
 
26649
    public Object getFieldValue(_Fields field) {
26650
      switch (field) {
553 chandransh 26651
      case USER_ID:
26652
        return new Long(getUserId());
48 ashish 26653
 
26654
      }
26655
      throw new IllegalStateException();
26656
    }
26657
 
26658
    public Object getFieldValue(int fieldId) {
26659
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26660
    }
26661
 
26662
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26663
    public boolean isSet(_Fields field) {
26664
      switch (field) {
553 chandransh 26665
      case USER_ID:
26666
        return isSetUserId();
48 ashish 26667
      }
26668
      throw new IllegalStateException();
26669
    }
26670
 
26671
    public boolean isSet(int fieldID) {
26672
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26673
    }
26674
 
26675
    @Override
26676
    public boolean equals(Object that) {
26677
      if (that == null)
26678
        return false;
771 rajveer 26679
      if (that instanceof getMyResearch_args)
26680
        return this.equals((getMyResearch_args)that);
48 ashish 26681
      return false;
26682
    }
26683
 
771 rajveer 26684
    public boolean equals(getMyResearch_args that) {
48 ashish 26685
      if (that == null)
26686
        return false;
26687
 
553 chandransh 26688
      boolean this_present_userId = true;
26689
      boolean that_present_userId = true;
26690
      if (this_present_userId || that_present_userId) {
26691
        if (!(this_present_userId && that_present_userId))
48 ashish 26692
          return false;
553 chandransh 26693
        if (this.userId != that.userId)
48 ashish 26694
          return false;
26695
      }
26696
 
26697
      return true;
26698
    }
26699
 
26700
    @Override
26701
    public int hashCode() {
26702
      return 0;
26703
    }
26704
 
771 rajveer 26705
    public int compareTo(getMyResearch_args other) {
48 ashish 26706
      if (!getClass().equals(other.getClass())) {
26707
        return getClass().getName().compareTo(other.getClass().getName());
26708
      }
26709
 
26710
      int lastComparison = 0;
771 rajveer 26711
      getMyResearch_args typedOther = (getMyResearch_args)other;
48 ashish 26712
 
553 chandransh 26713
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 26714
      if (lastComparison != 0) {
26715
        return lastComparison;
26716
      }
553 chandransh 26717
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 26718
      if (lastComparison != 0) {
26719
        return lastComparison;
26720
      }
26721
      return 0;
26722
    }
26723
 
26724
    public void read(TProtocol iprot) throws TException {
26725
      TField field;
26726
      iprot.readStructBegin();
26727
      while (true)
26728
      {
26729
        field = iprot.readFieldBegin();
26730
        if (field.type == TType.STOP) { 
26731
          break;
26732
        }
26733
        _Fields fieldId = _Fields.findByThriftId(field.id);
26734
        if (fieldId == null) {
26735
          TProtocolUtil.skip(iprot, field.type);
26736
        } else {
26737
          switch (fieldId) {
553 chandransh 26738
            case USER_ID:
26739
              if (field.type == TType.I64) {
26740
                this.userId = iprot.readI64();
26741
                setUserIdIsSet(true);
48 ashish 26742
              } else { 
26743
                TProtocolUtil.skip(iprot, field.type);
26744
              }
26745
              break;
26746
          }
26747
          iprot.readFieldEnd();
26748
        }
26749
      }
26750
      iprot.readStructEnd();
26751
      validate();
26752
    }
26753
 
26754
    public void write(TProtocol oprot) throws TException {
26755
      validate();
26756
 
26757
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 26758
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
26759
      oprot.writeI64(this.userId);
26760
      oprot.writeFieldEnd();
26761
      oprot.writeFieldStop();
26762
      oprot.writeStructEnd();
26763
    }
26764
 
26765
    @Override
26766
    public String toString() {
771 rajveer 26767
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
553 chandransh 26768
      boolean first = true;
26769
 
26770
      sb.append("userId:");
26771
      sb.append(this.userId);
26772
      first = false;
26773
      sb.append(")");
26774
      return sb.toString();
26775
    }
26776
 
26777
    public void validate() throws TException {
26778
      // check for required fields
26779
    }
26780
 
26781
  }
26782
 
26783
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
26784
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
26785
 
26786
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
26787
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
26788
 
26789
    private Widget success;
26790
    private WidgetException scx;
26791
 
26792
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26793
    public enum _Fields implements TFieldIdEnum {
26794
      SUCCESS((short)0, "success"),
26795
      SCX((short)1, "scx");
26796
 
26797
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26798
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26799
 
26800
      static {
26801
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26802
          byId.put((int)field._thriftId, field);
26803
          byName.put(field.getFieldName(), field);
26804
        }
26805
      }
26806
 
26807
      /**
26808
       * Find the _Fields constant that matches fieldId, or null if its not found.
26809
       */
26810
      public static _Fields findByThriftId(int fieldId) {
26811
        return byId.get(fieldId);
26812
      }
26813
 
26814
      /**
26815
       * Find the _Fields constant that matches fieldId, throwing an exception
26816
       * if it is not found.
26817
       */
26818
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26819
        _Fields fields = findByThriftId(fieldId);
26820
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26821
        return fields;
26822
      }
26823
 
26824
      /**
26825
       * Find the _Fields constant that matches name, or null if its not found.
26826
       */
26827
      public static _Fields findByName(String name) {
26828
        return byName.get(name);
26829
      }
26830
 
26831
      private final short _thriftId;
26832
      private final String _fieldName;
26833
 
26834
      _Fields(short thriftId, String fieldName) {
26835
        _thriftId = thriftId;
26836
        _fieldName = fieldName;
26837
      }
26838
 
26839
      public short getThriftFieldId() {
26840
        return _thriftId;
26841
      }
26842
 
26843
      public String getFieldName() {
26844
        return _fieldName;
26845
      }
26846
    }
26847
 
26848
    // isset id assignments
26849
 
26850
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 26851
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 26852
          new StructMetaData(TType.STRUCT, Widget.class)));
26853
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 26854
          new FieldValueMetaData(TType.STRUCT)));
26855
    }});
26856
 
26857
    static {
553 chandransh 26858
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 26859
    }
26860
 
553 chandransh 26861
    public getMyResearch_result() {
48 ashish 26862
    }
26863
 
553 chandransh 26864
    public getMyResearch_result(
26865
      Widget success,
26866
      WidgetException scx)
48 ashish 26867
    {
26868
      this();
26869
      this.success = success;
553 chandransh 26870
      this.scx = scx;
48 ashish 26871
    }
26872
 
26873
    /**
26874
     * Performs a deep copy on <i>other</i>.
26875
     */
553 chandransh 26876
    public getMyResearch_result(getMyResearch_result other) {
26877
      if (other.isSetSuccess()) {
26878
        this.success = new Widget(other.success);
48 ashish 26879
      }
553 chandransh 26880
      if (other.isSetScx()) {
26881
        this.scx = new WidgetException(other.scx);
26882
      }
48 ashish 26883
    }
26884
 
553 chandransh 26885
    public getMyResearch_result deepCopy() {
26886
      return new getMyResearch_result(this);
48 ashish 26887
    }
26888
 
26889
    @Deprecated
553 chandransh 26890
    public getMyResearch_result clone() {
26891
      return new getMyResearch_result(this);
48 ashish 26892
    }
26893
 
553 chandransh 26894
    public Widget getSuccess() {
48 ashish 26895
      return this.success;
26896
    }
26897
 
553 chandransh 26898
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 26899
      this.success = success;
26900
      return this;
26901
    }
26902
 
26903
    public void unsetSuccess() {
553 chandransh 26904
      this.success = null;
48 ashish 26905
    }
26906
 
26907
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26908
    public boolean isSetSuccess() {
553 chandransh 26909
      return this.success != null;
48 ashish 26910
    }
26911
 
26912
    public void setSuccessIsSet(boolean value) {
553 chandransh 26913
      if (!value) {
26914
        this.success = null;
26915
      }
48 ashish 26916
    }
26917
 
553 chandransh 26918
    public WidgetException getScx() {
26919
      return this.scx;
48 ashish 26920
    }
26921
 
553 chandransh 26922
    public getMyResearch_result setScx(WidgetException scx) {
26923
      this.scx = scx;
48 ashish 26924
      return this;
26925
    }
26926
 
553 chandransh 26927
    public void unsetScx() {
26928
      this.scx = null;
48 ashish 26929
    }
26930
 
553 chandransh 26931
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26932
    public boolean isSetScx() {
26933
      return this.scx != null;
48 ashish 26934
    }
26935
 
553 chandransh 26936
    public void setScxIsSet(boolean value) {
48 ashish 26937
      if (!value) {
553 chandransh 26938
        this.scx = null;
48 ashish 26939
      }
26940
    }
26941
 
26942
    public void setFieldValue(_Fields field, Object value) {
26943
      switch (field) {
26944
      case SUCCESS:
26945
        if (value == null) {
26946
          unsetSuccess();
26947
        } else {
553 chandransh 26948
          setSuccess((Widget)value);
48 ashish 26949
        }
26950
        break;
26951
 
553 chandransh 26952
      case SCX:
48 ashish 26953
        if (value == null) {
553 chandransh 26954
          unsetScx();
48 ashish 26955
        } else {
553 chandransh 26956
          setScx((WidgetException)value);
48 ashish 26957
        }
26958
        break;
26959
 
26960
      }
26961
    }
26962
 
26963
    public void setFieldValue(int fieldID, Object value) {
26964
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26965
    }
26966
 
26967
    public Object getFieldValue(_Fields field) {
26968
      switch (field) {
26969
      case SUCCESS:
553 chandransh 26970
        return getSuccess();
48 ashish 26971
 
553 chandransh 26972
      case SCX:
26973
        return getScx();
48 ashish 26974
 
26975
      }
26976
      throw new IllegalStateException();
26977
    }
26978
 
26979
    public Object getFieldValue(int fieldId) {
26980
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26981
    }
26982
 
26983
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26984
    public boolean isSet(_Fields field) {
26985
      switch (field) {
26986
      case SUCCESS:
26987
        return isSetSuccess();
553 chandransh 26988
      case SCX:
26989
        return isSetScx();
48 ashish 26990
      }
26991
      throw new IllegalStateException();
26992
    }
26993
 
26994
    public boolean isSet(int fieldID) {
26995
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26996
    }
26997
 
26998
    @Override
26999
    public boolean equals(Object that) {
27000
      if (that == null)
27001
        return false;
553 chandransh 27002
      if (that instanceof getMyResearch_result)
27003
        return this.equals((getMyResearch_result)that);
48 ashish 27004
      return false;
27005
    }
27006
 
553 chandransh 27007
    public boolean equals(getMyResearch_result that) {
48 ashish 27008
      if (that == null)
27009
        return false;
27010
 
553 chandransh 27011
      boolean this_present_success = true && this.isSetSuccess();
27012
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 27013
      if (this_present_success || that_present_success) {
27014
        if (!(this_present_success && that_present_success))
27015
          return false;
553 chandransh 27016
        if (!this.success.equals(that.success))
48 ashish 27017
          return false;
27018
      }
27019
 
553 chandransh 27020
      boolean this_present_scx = true && this.isSetScx();
27021
      boolean that_present_scx = true && that.isSetScx();
27022
      if (this_present_scx || that_present_scx) {
27023
        if (!(this_present_scx && that_present_scx))
48 ashish 27024
          return false;
553 chandransh 27025
        if (!this.scx.equals(that.scx))
48 ashish 27026
          return false;
27027
      }
27028
 
27029
      return true;
27030
    }
27031
 
27032
    @Override
27033
    public int hashCode() {
27034
      return 0;
27035
    }
27036
 
553 chandransh 27037
    public int compareTo(getMyResearch_result other) {
48 ashish 27038
      if (!getClass().equals(other.getClass())) {
27039
        return getClass().getName().compareTo(other.getClass().getName());
27040
      }
27041
 
27042
      int lastComparison = 0;
553 chandransh 27043
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 27044
 
27045
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27046
      if (lastComparison != 0) {
27047
        return lastComparison;
27048
      }
27049
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27050
      if (lastComparison != 0) {
27051
        return lastComparison;
27052
      }
553 chandransh 27053
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 27054
      if (lastComparison != 0) {
27055
        return lastComparison;
27056
      }
553 chandransh 27057
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 27058
      if (lastComparison != 0) {
27059
        return lastComparison;
27060
      }
27061
      return 0;
27062
    }
27063
 
27064
    public void read(TProtocol iprot) throws TException {
27065
      TField field;
27066
      iprot.readStructBegin();
27067
      while (true)
27068
      {
27069
        field = iprot.readFieldBegin();
27070
        if (field.type == TType.STOP) { 
27071
          break;
27072
        }
27073
        _Fields fieldId = _Fields.findByThriftId(field.id);
27074
        if (fieldId == null) {
27075
          TProtocolUtil.skip(iprot, field.type);
27076
        } else {
27077
          switch (fieldId) {
27078
            case SUCCESS:
553 chandransh 27079
              if (field.type == TType.STRUCT) {
27080
                this.success = new Widget();
27081
                this.success.read(iprot);
48 ashish 27082
              } else { 
27083
                TProtocolUtil.skip(iprot, field.type);
27084
              }
27085
              break;
553 chandransh 27086
            case SCX:
48 ashish 27087
              if (field.type == TType.STRUCT) {
553 chandransh 27088
                this.scx = new WidgetException();
27089
                this.scx.read(iprot);
48 ashish 27090
              } else { 
27091
                TProtocolUtil.skip(iprot, field.type);
27092
              }
27093
              break;
27094
          }
27095
          iprot.readFieldEnd();
27096
        }
27097
      }
27098
      iprot.readStructEnd();
27099
      validate();
27100
    }
27101
 
27102
    public void write(TProtocol oprot) throws TException {
27103
      oprot.writeStructBegin(STRUCT_DESC);
27104
 
27105
      if (this.isSetSuccess()) {
27106
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 27107
        this.success.write(oprot);
48 ashish 27108
        oprot.writeFieldEnd();
553 chandransh 27109
      } else if (this.isSetScx()) {
27110
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27111
        this.scx.write(oprot);
48 ashish 27112
        oprot.writeFieldEnd();
27113
      }
27114
      oprot.writeFieldStop();
27115
      oprot.writeStructEnd();
27116
    }
27117
 
27118
    @Override
27119
    public String toString() {
553 chandransh 27120
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 27121
      boolean first = true;
27122
 
27123
      sb.append("success:");
553 chandransh 27124
      if (this.success == null) {
27125
        sb.append("null");
27126
      } else {
27127
        sb.append(this.success);
27128
      }
48 ashish 27129
      first = false;
27130
      if (!first) sb.append(", ");
553 chandransh 27131
      sb.append("scx:");
27132
      if (this.scx == null) {
48 ashish 27133
        sb.append("null");
27134
      } else {
553 chandransh 27135
        sb.append(this.scx);
48 ashish 27136
      }
27137
      first = false;
27138
      sb.append(")");
27139
      return sb.toString();
27140
    }
27141
 
27142
    public void validate() throws TException {
27143
      // check for required fields
27144
    }
27145
 
27146
  }
27147
 
553 chandransh 27148
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
27149
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 27150
 
771 rajveer 27151
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
27152
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 27153
 
771 rajveer 27154
    private long userId;
27155
    private long itemId;
130 ashish 27156
 
27157
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27158
    public enum _Fields implements TFieldIdEnum {
771 rajveer 27159
      USER_ID((short)1, "userId"),
27160
      ITEM_ID((short)2, "itemId");
130 ashish 27161
 
27162
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27163
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27164
 
27165
      static {
27166
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27167
          byId.put((int)field._thriftId, field);
27168
          byName.put(field.getFieldName(), field);
27169
        }
27170
      }
27171
 
27172
      /**
27173
       * Find the _Fields constant that matches fieldId, or null if its not found.
27174
       */
27175
      public static _Fields findByThriftId(int fieldId) {
27176
        return byId.get(fieldId);
27177
      }
27178
 
27179
      /**
27180
       * Find the _Fields constant that matches fieldId, throwing an exception
27181
       * if it is not found.
27182
       */
27183
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27184
        _Fields fields = findByThriftId(fieldId);
27185
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27186
        return fields;
27187
      }
27188
 
27189
      /**
27190
       * Find the _Fields constant that matches name, or null if its not found.
27191
       */
27192
      public static _Fields findByName(String name) {
27193
        return byName.get(name);
27194
      }
27195
 
27196
      private final short _thriftId;
27197
      private final String _fieldName;
27198
 
27199
      _Fields(short thriftId, String fieldName) {
27200
        _thriftId = thriftId;
27201
        _fieldName = fieldName;
27202
      }
27203
 
27204
      public short getThriftFieldId() {
27205
        return _thriftId;
27206
      }
27207
 
27208
      public String getFieldName() {
27209
        return _fieldName;
27210
      }
27211
    }
27212
 
27213
    // isset id assignments
771 rajveer 27214
    private static final int __USERID_ISSET_ID = 0;
27215
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 27216
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 27217
 
27218
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 27219
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
130 ashish 27220
          new FieldValueMetaData(TType.I64)));
771 rajveer 27221
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 27222
          new FieldValueMetaData(TType.I64)));
130 ashish 27223
    }});
27224
 
27225
    static {
553 chandransh 27226
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 27227
    }
27228
 
553 chandransh 27229
    public updateMyResearch_args() {
130 ashish 27230
    }
27231
 
553 chandransh 27232
    public updateMyResearch_args(
771 rajveer 27233
      long userId,
27234
      long itemId)
130 ashish 27235
    {
27236
      this();
771 rajveer 27237
      this.userId = userId;
27238
      setUserIdIsSet(true);
27239
      this.itemId = itemId;
27240
      setItemIdIsSet(true);
130 ashish 27241
    }
27242
 
27243
    /**
27244
     * Performs a deep copy on <i>other</i>.
27245
     */
553 chandransh 27246
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 27247
      __isset_bit_vector.clear();
27248
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 27249
      this.userId = other.userId;
27250
      this.itemId = other.itemId;
130 ashish 27251
    }
27252
 
553 chandransh 27253
    public updateMyResearch_args deepCopy() {
27254
      return new updateMyResearch_args(this);
130 ashish 27255
    }
27256
 
27257
    @Deprecated
553 chandransh 27258
    public updateMyResearch_args clone() {
27259
      return new updateMyResearch_args(this);
130 ashish 27260
    }
27261
 
771 rajveer 27262
    public long getUserId() {
27263
      return this.userId;
130 ashish 27264
    }
27265
 
771 rajveer 27266
    public updateMyResearch_args setUserId(long userId) {
27267
      this.userId = userId;
27268
      setUserIdIsSet(true);
130 ashish 27269
      return this;
27270
    }
27271
 
771 rajveer 27272
    public void unsetUserId() {
27273
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 27274
    }
27275
 
771 rajveer 27276
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
27277
    public boolean isSetUserId() {
27278
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 27279
    }
27280
 
771 rajveer 27281
    public void setUserIdIsSet(boolean value) {
27282
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 27283
    }
27284
 
771 rajveer 27285
    public long getItemId() {
27286
      return this.itemId;
553 chandransh 27287
    }
27288
 
771 rajveer 27289
    public updateMyResearch_args setItemId(long itemId) {
27290
      this.itemId = itemId;
27291
      setItemIdIsSet(true);
553 chandransh 27292
      return this;
27293
    }
27294
 
771 rajveer 27295
    public void unsetItemId() {
27296
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 27297
    }
27298
 
771 rajveer 27299
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
27300
    public boolean isSetItemId() {
27301
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 27302
    }
27303
 
771 rajveer 27304
    public void setItemIdIsSet(boolean value) {
27305
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 27306
    }
27307
 
130 ashish 27308
    public void setFieldValue(_Fields field, Object value) {
27309
      switch (field) {
553 chandransh 27310
      case USER_ID:
130 ashish 27311
        if (value == null) {
771 rajveer 27312
          unsetUserId();
130 ashish 27313
        } else {
771 rajveer 27314
          setUserId((Long)value);
130 ashish 27315
        }
27316
        break;
27317
 
553 chandransh 27318
      case ITEM_ID:
27319
        if (value == null) {
771 rajveer 27320
          unsetItemId();
553 chandransh 27321
        } else {
771 rajveer 27322
          setItemId((Long)value);
553 chandransh 27323
        }
27324
        break;
27325
 
130 ashish 27326
      }
27327
    }
27328
 
27329
    public void setFieldValue(int fieldID, Object value) {
27330
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27331
    }
27332
 
27333
    public Object getFieldValue(_Fields field) {
27334
      switch (field) {
553 chandransh 27335
      case USER_ID:
771 rajveer 27336
        return new Long(getUserId());
130 ashish 27337
 
553 chandransh 27338
      case ITEM_ID:
771 rajveer 27339
        return new Long(getItemId());
553 chandransh 27340
 
130 ashish 27341
      }
27342
      throw new IllegalStateException();
27343
    }
27344
 
27345
    public Object getFieldValue(int fieldId) {
27346
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27347
    }
27348
 
27349
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27350
    public boolean isSet(_Fields field) {
27351
      switch (field) {
553 chandransh 27352
      case USER_ID:
771 rajveer 27353
        return isSetUserId();
553 chandransh 27354
      case ITEM_ID:
771 rajveer 27355
        return isSetItemId();
130 ashish 27356
      }
27357
      throw new IllegalStateException();
27358
    }
27359
 
27360
    public boolean isSet(int fieldID) {
27361
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27362
    }
27363
 
27364
    @Override
27365
    public boolean equals(Object that) {
27366
      if (that == null)
27367
        return false;
553 chandransh 27368
      if (that instanceof updateMyResearch_args)
27369
        return this.equals((updateMyResearch_args)that);
130 ashish 27370
      return false;
27371
    }
27372
 
553 chandransh 27373
    public boolean equals(updateMyResearch_args that) {
130 ashish 27374
      if (that == null)
27375
        return false;
27376
 
771 rajveer 27377
      boolean this_present_userId = true;
27378
      boolean that_present_userId = true;
27379
      if (this_present_userId || that_present_userId) {
27380
        if (!(this_present_userId && that_present_userId))
130 ashish 27381
          return false;
771 rajveer 27382
        if (this.userId != that.userId)
130 ashish 27383
          return false;
27384
      }
27385
 
771 rajveer 27386
      boolean this_present_itemId = true;
27387
      boolean that_present_itemId = true;
27388
      if (this_present_itemId || that_present_itemId) {
27389
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 27390
          return false;
771 rajveer 27391
        if (this.itemId != that.itemId)
553 chandransh 27392
          return false;
27393
      }
27394
 
130 ashish 27395
      return true;
27396
    }
27397
 
27398
    @Override
27399
    public int hashCode() {
27400
      return 0;
27401
    }
27402
 
553 chandransh 27403
    public int compareTo(updateMyResearch_args other) {
130 ashish 27404
      if (!getClass().equals(other.getClass())) {
27405
        return getClass().getName().compareTo(other.getClass().getName());
27406
      }
27407
 
27408
      int lastComparison = 0;
553 chandransh 27409
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 27410
 
771 rajveer 27411
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 27412
      if (lastComparison != 0) {
27413
        return lastComparison;
27414
      }
771 rajveer 27415
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 27416
      if (lastComparison != 0) {
27417
        return lastComparison;
27418
      }
771 rajveer 27419
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 27420
      if (lastComparison != 0) {
27421
        return lastComparison;
27422
      }
771 rajveer 27423
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 27424
      if (lastComparison != 0) {
27425
        return lastComparison;
27426
      }
130 ashish 27427
      return 0;
27428
    }
27429
 
27430
    public void read(TProtocol iprot) throws TException {
27431
      TField field;
27432
      iprot.readStructBegin();
27433
      while (true)
27434
      {
27435
        field = iprot.readFieldBegin();
27436
        if (field.type == TType.STOP) { 
27437
          break;
27438
        }
27439
        _Fields fieldId = _Fields.findByThriftId(field.id);
27440
        if (fieldId == null) {
27441
          TProtocolUtil.skip(iprot, field.type);
27442
        } else {
27443
          switch (fieldId) {
553 chandransh 27444
            case USER_ID:
130 ashish 27445
              if (field.type == TType.I64) {
771 rajveer 27446
                this.userId = iprot.readI64();
27447
                setUserIdIsSet(true);
130 ashish 27448
              } else { 
27449
                TProtocolUtil.skip(iprot, field.type);
27450
              }
27451
              break;
553 chandransh 27452
            case ITEM_ID:
27453
              if (field.type == TType.I64) {
771 rajveer 27454
                this.itemId = iprot.readI64();
27455
                setItemIdIsSet(true);
553 chandransh 27456
              } else { 
27457
                TProtocolUtil.skip(iprot, field.type);
27458
              }
27459
              break;
130 ashish 27460
          }
27461
          iprot.readFieldEnd();
27462
        }
27463
      }
27464
      iprot.readStructEnd();
27465
      validate();
27466
    }
27467
 
27468
    public void write(TProtocol oprot) throws TException {
27469
      validate();
27470
 
27471
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 27472
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 27473
      oprot.writeI64(this.userId);
130 ashish 27474
      oprot.writeFieldEnd();
553 chandransh 27475
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 27476
      oprot.writeI64(this.itemId);
553 chandransh 27477
      oprot.writeFieldEnd();
130 ashish 27478
      oprot.writeFieldStop();
27479
      oprot.writeStructEnd();
27480
    }
27481
 
27482
    @Override
27483
    public String toString() {
553 chandransh 27484
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 27485
      boolean first = true;
27486
 
771 rajveer 27487
      sb.append("userId:");
27488
      sb.append(this.userId);
130 ashish 27489
      first = false;
553 chandransh 27490
      if (!first) sb.append(", ");
771 rajveer 27491
      sb.append("itemId:");
27492
      sb.append(this.itemId);
553 chandransh 27493
      first = false;
130 ashish 27494
      sb.append(")");
27495
      return sb.toString();
27496
    }
27497
 
27498
    public void validate() throws TException {
27499
      // check for required fields
27500
    }
27501
 
27502
  }
27503
 
553 chandransh 27504
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
27505
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 27506
 
27507
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 27508
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 27509
 
27510
    private boolean success;
553 chandransh 27511
    private WidgetException scx;
130 ashish 27512
 
27513
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27514
    public enum _Fields implements TFieldIdEnum {
27515
      SUCCESS((short)0, "success"),
553 chandransh 27516
      SCX((short)1, "scx");
130 ashish 27517
 
27518
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27519
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27520
 
27521
      static {
27522
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27523
          byId.put((int)field._thriftId, field);
27524
          byName.put(field.getFieldName(), field);
27525
        }
27526
      }
27527
 
27528
      /**
27529
       * Find the _Fields constant that matches fieldId, or null if its not found.
27530
       */
27531
      public static _Fields findByThriftId(int fieldId) {
27532
        return byId.get(fieldId);
27533
      }
27534
 
27535
      /**
27536
       * Find the _Fields constant that matches fieldId, throwing an exception
27537
       * if it is not found.
27538
       */
27539
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27540
        _Fields fields = findByThriftId(fieldId);
27541
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27542
        return fields;
27543
      }
27544
 
27545
      /**
27546
       * Find the _Fields constant that matches name, or null if its not found.
27547
       */
27548
      public static _Fields findByName(String name) {
27549
        return byName.get(name);
27550
      }
27551
 
27552
      private final short _thriftId;
27553
      private final String _fieldName;
27554
 
27555
      _Fields(short thriftId, String fieldName) {
27556
        _thriftId = thriftId;
27557
        _fieldName = fieldName;
27558
      }
27559
 
27560
      public short getThriftFieldId() {
27561
        return _thriftId;
27562
      }
27563
 
27564
      public String getFieldName() {
27565
        return _fieldName;
27566
      }
27567
    }
27568
 
27569
    // isset id assignments
27570
    private static final int __SUCCESS_ISSET_ID = 0;
27571
    private BitSet __isset_bit_vector = new BitSet(1);
27572
 
27573
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27574
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27575
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 27576
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 27577
          new FieldValueMetaData(TType.STRUCT)));
27578
    }});
27579
 
27580
    static {
553 chandransh 27581
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 27582
    }
27583
 
553 chandransh 27584
    public updateMyResearch_result() {
130 ashish 27585
    }
27586
 
553 chandransh 27587
    public updateMyResearch_result(
130 ashish 27588
      boolean success,
553 chandransh 27589
      WidgetException scx)
130 ashish 27590
    {
27591
      this();
27592
      this.success = success;
27593
      setSuccessIsSet(true);
553 chandransh 27594
      this.scx = scx;
130 ashish 27595
    }
27596
 
27597
    /**
27598
     * Performs a deep copy on <i>other</i>.
27599
     */
553 chandransh 27600
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 27601
      __isset_bit_vector.clear();
27602
      __isset_bit_vector.or(other.__isset_bit_vector);
27603
      this.success = other.success;
553 chandransh 27604
      if (other.isSetScx()) {
27605
        this.scx = new WidgetException(other.scx);
130 ashish 27606
      }
27607
    }
27608
 
553 chandransh 27609
    public updateMyResearch_result deepCopy() {
27610
      return new updateMyResearch_result(this);
130 ashish 27611
    }
27612
 
27613
    @Deprecated
553 chandransh 27614
    public updateMyResearch_result clone() {
27615
      return new updateMyResearch_result(this);
130 ashish 27616
    }
27617
 
27618
    public boolean isSuccess() {
27619
      return this.success;
27620
    }
27621
 
553 chandransh 27622
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 27623
      this.success = success;
27624
      setSuccessIsSet(true);
27625
      return this;
27626
    }
27627
 
27628
    public void unsetSuccess() {
27629
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27630
    }
27631
 
27632
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27633
    public boolean isSetSuccess() {
27634
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27635
    }
27636
 
27637
    public void setSuccessIsSet(boolean value) {
27638
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27639
    }
27640
 
553 chandransh 27641
    public WidgetException getScx() {
27642
      return this.scx;
130 ashish 27643
    }
27644
 
553 chandransh 27645
    public updateMyResearch_result setScx(WidgetException scx) {
27646
      this.scx = scx;
130 ashish 27647
      return this;
27648
    }
27649
 
553 chandransh 27650
    public void unsetScx() {
27651
      this.scx = null;
130 ashish 27652
    }
27653
 
553 chandransh 27654
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
27655
    public boolean isSetScx() {
27656
      return this.scx != null;
130 ashish 27657
    }
27658
 
553 chandransh 27659
    public void setScxIsSet(boolean value) {
130 ashish 27660
      if (!value) {
553 chandransh 27661
        this.scx = null;
130 ashish 27662
      }
27663
    }
27664
 
27665
    public void setFieldValue(_Fields field, Object value) {
27666
      switch (field) {
27667
      case SUCCESS:
27668
        if (value == null) {
27669
          unsetSuccess();
27670
        } else {
27671
          setSuccess((Boolean)value);
27672
        }
27673
        break;
27674
 
553 chandransh 27675
      case SCX:
130 ashish 27676
        if (value == null) {
553 chandransh 27677
          unsetScx();
130 ashish 27678
        } else {
553 chandransh 27679
          setScx((WidgetException)value);
130 ashish 27680
        }
27681
        break;
27682
 
27683
      }
27684
    }
27685
 
27686
    public void setFieldValue(int fieldID, Object value) {
27687
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27688
    }
27689
 
27690
    public Object getFieldValue(_Fields field) {
27691
      switch (field) {
27692
      case SUCCESS:
27693
        return new Boolean(isSuccess());
27694
 
553 chandransh 27695
      case SCX:
27696
        return getScx();
130 ashish 27697
 
27698
      }
27699
      throw new IllegalStateException();
27700
    }
27701
 
27702
    public Object getFieldValue(int fieldId) {
27703
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27704
    }
27705
 
27706
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27707
    public boolean isSet(_Fields field) {
27708
      switch (field) {
27709
      case SUCCESS:
27710
        return isSetSuccess();
553 chandransh 27711
      case SCX:
27712
        return isSetScx();
130 ashish 27713
      }
27714
      throw new IllegalStateException();
27715
    }
27716
 
27717
    public boolean isSet(int fieldID) {
27718
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27719
    }
27720
 
27721
    @Override
27722
    public boolean equals(Object that) {
27723
      if (that == null)
27724
        return false;
553 chandransh 27725
      if (that instanceof updateMyResearch_result)
27726
        return this.equals((updateMyResearch_result)that);
130 ashish 27727
      return false;
27728
    }
27729
 
553 chandransh 27730
    public boolean equals(updateMyResearch_result that) {
130 ashish 27731
      if (that == null)
27732
        return false;
27733
 
27734
      boolean this_present_success = true;
27735
      boolean that_present_success = true;
27736
      if (this_present_success || that_present_success) {
27737
        if (!(this_present_success && that_present_success))
27738
          return false;
27739
        if (this.success != that.success)
27740
          return false;
27741
      }
27742
 
553 chandransh 27743
      boolean this_present_scx = true && this.isSetScx();
27744
      boolean that_present_scx = true && that.isSetScx();
27745
      if (this_present_scx || that_present_scx) {
27746
        if (!(this_present_scx && that_present_scx))
130 ashish 27747
          return false;
553 chandransh 27748
        if (!this.scx.equals(that.scx))
130 ashish 27749
          return false;
27750
      }
27751
 
27752
      return true;
27753
    }
27754
 
27755
    @Override
27756
    public int hashCode() {
27757
      return 0;
27758
    }
27759
 
553 chandransh 27760
    public int compareTo(updateMyResearch_result other) {
130 ashish 27761
      if (!getClass().equals(other.getClass())) {
27762
        return getClass().getName().compareTo(other.getClass().getName());
27763
      }
27764
 
27765
      int lastComparison = 0;
553 chandransh 27766
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 27767
 
27768
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27769
      if (lastComparison != 0) {
27770
        return lastComparison;
27771
      }
27772
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27773
      if (lastComparison != 0) {
27774
        return lastComparison;
27775
      }
553 chandransh 27776
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 27777
      if (lastComparison != 0) {
27778
        return lastComparison;
27779
      }
553 chandransh 27780
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 27781
      if (lastComparison != 0) {
27782
        return lastComparison;
27783
      }
27784
      return 0;
27785
    }
27786
 
27787
    public void read(TProtocol iprot) throws TException {
27788
      TField field;
27789
      iprot.readStructBegin();
27790
      while (true)
27791
      {
27792
        field = iprot.readFieldBegin();
27793
        if (field.type == TType.STOP) { 
27794
          break;
27795
        }
27796
        _Fields fieldId = _Fields.findByThriftId(field.id);
27797
        if (fieldId == null) {
27798
          TProtocolUtil.skip(iprot, field.type);
27799
        } else {
27800
          switch (fieldId) {
27801
            case SUCCESS:
27802
              if (field.type == TType.BOOL) {
27803
                this.success = iprot.readBool();
27804
                setSuccessIsSet(true);
27805
              } else { 
27806
                TProtocolUtil.skip(iprot, field.type);
27807
              }
27808
              break;
553 chandransh 27809
            case SCX:
130 ashish 27810
              if (field.type == TType.STRUCT) {
553 chandransh 27811
                this.scx = new WidgetException();
27812
                this.scx.read(iprot);
130 ashish 27813
              } else { 
27814
                TProtocolUtil.skip(iprot, field.type);
27815
              }
27816
              break;
27817
          }
27818
          iprot.readFieldEnd();
27819
        }
27820
      }
27821
      iprot.readStructEnd();
27822
      validate();
27823
    }
27824
 
27825
    public void write(TProtocol oprot) throws TException {
27826
      oprot.writeStructBegin(STRUCT_DESC);
27827
 
27828
      if (this.isSetSuccess()) {
27829
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27830
        oprot.writeBool(this.success);
27831
        oprot.writeFieldEnd();
553 chandransh 27832
      } else if (this.isSetScx()) {
27833
        oprot.writeFieldBegin(SCX_FIELD_DESC);
27834
        this.scx.write(oprot);
130 ashish 27835
        oprot.writeFieldEnd();
27836
      }
27837
      oprot.writeFieldStop();
27838
      oprot.writeStructEnd();
27839
    }
27840
 
27841
    @Override
27842
    public String toString() {
553 chandransh 27843
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 27844
      boolean first = true;
27845
 
27846
      sb.append("success:");
27847
      sb.append(this.success);
27848
      first = false;
27849
      if (!first) sb.append(", ");
553 chandransh 27850
      sb.append("scx:");
27851
      if (this.scx == null) {
130 ashish 27852
        sb.append("null");
27853
      } else {
553 chandransh 27854
        sb.append(this.scx);
130 ashish 27855
      }
27856
      first = false;
27857
      sb.append(")");
27858
      return sb.toString();
27859
    }
27860
 
27861
    public void validate() throws TException {
27862
      // check for required fields
27863
    }
27864
 
27865
  }
27866
 
553 chandransh 27867
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
27868
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 27869
 
771 rajveer 27870
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
27871
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 27872
 
771 rajveer 27873
    private long userId;
27874
    private long itemId;
130 ashish 27875
 
27876
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27877
    public enum _Fields implements TFieldIdEnum {
771 rajveer 27878
      USER_ID((short)1, "userId"),
27879
      ITEM_ID((short)2, "itemId");
130 ashish 27880
 
27881
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27882
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27883
 
27884
      static {
27885
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27886
          byId.put((int)field._thriftId, field);
27887
          byName.put(field.getFieldName(), field);
27888
        }
27889
      }
27890
 
27891
      /**
27892
       * Find the _Fields constant that matches fieldId, or null if its not found.
27893
       */
27894
      public static _Fields findByThriftId(int fieldId) {
27895
        return byId.get(fieldId);
27896
      }
27897
 
27898
      /**
27899
       * Find the _Fields constant that matches fieldId, throwing an exception
27900
       * if it is not found.
27901
       */
27902
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27903
        _Fields fields = findByThriftId(fieldId);
27904
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27905
        return fields;
27906
      }
27907
 
27908
      /**
27909
       * Find the _Fields constant that matches name, or null if its not found.
27910
       */
27911
      public static _Fields findByName(String name) {
27912
        return byName.get(name);
27913
      }
27914
 
27915
      private final short _thriftId;
27916
      private final String _fieldName;
27917
 
27918
      _Fields(short thriftId, String fieldName) {
27919
        _thriftId = thriftId;
27920
        _fieldName = fieldName;
27921
      }
27922
 
27923
      public short getThriftFieldId() {
27924
        return _thriftId;
27925
      }
27926
 
27927
      public String getFieldName() {
27928
        return _fieldName;
27929
      }
27930
    }
27931
 
27932
    // isset id assignments
771 rajveer 27933
    private static final int __USERID_ISSET_ID = 0;
27934
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 27935
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 27936
 
27937
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 27938
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 27939
          new FieldValueMetaData(TType.I64)));
771 rajveer 27940
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 27941
          new FieldValueMetaData(TType.I64)));
130 ashish 27942
    }});
27943
 
27944
    static {
553 chandransh 27945
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 27946
    }
27947
 
553 chandransh 27948
    public deleteItemFromMyResearch_args() {
130 ashish 27949
    }
27950
 
553 chandransh 27951
    public deleteItemFromMyResearch_args(
771 rajveer 27952
      long userId,
27953
      long itemId)
130 ashish 27954
    {
27955
      this();
771 rajveer 27956
      this.userId = userId;
27957
      setUserIdIsSet(true);
27958
      this.itemId = itemId;
27959
      setItemIdIsSet(true);
130 ashish 27960
    }
27961
 
27962
    /**
27963
     * Performs a deep copy on <i>other</i>.
27964
     */
553 chandransh 27965
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 27966
      __isset_bit_vector.clear();
27967
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 27968
      this.userId = other.userId;
27969
      this.itemId = other.itemId;
553 chandransh 27970
    }
27971
 
27972
    public deleteItemFromMyResearch_args deepCopy() {
27973
      return new deleteItemFromMyResearch_args(this);
27974
    }
27975
 
27976
    @Deprecated
27977
    public deleteItemFromMyResearch_args clone() {
27978
      return new deleteItemFromMyResearch_args(this);
27979
    }
27980
 
771 rajveer 27981
    public long getUserId() {
27982
      return this.userId;
553 chandransh 27983
    }
27984
 
771 rajveer 27985
    public deleteItemFromMyResearch_args setUserId(long userId) {
27986
      this.userId = userId;
27987
      setUserIdIsSet(true);
553 chandransh 27988
      return this;
27989
    }
27990
 
771 rajveer 27991
    public void unsetUserId() {
27992
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 27993
    }
27994
 
771 rajveer 27995
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
27996
    public boolean isSetUserId() {
27997
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 27998
    }
27999
 
771 rajveer 28000
    public void setUserIdIsSet(boolean value) {
28001
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 28002
    }
28003
 
771 rajveer 28004
    public long getItemId() {
28005
      return this.itemId;
553 chandransh 28006
    }
28007
 
771 rajveer 28008
    public deleteItemFromMyResearch_args setItemId(long itemId) {
28009
      this.itemId = itemId;
28010
      setItemIdIsSet(true);
553 chandransh 28011
      return this;
28012
    }
28013
 
771 rajveer 28014
    public void unsetItemId() {
28015
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 28016
    }
28017
 
771 rajveer 28018
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
28019
    public boolean isSetItemId() {
28020
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 28021
    }
28022
 
771 rajveer 28023
    public void setItemIdIsSet(boolean value) {
28024
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 28025
    }
28026
 
28027
    public void setFieldValue(_Fields field, Object value) {
28028
      switch (field) {
28029
      case USER_ID:
28030
        if (value == null) {
771 rajveer 28031
          unsetUserId();
553 chandransh 28032
        } else {
771 rajveer 28033
          setUserId((Long)value);
553 chandransh 28034
        }
28035
        break;
28036
 
28037
      case ITEM_ID:
28038
        if (value == null) {
771 rajveer 28039
          unsetItemId();
553 chandransh 28040
        } else {
771 rajveer 28041
          setItemId((Long)value);
553 chandransh 28042
        }
28043
        break;
28044
 
130 ashish 28045
      }
28046
    }
28047
 
553 chandransh 28048
    public void setFieldValue(int fieldID, Object value) {
28049
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 28050
    }
28051
 
553 chandransh 28052
    public Object getFieldValue(_Fields field) {
28053
      switch (field) {
28054
      case USER_ID:
771 rajveer 28055
        return new Long(getUserId());
553 chandransh 28056
 
28057
      case ITEM_ID:
771 rajveer 28058
        return new Long(getItemId());
553 chandransh 28059
 
28060
      }
28061
      throw new IllegalStateException();
28062
    }
28063
 
28064
    public Object getFieldValue(int fieldId) {
28065
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28066
    }
28067
 
28068
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28069
    public boolean isSet(_Fields field) {
28070
      switch (field) {
28071
      case USER_ID:
771 rajveer 28072
        return isSetUserId();
553 chandransh 28073
      case ITEM_ID:
771 rajveer 28074
        return isSetItemId();
553 chandransh 28075
      }
28076
      throw new IllegalStateException();
28077
    }
28078
 
28079
    public boolean isSet(int fieldID) {
28080
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28081
    }
28082
 
28083
    @Override
28084
    public boolean equals(Object that) {
28085
      if (that == null)
28086
        return false;
28087
      if (that instanceof deleteItemFromMyResearch_args)
28088
        return this.equals((deleteItemFromMyResearch_args)that);
28089
      return false;
28090
    }
28091
 
28092
    public boolean equals(deleteItemFromMyResearch_args that) {
28093
      if (that == null)
28094
        return false;
28095
 
771 rajveer 28096
      boolean this_present_userId = true;
28097
      boolean that_present_userId = true;
28098
      if (this_present_userId || that_present_userId) {
28099
        if (!(this_present_userId && that_present_userId))
553 chandransh 28100
          return false;
771 rajveer 28101
        if (this.userId != that.userId)
553 chandransh 28102
          return false;
28103
      }
28104
 
771 rajveer 28105
      boolean this_present_itemId = true;
28106
      boolean that_present_itemId = true;
28107
      if (this_present_itemId || that_present_itemId) {
28108
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 28109
          return false;
771 rajveer 28110
        if (this.itemId != that.itemId)
553 chandransh 28111
          return false;
28112
      }
28113
 
28114
      return true;
28115
    }
28116
 
28117
    @Override
28118
    public int hashCode() {
28119
      return 0;
28120
    }
28121
 
28122
    public int compareTo(deleteItemFromMyResearch_args other) {
28123
      if (!getClass().equals(other.getClass())) {
28124
        return getClass().getName().compareTo(other.getClass().getName());
28125
      }
28126
 
28127
      int lastComparison = 0;
28128
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
28129
 
771 rajveer 28130
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 28131
      if (lastComparison != 0) {
28132
        return lastComparison;
28133
      }
771 rajveer 28134
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 28135
      if (lastComparison != 0) {
28136
        return lastComparison;
28137
      }
771 rajveer 28138
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 28139
      if (lastComparison != 0) {
28140
        return lastComparison;
28141
      }
771 rajveer 28142
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 28143
      if (lastComparison != 0) {
28144
        return lastComparison;
28145
      }
28146
      return 0;
28147
    }
28148
 
28149
    public void read(TProtocol iprot) throws TException {
28150
      TField field;
28151
      iprot.readStructBegin();
28152
      while (true)
28153
      {
28154
        field = iprot.readFieldBegin();
28155
        if (field.type == TType.STOP) { 
28156
          break;
28157
        }
28158
        _Fields fieldId = _Fields.findByThriftId(field.id);
28159
        if (fieldId == null) {
28160
          TProtocolUtil.skip(iprot, field.type);
28161
        } else {
28162
          switch (fieldId) {
28163
            case USER_ID:
28164
              if (field.type == TType.I64) {
771 rajveer 28165
                this.userId = iprot.readI64();
28166
                setUserIdIsSet(true);
553 chandransh 28167
              } else { 
28168
                TProtocolUtil.skip(iprot, field.type);
28169
              }
28170
              break;
28171
            case ITEM_ID:
28172
              if (field.type == TType.I64) {
771 rajveer 28173
                this.itemId = iprot.readI64();
28174
                setItemIdIsSet(true);
553 chandransh 28175
              } else { 
28176
                TProtocolUtil.skip(iprot, field.type);
28177
              }
28178
              break;
28179
          }
28180
          iprot.readFieldEnd();
28181
        }
28182
      }
28183
      iprot.readStructEnd();
28184
      validate();
28185
    }
28186
 
28187
    public void write(TProtocol oprot) throws TException {
28188
      validate();
28189
 
28190
      oprot.writeStructBegin(STRUCT_DESC);
28191
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 28192
      oprot.writeI64(this.userId);
553 chandransh 28193
      oprot.writeFieldEnd();
28194
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 28195
      oprot.writeI64(this.itemId);
553 chandransh 28196
      oprot.writeFieldEnd();
28197
      oprot.writeFieldStop();
28198
      oprot.writeStructEnd();
28199
    }
28200
 
28201
    @Override
28202
    public String toString() {
28203
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
28204
      boolean first = true;
28205
 
771 rajveer 28206
      sb.append("userId:");
28207
      sb.append(this.userId);
553 chandransh 28208
      first = false;
28209
      if (!first) sb.append(", ");
771 rajveer 28210
      sb.append("itemId:");
28211
      sb.append(this.itemId);
553 chandransh 28212
      first = false;
28213
      sb.append(")");
28214
      return sb.toString();
28215
    }
28216
 
28217
    public void validate() throws TException {
28218
      // check for required fields
28219
    }
28220
 
28221
  }
28222
 
28223
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
28224
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
28225
 
28226
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28227
 
28228
    private WidgetException scx;
28229
 
28230
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28231
    public enum _Fields implements TFieldIdEnum {
28232
      SCX((short)1, "scx");
28233
 
28234
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28235
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28236
 
28237
      static {
28238
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28239
          byId.put((int)field._thriftId, field);
28240
          byName.put(field.getFieldName(), field);
28241
        }
28242
      }
28243
 
28244
      /**
28245
       * Find the _Fields constant that matches fieldId, or null if its not found.
28246
       */
28247
      public static _Fields findByThriftId(int fieldId) {
28248
        return byId.get(fieldId);
28249
      }
28250
 
28251
      /**
28252
       * Find the _Fields constant that matches fieldId, throwing an exception
28253
       * if it is not found.
28254
       */
28255
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28256
        _Fields fields = findByThriftId(fieldId);
28257
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28258
        return fields;
28259
      }
28260
 
28261
      /**
28262
       * Find the _Fields constant that matches name, or null if its not found.
28263
       */
28264
      public static _Fields findByName(String name) {
28265
        return byName.get(name);
28266
      }
28267
 
28268
      private final short _thriftId;
28269
      private final String _fieldName;
28270
 
28271
      _Fields(short thriftId, String fieldName) {
28272
        _thriftId = thriftId;
28273
        _fieldName = fieldName;
28274
      }
28275
 
28276
      public short getThriftFieldId() {
28277
        return _thriftId;
28278
      }
28279
 
28280
      public String getFieldName() {
28281
        return _fieldName;
28282
      }
28283
    }
28284
 
28285
    // isset id assignments
28286
 
28287
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28288
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
28289
          new FieldValueMetaData(TType.STRUCT)));
28290
    }});
28291
 
28292
    static {
28293
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
28294
    }
28295
 
28296
    public deleteItemFromMyResearch_result() {
28297
    }
28298
 
28299
    public deleteItemFromMyResearch_result(
28300
      WidgetException scx)
28301
    {
28302
      this();
28303
      this.scx = scx;
28304
    }
28305
 
28306
    /**
28307
     * Performs a deep copy on <i>other</i>.
28308
     */
28309
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
28310
      if (other.isSetScx()) {
28311
        this.scx = new WidgetException(other.scx);
28312
      }
28313
    }
28314
 
28315
    public deleteItemFromMyResearch_result deepCopy() {
28316
      return new deleteItemFromMyResearch_result(this);
28317
    }
28318
 
130 ashish 28319
    @Deprecated
553 chandransh 28320
    public deleteItemFromMyResearch_result clone() {
28321
      return new deleteItemFromMyResearch_result(this);
130 ashish 28322
    }
28323
 
553 chandransh 28324
    public WidgetException getScx() {
28325
      return this.scx;
130 ashish 28326
    }
28327
 
553 chandransh 28328
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
28329
      this.scx = scx;
130 ashish 28330
      return this;
28331
    }
28332
 
553 chandransh 28333
    public void unsetScx() {
28334
      this.scx = null;
130 ashish 28335
    }
28336
 
553 chandransh 28337
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
28338
    public boolean isSetScx() {
28339
      return this.scx != null;
130 ashish 28340
    }
28341
 
553 chandransh 28342
    public void setScxIsSet(boolean value) {
130 ashish 28343
      if (!value) {
553 chandransh 28344
        this.scx = null;
130 ashish 28345
      }
28346
    }
28347
 
553 chandransh 28348
    public void setFieldValue(_Fields field, Object value) {
28349
      switch (field) {
28350
      case SCX:
28351
        if (value == null) {
28352
          unsetScx();
28353
        } else {
28354
          setScx((WidgetException)value);
28355
        }
28356
        break;
28357
 
28358
      }
130 ashish 28359
    }
28360
 
553 chandransh 28361
    public void setFieldValue(int fieldID, Object value) {
28362
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28363
    }
28364
 
28365
    public Object getFieldValue(_Fields field) {
28366
      switch (field) {
28367
      case SCX:
28368
        return getScx();
28369
 
28370
      }
28371
      throw new IllegalStateException();
28372
    }
28373
 
28374
    public Object getFieldValue(int fieldId) {
28375
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28376
    }
28377
 
28378
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28379
    public boolean isSet(_Fields field) {
28380
      switch (field) {
28381
      case SCX:
28382
        return isSetScx();
28383
      }
28384
      throw new IllegalStateException();
28385
    }
28386
 
28387
    public boolean isSet(int fieldID) {
28388
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28389
    }
28390
 
28391
    @Override
28392
    public boolean equals(Object that) {
28393
      if (that == null)
28394
        return false;
28395
      if (that instanceof deleteItemFromMyResearch_result)
28396
        return this.equals((deleteItemFromMyResearch_result)that);
28397
      return false;
28398
    }
28399
 
28400
    public boolean equals(deleteItemFromMyResearch_result that) {
28401
      if (that == null)
28402
        return false;
28403
 
28404
      boolean this_present_scx = true && this.isSetScx();
28405
      boolean that_present_scx = true && that.isSetScx();
28406
      if (this_present_scx || that_present_scx) {
28407
        if (!(this_present_scx && that_present_scx))
28408
          return false;
28409
        if (!this.scx.equals(that.scx))
28410
          return false;
28411
      }
28412
 
28413
      return true;
28414
    }
28415
 
28416
    @Override
28417
    public int hashCode() {
28418
      return 0;
28419
    }
28420
 
28421
    public int compareTo(deleteItemFromMyResearch_result other) {
28422
      if (!getClass().equals(other.getClass())) {
28423
        return getClass().getName().compareTo(other.getClass().getName());
28424
      }
28425
 
28426
      int lastComparison = 0;
28427
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
28428
 
28429
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
28430
      if (lastComparison != 0) {
28431
        return lastComparison;
28432
      }
28433
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
28434
      if (lastComparison != 0) {
28435
        return lastComparison;
28436
      }
28437
      return 0;
28438
    }
28439
 
28440
    public void read(TProtocol iprot) throws TException {
28441
      TField field;
28442
      iprot.readStructBegin();
28443
      while (true)
28444
      {
28445
        field = iprot.readFieldBegin();
28446
        if (field.type == TType.STOP) { 
28447
          break;
28448
        }
28449
        _Fields fieldId = _Fields.findByThriftId(field.id);
28450
        if (fieldId == null) {
28451
          TProtocolUtil.skip(iprot, field.type);
28452
        } else {
28453
          switch (fieldId) {
28454
            case SCX:
28455
              if (field.type == TType.STRUCT) {
28456
                this.scx = new WidgetException();
28457
                this.scx.read(iprot);
28458
              } else { 
28459
                TProtocolUtil.skip(iprot, field.type);
28460
              }
28461
              break;
28462
          }
28463
          iprot.readFieldEnd();
28464
        }
28465
      }
28466
      iprot.readStructEnd();
28467
      validate();
28468
    }
28469
 
28470
    public void write(TProtocol oprot) throws TException {
28471
      oprot.writeStructBegin(STRUCT_DESC);
28472
 
28473
      if (this.isSetScx()) {
28474
        oprot.writeFieldBegin(SCX_FIELD_DESC);
28475
        this.scx.write(oprot);
28476
        oprot.writeFieldEnd();
28477
      }
28478
      oprot.writeFieldStop();
28479
      oprot.writeStructEnd();
28480
    }
28481
 
28482
    @Override
28483
    public String toString() {
28484
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
28485
      boolean first = true;
28486
 
28487
      sb.append("scx:");
28488
      if (this.scx == null) {
28489
        sb.append("null");
28490
      } else {
28491
        sb.append(this.scx);
28492
      }
28493
      first = false;
28494
      sb.append(")");
28495
      return sb.toString();
28496
    }
28497
 
28498
    public void validate() throws TException {
28499
      // check for required fields
28500
    }
28501
 
28502
  }
28503
 
771 rajveer 28504
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
28505
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
553 chandransh 28506
 
771 rajveer 28507
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
28508
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
553 chandransh 28509
 
771 rajveer 28510
    private long userId;
28511
    private long itemId;
553 chandransh 28512
 
28513
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28514
    public enum _Fields implements TFieldIdEnum {
771 rajveer 28515
      USER_ID((short)1, "userId"),
28516
      ITEM_ID((short)2, "itemId");
553 chandransh 28517
 
28518
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28519
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28520
 
28521
      static {
28522
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28523
          byId.put((int)field._thriftId, field);
28524
          byName.put(field.getFieldName(), field);
28525
        }
28526
      }
28527
 
28528
      /**
28529
       * Find the _Fields constant that matches fieldId, or null if its not found.
28530
       */
28531
      public static _Fields findByThriftId(int fieldId) {
28532
        return byId.get(fieldId);
28533
      }
28534
 
28535
      /**
28536
       * Find the _Fields constant that matches fieldId, throwing an exception
28537
       * if it is not found.
28538
       */
28539
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28540
        _Fields fields = findByThriftId(fieldId);
28541
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28542
        return fields;
28543
      }
28544
 
28545
      /**
28546
       * Find the _Fields constant that matches name, or null if its not found.
28547
       */
28548
      public static _Fields findByName(String name) {
28549
        return byName.get(name);
28550
      }
28551
 
28552
      private final short _thriftId;
28553
      private final String _fieldName;
28554
 
28555
      _Fields(short thriftId, String fieldName) {
28556
        _thriftId = thriftId;
28557
        _fieldName = fieldName;
28558
      }
28559
 
28560
      public short getThriftFieldId() {
28561
        return _thriftId;
28562
      }
28563
 
28564
      public String getFieldName() {
28565
        return _fieldName;
28566
      }
28567
    }
28568
 
28569
    // isset id assignments
771 rajveer 28570
    private static final int __USERID_ISSET_ID = 0;
28571
    private static final int __ITEMID_ISSET_ID = 1;
28572
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 28573
 
28574
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 28575
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 28576
          new FieldValueMetaData(TType.I64)));
771 rajveer 28577
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 28578
          new FieldValueMetaData(TType.I64)));
28579
    }});
28580
 
28581
    static {
771 rajveer 28582
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
553 chandransh 28583
    }
28584
 
771 rajveer 28585
    public updateBrowseHistory_args() {
553 chandransh 28586
    }
28587
 
771 rajveer 28588
    public updateBrowseHistory_args(
28589
      long userId,
28590
      long itemId)
553 chandransh 28591
    {
28592
      this();
771 rajveer 28593
      this.userId = userId;
28594
      setUserIdIsSet(true);
28595
      this.itemId = itemId;
28596
      setItemIdIsSet(true);
553 chandransh 28597
    }
28598
 
28599
    /**
28600
     * Performs a deep copy on <i>other</i>.
28601
     */
771 rajveer 28602
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
553 chandransh 28603
      __isset_bit_vector.clear();
28604
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 28605
      this.userId = other.userId;
28606
      this.itemId = other.itemId;
553 chandransh 28607
    }
28608
 
771 rajveer 28609
    public updateBrowseHistory_args deepCopy() {
28610
      return new updateBrowseHistory_args(this);
553 chandransh 28611
    }
28612
 
28613
    @Deprecated
771 rajveer 28614
    public updateBrowseHistory_args clone() {
28615
      return new updateBrowseHistory_args(this);
553 chandransh 28616
    }
28617
 
771 rajveer 28618
    public long getUserId() {
28619
      return this.userId;
553 chandransh 28620
    }
28621
 
771 rajveer 28622
    public updateBrowseHistory_args setUserId(long userId) {
28623
      this.userId = userId;
28624
      setUserIdIsSet(true);
130 ashish 28625
      return this;
28626
    }
28627
 
771 rajveer 28628
    public void unsetUserId() {
28629
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 28630
    }
28631
 
771 rajveer 28632
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
28633
    public boolean isSetUserId() {
28634
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 28635
    }
28636
 
771 rajveer 28637
    public void setUserIdIsSet(boolean value) {
28638
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 28639
    }
28640
 
771 rajveer 28641
    public long getItemId() {
28642
      return this.itemId;
553 chandransh 28643
    }
28644
 
771 rajveer 28645
    public updateBrowseHistory_args setItemId(long itemId) {
28646
      this.itemId = itemId;
28647
      setItemIdIsSet(true);
553 chandransh 28648
      return this;
28649
    }
28650
 
771 rajveer 28651
    public void unsetItemId() {
28652
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 28653
    }
28654
 
771 rajveer 28655
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
28656
    public boolean isSetItemId() {
28657
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 28658
    }
28659
 
771 rajveer 28660
    public void setItemIdIsSet(boolean value) {
28661
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 28662
    }
28663
 
130 ashish 28664
    public void setFieldValue(_Fields field, Object value) {
28665
      switch (field) {
771 rajveer 28666
      case USER_ID:
130 ashish 28667
        if (value == null) {
771 rajveer 28668
          unsetUserId();
130 ashish 28669
        } else {
771 rajveer 28670
          setUserId((Long)value);
130 ashish 28671
        }
28672
        break;
28673
 
771 rajveer 28674
      case ITEM_ID:
130 ashish 28675
        if (value == null) {
771 rajveer 28676
          unsetItemId();
130 ashish 28677
        } else {
771 rajveer 28678
          setItemId((Long)value);
130 ashish 28679
        }
28680
        break;
28681
 
28682
      }
28683
    }
28684
 
28685
    public void setFieldValue(int fieldID, Object value) {
28686
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28687
    }
28688
 
28689
    public Object getFieldValue(_Fields field) {
28690
      switch (field) {
771 rajveer 28691
      case USER_ID:
28692
        return new Long(getUserId());
28693
 
553 chandransh 28694
      case ITEM_ID:
771 rajveer 28695
        return new Long(getItemId());
130 ashish 28696
 
28697
      }
28698
      throw new IllegalStateException();
28699
    }
28700
 
28701
    public Object getFieldValue(int fieldId) {
28702
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28703
    }
28704
 
28705
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28706
    public boolean isSet(_Fields field) {
28707
      switch (field) {
771 rajveer 28708
      case USER_ID:
28709
        return isSetUserId();
553 chandransh 28710
      case ITEM_ID:
771 rajveer 28711
        return isSetItemId();
130 ashish 28712
      }
28713
      throw new IllegalStateException();
28714
    }
28715
 
28716
    public boolean isSet(int fieldID) {
28717
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28718
    }
28719
 
28720
    @Override
28721
    public boolean equals(Object that) {
28722
      if (that == null)
28723
        return false;
771 rajveer 28724
      if (that instanceof updateBrowseHistory_args)
28725
        return this.equals((updateBrowseHistory_args)that);
130 ashish 28726
      return false;
28727
    }
28728
 
771 rajveer 28729
    public boolean equals(updateBrowseHistory_args that) {
130 ashish 28730
      if (that == null)
28731
        return false;
28732
 
771 rajveer 28733
      boolean this_present_userId = true;
28734
      boolean that_present_userId = true;
28735
      if (this_present_userId || that_present_userId) {
28736
        if (!(this_present_userId && that_present_userId))
130 ashish 28737
          return false;
771 rajveer 28738
        if (this.userId != that.userId)
130 ashish 28739
          return false;
28740
      }
28741
 
771 rajveer 28742
      boolean this_present_itemId = true;
28743
      boolean that_present_itemId = true;
28744
      if (this_present_itemId || that_present_itemId) {
28745
        if (!(this_present_itemId && that_present_itemId))
130 ashish 28746
          return false;
771 rajveer 28747
        if (this.itemId != that.itemId)
130 ashish 28748
          return false;
28749
      }
28750
 
28751
      return true;
28752
    }
28753
 
28754
    @Override
28755
    public int hashCode() {
28756
      return 0;
28757
    }
28758
 
771 rajveer 28759
    public int compareTo(updateBrowseHistory_args other) {
130 ashish 28760
      if (!getClass().equals(other.getClass())) {
28761
        return getClass().getName().compareTo(other.getClass().getName());
28762
      }
28763
 
28764
      int lastComparison = 0;
771 rajveer 28765
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
130 ashish 28766
 
771 rajveer 28767
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 28768
      if (lastComparison != 0) {
28769
        return lastComparison;
28770
      }
771 rajveer 28771
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 28772
      if (lastComparison != 0) {
28773
        return lastComparison;
28774
      }
771 rajveer 28775
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
130 ashish 28776
      if (lastComparison != 0) {
28777
        return lastComparison;
28778
      }
771 rajveer 28779
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
130 ashish 28780
      if (lastComparison != 0) {
28781
        return lastComparison;
28782
      }
28783
      return 0;
28784
    }
28785
 
28786
    public void read(TProtocol iprot) throws TException {
28787
      TField field;
28788
      iprot.readStructBegin();
28789
      while (true)
28790
      {
28791
        field = iprot.readFieldBegin();
28792
        if (field.type == TType.STOP) { 
28793
          break;
28794
        }
28795
        _Fields fieldId = _Fields.findByThriftId(field.id);
28796
        if (fieldId == null) {
28797
          TProtocolUtil.skip(iprot, field.type);
28798
        } else {
28799
          switch (fieldId) {
771 rajveer 28800
            case USER_ID:
553 chandransh 28801
              if (field.type == TType.I64) {
771 rajveer 28802
                this.userId = iprot.readI64();
28803
                setUserIdIsSet(true);
130 ashish 28804
              } else { 
28805
                TProtocolUtil.skip(iprot, field.type);
28806
              }
28807
              break;
771 rajveer 28808
            case ITEM_ID:
553 chandransh 28809
              if (field.type == TType.I64) {
771 rajveer 28810
                this.itemId = iprot.readI64();
28811
                setItemIdIsSet(true);
553 chandransh 28812
              } else { 
28813
                TProtocolUtil.skip(iprot, field.type);
28814
              }
28815
              break;
130 ashish 28816
          }
28817
          iprot.readFieldEnd();
28818
        }
28819
      }
28820
      iprot.readStructEnd();
28821
      validate();
28822
    }
28823
 
28824
    public void write(TProtocol oprot) throws TException {
28825
      validate();
28826
 
28827
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 28828
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
28829
      oprot.writeI64(this.userId);
28830
      oprot.writeFieldEnd();
553 chandransh 28831
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 28832
      oprot.writeI64(this.itemId);
553 chandransh 28833
      oprot.writeFieldEnd();
130 ashish 28834
      oprot.writeFieldStop();
28835
      oprot.writeStructEnd();
28836
    }
28837
 
28838
    @Override
28839
    public String toString() {
771 rajveer 28840
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
130 ashish 28841
      boolean first = true;
28842
 
771 rajveer 28843
      sb.append("userId:");
28844
      sb.append(this.userId);
553 chandransh 28845
      first = false;
28846
      if (!first) sb.append(", ");
771 rajveer 28847
      sb.append("itemId:");
28848
      sb.append(this.itemId);
130 ashish 28849
      first = false;
28850
      sb.append(")");
28851
      return sb.toString();
28852
    }
28853
 
28854
    public void validate() throws TException {
28855
      // check for required fields
28856
    }
28857
 
28858
  }
28859
 
771 rajveer 28860
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
28861
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
130 ashish 28862
 
28863
 
28864
 
28865
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28866
    public enum _Fields implements TFieldIdEnum {
553 chandransh 28867
;
28868
 
28869
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28870
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28871
 
28872
      static {
28873
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28874
          byId.put((int)field._thriftId, field);
28875
          byName.put(field.getFieldName(), field);
28876
        }
28877
      }
28878
 
28879
      /**
28880
       * Find the _Fields constant that matches fieldId, or null if its not found.
28881
       */
28882
      public static _Fields findByThriftId(int fieldId) {
28883
        return byId.get(fieldId);
28884
      }
28885
 
28886
      /**
28887
       * Find the _Fields constant that matches fieldId, throwing an exception
28888
       * if it is not found.
28889
       */
28890
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28891
        _Fields fields = findByThriftId(fieldId);
28892
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28893
        return fields;
28894
      }
28895
 
28896
      /**
28897
       * Find the _Fields constant that matches name, or null if its not found.
28898
       */
28899
      public static _Fields findByName(String name) {
28900
        return byName.get(name);
28901
      }
28902
 
28903
      private final short _thriftId;
28904
      private final String _fieldName;
28905
 
28906
      _Fields(short thriftId, String fieldName) {
28907
        _thriftId = thriftId;
28908
        _fieldName = fieldName;
28909
      }
28910
 
28911
      public short getThriftFieldId() {
28912
        return _thriftId;
28913
      }
28914
 
28915
      public String getFieldName() {
28916
        return _fieldName;
28917
      }
28918
    }
28919
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28920
    }});
28921
 
28922
    static {
771 rajveer 28923
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
553 chandransh 28924
    }
28925
 
771 rajveer 28926
    public updateBrowseHistory_result() {
553 chandransh 28927
    }
28928
 
28929
    /**
28930
     * Performs a deep copy on <i>other</i>.
28931
     */
771 rajveer 28932
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
553 chandransh 28933
    }
28934
 
771 rajveer 28935
    public updateBrowseHistory_result deepCopy() {
28936
      return new updateBrowseHistory_result(this);
553 chandransh 28937
    }
28938
 
28939
    @Deprecated
771 rajveer 28940
    public updateBrowseHistory_result clone() {
28941
      return new updateBrowseHistory_result(this);
553 chandransh 28942
    }
28943
 
28944
    public void setFieldValue(_Fields field, Object value) {
28945
      switch (field) {
28946
      }
28947
    }
28948
 
28949
    public void setFieldValue(int fieldID, Object value) {
28950
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28951
    }
28952
 
28953
    public Object getFieldValue(_Fields field) {
28954
      switch (field) {
28955
      }
28956
      throw new IllegalStateException();
28957
    }
28958
 
28959
    public Object getFieldValue(int fieldId) {
28960
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28961
    }
28962
 
28963
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28964
    public boolean isSet(_Fields field) {
28965
      switch (field) {
28966
      }
28967
      throw new IllegalStateException();
28968
    }
28969
 
28970
    public boolean isSet(int fieldID) {
28971
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28972
    }
28973
 
28974
    @Override
28975
    public boolean equals(Object that) {
28976
      if (that == null)
28977
        return false;
771 rajveer 28978
      if (that instanceof updateBrowseHistory_result)
28979
        return this.equals((updateBrowseHistory_result)that);
553 chandransh 28980
      return false;
28981
    }
28982
 
771 rajveer 28983
    public boolean equals(updateBrowseHistory_result that) {
553 chandransh 28984
      if (that == null)
28985
        return false;
28986
 
28987
      return true;
28988
    }
28989
 
28990
    @Override
28991
    public int hashCode() {
28992
      return 0;
28993
    }
28994
 
771 rajveer 28995
    public int compareTo(updateBrowseHistory_result other) {
553 chandransh 28996
      if (!getClass().equals(other.getClass())) {
28997
        return getClass().getName().compareTo(other.getClass().getName());
28998
      }
28999
 
29000
      int lastComparison = 0;
771 rajveer 29001
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
553 chandransh 29002
 
29003
      return 0;
29004
    }
29005
 
29006
    public void read(TProtocol iprot) throws TException {
29007
      TField field;
29008
      iprot.readStructBegin();
29009
      while (true)
29010
      {
29011
        field = iprot.readFieldBegin();
29012
        if (field.type == TType.STOP) { 
29013
          break;
29014
        }
29015
        _Fields fieldId = _Fields.findByThriftId(field.id);
29016
        if (fieldId == null) {
29017
          TProtocolUtil.skip(iprot, field.type);
29018
        } else {
29019
          switch (fieldId) {
29020
          }
29021
          iprot.readFieldEnd();
29022
        }
29023
      }
29024
      iprot.readStructEnd();
29025
      validate();
29026
    }
29027
 
29028
    public void write(TProtocol oprot) throws TException {
29029
      oprot.writeStructBegin(STRUCT_DESC);
29030
 
29031
      oprot.writeFieldStop();
29032
      oprot.writeStructEnd();
29033
    }
29034
 
29035
    @Override
29036
    public String toString() {
771 rajveer 29037
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
553 chandransh 29038
      boolean first = true;
29039
 
29040
      sb.append(")");
29041
      return sb.toString();
29042
    }
29043
 
29044
    public void validate() throws TException {
29045
      // check for required fields
29046
    }
29047
 
29048
  }
29049
 
771 rajveer 29050
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
29051
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
553 chandransh 29052
 
771 rajveer 29053
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 29054
 
771 rajveer 29055
    private long userId;
553 chandransh 29056
 
29057
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29058
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29059
      USER_ID((short)1, "userId");
553 chandransh 29060
 
29061
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29062
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29063
 
29064
      static {
29065
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29066
          byId.put((int)field._thriftId, field);
29067
          byName.put(field.getFieldName(), field);
29068
        }
29069
      }
29070
 
29071
      /**
29072
       * Find the _Fields constant that matches fieldId, or null if its not found.
29073
       */
29074
      public static _Fields findByThriftId(int fieldId) {
29075
        return byId.get(fieldId);
29076
      }
29077
 
29078
      /**
29079
       * Find the _Fields constant that matches fieldId, throwing an exception
29080
       * if it is not found.
29081
       */
29082
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29083
        _Fields fields = findByThriftId(fieldId);
29084
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29085
        return fields;
29086
      }
29087
 
29088
      /**
29089
       * Find the _Fields constant that matches name, or null if its not found.
29090
       */
29091
      public static _Fields findByName(String name) {
29092
        return byName.get(name);
29093
      }
29094
 
29095
      private final short _thriftId;
29096
      private final String _fieldName;
29097
 
29098
      _Fields(short thriftId, String fieldName) {
29099
        _thriftId = thriftId;
29100
        _fieldName = fieldName;
29101
      }
29102
 
29103
      public short getThriftFieldId() {
29104
        return _thriftId;
29105
      }
29106
 
29107
      public String getFieldName() {
29108
        return _fieldName;
29109
      }
29110
    }
29111
 
29112
    // isset id assignments
771 rajveer 29113
    private static final int __USERID_ISSET_ID = 0;
29114
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 29115
 
29116
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 29117
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 29118
          new FieldValueMetaData(TType.I64)));
29119
    }});
29120
 
29121
    static {
771 rajveer 29122
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
553 chandransh 29123
    }
29124
 
771 rajveer 29125
    public getBrowseHistory_args() {
553 chandransh 29126
    }
29127
 
771 rajveer 29128
    public getBrowseHistory_args(
29129
      long userId)
553 chandransh 29130
    {
29131
      this();
771 rajveer 29132
      this.userId = userId;
29133
      setUserIdIsSet(true);
553 chandransh 29134
    }
29135
 
29136
    /**
29137
     * Performs a deep copy on <i>other</i>.
29138
     */
771 rajveer 29139
    public getBrowseHistory_args(getBrowseHistory_args other) {
553 chandransh 29140
      __isset_bit_vector.clear();
29141
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 29142
      this.userId = other.userId;
553 chandransh 29143
    }
29144
 
771 rajveer 29145
    public getBrowseHistory_args deepCopy() {
29146
      return new getBrowseHistory_args(this);
553 chandransh 29147
    }
29148
 
29149
    @Deprecated
771 rajveer 29150
    public getBrowseHistory_args clone() {
29151
      return new getBrowseHistory_args(this);
553 chandransh 29152
    }
29153
 
771 rajveer 29154
    public long getUserId() {
29155
      return this.userId;
553 chandransh 29156
    }
29157
 
771 rajveer 29158
    public getBrowseHistory_args setUserId(long userId) {
29159
      this.userId = userId;
29160
      setUserIdIsSet(true);
553 chandransh 29161
      return this;
29162
    }
29163
 
771 rajveer 29164
    public void unsetUserId() {
29165
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 29166
    }
29167
 
771 rajveer 29168
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
29169
    public boolean isSetUserId() {
29170
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 29171
    }
29172
 
771 rajveer 29173
    public void setUserIdIsSet(boolean value) {
29174
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 29175
    }
29176
 
29177
    public void setFieldValue(_Fields field, Object value) {
29178
      switch (field) {
29179
      case USER_ID:
29180
        if (value == null) {
771 rajveer 29181
          unsetUserId();
553 chandransh 29182
        } else {
771 rajveer 29183
          setUserId((Long)value);
553 chandransh 29184
        }
29185
        break;
29186
 
29187
      }
29188
    }
29189
 
29190
    public void setFieldValue(int fieldID, Object value) {
29191
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29192
    }
29193
 
29194
    public Object getFieldValue(_Fields field) {
29195
      switch (field) {
29196
      case USER_ID:
771 rajveer 29197
        return new Long(getUserId());
553 chandransh 29198
 
29199
      }
29200
      throw new IllegalStateException();
29201
    }
29202
 
29203
    public Object getFieldValue(int fieldId) {
29204
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29205
    }
29206
 
29207
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29208
    public boolean isSet(_Fields field) {
29209
      switch (field) {
29210
      case USER_ID:
771 rajveer 29211
        return isSetUserId();
553 chandransh 29212
      }
29213
      throw new IllegalStateException();
29214
    }
29215
 
29216
    public boolean isSet(int fieldID) {
29217
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29218
    }
29219
 
29220
    @Override
29221
    public boolean equals(Object that) {
29222
      if (that == null)
29223
        return false;
771 rajveer 29224
      if (that instanceof getBrowseHistory_args)
29225
        return this.equals((getBrowseHistory_args)that);
553 chandransh 29226
      return false;
29227
    }
29228
 
771 rajveer 29229
    public boolean equals(getBrowseHistory_args that) {
553 chandransh 29230
      if (that == null)
29231
        return false;
29232
 
771 rajveer 29233
      boolean this_present_userId = true;
29234
      boolean that_present_userId = true;
29235
      if (this_present_userId || that_present_userId) {
29236
        if (!(this_present_userId && that_present_userId))
553 chandransh 29237
          return false;
771 rajveer 29238
        if (this.userId != that.userId)
553 chandransh 29239
          return false;
29240
      }
29241
 
29242
      return true;
29243
    }
29244
 
29245
    @Override
29246
    public int hashCode() {
29247
      return 0;
29248
    }
29249
 
771 rajveer 29250
    public int compareTo(getBrowseHistory_args other) {
553 chandransh 29251
      if (!getClass().equals(other.getClass())) {
29252
        return getClass().getName().compareTo(other.getClass().getName());
29253
      }
29254
 
29255
      int lastComparison = 0;
771 rajveer 29256
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
553 chandransh 29257
 
771 rajveer 29258
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 29259
      if (lastComparison != 0) {
29260
        return lastComparison;
29261
      }
771 rajveer 29262
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 29263
      if (lastComparison != 0) {
29264
        return lastComparison;
29265
      }
29266
      return 0;
29267
    }
29268
 
29269
    public void read(TProtocol iprot) throws TException {
29270
      TField field;
29271
      iprot.readStructBegin();
29272
      while (true)
29273
      {
29274
        field = iprot.readFieldBegin();
29275
        if (field.type == TType.STOP) { 
29276
          break;
29277
        }
29278
        _Fields fieldId = _Fields.findByThriftId(field.id);
29279
        if (fieldId == null) {
29280
          TProtocolUtil.skip(iprot, field.type);
29281
        } else {
29282
          switch (fieldId) {
29283
            case USER_ID:
29284
              if (field.type == TType.I64) {
771 rajveer 29285
                this.userId = iprot.readI64();
29286
                setUserIdIsSet(true);
553 chandransh 29287
              } else { 
29288
                TProtocolUtil.skip(iprot, field.type);
29289
              }
29290
              break;
29291
          }
29292
          iprot.readFieldEnd();
29293
        }
29294
      }
29295
      iprot.readStructEnd();
29296
      validate();
29297
    }
29298
 
29299
    public void write(TProtocol oprot) throws TException {
29300
      validate();
29301
 
29302
      oprot.writeStructBegin(STRUCT_DESC);
29303
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 29304
      oprot.writeI64(this.userId);
553 chandransh 29305
      oprot.writeFieldEnd();
29306
      oprot.writeFieldStop();
29307
      oprot.writeStructEnd();
29308
    }
29309
 
29310
    @Override
29311
    public String toString() {
771 rajveer 29312
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
553 chandransh 29313
      boolean first = true;
29314
 
771 rajveer 29315
      sb.append("userId:");
29316
      sb.append(this.userId);
553 chandransh 29317
      first = false;
29318
      sb.append(")");
29319
      return sb.toString();
29320
    }
29321
 
29322
    public void validate() throws TException {
29323
      // check for required fields
29324
    }
29325
 
29326
  }
29327
 
771 rajveer 29328
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
29329
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
553 chandransh 29330
 
29331
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
29332
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29333
 
771 rajveer 29334
    private Widget success;
553 chandransh 29335
    private WidgetException scx;
29336
 
29337
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29338
    public enum _Fields implements TFieldIdEnum {
130 ashish 29339
      SUCCESS((short)0, "success"),
553 chandransh 29340
      SCX((short)1, "scx");
130 ashish 29341
 
29342
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29343
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29344
 
29345
      static {
29346
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29347
          byId.put((int)field._thriftId, field);
29348
          byName.put(field.getFieldName(), field);
29349
        }
29350
      }
29351
 
29352
      /**
29353
       * Find the _Fields constant that matches fieldId, or null if its not found.
29354
       */
29355
      public static _Fields findByThriftId(int fieldId) {
29356
        return byId.get(fieldId);
29357
      }
29358
 
29359
      /**
29360
       * Find the _Fields constant that matches fieldId, throwing an exception
29361
       * if it is not found.
29362
       */
29363
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29364
        _Fields fields = findByThriftId(fieldId);
29365
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29366
        return fields;
29367
      }
29368
 
29369
      /**
29370
       * Find the _Fields constant that matches name, or null if its not found.
29371
       */
29372
      public static _Fields findByName(String name) {
29373
        return byName.get(name);
29374
      }
29375
 
29376
      private final short _thriftId;
29377
      private final String _fieldName;
29378
 
29379
      _Fields(short thriftId, String fieldName) {
29380
        _thriftId = thriftId;
29381
        _fieldName = fieldName;
29382
      }
29383
 
29384
      public short getThriftFieldId() {
29385
        return _thriftId;
29386
      }
29387
 
29388
      public String getFieldName() {
29389
        return _fieldName;
29390
      }
29391
    }
29392
 
29393
    // isset id assignments
29394
 
29395
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29396
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
771 rajveer 29397
          new StructMetaData(TType.STRUCT, Widget.class)));
553 chandransh 29398
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 29399
          new FieldValueMetaData(TType.STRUCT)));
29400
    }});
29401
 
29402
    static {
771 rajveer 29403
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
130 ashish 29404
    }
29405
 
771 rajveer 29406
    public getBrowseHistory_result() {
130 ashish 29407
    }
29408
 
771 rajveer 29409
    public getBrowseHistory_result(
29410
      Widget success,
553 chandransh 29411
      WidgetException scx)
130 ashish 29412
    {
29413
      this();
29414
      this.success = success;
553 chandransh 29415
      this.scx = scx;
130 ashish 29416
    }
29417
 
29418
    /**
29419
     * Performs a deep copy on <i>other</i>.
29420
     */
771 rajveer 29421
    public getBrowseHistory_result(getBrowseHistory_result other) {
553 chandransh 29422
      if (other.isSetSuccess()) {
771 rajveer 29423
        this.success = new Widget(other.success);
553 chandransh 29424
      }
29425
      if (other.isSetScx()) {
29426
        this.scx = new WidgetException(other.scx);
29427
      }
29428
    }
29429
 
771 rajveer 29430
    public getBrowseHistory_result deepCopy() {
29431
      return new getBrowseHistory_result(this);
553 chandransh 29432
    }
29433
 
29434
    @Deprecated
771 rajveer 29435
    public getBrowseHistory_result clone() {
29436
      return new getBrowseHistory_result(this);
553 chandransh 29437
    }
29438
 
771 rajveer 29439
    public Widget getSuccess() {
553 chandransh 29440
      return this.success;
29441
    }
29442
 
771 rajveer 29443
    public getBrowseHistory_result setSuccess(Widget success) {
553 chandransh 29444
      this.success = success;
29445
      return this;
29446
    }
29447
 
29448
    public void unsetSuccess() {
29449
      this.success = null;
29450
    }
29451
 
29452
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29453
    public boolean isSetSuccess() {
29454
      return this.success != null;
29455
    }
29456
 
29457
    public void setSuccessIsSet(boolean value) {
29458
      if (!value) {
29459
        this.success = null;
29460
      }
29461
    }
29462
 
29463
    public WidgetException getScx() {
29464
      return this.scx;
29465
    }
29466
 
771 rajveer 29467
    public getBrowseHistory_result setScx(WidgetException scx) {
553 chandransh 29468
      this.scx = scx;
29469
      return this;
29470
    }
29471
 
29472
    public void unsetScx() {
29473
      this.scx = null;
29474
    }
29475
 
29476
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29477
    public boolean isSetScx() {
29478
      return this.scx != null;
29479
    }
29480
 
29481
    public void setScxIsSet(boolean value) {
29482
      if (!value) {
29483
        this.scx = null;
29484
      }
29485
    }
29486
 
29487
    public void setFieldValue(_Fields field, Object value) {
29488
      switch (field) {
29489
      case SUCCESS:
29490
        if (value == null) {
29491
          unsetSuccess();
29492
        } else {
771 rajveer 29493
          setSuccess((Widget)value);
553 chandransh 29494
        }
29495
        break;
29496
 
29497
      case SCX:
29498
        if (value == null) {
29499
          unsetScx();
29500
        } else {
29501
          setScx((WidgetException)value);
29502
        }
29503
        break;
29504
 
29505
      }
29506
    }
29507
 
29508
    public void setFieldValue(int fieldID, Object value) {
29509
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29510
    }
29511
 
29512
    public Object getFieldValue(_Fields field) {
29513
      switch (field) {
29514
      case SUCCESS:
29515
        return getSuccess();
29516
 
29517
      case SCX:
29518
        return getScx();
29519
 
29520
      }
29521
      throw new IllegalStateException();
29522
    }
29523
 
29524
    public Object getFieldValue(int fieldId) {
29525
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29526
    }
29527
 
29528
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29529
    public boolean isSet(_Fields field) {
29530
      switch (field) {
29531
      case SUCCESS:
29532
        return isSetSuccess();
29533
      case SCX:
29534
        return isSetScx();
29535
      }
29536
      throw new IllegalStateException();
29537
    }
29538
 
29539
    public boolean isSet(int fieldID) {
29540
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29541
    }
29542
 
29543
    @Override
29544
    public boolean equals(Object that) {
29545
      if (that == null)
29546
        return false;
771 rajveer 29547
      if (that instanceof getBrowseHistory_result)
29548
        return this.equals((getBrowseHistory_result)that);
553 chandransh 29549
      return false;
29550
    }
29551
 
771 rajveer 29552
    public boolean equals(getBrowseHistory_result that) {
553 chandransh 29553
      if (that == null)
29554
        return false;
29555
 
29556
      boolean this_present_success = true && this.isSetSuccess();
29557
      boolean that_present_success = true && that.isSetSuccess();
29558
      if (this_present_success || that_present_success) {
29559
        if (!(this_present_success && that_present_success))
29560
          return false;
29561
        if (!this.success.equals(that.success))
29562
          return false;
29563
      }
29564
 
29565
      boolean this_present_scx = true && this.isSetScx();
29566
      boolean that_present_scx = true && that.isSetScx();
29567
      if (this_present_scx || that_present_scx) {
29568
        if (!(this_present_scx && that_present_scx))
29569
          return false;
29570
        if (!this.scx.equals(that.scx))
29571
          return false;
29572
      }
29573
 
29574
      return true;
29575
    }
29576
 
29577
    @Override
29578
    public int hashCode() {
29579
      return 0;
29580
    }
29581
 
771 rajveer 29582
    public int compareTo(getBrowseHistory_result other) {
29583
      if (!getClass().equals(other.getClass())) {
29584
        return getClass().getName().compareTo(other.getClass().getName());
29585
      }
29586
 
29587
      int lastComparison = 0;
29588
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
29589
 
29590
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29591
      if (lastComparison != 0) {
29592
        return lastComparison;
29593
      }
29594
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29595
      if (lastComparison != 0) {
29596
        return lastComparison;
29597
      }
29598
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
29599
      if (lastComparison != 0) {
29600
        return lastComparison;
29601
      }
29602
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
29603
      if (lastComparison != 0) {
29604
        return lastComparison;
29605
      }
29606
      return 0;
29607
    }
29608
 
553 chandransh 29609
    public void read(TProtocol iprot) throws TException {
29610
      TField field;
29611
      iprot.readStructBegin();
29612
      while (true)
29613
      {
29614
        field = iprot.readFieldBegin();
29615
        if (field.type == TType.STOP) { 
29616
          break;
29617
        }
29618
        _Fields fieldId = _Fields.findByThriftId(field.id);
29619
        if (fieldId == null) {
29620
          TProtocolUtil.skip(iprot, field.type);
29621
        } else {
29622
          switch (fieldId) {
29623
            case SUCCESS:
29624
              if (field.type == TType.STRUCT) {
771 rajveer 29625
                this.success = new Widget();
553 chandransh 29626
                this.success.read(iprot);
29627
              } else { 
29628
                TProtocolUtil.skip(iprot, field.type);
29629
              }
29630
              break;
29631
            case SCX:
29632
              if (field.type == TType.STRUCT) {
29633
                this.scx = new WidgetException();
29634
                this.scx.read(iprot);
29635
              } else { 
29636
                TProtocolUtil.skip(iprot, field.type);
29637
              }
29638
              break;
29639
          }
29640
          iprot.readFieldEnd();
29641
        }
29642
      }
29643
      iprot.readStructEnd();
29644
      validate();
29645
    }
29646
 
29647
    public void write(TProtocol oprot) throws TException {
29648
      oprot.writeStructBegin(STRUCT_DESC);
29649
 
29650
      if (this.isSetSuccess()) {
29651
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29652
        this.success.write(oprot);
29653
        oprot.writeFieldEnd();
29654
      } else if (this.isSetScx()) {
29655
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29656
        this.scx.write(oprot);
29657
        oprot.writeFieldEnd();
29658
      }
29659
      oprot.writeFieldStop();
29660
      oprot.writeStructEnd();
29661
    }
29662
 
29663
    @Override
29664
    public String toString() {
771 rajveer 29665
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
553 chandransh 29666
      boolean first = true;
29667
 
29668
      sb.append("success:");
29669
      if (this.success == null) {
29670
        sb.append("null");
29671
      } else {
29672
        sb.append(this.success);
29673
      }
29674
      first = false;
29675
      if (!first) sb.append(", ");
29676
      sb.append("scx:");
29677
      if (this.scx == null) {
29678
        sb.append("null");
29679
      } else {
29680
        sb.append(this.scx);
29681
      }
29682
      first = false;
29683
      sb.append(")");
29684
      return sb.toString();
29685
    }
29686
 
29687
    public void validate() throws TException {
29688
      // check for required fields
29689
    }
29690
 
29691
  }
29692
 
771 rajveer 29693
  public static class mergeBrowseHistory_args implements TBase<mergeBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_args>   {
29694
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_args");
553 chandransh 29695
 
771 rajveer 29696
    private static final TField FROM_USER_ID_FIELD_DESC = new TField("fromUserId", TType.I64, (short)1);
29697
    private static final TField TO_USER_ID_FIELD_DESC = new TField("toUserId", TType.I64, (short)2);
553 chandransh 29698
 
771 rajveer 29699
    private long fromUserId;
29700
    private long toUserId;
553 chandransh 29701
 
29702
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29703
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29704
      FROM_USER_ID((short)1, "fromUserId"),
29705
      TO_USER_ID((short)2, "toUserId");
553 chandransh 29706
 
29707
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29708
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29709
 
29710
      static {
29711
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29712
          byId.put((int)field._thriftId, field);
29713
          byName.put(field.getFieldName(), field);
29714
        }
29715
      }
29716
 
29717
      /**
29718
       * Find the _Fields constant that matches fieldId, or null if its not found.
29719
       */
29720
      public static _Fields findByThriftId(int fieldId) {
29721
        return byId.get(fieldId);
29722
      }
29723
 
29724
      /**
29725
       * Find the _Fields constant that matches fieldId, throwing an exception
29726
       * if it is not found.
29727
       */
29728
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29729
        _Fields fields = findByThriftId(fieldId);
29730
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29731
        return fields;
29732
      }
29733
 
29734
      /**
29735
       * Find the _Fields constant that matches name, or null if its not found.
29736
       */
29737
      public static _Fields findByName(String name) {
29738
        return byName.get(name);
29739
      }
29740
 
29741
      private final short _thriftId;
29742
      private final String _fieldName;
29743
 
29744
      _Fields(short thriftId, String fieldName) {
29745
        _thriftId = thriftId;
29746
        _fieldName = fieldName;
29747
      }
29748
 
29749
      public short getThriftFieldId() {
29750
        return _thriftId;
29751
      }
29752
 
29753
      public String getFieldName() {
29754
        return _fieldName;
29755
      }
29756
    }
29757
 
29758
    // isset id assignments
771 rajveer 29759
    private static final int __FROMUSERID_ISSET_ID = 0;
29760
    private static final int __TOUSERID_ISSET_ID = 1;
29761
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 29762
 
29763
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 29764
      put(_Fields.FROM_USER_ID, new FieldMetaData("fromUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 29765
          new FieldValueMetaData(TType.I64)));
771 rajveer 29766
      put(_Fields.TO_USER_ID, new FieldMetaData("toUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 29767
          new FieldValueMetaData(TType.I64)));
29768
    }});
29769
 
29770
    static {
771 rajveer 29771
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_args.class, metaDataMap);
553 chandransh 29772
    }
29773
 
771 rajveer 29774
    public mergeBrowseHistory_args() {
553 chandransh 29775
    }
29776
 
771 rajveer 29777
    public mergeBrowseHistory_args(
29778
      long fromUserId,
29779
      long toUserId)
553 chandransh 29780
    {
29781
      this();
771 rajveer 29782
      this.fromUserId = fromUserId;
29783
      setFromUserIdIsSet(true);
29784
      this.toUserId = toUserId;
29785
      setToUserIdIsSet(true);
553 chandransh 29786
    }
29787
 
29788
    /**
29789
     * Performs a deep copy on <i>other</i>.
29790
     */
771 rajveer 29791
    public mergeBrowseHistory_args(mergeBrowseHistory_args other) {
130 ashish 29792
      __isset_bit_vector.clear();
29793
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 29794
      this.fromUserId = other.fromUserId;
29795
      this.toUserId = other.toUserId;
553 chandransh 29796
    }
29797
 
771 rajveer 29798
    public mergeBrowseHistory_args deepCopy() {
29799
      return new mergeBrowseHistory_args(this);
553 chandransh 29800
    }
29801
 
29802
    @Deprecated
771 rajveer 29803
    public mergeBrowseHistory_args clone() {
29804
      return new mergeBrowseHistory_args(this);
553 chandransh 29805
    }
29806
 
771 rajveer 29807
    public long getFromUserId() {
29808
      return this.fromUserId;
553 chandransh 29809
    }
29810
 
771 rajveer 29811
    public mergeBrowseHistory_args setFromUserId(long fromUserId) {
29812
      this.fromUserId = fromUserId;
29813
      setFromUserIdIsSet(true);
553 chandransh 29814
      return this;
29815
    }
29816
 
771 rajveer 29817
    public void unsetFromUserId() {
29818
      __isset_bit_vector.clear(__FROMUSERID_ISSET_ID);
553 chandransh 29819
    }
29820
 
771 rajveer 29821
    /** Returns true if field fromUserId is set (has been asigned a value) and false otherwise */
29822
    public boolean isSetFromUserId() {
29823
      return __isset_bit_vector.get(__FROMUSERID_ISSET_ID);
553 chandransh 29824
    }
29825
 
771 rajveer 29826
    public void setFromUserIdIsSet(boolean value) {
29827
      __isset_bit_vector.set(__FROMUSERID_ISSET_ID, value);
553 chandransh 29828
    }
29829
 
771 rajveer 29830
    public long getToUserId() {
29831
      return this.toUserId;
553 chandransh 29832
    }
29833
 
771 rajveer 29834
    public mergeBrowseHistory_args setToUserId(long toUserId) {
29835
      this.toUserId = toUserId;
29836
      setToUserIdIsSet(true);
553 chandransh 29837
      return this;
29838
    }
29839
 
771 rajveer 29840
    public void unsetToUserId() {
29841
      __isset_bit_vector.clear(__TOUSERID_ISSET_ID);
553 chandransh 29842
    }
29843
 
771 rajveer 29844
    /** Returns true if field toUserId is set (has been asigned a value) and false otherwise */
29845
    public boolean isSetToUserId() {
29846
      return __isset_bit_vector.get(__TOUSERID_ISSET_ID);
553 chandransh 29847
    }
29848
 
771 rajveer 29849
    public void setToUserIdIsSet(boolean value) {
29850
      __isset_bit_vector.set(__TOUSERID_ISSET_ID, value);
553 chandransh 29851
    }
29852
 
29853
    public void setFieldValue(_Fields field, Object value) {
29854
      switch (field) {
771 rajveer 29855
      case FROM_USER_ID:
553 chandransh 29856
        if (value == null) {
771 rajveer 29857
          unsetFromUserId();
553 chandransh 29858
        } else {
771 rajveer 29859
          setFromUserId((Long)value);
553 chandransh 29860
        }
29861
        break;
29862
 
771 rajveer 29863
      case TO_USER_ID:
553 chandransh 29864
        if (value == null) {
771 rajveer 29865
          unsetToUserId();
553 chandransh 29866
        } else {
771 rajveer 29867
          setToUserId((Long)value);
553 chandransh 29868
        }
29869
        break;
29870
 
130 ashish 29871
      }
29872
    }
29873
 
553 chandransh 29874
    public void setFieldValue(int fieldID, Object value) {
29875
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 29876
    }
29877
 
553 chandransh 29878
    public Object getFieldValue(_Fields field) {
29879
      switch (field) {
771 rajveer 29880
      case FROM_USER_ID:
29881
        return new Long(getFromUserId());
553 chandransh 29882
 
771 rajveer 29883
      case TO_USER_ID:
29884
        return new Long(getToUserId());
553 chandransh 29885
 
29886
      }
29887
      throw new IllegalStateException();
29888
    }
29889
 
29890
    public Object getFieldValue(int fieldId) {
29891
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29892
    }
29893
 
29894
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29895
    public boolean isSet(_Fields field) {
29896
      switch (field) {
771 rajveer 29897
      case FROM_USER_ID:
29898
        return isSetFromUserId();
29899
      case TO_USER_ID:
29900
        return isSetToUserId();
553 chandransh 29901
      }
29902
      throw new IllegalStateException();
29903
    }
29904
 
29905
    public boolean isSet(int fieldID) {
29906
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29907
    }
29908
 
29909
    @Override
29910
    public boolean equals(Object that) {
29911
      if (that == null)
29912
        return false;
771 rajveer 29913
      if (that instanceof mergeBrowseHistory_args)
29914
        return this.equals((mergeBrowseHistory_args)that);
553 chandransh 29915
      return false;
29916
    }
29917
 
771 rajveer 29918
    public boolean equals(mergeBrowseHistory_args that) {
553 chandransh 29919
      if (that == null)
29920
        return false;
29921
 
771 rajveer 29922
      boolean this_present_fromUserId = true;
29923
      boolean that_present_fromUserId = true;
29924
      if (this_present_fromUserId || that_present_fromUserId) {
29925
        if (!(this_present_fromUserId && that_present_fromUserId))
553 chandransh 29926
          return false;
771 rajveer 29927
        if (this.fromUserId != that.fromUserId)
553 chandransh 29928
          return false;
29929
      }
29930
 
771 rajveer 29931
      boolean this_present_toUserId = true;
29932
      boolean that_present_toUserId = true;
29933
      if (this_present_toUserId || that_present_toUserId) {
29934
        if (!(this_present_toUserId && that_present_toUserId))
553 chandransh 29935
          return false;
771 rajveer 29936
        if (this.toUserId != that.toUserId)
553 chandransh 29937
          return false;
29938
      }
29939
 
29940
      return true;
29941
    }
29942
 
29943
    @Override
29944
    public int hashCode() {
29945
      return 0;
29946
    }
29947
 
771 rajveer 29948
    public int compareTo(mergeBrowseHistory_args other) {
553 chandransh 29949
      if (!getClass().equals(other.getClass())) {
29950
        return getClass().getName().compareTo(other.getClass().getName());
29951
      }
29952
 
29953
      int lastComparison = 0;
771 rajveer 29954
      mergeBrowseHistory_args typedOther = (mergeBrowseHistory_args)other;
553 chandransh 29955
 
771 rajveer 29956
      lastComparison = Boolean.valueOf(isSetFromUserId()).compareTo(isSetFromUserId());
553 chandransh 29957
      if (lastComparison != 0) {
29958
        return lastComparison;
29959
      }
771 rajveer 29960
      lastComparison = TBaseHelper.compareTo(fromUserId, typedOther.fromUserId);
553 chandransh 29961
      if (lastComparison != 0) {
29962
        return lastComparison;
29963
      }
771 rajveer 29964
      lastComparison = Boolean.valueOf(isSetToUserId()).compareTo(isSetToUserId());
553 chandransh 29965
      if (lastComparison != 0) {
29966
        return lastComparison;
29967
      }
771 rajveer 29968
      lastComparison = TBaseHelper.compareTo(toUserId, typedOther.toUserId);
553 chandransh 29969
      if (lastComparison != 0) {
29970
        return lastComparison;
29971
      }
29972
      return 0;
29973
    }
29974
 
29975
    public void read(TProtocol iprot) throws TException {
29976
      TField field;
29977
      iprot.readStructBegin();
29978
      while (true)
29979
      {
29980
        field = iprot.readFieldBegin();
29981
        if (field.type == TType.STOP) { 
29982
          break;
29983
        }
29984
        _Fields fieldId = _Fields.findByThriftId(field.id);
29985
        if (fieldId == null) {
29986
          TProtocolUtil.skip(iprot, field.type);
29987
        } else {
29988
          switch (fieldId) {
771 rajveer 29989
            case FROM_USER_ID:
553 chandransh 29990
              if (field.type == TType.I64) {
771 rajveer 29991
                this.fromUserId = iprot.readI64();
29992
                setFromUserIdIsSet(true);
553 chandransh 29993
              } else { 
29994
                TProtocolUtil.skip(iprot, field.type);
29995
              }
29996
              break;
771 rajveer 29997
            case TO_USER_ID:
553 chandransh 29998
              if (field.type == TType.I64) {
771 rajveer 29999
                this.toUserId = iprot.readI64();
30000
                setToUserIdIsSet(true);
553 chandransh 30001
              } else { 
30002
                TProtocolUtil.skip(iprot, field.type);
30003
              }
30004
              break;
30005
          }
30006
          iprot.readFieldEnd();
30007
        }
30008
      }
30009
      iprot.readStructEnd();
30010
      validate();
30011
    }
30012
 
30013
    public void write(TProtocol oprot) throws TException {
30014
      validate();
30015
 
30016
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 30017
      oprot.writeFieldBegin(FROM_USER_ID_FIELD_DESC);
30018
      oprot.writeI64(this.fromUserId);
553 chandransh 30019
      oprot.writeFieldEnd();
771 rajveer 30020
      oprot.writeFieldBegin(TO_USER_ID_FIELD_DESC);
30021
      oprot.writeI64(this.toUserId);
553 chandransh 30022
      oprot.writeFieldEnd();
30023
      oprot.writeFieldStop();
30024
      oprot.writeStructEnd();
30025
    }
30026
 
30027
    @Override
30028
    public String toString() {
771 rajveer 30029
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_args(");
553 chandransh 30030
      boolean first = true;
30031
 
771 rajveer 30032
      sb.append("fromUserId:");
30033
      sb.append(this.fromUserId);
553 chandransh 30034
      first = false;
30035
      if (!first) sb.append(", ");
771 rajveer 30036
      sb.append("toUserId:");
30037
      sb.append(this.toUserId);
553 chandransh 30038
      first = false;
30039
      sb.append(")");
30040
      return sb.toString();
30041
    }
30042
 
30043
    public void validate() throws TException {
30044
      // check for required fields
30045
    }
30046
 
30047
  }
30048
 
771 rajveer 30049
  public static class mergeBrowseHistory_result implements TBase<mergeBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_result>   {
30050
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_result");
553 chandransh 30051
 
30052
 
30053
 
30054
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30055
    public enum _Fields implements TFieldIdEnum {
30056
;
30057
 
30058
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30059
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30060
 
30061
      static {
30062
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30063
          byId.put((int)field._thriftId, field);
30064
          byName.put(field.getFieldName(), field);
30065
        }
30066
      }
30067
 
30068
      /**
30069
       * Find the _Fields constant that matches fieldId, or null if its not found.
30070
       */
30071
      public static _Fields findByThriftId(int fieldId) {
30072
        return byId.get(fieldId);
30073
      }
30074
 
30075
      /**
30076
       * Find the _Fields constant that matches fieldId, throwing an exception
30077
       * if it is not found.
30078
       */
30079
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30080
        _Fields fields = findByThriftId(fieldId);
30081
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30082
        return fields;
30083
      }
30084
 
30085
      /**
30086
       * Find the _Fields constant that matches name, or null if its not found.
30087
       */
30088
      public static _Fields findByName(String name) {
30089
        return byName.get(name);
30090
      }
30091
 
30092
      private final short _thriftId;
30093
      private final String _fieldName;
30094
 
30095
      _Fields(short thriftId, String fieldName) {
30096
        _thriftId = thriftId;
30097
        _fieldName = fieldName;
30098
      }
30099
 
30100
      public short getThriftFieldId() {
30101
        return _thriftId;
30102
      }
30103
 
30104
      public String getFieldName() {
30105
        return _fieldName;
30106
      }
30107
    }
30108
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30109
    }});
30110
 
30111
    static {
771 rajveer 30112
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_result.class, metaDataMap);
553 chandransh 30113
    }
30114
 
771 rajveer 30115
    public mergeBrowseHistory_result() {
553 chandransh 30116
    }
30117
 
30118
    /**
30119
     * Performs a deep copy on <i>other</i>.
30120
     */
771 rajveer 30121
    public mergeBrowseHistory_result(mergeBrowseHistory_result other) {
553 chandransh 30122
    }
30123
 
771 rajveer 30124
    public mergeBrowseHistory_result deepCopy() {
30125
      return new mergeBrowseHistory_result(this);
553 chandransh 30126
    }
30127
 
130 ashish 30128
    @Deprecated
771 rajveer 30129
    public mergeBrowseHistory_result clone() {
30130
      return new mergeBrowseHistory_result(this);
130 ashish 30131
    }
30132
 
553 chandransh 30133
    public void setFieldValue(_Fields field, Object value) {
30134
      switch (field) {
30135
      }
30136
    }
30137
 
30138
    public void setFieldValue(int fieldID, Object value) {
30139
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30140
    }
30141
 
30142
    public Object getFieldValue(_Fields field) {
30143
      switch (field) {
30144
      }
30145
      throw new IllegalStateException();
30146
    }
30147
 
30148
    public Object getFieldValue(int fieldId) {
30149
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30150
    }
30151
 
30152
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30153
    public boolean isSet(_Fields field) {
30154
      switch (field) {
30155
      }
30156
      throw new IllegalStateException();
30157
    }
30158
 
30159
    public boolean isSet(int fieldID) {
30160
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30161
    }
30162
 
30163
    @Override
30164
    public boolean equals(Object that) {
30165
      if (that == null)
30166
        return false;
771 rajveer 30167
      if (that instanceof mergeBrowseHistory_result)
30168
        return this.equals((mergeBrowseHistory_result)that);
553 chandransh 30169
      return false;
30170
    }
30171
 
771 rajveer 30172
    public boolean equals(mergeBrowseHistory_result that) {
553 chandransh 30173
      if (that == null)
30174
        return false;
30175
 
30176
      return true;
30177
    }
30178
 
30179
    @Override
30180
    public int hashCode() {
30181
      return 0;
30182
    }
30183
 
771 rajveer 30184
    public int compareTo(mergeBrowseHistory_result other) {
553 chandransh 30185
      if (!getClass().equals(other.getClass())) {
30186
        return getClass().getName().compareTo(other.getClass().getName());
30187
      }
30188
 
30189
      int lastComparison = 0;
771 rajveer 30190
      mergeBrowseHistory_result typedOther = (mergeBrowseHistory_result)other;
553 chandransh 30191
 
30192
      return 0;
30193
    }
30194
 
30195
    public void read(TProtocol iprot) throws TException {
30196
      TField field;
30197
      iprot.readStructBegin();
30198
      while (true)
30199
      {
30200
        field = iprot.readFieldBegin();
30201
        if (field.type == TType.STOP) { 
30202
          break;
30203
        }
30204
        _Fields fieldId = _Fields.findByThriftId(field.id);
30205
        if (fieldId == null) {
30206
          TProtocolUtil.skip(iprot, field.type);
30207
        } else {
30208
          switch (fieldId) {
30209
          }
30210
          iprot.readFieldEnd();
30211
        }
30212
      }
30213
      iprot.readStructEnd();
30214
      validate();
30215
    }
30216
 
30217
    public void write(TProtocol oprot) throws TException {
30218
      oprot.writeStructBegin(STRUCT_DESC);
30219
 
30220
      oprot.writeFieldStop();
30221
      oprot.writeStructEnd();
30222
    }
30223
 
30224
    @Override
30225
    public String toString() {
771 rajveer 30226
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_result(");
553 chandransh 30227
      boolean first = true;
30228
 
30229
      sb.append(")");
30230
      return sb.toString();
30231
    }
30232
 
30233
    public void validate() throws TException {
30234
      // check for required fields
30235
    }
30236
 
30237
  }
30238
 
48 ashish 30239
}