Subversion Repositories SmartDukaan

Rev

Rev 1466 | Rev 1590 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
48 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.user;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class UserContextService {
27
 
28
  /**
29
   * service
30
   */
31
  public interface Iface {
32
 
764 rajveer 33
    /**
34
     * For closing the open session in sqlalchemy
35
     */
36
    public void closeSession() throws TException;
37
 
553 chandransh 38
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException;
48 ashish 39
 
553 chandransh 40
    public User getUserById(long userId) throws UserContextException, TException;
48 ashish 41
 
1491 vikas 42
    public User getUserByEmail(String email) throws UserContextException, TException;
43
 
553 chandransh 44
    public User createUser(User user) throws UserContextException, TException;
48 ashish 45
 
553 chandransh 46
    public User updateUser(User user) throws UserContextException, TException;
48 ashish 47
 
553 chandransh 48
    public boolean deleteUser(long userId) throws UserContextException, TException;
48 ashish 49
 
553 chandransh 50
    public UserState getUserState(long userId) throws UserContextException, TException;
48 ashish 51
 
553 chandransh 52
    public User authenticateUser(String email, String password) throws AuthenticationException, TException;
48 ashish 53
 
54
    public boolean userExists(String email) throws UserContextException, TException;
55
 
571 rajveer 56
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException;
48 ashish 57
 
58
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
59
 
60
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
61
 
62
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
63
 
506 rajveer 64
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
65
 
593 rajveer 66
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException;
48 ashish 67
 
896 rajveer 68
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException;
582 rajveer 69
 
593 rajveer 70
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
71
 
72
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
73
 
784 rajveer 74
    public String getDefaultPincode(long userId) throws UserContextException, TException;
75
 
1177 varun.gupt 76
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException;
77
 
553 chandransh 78
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 79
 
553 chandransh 80
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 81
 
553 chandransh 82
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 83
 
553 chandransh 84
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 85
 
553 chandransh 86
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 87
 
553 chandransh 88
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 89
 
553 chandransh 90
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 91
 
553 chandransh 92
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 93
 
553 chandransh 94
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
95
 
96
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
97
 
98
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
99
 
578 chandransh 100
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 101
 
688 chandransh 102
    /**
103
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
104
     * 
105
     * @param cartId
106
     */
107
    public long createOrders(long cartId) throws ShoppingCartException, TException;
553 chandransh 108
 
688 chandransh 109
    /**
110
     * Validates that:
111
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
1466 ankur.sing 112
     * 2. All of the lines in the cart are active items.
688 chandransh 113
     * 3. The estimate for any of the lines in cart doesn't change.
1466 ankur.sing 114
     * If all three are true, returns empty string; else returns appropriate message.
688 chandransh 115
     * 
116
     * @param cartId
117
     */
1466 ankur.sing 118
    public String validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 119
 
688 chandransh 120
    /**
121
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
122
     * 
123
     * @param fromCartId
124
     * @param toCartId
125
     */
553 chandransh 126
    public void mergeCart(long fromCartId, long toCartId) throws TException;
127
 
688 chandransh 128
    /**
129
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
130
     * 
131
     * @param cartId
132
     */
133
    public boolean checkOut(long cartId) throws ShoppingCartException, TException;
134
 
135
    /**
136
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
137
     * This methods removes the specified quantiry of the specified item from the cart.
138
     * 
139
     * @param cartId
140
     * @param items
141
     */
708 rajveer 142
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException;
688 chandransh 143
 
771 rajveer 144
    /**
145
     * Widgets
146
     * 
147
     * @param userId
148
     */
149
    public Widget getMyResearch(long userId) throws WidgetException, TException;
553 chandransh 150
 
771 rajveer 151
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 152
 
771 rajveer 153
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 154
 
771 rajveer 155
    public void updateBrowseHistory(long userId, long itemId) throws TException;
553 chandransh 156
 
771 rajveer 157
    public Widget getBrowseHistory(long userId) throws WidgetException, TException;
553 chandransh 158
 
771 rajveer 159
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException;
553 chandransh 160
 
48 ashish 161
  }
162
 
163
  public static class Client implements Iface {
164
    public Client(TProtocol prot)
165
    {
166
      this(prot, prot);
167
    }
168
 
169
    public Client(TProtocol iprot, TProtocol oprot)
170
    {
171
      iprot_ = iprot;
172
      oprot_ = oprot;
173
    }
174
 
175
    protected TProtocol iprot_;
176
    protected TProtocol oprot_;
177
 
178
    protected int seqid_;
179
 
180
    public TProtocol getInputProtocol()
181
    {
182
      return this.iprot_;
183
    }
184
 
185
    public TProtocol getOutputProtocol()
186
    {
187
      return this.oprot_;
188
    }
189
 
764 rajveer 190
    public void closeSession() throws TException
191
    {
192
      send_closeSession();
193
      recv_closeSession();
194
    }
195
 
196
    public void send_closeSession() throws TException
197
    {
198
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
199
      closeSession_args args = new closeSession_args();
200
      args.write(oprot_);
201
      oprot_.writeMessageEnd();
202
      oprot_.getTransport().flush();
203
    }
204
 
205
    public void recv_closeSession() throws TException
206
    {
207
      TMessage msg = iprot_.readMessageBegin();
208
      if (msg.type == TMessageType.EXCEPTION) {
209
        TApplicationException x = TApplicationException.read(iprot_);
210
        iprot_.readMessageEnd();
211
        throw x;
212
      }
213
      closeSession_result result = new closeSession_result();
214
      result.read(iprot_);
215
      iprot_.readMessageEnd();
216
      return;
217
    }
218
 
553 chandransh 219
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 220
    {
553 chandransh 221
      send_createAnonymousUser(jsessionId);
222
      return recv_createAnonymousUser();
48 ashish 223
    }
224
 
553 chandransh 225
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 226
    {
553 chandransh 227
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
228
      createAnonymousUser_args args = new createAnonymousUser_args();
229
      args.jsessionId = jsessionId;
48 ashish 230
      args.write(oprot_);
231
      oprot_.writeMessageEnd();
232
      oprot_.getTransport().flush();
233
    }
234
 
553 chandransh 235
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 236
    {
237
      TMessage msg = iprot_.readMessageBegin();
238
      if (msg.type == TMessageType.EXCEPTION) {
239
        TApplicationException x = TApplicationException.read(iprot_);
240
        iprot_.readMessageEnd();
241
        throw x;
242
      }
553 chandransh 243
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 244
      result.read(iprot_);
245
      iprot_.readMessageEnd();
246
      if (result.isSetSuccess()) {
247
        return result.success;
248
      }
553 chandransh 249
      if (result.ucex != null) {
250
        throw result.ucex;
48 ashish 251
      }
553 chandransh 252
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 253
    }
254
 
553 chandransh 255
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 256
    {
553 chandransh 257
      send_getUserById(userId);
258
      return recv_getUserById();
48 ashish 259
    }
260
 
553 chandransh 261
    public void send_getUserById(long userId) throws TException
48 ashish 262
    {
553 chandransh 263
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
264
      getUserById_args args = new getUserById_args();
48 ashish 265
      args.userId = userId;
266
      args.write(oprot_);
267
      oprot_.writeMessageEnd();
268
      oprot_.getTransport().flush();
269
    }
270
 
553 chandransh 271
    public User recv_getUserById() throws UserContextException, TException
48 ashish 272
    {
273
      TMessage msg = iprot_.readMessageBegin();
274
      if (msg.type == TMessageType.EXCEPTION) {
275
        TApplicationException x = TApplicationException.read(iprot_);
276
        iprot_.readMessageEnd();
277
        throw x;
278
      }
553 chandransh 279
      getUserById_result result = new getUserById_result();
48 ashish 280
      result.read(iprot_);
281
      iprot_.readMessageEnd();
282
      if (result.isSetSuccess()) {
283
        return result.success;
284
      }
553 chandransh 285
      if (result.ucex != null) {
286
        throw result.ucex;
48 ashish 287
      }
553 chandransh 288
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 289
    }
290
 
1491 vikas 291
    public User getUserByEmail(String email) throws UserContextException, TException
292
    {
293
      send_getUserByEmail(email);
294
      return recv_getUserByEmail();
295
    }
296
 
297
    public void send_getUserByEmail(String email) throws TException
298
    {
299
      oprot_.writeMessageBegin(new TMessage("getUserByEmail", TMessageType.CALL, seqid_));
300
      getUserByEmail_args args = new getUserByEmail_args();
301
      args.email = email;
302
      args.write(oprot_);
303
      oprot_.writeMessageEnd();
304
      oprot_.getTransport().flush();
305
    }
306
 
307
    public User recv_getUserByEmail() throws UserContextException, TException
308
    {
309
      TMessage msg = iprot_.readMessageBegin();
310
      if (msg.type == TMessageType.EXCEPTION) {
311
        TApplicationException x = TApplicationException.read(iprot_);
312
        iprot_.readMessageEnd();
313
        throw x;
314
      }
315
      getUserByEmail_result result = new getUserByEmail_result();
316
      result.read(iprot_);
317
      iprot_.readMessageEnd();
318
      if (result.isSetSuccess()) {
319
        return result.success;
320
      }
321
      if (result.ucex != null) {
322
        throw result.ucex;
323
      }
324
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserByEmail failed: unknown result");
325
    }
326
 
553 chandransh 327
    public User createUser(User user) throws UserContextException, TException
48 ashish 328
    {
553 chandransh 329
      send_createUser(user);
330
      return recv_createUser();
48 ashish 331
    }
332
 
553 chandransh 333
    public void send_createUser(User user) throws TException
48 ashish 334
    {
553 chandransh 335
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
336
      createUser_args args = new createUser_args();
337
      args.user = user;
48 ashish 338
      args.write(oprot_);
339
      oprot_.writeMessageEnd();
340
      oprot_.getTransport().flush();
341
    }
342
 
553 chandransh 343
    public User recv_createUser() throws UserContextException, TException
48 ashish 344
    {
345
      TMessage msg = iprot_.readMessageBegin();
346
      if (msg.type == TMessageType.EXCEPTION) {
347
        TApplicationException x = TApplicationException.read(iprot_);
348
        iprot_.readMessageEnd();
349
        throw x;
350
      }
553 chandransh 351
      createUser_result result = new createUser_result();
48 ashish 352
      result.read(iprot_);
353
      iprot_.readMessageEnd();
354
      if (result.isSetSuccess()) {
355
        return result.success;
356
      }
553 chandransh 357
      if (result.ucex != null) {
358
        throw result.ucex;
48 ashish 359
      }
553 chandransh 360
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 361
    }
362
 
553 chandransh 363
    public User updateUser(User user) throws UserContextException, TException
48 ashish 364
    {
553 chandransh 365
      send_updateUser(user);
366
      return recv_updateUser();
48 ashish 367
    }
368
 
553 chandransh 369
    public void send_updateUser(User user) throws TException
48 ashish 370
    {
553 chandransh 371
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
372
      updateUser_args args = new updateUser_args();
373
      args.user = user;
48 ashish 374
      args.write(oprot_);
375
      oprot_.writeMessageEnd();
376
      oprot_.getTransport().flush();
377
    }
378
 
553 chandransh 379
    public User recv_updateUser() throws UserContextException, TException
48 ashish 380
    {
381
      TMessage msg = iprot_.readMessageBegin();
382
      if (msg.type == TMessageType.EXCEPTION) {
383
        TApplicationException x = TApplicationException.read(iprot_);
384
        iprot_.readMessageEnd();
385
        throw x;
386
      }
553 chandransh 387
      updateUser_result result = new updateUser_result();
48 ashish 388
      result.read(iprot_);
389
      iprot_.readMessageEnd();
390
      if (result.isSetSuccess()) {
391
        return result.success;
392
      }
553 chandransh 393
      if (result.ucex != null) {
394
        throw result.ucex;
48 ashish 395
      }
553 chandransh 396
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 397
    }
398
 
553 chandransh 399
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 400
    {
553 chandransh 401
      send_deleteUser(userId);
402
      return recv_deleteUser();
48 ashish 403
    }
404
 
553 chandransh 405
    public void send_deleteUser(long userId) throws TException
48 ashish 406
    {
553 chandransh 407
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
408
      deleteUser_args args = new deleteUser_args();
48 ashish 409
      args.userId = userId;
410
      args.write(oprot_);
411
      oprot_.writeMessageEnd();
412
      oprot_.getTransport().flush();
413
    }
414
 
553 chandransh 415
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 416
    {
417
      TMessage msg = iprot_.readMessageBegin();
418
      if (msg.type == TMessageType.EXCEPTION) {
419
        TApplicationException x = TApplicationException.read(iprot_);
420
        iprot_.readMessageEnd();
421
        throw x;
422
      }
553 chandransh 423
      deleteUser_result result = new deleteUser_result();
48 ashish 424
      result.read(iprot_);
425
      iprot_.readMessageEnd();
426
      if (result.isSetSuccess()) {
427
        return result.success;
428
      }
553 chandransh 429
      if (result.ucex != null) {
430
        throw result.ucex;
48 ashish 431
      }
553 chandransh 432
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 433
    }
434
 
553 chandransh 435
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 436
    {
553 chandransh 437
      send_getUserState(userId);
438
      return recv_getUserState();
48 ashish 439
    }
440
 
553 chandransh 441
    public void send_getUserState(long userId) throws TException
48 ashish 442
    {
553 chandransh 443
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
444
      getUserState_args args = new getUserState_args();
48 ashish 445
      args.userId = userId;
446
      args.write(oprot_);
447
      oprot_.writeMessageEnd();
448
      oprot_.getTransport().flush();
449
    }
450
 
553 chandransh 451
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 452
    {
453
      TMessage msg = iprot_.readMessageBegin();
454
      if (msg.type == TMessageType.EXCEPTION) {
455
        TApplicationException x = TApplicationException.read(iprot_);
456
        iprot_.readMessageEnd();
457
        throw x;
458
      }
553 chandransh 459
      getUserState_result result = new getUserState_result();
48 ashish 460
      result.read(iprot_);
461
      iprot_.readMessageEnd();
462
      if (result.isSetSuccess()) {
463
        return result.success;
464
      }
553 chandransh 465
      if (result.ucex != null) {
466
        throw result.ucex;
48 ashish 467
      }
553 chandransh 468
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 469
    }
470
 
553 chandransh 471
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 472
    {
553 chandransh 473
      send_authenticateUser(email, password);
123 ashish 474
      return recv_authenticateUser();
475
    }
476
 
553 chandransh 477
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 478
    {
479
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
480
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 481
      args.email = email;
123 ashish 482
      args.password = password;
483
      args.write(oprot_);
484
      oprot_.writeMessageEnd();
485
      oprot_.getTransport().flush();
486
    }
487
 
553 chandransh 488
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 489
    {
490
      TMessage msg = iprot_.readMessageBegin();
491
      if (msg.type == TMessageType.EXCEPTION) {
492
        TApplicationException x = TApplicationException.read(iprot_);
493
        iprot_.readMessageEnd();
494
        throw x;
495
      }
496
      authenticateUser_result result = new authenticateUser_result();
497
      result.read(iprot_);
498
      iprot_.readMessageEnd();
499
      if (result.isSetSuccess()) {
500
        return result.success;
501
      }
553 chandransh 502
      if (result.auex != null) {
503
        throw result.auex;
123 ashish 504
      }
505
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
506
    }
507
 
48 ashish 508
    public boolean userExists(String email) throws UserContextException, TException
509
    {
510
      send_userExists(email);
511
      return recv_userExists();
512
    }
513
 
514
    public void send_userExists(String email) throws TException
515
    {
516
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
517
      userExists_args args = new userExists_args();
518
      args.email = email;
519
      args.write(oprot_);
520
      oprot_.writeMessageEnd();
521
      oprot_.getTransport().flush();
522
    }
523
 
524
    public boolean recv_userExists() throws UserContextException, TException
525
    {
526
      TMessage msg = iprot_.readMessageBegin();
527
      if (msg.type == TMessageType.EXCEPTION) {
528
        TApplicationException x = TApplicationException.read(iprot_);
529
        iprot_.readMessageEnd();
530
        throw x;
531
      }
532
      userExists_result result = new userExists_result();
533
      result.read(iprot_);
534
      iprot_.readMessageEnd();
535
      if (result.isSetSuccess()) {
536
        return result.success;
537
      }
538
      if (result.ucx != null) {
539
        throw result.ucx;
540
      }
541
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
542
    }
543
 
571 rajveer 544
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 545
    {
571 rajveer 546
      send_addAddressForUser(userId, address, setDefault);
48 ashish 547
      return recv_addAddressForUser();
548
    }
549
 
571 rajveer 550
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 551
    {
552
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
553
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 554
      args.userId = userId;
48 ashish 555
      args.address = address;
513 rajveer 556
      args.setDefault = setDefault;
48 ashish 557
      args.write(oprot_);
558
      oprot_.writeMessageEnd();
559
      oprot_.getTransport().flush();
560
    }
561
 
571 rajveer 562
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 563
    {
564
      TMessage msg = iprot_.readMessageBegin();
565
      if (msg.type == TMessageType.EXCEPTION) {
566
        TApplicationException x = TApplicationException.read(iprot_);
567
        iprot_.readMessageEnd();
568
        throw x;
569
      }
570
      addAddressForUser_result result = new addAddressForUser_result();
571
      result.read(iprot_);
572
      iprot_.readMessageEnd();
573
      if (result.isSetSuccess()) {
574
        return result.success;
575
      }
576
      if (result.ucx != null) {
577
        throw result.ucx;
578
      }
579
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addAddressForUser failed: unknown result");
580
    }
581
 
582
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
583
    {
584
      send_removeAddressForUser(userid, addressId);
585
      return recv_removeAddressForUser();
586
    }
587
 
588
    public void send_removeAddressForUser(long userid, long addressId) throws TException
589
    {
590
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
591
      removeAddressForUser_args args = new removeAddressForUser_args();
592
      args.userid = userid;
593
      args.addressId = addressId;
594
      args.write(oprot_);
595
      oprot_.writeMessageEnd();
596
      oprot_.getTransport().flush();
597
    }
598
 
599
    public boolean recv_removeAddressForUser() throws UserContextException, TException
600
    {
601
      TMessage msg = iprot_.readMessageBegin();
602
      if (msg.type == TMessageType.EXCEPTION) {
603
        TApplicationException x = TApplicationException.read(iprot_);
604
        iprot_.readMessageEnd();
605
        throw x;
606
      }
607
      removeAddressForUser_result result = new removeAddressForUser_result();
608
      result.read(iprot_);
609
      iprot_.readMessageEnd();
610
      if (result.isSetSuccess()) {
611
        return result.success;
612
      }
613
      if (result.ucx != null) {
614
        throw result.ucx;
615
      }
616
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
617
    }
618
 
619
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
620
    {
621
      send_setUserAsLoggedIn(userId, timestamp);
622
      return recv_setUserAsLoggedIn();
623
    }
624
 
625
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
626
    {
627
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
628
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
629
      args.userId = userId;
630
      args.timestamp = timestamp;
631
      args.write(oprot_);
632
      oprot_.writeMessageEnd();
633
      oprot_.getTransport().flush();
634
    }
635
 
636
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
637
    {
638
      TMessage msg = iprot_.readMessageBegin();
639
      if (msg.type == TMessageType.EXCEPTION) {
640
        TApplicationException x = TApplicationException.read(iprot_);
641
        iprot_.readMessageEnd();
642
        throw x;
643
      }
644
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
645
      result.read(iprot_);
646
      iprot_.readMessageEnd();
647
      if (result.isSetSuccess()) {
648
        return result.success;
649
      }
650
      if (result.ucx != null) {
651
        throw result.ucx;
652
      }
653
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
654
    }
655
 
656
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
657
    {
658
      send_setUserAsLoggedOut(userid, timestamp);
659
      return recv_setUserAsLoggedOut();
660
    }
661
 
662
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
663
    {
664
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
665
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
666
      args.userid = userid;
667
      args.timestamp = timestamp;
668
      args.write(oprot_);
669
      oprot_.writeMessageEnd();
670
      oprot_.getTransport().flush();
671
    }
672
 
673
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
674
    {
675
      TMessage msg = iprot_.readMessageBegin();
676
      if (msg.type == TMessageType.EXCEPTION) {
677
        TApplicationException x = TApplicationException.read(iprot_);
678
        iprot_.readMessageEnd();
679
        throw x;
680
      }
681
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
682
      result.read(iprot_);
683
      iprot_.readMessageEnd();
684
      if (result.isSetSuccess()) {
685
        return result.success;
686
      }
687
      if (result.ucx != null) {
688
        throw result.ucx;
689
      }
690
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
691
    }
692
 
506 rajveer 693
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
694
    {
695
      send_setDefaultAddress(userid, addressId);
696
      return recv_setDefaultAddress();
697
    }
698
 
699
    public void send_setDefaultAddress(long userid, long addressId) throws TException
700
    {
701
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
702
      setDefaultAddress_args args = new setDefaultAddress_args();
703
      args.userid = userid;
704
      args.addressId = addressId;
705
      args.write(oprot_);
706
      oprot_.writeMessageEnd();
707
      oprot_.getTransport().flush();
708
    }
709
 
710
    public boolean recv_setDefaultAddress() throws UserContextException, TException
711
    {
712
      TMessage msg = iprot_.readMessageBegin();
713
      if (msg.type == TMessageType.EXCEPTION) {
714
        TApplicationException x = TApplicationException.read(iprot_);
715
        iprot_.readMessageEnd();
716
        throw x;
717
      }
718
      setDefaultAddress_result result = new setDefaultAddress_result();
719
      result.read(iprot_);
720
      iprot_.readMessageEnd();
721
      if (result.isSetSuccess()) {
722
        return result.success;
723
      }
724
      if (result.ucx != null) {
725
        throw result.ucx;
726
      }
727
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
728
    }
729
 
593 rajveer 730
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 731
    {
593 rajveer 732
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 733
      return recv_updatePassword();
734
    }
735
 
593 rajveer 736
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 737
    {
738
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
739
      updatePassword_args args = new updatePassword_args();
740
      args.userid = userid;
593 rajveer 741
      args.oldPassword = oldPassword;
742
      args.newPassword = newPassword;
48 ashish 743
      args.write(oprot_);
744
      oprot_.writeMessageEnd();
745
      oprot_.getTransport().flush();
746
    }
747
 
748
    public boolean recv_updatePassword() throws UserContextException, TException
749
    {
750
      TMessage msg = iprot_.readMessageBegin();
751
      if (msg.type == TMessageType.EXCEPTION) {
752
        TApplicationException x = TApplicationException.read(iprot_);
753
        iprot_.readMessageEnd();
754
        throw x;
755
      }
756
      updatePassword_result result = new updatePassword_result();
757
      result.read(iprot_);
758
      iprot_.readMessageEnd();
759
      if (result.isSetSuccess()) {
760
        return result.success;
761
      }
762
      if (result.ucx != null) {
763
        throw result.ucx;
764
      }
765
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updatePassword failed: unknown result");
766
    }
767
 
896 rajveer 768
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException
582 rajveer 769
    {
896 rajveer 770
      send_forgotPassword(email, newPassword);
582 rajveer 771
      return recv_forgotPassword();
772
    }
773
 
896 rajveer 774
    public void send_forgotPassword(String email, String newPassword) throws TException
582 rajveer 775
    {
776
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
777
      forgotPassword_args args = new forgotPassword_args();
778
      args.email = email;
896 rajveer 779
      args.newPassword = newPassword;
582 rajveer 780
      args.write(oprot_);
781
      oprot_.writeMessageEnd();
782
      oprot_.getTransport().flush();
783
    }
784
 
785
    public boolean recv_forgotPassword() throws UserContextException, TException
786
    {
787
      TMessage msg = iprot_.readMessageBegin();
788
      if (msg.type == TMessageType.EXCEPTION) {
789
        TApplicationException x = TApplicationException.read(iprot_);
790
        iprot_.readMessageEnd();
791
        throw x;
792
      }
793
      forgotPassword_result result = new forgotPassword_result();
794
      result.read(iprot_);
795
      iprot_.readMessageEnd();
796
      if (result.isSetSuccess()) {
797
        return result.success;
798
      }
799
      if (result.ucx != null) {
800
        throw result.ucx;
801
      }
802
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
803
    }
804
 
593 rajveer 805
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
806
    {
807
      send_getAllAddressesForUser(userId);
808
      return recv_getAllAddressesForUser();
809
    }
810
 
811
    public void send_getAllAddressesForUser(long userId) throws TException
812
    {
813
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
814
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
815
      args.userId = userId;
816
      args.write(oprot_);
817
      oprot_.writeMessageEnd();
818
      oprot_.getTransport().flush();
819
    }
820
 
821
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
822
    {
823
      TMessage msg = iprot_.readMessageBegin();
824
      if (msg.type == TMessageType.EXCEPTION) {
825
        TApplicationException x = TApplicationException.read(iprot_);
826
        iprot_.readMessageEnd();
827
        throw x;
828
      }
829
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
830
      result.read(iprot_);
831
      iprot_.readMessageEnd();
832
      if (result.isSetSuccess()) {
833
        return result.success;
834
      }
835
      if (result.ucx != null) {
836
        throw result.ucx;
837
      }
838
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
839
    }
840
 
841
    public long getDefaultAddressId(long userId) throws UserContextException, TException
842
    {
843
      send_getDefaultAddressId(userId);
844
      return recv_getDefaultAddressId();
845
    }
846
 
847
    public void send_getDefaultAddressId(long userId) throws TException
848
    {
849
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
850
      getDefaultAddressId_args args = new getDefaultAddressId_args();
851
      args.userId = userId;
852
      args.write(oprot_);
853
      oprot_.writeMessageEnd();
854
      oprot_.getTransport().flush();
855
    }
856
 
857
    public long recv_getDefaultAddressId() throws UserContextException, TException
858
    {
859
      TMessage msg = iprot_.readMessageBegin();
860
      if (msg.type == TMessageType.EXCEPTION) {
861
        TApplicationException x = TApplicationException.read(iprot_);
862
        iprot_.readMessageEnd();
863
        throw x;
864
      }
865
      getDefaultAddressId_result result = new getDefaultAddressId_result();
866
      result.read(iprot_);
867
      iprot_.readMessageEnd();
868
      if (result.isSetSuccess()) {
869
        return result.success;
870
      }
871
      if (result.ucx != null) {
872
        throw result.ucx;
873
      }
874
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
875
    }
876
 
784 rajveer 877
    public String getDefaultPincode(long userId) throws UserContextException, TException
878
    {
879
      send_getDefaultPincode(userId);
880
      return recv_getDefaultPincode();
881
    }
882
 
883
    public void send_getDefaultPincode(long userId) throws TException
884
    {
885
      oprot_.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.CALL, seqid_));
886
      getDefaultPincode_args args = new getDefaultPincode_args();
887
      args.userId = userId;
888
      args.write(oprot_);
889
      oprot_.writeMessageEnd();
890
      oprot_.getTransport().flush();
891
    }
892
 
893
    public String recv_getDefaultPincode() throws UserContextException, TException
894
    {
895
      TMessage msg = iprot_.readMessageBegin();
896
      if (msg.type == TMessageType.EXCEPTION) {
897
        TApplicationException x = TApplicationException.read(iprot_);
898
        iprot_.readMessageEnd();
899
        throw x;
900
      }
901
      getDefaultPincode_result result = new getDefaultPincode_result();
902
      result.read(iprot_);
903
      iprot_.readMessageEnd();
904
      if (result.isSetSuccess()) {
905
        return result.success;
906
      }
907
      if (result.ucx != null) {
908
        throw result.ucx;
909
      }
910
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
911
    }
912
 
1177 varun.gupt 913
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException
914
    {
915
      send_saveUserCommunication(userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message);
916
      return recv_saveUserCommunication();
917
    }
918
 
919
    public void send_saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws TException
920
    {
921
      oprot_.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.CALL, seqid_));
922
      saveUserCommunication_args args = new saveUserCommunication_args();
923
      args.userId = userId;
924
      args.replyTo = replyTo;
925
      args.communicationType = communicationType;
926
      args.orderId = orderId;
927
      args.airwaybillNo = airwaybillNo;
928
      args.productName = productName;
929
      args.subject = subject;
930
      args.message = message;
931
      args.write(oprot_);
932
      oprot_.writeMessageEnd();
933
      oprot_.getTransport().flush();
934
    }
935
 
936
    public boolean recv_saveUserCommunication() throws UserCommunicationException, TException
937
    {
938
      TMessage msg = iprot_.readMessageBegin();
939
      if (msg.type == TMessageType.EXCEPTION) {
940
        TApplicationException x = TApplicationException.read(iprot_);
941
        iprot_.readMessageEnd();
942
        throw x;
943
      }
944
      saveUserCommunication_result result = new saveUserCommunication_result();
945
      result.read(iprot_);
946
      iprot_.readMessageEnd();
947
      if (result.isSetSuccess()) {
948
        return result.success;
949
      }
950
      if (result.ucx != null) {
951
        throw result.ucx;
952
      }
953
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "saveUserCommunication failed: unknown result");
954
    }
955
 
553 chandransh 956
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 957
    {
553 chandransh 958
      send_createCart(userId);
959
      return recv_createCart();
48 ashish 960
    }
961
 
553 chandransh 962
    public void send_createCart(long userId) throws TException
48 ashish 963
    {
553 chandransh 964
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
965
      createCart_args args = new createCart_args();
966
      args.userId = userId;
48 ashish 967
      args.write(oprot_);
968
      oprot_.writeMessageEnd();
969
      oprot_.getTransport().flush();
970
    }
971
 
553 chandransh 972
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 973
    {
974
      TMessage msg = iprot_.readMessageBegin();
975
      if (msg.type == TMessageType.EXCEPTION) {
976
        TApplicationException x = TApplicationException.read(iprot_);
977
        iprot_.readMessageEnd();
978
        throw x;
979
      }
553 chandransh 980
      createCart_result result = new createCart_result();
48 ashish 981
      result.read(iprot_);
982
      iprot_.readMessageEnd();
983
      if (result.isSetSuccess()) {
984
        return result.success;
985
      }
553 chandransh 986
      if (result.scx != null) {
987
        throw result.scx;
48 ashish 988
      }
553 chandransh 989
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 990
    }
991
 
553 chandransh 992
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 993
    {
553 chandransh 994
      send_getCurrentCart(userId);
995
      return recv_getCurrentCart();
48 ashish 996
    }
997
 
553 chandransh 998
    public void send_getCurrentCart(long userId) throws TException
48 ashish 999
    {
553 chandransh 1000
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
1001
      getCurrentCart_args args = new getCurrentCart_args();
1002
      args.userId = userId;
48 ashish 1003
      args.write(oprot_);
1004
      oprot_.writeMessageEnd();
1005
      oprot_.getTransport().flush();
1006
    }
1007
 
553 chandransh 1008
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 1009
    {
1010
      TMessage msg = iprot_.readMessageBegin();
1011
      if (msg.type == TMessageType.EXCEPTION) {
1012
        TApplicationException x = TApplicationException.read(iprot_);
1013
        iprot_.readMessageEnd();
1014
        throw x;
1015
      }
553 chandransh 1016
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 1017
      result.read(iprot_);
1018
      iprot_.readMessageEnd();
1019
      if (result.isSetSuccess()) {
1020
        return result.success;
1021
      }
553 chandransh 1022
      if (result.scx != null) {
1023
        throw result.scx;
48 ashish 1024
      }
553 chandransh 1025
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 1026
    }
1027
 
553 chandransh 1028
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 1029
    {
553 chandransh 1030
      send_getCart(cartId);
1031
      return recv_getCart();
48 ashish 1032
    }
1033
 
553 chandransh 1034
    public void send_getCart(long cartId) throws TException
48 ashish 1035
    {
553 chandransh 1036
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
1037
      getCart_args args = new getCart_args();
1038
      args.cartId = cartId;
48 ashish 1039
      args.write(oprot_);
1040
      oprot_.writeMessageEnd();
1041
      oprot_.getTransport().flush();
1042
    }
1043
 
553 chandransh 1044
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 1045
    {
1046
      TMessage msg = iprot_.readMessageBegin();
1047
      if (msg.type == TMessageType.EXCEPTION) {
1048
        TApplicationException x = TApplicationException.read(iprot_);
1049
        iprot_.readMessageEnd();
1050
        throw x;
1051
      }
553 chandransh 1052
      getCart_result result = new getCart_result();
48 ashish 1053
      result.read(iprot_);
1054
      iprot_.readMessageEnd();
1055
      if (result.isSetSuccess()) {
1056
        return result.success;
1057
      }
553 chandransh 1058
      if (result.scx != null) {
1059
        throw result.scx;
48 ashish 1060
      }
553 chandransh 1061
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 1062
    }
1063
 
553 chandransh 1064
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 1065
    {
553 chandransh 1066
      send_getCartsForUser(userId, status);
1067
      return recv_getCartsForUser();
48 ashish 1068
    }
1069
 
553 chandransh 1070
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 1071
    {
553 chandransh 1072
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
1073
      getCartsForUser_args args = new getCartsForUser_args();
1074
      args.userId = userId;
1075
      args.status = status;
48 ashish 1076
      args.write(oprot_);
1077
      oprot_.writeMessageEnd();
1078
      oprot_.getTransport().flush();
1079
    }
1080
 
553 chandransh 1081
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 1082
    {
1083
      TMessage msg = iprot_.readMessageBegin();
1084
      if (msg.type == TMessageType.EXCEPTION) {
1085
        TApplicationException x = TApplicationException.read(iprot_);
1086
        iprot_.readMessageEnd();
1087
        throw x;
1088
      }
553 chandransh 1089
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 1090
      result.read(iprot_);
1091
      iprot_.readMessageEnd();
1092
      if (result.isSetSuccess()) {
1093
        return result.success;
1094
      }
553 chandransh 1095
      if (result.scx != null) {
1096
        throw result.scx;
48 ashish 1097
      }
553 chandransh 1098
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 1099
    }
1100
 
553 chandransh 1101
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 1102
    {
553 chandransh 1103
      send_getCartsByStatus(status);
1104
      return recv_getCartsByStatus();
48 ashish 1105
    }
1106
 
553 chandransh 1107
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 1108
    {
553 chandransh 1109
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
1110
      getCartsByStatus_args args = new getCartsByStatus_args();
1111
      args.status = status;
48 ashish 1112
      args.write(oprot_);
1113
      oprot_.writeMessageEnd();
1114
      oprot_.getTransport().flush();
1115
    }
1116
 
553 chandransh 1117
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 1118
    {
1119
      TMessage msg = iprot_.readMessageBegin();
1120
      if (msg.type == TMessageType.EXCEPTION) {
1121
        TApplicationException x = TApplicationException.read(iprot_);
1122
        iprot_.readMessageEnd();
1123
        throw x;
1124
      }
553 chandransh 1125
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 1126
      result.read(iprot_);
1127
      iprot_.readMessageEnd();
1128
      if (result.isSetSuccess()) {
1129
        return result.success;
1130
      }
553 chandransh 1131
      if (result.scx != null) {
1132
        throw result.scx;
48 ashish 1133
      }
553 chandransh 1134
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 1135
    }
1136
 
553 chandransh 1137
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 1138
    {
553 chandransh 1139
      send_getCartsByTime(from_time, to_time, status);
1140
      return recv_getCartsByTime();
48 ashish 1141
    }
1142
 
553 chandransh 1143
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 1144
    {
553 chandransh 1145
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
1146
      getCartsByTime_args args = new getCartsByTime_args();
1147
      args.from_time = from_time;
1148
      args.to_time = to_time;
1149
      args.status = status;
48 ashish 1150
      args.write(oprot_);
1151
      oprot_.writeMessageEnd();
1152
      oprot_.getTransport().flush();
1153
    }
1154
 
553 chandransh 1155
    public List<Cart> recv_getCartsByTime() throws ShoppingCartException, TException
48 ashish 1156
    {
1157
      TMessage msg = iprot_.readMessageBegin();
1158
      if (msg.type == TMessageType.EXCEPTION) {
1159
        TApplicationException x = TApplicationException.read(iprot_);
1160
        iprot_.readMessageEnd();
1161
        throw x;
1162
      }
553 chandransh 1163
      getCartsByTime_result result = new getCartsByTime_result();
48 ashish 1164
      result.read(iprot_);
1165
      iprot_.readMessageEnd();
1166
      if (result.isSetSuccess()) {
1167
        return result.success;
1168
      }
553 chandransh 1169
      if (result.scx != null) {
1170
        throw result.scx;
48 ashish 1171
      }
553 chandransh 1172
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByTime failed: unknown result");
48 ashish 1173
    }
1174
 
553 chandransh 1175
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 1176
    {
553 chandransh 1177
      send_changeCartStatus(cartId, status);
1178
      recv_changeCartStatus();
130 ashish 1179
    }
1180
 
553 chandransh 1181
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1182
    {
553 chandransh 1183
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1184
      changeCartStatus_args args = new changeCartStatus_args();
1185
      args.cartId = cartId;
1186
      args.status = status;
130 ashish 1187
      args.write(oprot_);
1188
      oprot_.writeMessageEnd();
1189
      oprot_.getTransport().flush();
1190
    }
1191
 
553 chandransh 1192
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 1193
    {
1194
      TMessage msg = iprot_.readMessageBegin();
1195
      if (msg.type == TMessageType.EXCEPTION) {
1196
        TApplicationException x = TApplicationException.read(iprot_);
1197
        iprot_.readMessageEnd();
1198
        throw x;
1199
      }
553 chandransh 1200
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1201
      result.read(iprot_);
1202
      iprot_.readMessageEnd();
553 chandransh 1203
      if (result.scx != null) {
1204
        throw result.scx;
1205
      }
1206
      return;
1207
    }
1208
 
1209
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1210
    {
1211
      send_addItemToCart(cartId, itemId, quantity);
1212
      recv_addItemToCart();
1213
    }
1214
 
1215
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1216
    {
1217
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1218
      addItemToCart_args args = new addItemToCart_args();
1219
      args.cartId = cartId;
1220
      args.itemId = itemId;
1221
      args.quantity = quantity;
1222
      args.write(oprot_);
1223
      oprot_.writeMessageEnd();
1224
      oprot_.getTransport().flush();
1225
    }
1226
 
1227
    public void recv_addItemToCart() throws ShoppingCartException, TException
1228
    {
1229
      TMessage msg = iprot_.readMessageBegin();
1230
      if (msg.type == TMessageType.EXCEPTION) {
1231
        TApplicationException x = TApplicationException.read(iprot_);
1232
        iprot_.readMessageEnd();
1233
        throw x;
1234
      }
1235
      addItemToCart_result result = new addItemToCart_result();
1236
      result.read(iprot_);
1237
      iprot_.readMessageEnd();
1238
      if (result.scx != null) {
1239
        throw result.scx;
1240
      }
1241
      return;
1242
    }
1243
 
1244
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1245
    {
1246
      send_deleteItemFromCart(cartId, itemId);
1247
      recv_deleteItemFromCart();
1248
    }
1249
 
1250
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1251
    {
1252
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1253
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1254
      args.cartId = cartId;
1255
      args.itemId = itemId;
1256
      args.write(oprot_);
1257
      oprot_.writeMessageEnd();
1258
      oprot_.getTransport().flush();
1259
    }
1260
 
1261
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1262
    {
1263
      TMessage msg = iprot_.readMessageBegin();
1264
      if (msg.type == TMessageType.EXCEPTION) {
1265
        TApplicationException x = TApplicationException.read(iprot_);
1266
        iprot_.readMessageEnd();
1267
        throw x;
1268
      }
1269
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1270
      result.read(iprot_);
1271
      iprot_.readMessageEnd();
1272
      if (result.scx != null) {
1273
        throw result.scx;
1274
      }
1275
      return;
1276
    }
1277
 
1278
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1279
    {
1280
      send_changeQuantity(cartId, itemId, quantity);
1281
      recv_changeQuantity();
1282
    }
1283
 
1284
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1285
    {
1286
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1287
      changeQuantity_args args = new changeQuantity_args();
1288
      args.cartId = cartId;
1289
      args.itemId = itemId;
1290
      args.quantity = quantity;
1291
      args.write(oprot_);
1292
      oprot_.writeMessageEnd();
1293
      oprot_.getTransport().flush();
1294
    }
1295
 
1296
    public void recv_changeQuantity() throws ShoppingCartException, TException
1297
    {
1298
      TMessage msg = iprot_.readMessageBegin();
1299
      if (msg.type == TMessageType.EXCEPTION) {
1300
        TApplicationException x = TApplicationException.read(iprot_);
1301
        iprot_.readMessageEnd();
1302
        throw x;
1303
      }
1304
      changeQuantity_result result = new changeQuantity_result();
1305
      result.read(iprot_);
1306
      iprot_.readMessageEnd();
1307
      if (result.scx != null) {
1308
        throw result.scx;
1309
      }
1310
      return;
1311
    }
1312
 
1313
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1314
    {
1315
      send_changeItemStatus(cartId, itemId, status);
1316
      recv_changeItemStatus();
1317
    }
1318
 
1319
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1320
    {
1321
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1322
      changeItemStatus_args args = new changeItemStatus_args();
1323
      args.cartId = cartId;
1324
      args.itemId = itemId;
1325
      args.status = status;
1326
      args.write(oprot_);
1327
      oprot_.writeMessageEnd();
1328
      oprot_.getTransport().flush();
1329
    }
1330
 
1331
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1332
    {
1333
      TMessage msg = iprot_.readMessageBegin();
1334
      if (msg.type == TMessageType.EXCEPTION) {
1335
        TApplicationException x = TApplicationException.read(iprot_);
1336
        iprot_.readMessageEnd();
1337
        throw x;
1338
      }
1339
      changeItemStatus_result result = new changeItemStatus_result();
1340
      result.read(iprot_);
1341
      iprot_.readMessageEnd();
1342
      if (result.scx != null) {
1343
        throw result.scx;
1344
      }
1345
      return;
1346
    }
1347
 
578 chandransh 1348
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1349
    {
1350
      send_addAddressToCart(cartId, addressId);
1351
      recv_addAddressToCart();
1352
    }
1353
 
1354
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1355
    {
1356
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1357
      addAddressToCart_args args = new addAddressToCart_args();
1358
      args.cartId = cartId;
1359
      args.addressId = addressId;
1360
      args.write(oprot_);
1361
      oprot_.writeMessageEnd();
1362
      oprot_.getTransport().flush();
1363
    }
1364
 
578 chandransh 1365
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1366
    {
1367
      TMessage msg = iprot_.readMessageBegin();
1368
      if (msg.type == TMessageType.EXCEPTION) {
1369
        TApplicationException x = TApplicationException.read(iprot_);
1370
        iprot_.readMessageEnd();
1371
        throw x;
1372
      }
1373
      addAddressToCart_result result = new addAddressToCart_result();
1374
      result.read(iprot_);
1375
      iprot_.readMessageEnd();
578 chandransh 1376
      if (result.scx != null) {
1377
        throw result.scx;
1378
      }
553 chandransh 1379
      return;
1380
    }
1381
 
688 chandransh 1382
    public long createOrders(long cartId) throws ShoppingCartException, TException
553 chandransh 1383
    {
688 chandransh 1384
      send_createOrders(cartId);
1385
      return recv_createOrders();
553 chandransh 1386
    }
1387
 
688 chandransh 1388
    public void send_createOrders(long cartId) throws TException
553 chandransh 1389
    {
688 chandransh 1390
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1391
      createOrders_args args = new createOrders_args();
553 chandransh 1392
      args.cartId = cartId;
1393
      args.write(oprot_);
1394
      oprot_.writeMessageEnd();
1395
      oprot_.getTransport().flush();
1396
    }
1397
 
688 chandransh 1398
    public long recv_createOrders() throws ShoppingCartException, TException
553 chandransh 1399
    {
1400
      TMessage msg = iprot_.readMessageBegin();
1401
      if (msg.type == TMessageType.EXCEPTION) {
1402
        TApplicationException x = TApplicationException.read(iprot_);
1403
        iprot_.readMessageEnd();
1404
        throw x;
1405
      }
688 chandransh 1406
      createOrders_result result = new createOrders_result();
553 chandransh 1407
      result.read(iprot_);
1408
      iprot_.readMessageEnd();
130 ashish 1409
      if (result.isSetSuccess()) {
1410
        return result.success;
1411
      }
553 chandransh 1412
      if (result.scx != null) {
1413
        throw result.scx;
130 ashish 1414
      }
688 chandransh 1415
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
130 ashish 1416
    }
1417
 
1466 ankur.sing 1418
    public String validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1419
    {
553 chandransh 1420
      send_validateCart(cartId);
1421
      return recv_validateCart();
130 ashish 1422
    }
1423
 
553 chandransh 1424
    public void send_validateCart(long cartId) throws TException
130 ashish 1425
    {
553 chandransh 1426
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1427
      validateCart_args args = new validateCart_args();
1428
      args.cartId = cartId;
130 ashish 1429
      args.write(oprot_);
1430
      oprot_.writeMessageEnd();
1431
      oprot_.getTransport().flush();
1432
    }
1433
 
1466 ankur.sing 1434
    public String recv_validateCart() throws ShoppingCartException, TException
130 ashish 1435
    {
1436
      TMessage msg = iprot_.readMessageBegin();
1437
      if (msg.type == TMessageType.EXCEPTION) {
1438
        TApplicationException x = TApplicationException.read(iprot_);
1439
        iprot_.readMessageEnd();
1440
        throw x;
1441
      }
553 chandransh 1442
      validateCart_result result = new validateCart_result();
130 ashish 1443
      result.read(iprot_);
1444
      iprot_.readMessageEnd();
1445
      if (result.isSetSuccess()) {
1446
        return result.success;
1447
      }
578 chandransh 1448
      if (result.scex != null) {
1449
        throw result.scex;
1450
      }
553 chandransh 1451
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1452
    }
1453
 
688 chandransh 1454
    public void mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1455
    {
688 chandransh 1456
      send_mergeCart(fromCartId, toCartId);
1457
      recv_mergeCart();
578 chandransh 1458
    }
1459
 
688 chandransh 1460
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1461
    {
688 chandransh 1462
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1463
      mergeCart_args args = new mergeCart_args();
1464
      args.fromCartId = fromCartId;
1465
      args.toCartId = toCartId;
1466
      args.write(oprot_);
1467
      oprot_.writeMessageEnd();
1468
      oprot_.getTransport().flush();
1469
    }
1470
 
1471
    public void recv_mergeCart() throws TException
1472
    {
1473
      TMessage msg = iprot_.readMessageBegin();
1474
      if (msg.type == TMessageType.EXCEPTION) {
1475
        TApplicationException x = TApplicationException.read(iprot_);
1476
        iprot_.readMessageEnd();
1477
        throw x;
1478
      }
1479
      mergeCart_result result = new mergeCart_result();
1480
      result.read(iprot_);
1481
      iprot_.readMessageEnd();
1482
      return;
1483
    }
1484
 
1485
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1486
    {
1487
      send_checkOut(cartId);
1488
      return recv_checkOut();
1489
    }
1490
 
1491
    public void send_checkOut(long cartId) throws TException
1492
    {
1493
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1494
      checkOut_args args = new checkOut_args();
578 chandransh 1495
      args.cartId = cartId;
1496
      args.write(oprot_);
1497
      oprot_.writeMessageEnd();
1498
      oprot_.getTransport().flush();
1499
    }
1500
 
688 chandransh 1501
    public boolean recv_checkOut() throws ShoppingCartException, TException
578 chandransh 1502
    {
1503
      TMessage msg = iprot_.readMessageBegin();
1504
      if (msg.type == TMessageType.EXCEPTION) {
1505
        TApplicationException x = TApplicationException.read(iprot_);
1506
        iprot_.readMessageEnd();
1507
        throw x;
1508
      }
688 chandransh 1509
      checkOut_result result = new checkOut_result();
578 chandransh 1510
      result.read(iprot_);
1511
      iprot_.readMessageEnd();
1512
      if (result.isSetSuccess()) {
1513
        return result.success;
1514
      }
1515
      if (result.scex != null) {
1516
        throw result.scex;
1517
      }
688 chandransh 1518
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
578 chandransh 1519
    }
1520
 
708 rajveer 1521
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException
553 chandransh 1522
    {
688 chandransh 1523
      send_resetCart(cartId, items);
1524
      return recv_resetCart();
553 chandransh 1525
    }
1526
 
708 rajveer 1527
    public void send_resetCart(long cartId, Map<Long,Double> items) throws TException
553 chandransh 1528
    {
688 chandransh 1529
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1530
      resetCart_args args = new resetCart_args();
1531
      args.cartId = cartId;
1532
      args.items = items;
553 chandransh 1533
      args.write(oprot_);
1534
      oprot_.writeMessageEnd();
1535
      oprot_.getTransport().flush();
1536
    }
1537
 
688 chandransh 1538
    public boolean recv_resetCart() throws ShoppingCartException, TException
553 chandransh 1539
    {
1540
      TMessage msg = iprot_.readMessageBegin();
1541
      if (msg.type == TMessageType.EXCEPTION) {
1542
        TApplicationException x = TApplicationException.read(iprot_);
1543
        iprot_.readMessageEnd();
1544
        throw x;
130 ashish 1545
      }
688 chandransh 1546
      resetCart_result result = new resetCart_result();
553 chandransh 1547
      result.read(iprot_);
1548
      iprot_.readMessageEnd();
688 chandransh 1549
      if (result.isSetSuccess()) {
1550
        return result.success;
1551
      }
1552
      if (result.scex != null) {
1553
        throw result.scex;
1554
      }
1555
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
130 ashish 1556
    }
1557
 
771 rajveer 1558
    public Widget getMyResearch(long userId) throws WidgetException, TException
553 chandransh 1559
    {
771 rajveer 1560
      send_getMyResearch(userId);
553 chandransh 1561
      return recv_getMyResearch();
1562
    }
1563
 
771 rajveer 1564
    public void send_getMyResearch(long userId) throws TException
553 chandransh 1565
    {
1566
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1567
      getMyResearch_args args = new getMyResearch_args();
771 rajveer 1568
      args.userId = userId;
553 chandransh 1569
      args.write(oprot_);
1570
      oprot_.writeMessageEnd();
1571
      oprot_.getTransport().flush();
1572
    }
1573
 
1574
    public Widget recv_getMyResearch() throws WidgetException, TException
1575
    {
1576
      TMessage msg = iprot_.readMessageBegin();
1577
      if (msg.type == TMessageType.EXCEPTION) {
1578
        TApplicationException x = TApplicationException.read(iprot_);
1579
        iprot_.readMessageEnd();
1580
        throw x;
1581
      }
1582
      getMyResearch_result result = new getMyResearch_result();
1583
      result.read(iprot_);
1584
      iprot_.readMessageEnd();
1585
      if (result.isSetSuccess()) {
1586
        return result.success;
1587
      }
1588
      if (result.scx != null) {
1589
        throw result.scx;
1590
      }
1591
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1592
    }
1593
 
771 rajveer 1594
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1595
    {
771 rajveer 1596
      send_updateMyResearch(userId, itemId);
553 chandransh 1597
      return recv_updateMyResearch();
1598
    }
1599
 
771 rajveer 1600
    public void send_updateMyResearch(long userId, long itemId) throws TException
553 chandransh 1601
    {
1602
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1603
      updateMyResearch_args args = new updateMyResearch_args();
771 rajveer 1604
      args.userId = userId;
1605
      args.itemId = itemId;
553 chandransh 1606
      args.write(oprot_);
1607
      oprot_.writeMessageEnd();
1608
      oprot_.getTransport().flush();
1609
    }
1610
 
1611
    public boolean recv_updateMyResearch() throws WidgetException, TException
1612
    {
1613
      TMessage msg = iprot_.readMessageBegin();
1614
      if (msg.type == TMessageType.EXCEPTION) {
1615
        TApplicationException x = TApplicationException.read(iprot_);
1616
        iprot_.readMessageEnd();
1617
        throw x;
1618
      }
1619
      updateMyResearch_result result = new updateMyResearch_result();
1620
      result.read(iprot_);
1621
      iprot_.readMessageEnd();
1622
      if (result.isSetSuccess()) {
1623
        return result.success;
1624
      }
1625
      if (result.scx != null) {
1626
        throw result.scx;
1627
      }
1628
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1629
    }
1630
 
771 rajveer 1631
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1632
    {
771 rajveer 1633
      send_deleteItemFromMyResearch(userId, itemId);
553 chandransh 1634
      recv_deleteItemFromMyResearch();
1635
    }
1636
 
771 rajveer 1637
    public void send_deleteItemFromMyResearch(long userId, long itemId) throws TException
553 chandransh 1638
    {
1639
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1640
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
771 rajveer 1641
      args.userId = userId;
1642
      args.itemId = itemId;
553 chandransh 1643
      args.write(oprot_);
1644
      oprot_.writeMessageEnd();
1645
      oprot_.getTransport().flush();
1646
    }
1647
 
1648
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1649
    {
1650
      TMessage msg = iprot_.readMessageBegin();
1651
      if (msg.type == TMessageType.EXCEPTION) {
1652
        TApplicationException x = TApplicationException.read(iprot_);
1653
        iprot_.readMessageEnd();
1654
        throw x;
1655
      }
1656
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1657
      result.read(iprot_);
1658
      iprot_.readMessageEnd();
1659
      if (result.scx != null) {
1660
        throw result.scx;
1661
      }
1662
      return;
1663
    }
1664
 
771 rajveer 1665
    public void updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1666
    {
771 rajveer 1667
      send_updateBrowseHistory(userId, itemId);
1668
      recv_updateBrowseHistory();
553 chandransh 1669
    }
1670
 
771 rajveer 1671
    public void send_updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1672
    {
771 rajveer 1673
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1674
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1675
      args.userId = userId;
1676
      args.itemId = itemId;
553 chandransh 1677
      args.write(oprot_);
1678
      oprot_.writeMessageEnd();
1679
      oprot_.getTransport().flush();
1680
    }
1681
 
771 rajveer 1682
    public void recv_updateBrowseHistory() throws TException
553 chandransh 1683
    {
1684
      TMessage msg = iprot_.readMessageBegin();
1685
      if (msg.type == TMessageType.EXCEPTION) {
1686
        TApplicationException x = TApplicationException.read(iprot_);
1687
        iprot_.readMessageEnd();
1688
        throw x;
1689
      }
771 rajveer 1690
      updateBrowseHistory_result result = new updateBrowseHistory_result();
553 chandransh 1691
      result.read(iprot_);
1692
      iprot_.readMessageEnd();
1693
      return;
1694
    }
1695
 
771 rajveer 1696
    public Widget getBrowseHistory(long userId) throws WidgetException, TException
553 chandransh 1697
    {
771 rajveer 1698
      send_getBrowseHistory(userId);
1699
      return recv_getBrowseHistory();
553 chandransh 1700
    }
1701
 
771 rajveer 1702
    public void send_getBrowseHistory(long userId) throws TException
553 chandransh 1703
    {
771 rajveer 1704
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1705
      getBrowseHistory_args args = new getBrowseHistory_args();
1706
      args.userId = userId;
553 chandransh 1707
      args.write(oprot_);
1708
      oprot_.writeMessageEnd();
1709
      oprot_.getTransport().flush();
1710
    }
1711
 
771 rajveer 1712
    public Widget recv_getBrowseHistory() throws WidgetException, TException
553 chandransh 1713
    {
1714
      TMessage msg = iprot_.readMessageBegin();
1715
      if (msg.type == TMessageType.EXCEPTION) {
1716
        TApplicationException x = TApplicationException.read(iprot_);
1717
        iprot_.readMessageEnd();
1718
        throw x;
1719
      }
771 rajveer 1720
      getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 1721
      result.read(iprot_);
1722
      iprot_.readMessageEnd();
1723
      if (result.isSetSuccess()) {
1724
        return result.success;
1725
      }
1726
      if (result.scx != null) {
1727
        throw result.scx;
1728
      }
771 rajveer 1729
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
553 chandransh 1730
    }
1731
 
771 rajveer 1732
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1733
    {
771 rajveer 1734
      send_mergeBrowseHistory(fromUserId, toUserId);
1735
      recv_mergeBrowseHistory();
553 chandransh 1736
    }
1737
 
771 rajveer 1738
    public void send_mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1739
    {
771 rajveer 1740
      oprot_.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.CALL, seqid_));
1741
      mergeBrowseHistory_args args = new mergeBrowseHistory_args();
1742
      args.fromUserId = fromUserId;
1743
      args.toUserId = toUserId;
553 chandransh 1744
      args.write(oprot_);
1745
      oprot_.writeMessageEnd();
1746
      oprot_.getTransport().flush();
1747
    }
1748
 
771 rajveer 1749
    public void recv_mergeBrowseHistory() throws TException
553 chandransh 1750
    {
1751
      TMessage msg = iprot_.readMessageBegin();
1752
      if (msg.type == TMessageType.EXCEPTION) {
1753
        TApplicationException x = TApplicationException.read(iprot_);
1754
        iprot_.readMessageEnd();
1755
        throw x;
1756
      }
771 rajveer 1757
      mergeBrowseHistory_result result = new mergeBrowseHistory_result();
553 chandransh 1758
      result.read(iprot_);
1759
      iprot_.readMessageEnd();
1760
      return;
1761
    }
1762
 
48 ashish 1763
  }
1764
  public static class Processor implements TProcessor {
1765
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1766
    public Processor(Iface iface)
1767
    {
1768
      iface_ = iface;
764 rajveer 1769
      processMap_.put("closeSession", new closeSession());
553 chandransh 1770
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1771
      processMap_.put("getUserById", new getUserById());
1491 vikas 1772
      processMap_.put("getUserByEmail", new getUserByEmail());
553 chandransh 1773
      processMap_.put("createUser", new createUser());
1774
      processMap_.put("updateUser", new updateUser());
1775
      processMap_.put("deleteUser", new deleteUser());
1776
      processMap_.put("getUserState", new getUserState());
123 ashish 1777
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1778
      processMap_.put("userExists", new userExists());
1779
      processMap_.put("addAddressForUser", new addAddressForUser());
1780
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1781
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1782
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1783
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1784
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1785
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1786
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1787
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
784 rajveer 1788
      processMap_.put("getDefaultPincode", new getDefaultPincode());
1177 varun.gupt 1789
      processMap_.put("saveUserCommunication", new saveUserCommunication());
553 chandransh 1790
      processMap_.put("createCart", new createCart());
1791
      processMap_.put("getCurrentCart", new getCurrentCart());
1792
      processMap_.put("getCart", new getCart());
1793
      processMap_.put("getCartsForUser", new getCartsForUser());
1794
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1795
      processMap_.put("getCartsByTime", new getCartsByTime());
1796
      processMap_.put("changeCartStatus", new changeCartStatus());
1797
      processMap_.put("addItemToCart", new addItemToCart());
1798
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1799
      processMap_.put("changeQuantity", new changeQuantity());
1800
      processMap_.put("changeItemStatus", new changeItemStatus());
1801
      processMap_.put("addAddressToCart", new addAddressToCart());
688 chandransh 1802
      processMap_.put("createOrders", new createOrders());
553 chandransh 1803
      processMap_.put("validateCart", new validateCart());
1804
      processMap_.put("mergeCart", new mergeCart());
688 chandransh 1805
      processMap_.put("checkOut", new checkOut());
1806
      processMap_.put("resetCart", new resetCart());
553 chandransh 1807
      processMap_.put("getMyResearch", new getMyResearch());
1808
      processMap_.put("updateMyResearch", new updateMyResearch());
1809
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1810
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1811
      processMap_.put("getBrowseHistory", new getBrowseHistory());
771 rajveer 1812
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
48 ashish 1813
    }
1814
 
1815
    protected static interface ProcessFunction {
1816
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1817
    }
1818
 
1819
    private Iface iface_;
1820
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1821
 
1822
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1823
    {
1824
      TMessage msg = iprot.readMessageBegin();
1825
      ProcessFunction fn = processMap_.get(msg.name);
1826
      if (fn == null) {
1827
        TProtocolUtil.skip(iprot, TType.STRUCT);
1828
        iprot.readMessageEnd();
1829
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1830
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1831
        x.write(oprot);
1832
        oprot.writeMessageEnd();
1833
        oprot.getTransport().flush();
1834
        return true;
1835
      }
1836
      fn.process(msg.seqid, iprot, oprot);
1837
      return true;
1838
    }
1839
 
764 rajveer 1840
    private class closeSession implements ProcessFunction {
1841
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1842
      {
1843
        closeSession_args args = new closeSession_args();
1844
        args.read(iprot);
1845
        iprot.readMessageEnd();
1846
        closeSession_result result = new closeSession_result();
1847
        iface_.closeSession();
1848
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1849
        result.write(oprot);
1850
        oprot.writeMessageEnd();
1851
        oprot.getTransport().flush();
1852
      }
1853
 
1854
    }
1855
 
553 chandransh 1856
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1857
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1858
      {
553 chandransh 1859
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1860
        args.read(iprot);
1861
        iprot.readMessageEnd();
553 chandransh 1862
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1863
        try {
553 chandransh 1864
          result.success = iface_.createAnonymousUser(args.jsessionId);
1865
        } catch (UserContextException ucex) {
1866
          result.ucex = ucex;
48 ashish 1867
        } catch (Throwable th) {
553 chandransh 1868
          LOGGER.error("Internal error processing createAnonymousUser", th);
1869
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1870
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1871
          x.write(oprot);
1872
          oprot.writeMessageEnd();
1873
          oprot.getTransport().flush();
1874
          return;
1875
        }
553 chandransh 1876
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1877
        result.write(oprot);
1878
        oprot.writeMessageEnd();
1879
        oprot.getTransport().flush();
1880
      }
1881
 
1882
    }
1883
 
553 chandransh 1884
    private class getUserById implements ProcessFunction {
48 ashish 1885
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1886
      {
553 chandransh 1887
        getUserById_args args = new getUserById_args();
48 ashish 1888
        args.read(iprot);
1889
        iprot.readMessageEnd();
553 chandransh 1890
        getUserById_result result = new getUserById_result();
48 ashish 1891
        try {
553 chandransh 1892
          result.success = iface_.getUserById(args.userId);
1893
        } catch (UserContextException ucex) {
1894
          result.ucex = ucex;
48 ashish 1895
        } catch (Throwable th) {
553 chandransh 1896
          LOGGER.error("Internal error processing getUserById", th);
1897
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1898
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1899
          x.write(oprot);
1900
          oprot.writeMessageEnd();
1901
          oprot.getTransport().flush();
1902
          return;
1903
        }
553 chandransh 1904
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1905
        result.write(oprot);
1906
        oprot.writeMessageEnd();
1907
        oprot.getTransport().flush();
1908
      }
1909
 
1910
    }
1911
 
1491 vikas 1912
    private class getUserByEmail implements ProcessFunction {
1913
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1914
      {
1915
        getUserByEmail_args args = new getUserByEmail_args();
1916
        args.read(iprot);
1917
        iprot.readMessageEnd();
1918
        getUserByEmail_result result = new getUserByEmail_result();
1919
        try {
1920
          result.success = iface_.getUserByEmail(args.email);
1921
        } catch (UserContextException ucex) {
1922
          result.ucex = ucex;
1923
        } catch (Throwable th) {
1924
          LOGGER.error("Internal error processing getUserByEmail", th);
1925
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserByEmail");
1926
          oprot.writeMessageBegin(new TMessage("getUserByEmail", TMessageType.EXCEPTION, seqid));
1927
          x.write(oprot);
1928
          oprot.writeMessageEnd();
1929
          oprot.getTransport().flush();
1930
          return;
1931
        }
1932
        oprot.writeMessageBegin(new TMessage("getUserByEmail", TMessageType.REPLY, seqid));
1933
        result.write(oprot);
1934
        oprot.writeMessageEnd();
1935
        oprot.getTransport().flush();
1936
      }
1937
 
1938
    }
1939
 
553 chandransh 1940
    private class createUser implements ProcessFunction {
48 ashish 1941
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1942
      {
553 chandransh 1943
        createUser_args args = new createUser_args();
48 ashish 1944
        args.read(iprot);
1945
        iprot.readMessageEnd();
553 chandransh 1946
        createUser_result result = new createUser_result();
48 ashish 1947
        try {
553 chandransh 1948
          result.success = iface_.createUser(args.user);
1949
        } catch (UserContextException ucex) {
1950
          result.ucex = ucex;
48 ashish 1951
        } catch (Throwable th) {
553 chandransh 1952
          LOGGER.error("Internal error processing createUser", th);
1953
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
1954
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 1955
          x.write(oprot);
1956
          oprot.writeMessageEnd();
1957
          oprot.getTransport().flush();
1958
          return;
1959
        }
553 chandransh 1960
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 1961
        result.write(oprot);
1962
        oprot.writeMessageEnd();
1963
        oprot.getTransport().flush();
1964
      }
1965
 
1966
    }
1967
 
553 chandransh 1968
    private class updateUser implements ProcessFunction {
48 ashish 1969
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1970
      {
553 chandransh 1971
        updateUser_args args = new updateUser_args();
48 ashish 1972
        args.read(iprot);
1973
        iprot.readMessageEnd();
553 chandransh 1974
        updateUser_result result = new updateUser_result();
48 ashish 1975
        try {
553 chandransh 1976
          result.success = iface_.updateUser(args.user);
1977
        } catch (UserContextException ucex) {
1978
          result.ucex = ucex;
48 ashish 1979
        } catch (Throwable th) {
553 chandransh 1980
          LOGGER.error("Internal error processing updateUser", th);
1981
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
1982
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 1983
          x.write(oprot);
1984
          oprot.writeMessageEnd();
1985
          oprot.getTransport().flush();
1986
          return;
1987
        }
553 chandransh 1988
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 1989
        result.write(oprot);
1990
        oprot.writeMessageEnd();
1991
        oprot.getTransport().flush();
1992
      }
1993
 
1994
    }
1995
 
553 chandransh 1996
    private class deleteUser implements ProcessFunction {
48 ashish 1997
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1998
      {
553 chandransh 1999
        deleteUser_args args = new deleteUser_args();
48 ashish 2000
        args.read(iprot);
2001
        iprot.readMessageEnd();
553 chandransh 2002
        deleteUser_result result = new deleteUser_result();
48 ashish 2003
        try {
553 chandransh 2004
          result.success = iface_.deleteUser(args.userId);
2005
          result.setSuccessIsSet(true);
2006
        } catch (UserContextException ucex) {
2007
          result.ucex = ucex;
48 ashish 2008
        } catch (Throwable th) {
553 chandransh 2009
          LOGGER.error("Internal error processing deleteUser", th);
2010
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
2011
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 2012
          x.write(oprot);
2013
          oprot.writeMessageEnd();
2014
          oprot.getTransport().flush();
2015
          return;
2016
        }
553 chandransh 2017
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 2018
        result.write(oprot);
2019
        oprot.writeMessageEnd();
2020
        oprot.getTransport().flush();
2021
      }
2022
 
2023
    }
2024
 
553 chandransh 2025
    private class getUserState implements ProcessFunction {
48 ashish 2026
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2027
      {
553 chandransh 2028
        getUserState_args args = new getUserState_args();
48 ashish 2029
        args.read(iprot);
2030
        iprot.readMessageEnd();
553 chandransh 2031
        getUserState_result result = new getUserState_result();
48 ashish 2032
        try {
553 chandransh 2033
          result.success = iface_.getUserState(args.userId);
2034
        } catch (UserContextException ucex) {
2035
          result.ucex = ucex;
48 ashish 2036
        } catch (Throwable th) {
553 chandransh 2037
          LOGGER.error("Internal error processing getUserState", th);
2038
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
2039
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 2040
          x.write(oprot);
2041
          oprot.writeMessageEnd();
2042
          oprot.getTransport().flush();
2043
          return;
2044
        }
553 chandransh 2045
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 2046
        result.write(oprot);
2047
        oprot.writeMessageEnd();
2048
        oprot.getTransport().flush();
2049
      }
2050
 
2051
    }
2052
 
123 ashish 2053
    private class authenticateUser implements ProcessFunction {
2054
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2055
      {
2056
        authenticateUser_args args = new authenticateUser_args();
2057
        args.read(iprot);
2058
        iprot.readMessageEnd();
2059
        authenticateUser_result result = new authenticateUser_result();
2060
        try {
553 chandransh 2061
          result.success = iface_.authenticateUser(args.email, args.password);
2062
        } catch (AuthenticationException auex) {
2063
          result.auex = auex;
123 ashish 2064
        } catch (Throwable th) {
2065
          LOGGER.error("Internal error processing authenticateUser", th);
2066
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
2067
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
2068
          x.write(oprot);
2069
          oprot.writeMessageEnd();
2070
          oprot.getTransport().flush();
2071
          return;
2072
        }
2073
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
2074
        result.write(oprot);
2075
        oprot.writeMessageEnd();
2076
        oprot.getTransport().flush();
2077
      }
2078
 
2079
    }
2080
 
48 ashish 2081
    private class userExists implements ProcessFunction {
2082
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2083
      {
2084
        userExists_args args = new userExists_args();
2085
        args.read(iprot);
2086
        iprot.readMessageEnd();
2087
        userExists_result result = new userExists_result();
2088
        try {
2089
          result.success = iface_.userExists(args.email);
2090
          result.setSuccessIsSet(true);
2091
        } catch (UserContextException ucx) {
2092
          result.ucx = ucx;
2093
        } catch (Throwable th) {
2094
          LOGGER.error("Internal error processing userExists", th);
2095
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
2096
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
2097
          x.write(oprot);
2098
          oprot.writeMessageEnd();
2099
          oprot.getTransport().flush();
2100
          return;
2101
        }
2102
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
2103
        result.write(oprot);
2104
        oprot.writeMessageEnd();
2105
        oprot.getTransport().flush();
2106
      }
2107
 
2108
    }
2109
 
2110
    private class addAddressForUser implements ProcessFunction {
2111
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2112
      {
2113
        addAddressForUser_args args = new addAddressForUser_args();
2114
        args.read(iprot);
2115
        iprot.readMessageEnd();
2116
        addAddressForUser_result result = new addAddressForUser_result();
2117
        try {
571 rajveer 2118
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2119
          result.setSuccessIsSet(true);
2120
        } catch (UserContextException ucx) {
2121
          result.ucx = ucx;
2122
        } catch (Throwable th) {
2123
          LOGGER.error("Internal error processing addAddressForUser", th);
2124
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2125
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2126
          x.write(oprot);
2127
          oprot.writeMessageEnd();
2128
          oprot.getTransport().flush();
2129
          return;
2130
        }
2131
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2132
        result.write(oprot);
2133
        oprot.writeMessageEnd();
2134
        oprot.getTransport().flush();
2135
      }
2136
 
2137
    }
2138
 
2139
    private class removeAddressForUser implements ProcessFunction {
2140
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2141
      {
2142
        removeAddressForUser_args args = new removeAddressForUser_args();
2143
        args.read(iprot);
2144
        iprot.readMessageEnd();
2145
        removeAddressForUser_result result = new removeAddressForUser_result();
2146
        try {
2147
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2148
          result.setSuccessIsSet(true);
2149
        } catch (UserContextException ucx) {
2150
          result.ucx = ucx;
2151
        } catch (Throwable th) {
2152
          LOGGER.error("Internal error processing removeAddressForUser", th);
2153
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2154
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2155
          x.write(oprot);
2156
          oprot.writeMessageEnd();
2157
          oprot.getTransport().flush();
2158
          return;
2159
        }
2160
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2161
        result.write(oprot);
2162
        oprot.writeMessageEnd();
2163
        oprot.getTransport().flush();
2164
      }
2165
 
2166
    }
2167
 
2168
    private class setUserAsLoggedIn implements ProcessFunction {
2169
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2170
      {
2171
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2172
        args.read(iprot);
2173
        iprot.readMessageEnd();
2174
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2175
        try {
2176
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2177
          result.setSuccessIsSet(true);
2178
        } catch (UserContextException ucx) {
2179
          result.ucx = ucx;
2180
        } catch (Throwable th) {
2181
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2182
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2183
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2184
          x.write(oprot);
2185
          oprot.writeMessageEnd();
2186
          oprot.getTransport().flush();
2187
          return;
2188
        }
2189
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2190
        result.write(oprot);
2191
        oprot.writeMessageEnd();
2192
        oprot.getTransport().flush();
2193
      }
2194
 
2195
    }
2196
 
2197
    private class setUserAsLoggedOut implements ProcessFunction {
2198
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2199
      {
2200
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2201
        args.read(iprot);
2202
        iprot.readMessageEnd();
2203
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2204
        try {
2205
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2206
          result.setSuccessIsSet(true);
2207
        } catch (UserContextException ucx) {
2208
          result.ucx = ucx;
2209
        } catch (Throwable th) {
2210
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2211
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2212
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2213
          x.write(oprot);
2214
          oprot.writeMessageEnd();
2215
          oprot.getTransport().flush();
2216
          return;
2217
        }
2218
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2219
        result.write(oprot);
2220
        oprot.writeMessageEnd();
2221
        oprot.getTransport().flush();
2222
      }
2223
 
2224
    }
2225
 
506 rajveer 2226
    private class setDefaultAddress implements ProcessFunction {
2227
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2228
      {
2229
        setDefaultAddress_args args = new setDefaultAddress_args();
2230
        args.read(iprot);
2231
        iprot.readMessageEnd();
2232
        setDefaultAddress_result result = new setDefaultAddress_result();
2233
        try {
2234
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2235
          result.setSuccessIsSet(true);
2236
        } catch (UserContextException ucx) {
2237
          result.ucx = ucx;
2238
        } catch (Throwable th) {
2239
          LOGGER.error("Internal error processing setDefaultAddress", th);
2240
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2241
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2242
          x.write(oprot);
2243
          oprot.writeMessageEnd();
2244
          oprot.getTransport().flush();
2245
          return;
2246
        }
2247
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2248
        result.write(oprot);
2249
        oprot.writeMessageEnd();
2250
        oprot.getTransport().flush();
2251
      }
2252
 
2253
    }
2254
 
48 ashish 2255
    private class updatePassword implements ProcessFunction {
2256
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2257
      {
2258
        updatePassword_args args = new updatePassword_args();
2259
        args.read(iprot);
2260
        iprot.readMessageEnd();
2261
        updatePassword_result result = new updatePassword_result();
2262
        try {
593 rajveer 2263
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2264
          result.setSuccessIsSet(true);
2265
        } catch (UserContextException ucx) {
2266
          result.ucx = ucx;
2267
        } catch (Throwable th) {
2268
          LOGGER.error("Internal error processing updatePassword", th);
2269
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2270
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2271
          x.write(oprot);
2272
          oprot.writeMessageEnd();
2273
          oprot.getTransport().flush();
2274
          return;
2275
        }
2276
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2277
        result.write(oprot);
2278
        oprot.writeMessageEnd();
2279
        oprot.getTransport().flush();
2280
      }
2281
 
2282
    }
2283
 
582 rajveer 2284
    private class forgotPassword implements ProcessFunction {
2285
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2286
      {
2287
        forgotPassword_args args = new forgotPassword_args();
2288
        args.read(iprot);
2289
        iprot.readMessageEnd();
2290
        forgotPassword_result result = new forgotPassword_result();
2291
        try {
896 rajveer 2292
          result.success = iface_.forgotPassword(args.email, args.newPassword);
582 rajveer 2293
          result.setSuccessIsSet(true);
2294
        } catch (UserContextException ucx) {
2295
          result.ucx = ucx;
2296
        } catch (Throwable th) {
2297
          LOGGER.error("Internal error processing forgotPassword", th);
2298
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2299
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2300
          x.write(oprot);
2301
          oprot.writeMessageEnd();
2302
          oprot.getTransport().flush();
2303
          return;
2304
        }
2305
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2306
        result.write(oprot);
2307
        oprot.writeMessageEnd();
2308
        oprot.getTransport().flush();
2309
      }
2310
 
2311
    }
2312
 
593 rajveer 2313
    private class getAllAddressesForUser implements ProcessFunction {
2314
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2315
      {
2316
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2317
        args.read(iprot);
2318
        iprot.readMessageEnd();
2319
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2320
        try {
2321
          result.success = iface_.getAllAddressesForUser(args.userId);
2322
        } catch (UserContextException ucx) {
2323
          result.ucx = ucx;
2324
        } catch (Throwable th) {
2325
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2326
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2327
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2328
          x.write(oprot);
2329
          oprot.writeMessageEnd();
2330
          oprot.getTransport().flush();
2331
          return;
2332
        }
2333
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2334
        result.write(oprot);
2335
        oprot.writeMessageEnd();
2336
        oprot.getTransport().flush();
2337
      }
2338
 
2339
    }
2340
 
2341
    private class getDefaultAddressId implements ProcessFunction {
2342
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2343
      {
2344
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2345
        args.read(iprot);
2346
        iprot.readMessageEnd();
2347
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2348
        try {
2349
          result.success = iface_.getDefaultAddressId(args.userId);
2350
          result.setSuccessIsSet(true);
2351
        } catch (UserContextException ucx) {
2352
          result.ucx = ucx;
2353
        } catch (Throwable th) {
2354
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2355
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2356
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2357
          x.write(oprot);
2358
          oprot.writeMessageEnd();
2359
          oprot.getTransport().flush();
2360
          return;
2361
        }
2362
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2363
        result.write(oprot);
2364
        oprot.writeMessageEnd();
2365
        oprot.getTransport().flush();
2366
      }
2367
 
2368
    }
2369
 
784 rajveer 2370
    private class getDefaultPincode implements ProcessFunction {
2371
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2372
      {
2373
        getDefaultPincode_args args = new getDefaultPincode_args();
2374
        args.read(iprot);
2375
        iprot.readMessageEnd();
2376
        getDefaultPincode_result result = new getDefaultPincode_result();
2377
        try {
2378
          result.success = iface_.getDefaultPincode(args.userId);
2379
        } catch (UserContextException ucx) {
2380
          result.ucx = ucx;
2381
        } catch (Throwable th) {
2382
          LOGGER.error("Internal error processing getDefaultPincode", th);
2383
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultPincode");
2384
          oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.EXCEPTION, seqid));
2385
          x.write(oprot);
2386
          oprot.writeMessageEnd();
2387
          oprot.getTransport().flush();
2388
          return;
2389
        }
2390
        oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.REPLY, seqid));
2391
        result.write(oprot);
2392
        oprot.writeMessageEnd();
2393
        oprot.getTransport().flush();
2394
      }
2395
 
2396
    }
2397
 
1177 varun.gupt 2398
    private class saveUserCommunication implements ProcessFunction {
2399
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2400
      {
2401
        saveUserCommunication_args args = new saveUserCommunication_args();
2402
        args.read(iprot);
2403
        iprot.readMessageEnd();
2404
        saveUserCommunication_result result = new saveUserCommunication_result();
2405
        try {
2406
          result.success = iface_.saveUserCommunication(args.userId, args.replyTo, args.communicationType, args.orderId, args.airwaybillNo, args.productName, args.subject, args.message);
2407
          result.setSuccessIsSet(true);
2408
        } catch (UserCommunicationException ucx) {
2409
          result.ucx = ucx;
2410
        } catch (Throwable th) {
2411
          LOGGER.error("Internal error processing saveUserCommunication", th);
2412
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing saveUserCommunication");
2413
          oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.EXCEPTION, seqid));
2414
          x.write(oprot);
2415
          oprot.writeMessageEnd();
2416
          oprot.getTransport().flush();
2417
          return;
2418
        }
2419
        oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.REPLY, seqid));
2420
        result.write(oprot);
2421
        oprot.writeMessageEnd();
2422
        oprot.getTransport().flush();
2423
      }
2424
 
2425
    }
2426
 
553 chandransh 2427
    private class createCart implements ProcessFunction {
48 ashish 2428
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2429
      {
553 chandransh 2430
        createCart_args args = new createCart_args();
48 ashish 2431
        args.read(iprot);
2432
        iprot.readMessageEnd();
553 chandransh 2433
        createCart_result result = new createCart_result();
48 ashish 2434
        try {
553 chandransh 2435
          result.success = iface_.createCart(args.userId);
48 ashish 2436
          result.setSuccessIsSet(true);
553 chandransh 2437
        } catch (ShoppingCartException scx) {
2438
          result.scx = scx;
48 ashish 2439
        } catch (Throwable th) {
553 chandransh 2440
          LOGGER.error("Internal error processing createCart", th);
2441
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2442
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2443
          x.write(oprot);
2444
          oprot.writeMessageEnd();
2445
          oprot.getTransport().flush();
2446
          return;
2447
        }
553 chandransh 2448
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2449
        result.write(oprot);
2450
        oprot.writeMessageEnd();
2451
        oprot.getTransport().flush();
2452
      }
2453
 
2454
    }
2455
 
553 chandransh 2456
    private class getCurrentCart implements ProcessFunction {
48 ashish 2457
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2458
      {
553 chandransh 2459
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2460
        args.read(iprot);
2461
        iprot.readMessageEnd();
553 chandransh 2462
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2463
        try {
553 chandransh 2464
          result.success = iface_.getCurrentCart(args.userId);
2465
        } catch (ShoppingCartException scx) {
2466
          result.scx = scx;
48 ashish 2467
        } catch (Throwable th) {
553 chandransh 2468
          LOGGER.error("Internal error processing getCurrentCart", th);
2469
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2470
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2471
          x.write(oprot);
2472
          oprot.writeMessageEnd();
2473
          oprot.getTransport().flush();
2474
          return;
2475
        }
553 chandransh 2476
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2477
        result.write(oprot);
2478
        oprot.writeMessageEnd();
2479
        oprot.getTransport().flush();
2480
      }
2481
 
2482
    }
2483
 
553 chandransh 2484
    private class getCart implements ProcessFunction {
48 ashish 2485
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2486
      {
553 chandransh 2487
        getCart_args args = new getCart_args();
48 ashish 2488
        args.read(iprot);
2489
        iprot.readMessageEnd();
553 chandransh 2490
        getCart_result result = new getCart_result();
48 ashish 2491
        try {
553 chandransh 2492
          result.success = iface_.getCart(args.cartId);
2493
        } catch (ShoppingCartException scx) {
2494
          result.scx = scx;
48 ashish 2495
        } catch (Throwable th) {
553 chandransh 2496
          LOGGER.error("Internal error processing getCart", th);
2497
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2498
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2499
          x.write(oprot);
2500
          oprot.writeMessageEnd();
2501
          oprot.getTransport().flush();
2502
          return;
2503
        }
553 chandransh 2504
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2505
        result.write(oprot);
2506
        oprot.writeMessageEnd();
2507
        oprot.getTransport().flush();
2508
      }
2509
 
2510
    }
2511
 
553 chandransh 2512
    private class getCartsForUser implements ProcessFunction {
48 ashish 2513
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2514
      {
553 chandransh 2515
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2516
        args.read(iprot);
2517
        iprot.readMessageEnd();
553 chandransh 2518
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2519
        try {
553 chandransh 2520
          result.success = iface_.getCartsForUser(args.userId, args.status);
2521
        } catch (ShoppingCartException scx) {
2522
          result.scx = scx;
48 ashish 2523
        } catch (Throwable th) {
553 chandransh 2524
          LOGGER.error("Internal error processing getCartsForUser", th);
2525
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2526
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2527
          x.write(oprot);
2528
          oprot.writeMessageEnd();
2529
          oprot.getTransport().flush();
2530
          return;
2531
        }
553 chandransh 2532
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2533
        result.write(oprot);
2534
        oprot.writeMessageEnd();
2535
        oprot.getTransport().flush();
2536
      }
2537
 
2538
    }
2539
 
553 chandransh 2540
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2541
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2542
      {
553 chandransh 2543
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2544
        args.read(iprot);
2545
        iprot.readMessageEnd();
553 chandransh 2546
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2547
        try {
553 chandransh 2548
          result.success = iface_.getCartsByStatus(args.status);
2549
        } catch (ShoppingCartException scx) {
2550
          result.scx = scx;
48 ashish 2551
        } catch (Throwable th) {
553 chandransh 2552
          LOGGER.error("Internal error processing getCartsByStatus", th);
2553
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2554
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2555
          x.write(oprot);
2556
          oprot.writeMessageEnd();
2557
          oprot.getTransport().flush();
2558
          return;
2559
        }
553 chandransh 2560
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2561
        result.write(oprot);
2562
        oprot.writeMessageEnd();
2563
        oprot.getTransport().flush();
2564
      }
2565
 
2566
    }
2567
 
553 chandransh 2568
    private class getCartsByTime implements ProcessFunction {
48 ashish 2569
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2570
      {
553 chandransh 2571
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2572
        args.read(iprot);
2573
        iprot.readMessageEnd();
553 chandransh 2574
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2575
        try {
553 chandransh 2576
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2577
        } catch (ShoppingCartException scx) {
2578
          result.scx = scx;
48 ashish 2579
        } catch (Throwable th) {
553 chandransh 2580
          LOGGER.error("Internal error processing getCartsByTime", th);
2581
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2582
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2583
          x.write(oprot);
2584
          oprot.writeMessageEnd();
2585
          oprot.getTransport().flush();
2586
          return;
2587
        }
553 chandransh 2588
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2589
        result.write(oprot);
2590
        oprot.writeMessageEnd();
2591
        oprot.getTransport().flush();
2592
      }
2593
 
2594
    }
2595
 
553 chandransh 2596
    private class changeCartStatus implements ProcessFunction {
130 ashish 2597
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2598
      {
553 chandransh 2599
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2600
        args.read(iprot);
2601
        iprot.readMessageEnd();
553 chandransh 2602
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2603
        try {
553 chandransh 2604
          iface_.changeCartStatus(args.cartId, args.status);
2605
        } catch (ShoppingCartException scx) {
2606
          result.scx = scx;
2607
        } catch (Throwable th) {
2608
          LOGGER.error("Internal error processing changeCartStatus", th);
2609
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2610
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2611
          x.write(oprot);
2612
          oprot.writeMessageEnd();
2613
          oprot.getTransport().flush();
2614
          return;
2615
        }
2616
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2617
        result.write(oprot);
2618
        oprot.writeMessageEnd();
2619
        oprot.getTransport().flush();
2620
      }
2621
 
2622
    }
2623
 
2624
    private class addItemToCart implements ProcessFunction {
2625
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2626
      {
2627
        addItemToCart_args args = new addItemToCart_args();
2628
        args.read(iprot);
2629
        iprot.readMessageEnd();
2630
        addItemToCart_result result = new addItemToCart_result();
2631
        try {
2632
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2633
        } catch (ShoppingCartException scx) {
2634
          result.scx = scx;
2635
        } catch (Throwable th) {
2636
          LOGGER.error("Internal error processing addItemToCart", th);
2637
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2638
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2639
          x.write(oprot);
2640
          oprot.writeMessageEnd();
2641
          oprot.getTransport().flush();
2642
          return;
2643
        }
2644
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2645
        result.write(oprot);
2646
        oprot.writeMessageEnd();
2647
        oprot.getTransport().flush();
2648
      }
2649
 
2650
    }
2651
 
2652
    private class deleteItemFromCart implements ProcessFunction {
2653
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2654
      {
2655
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2656
        args.read(iprot);
2657
        iprot.readMessageEnd();
2658
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2659
        try {
2660
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2661
        } catch (ShoppingCartException scx) {
2662
          result.scx = scx;
2663
        } catch (Throwable th) {
2664
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2665
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2666
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2667
          x.write(oprot);
2668
          oprot.writeMessageEnd();
2669
          oprot.getTransport().flush();
2670
          return;
2671
        }
2672
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2673
        result.write(oprot);
2674
        oprot.writeMessageEnd();
2675
        oprot.getTransport().flush();
2676
      }
2677
 
2678
    }
2679
 
2680
    private class changeQuantity implements ProcessFunction {
2681
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2682
      {
2683
        changeQuantity_args args = new changeQuantity_args();
2684
        args.read(iprot);
2685
        iprot.readMessageEnd();
2686
        changeQuantity_result result = new changeQuantity_result();
2687
        try {
2688
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2689
        } catch (ShoppingCartException scx) {
2690
          result.scx = scx;
2691
        } catch (Throwable th) {
2692
          LOGGER.error("Internal error processing changeQuantity", th);
2693
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2694
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2695
          x.write(oprot);
2696
          oprot.writeMessageEnd();
2697
          oprot.getTransport().flush();
2698
          return;
2699
        }
2700
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2701
        result.write(oprot);
2702
        oprot.writeMessageEnd();
2703
        oprot.getTransport().flush();
2704
      }
2705
 
2706
    }
2707
 
2708
    private class changeItemStatus implements ProcessFunction {
2709
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2710
      {
2711
        changeItemStatus_args args = new changeItemStatus_args();
2712
        args.read(iprot);
2713
        iprot.readMessageEnd();
2714
        changeItemStatus_result result = new changeItemStatus_result();
2715
        try {
2716
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2717
        } catch (ShoppingCartException scx) {
2718
          result.scx = scx;
2719
        } catch (Throwable th) {
2720
          LOGGER.error("Internal error processing changeItemStatus", th);
2721
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2722
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2723
          x.write(oprot);
2724
          oprot.writeMessageEnd();
2725
          oprot.getTransport().flush();
2726
          return;
2727
        }
2728
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2729
        result.write(oprot);
2730
        oprot.writeMessageEnd();
2731
        oprot.getTransport().flush();
2732
      }
2733
 
2734
    }
2735
 
2736
    private class addAddressToCart implements ProcessFunction {
2737
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2738
      {
2739
        addAddressToCart_args args = new addAddressToCart_args();
2740
        args.read(iprot);
2741
        iprot.readMessageEnd();
2742
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2743
        try {
2744
          iface_.addAddressToCart(args.cartId, args.addressId);
2745
        } catch (ShoppingCartException scx) {
2746
          result.scx = scx;
2747
        } catch (Throwable th) {
2748
          LOGGER.error("Internal error processing addAddressToCart", th);
2749
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2750
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2751
          x.write(oprot);
2752
          oprot.writeMessageEnd();
2753
          oprot.getTransport().flush();
2754
          return;
2755
        }
553 chandransh 2756
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2757
        result.write(oprot);
2758
        oprot.writeMessageEnd();
2759
        oprot.getTransport().flush();
2760
      }
2761
 
2762
    }
2763
 
688 chandransh 2764
    private class createOrders implements ProcessFunction {
553 chandransh 2765
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2766
      {
688 chandransh 2767
        createOrders_args args = new createOrders_args();
553 chandransh 2768
        args.read(iprot);
2769
        iprot.readMessageEnd();
688 chandransh 2770
        createOrders_result result = new createOrders_result();
553 chandransh 2771
        try {
688 chandransh 2772
          result.success = iface_.createOrders(args.cartId);
130 ashish 2773
          result.setSuccessIsSet(true);
553 chandransh 2774
        } catch (ShoppingCartException scx) {
2775
          result.scx = scx;
130 ashish 2776
        } catch (Throwable th) {
688 chandransh 2777
          LOGGER.error("Internal error processing createOrders", th);
2778
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
2779
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
130 ashish 2780
          x.write(oprot);
2781
          oprot.writeMessageEnd();
2782
          oprot.getTransport().flush();
2783
          return;
2784
        }
688 chandransh 2785
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
130 ashish 2786
        result.write(oprot);
2787
        oprot.writeMessageEnd();
2788
        oprot.getTransport().flush();
2789
      }
2790
 
2791
    }
2792
 
553 chandransh 2793
    private class validateCart implements ProcessFunction {
130 ashish 2794
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2795
      {
553 chandransh 2796
        validateCart_args args = new validateCart_args();
130 ashish 2797
        args.read(iprot);
2798
        iprot.readMessageEnd();
553 chandransh 2799
        validateCart_result result = new validateCart_result();
578 chandransh 2800
        try {
2801
          result.success = iface_.validateCart(args.cartId);
2802
        } catch (ShoppingCartException scex) {
2803
          result.scex = scex;
2804
        } catch (Throwable th) {
2805
          LOGGER.error("Internal error processing validateCart", th);
2806
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2807
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2808
          x.write(oprot);
2809
          oprot.writeMessageEnd();
2810
          oprot.getTransport().flush();
2811
          return;
2812
        }
553 chandransh 2813
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2814
        result.write(oprot);
2815
        oprot.writeMessageEnd();
2816
        oprot.getTransport().flush();
2817
      }
2818
 
2819
    }
2820
 
688 chandransh 2821
    private class mergeCart implements ProcessFunction {
578 chandransh 2822
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2823
      {
688 chandransh 2824
        mergeCart_args args = new mergeCart_args();
578 chandransh 2825
        args.read(iprot);
2826
        iprot.readMessageEnd();
688 chandransh 2827
        mergeCart_result result = new mergeCart_result();
2828
        iface_.mergeCart(args.fromCartId, args.toCartId);
2829
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2830
        result.write(oprot);
2831
        oprot.writeMessageEnd();
2832
        oprot.getTransport().flush();
2833
      }
2834
 
2835
    }
2836
 
2837
    private class checkOut implements ProcessFunction {
2838
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2839
      {
2840
        checkOut_args args = new checkOut_args();
2841
        args.read(iprot);
2842
        iprot.readMessageEnd();
2843
        checkOut_result result = new checkOut_result();
578 chandransh 2844
        try {
688 chandransh 2845
          result.success = iface_.checkOut(args.cartId);
578 chandransh 2846
          result.setSuccessIsSet(true);
2847
        } catch (ShoppingCartException scex) {
2848
          result.scex = scex;
2849
        } catch (Throwable th) {
688 chandransh 2850
          LOGGER.error("Internal error processing checkOut", th);
2851
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
2852
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 2853
          x.write(oprot);
2854
          oprot.writeMessageEnd();
2855
          oprot.getTransport().flush();
2856
          return;
2857
        }
688 chandransh 2858
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 2859
        result.write(oprot);
2860
        oprot.writeMessageEnd();
2861
        oprot.getTransport().flush();
2862
      }
2863
 
2864
    }
2865
 
688 chandransh 2866
    private class resetCart implements ProcessFunction {
553 chandransh 2867
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2868
      {
688 chandransh 2869
        resetCart_args args = new resetCart_args();
553 chandransh 2870
        args.read(iprot);
2871
        iprot.readMessageEnd();
688 chandransh 2872
        resetCart_result result = new resetCart_result();
2873
        try {
2874
          result.success = iface_.resetCart(args.cartId, args.items);
2875
          result.setSuccessIsSet(true);
2876
        } catch (ShoppingCartException scex) {
2877
          result.scex = scex;
2878
        } catch (Throwable th) {
2879
          LOGGER.error("Internal error processing resetCart", th);
2880
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
2881
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
2882
          x.write(oprot);
2883
          oprot.writeMessageEnd();
2884
          oprot.getTransport().flush();
2885
          return;
2886
        }
2887
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 2888
        result.write(oprot);
2889
        oprot.writeMessageEnd();
2890
        oprot.getTransport().flush();
2891
      }
2892
 
2893
    }
2894
 
2895
    private class getMyResearch implements ProcessFunction {
2896
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2897
      {
2898
        getMyResearch_args args = new getMyResearch_args();
2899
        args.read(iprot);
2900
        iprot.readMessageEnd();
2901
        getMyResearch_result result = new getMyResearch_result();
2902
        try {
771 rajveer 2903
          result.success = iface_.getMyResearch(args.userId);
553 chandransh 2904
        } catch (WidgetException scx) {
2905
          result.scx = scx;
2906
        } catch (Throwable th) {
2907
          LOGGER.error("Internal error processing getMyResearch", th);
2908
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2909
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2910
          x.write(oprot);
2911
          oprot.writeMessageEnd();
2912
          oprot.getTransport().flush();
2913
          return;
2914
        }
2915
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2916
        result.write(oprot);
2917
        oprot.writeMessageEnd();
2918
        oprot.getTransport().flush();
2919
      }
2920
 
2921
    }
2922
 
2923
    private class updateMyResearch implements ProcessFunction {
2924
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2925
      {
2926
        updateMyResearch_args args = new updateMyResearch_args();
2927
        args.read(iprot);
2928
        iprot.readMessageEnd();
2929
        updateMyResearch_result result = new updateMyResearch_result();
2930
        try {
771 rajveer 2931
          result.success = iface_.updateMyResearch(args.userId, args.itemId);
130 ashish 2932
          result.setSuccessIsSet(true);
553 chandransh 2933
        } catch (WidgetException scx) {
2934
          result.scx = scx;
130 ashish 2935
        } catch (Throwable th) {
553 chandransh 2936
          LOGGER.error("Internal error processing updateMyResearch", th);
2937
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
2938
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 2939
          x.write(oprot);
2940
          oprot.writeMessageEnd();
2941
          oprot.getTransport().flush();
2942
          return;
2943
        }
553 chandransh 2944
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 2945
        result.write(oprot);
2946
        oprot.writeMessageEnd();
2947
        oprot.getTransport().flush();
2948
      }
2949
 
2950
    }
2951
 
553 chandransh 2952
    private class deleteItemFromMyResearch implements ProcessFunction {
2953
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2954
      {
2955
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
2956
        args.read(iprot);
2957
        iprot.readMessageEnd();
2958
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
2959
        try {
771 rajveer 2960
          iface_.deleteItemFromMyResearch(args.userId, args.itemId);
553 chandransh 2961
        } catch (WidgetException scx) {
2962
          result.scx = scx;
2963
        } catch (Throwable th) {
2964
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
2965
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
2966
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
2967
          x.write(oprot);
2968
          oprot.writeMessageEnd();
2969
          oprot.getTransport().flush();
2970
          return;
2971
        }
2972
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
2973
        result.write(oprot);
2974
        oprot.writeMessageEnd();
2975
        oprot.getTransport().flush();
2976
      }
2977
 
2978
    }
2979
 
771 rajveer 2980
    private class updateBrowseHistory implements ProcessFunction {
553 chandransh 2981
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2982
      {
771 rajveer 2983
        updateBrowseHistory_args args = new updateBrowseHistory_args();
553 chandransh 2984
        args.read(iprot);
2985
        iprot.readMessageEnd();
771 rajveer 2986
        updateBrowseHistory_result result = new updateBrowseHistory_result();
2987
        iface_.updateBrowseHistory(args.userId, args.itemId);
2988
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2989
        result.write(oprot);
2990
        oprot.writeMessageEnd();
2991
        oprot.getTransport().flush();
2992
      }
2993
 
2994
    }
2995
 
771 rajveer 2996
    private class getBrowseHistory implements ProcessFunction {
553 chandransh 2997
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2998
      {
771 rajveer 2999
        getBrowseHistory_args args = new getBrowseHistory_args();
553 chandransh 3000
        args.read(iprot);
3001
        iprot.readMessageEnd();
771 rajveer 3002
        getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 3003
        try {
771 rajveer 3004
          result.success = iface_.getBrowseHistory(args.userId);
553 chandransh 3005
        } catch (WidgetException scx) {
3006
          result.scx = scx;
3007
        } catch (Throwable th) {
771 rajveer 3008
          LOGGER.error("Internal error processing getBrowseHistory", th);
3009
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
3010
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
553 chandransh 3011
          x.write(oprot);
3012
          oprot.writeMessageEnd();
3013
          oprot.getTransport().flush();
3014
          return;
3015
        }
771 rajveer 3016
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 3017
        result.write(oprot);
3018
        oprot.writeMessageEnd();
3019
        oprot.getTransport().flush();
3020
      }
3021
 
3022
    }
3023
 
771 rajveer 3024
    private class mergeBrowseHistory implements ProcessFunction {
553 chandransh 3025
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
3026
      {
771 rajveer 3027
        mergeBrowseHistory_args args = new mergeBrowseHistory_args();
553 chandransh 3028
        args.read(iprot);
3029
        iprot.readMessageEnd();
771 rajveer 3030
        mergeBrowseHistory_result result = new mergeBrowseHistory_result();
3031
        iface_.mergeBrowseHistory(args.fromUserId, args.toUserId);
3032
        oprot.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 3033
        result.write(oprot);
3034
        oprot.writeMessageEnd();
3035
        oprot.getTransport().flush();
3036
      }
3037
 
3038
    }
3039
 
48 ashish 3040
  }
3041
 
764 rajveer 3042
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
3043
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
3044
 
3045
 
3046
 
3047
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3048
    public enum _Fields implements TFieldIdEnum {
3049
;
3050
 
3051
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3052
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3053
 
3054
      static {
3055
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3056
          byId.put((int)field._thriftId, field);
3057
          byName.put(field.getFieldName(), field);
3058
        }
3059
      }
3060
 
3061
      /**
3062
       * Find the _Fields constant that matches fieldId, or null if its not found.
3063
       */
3064
      public static _Fields findByThriftId(int fieldId) {
3065
        return byId.get(fieldId);
3066
      }
3067
 
3068
      /**
3069
       * Find the _Fields constant that matches fieldId, throwing an exception
3070
       * if it is not found.
3071
       */
3072
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3073
        _Fields fields = findByThriftId(fieldId);
3074
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3075
        return fields;
3076
      }
3077
 
3078
      /**
3079
       * Find the _Fields constant that matches name, or null if its not found.
3080
       */
3081
      public static _Fields findByName(String name) {
3082
        return byName.get(name);
3083
      }
3084
 
3085
      private final short _thriftId;
3086
      private final String _fieldName;
3087
 
3088
      _Fields(short thriftId, String fieldName) {
3089
        _thriftId = thriftId;
3090
        _fieldName = fieldName;
3091
      }
3092
 
3093
      public short getThriftFieldId() {
3094
        return _thriftId;
3095
      }
3096
 
3097
      public String getFieldName() {
3098
        return _fieldName;
3099
      }
3100
    }
3101
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3102
    }});
3103
 
3104
    static {
3105
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3106
    }
3107
 
3108
    public closeSession_args() {
3109
    }
3110
 
3111
    /**
3112
     * Performs a deep copy on <i>other</i>.
3113
     */
3114
    public closeSession_args(closeSession_args other) {
3115
    }
3116
 
3117
    public closeSession_args deepCopy() {
3118
      return new closeSession_args(this);
3119
    }
3120
 
3121
    @Deprecated
3122
    public closeSession_args clone() {
3123
      return new closeSession_args(this);
3124
    }
3125
 
3126
    public void setFieldValue(_Fields field, Object value) {
3127
      switch (field) {
3128
      }
3129
    }
3130
 
3131
    public void setFieldValue(int fieldID, Object value) {
3132
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3133
    }
3134
 
3135
    public Object getFieldValue(_Fields field) {
3136
      switch (field) {
3137
      }
3138
      throw new IllegalStateException();
3139
    }
3140
 
3141
    public Object getFieldValue(int fieldId) {
3142
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3143
    }
3144
 
3145
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3146
    public boolean isSet(_Fields field) {
3147
      switch (field) {
3148
      }
3149
      throw new IllegalStateException();
3150
    }
3151
 
3152
    public boolean isSet(int fieldID) {
3153
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3154
    }
3155
 
3156
    @Override
3157
    public boolean equals(Object that) {
3158
      if (that == null)
3159
        return false;
3160
      if (that instanceof closeSession_args)
3161
        return this.equals((closeSession_args)that);
3162
      return false;
3163
    }
3164
 
3165
    public boolean equals(closeSession_args that) {
3166
      if (that == null)
3167
        return false;
3168
 
3169
      return true;
3170
    }
3171
 
3172
    @Override
3173
    public int hashCode() {
3174
      return 0;
3175
    }
3176
 
3177
    public int compareTo(closeSession_args other) {
3178
      if (!getClass().equals(other.getClass())) {
3179
        return getClass().getName().compareTo(other.getClass().getName());
3180
      }
3181
 
3182
      int lastComparison = 0;
3183
      closeSession_args typedOther = (closeSession_args)other;
3184
 
3185
      return 0;
3186
    }
3187
 
3188
    public void read(TProtocol iprot) throws TException {
3189
      TField field;
3190
      iprot.readStructBegin();
3191
      while (true)
3192
      {
3193
        field = iprot.readFieldBegin();
3194
        if (field.type == TType.STOP) { 
3195
          break;
3196
        }
3197
        _Fields fieldId = _Fields.findByThriftId(field.id);
3198
        if (fieldId == null) {
3199
          TProtocolUtil.skip(iprot, field.type);
3200
        } else {
3201
          switch (fieldId) {
3202
          }
3203
          iprot.readFieldEnd();
3204
        }
3205
      }
3206
      iprot.readStructEnd();
3207
      validate();
3208
    }
3209
 
3210
    public void write(TProtocol oprot) throws TException {
3211
      validate();
3212
 
3213
      oprot.writeStructBegin(STRUCT_DESC);
3214
      oprot.writeFieldStop();
3215
      oprot.writeStructEnd();
3216
    }
3217
 
3218
    @Override
3219
    public String toString() {
3220
      StringBuilder sb = new StringBuilder("closeSession_args(");
3221
      boolean first = true;
3222
 
3223
      sb.append(")");
3224
      return sb.toString();
3225
    }
3226
 
3227
    public void validate() throws TException {
3228
      // check for required fields
3229
    }
3230
 
3231
  }
3232
 
3233
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3234
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3235
 
3236
 
3237
 
3238
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3239
    public enum _Fields implements TFieldIdEnum {
3240
;
3241
 
3242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3244
 
3245
      static {
3246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3247
          byId.put((int)field._thriftId, field);
3248
          byName.put(field.getFieldName(), field);
3249
        }
3250
      }
3251
 
3252
      /**
3253
       * Find the _Fields constant that matches fieldId, or null if its not found.
3254
       */
3255
      public static _Fields findByThriftId(int fieldId) {
3256
        return byId.get(fieldId);
3257
      }
3258
 
3259
      /**
3260
       * Find the _Fields constant that matches fieldId, throwing an exception
3261
       * if it is not found.
3262
       */
3263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3264
        _Fields fields = findByThriftId(fieldId);
3265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3266
        return fields;
3267
      }
3268
 
3269
      /**
3270
       * Find the _Fields constant that matches name, or null if its not found.
3271
       */
3272
      public static _Fields findByName(String name) {
3273
        return byName.get(name);
3274
      }
3275
 
3276
      private final short _thriftId;
3277
      private final String _fieldName;
3278
 
3279
      _Fields(short thriftId, String fieldName) {
3280
        _thriftId = thriftId;
3281
        _fieldName = fieldName;
3282
      }
3283
 
3284
      public short getThriftFieldId() {
3285
        return _thriftId;
3286
      }
3287
 
3288
      public String getFieldName() {
3289
        return _fieldName;
3290
      }
3291
    }
3292
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3293
    }});
3294
 
3295
    static {
3296
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3297
    }
3298
 
3299
    public closeSession_result() {
3300
    }
3301
 
3302
    /**
3303
     * Performs a deep copy on <i>other</i>.
3304
     */
3305
    public closeSession_result(closeSession_result other) {
3306
    }
3307
 
3308
    public closeSession_result deepCopy() {
3309
      return new closeSession_result(this);
3310
    }
3311
 
3312
    @Deprecated
3313
    public closeSession_result clone() {
3314
      return new closeSession_result(this);
3315
    }
3316
 
3317
    public void setFieldValue(_Fields field, Object value) {
3318
      switch (field) {
3319
      }
3320
    }
3321
 
3322
    public void setFieldValue(int fieldID, Object value) {
3323
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3324
    }
3325
 
3326
    public Object getFieldValue(_Fields field) {
3327
      switch (field) {
3328
      }
3329
      throw new IllegalStateException();
3330
    }
3331
 
3332
    public Object getFieldValue(int fieldId) {
3333
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3334
    }
3335
 
3336
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3337
    public boolean isSet(_Fields field) {
3338
      switch (field) {
3339
      }
3340
      throw new IllegalStateException();
3341
    }
3342
 
3343
    public boolean isSet(int fieldID) {
3344
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3345
    }
3346
 
3347
    @Override
3348
    public boolean equals(Object that) {
3349
      if (that == null)
3350
        return false;
3351
      if (that instanceof closeSession_result)
3352
        return this.equals((closeSession_result)that);
3353
      return false;
3354
    }
3355
 
3356
    public boolean equals(closeSession_result that) {
3357
      if (that == null)
3358
        return false;
3359
 
3360
      return true;
3361
    }
3362
 
3363
    @Override
3364
    public int hashCode() {
3365
      return 0;
3366
    }
3367
 
3368
    public int compareTo(closeSession_result other) {
3369
      if (!getClass().equals(other.getClass())) {
3370
        return getClass().getName().compareTo(other.getClass().getName());
3371
      }
3372
 
3373
      int lastComparison = 0;
3374
      closeSession_result typedOther = (closeSession_result)other;
3375
 
3376
      return 0;
3377
    }
3378
 
3379
    public void read(TProtocol iprot) throws TException {
3380
      TField field;
3381
      iprot.readStructBegin();
3382
      while (true)
3383
      {
3384
        field = iprot.readFieldBegin();
3385
        if (field.type == TType.STOP) { 
3386
          break;
3387
        }
3388
        _Fields fieldId = _Fields.findByThriftId(field.id);
3389
        if (fieldId == null) {
3390
          TProtocolUtil.skip(iprot, field.type);
3391
        } else {
3392
          switch (fieldId) {
3393
          }
3394
          iprot.readFieldEnd();
3395
        }
3396
      }
3397
      iprot.readStructEnd();
3398
      validate();
3399
    }
3400
 
3401
    public void write(TProtocol oprot) throws TException {
3402
      oprot.writeStructBegin(STRUCT_DESC);
3403
 
3404
      oprot.writeFieldStop();
3405
      oprot.writeStructEnd();
3406
    }
3407
 
3408
    @Override
3409
    public String toString() {
3410
      StringBuilder sb = new StringBuilder("closeSession_result(");
3411
      boolean first = true;
3412
 
3413
      sb.append(")");
3414
      return sb.toString();
3415
    }
3416
 
3417
    public void validate() throws TException {
3418
      // check for required fields
3419
    }
3420
 
3421
  }
3422
 
553 chandransh 3423
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3424
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3425
 
553 chandransh 3426
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3427
 
553 chandransh 3428
    private String jsessionId;
48 ashish 3429
 
3430
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3431
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3432
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3433
 
3434
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3435
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3436
 
3437
      static {
3438
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3439
          byId.put((int)field._thriftId, field);
3440
          byName.put(field.getFieldName(), field);
3441
        }
3442
      }
3443
 
3444
      /**
3445
       * Find the _Fields constant that matches fieldId, or null if its not found.
3446
       */
3447
      public static _Fields findByThriftId(int fieldId) {
3448
        return byId.get(fieldId);
3449
      }
3450
 
3451
      /**
3452
       * Find the _Fields constant that matches fieldId, throwing an exception
3453
       * if it is not found.
3454
       */
3455
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3456
        _Fields fields = findByThriftId(fieldId);
3457
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3458
        return fields;
3459
      }
3460
 
3461
      /**
3462
       * Find the _Fields constant that matches name, or null if its not found.
3463
       */
3464
      public static _Fields findByName(String name) {
3465
        return byName.get(name);
3466
      }
3467
 
3468
      private final short _thriftId;
3469
      private final String _fieldName;
3470
 
3471
      _Fields(short thriftId, String fieldName) {
3472
        _thriftId = thriftId;
3473
        _fieldName = fieldName;
3474
      }
3475
 
3476
      public short getThriftFieldId() {
3477
        return _thriftId;
3478
      }
3479
 
3480
      public String getFieldName() {
3481
        return _fieldName;
3482
      }
3483
    }
3484
 
3485
    // isset id assignments
3486
 
3487
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3488
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3489
          new FieldValueMetaData(TType.STRING)));
48 ashish 3490
    }});
3491
 
3492
    static {
553 chandransh 3493
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3494
    }
3495
 
553 chandransh 3496
    public createAnonymousUser_args() {
48 ashish 3497
    }
3498
 
553 chandransh 3499
    public createAnonymousUser_args(
3500
      String jsessionId)
48 ashish 3501
    {
3502
      this();
553 chandransh 3503
      this.jsessionId = jsessionId;
48 ashish 3504
    }
3505
 
3506
    /**
3507
     * Performs a deep copy on <i>other</i>.
3508
     */
553 chandransh 3509
    public createAnonymousUser_args(createAnonymousUser_args other) {
3510
      if (other.isSetJsessionId()) {
3511
        this.jsessionId = other.jsessionId;
48 ashish 3512
      }
3513
    }
3514
 
553 chandransh 3515
    public createAnonymousUser_args deepCopy() {
3516
      return new createAnonymousUser_args(this);
48 ashish 3517
    }
3518
 
3519
    @Deprecated
553 chandransh 3520
    public createAnonymousUser_args clone() {
3521
      return new createAnonymousUser_args(this);
48 ashish 3522
    }
3523
 
553 chandransh 3524
    public String getJsessionId() {
3525
      return this.jsessionId;
48 ashish 3526
    }
3527
 
553 chandransh 3528
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3529
      this.jsessionId = jsessionId;
48 ashish 3530
      return this;
3531
    }
3532
 
553 chandransh 3533
    public void unsetJsessionId() {
3534
      this.jsessionId = null;
48 ashish 3535
    }
3536
 
553 chandransh 3537
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3538
    public boolean isSetJsessionId() {
3539
      return this.jsessionId != null;
48 ashish 3540
    }
3541
 
553 chandransh 3542
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3543
      if (!value) {
553 chandransh 3544
        this.jsessionId = null;
48 ashish 3545
      }
3546
    }
3547
 
3548
    public void setFieldValue(_Fields field, Object value) {
3549
      switch (field) {
553 chandransh 3550
      case JSESSION_ID:
48 ashish 3551
        if (value == null) {
553 chandransh 3552
          unsetJsessionId();
48 ashish 3553
        } else {
553 chandransh 3554
          setJsessionId((String)value);
48 ashish 3555
        }
3556
        break;
3557
 
3558
      }
3559
    }
3560
 
3561
    public void setFieldValue(int fieldID, Object value) {
3562
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3563
    }
3564
 
3565
    public Object getFieldValue(_Fields field) {
3566
      switch (field) {
553 chandransh 3567
      case JSESSION_ID:
3568
        return getJsessionId();
48 ashish 3569
 
3570
      }
3571
      throw new IllegalStateException();
3572
    }
3573
 
3574
    public Object getFieldValue(int fieldId) {
3575
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3576
    }
3577
 
3578
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3579
    public boolean isSet(_Fields field) {
3580
      switch (field) {
553 chandransh 3581
      case JSESSION_ID:
3582
        return isSetJsessionId();
48 ashish 3583
      }
3584
      throw new IllegalStateException();
3585
    }
3586
 
3587
    public boolean isSet(int fieldID) {
3588
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3589
    }
3590
 
3591
    @Override
3592
    public boolean equals(Object that) {
3593
      if (that == null)
3594
        return false;
553 chandransh 3595
      if (that instanceof createAnonymousUser_args)
3596
        return this.equals((createAnonymousUser_args)that);
48 ashish 3597
      return false;
3598
    }
3599
 
553 chandransh 3600
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3601
      if (that == null)
3602
        return false;
3603
 
553 chandransh 3604
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3605
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3606
      if (this_present_jsessionId || that_present_jsessionId) {
3607
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3608
          return false;
553 chandransh 3609
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3610
          return false;
3611
      }
3612
 
3613
      return true;
3614
    }
3615
 
3616
    @Override
3617
    public int hashCode() {
3618
      return 0;
3619
    }
3620
 
553 chandransh 3621
    public int compareTo(createAnonymousUser_args other) {
3622
      if (!getClass().equals(other.getClass())) {
3623
        return getClass().getName().compareTo(other.getClass().getName());
3624
      }
3625
 
3626
      int lastComparison = 0;
3627
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3628
 
3629
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3630
      if (lastComparison != 0) {
3631
        return lastComparison;
3632
      }
3633
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3634
      if (lastComparison != 0) {
3635
        return lastComparison;
3636
      }
3637
      return 0;
3638
    }
3639
 
48 ashish 3640
    public void read(TProtocol iprot) throws TException {
3641
      TField field;
3642
      iprot.readStructBegin();
3643
      while (true)
3644
      {
3645
        field = iprot.readFieldBegin();
3646
        if (field.type == TType.STOP) { 
3647
          break;
3648
        }
3649
        _Fields fieldId = _Fields.findByThriftId(field.id);
3650
        if (fieldId == null) {
3651
          TProtocolUtil.skip(iprot, field.type);
3652
        } else {
3653
          switch (fieldId) {
553 chandransh 3654
            case JSESSION_ID:
3655
              if (field.type == TType.STRING) {
3656
                this.jsessionId = iprot.readString();
48 ashish 3657
              } else { 
3658
                TProtocolUtil.skip(iprot, field.type);
3659
              }
3660
              break;
3661
          }
3662
          iprot.readFieldEnd();
3663
        }
3664
      }
3665
      iprot.readStructEnd();
3666
      validate();
3667
    }
3668
 
3669
    public void write(TProtocol oprot) throws TException {
3670
      validate();
3671
 
3672
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3673
      if (this.jsessionId != null) {
3674
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3675
        oprot.writeString(this.jsessionId);
48 ashish 3676
        oprot.writeFieldEnd();
3677
      }
3678
      oprot.writeFieldStop();
3679
      oprot.writeStructEnd();
3680
    }
3681
 
3682
    @Override
3683
    public String toString() {
553 chandransh 3684
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3685
      boolean first = true;
3686
 
553 chandransh 3687
      sb.append("jsessionId:");
3688
      if (this.jsessionId == null) {
48 ashish 3689
        sb.append("null");
3690
      } else {
553 chandransh 3691
        sb.append(this.jsessionId);
48 ashish 3692
      }
3693
      first = false;
3694
      sb.append(")");
3695
      return sb.toString();
3696
    }
3697
 
3698
    public void validate() throws TException {
3699
      // check for required fields
3700
    }
3701
 
3702
  }
3703
 
571 rajveer 3704
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3705
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3706
 
3707
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3708
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3709
 
553 chandransh 3710
    private User success;
3711
    private UserContextException ucex;
48 ashish 3712
 
3713
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3714
    public enum _Fields implements TFieldIdEnum {
3715
      SUCCESS((short)0, "success"),
553 chandransh 3716
      UCEX((short)1, "ucex");
48 ashish 3717
 
3718
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3719
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3720
 
3721
      static {
3722
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3723
          byId.put((int)field._thriftId, field);
3724
          byName.put(field.getFieldName(), field);
3725
        }
3726
      }
3727
 
3728
      /**
3729
       * Find the _Fields constant that matches fieldId, or null if its not found.
3730
       */
3731
      public static _Fields findByThriftId(int fieldId) {
3732
        return byId.get(fieldId);
3733
      }
3734
 
3735
      /**
3736
       * Find the _Fields constant that matches fieldId, throwing an exception
3737
       * if it is not found.
3738
       */
3739
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3740
        _Fields fields = findByThriftId(fieldId);
3741
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3742
        return fields;
3743
      }
3744
 
3745
      /**
3746
       * Find the _Fields constant that matches name, or null if its not found.
3747
       */
3748
      public static _Fields findByName(String name) {
3749
        return byName.get(name);
3750
      }
3751
 
3752
      private final short _thriftId;
3753
      private final String _fieldName;
3754
 
3755
      _Fields(short thriftId, String fieldName) {
3756
        _thriftId = thriftId;
3757
        _fieldName = fieldName;
3758
      }
3759
 
3760
      public short getThriftFieldId() {
3761
        return _thriftId;
3762
      }
3763
 
3764
      public String getFieldName() {
3765
        return _fieldName;
3766
      }
3767
    }
3768
 
3769
    // isset id assignments
3770
 
3771
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3772
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3773
          new StructMetaData(TType.STRUCT, User.class)));
3774
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3775
          new FieldValueMetaData(TType.STRUCT)));
3776
    }});
3777
 
3778
    static {
553 chandransh 3779
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3780
    }
3781
 
553 chandransh 3782
    public createAnonymousUser_result() {
48 ashish 3783
    }
3784
 
553 chandransh 3785
    public createAnonymousUser_result(
3786
      User success,
3787
      UserContextException ucex)
48 ashish 3788
    {
3789
      this();
3790
      this.success = success;
553 chandransh 3791
      this.ucex = ucex;
48 ashish 3792
    }
3793
 
3794
    /**
3795
     * Performs a deep copy on <i>other</i>.
3796
     */
553 chandransh 3797
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3798
      if (other.isSetSuccess()) {
553 chandransh 3799
        this.success = new User(other.success);
48 ashish 3800
      }
553 chandransh 3801
      if (other.isSetUcex()) {
3802
        this.ucex = new UserContextException(other.ucex);
48 ashish 3803
      }
3804
    }
3805
 
553 chandransh 3806
    public createAnonymousUser_result deepCopy() {
3807
      return new createAnonymousUser_result(this);
48 ashish 3808
    }
3809
 
3810
    @Deprecated
553 chandransh 3811
    public createAnonymousUser_result clone() {
3812
      return new createAnonymousUser_result(this);
48 ashish 3813
    }
3814
 
553 chandransh 3815
    public User getSuccess() {
48 ashish 3816
      return this.success;
3817
    }
3818
 
553 chandransh 3819
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3820
      this.success = success;
3821
      return this;
3822
    }
3823
 
3824
    public void unsetSuccess() {
3825
      this.success = null;
3826
    }
3827
 
3828
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3829
    public boolean isSetSuccess() {
3830
      return this.success != null;
3831
    }
3832
 
3833
    public void setSuccessIsSet(boolean value) {
3834
      if (!value) {
3835
        this.success = null;
3836
      }
3837
    }
3838
 
553 chandransh 3839
    public UserContextException getUcex() {
3840
      return this.ucex;
48 ashish 3841
    }
3842
 
553 chandransh 3843
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3844
      this.ucex = ucex;
48 ashish 3845
      return this;
3846
    }
3847
 
553 chandransh 3848
    public void unsetUcex() {
3849
      this.ucex = null;
48 ashish 3850
    }
3851
 
553 chandransh 3852
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3853
    public boolean isSetUcex() {
3854
      return this.ucex != null;
48 ashish 3855
    }
3856
 
553 chandransh 3857
    public void setUcexIsSet(boolean value) {
48 ashish 3858
      if (!value) {
553 chandransh 3859
        this.ucex = null;
48 ashish 3860
      }
3861
    }
3862
 
3863
    public void setFieldValue(_Fields field, Object value) {
3864
      switch (field) {
3865
      case SUCCESS:
3866
        if (value == null) {
3867
          unsetSuccess();
3868
        } else {
553 chandransh 3869
          setSuccess((User)value);
48 ashish 3870
        }
3871
        break;
3872
 
553 chandransh 3873
      case UCEX:
48 ashish 3874
        if (value == null) {
553 chandransh 3875
          unsetUcex();
48 ashish 3876
        } else {
553 chandransh 3877
          setUcex((UserContextException)value);
48 ashish 3878
        }
3879
        break;
3880
 
3881
      }
3882
    }
3883
 
3884
    public void setFieldValue(int fieldID, Object value) {
3885
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3886
    }
3887
 
3888
    public Object getFieldValue(_Fields field) {
3889
      switch (field) {
3890
      case SUCCESS:
3891
        return getSuccess();
3892
 
553 chandransh 3893
      case UCEX:
3894
        return getUcex();
48 ashish 3895
 
3896
      }
3897
      throw new IllegalStateException();
3898
    }
3899
 
3900
    public Object getFieldValue(int fieldId) {
3901
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3902
    }
3903
 
3904
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3905
    public boolean isSet(_Fields field) {
3906
      switch (field) {
3907
      case SUCCESS:
3908
        return isSetSuccess();
553 chandransh 3909
      case UCEX:
3910
        return isSetUcex();
48 ashish 3911
      }
3912
      throw new IllegalStateException();
3913
    }
3914
 
3915
    public boolean isSet(int fieldID) {
3916
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3917
    }
3918
 
3919
    @Override
3920
    public boolean equals(Object that) {
3921
      if (that == null)
3922
        return false;
553 chandransh 3923
      if (that instanceof createAnonymousUser_result)
3924
        return this.equals((createAnonymousUser_result)that);
48 ashish 3925
      return false;
3926
    }
3927
 
553 chandransh 3928
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3929
      if (that == null)
3930
        return false;
3931
 
3932
      boolean this_present_success = true && this.isSetSuccess();
3933
      boolean that_present_success = true && that.isSetSuccess();
3934
      if (this_present_success || that_present_success) {
3935
        if (!(this_present_success && that_present_success))
3936
          return false;
3937
        if (!this.success.equals(that.success))
3938
          return false;
3939
      }
3940
 
553 chandransh 3941
      boolean this_present_ucex = true && this.isSetUcex();
3942
      boolean that_present_ucex = true && that.isSetUcex();
3943
      if (this_present_ucex || that_present_ucex) {
3944
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3945
          return false;
553 chandransh 3946
        if (!this.ucex.equals(that.ucex))
48 ashish 3947
          return false;
3948
      }
3949
 
3950
      return true;
3951
    }
3952
 
3953
    @Override
3954
    public int hashCode() {
3955
      return 0;
3956
    }
3957
 
571 rajveer 3958
    public int compareTo(createAnonymousUser_result other) {
3959
      if (!getClass().equals(other.getClass())) {
3960
        return getClass().getName().compareTo(other.getClass().getName());
3961
      }
3962
 
3963
      int lastComparison = 0;
3964
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3965
 
3966
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3967
      if (lastComparison != 0) {
3968
        return lastComparison;
3969
      }
3970
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3971
      if (lastComparison != 0) {
3972
        return lastComparison;
3973
      }
3974
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3975
      if (lastComparison != 0) {
3976
        return lastComparison;
3977
      }
3978
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3979
      if (lastComparison != 0) {
3980
        return lastComparison;
3981
      }
3982
      return 0;
3983
    }
3984
 
48 ashish 3985
    public void read(TProtocol iprot) throws TException {
3986
      TField field;
3987
      iprot.readStructBegin();
3988
      while (true)
3989
      {
3990
        field = iprot.readFieldBegin();
3991
        if (field.type == TType.STOP) { 
3992
          break;
3993
        }
3994
        _Fields fieldId = _Fields.findByThriftId(field.id);
3995
        if (fieldId == null) {
3996
          TProtocolUtil.skip(iprot, field.type);
3997
        } else {
3998
          switch (fieldId) {
3999
            case SUCCESS:
4000
              if (field.type == TType.STRUCT) {
553 chandransh 4001
                this.success = new User();
48 ashish 4002
                this.success.read(iprot);
4003
              } else { 
4004
                TProtocolUtil.skip(iprot, field.type);
4005
              }
4006
              break;
553 chandransh 4007
            case UCEX:
48 ashish 4008
              if (field.type == TType.STRUCT) {
553 chandransh 4009
                this.ucex = new UserContextException();
4010
                this.ucex.read(iprot);
48 ashish 4011
              } else { 
4012
                TProtocolUtil.skip(iprot, field.type);
4013
              }
4014
              break;
4015
          }
4016
          iprot.readFieldEnd();
4017
        }
4018
      }
4019
      iprot.readStructEnd();
4020
      validate();
4021
    }
4022
 
4023
    public void write(TProtocol oprot) throws TException {
4024
      oprot.writeStructBegin(STRUCT_DESC);
4025
 
4026
      if (this.isSetSuccess()) {
4027
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4028
        this.success.write(oprot);
4029
        oprot.writeFieldEnd();
553 chandransh 4030
      } else if (this.isSetUcex()) {
4031
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4032
        this.ucex.write(oprot);
48 ashish 4033
        oprot.writeFieldEnd();
4034
      }
4035
      oprot.writeFieldStop();
4036
      oprot.writeStructEnd();
4037
    }
4038
 
4039
    @Override
4040
    public String toString() {
553 chandransh 4041
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 4042
      boolean first = true;
4043
 
4044
      sb.append("success:");
4045
      if (this.success == null) {
4046
        sb.append("null");
4047
      } else {
4048
        sb.append(this.success);
4049
      }
4050
      first = false;
4051
      if (!first) sb.append(", ");
553 chandransh 4052
      sb.append("ucex:");
4053
      if (this.ucex == null) {
48 ashish 4054
        sb.append("null");
4055
      } else {
553 chandransh 4056
        sb.append(this.ucex);
48 ashish 4057
      }
4058
      first = false;
4059
      sb.append(")");
4060
      return sb.toString();
4061
    }
4062
 
4063
    public void validate() throws TException {
4064
      // check for required fields
4065
    }
4066
 
4067
  }
4068
 
553 chandransh 4069
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
4070
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 4071
 
4072
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
4073
 
4074
    private long userId;
4075
 
4076
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4077
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4078
      USER_ID((short)1, "userId");
48 ashish 4079
 
4080
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4081
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4082
 
4083
      static {
4084
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4085
          byId.put((int)field._thriftId, field);
4086
          byName.put(field.getFieldName(), field);
4087
        }
4088
      }
4089
 
4090
      /**
4091
       * Find the _Fields constant that matches fieldId, or null if its not found.
4092
       */
4093
      public static _Fields findByThriftId(int fieldId) {
4094
        return byId.get(fieldId);
4095
      }
4096
 
4097
      /**
4098
       * Find the _Fields constant that matches fieldId, throwing an exception
4099
       * if it is not found.
4100
       */
4101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4102
        _Fields fields = findByThriftId(fieldId);
4103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4104
        return fields;
4105
      }
4106
 
4107
      /**
4108
       * Find the _Fields constant that matches name, or null if its not found.
4109
       */
4110
      public static _Fields findByName(String name) {
4111
        return byName.get(name);
4112
      }
4113
 
4114
      private final short _thriftId;
4115
      private final String _fieldName;
4116
 
4117
      _Fields(short thriftId, String fieldName) {
4118
        _thriftId = thriftId;
4119
        _fieldName = fieldName;
4120
      }
4121
 
4122
      public short getThriftFieldId() {
4123
        return _thriftId;
4124
      }
4125
 
4126
      public String getFieldName() {
4127
        return _fieldName;
4128
      }
4129
    }
4130
 
4131
    // isset id assignments
4132
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 4133
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 4134
 
4135
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4136
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4137
          new FieldValueMetaData(TType.I64)));
4138
    }});
4139
 
4140
    static {
553 chandransh 4141
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 4142
    }
4143
 
553 chandransh 4144
    public getUserById_args() {
48 ashish 4145
    }
4146
 
553 chandransh 4147
    public getUserById_args(
4148
      long userId)
48 ashish 4149
    {
4150
      this();
4151
      this.userId = userId;
4152
      setUserIdIsSet(true);
4153
    }
4154
 
4155
    /**
4156
     * Performs a deep copy on <i>other</i>.
4157
     */
553 chandransh 4158
    public getUserById_args(getUserById_args other) {
48 ashish 4159
      __isset_bit_vector.clear();
4160
      __isset_bit_vector.or(other.__isset_bit_vector);
4161
      this.userId = other.userId;
4162
    }
4163
 
553 chandransh 4164
    public getUserById_args deepCopy() {
4165
      return new getUserById_args(this);
48 ashish 4166
    }
4167
 
4168
    @Deprecated
553 chandransh 4169
    public getUserById_args clone() {
4170
      return new getUserById_args(this);
48 ashish 4171
    }
4172
 
4173
    public long getUserId() {
4174
      return this.userId;
4175
    }
4176
 
553 chandransh 4177
    public getUserById_args setUserId(long userId) {
48 ashish 4178
      this.userId = userId;
4179
      setUserIdIsSet(true);
4180
      return this;
4181
    }
4182
 
4183
    public void unsetUserId() {
4184
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4185
    }
4186
 
4187
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4188
    public boolean isSetUserId() {
4189
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4190
    }
4191
 
4192
    public void setUserIdIsSet(boolean value) {
4193
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4194
    }
4195
 
4196
    public void setFieldValue(_Fields field, Object value) {
4197
      switch (field) {
4198
      case USER_ID:
4199
        if (value == null) {
4200
          unsetUserId();
4201
        } else {
4202
          setUserId((Long)value);
4203
        }
4204
        break;
4205
 
4206
      }
4207
    }
4208
 
4209
    public void setFieldValue(int fieldID, Object value) {
4210
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4211
    }
4212
 
4213
    public Object getFieldValue(_Fields field) {
4214
      switch (field) {
4215
      case USER_ID:
4216
        return new Long(getUserId());
4217
 
4218
      }
4219
      throw new IllegalStateException();
4220
    }
4221
 
4222
    public Object getFieldValue(int fieldId) {
4223
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4224
    }
4225
 
4226
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4227
    public boolean isSet(_Fields field) {
4228
      switch (field) {
4229
      case USER_ID:
4230
        return isSetUserId();
4231
      }
4232
      throw new IllegalStateException();
4233
    }
4234
 
4235
    public boolean isSet(int fieldID) {
4236
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4237
    }
4238
 
4239
    @Override
4240
    public boolean equals(Object that) {
4241
      if (that == null)
4242
        return false;
553 chandransh 4243
      if (that instanceof getUserById_args)
4244
        return this.equals((getUserById_args)that);
48 ashish 4245
      return false;
4246
    }
4247
 
553 chandransh 4248
    public boolean equals(getUserById_args that) {
48 ashish 4249
      if (that == null)
4250
        return false;
4251
 
4252
      boolean this_present_userId = true;
4253
      boolean that_present_userId = true;
4254
      if (this_present_userId || that_present_userId) {
4255
        if (!(this_present_userId && that_present_userId))
4256
          return false;
4257
        if (this.userId != that.userId)
4258
          return false;
4259
      }
4260
 
4261
      return true;
4262
    }
4263
 
4264
    @Override
4265
    public int hashCode() {
4266
      return 0;
4267
    }
4268
 
553 chandransh 4269
    public int compareTo(getUserById_args other) {
48 ashish 4270
      if (!getClass().equals(other.getClass())) {
4271
        return getClass().getName().compareTo(other.getClass().getName());
4272
      }
4273
 
4274
      int lastComparison = 0;
553 chandransh 4275
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4276
 
4277
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4278
      if (lastComparison != 0) {
4279
        return lastComparison;
4280
      }
4281
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4282
      if (lastComparison != 0) {
4283
        return lastComparison;
4284
      }
4285
      return 0;
4286
    }
4287
 
4288
    public void read(TProtocol iprot) throws TException {
4289
      TField field;
4290
      iprot.readStructBegin();
4291
      while (true)
4292
      {
4293
        field = iprot.readFieldBegin();
4294
        if (field.type == TType.STOP) { 
4295
          break;
4296
        }
4297
        _Fields fieldId = _Fields.findByThriftId(field.id);
4298
        if (fieldId == null) {
4299
          TProtocolUtil.skip(iprot, field.type);
4300
        } else {
4301
          switch (fieldId) {
4302
            case USER_ID:
4303
              if (field.type == TType.I64) {
4304
                this.userId = iprot.readI64();
4305
                setUserIdIsSet(true);
4306
              } else { 
4307
                TProtocolUtil.skip(iprot, field.type);
4308
              }
4309
              break;
4310
          }
4311
          iprot.readFieldEnd();
4312
        }
4313
      }
4314
      iprot.readStructEnd();
4315
      validate();
4316
    }
4317
 
4318
    public void write(TProtocol oprot) throws TException {
4319
      validate();
4320
 
4321
      oprot.writeStructBegin(STRUCT_DESC);
4322
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4323
      oprot.writeI64(this.userId);
4324
      oprot.writeFieldEnd();
4325
      oprot.writeFieldStop();
4326
      oprot.writeStructEnd();
4327
    }
4328
 
4329
    @Override
4330
    public String toString() {
553 chandransh 4331
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4332
      boolean first = true;
4333
 
4334
      sb.append("userId:");
4335
      sb.append(this.userId);
4336
      first = false;
4337
      sb.append(")");
4338
      return sb.toString();
4339
    }
4340
 
4341
    public void validate() throws TException {
4342
      // check for required fields
4343
    }
4344
 
4345
  }
4346
 
571 rajveer 4347
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4348
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4349
 
4350
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4351
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4352
 
553 chandransh 4353
    private User success;
4354
    private UserContextException ucex;
48 ashish 4355
 
4356
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4357
    public enum _Fields implements TFieldIdEnum {
4358
      SUCCESS((short)0, "success"),
553 chandransh 4359
      UCEX((short)1, "ucex");
48 ashish 4360
 
4361
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4362
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4363
 
4364
      static {
4365
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4366
          byId.put((int)field._thriftId, field);
4367
          byName.put(field.getFieldName(), field);
4368
        }
4369
      }
4370
 
4371
      /**
4372
       * Find the _Fields constant that matches fieldId, or null if its not found.
4373
       */
4374
      public static _Fields findByThriftId(int fieldId) {
4375
        return byId.get(fieldId);
4376
      }
4377
 
4378
      /**
4379
       * Find the _Fields constant that matches fieldId, throwing an exception
4380
       * if it is not found.
4381
       */
4382
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4383
        _Fields fields = findByThriftId(fieldId);
4384
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4385
        return fields;
4386
      }
4387
 
4388
      /**
4389
       * Find the _Fields constant that matches name, or null if its not found.
4390
       */
4391
      public static _Fields findByName(String name) {
4392
        return byName.get(name);
4393
      }
4394
 
4395
      private final short _thriftId;
4396
      private final String _fieldName;
4397
 
4398
      _Fields(short thriftId, String fieldName) {
4399
        _thriftId = thriftId;
4400
        _fieldName = fieldName;
4401
      }
4402
 
4403
      public short getThriftFieldId() {
4404
        return _thriftId;
4405
      }
4406
 
4407
      public String getFieldName() {
4408
        return _fieldName;
4409
      }
4410
    }
4411
 
4412
    // isset id assignments
4413
 
4414
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4415
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4416
          new StructMetaData(TType.STRUCT, User.class)));
4417
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4418
          new FieldValueMetaData(TType.STRUCT)));
4419
    }});
4420
 
4421
    static {
553 chandransh 4422
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4423
    }
4424
 
553 chandransh 4425
    public getUserById_result() {
48 ashish 4426
    }
4427
 
553 chandransh 4428
    public getUserById_result(
4429
      User success,
4430
      UserContextException ucex)
48 ashish 4431
    {
4432
      this();
4433
      this.success = success;
553 chandransh 4434
      this.ucex = ucex;
48 ashish 4435
    }
4436
 
4437
    /**
4438
     * Performs a deep copy on <i>other</i>.
4439
     */
553 chandransh 4440
    public getUserById_result(getUserById_result other) {
48 ashish 4441
      if (other.isSetSuccess()) {
553 chandransh 4442
        this.success = new User(other.success);
48 ashish 4443
      }
553 chandransh 4444
      if (other.isSetUcex()) {
4445
        this.ucex = new UserContextException(other.ucex);
48 ashish 4446
      }
4447
    }
4448
 
553 chandransh 4449
    public getUserById_result deepCopy() {
4450
      return new getUserById_result(this);
48 ashish 4451
    }
4452
 
4453
    @Deprecated
553 chandransh 4454
    public getUserById_result clone() {
4455
      return new getUserById_result(this);
48 ashish 4456
    }
4457
 
553 chandransh 4458
    public User getSuccess() {
48 ashish 4459
      return this.success;
4460
    }
4461
 
553 chandransh 4462
    public getUserById_result setSuccess(User success) {
48 ashish 4463
      this.success = success;
4464
      return this;
4465
    }
4466
 
4467
    public void unsetSuccess() {
4468
      this.success = null;
4469
    }
4470
 
4471
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4472
    public boolean isSetSuccess() {
4473
      return this.success != null;
4474
    }
4475
 
4476
    public void setSuccessIsSet(boolean value) {
4477
      if (!value) {
4478
        this.success = null;
4479
      }
4480
    }
4481
 
553 chandransh 4482
    public UserContextException getUcex() {
4483
      return this.ucex;
48 ashish 4484
    }
4485
 
553 chandransh 4486
    public getUserById_result setUcex(UserContextException ucex) {
4487
      this.ucex = ucex;
48 ashish 4488
      return this;
4489
    }
4490
 
553 chandransh 4491
    public void unsetUcex() {
4492
      this.ucex = null;
48 ashish 4493
    }
4494
 
553 chandransh 4495
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4496
    public boolean isSetUcex() {
4497
      return this.ucex != null;
48 ashish 4498
    }
4499
 
553 chandransh 4500
    public void setUcexIsSet(boolean value) {
48 ashish 4501
      if (!value) {
553 chandransh 4502
        this.ucex = null;
48 ashish 4503
      }
4504
    }
4505
 
4506
    public void setFieldValue(_Fields field, Object value) {
4507
      switch (field) {
4508
      case SUCCESS:
4509
        if (value == null) {
4510
          unsetSuccess();
4511
        } else {
553 chandransh 4512
          setSuccess((User)value);
48 ashish 4513
        }
4514
        break;
4515
 
553 chandransh 4516
      case UCEX:
48 ashish 4517
        if (value == null) {
553 chandransh 4518
          unsetUcex();
48 ashish 4519
        } else {
553 chandransh 4520
          setUcex((UserContextException)value);
48 ashish 4521
        }
4522
        break;
4523
 
4524
      }
4525
    }
4526
 
4527
    public void setFieldValue(int fieldID, Object value) {
4528
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4529
    }
4530
 
4531
    public Object getFieldValue(_Fields field) {
4532
      switch (field) {
4533
      case SUCCESS:
4534
        return getSuccess();
4535
 
553 chandransh 4536
      case UCEX:
4537
        return getUcex();
48 ashish 4538
 
4539
      }
4540
      throw new IllegalStateException();
4541
    }
4542
 
4543
    public Object getFieldValue(int fieldId) {
4544
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4545
    }
4546
 
4547
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4548
    public boolean isSet(_Fields field) {
4549
      switch (field) {
4550
      case SUCCESS:
4551
        return isSetSuccess();
553 chandransh 4552
      case UCEX:
4553
        return isSetUcex();
48 ashish 4554
      }
4555
      throw new IllegalStateException();
4556
    }
4557
 
4558
    public boolean isSet(int fieldID) {
4559
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4560
    }
4561
 
4562
    @Override
4563
    public boolean equals(Object that) {
4564
      if (that == null)
4565
        return false;
553 chandransh 4566
      if (that instanceof getUserById_result)
4567
        return this.equals((getUserById_result)that);
48 ashish 4568
      return false;
4569
    }
4570
 
553 chandransh 4571
    public boolean equals(getUserById_result that) {
48 ashish 4572
      if (that == null)
4573
        return false;
4574
 
4575
      boolean this_present_success = true && this.isSetSuccess();
4576
      boolean that_present_success = true && that.isSetSuccess();
4577
      if (this_present_success || that_present_success) {
4578
        if (!(this_present_success && that_present_success))
4579
          return false;
4580
        if (!this.success.equals(that.success))
4581
          return false;
4582
      }
4583
 
553 chandransh 4584
      boolean this_present_ucex = true && this.isSetUcex();
4585
      boolean that_present_ucex = true && that.isSetUcex();
4586
      if (this_present_ucex || that_present_ucex) {
4587
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4588
          return false;
553 chandransh 4589
        if (!this.ucex.equals(that.ucex))
48 ashish 4590
          return false;
4591
      }
4592
 
4593
      return true;
4594
    }
4595
 
4596
    @Override
4597
    public int hashCode() {
4598
      return 0;
4599
    }
4600
 
571 rajveer 4601
    public int compareTo(getUserById_result other) {
4602
      if (!getClass().equals(other.getClass())) {
4603
        return getClass().getName().compareTo(other.getClass().getName());
4604
      }
4605
 
4606
      int lastComparison = 0;
4607
      getUserById_result typedOther = (getUserById_result)other;
4608
 
4609
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4610
      if (lastComparison != 0) {
4611
        return lastComparison;
4612
      }
4613
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4614
      if (lastComparison != 0) {
4615
        return lastComparison;
4616
      }
4617
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4618
      if (lastComparison != 0) {
4619
        return lastComparison;
4620
      }
4621
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4622
      if (lastComparison != 0) {
4623
        return lastComparison;
4624
      }
4625
      return 0;
4626
    }
4627
 
48 ashish 4628
    public void read(TProtocol iprot) throws TException {
4629
      TField field;
4630
      iprot.readStructBegin();
4631
      while (true)
4632
      {
4633
        field = iprot.readFieldBegin();
4634
        if (field.type == TType.STOP) { 
4635
          break;
4636
        }
4637
        _Fields fieldId = _Fields.findByThriftId(field.id);
4638
        if (fieldId == null) {
4639
          TProtocolUtil.skip(iprot, field.type);
4640
        } else {
4641
          switch (fieldId) {
4642
            case SUCCESS:
4643
              if (field.type == TType.STRUCT) {
553 chandransh 4644
                this.success = new User();
48 ashish 4645
                this.success.read(iprot);
4646
              } else { 
4647
                TProtocolUtil.skip(iprot, field.type);
4648
              }
4649
              break;
553 chandransh 4650
            case UCEX:
48 ashish 4651
              if (field.type == TType.STRUCT) {
553 chandransh 4652
                this.ucex = new UserContextException();
4653
                this.ucex.read(iprot);
48 ashish 4654
              } else { 
4655
                TProtocolUtil.skip(iprot, field.type);
4656
              }
4657
              break;
4658
          }
4659
          iprot.readFieldEnd();
4660
        }
4661
      }
4662
      iprot.readStructEnd();
4663
      validate();
4664
    }
4665
 
4666
    public void write(TProtocol oprot) throws TException {
4667
      oprot.writeStructBegin(STRUCT_DESC);
4668
 
4669
      if (this.isSetSuccess()) {
4670
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4671
        this.success.write(oprot);
4672
        oprot.writeFieldEnd();
553 chandransh 4673
      } else if (this.isSetUcex()) {
4674
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4675
        this.ucex.write(oprot);
48 ashish 4676
        oprot.writeFieldEnd();
4677
      }
4678
      oprot.writeFieldStop();
4679
      oprot.writeStructEnd();
4680
    }
4681
 
4682
    @Override
4683
    public String toString() {
553 chandransh 4684
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4685
      boolean first = true;
4686
 
4687
      sb.append("success:");
4688
      if (this.success == null) {
4689
        sb.append("null");
4690
      } else {
4691
        sb.append(this.success);
4692
      }
4693
      first = false;
4694
      if (!first) sb.append(", ");
553 chandransh 4695
      sb.append("ucex:");
4696
      if (this.ucex == null) {
48 ashish 4697
        sb.append("null");
4698
      } else {
553 chandransh 4699
        sb.append(this.ucex);
48 ashish 4700
      }
4701
      first = false;
4702
      sb.append(")");
4703
      return sb.toString();
4704
    }
4705
 
4706
    public void validate() throws TException {
4707
      // check for required fields
4708
    }
4709
 
4710
  }
4711
 
1491 vikas 4712
  public static class getUserByEmail_args implements TBase<getUserByEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserByEmail_args>   {
4713
    private static final TStruct STRUCT_DESC = new TStruct("getUserByEmail_args");
4714
 
4715
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
4716
 
4717
    private String email;
4718
 
4719
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4720
    public enum _Fields implements TFieldIdEnum {
4721
      EMAIL((short)1, "email");
4722
 
4723
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4724
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4725
 
4726
      static {
4727
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4728
          byId.put((int)field._thriftId, field);
4729
          byName.put(field.getFieldName(), field);
4730
        }
4731
      }
4732
 
4733
      /**
4734
       * Find the _Fields constant that matches fieldId, or null if its not found.
4735
       */
4736
      public static _Fields findByThriftId(int fieldId) {
4737
        return byId.get(fieldId);
4738
      }
4739
 
4740
      /**
4741
       * Find the _Fields constant that matches fieldId, throwing an exception
4742
       * if it is not found.
4743
       */
4744
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4745
        _Fields fields = findByThriftId(fieldId);
4746
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4747
        return fields;
4748
      }
4749
 
4750
      /**
4751
       * Find the _Fields constant that matches name, or null if its not found.
4752
       */
4753
      public static _Fields findByName(String name) {
4754
        return byName.get(name);
4755
      }
4756
 
4757
      private final short _thriftId;
4758
      private final String _fieldName;
4759
 
4760
      _Fields(short thriftId, String fieldName) {
4761
        _thriftId = thriftId;
4762
        _fieldName = fieldName;
4763
      }
4764
 
4765
      public short getThriftFieldId() {
4766
        return _thriftId;
4767
      }
4768
 
4769
      public String getFieldName() {
4770
        return _fieldName;
4771
      }
4772
    }
4773
 
4774
    // isset id assignments
4775
 
4776
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4777
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
4778
          new FieldValueMetaData(TType.STRING)));
4779
    }});
4780
 
4781
    static {
4782
      FieldMetaData.addStructMetaDataMap(getUserByEmail_args.class, metaDataMap);
4783
    }
4784
 
4785
    public getUserByEmail_args() {
4786
    }
4787
 
4788
    public getUserByEmail_args(
4789
      String email)
4790
    {
4791
      this();
4792
      this.email = email;
4793
    }
4794
 
4795
    /**
4796
     * Performs a deep copy on <i>other</i>.
4797
     */
4798
    public getUserByEmail_args(getUserByEmail_args other) {
4799
      if (other.isSetEmail()) {
4800
        this.email = other.email;
4801
      }
4802
    }
4803
 
4804
    public getUserByEmail_args deepCopy() {
4805
      return new getUserByEmail_args(this);
4806
    }
4807
 
4808
    @Deprecated
4809
    public getUserByEmail_args clone() {
4810
      return new getUserByEmail_args(this);
4811
    }
4812
 
4813
    public String getEmail() {
4814
      return this.email;
4815
    }
4816
 
4817
    public getUserByEmail_args setEmail(String email) {
4818
      this.email = email;
4819
      return this;
4820
    }
4821
 
4822
    public void unsetEmail() {
4823
      this.email = null;
4824
    }
4825
 
4826
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
4827
    public boolean isSetEmail() {
4828
      return this.email != null;
4829
    }
4830
 
4831
    public void setEmailIsSet(boolean value) {
4832
      if (!value) {
4833
        this.email = null;
4834
      }
4835
    }
4836
 
4837
    public void setFieldValue(_Fields field, Object value) {
4838
      switch (field) {
4839
      case EMAIL:
4840
        if (value == null) {
4841
          unsetEmail();
4842
        } else {
4843
          setEmail((String)value);
4844
        }
4845
        break;
4846
 
4847
      }
4848
    }
4849
 
4850
    public void setFieldValue(int fieldID, Object value) {
4851
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4852
    }
4853
 
4854
    public Object getFieldValue(_Fields field) {
4855
      switch (field) {
4856
      case EMAIL:
4857
        return getEmail();
4858
 
4859
      }
4860
      throw new IllegalStateException();
4861
    }
4862
 
4863
    public Object getFieldValue(int fieldId) {
4864
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4865
    }
4866
 
4867
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4868
    public boolean isSet(_Fields field) {
4869
      switch (field) {
4870
      case EMAIL:
4871
        return isSetEmail();
4872
      }
4873
      throw new IllegalStateException();
4874
    }
4875
 
4876
    public boolean isSet(int fieldID) {
4877
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4878
    }
4879
 
4880
    @Override
4881
    public boolean equals(Object that) {
4882
      if (that == null)
4883
        return false;
4884
      if (that instanceof getUserByEmail_args)
4885
        return this.equals((getUserByEmail_args)that);
4886
      return false;
4887
    }
4888
 
4889
    public boolean equals(getUserByEmail_args that) {
4890
      if (that == null)
4891
        return false;
4892
 
4893
      boolean this_present_email = true && this.isSetEmail();
4894
      boolean that_present_email = true && that.isSetEmail();
4895
      if (this_present_email || that_present_email) {
4896
        if (!(this_present_email && that_present_email))
4897
          return false;
4898
        if (!this.email.equals(that.email))
4899
          return false;
4900
      }
4901
 
4902
      return true;
4903
    }
4904
 
4905
    @Override
4906
    public int hashCode() {
4907
      return 0;
4908
    }
4909
 
4910
    public int compareTo(getUserByEmail_args other) {
4911
      if (!getClass().equals(other.getClass())) {
4912
        return getClass().getName().compareTo(other.getClass().getName());
4913
      }
4914
 
4915
      int lastComparison = 0;
4916
      getUserByEmail_args typedOther = (getUserByEmail_args)other;
4917
 
4918
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
4919
      if (lastComparison != 0) {
4920
        return lastComparison;
4921
      }
4922
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
4923
      if (lastComparison != 0) {
4924
        return lastComparison;
4925
      }
4926
      return 0;
4927
    }
4928
 
4929
    public void read(TProtocol iprot) throws TException {
4930
      TField field;
4931
      iprot.readStructBegin();
4932
      while (true)
4933
      {
4934
        field = iprot.readFieldBegin();
4935
        if (field.type == TType.STOP) { 
4936
          break;
4937
        }
4938
        _Fields fieldId = _Fields.findByThriftId(field.id);
4939
        if (fieldId == null) {
4940
          TProtocolUtil.skip(iprot, field.type);
4941
        } else {
4942
          switch (fieldId) {
4943
            case EMAIL:
4944
              if (field.type == TType.STRING) {
4945
                this.email = iprot.readString();
4946
              } else { 
4947
                TProtocolUtil.skip(iprot, field.type);
4948
              }
4949
              break;
4950
          }
4951
          iprot.readFieldEnd();
4952
        }
4953
      }
4954
      iprot.readStructEnd();
4955
      validate();
4956
    }
4957
 
4958
    public void write(TProtocol oprot) throws TException {
4959
      validate();
4960
 
4961
      oprot.writeStructBegin(STRUCT_DESC);
4962
      if (this.email != null) {
4963
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
4964
        oprot.writeString(this.email);
4965
        oprot.writeFieldEnd();
4966
      }
4967
      oprot.writeFieldStop();
4968
      oprot.writeStructEnd();
4969
    }
4970
 
4971
    @Override
4972
    public String toString() {
4973
      StringBuilder sb = new StringBuilder("getUserByEmail_args(");
4974
      boolean first = true;
4975
 
4976
      sb.append("email:");
4977
      if (this.email == null) {
4978
        sb.append("null");
4979
      } else {
4980
        sb.append(this.email);
4981
      }
4982
      first = false;
4983
      sb.append(")");
4984
      return sb.toString();
4985
    }
4986
 
4987
    public void validate() throws TException {
4988
      // check for required fields
4989
    }
4990
 
4991
  }
4992
 
4993
  public static class getUserByEmail_result implements TBase<getUserByEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserByEmail_result>   {
4994
    private static final TStruct STRUCT_DESC = new TStruct("getUserByEmail_result");
4995
 
4996
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4997
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
4998
 
4999
    private User success;
5000
    private UserContextException ucex;
5001
 
5002
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5003
    public enum _Fields implements TFieldIdEnum {
5004
      SUCCESS((short)0, "success"),
5005
      UCEX((short)1, "ucex");
5006
 
5007
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5008
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5009
 
5010
      static {
5011
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5012
          byId.put((int)field._thriftId, field);
5013
          byName.put(field.getFieldName(), field);
5014
        }
5015
      }
5016
 
5017
      /**
5018
       * Find the _Fields constant that matches fieldId, or null if its not found.
5019
       */
5020
      public static _Fields findByThriftId(int fieldId) {
5021
        return byId.get(fieldId);
5022
      }
5023
 
5024
      /**
5025
       * Find the _Fields constant that matches fieldId, throwing an exception
5026
       * if it is not found.
5027
       */
5028
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5029
        _Fields fields = findByThriftId(fieldId);
5030
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5031
        return fields;
5032
      }
5033
 
5034
      /**
5035
       * Find the _Fields constant that matches name, or null if its not found.
5036
       */
5037
      public static _Fields findByName(String name) {
5038
        return byName.get(name);
5039
      }
5040
 
5041
      private final short _thriftId;
5042
      private final String _fieldName;
5043
 
5044
      _Fields(short thriftId, String fieldName) {
5045
        _thriftId = thriftId;
5046
        _fieldName = fieldName;
5047
      }
5048
 
5049
      public short getThriftFieldId() {
5050
        return _thriftId;
5051
      }
5052
 
5053
      public String getFieldName() {
5054
        return _fieldName;
5055
      }
5056
    }
5057
 
5058
    // isset id assignments
5059
 
5060
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5061
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5062
          new StructMetaData(TType.STRUCT, User.class)));
5063
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
5064
          new FieldValueMetaData(TType.STRUCT)));
5065
    }});
5066
 
5067
    static {
5068
      FieldMetaData.addStructMetaDataMap(getUserByEmail_result.class, metaDataMap);
5069
    }
5070
 
5071
    public getUserByEmail_result() {
5072
    }
5073
 
5074
    public getUserByEmail_result(
5075
      User success,
5076
      UserContextException ucex)
5077
    {
5078
      this();
5079
      this.success = success;
5080
      this.ucex = ucex;
5081
    }
5082
 
5083
    /**
5084
     * Performs a deep copy on <i>other</i>.
5085
     */
5086
    public getUserByEmail_result(getUserByEmail_result other) {
5087
      if (other.isSetSuccess()) {
5088
        this.success = new User(other.success);
5089
      }
5090
      if (other.isSetUcex()) {
5091
        this.ucex = new UserContextException(other.ucex);
5092
      }
5093
    }
5094
 
5095
    public getUserByEmail_result deepCopy() {
5096
      return new getUserByEmail_result(this);
5097
    }
5098
 
5099
    @Deprecated
5100
    public getUserByEmail_result clone() {
5101
      return new getUserByEmail_result(this);
5102
    }
5103
 
5104
    public User getSuccess() {
5105
      return this.success;
5106
    }
5107
 
5108
    public getUserByEmail_result setSuccess(User success) {
5109
      this.success = success;
5110
      return this;
5111
    }
5112
 
5113
    public void unsetSuccess() {
5114
      this.success = null;
5115
    }
5116
 
5117
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5118
    public boolean isSetSuccess() {
5119
      return this.success != null;
5120
    }
5121
 
5122
    public void setSuccessIsSet(boolean value) {
5123
      if (!value) {
5124
        this.success = null;
5125
      }
5126
    }
5127
 
5128
    public UserContextException getUcex() {
5129
      return this.ucex;
5130
    }
5131
 
5132
    public getUserByEmail_result setUcex(UserContextException ucex) {
5133
      this.ucex = ucex;
5134
      return this;
5135
    }
5136
 
5137
    public void unsetUcex() {
5138
      this.ucex = null;
5139
    }
5140
 
5141
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5142
    public boolean isSetUcex() {
5143
      return this.ucex != null;
5144
    }
5145
 
5146
    public void setUcexIsSet(boolean value) {
5147
      if (!value) {
5148
        this.ucex = null;
5149
      }
5150
    }
5151
 
5152
    public void setFieldValue(_Fields field, Object value) {
5153
      switch (field) {
5154
      case SUCCESS:
5155
        if (value == null) {
5156
          unsetSuccess();
5157
        } else {
5158
          setSuccess((User)value);
5159
        }
5160
        break;
5161
 
5162
      case UCEX:
5163
        if (value == null) {
5164
          unsetUcex();
5165
        } else {
5166
          setUcex((UserContextException)value);
5167
        }
5168
        break;
5169
 
5170
      }
5171
    }
5172
 
5173
    public void setFieldValue(int fieldID, Object value) {
5174
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5175
    }
5176
 
5177
    public Object getFieldValue(_Fields field) {
5178
      switch (field) {
5179
      case SUCCESS:
5180
        return getSuccess();
5181
 
5182
      case UCEX:
5183
        return getUcex();
5184
 
5185
      }
5186
      throw new IllegalStateException();
5187
    }
5188
 
5189
    public Object getFieldValue(int fieldId) {
5190
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5191
    }
5192
 
5193
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5194
    public boolean isSet(_Fields field) {
5195
      switch (field) {
5196
      case SUCCESS:
5197
        return isSetSuccess();
5198
      case UCEX:
5199
        return isSetUcex();
5200
      }
5201
      throw new IllegalStateException();
5202
    }
5203
 
5204
    public boolean isSet(int fieldID) {
5205
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5206
    }
5207
 
5208
    @Override
5209
    public boolean equals(Object that) {
5210
      if (that == null)
5211
        return false;
5212
      if (that instanceof getUserByEmail_result)
5213
        return this.equals((getUserByEmail_result)that);
5214
      return false;
5215
    }
5216
 
5217
    public boolean equals(getUserByEmail_result that) {
5218
      if (that == null)
5219
        return false;
5220
 
5221
      boolean this_present_success = true && this.isSetSuccess();
5222
      boolean that_present_success = true && that.isSetSuccess();
5223
      if (this_present_success || that_present_success) {
5224
        if (!(this_present_success && that_present_success))
5225
          return false;
5226
        if (!this.success.equals(that.success))
5227
          return false;
5228
      }
5229
 
5230
      boolean this_present_ucex = true && this.isSetUcex();
5231
      boolean that_present_ucex = true && that.isSetUcex();
5232
      if (this_present_ucex || that_present_ucex) {
5233
        if (!(this_present_ucex && that_present_ucex))
5234
          return false;
5235
        if (!this.ucex.equals(that.ucex))
5236
          return false;
5237
      }
5238
 
5239
      return true;
5240
    }
5241
 
5242
    @Override
5243
    public int hashCode() {
5244
      return 0;
5245
    }
5246
 
5247
    public int compareTo(getUserByEmail_result other) {
5248
      if (!getClass().equals(other.getClass())) {
5249
        return getClass().getName().compareTo(other.getClass().getName());
5250
      }
5251
 
5252
      int lastComparison = 0;
5253
      getUserByEmail_result typedOther = (getUserByEmail_result)other;
5254
 
5255
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5256
      if (lastComparison != 0) {
5257
        return lastComparison;
5258
      }
5259
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5260
      if (lastComparison != 0) {
5261
        return lastComparison;
5262
      }
5263
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5264
      if (lastComparison != 0) {
5265
        return lastComparison;
5266
      }
5267
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5268
      if (lastComparison != 0) {
5269
        return lastComparison;
5270
      }
5271
      return 0;
5272
    }
5273
 
5274
    public void read(TProtocol iprot) throws TException {
5275
      TField field;
5276
      iprot.readStructBegin();
5277
      while (true)
5278
      {
5279
        field = iprot.readFieldBegin();
5280
        if (field.type == TType.STOP) { 
5281
          break;
5282
        }
5283
        _Fields fieldId = _Fields.findByThriftId(field.id);
5284
        if (fieldId == null) {
5285
          TProtocolUtil.skip(iprot, field.type);
5286
        } else {
5287
          switch (fieldId) {
5288
            case SUCCESS:
5289
              if (field.type == TType.STRUCT) {
5290
                this.success = new User();
5291
                this.success.read(iprot);
5292
              } else { 
5293
                TProtocolUtil.skip(iprot, field.type);
5294
              }
5295
              break;
5296
            case UCEX:
5297
              if (field.type == TType.STRUCT) {
5298
                this.ucex = new UserContextException();
5299
                this.ucex.read(iprot);
5300
              } else { 
5301
                TProtocolUtil.skip(iprot, field.type);
5302
              }
5303
              break;
5304
          }
5305
          iprot.readFieldEnd();
5306
        }
5307
      }
5308
      iprot.readStructEnd();
5309
      validate();
5310
    }
5311
 
5312
    public void write(TProtocol oprot) throws TException {
5313
      oprot.writeStructBegin(STRUCT_DESC);
5314
 
5315
      if (this.isSetSuccess()) {
5316
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5317
        this.success.write(oprot);
5318
        oprot.writeFieldEnd();
5319
      } else if (this.isSetUcex()) {
5320
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5321
        this.ucex.write(oprot);
5322
        oprot.writeFieldEnd();
5323
      }
5324
      oprot.writeFieldStop();
5325
      oprot.writeStructEnd();
5326
    }
5327
 
5328
    @Override
5329
    public String toString() {
5330
      StringBuilder sb = new StringBuilder("getUserByEmail_result(");
5331
      boolean first = true;
5332
 
5333
      sb.append("success:");
5334
      if (this.success == null) {
5335
        sb.append("null");
5336
      } else {
5337
        sb.append(this.success);
5338
      }
5339
      first = false;
5340
      if (!first) sb.append(", ");
5341
      sb.append("ucex:");
5342
      if (this.ucex == null) {
5343
        sb.append("null");
5344
      } else {
5345
        sb.append(this.ucex);
5346
      }
5347
      first = false;
5348
      sb.append(")");
5349
      return sb.toString();
5350
    }
5351
 
5352
    public void validate() throws TException {
5353
      // check for required fields
5354
    }
5355
 
5356
  }
5357
 
571 rajveer 5358
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 5359
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 5360
 
553 chandransh 5361
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5362
 
553 chandransh 5363
    private User user;
48 ashish 5364
 
5365
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5366
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5367
      USER((short)1, "user");
48 ashish 5368
 
5369
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5370
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5371
 
5372
      static {
5373
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5374
          byId.put((int)field._thriftId, field);
5375
          byName.put(field.getFieldName(), field);
5376
        }
5377
      }
5378
 
5379
      /**
5380
       * Find the _Fields constant that matches fieldId, or null if its not found.
5381
       */
5382
      public static _Fields findByThriftId(int fieldId) {
5383
        return byId.get(fieldId);
5384
      }
5385
 
5386
      /**
5387
       * Find the _Fields constant that matches fieldId, throwing an exception
5388
       * if it is not found.
5389
       */
5390
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5391
        _Fields fields = findByThriftId(fieldId);
5392
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5393
        return fields;
5394
      }
5395
 
5396
      /**
5397
       * Find the _Fields constant that matches name, or null if its not found.
5398
       */
5399
      public static _Fields findByName(String name) {
5400
        return byName.get(name);
5401
      }
5402
 
5403
      private final short _thriftId;
5404
      private final String _fieldName;
5405
 
5406
      _Fields(short thriftId, String fieldName) {
5407
        _thriftId = thriftId;
5408
        _fieldName = fieldName;
5409
      }
5410
 
5411
      public short getThriftFieldId() {
5412
        return _thriftId;
5413
      }
5414
 
5415
      public String getFieldName() {
5416
        return _fieldName;
5417
      }
5418
    }
5419
 
5420
    // isset id assignments
5421
 
5422
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5423
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5424
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5425
    }});
5426
 
5427
    static {
553 chandransh 5428
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 5429
    }
5430
 
553 chandransh 5431
    public createUser_args() {
48 ashish 5432
    }
5433
 
553 chandransh 5434
    public createUser_args(
5435
      User user)
48 ashish 5436
    {
5437
      this();
553 chandransh 5438
      this.user = user;
48 ashish 5439
    }
5440
 
5441
    /**
5442
     * Performs a deep copy on <i>other</i>.
5443
     */
553 chandransh 5444
    public createUser_args(createUser_args other) {
5445
      if (other.isSetUser()) {
5446
        this.user = new User(other.user);
48 ashish 5447
      }
5448
    }
5449
 
553 chandransh 5450
    public createUser_args deepCopy() {
5451
      return new createUser_args(this);
48 ashish 5452
    }
5453
 
5454
    @Deprecated
553 chandransh 5455
    public createUser_args clone() {
5456
      return new createUser_args(this);
48 ashish 5457
    }
5458
 
553 chandransh 5459
    public User getUser() {
5460
      return this.user;
48 ashish 5461
    }
5462
 
553 chandransh 5463
    public createUser_args setUser(User user) {
5464
      this.user = user;
48 ashish 5465
      return this;
5466
    }
5467
 
553 chandransh 5468
    public void unsetUser() {
5469
      this.user = null;
48 ashish 5470
    }
5471
 
553 chandransh 5472
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5473
    public boolean isSetUser() {
5474
      return this.user != null;
48 ashish 5475
    }
5476
 
553 chandransh 5477
    public void setUserIsSet(boolean value) {
48 ashish 5478
      if (!value) {
553 chandransh 5479
        this.user = null;
48 ashish 5480
      }
5481
    }
5482
 
5483
    public void setFieldValue(_Fields field, Object value) {
5484
      switch (field) {
553 chandransh 5485
      case USER:
48 ashish 5486
        if (value == null) {
553 chandransh 5487
          unsetUser();
48 ashish 5488
        } else {
553 chandransh 5489
          setUser((User)value);
48 ashish 5490
        }
5491
        break;
5492
 
5493
      }
5494
    }
5495
 
5496
    public void setFieldValue(int fieldID, Object value) {
5497
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5498
    }
5499
 
5500
    public Object getFieldValue(_Fields field) {
5501
      switch (field) {
553 chandransh 5502
      case USER:
5503
        return getUser();
48 ashish 5504
 
5505
      }
5506
      throw new IllegalStateException();
5507
    }
5508
 
5509
    public Object getFieldValue(int fieldId) {
5510
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5511
    }
5512
 
5513
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5514
    public boolean isSet(_Fields field) {
5515
      switch (field) {
553 chandransh 5516
      case USER:
5517
        return isSetUser();
48 ashish 5518
      }
5519
      throw new IllegalStateException();
5520
    }
5521
 
5522
    public boolean isSet(int fieldID) {
5523
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5524
    }
5525
 
5526
    @Override
5527
    public boolean equals(Object that) {
5528
      if (that == null)
5529
        return false;
553 chandransh 5530
      if (that instanceof createUser_args)
5531
        return this.equals((createUser_args)that);
48 ashish 5532
      return false;
5533
    }
5534
 
553 chandransh 5535
    public boolean equals(createUser_args that) {
48 ashish 5536
      if (that == null)
5537
        return false;
5538
 
553 chandransh 5539
      boolean this_present_user = true && this.isSetUser();
5540
      boolean that_present_user = true && that.isSetUser();
5541
      if (this_present_user || that_present_user) {
5542
        if (!(this_present_user && that_present_user))
48 ashish 5543
          return false;
553 chandransh 5544
        if (!this.user.equals(that.user))
48 ashish 5545
          return false;
5546
      }
5547
 
5548
      return true;
5549
    }
5550
 
5551
    @Override
5552
    public int hashCode() {
5553
      return 0;
5554
    }
5555
 
571 rajveer 5556
    public int compareTo(createUser_args other) {
5557
      if (!getClass().equals(other.getClass())) {
5558
        return getClass().getName().compareTo(other.getClass().getName());
5559
      }
5560
 
5561
      int lastComparison = 0;
5562
      createUser_args typedOther = (createUser_args)other;
5563
 
5564
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5565
      if (lastComparison != 0) {
5566
        return lastComparison;
5567
      }
5568
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5569
      if (lastComparison != 0) {
5570
        return lastComparison;
5571
      }
5572
      return 0;
5573
    }
5574
 
48 ashish 5575
    public void read(TProtocol iprot) throws TException {
5576
      TField field;
5577
      iprot.readStructBegin();
5578
      while (true)
5579
      {
5580
        field = iprot.readFieldBegin();
5581
        if (field.type == TType.STOP) { 
5582
          break;
5583
        }
5584
        _Fields fieldId = _Fields.findByThriftId(field.id);
5585
        if (fieldId == null) {
5586
          TProtocolUtil.skip(iprot, field.type);
5587
        } else {
5588
          switch (fieldId) {
553 chandransh 5589
            case USER:
5590
              if (field.type == TType.STRUCT) {
5591
                this.user = new User();
5592
                this.user.read(iprot);
48 ashish 5593
              } else { 
5594
                TProtocolUtil.skip(iprot, field.type);
5595
              }
5596
              break;
5597
          }
5598
          iprot.readFieldEnd();
5599
        }
5600
      }
5601
      iprot.readStructEnd();
5602
      validate();
5603
    }
5604
 
5605
    public void write(TProtocol oprot) throws TException {
5606
      validate();
5607
 
5608
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5609
      if (this.user != null) {
5610
        oprot.writeFieldBegin(USER_FIELD_DESC);
5611
        this.user.write(oprot);
48 ashish 5612
        oprot.writeFieldEnd();
5613
      }
5614
      oprot.writeFieldStop();
5615
      oprot.writeStructEnd();
5616
    }
5617
 
5618
    @Override
5619
    public String toString() {
553 chandransh 5620
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 5621
      boolean first = true;
5622
 
553 chandransh 5623
      sb.append("user:");
5624
      if (this.user == null) {
48 ashish 5625
        sb.append("null");
5626
      } else {
553 chandransh 5627
        sb.append(this.user);
48 ashish 5628
      }
5629
      first = false;
5630
      sb.append(")");
5631
      return sb.toString();
5632
    }
5633
 
5634
    public void validate() throws TException {
5635
      // check for required fields
5636
    }
5637
 
5638
  }
5639
 
571 rajveer 5640
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 5641
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 5642
 
5643
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5644
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5645
 
553 chandransh 5646
    private User success;
5647
    private UserContextException ucex;
48 ashish 5648
 
5649
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5650
    public enum _Fields implements TFieldIdEnum {
5651
      SUCCESS((short)0, "success"),
553 chandransh 5652
      UCEX((short)1, "ucex");
48 ashish 5653
 
5654
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5655
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5656
 
5657
      static {
5658
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5659
          byId.put((int)field._thriftId, field);
5660
          byName.put(field.getFieldName(), field);
5661
        }
5662
      }
5663
 
5664
      /**
5665
       * Find the _Fields constant that matches fieldId, or null if its not found.
5666
       */
5667
      public static _Fields findByThriftId(int fieldId) {
5668
        return byId.get(fieldId);
5669
      }
5670
 
5671
      /**
5672
       * Find the _Fields constant that matches fieldId, throwing an exception
5673
       * if it is not found.
5674
       */
5675
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5676
        _Fields fields = findByThriftId(fieldId);
5677
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5678
        return fields;
5679
      }
5680
 
5681
      /**
5682
       * Find the _Fields constant that matches name, or null if its not found.
5683
       */
5684
      public static _Fields findByName(String name) {
5685
        return byName.get(name);
5686
      }
5687
 
5688
      private final short _thriftId;
5689
      private final String _fieldName;
5690
 
5691
      _Fields(short thriftId, String fieldName) {
5692
        _thriftId = thriftId;
5693
        _fieldName = fieldName;
5694
      }
5695
 
5696
      public short getThriftFieldId() {
5697
        return _thriftId;
5698
      }
5699
 
5700
      public String getFieldName() {
5701
        return _fieldName;
5702
      }
5703
    }
5704
 
5705
    // isset id assignments
5706
 
5707
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5708
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5709
          new StructMetaData(TType.STRUCT, User.class)));
5710
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5711
          new FieldValueMetaData(TType.STRUCT)));
5712
    }});
5713
 
5714
    static {
553 chandransh 5715
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 5716
    }
5717
 
553 chandransh 5718
    public createUser_result() {
48 ashish 5719
    }
5720
 
553 chandransh 5721
    public createUser_result(
5722
      User success,
5723
      UserContextException ucex)
48 ashish 5724
    {
5725
      this();
5726
      this.success = success;
553 chandransh 5727
      this.ucex = ucex;
48 ashish 5728
    }
5729
 
5730
    /**
5731
     * Performs a deep copy on <i>other</i>.
5732
     */
553 chandransh 5733
    public createUser_result(createUser_result other) {
48 ashish 5734
      if (other.isSetSuccess()) {
553 chandransh 5735
        this.success = new User(other.success);
48 ashish 5736
      }
553 chandransh 5737
      if (other.isSetUcex()) {
5738
        this.ucex = new UserContextException(other.ucex);
48 ashish 5739
      }
5740
    }
5741
 
553 chandransh 5742
    public createUser_result deepCopy() {
5743
      return new createUser_result(this);
48 ashish 5744
    }
5745
 
5746
    @Deprecated
553 chandransh 5747
    public createUser_result clone() {
5748
      return new createUser_result(this);
48 ashish 5749
    }
5750
 
553 chandransh 5751
    public User getSuccess() {
48 ashish 5752
      return this.success;
5753
    }
5754
 
553 chandransh 5755
    public createUser_result setSuccess(User success) {
48 ashish 5756
      this.success = success;
5757
      return this;
5758
    }
5759
 
5760
    public void unsetSuccess() {
5761
      this.success = null;
5762
    }
5763
 
5764
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5765
    public boolean isSetSuccess() {
5766
      return this.success != null;
5767
    }
5768
 
5769
    public void setSuccessIsSet(boolean value) {
5770
      if (!value) {
5771
        this.success = null;
5772
      }
5773
    }
5774
 
553 chandransh 5775
    public UserContextException getUcex() {
5776
      return this.ucex;
48 ashish 5777
    }
5778
 
553 chandransh 5779
    public createUser_result setUcex(UserContextException ucex) {
5780
      this.ucex = ucex;
48 ashish 5781
      return this;
5782
    }
5783
 
553 chandransh 5784
    public void unsetUcex() {
5785
      this.ucex = null;
48 ashish 5786
    }
5787
 
553 chandransh 5788
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5789
    public boolean isSetUcex() {
5790
      return this.ucex != null;
48 ashish 5791
    }
5792
 
553 chandransh 5793
    public void setUcexIsSet(boolean value) {
48 ashish 5794
      if (!value) {
553 chandransh 5795
        this.ucex = null;
48 ashish 5796
      }
5797
    }
5798
 
5799
    public void setFieldValue(_Fields field, Object value) {
5800
      switch (field) {
5801
      case SUCCESS:
5802
        if (value == null) {
5803
          unsetSuccess();
5804
        } else {
553 chandransh 5805
          setSuccess((User)value);
48 ashish 5806
        }
5807
        break;
5808
 
553 chandransh 5809
      case UCEX:
48 ashish 5810
        if (value == null) {
553 chandransh 5811
          unsetUcex();
48 ashish 5812
        } else {
553 chandransh 5813
          setUcex((UserContextException)value);
48 ashish 5814
        }
5815
        break;
5816
 
5817
      }
5818
    }
5819
 
5820
    public void setFieldValue(int fieldID, Object value) {
5821
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5822
    }
5823
 
5824
    public Object getFieldValue(_Fields field) {
5825
      switch (field) {
5826
      case SUCCESS:
5827
        return getSuccess();
5828
 
553 chandransh 5829
      case UCEX:
5830
        return getUcex();
48 ashish 5831
 
5832
      }
5833
      throw new IllegalStateException();
5834
    }
5835
 
5836
    public Object getFieldValue(int fieldId) {
5837
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5838
    }
5839
 
5840
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5841
    public boolean isSet(_Fields field) {
5842
      switch (field) {
5843
      case SUCCESS:
5844
        return isSetSuccess();
553 chandransh 5845
      case UCEX:
5846
        return isSetUcex();
48 ashish 5847
      }
5848
      throw new IllegalStateException();
5849
    }
5850
 
5851
    public boolean isSet(int fieldID) {
5852
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5853
    }
5854
 
5855
    @Override
5856
    public boolean equals(Object that) {
5857
      if (that == null)
5858
        return false;
553 chandransh 5859
      if (that instanceof createUser_result)
5860
        return this.equals((createUser_result)that);
48 ashish 5861
      return false;
5862
    }
5863
 
553 chandransh 5864
    public boolean equals(createUser_result that) {
48 ashish 5865
      if (that == null)
5866
        return false;
5867
 
5868
      boolean this_present_success = true && this.isSetSuccess();
5869
      boolean that_present_success = true && that.isSetSuccess();
5870
      if (this_present_success || that_present_success) {
5871
        if (!(this_present_success && that_present_success))
5872
          return false;
5873
        if (!this.success.equals(that.success))
5874
          return false;
5875
      }
5876
 
553 chandransh 5877
      boolean this_present_ucex = true && this.isSetUcex();
5878
      boolean that_present_ucex = true && that.isSetUcex();
5879
      if (this_present_ucex || that_present_ucex) {
5880
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5881
          return false;
553 chandransh 5882
        if (!this.ucex.equals(that.ucex))
48 ashish 5883
          return false;
5884
      }
5885
 
5886
      return true;
5887
    }
5888
 
5889
    @Override
5890
    public int hashCode() {
5891
      return 0;
5892
    }
5893
 
571 rajveer 5894
    public int compareTo(createUser_result other) {
5895
      if (!getClass().equals(other.getClass())) {
5896
        return getClass().getName().compareTo(other.getClass().getName());
5897
      }
5898
 
5899
      int lastComparison = 0;
5900
      createUser_result typedOther = (createUser_result)other;
5901
 
5902
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5903
      if (lastComparison != 0) {
5904
        return lastComparison;
5905
      }
5906
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5907
      if (lastComparison != 0) {
5908
        return lastComparison;
5909
      }
5910
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5911
      if (lastComparison != 0) {
5912
        return lastComparison;
5913
      }
5914
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5915
      if (lastComparison != 0) {
5916
        return lastComparison;
5917
      }
5918
      return 0;
5919
    }
5920
 
48 ashish 5921
    public void read(TProtocol iprot) throws TException {
5922
      TField field;
5923
      iprot.readStructBegin();
5924
      while (true)
5925
      {
5926
        field = iprot.readFieldBegin();
5927
        if (field.type == TType.STOP) { 
5928
          break;
5929
        }
5930
        _Fields fieldId = _Fields.findByThriftId(field.id);
5931
        if (fieldId == null) {
5932
          TProtocolUtil.skip(iprot, field.type);
5933
        } else {
5934
          switch (fieldId) {
5935
            case SUCCESS:
5936
              if (field.type == TType.STRUCT) {
553 chandransh 5937
                this.success = new User();
48 ashish 5938
                this.success.read(iprot);
5939
              } else { 
5940
                TProtocolUtil.skip(iprot, field.type);
5941
              }
5942
              break;
553 chandransh 5943
            case UCEX:
48 ashish 5944
              if (field.type == TType.STRUCT) {
553 chandransh 5945
                this.ucex = new UserContextException();
5946
                this.ucex.read(iprot);
48 ashish 5947
              } else { 
5948
                TProtocolUtil.skip(iprot, field.type);
5949
              }
5950
              break;
5951
          }
5952
          iprot.readFieldEnd();
5953
        }
5954
      }
5955
      iprot.readStructEnd();
5956
      validate();
5957
    }
5958
 
5959
    public void write(TProtocol oprot) throws TException {
5960
      oprot.writeStructBegin(STRUCT_DESC);
5961
 
5962
      if (this.isSetSuccess()) {
5963
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5964
        this.success.write(oprot);
5965
        oprot.writeFieldEnd();
553 chandransh 5966
      } else if (this.isSetUcex()) {
5967
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5968
        this.ucex.write(oprot);
48 ashish 5969
        oprot.writeFieldEnd();
5970
      }
5971
      oprot.writeFieldStop();
5972
      oprot.writeStructEnd();
5973
    }
5974
 
5975
    @Override
5976
    public String toString() {
553 chandransh 5977
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 5978
      boolean first = true;
5979
 
5980
      sb.append("success:");
5981
      if (this.success == null) {
5982
        sb.append("null");
5983
      } else {
5984
        sb.append(this.success);
5985
      }
5986
      first = false;
5987
      if (!first) sb.append(", ");
553 chandransh 5988
      sb.append("ucex:");
5989
      if (this.ucex == null) {
48 ashish 5990
        sb.append("null");
5991
      } else {
553 chandransh 5992
        sb.append(this.ucex);
48 ashish 5993
      }
5994
      first = false;
5995
      sb.append(")");
5996
      return sb.toString();
5997
    }
5998
 
5999
    public void validate() throws TException {
6000
      // check for required fields
6001
    }
6002
 
6003
  }
6004
 
571 rajveer 6005
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 6006
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 6007
 
553 chandransh 6008
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 6009
 
553 chandransh 6010
    private User user;
48 ashish 6011
 
6012
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6013
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6014
      USER((short)1, "user");
48 ashish 6015
 
6016
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6017
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6018
 
6019
      static {
6020
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6021
          byId.put((int)field._thriftId, field);
6022
          byName.put(field.getFieldName(), field);
6023
        }
6024
      }
6025
 
6026
      /**
6027
       * Find the _Fields constant that matches fieldId, or null if its not found.
6028
       */
6029
      public static _Fields findByThriftId(int fieldId) {
6030
        return byId.get(fieldId);
6031
      }
6032
 
6033
      /**
6034
       * Find the _Fields constant that matches fieldId, throwing an exception
6035
       * if it is not found.
6036
       */
6037
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6038
        _Fields fields = findByThriftId(fieldId);
6039
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6040
        return fields;
6041
      }
6042
 
6043
      /**
6044
       * Find the _Fields constant that matches name, or null if its not found.
6045
       */
6046
      public static _Fields findByName(String name) {
6047
        return byName.get(name);
6048
      }
6049
 
6050
      private final short _thriftId;
6051
      private final String _fieldName;
6052
 
6053
      _Fields(short thriftId, String fieldName) {
6054
        _thriftId = thriftId;
6055
        _fieldName = fieldName;
6056
      }
6057
 
6058
      public short getThriftFieldId() {
6059
        return _thriftId;
6060
      }
6061
 
6062
      public String getFieldName() {
6063
        return _fieldName;
6064
      }
6065
    }
6066
 
6067
    // isset id assignments
6068
 
6069
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 6070
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
6071
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 6072
    }});
6073
 
6074
    static {
553 chandransh 6075
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 6076
    }
6077
 
553 chandransh 6078
    public updateUser_args() {
48 ashish 6079
    }
6080
 
553 chandransh 6081
    public updateUser_args(
6082
      User user)
48 ashish 6083
    {
6084
      this();
553 chandransh 6085
      this.user = user;
48 ashish 6086
    }
6087
 
6088
    /**
6089
     * Performs a deep copy on <i>other</i>.
6090
     */
553 chandransh 6091
    public updateUser_args(updateUser_args other) {
6092
      if (other.isSetUser()) {
6093
        this.user = new User(other.user);
6094
      }
48 ashish 6095
    }
6096
 
553 chandransh 6097
    public updateUser_args deepCopy() {
6098
      return new updateUser_args(this);
48 ashish 6099
    }
6100
 
6101
    @Deprecated
553 chandransh 6102
    public updateUser_args clone() {
6103
      return new updateUser_args(this);
48 ashish 6104
    }
6105
 
553 chandransh 6106
    public User getUser() {
6107
      return this.user;
48 ashish 6108
    }
6109
 
553 chandransh 6110
    public updateUser_args setUser(User user) {
6111
      this.user = user;
48 ashish 6112
      return this;
6113
    }
6114
 
553 chandransh 6115
    public void unsetUser() {
6116
      this.user = null;
48 ashish 6117
    }
6118
 
553 chandransh 6119
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
6120
    public boolean isSetUser() {
6121
      return this.user != null;
48 ashish 6122
    }
6123
 
553 chandransh 6124
    public void setUserIsSet(boolean value) {
6125
      if (!value) {
6126
        this.user = null;
6127
      }
48 ashish 6128
    }
6129
 
6130
    public void setFieldValue(_Fields field, Object value) {
6131
      switch (field) {
553 chandransh 6132
      case USER:
48 ashish 6133
        if (value == null) {
553 chandransh 6134
          unsetUser();
48 ashish 6135
        } else {
553 chandransh 6136
          setUser((User)value);
48 ashish 6137
        }
6138
        break;
6139
 
6140
      }
6141
    }
6142
 
6143
    public void setFieldValue(int fieldID, Object value) {
6144
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6145
    }
6146
 
6147
    public Object getFieldValue(_Fields field) {
6148
      switch (field) {
553 chandransh 6149
      case USER:
6150
        return getUser();
48 ashish 6151
 
6152
      }
6153
      throw new IllegalStateException();
6154
    }
6155
 
6156
    public Object getFieldValue(int fieldId) {
6157
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6158
    }
6159
 
6160
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6161
    public boolean isSet(_Fields field) {
6162
      switch (field) {
553 chandransh 6163
      case USER:
6164
        return isSetUser();
48 ashish 6165
      }
6166
      throw new IllegalStateException();
6167
    }
6168
 
6169
    public boolean isSet(int fieldID) {
6170
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6171
    }
6172
 
6173
    @Override
6174
    public boolean equals(Object that) {
6175
      if (that == null)
6176
        return false;
553 chandransh 6177
      if (that instanceof updateUser_args)
6178
        return this.equals((updateUser_args)that);
48 ashish 6179
      return false;
6180
    }
6181
 
553 chandransh 6182
    public boolean equals(updateUser_args that) {
48 ashish 6183
      if (that == null)
6184
        return false;
6185
 
553 chandransh 6186
      boolean this_present_user = true && this.isSetUser();
6187
      boolean that_present_user = true && that.isSetUser();
6188
      if (this_present_user || that_present_user) {
6189
        if (!(this_present_user && that_present_user))
48 ashish 6190
          return false;
553 chandransh 6191
        if (!this.user.equals(that.user))
48 ashish 6192
          return false;
6193
      }
6194
 
6195
      return true;
6196
    }
6197
 
6198
    @Override
6199
    public int hashCode() {
6200
      return 0;
6201
    }
6202
 
571 rajveer 6203
    public int compareTo(updateUser_args other) {
6204
      if (!getClass().equals(other.getClass())) {
6205
        return getClass().getName().compareTo(other.getClass().getName());
6206
      }
6207
 
6208
      int lastComparison = 0;
6209
      updateUser_args typedOther = (updateUser_args)other;
6210
 
6211
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
6212
      if (lastComparison != 0) {
6213
        return lastComparison;
6214
      }
6215
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
6216
      if (lastComparison != 0) {
6217
        return lastComparison;
6218
      }
6219
      return 0;
6220
    }
6221
 
48 ashish 6222
    public void read(TProtocol iprot) throws TException {
6223
      TField field;
6224
      iprot.readStructBegin();
6225
      while (true)
6226
      {
6227
        field = iprot.readFieldBegin();
6228
        if (field.type == TType.STOP) { 
6229
          break;
6230
        }
6231
        _Fields fieldId = _Fields.findByThriftId(field.id);
6232
        if (fieldId == null) {
6233
          TProtocolUtil.skip(iprot, field.type);
6234
        } else {
6235
          switch (fieldId) {
553 chandransh 6236
            case USER:
6237
              if (field.type == TType.STRUCT) {
6238
                this.user = new User();
6239
                this.user.read(iprot);
48 ashish 6240
              } else { 
6241
                TProtocolUtil.skip(iprot, field.type);
6242
              }
6243
              break;
6244
          }
6245
          iprot.readFieldEnd();
6246
        }
6247
      }
6248
      iprot.readStructEnd();
6249
      validate();
6250
    }
6251
 
6252
    public void write(TProtocol oprot) throws TException {
6253
      validate();
6254
 
6255
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 6256
      if (this.user != null) {
6257
        oprot.writeFieldBegin(USER_FIELD_DESC);
6258
        this.user.write(oprot);
6259
        oprot.writeFieldEnd();
6260
      }
48 ashish 6261
      oprot.writeFieldStop();
6262
      oprot.writeStructEnd();
6263
    }
6264
 
6265
    @Override
6266
    public String toString() {
553 chandransh 6267
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 6268
      boolean first = true;
6269
 
553 chandransh 6270
      sb.append("user:");
6271
      if (this.user == null) {
6272
        sb.append("null");
6273
      } else {
6274
        sb.append(this.user);
6275
      }
48 ashish 6276
      first = false;
6277
      sb.append(")");
6278
      return sb.toString();
6279
    }
6280
 
6281
    public void validate() throws TException {
6282
      // check for required fields
6283
    }
6284
 
6285
  }
6286
 
571 rajveer 6287
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 6288
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 6289
 
6290
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6291
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6292
 
553 chandransh 6293
    private User success;
6294
    private UserContextException ucex;
48 ashish 6295
 
6296
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6297
    public enum _Fields implements TFieldIdEnum {
6298
      SUCCESS((short)0, "success"),
553 chandransh 6299
      UCEX((short)1, "ucex");
48 ashish 6300
 
6301
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6302
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6303
 
6304
      static {
6305
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6306
          byId.put((int)field._thriftId, field);
6307
          byName.put(field.getFieldName(), field);
6308
        }
6309
      }
6310
 
6311
      /**
6312
       * Find the _Fields constant that matches fieldId, or null if its not found.
6313
       */
6314
      public static _Fields findByThriftId(int fieldId) {
6315
        return byId.get(fieldId);
6316
      }
6317
 
6318
      /**
6319
       * Find the _Fields constant that matches fieldId, throwing an exception
6320
       * if it is not found.
6321
       */
6322
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6323
        _Fields fields = findByThriftId(fieldId);
6324
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6325
        return fields;
6326
      }
6327
 
6328
      /**
6329
       * Find the _Fields constant that matches name, or null if its not found.
6330
       */
6331
      public static _Fields findByName(String name) {
6332
        return byName.get(name);
6333
      }
6334
 
6335
      private final short _thriftId;
6336
      private final String _fieldName;
6337
 
6338
      _Fields(short thriftId, String fieldName) {
6339
        _thriftId = thriftId;
6340
        _fieldName = fieldName;
6341
      }
6342
 
6343
      public short getThriftFieldId() {
6344
        return _thriftId;
6345
      }
6346
 
6347
      public String getFieldName() {
6348
        return _fieldName;
6349
      }
6350
    }
6351
 
6352
    // isset id assignments
6353
 
6354
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6355
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6356
          new StructMetaData(TType.STRUCT, User.class)));
6357
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6358
          new FieldValueMetaData(TType.STRUCT)));
6359
    }});
6360
 
6361
    static {
553 chandransh 6362
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 6363
    }
6364
 
553 chandransh 6365
    public updateUser_result() {
48 ashish 6366
    }
6367
 
553 chandransh 6368
    public updateUser_result(
6369
      User success,
6370
      UserContextException ucex)
48 ashish 6371
    {
6372
      this();
6373
      this.success = success;
553 chandransh 6374
      this.ucex = ucex;
48 ashish 6375
    }
6376
 
6377
    /**
6378
     * Performs a deep copy on <i>other</i>.
6379
     */
553 chandransh 6380
    public updateUser_result(updateUser_result other) {
48 ashish 6381
      if (other.isSetSuccess()) {
553 chandransh 6382
        this.success = new User(other.success);
48 ashish 6383
      }
553 chandransh 6384
      if (other.isSetUcex()) {
6385
        this.ucex = new UserContextException(other.ucex);
48 ashish 6386
      }
6387
    }
6388
 
553 chandransh 6389
    public updateUser_result deepCopy() {
6390
      return new updateUser_result(this);
48 ashish 6391
    }
6392
 
6393
    @Deprecated
553 chandransh 6394
    public updateUser_result clone() {
6395
      return new updateUser_result(this);
48 ashish 6396
    }
6397
 
553 chandransh 6398
    public User getSuccess() {
48 ashish 6399
      return this.success;
6400
    }
6401
 
553 chandransh 6402
    public updateUser_result setSuccess(User success) {
48 ashish 6403
      this.success = success;
6404
      return this;
6405
    }
6406
 
6407
    public void unsetSuccess() {
6408
      this.success = null;
6409
    }
6410
 
6411
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6412
    public boolean isSetSuccess() {
6413
      return this.success != null;
6414
    }
6415
 
6416
    public void setSuccessIsSet(boolean value) {
6417
      if (!value) {
6418
        this.success = null;
6419
      }
6420
    }
6421
 
553 chandransh 6422
    public UserContextException getUcex() {
6423
      return this.ucex;
48 ashish 6424
    }
6425
 
553 chandransh 6426
    public updateUser_result setUcex(UserContextException ucex) {
6427
      this.ucex = ucex;
48 ashish 6428
      return this;
6429
    }
6430
 
553 chandransh 6431
    public void unsetUcex() {
6432
      this.ucex = null;
48 ashish 6433
    }
6434
 
553 chandransh 6435
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6436
    public boolean isSetUcex() {
6437
      return this.ucex != null;
48 ashish 6438
    }
6439
 
553 chandransh 6440
    public void setUcexIsSet(boolean value) {
48 ashish 6441
      if (!value) {
553 chandransh 6442
        this.ucex = null;
48 ashish 6443
      }
6444
    }
6445
 
6446
    public void setFieldValue(_Fields field, Object value) {
6447
      switch (field) {
6448
      case SUCCESS:
6449
        if (value == null) {
6450
          unsetSuccess();
6451
        } else {
553 chandransh 6452
          setSuccess((User)value);
48 ashish 6453
        }
6454
        break;
6455
 
553 chandransh 6456
      case UCEX:
48 ashish 6457
        if (value == null) {
553 chandransh 6458
          unsetUcex();
48 ashish 6459
        } else {
553 chandransh 6460
          setUcex((UserContextException)value);
48 ashish 6461
        }
6462
        break;
6463
 
6464
      }
6465
    }
6466
 
6467
    public void setFieldValue(int fieldID, Object value) {
6468
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6469
    }
6470
 
6471
    public Object getFieldValue(_Fields field) {
6472
      switch (field) {
6473
      case SUCCESS:
6474
        return getSuccess();
6475
 
553 chandransh 6476
      case UCEX:
6477
        return getUcex();
48 ashish 6478
 
6479
      }
6480
      throw new IllegalStateException();
6481
    }
6482
 
6483
    public Object getFieldValue(int fieldId) {
6484
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6485
    }
6486
 
6487
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6488
    public boolean isSet(_Fields field) {
6489
      switch (field) {
6490
      case SUCCESS:
6491
        return isSetSuccess();
553 chandransh 6492
      case UCEX:
6493
        return isSetUcex();
48 ashish 6494
      }
6495
      throw new IllegalStateException();
6496
    }
6497
 
6498
    public boolean isSet(int fieldID) {
6499
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6500
    }
6501
 
6502
    @Override
6503
    public boolean equals(Object that) {
6504
      if (that == null)
6505
        return false;
553 chandransh 6506
      if (that instanceof updateUser_result)
6507
        return this.equals((updateUser_result)that);
48 ashish 6508
      return false;
6509
    }
6510
 
553 chandransh 6511
    public boolean equals(updateUser_result that) {
48 ashish 6512
      if (that == null)
6513
        return false;
6514
 
6515
      boolean this_present_success = true && this.isSetSuccess();
6516
      boolean that_present_success = true && that.isSetSuccess();
6517
      if (this_present_success || that_present_success) {
6518
        if (!(this_present_success && that_present_success))
6519
          return false;
6520
        if (!this.success.equals(that.success))
6521
          return false;
6522
      }
6523
 
553 chandransh 6524
      boolean this_present_ucex = true && this.isSetUcex();
6525
      boolean that_present_ucex = true && that.isSetUcex();
6526
      if (this_present_ucex || that_present_ucex) {
6527
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6528
          return false;
553 chandransh 6529
        if (!this.ucex.equals(that.ucex))
48 ashish 6530
          return false;
6531
      }
6532
 
6533
      return true;
6534
    }
6535
 
6536
    @Override
6537
    public int hashCode() {
6538
      return 0;
6539
    }
6540
 
571 rajveer 6541
    public int compareTo(updateUser_result other) {
6542
      if (!getClass().equals(other.getClass())) {
6543
        return getClass().getName().compareTo(other.getClass().getName());
6544
      }
6545
 
6546
      int lastComparison = 0;
6547
      updateUser_result typedOther = (updateUser_result)other;
6548
 
6549
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6550
      if (lastComparison != 0) {
6551
        return lastComparison;
6552
      }
6553
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6554
      if (lastComparison != 0) {
6555
        return lastComparison;
6556
      }
6557
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6558
      if (lastComparison != 0) {
6559
        return lastComparison;
6560
      }
6561
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6562
      if (lastComparison != 0) {
6563
        return lastComparison;
6564
      }
6565
      return 0;
6566
    }
6567
 
48 ashish 6568
    public void read(TProtocol iprot) throws TException {
6569
      TField field;
6570
      iprot.readStructBegin();
6571
      while (true)
6572
      {
6573
        field = iprot.readFieldBegin();
6574
        if (field.type == TType.STOP) { 
6575
          break;
6576
        }
6577
        _Fields fieldId = _Fields.findByThriftId(field.id);
6578
        if (fieldId == null) {
6579
          TProtocolUtil.skip(iprot, field.type);
6580
        } else {
6581
          switch (fieldId) {
6582
            case SUCCESS:
6583
              if (field.type == TType.STRUCT) {
553 chandransh 6584
                this.success = new User();
48 ashish 6585
                this.success.read(iprot);
6586
              } else { 
6587
                TProtocolUtil.skip(iprot, field.type);
6588
              }
6589
              break;
553 chandransh 6590
            case UCEX:
48 ashish 6591
              if (field.type == TType.STRUCT) {
553 chandransh 6592
                this.ucex = new UserContextException();
6593
                this.ucex.read(iprot);
48 ashish 6594
              } else { 
6595
                TProtocolUtil.skip(iprot, field.type);
6596
              }
6597
              break;
6598
          }
6599
          iprot.readFieldEnd();
6600
        }
6601
      }
6602
      iprot.readStructEnd();
6603
      validate();
6604
    }
6605
 
6606
    public void write(TProtocol oprot) throws TException {
6607
      oprot.writeStructBegin(STRUCT_DESC);
6608
 
6609
      if (this.isSetSuccess()) {
6610
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6611
        this.success.write(oprot);
6612
        oprot.writeFieldEnd();
553 chandransh 6613
      } else if (this.isSetUcex()) {
6614
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6615
        this.ucex.write(oprot);
48 ashish 6616
        oprot.writeFieldEnd();
6617
      }
6618
      oprot.writeFieldStop();
6619
      oprot.writeStructEnd();
6620
    }
6621
 
6622
    @Override
6623
    public String toString() {
553 chandransh 6624
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 6625
      boolean first = true;
6626
 
6627
      sb.append("success:");
6628
      if (this.success == null) {
6629
        sb.append("null");
6630
      } else {
6631
        sb.append(this.success);
6632
      }
6633
      first = false;
6634
      if (!first) sb.append(", ");
553 chandransh 6635
      sb.append("ucex:");
6636
      if (this.ucex == null) {
48 ashish 6637
        sb.append("null");
6638
      } else {
553 chandransh 6639
        sb.append(this.ucex);
48 ashish 6640
      }
6641
      first = false;
6642
      sb.append(")");
6643
      return sb.toString();
6644
    }
6645
 
6646
    public void validate() throws TException {
6647
      // check for required fields
6648
    }
6649
 
6650
  }
6651
 
553 chandransh 6652
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
6653
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 6654
 
6655
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6656
 
6657
    private long userId;
6658
 
6659
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6660
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6661
      USER_ID((short)1, "userId");
48 ashish 6662
 
6663
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6664
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6665
 
6666
      static {
6667
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6668
          byId.put((int)field._thriftId, field);
6669
          byName.put(field.getFieldName(), field);
6670
        }
6671
      }
6672
 
6673
      /**
6674
       * Find the _Fields constant that matches fieldId, or null if its not found.
6675
       */
6676
      public static _Fields findByThriftId(int fieldId) {
6677
        return byId.get(fieldId);
6678
      }
6679
 
6680
      /**
6681
       * Find the _Fields constant that matches fieldId, throwing an exception
6682
       * if it is not found.
6683
       */
6684
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6685
        _Fields fields = findByThriftId(fieldId);
6686
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6687
        return fields;
6688
      }
6689
 
6690
      /**
6691
       * Find the _Fields constant that matches name, or null if its not found.
6692
       */
6693
      public static _Fields findByName(String name) {
6694
        return byName.get(name);
6695
      }
6696
 
6697
      private final short _thriftId;
6698
      private final String _fieldName;
6699
 
6700
      _Fields(short thriftId, String fieldName) {
6701
        _thriftId = thriftId;
6702
        _fieldName = fieldName;
6703
      }
6704
 
6705
      public short getThriftFieldId() {
6706
        return _thriftId;
6707
      }
6708
 
6709
      public String getFieldName() {
6710
        return _fieldName;
6711
      }
6712
    }
6713
 
6714
    // isset id assignments
6715
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6716
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6717
 
6718
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6719
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6720
          new FieldValueMetaData(TType.I64)));
6721
    }});
6722
 
6723
    static {
553 chandransh 6724
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 6725
    }
6726
 
553 chandransh 6727
    public deleteUser_args() {
48 ashish 6728
    }
6729
 
553 chandransh 6730
    public deleteUser_args(
6731
      long userId)
48 ashish 6732
    {
6733
      this();
6734
      this.userId = userId;
6735
      setUserIdIsSet(true);
6736
    }
6737
 
6738
    /**
6739
     * Performs a deep copy on <i>other</i>.
6740
     */
553 chandransh 6741
    public deleteUser_args(deleteUser_args other) {
48 ashish 6742
      __isset_bit_vector.clear();
6743
      __isset_bit_vector.or(other.__isset_bit_vector);
6744
      this.userId = other.userId;
6745
    }
6746
 
553 chandransh 6747
    public deleteUser_args deepCopy() {
6748
      return new deleteUser_args(this);
48 ashish 6749
    }
6750
 
6751
    @Deprecated
553 chandransh 6752
    public deleteUser_args clone() {
6753
      return new deleteUser_args(this);
48 ashish 6754
    }
6755
 
6756
    public long getUserId() {
6757
      return this.userId;
6758
    }
6759
 
553 chandransh 6760
    public deleteUser_args setUserId(long userId) {
48 ashish 6761
      this.userId = userId;
6762
      setUserIdIsSet(true);
6763
      return this;
6764
    }
6765
 
6766
    public void unsetUserId() {
6767
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6768
    }
6769
 
6770
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6771
    public boolean isSetUserId() {
6772
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6773
    }
6774
 
6775
    public void setUserIdIsSet(boolean value) {
6776
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6777
    }
6778
 
6779
    public void setFieldValue(_Fields field, Object value) {
6780
      switch (field) {
6781
      case USER_ID:
6782
        if (value == null) {
6783
          unsetUserId();
6784
        } else {
6785
          setUserId((Long)value);
6786
        }
6787
        break;
6788
 
6789
      }
6790
    }
6791
 
6792
    public void setFieldValue(int fieldID, Object value) {
6793
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6794
    }
6795
 
6796
    public Object getFieldValue(_Fields field) {
6797
      switch (field) {
6798
      case USER_ID:
6799
        return new Long(getUserId());
6800
 
6801
      }
6802
      throw new IllegalStateException();
6803
    }
6804
 
6805
    public Object getFieldValue(int fieldId) {
6806
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6807
    }
6808
 
6809
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6810
    public boolean isSet(_Fields field) {
6811
      switch (field) {
6812
      case USER_ID:
6813
        return isSetUserId();
6814
      }
6815
      throw new IllegalStateException();
6816
    }
6817
 
6818
    public boolean isSet(int fieldID) {
6819
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6820
    }
6821
 
6822
    @Override
6823
    public boolean equals(Object that) {
6824
      if (that == null)
6825
        return false;
553 chandransh 6826
      if (that instanceof deleteUser_args)
6827
        return this.equals((deleteUser_args)that);
48 ashish 6828
      return false;
6829
    }
6830
 
553 chandransh 6831
    public boolean equals(deleteUser_args that) {
48 ashish 6832
      if (that == null)
6833
        return false;
6834
 
6835
      boolean this_present_userId = true;
6836
      boolean that_present_userId = true;
6837
      if (this_present_userId || that_present_userId) {
6838
        if (!(this_present_userId && that_present_userId))
6839
          return false;
6840
        if (this.userId != that.userId)
6841
          return false;
6842
      }
6843
 
6844
      return true;
6845
    }
6846
 
6847
    @Override
6848
    public int hashCode() {
6849
      return 0;
6850
    }
6851
 
553 chandransh 6852
    public int compareTo(deleteUser_args other) {
48 ashish 6853
      if (!getClass().equals(other.getClass())) {
6854
        return getClass().getName().compareTo(other.getClass().getName());
6855
      }
6856
 
6857
      int lastComparison = 0;
553 chandransh 6858
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 6859
 
6860
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6861
      if (lastComparison != 0) {
6862
        return lastComparison;
6863
      }
6864
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6865
      if (lastComparison != 0) {
6866
        return lastComparison;
6867
      }
6868
      return 0;
6869
    }
6870
 
6871
    public void read(TProtocol iprot) throws TException {
6872
      TField field;
6873
      iprot.readStructBegin();
6874
      while (true)
6875
      {
6876
        field = iprot.readFieldBegin();
6877
        if (field.type == TType.STOP) { 
6878
          break;
6879
        }
6880
        _Fields fieldId = _Fields.findByThriftId(field.id);
6881
        if (fieldId == null) {
6882
          TProtocolUtil.skip(iprot, field.type);
6883
        } else {
6884
          switch (fieldId) {
6885
            case USER_ID:
6886
              if (field.type == TType.I64) {
6887
                this.userId = iprot.readI64();
6888
                setUserIdIsSet(true);
6889
              } else { 
6890
                TProtocolUtil.skip(iprot, field.type);
6891
              }
6892
              break;
6893
          }
6894
          iprot.readFieldEnd();
6895
        }
6896
      }
6897
      iprot.readStructEnd();
6898
      validate();
6899
    }
6900
 
6901
    public void write(TProtocol oprot) throws TException {
6902
      validate();
6903
 
6904
      oprot.writeStructBegin(STRUCT_DESC);
6905
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6906
      oprot.writeI64(this.userId);
6907
      oprot.writeFieldEnd();
6908
      oprot.writeFieldStop();
6909
      oprot.writeStructEnd();
6910
    }
6911
 
6912
    @Override
6913
    public String toString() {
553 chandransh 6914
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 6915
      boolean first = true;
6916
 
6917
      sb.append("userId:");
6918
      sb.append(this.userId);
6919
      first = false;
6920
      sb.append(")");
6921
      return sb.toString();
6922
    }
6923
 
6924
    public void validate() throws TException {
6925
      // check for required fields
6926
    }
6927
 
6928
  }
6929
 
553 chandransh 6930
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
6931
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 6932
 
553 chandransh 6933
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6934
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6935
 
553 chandransh 6936
    private boolean success;
6937
    private UserContextException ucex;
48 ashish 6938
 
6939
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6940
    public enum _Fields implements TFieldIdEnum {
6941
      SUCCESS((short)0, "success"),
553 chandransh 6942
      UCEX((short)1, "ucex");
48 ashish 6943
 
6944
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6945
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6946
 
6947
      static {
6948
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6949
          byId.put((int)field._thriftId, field);
6950
          byName.put(field.getFieldName(), field);
6951
        }
6952
      }
6953
 
6954
      /**
6955
       * Find the _Fields constant that matches fieldId, or null if its not found.
6956
       */
6957
      public static _Fields findByThriftId(int fieldId) {
6958
        return byId.get(fieldId);
6959
      }
6960
 
6961
      /**
6962
       * Find the _Fields constant that matches fieldId, throwing an exception
6963
       * if it is not found.
6964
       */
6965
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6966
        _Fields fields = findByThriftId(fieldId);
6967
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6968
        return fields;
6969
      }
6970
 
6971
      /**
6972
       * Find the _Fields constant that matches name, or null if its not found.
6973
       */
6974
      public static _Fields findByName(String name) {
6975
        return byName.get(name);
6976
      }
6977
 
6978
      private final short _thriftId;
6979
      private final String _fieldName;
6980
 
6981
      _Fields(short thriftId, String fieldName) {
6982
        _thriftId = thriftId;
6983
        _fieldName = fieldName;
6984
      }
6985
 
6986
      public short getThriftFieldId() {
6987
        return _thriftId;
6988
      }
6989
 
6990
      public String getFieldName() {
6991
        return _fieldName;
6992
      }
6993
    }
6994
 
6995
    // isset id assignments
553 chandransh 6996
    private static final int __SUCCESS_ISSET_ID = 0;
6997
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6998
 
6999
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7000
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7001
          new FieldValueMetaData(TType.BOOL)));
7002
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 7003
          new FieldValueMetaData(TType.STRUCT)));
7004
    }});
7005
 
7006
    static {
553 chandransh 7007
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 7008
    }
7009
 
553 chandransh 7010
    public deleteUser_result() {
48 ashish 7011
    }
7012
 
553 chandransh 7013
    public deleteUser_result(
7014
      boolean success,
7015
      UserContextException ucex)
48 ashish 7016
    {
7017
      this();
7018
      this.success = success;
553 chandransh 7019
      setSuccessIsSet(true);
7020
      this.ucex = ucex;
48 ashish 7021
    }
7022
 
7023
    /**
7024
     * Performs a deep copy on <i>other</i>.
7025
     */
553 chandransh 7026
    public deleteUser_result(deleteUser_result other) {
7027
      __isset_bit_vector.clear();
7028
      __isset_bit_vector.or(other.__isset_bit_vector);
7029
      this.success = other.success;
7030
      if (other.isSetUcex()) {
7031
        this.ucex = new UserContextException(other.ucex);
48 ashish 7032
      }
7033
    }
7034
 
553 chandransh 7035
    public deleteUser_result deepCopy() {
7036
      return new deleteUser_result(this);
48 ashish 7037
    }
7038
 
7039
    @Deprecated
553 chandransh 7040
    public deleteUser_result clone() {
7041
      return new deleteUser_result(this);
48 ashish 7042
    }
7043
 
553 chandransh 7044
    public boolean isSuccess() {
48 ashish 7045
      return this.success;
7046
    }
7047
 
553 chandransh 7048
    public deleteUser_result setSuccess(boolean success) {
48 ashish 7049
      this.success = success;
553 chandransh 7050
      setSuccessIsSet(true);
48 ashish 7051
      return this;
7052
    }
7053
 
7054
    public void unsetSuccess() {
553 chandransh 7055
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 7056
    }
7057
 
7058
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7059
    public boolean isSetSuccess() {
553 chandransh 7060
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 7061
    }
7062
 
7063
    public void setSuccessIsSet(boolean value) {
553 chandransh 7064
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 7065
    }
7066
 
553 chandransh 7067
    public UserContextException getUcex() {
7068
      return this.ucex;
48 ashish 7069
    }
7070
 
553 chandransh 7071
    public deleteUser_result setUcex(UserContextException ucex) {
7072
      this.ucex = ucex;
48 ashish 7073
      return this;
7074
    }
7075
 
553 chandransh 7076
    public void unsetUcex() {
7077
      this.ucex = null;
48 ashish 7078
    }
7079
 
553 chandransh 7080
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
7081
    public boolean isSetUcex() {
7082
      return this.ucex != null;
48 ashish 7083
    }
7084
 
553 chandransh 7085
    public void setUcexIsSet(boolean value) {
48 ashish 7086
      if (!value) {
553 chandransh 7087
        this.ucex = null;
48 ashish 7088
      }
7089
    }
7090
 
7091
    public void setFieldValue(_Fields field, Object value) {
7092
      switch (field) {
7093
      case SUCCESS:
7094
        if (value == null) {
7095
          unsetSuccess();
7096
        } else {
553 chandransh 7097
          setSuccess((Boolean)value);
48 ashish 7098
        }
7099
        break;
7100
 
553 chandransh 7101
      case UCEX:
48 ashish 7102
        if (value == null) {
553 chandransh 7103
          unsetUcex();
48 ashish 7104
        } else {
553 chandransh 7105
          setUcex((UserContextException)value);
48 ashish 7106
        }
7107
        break;
7108
 
7109
      }
7110
    }
7111
 
7112
    public void setFieldValue(int fieldID, Object value) {
7113
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7114
    }
7115
 
7116
    public Object getFieldValue(_Fields field) {
7117
      switch (field) {
7118
      case SUCCESS:
553 chandransh 7119
        return new Boolean(isSuccess());
48 ashish 7120
 
553 chandransh 7121
      case UCEX:
7122
        return getUcex();
48 ashish 7123
 
7124
      }
7125
      throw new IllegalStateException();
7126
    }
7127
 
7128
    public Object getFieldValue(int fieldId) {
7129
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7130
    }
7131
 
7132
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7133
    public boolean isSet(_Fields field) {
7134
      switch (field) {
7135
      case SUCCESS:
7136
        return isSetSuccess();
553 chandransh 7137
      case UCEX:
7138
        return isSetUcex();
48 ashish 7139
      }
7140
      throw new IllegalStateException();
7141
    }
7142
 
7143
    public boolean isSet(int fieldID) {
7144
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7145
    }
7146
 
7147
    @Override
7148
    public boolean equals(Object that) {
7149
      if (that == null)
7150
        return false;
553 chandransh 7151
      if (that instanceof deleteUser_result)
7152
        return this.equals((deleteUser_result)that);
48 ashish 7153
      return false;
7154
    }
7155
 
553 chandransh 7156
    public boolean equals(deleteUser_result that) {
48 ashish 7157
      if (that == null)
7158
        return false;
7159
 
553 chandransh 7160
      boolean this_present_success = true;
7161
      boolean that_present_success = true;
48 ashish 7162
      if (this_present_success || that_present_success) {
7163
        if (!(this_present_success && that_present_success))
7164
          return false;
553 chandransh 7165
        if (this.success != that.success)
48 ashish 7166
          return false;
7167
      }
7168
 
553 chandransh 7169
      boolean this_present_ucex = true && this.isSetUcex();
7170
      boolean that_present_ucex = true && that.isSetUcex();
7171
      if (this_present_ucex || that_present_ucex) {
7172
        if (!(this_present_ucex && that_present_ucex))
48 ashish 7173
          return false;
553 chandransh 7174
        if (!this.ucex.equals(that.ucex))
48 ashish 7175
          return false;
7176
      }
7177
 
7178
      return true;
7179
    }
7180
 
7181
    @Override
7182
    public int hashCode() {
7183
      return 0;
7184
    }
7185
 
553 chandransh 7186
    public int compareTo(deleteUser_result other) {
7187
      if (!getClass().equals(other.getClass())) {
7188
        return getClass().getName().compareTo(other.getClass().getName());
7189
      }
7190
 
7191
      int lastComparison = 0;
7192
      deleteUser_result typedOther = (deleteUser_result)other;
7193
 
7194
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7195
      if (lastComparison != 0) {
7196
        return lastComparison;
7197
      }
7198
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7199
      if (lastComparison != 0) {
7200
        return lastComparison;
7201
      }
7202
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
7203
      if (lastComparison != 0) {
7204
        return lastComparison;
7205
      }
7206
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
7207
      if (lastComparison != 0) {
7208
        return lastComparison;
7209
      }
7210
      return 0;
7211
    }
7212
 
48 ashish 7213
    public void read(TProtocol iprot) throws TException {
7214
      TField field;
7215
      iprot.readStructBegin();
7216
      while (true)
7217
      {
7218
        field = iprot.readFieldBegin();
7219
        if (field.type == TType.STOP) { 
7220
          break;
7221
        }
7222
        _Fields fieldId = _Fields.findByThriftId(field.id);
7223
        if (fieldId == null) {
7224
          TProtocolUtil.skip(iprot, field.type);
7225
        } else {
7226
          switch (fieldId) {
7227
            case SUCCESS:
553 chandransh 7228
              if (field.type == TType.BOOL) {
7229
                this.success = iprot.readBool();
7230
                setSuccessIsSet(true);
48 ashish 7231
              } else { 
7232
                TProtocolUtil.skip(iprot, field.type);
7233
              }
7234
              break;
553 chandransh 7235
            case UCEX:
48 ashish 7236
              if (field.type == TType.STRUCT) {
553 chandransh 7237
                this.ucex = new UserContextException();
7238
                this.ucex.read(iprot);
48 ashish 7239
              } else { 
7240
                TProtocolUtil.skip(iprot, field.type);
7241
              }
7242
              break;
7243
          }
7244
          iprot.readFieldEnd();
7245
        }
7246
      }
7247
      iprot.readStructEnd();
7248
      validate();
7249
    }
7250
 
7251
    public void write(TProtocol oprot) throws TException {
7252
      oprot.writeStructBegin(STRUCT_DESC);
7253
 
7254
      if (this.isSetSuccess()) {
7255
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 7256
        oprot.writeBool(this.success);
48 ashish 7257
        oprot.writeFieldEnd();
553 chandransh 7258
      } else if (this.isSetUcex()) {
7259
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7260
        this.ucex.write(oprot);
48 ashish 7261
        oprot.writeFieldEnd();
7262
      }
7263
      oprot.writeFieldStop();
7264
      oprot.writeStructEnd();
7265
    }
7266
 
7267
    @Override
7268
    public String toString() {
553 chandransh 7269
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 7270
      boolean first = true;
7271
 
7272
      sb.append("success:");
553 chandransh 7273
      sb.append(this.success);
48 ashish 7274
      first = false;
7275
      if (!first) sb.append(", ");
553 chandransh 7276
      sb.append("ucex:");
7277
      if (this.ucex == null) {
48 ashish 7278
        sb.append("null");
7279
      } else {
553 chandransh 7280
        sb.append(this.ucex);
48 ashish 7281
      }
7282
      first = false;
7283
      sb.append(")");
7284
      return sb.toString();
7285
    }
7286
 
7287
    public void validate() throws TException {
7288
      // check for required fields
7289
    }
7290
 
7291
  }
7292
 
553 chandransh 7293
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
7294
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 7295
 
7296
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
7297
 
7298
    private long userId;
7299
 
7300
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7301
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7302
      USER_ID((short)1, "userId");
48 ashish 7303
 
7304
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7305
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7306
 
7307
      static {
7308
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7309
          byId.put((int)field._thriftId, field);
7310
          byName.put(field.getFieldName(), field);
7311
        }
7312
      }
7313
 
7314
      /**
7315
       * Find the _Fields constant that matches fieldId, or null if its not found.
7316
       */
7317
      public static _Fields findByThriftId(int fieldId) {
7318
        return byId.get(fieldId);
7319
      }
7320
 
7321
      /**
7322
       * Find the _Fields constant that matches fieldId, throwing an exception
7323
       * if it is not found.
7324
       */
7325
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7326
        _Fields fields = findByThriftId(fieldId);
7327
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7328
        return fields;
7329
      }
7330
 
7331
      /**
7332
       * Find the _Fields constant that matches name, or null if its not found.
7333
       */
7334
      public static _Fields findByName(String name) {
7335
        return byName.get(name);
7336
      }
7337
 
7338
      private final short _thriftId;
7339
      private final String _fieldName;
7340
 
7341
      _Fields(short thriftId, String fieldName) {
7342
        _thriftId = thriftId;
7343
        _fieldName = fieldName;
7344
      }
7345
 
7346
      public short getThriftFieldId() {
7347
        return _thriftId;
7348
      }
7349
 
7350
      public String getFieldName() {
7351
        return _fieldName;
7352
      }
7353
    }
7354
 
7355
    // isset id assignments
7356
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 7357
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 7358
 
7359
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7360
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
7361
          new FieldValueMetaData(TType.I64)));
7362
    }});
7363
 
7364
    static {
553 chandransh 7365
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 7366
    }
7367
 
553 chandransh 7368
    public getUserState_args() {
48 ashish 7369
    }
7370
 
553 chandransh 7371
    public getUserState_args(
7372
      long userId)
48 ashish 7373
    {
7374
      this();
7375
      this.userId = userId;
7376
      setUserIdIsSet(true);
7377
    }
7378
 
7379
    /**
7380
     * Performs a deep copy on <i>other</i>.
7381
     */
553 chandransh 7382
    public getUserState_args(getUserState_args other) {
48 ashish 7383
      __isset_bit_vector.clear();
7384
      __isset_bit_vector.or(other.__isset_bit_vector);
7385
      this.userId = other.userId;
7386
    }
7387
 
553 chandransh 7388
    public getUserState_args deepCopy() {
7389
      return new getUserState_args(this);
48 ashish 7390
    }
7391
 
7392
    @Deprecated
553 chandransh 7393
    public getUserState_args clone() {
7394
      return new getUserState_args(this);
48 ashish 7395
    }
7396
 
7397
    public long getUserId() {
7398
      return this.userId;
7399
    }
7400
 
553 chandransh 7401
    public getUserState_args setUserId(long userId) {
48 ashish 7402
      this.userId = userId;
7403
      setUserIdIsSet(true);
7404
      return this;
7405
    }
7406
 
7407
    public void unsetUserId() {
7408
      __isset_bit_vector.clear(__USERID_ISSET_ID);
7409
    }
7410
 
7411
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
7412
    public boolean isSetUserId() {
7413
      return __isset_bit_vector.get(__USERID_ISSET_ID);
7414
    }
7415
 
7416
    public void setUserIdIsSet(boolean value) {
7417
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
7418
    }
7419
 
7420
    public void setFieldValue(_Fields field, Object value) {
7421
      switch (field) {
7422
      case USER_ID:
7423
        if (value == null) {
7424
          unsetUserId();
7425
        } else {
7426
          setUserId((Long)value);
7427
        }
7428
        break;
7429
 
7430
      }
7431
    }
7432
 
7433
    public void setFieldValue(int fieldID, Object value) {
7434
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7435
    }
7436
 
7437
    public Object getFieldValue(_Fields field) {
7438
      switch (field) {
7439
      case USER_ID:
7440
        return new Long(getUserId());
7441
 
7442
      }
7443
      throw new IllegalStateException();
7444
    }
7445
 
7446
    public Object getFieldValue(int fieldId) {
7447
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7448
    }
7449
 
7450
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7451
    public boolean isSet(_Fields field) {
7452
      switch (field) {
7453
      case USER_ID:
7454
        return isSetUserId();
7455
      }
7456
      throw new IllegalStateException();
7457
    }
7458
 
7459
    public boolean isSet(int fieldID) {
7460
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7461
    }
7462
 
7463
    @Override
7464
    public boolean equals(Object that) {
7465
      if (that == null)
7466
        return false;
553 chandransh 7467
      if (that instanceof getUserState_args)
7468
        return this.equals((getUserState_args)that);
48 ashish 7469
      return false;
7470
    }
7471
 
553 chandransh 7472
    public boolean equals(getUserState_args that) {
48 ashish 7473
      if (that == null)
7474
        return false;
7475
 
7476
      boolean this_present_userId = true;
7477
      boolean that_present_userId = true;
7478
      if (this_present_userId || that_present_userId) {
7479
        if (!(this_present_userId && that_present_userId))
7480
          return false;
7481
        if (this.userId != that.userId)
7482
          return false;
7483
      }
7484
 
7485
      return true;
7486
    }
7487
 
7488
    @Override
7489
    public int hashCode() {
7490
      return 0;
7491
    }
7492
 
553 chandransh 7493
    public int compareTo(getUserState_args other) {
48 ashish 7494
      if (!getClass().equals(other.getClass())) {
7495
        return getClass().getName().compareTo(other.getClass().getName());
7496
      }
7497
 
7498
      int lastComparison = 0;
553 chandransh 7499
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 7500
 
7501
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
7502
      if (lastComparison != 0) {
7503
        return lastComparison;
7504
      }
7505
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
7506
      if (lastComparison != 0) {
7507
        return lastComparison;
7508
      }
7509
      return 0;
7510
    }
7511
 
7512
    public void read(TProtocol iprot) throws TException {
7513
      TField field;
7514
      iprot.readStructBegin();
7515
      while (true)
7516
      {
7517
        field = iprot.readFieldBegin();
7518
        if (field.type == TType.STOP) { 
7519
          break;
7520
        }
7521
        _Fields fieldId = _Fields.findByThriftId(field.id);
7522
        if (fieldId == null) {
7523
          TProtocolUtil.skip(iprot, field.type);
7524
        } else {
7525
          switch (fieldId) {
7526
            case USER_ID:
7527
              if (field.type == TType.I64) {
7528
                this.userId = iprot.readI64();
7529
                setUserIdIsSet(true);
7530
              } else { 
7531
                TProtocolUtil.skip(iprot, field.type);
7532
              }
7533
              break;
7534
          }
7535
          iprot.readFieldEnd();
7536
        }
7537
      }
7538
      iprot.readStructEnd();
7539
      validate();
7540
    }
7541
 
7542
    public void write(TProtocol oprot) throws TException {
7543
      validate();
7544
 
7545
      oprot.writeStructBegin(STRUCT_DESC);
7546
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
7547
      oprot.writeI64(this.userId);
7548
      oprot.writeFieldEnd();
7549
      oprot.writeFieldStop();
7550
      oprot.writeStructEnd();
7551
    }
7552
 
7553
    @Override
7554
    public String toString() {
553 chandransh 7555
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 7556
      boolean first = true;
7557
 
7558
      sb.append("userId:");
7559
      sb.append(this.userId);
7560
      first = false;
7561
      sb.append(")");
7562
      return sb.toString();
7563
    }
7564
 
7565
    public void validate() throws TException {
7566
      // check for required fields
7567
    }
7568
 
7569
  }
7570
 
553 chandransh 7571
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
7572
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 7573
 
7574
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7575
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 7576
 
553 chandransh 7577
    private UserState success;
7578
    private UserContextException ucex;
48 ashish 7579
 
7580
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7581
    public enum _Fields implements TFieldIdEnum {
7582
      SUCCESS((short)0, "success"),
553 chandransh 7583
      UCEX((short)1, "ucex");
48 ashish 7584
 
7585
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7586
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7587
 
7588
      static {
7589
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7590
          byId.put((int)field._thriftId, field);
7591
          byName.put(field.getFieldName(), field);
7592
        }
7593
      }
7594
 
7595
      /**
7596
       * Find the _Fields constant that matches fieldId, or null if its not found.
7597
       */
7598
      public static _Fields findByThriftId(int fieldId) {
7599
        return byId.get(fieldId);
7600
      }
7601
 
7602
      /**
7603
       * Find the _Fields constant that matches fieldId, throwing an exception
7604
       * if it is not found.
7605
       */
7606
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7607
        _Fields fields = findByThriftId(fieldId);
7608
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7609
        return fields;
7610
      }
7611
 
7612
      /**
7613
       * Find the _Fields constant that matches name, or null if its not found.
7614
       */
7615
      public static _Fields findByName(String name) {
7616
        return byName.get(name);
7617
      }
7618
 
7619
      private final short _thriftId;
7620
      private final String _fieldName;
7621
 
7622
      _Fields(short thriftId, String fieldName) {
7623
        _thriftId = thriftId;
7624
        _fieldName = fieldName;
7625
      }
7626
 
7627
      public short getThriftFieldId() {
7628
        return _thriftId;
7629
      }
7630
 
7631
      public String getFieldName() {
7632
        return _fieldName;
7633
      }
7634
    }
7635
 
7636
    // isset id assignments
7637
 
7638
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7639
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7640
          new StructMetaData(TType.STRUCT, UserState.class)));
7641
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 7642
          new FieldValueMetaData(TType.STRUCT)));
7643
    }});
7644
 
7645
    static {
553 chandransh 7646
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 7647
    }
7648
 
553 chandransh 7649
    public getUserState_result() {
48 ashish 7650
    }
7651
 
553 chandransh 7652
    public getUserState_result(
7653
      UserState success,
7654
      UserContextException ucex)
48 ashish 7655
    {
7656
      this();
7657
      this.success = success;
553 chandransh 7658
      this.ucex = ucex;
48 ashish 7659
    }
7660
 
7661
    /**
7662
     * Performs a deep copy on <i>other</i>.
7663
     */
553 chandransh 7664
    public getUserState_result(getUserState_result other) {
48 ashish 7665
      if (other.isSetSuccess()) {
553 chandransh 7666
        this.success = new UserState(other.success);
48 ashish 7667
      }
553 chandransh 7668
      if (other.isSetUcex()) {
7669
        this.ucex = new UserContextException(other.ucex);
48 ashish 7670
      }
7671
    }
7672
 
553 chandransh 7673
    public getUserState_result deepCopy() {
7674
      return new getUserState_result(this);
48 ashish 7675
    }
7676
 
7677
    @Deprecated
553 chandransh 7678
    public getUserState_result clone() {
7679
      return new getUserState_result(this);
48 ashish 7680
    }
7681
 
553 chandransh 7682
    public UserState getSuccess() {
48 ashish 7683
      return this.success;
7684
    }
7685
 
553 chandransh 7686
    public getUserState_result setSuccess(UserState success) {
48 ashish 7687
      this.success = success;
7688
      return this;
7689
    }
7690
 
7691
    public void unsetSuccess() {
7692
      this.success = null;
7693
    }
7694
 
7695
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7696
    public boolean isSetSuccess() {
7697
      return this.success != null;
7698
    }
7699
 
7700
    public void setSuccessIsSet(boolean value) {
7701
      if (!value) {
7702
        this.success = null;
7703
      }
7704
    }
7705
 
553 chandransh 7706
    public UserContextException getUcex() {
7707
      return this.ucex;
48 ashish 7708
    }
7709
 
553 chandransh 7710
    public getUserState_result setUcex(UserContextException ucex) {
7711
      this.ucex = ucex;
48 ashish 7712
      return this;
7713
    }
7714
 
553 chandransh 7715
    public void unsetUcex() {
7716
      this.ucex = null;
48 ashish 7717
    }
7718
 
553 chandransh 7719
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
7720
    public boolean isSetUcex() {
7721
      return this.ucex != null;
48 ashish 7722
    }
7723
 
553 chandransh 7724
    public void setUcexIsSet(boolean value) {
48 ashish 7725
      if (!value) {
553 chandransh 7726
        this.ucex = null;
48 ashish 7727
      }
7728
    }
7729
 
7730
    public void setFieldValue(_Fields field, Object value) {
7731
      switch (field) {
7732
      case SUCCESS:
7733
        if (value == null) {
7734
          unsetSuccess();
7735
        } else {
553 chandransh 7736
          setSuccess((UserState)value);
48 ashish 7737
        }
7738
        break;
7739
 
553 chandransh 7740
      case UCEX:
48 ashish 7741
        if (value == null) {
553 chandransh 7742
          unsetUcex();
48 ashish 7743
        } else {
553 chandransh 7744
          setUcex((UserContextException)value);
48 ashish 7745
        }
7746
        break;
7747
 
7748
      }
7749
    }
7750
 
7751
    public void setFieldValue(int fieldID, Object value) {
7752
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7753
    }
7754
 
7755
    public Object getFieldValue(_Fields field) {
7756
      switch (field) {
7757
      case SUCCESS:
7758
        return getSuccess();
7759
 
553 chandransh 7760
      case UCEX:
7761
        return getUcex();
48 ashish 7762
 
7763
      }
7764
      throw new IllegalStateException();
7765
    }
7766
 
7767
    public Object getFieldValue(int fieldId) {
7768
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7769
    }
7770
 
7771
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7772
    public boolean isSet(_Fields field) {
7773
      switch (field) {
7774
      case SUCCESS:
7775
        return isSetSuccess();
553 chandransh 7776
      case UCEX:
7777
        return isSetUcex();
48 ashish 7778
      }
7779
      throw new IllegalStateException();
7780
    }
7781
 
7782
    public boolean isSet(int fieldID) {
7783
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7784
    }
7785
 
7786
    @Override
7787
    public boolean equals(Object that) {
7788
      if (that == null)
7789
        return false;
553 chandransh 7790
      if (that instanceof getUserState_result)
7791
        return this.equals((getUserState_result)that);
48 ashish 7792
      return false;
7793
    }
7794
 
553 chandransh 7795
    public boolean equals(getUserState_result that) {
48 ashish 7796
      if (that == null)
7797
        return false;
7798
 
7799
      boolean this_present_success = true && this.isSetSuccess();
7800
      boolean that_present_success = true && that.isSetSuccess();
7801
      if (this_present_success || that_present_success) {
7802
        if (!(this_present_success && that_present_success))
7803
          return false;
7804
        if (!this.success.equals(that.success))
7805
          return false;
7806
      }
7807
 
553 chandransh 7808
      boolean this_present_ucex = true && this.isSetUcex();
7809
      boolean that_present_ucex = true && that.isSetUcex();
7810
      if (this_present_ucex || that_present_ucex) {
7811
        if (!(this_present_ucex && that_present_ucex))
48 ashish 7812
          return false;
553 chandransh 7813
        if (!this.ucex.equals(that.ucex))
48 ashish 7814
          return false;
7815
      }
7816
 
7817
      return true;
7818
    }
7819
 
7820
    @Override
7821
    public int hashCode() {
7822
      return 0;
7823
    }
7824
 
553 chandransh 7825
    public int compareTo(getUserState_result other) {
48 ashish 7826
      if (!getClass().equals(other.getClass())) {
7827
        return getClass().getName().compareTo(other.getClass().getName());
7828
      }
7829
 
7830
      int lastComparison = 0;
553 chandransh 7831
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 7832
 
7833
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7834
      if (lastComparison != 0) {
7835
        return lastComparison;
7836
      }
7837
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7838
      if (lastComparison != 0) {
7839
        return lastComparison;
7840
      }
553 chandransh 7841
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 7842
      if (lastComparison != 0) {
7843
        return lastComparison;
7844
      }
553 chandransh 7845
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 7846
      if (lastComparison != 0) {
7847
        return lastComparison;
7848
      }
7849
      return 0;
7850
    }
7851
 
7852
    public void read(TProtocol iprot) throws TException {
7853
      TField field;
7854
      iprot.readStructBegin();
7855
      while (true)
7856
      {
7857
        field = iprot.readFieldBegin();
7858
        if (field.type == TType.STOP) { 
7859
          break;
7860
        }
7861
        _Fields fieldId = _Fields.findByThriftId(field.id);
7862
        if (fieldId == null) {
7863
          TProtocolUtil.skip(iprot, field.type);
7864
        } else {
7865
          switch (fieldId) {
7866
            case SUCCESS:
7867
              if (field.type == TType.STRUCT) {
553 chandransh 7868
                this.success = new UserState();
48 ashish 7869
                this.success.read(iprot);
7870
              } else { 
7871
                TProtocolUtil.skip(iprot, field.type);
7872
              }
7873
              break;
553 chandransh 7874
            case UCEX:
48 ashish 7875
              if (field.type == TType.STRUCT) {
553 chandransh 7876
                this.ucex = new UserContextException();
7877
                this.ucex.read(iprot);
48 ashish 7878
              } else { 
7879
                TProtocolUtil.skip(iprot, field.type);
7880
              }
7881
              break;
7882
          }
7883
          iprot.readFieldEnd();
7884
        }
7885
      }
7886
      iprot.readStructEnd();
7887
      validate();
7888
    }
7889
 
7890
    public void write(TProtocol oprot) throws TException {
7891
      oprot.writeStructBegin(STRUCT_DESC);
7892
 
7893
      if (this.isSetSuccess()) {
7894
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7895
        this.success.write(oprot);
7896
        oprot.writeFieldEnd();
553 chandransh 7897
      } else if (this.isSetUcex()) {
7898
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7899
        this.ucex.write(oprot);
48 ashish 7900
        oprot.writeFieldEnd();
7901
      }
7902
      oprot.writeFieldStop();
7903
      oprot.writeStructEnd();
7904
    }
7905
 
7906
    @Override
7907
    public String toString() {
553 chandransh 7908
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 7909
      boolean first = true;
7910
 
7911
      sb.append("success:");
7912
      if (this.success == null) {
7913
        sb.append("null");
7914
      } else {
7915
        sb.append(this.success);
7916
      }
7917
      first = false;
7918
      if (!first) sb.append(", ");
553 chandransh 7919
      sb.append("ucex:");
7920
      if (this.ucex == null) {
48 ashish 7921
        sb.append("null");
7922
      } else {
553 chandransh 7923
        sb.append(this.ucex);
48 ashish 7924
      }
7925
      first = false;
7926
      sb.append(")");
7927
      return sb.toString();
7928
    }
7929
 
7930
    public void validate() throws TException {
7931
      // check for required fields
7932
    }
7933
 
7934
  }
7935
 
553 chandransh 7936
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
7937
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 7938
 
7939
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7940
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7941
 
7942
    private String email;
7943
    private String password;
7944
 
7945
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7946
    public enum _Fields implements TFieldIdEnum {
7947
      EMAIL((short)1, "email"),
7948
      PASSWORD((short)2, "password");
7949
 
7950
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7952
 
7953
      static {
7954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7955
          byId.put((int)field._thriftId, field);
7956
          byName.put(field.getFieldName(), field);
7957
        }
7958
      }
7959
 
7960
      /**
7961
       * Find the _Fields constant that matches fieldId, or null if its not found.
7962
       */
7963
      public static _Fields findByThriftId(int fieldId) {
7964
        return byId.get(fieldId);
7965
      }
7966
 
7967
      /**
7968
       * Find the _Fields constant that matches fieldId, throwing an exception
7969
       * if it is not found.
7970
       */
7971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7972
        _Fields fields = findByThriftId(fieldId);
7973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7974
        return fields;
7975
      }
7976
 
7977
      /**
7978
       * Find the _Fields constant that matches name, or null if its not found.
7979
       */
7980
      public static _Fields findByName(String name) {
7981
        return byName.get(name);
7982
      }
7983
 
7984
      private final short _thriftId;
7985
      private final String _fieldName;
7986
 
7987
      _Fields(short thriftId, String fieldName) {
7988
        _thriftId = thriftId;
7989
        _fieldName = fieldName;
7990
      }
7991
 
7992
      public short getThriftFieldId() {
7993
        return _thriftId;
7994
      }
7995
 
7996
      public String getFieldName() {
7997
        return _fieldName;
7998
      }
7999
    }
8000
 
8001
    // isset id assignments
8002
 
8003
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8004
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
8005
          new FieldValueMetaData(TType.STRING)));
8006
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
8007
          new FieldValueMetaData(TType.STRING)));
8008
    }});
8009
 
8010
    static {
553 chandransh 8011
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 8012
    }
8013
 
553 chandransh 8014
    public authenticateUser_args() {
48 ashish 8015
    }
8016
 
553 chandransh 8017
    public authenticateUser_args(
48 ashish 8018
      String email,
8019
      String password)
8020
    {
8021
      this();
8022
      this.email = email;
8023
      this.password = password;
8024
    }
8025
 
8026
    /**
8027
     * Performs a deep copy on <i>other</i>.
8028
     */
553 chandransh 8029
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 8030
      if (other.isSetEmail()) {
8031
        this.email = other.email;
8032
      }
8033
      if (other.isSetPassword()) {
8034
        this.password = other.password;
8035
      }
8036
    }
8037
 
553 chandransh 8038
    public authenticateUser_args deepCopy() {
8039
      return new authenticateUser_args(this);
48 ashish 8040
    }
8041
 
8042
    @Deprecated
553 chandransh 8043
    public authenticateUser_args clone() {
8044
      return new authenticateUser_args(this);
48 ashish 8045
    }
8046
 
8047
    public String getEmail() {
8048
      return this.email;
8049
    }
8050
 
553 chandransh 8051
    public authenticateUser_args setEmail(String email) {
48 ashish 8052
      this.email = email;
8053
      return this;
8054
    }
8055
 
8056
    public void unsetEmail() {
8057
      this.email = null;
8058
    }
8059
 
8060
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
8061
    public boolean isSetEmail() {
8062
      return this.email != null;
8063
    }
8064
 
8065
    public void setEmailIsSet(boolean value) {
8066
      if (!value) {
8067
        this.email = null;
8068
      }
8069
    }
8070
 
8071
    public String getPassword() {
8072
      return this.password;
8073
    }
8074
 
553 chandransh 8075
    public authenticateUser_args setPassword(String password) {
48 ashish 8076
      this.password = password;
8077
      return this;
8078
    }
8079
 
8080
    public void unsetPassword() {
8081
      this.password = null;
8082
    }
8083
 
8084
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
8085
    public boolean isSetPassword() {
8086
      return this.password != null;
8087
    }
8088
 
8089
    public void setPasswordIsSet(boolean value) {
8090
      if (!value) {
8091
        this.password = null;
8092
      }
8093
    }
8094
 
8095
    public void setFieldValue(_Fields field, Object value) {
8096
      switch (field) {
8097
      case EMAIL:
8098
        if (value == null) {
8099
          unsetEmail();
8100
        } else {
8101
          setEmail((String)value);
8102
        }
8103
        break;
8104
 
8105
      case PASSWORD:
8106
        if (value == null) {
8107
          unsetPassword();
8108
        } else {
8109
          setPassword((String)value);
8110
        }
8111
        break;
8112
 
8113
      }
8114
    }
8115
 
8116
    public void setFieldValue(int fieldID, Object value) {
8117
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8118
    }
8119
 
8120
    public Object getFieldValue(_Fields field) {
8121
      switch (field) {
8122
      case EMAIL:
8123
        return getEmail();
8124
 
8125
      case PASSWORD:
8126
        return getPassword();
8127
 
8128
      }
8129
      throw new IllegalStateException();
8130
    }
8131
 
8132
    public Object getFieldValue(int fieldId) {
8133
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8134
    }
8135
 
8136
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8137
    public boolean isSet(_Fields field) {
8138
      switch (field) {
8139
      case EMAIL:
8140
        return isSetEmail();
8141
      case PASSWORD:
8142
        return isSetPassword();
8143
      }
8144
      throw new IllegalStateException();
8145
    }
8146
 
8147
    public boolean isSet(int fieldID) {
8148
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8149
    }
8150
 
8151
    @Override
8152
    public boolean equals(Object that) {
8153
      if (that == null)
8154
        return false;
553 chandransh 8155
      if (that instanceof authenticateUser_args)
8156
        return this.equals((authenticateUser_args)that);
48 ashish 8157
      return false;
8158
    }
8159
 
553 chandransh 8160
    public boolean equals(authenticateUser_args that) {
48 ashish 8161
      if (that == null)
8162
        return false;
8163
 
8164
      boolean this_present_email = true && this.isSetEmail();
8165
      boolean that_present_email = true && that.isSetEmail();
8166
      if (this_present_email || that_present_email) {
8167
        if (!(this_present_email && that_present_email))
8168
          return false;
8169
        if (!this.email.equals(that.email))
8170
          return false;
8171
      }
8172
 
8173
      boolean this_present_password = true && this.isSetPassword();
8174
      boolean that_present_password = true && that.isSetPassword();
8175
      if (this_present_password || that_present_password) {
8176
        if (!(this_present_password && that_present_password))
8177
          return false;
8178
        if (!this.password.equals(that.password))
8179
          return false;
8180
      }
8181
 
8182
      return true;
8183
    }
8184
 
8185
    @Override
8186
    public int hashCode() {
8187
      return 0;
8188
    }
8189
 
553 chandransh 8190
    public int compareTo(authenticateUser_args other) {
48 ashish 8191
      if (!getClass().equals(other.getClass())) {
8192
        return getClass().getName().compareTo(other.getClass().getName());
8193
      }
8194
 
8195
      int lastComparison = 0;
553 chandransh 8196
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 8197
 
8198
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8199
      if (lastComparison != 0) {
8200
        return lastComparison;
8201
      }
8202
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8203
      if (lastComparison != 0) {
8204
        return lastComparison;
8205
      }
8206
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
8207
      if (lastComparison != 0) {
8208
        return lastComparison;
8209
      }
8210
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
8211
      if (lastComparison != 0) {
8212
        return lastComparison;
8213
      }
8214
      return 0;
8215
    }
8216
 
8217
    public void read(TProtocol iprot) throws TException {
8218
      TField field;
8219
      iprot.readStructBegin();
8220
      while (true)
8221
      {
8222
        field = iprot.readFieldBegin();
8223
        if (field.type == TType.STOP) { 
8224
          break;
8225
        }
8226
        _Fields fieldId = _Fields.findByThriftId(field.id);
8227
        if (fieldId == null) {
8228
          TProtocolUtil.skip(iprot, field.type);
8229
        } else {
8230
          switch (fieldId) {
8231
            case EMAIL:
8232
              if (field.type == TType.STRING) {
8233
                this.email = iprot.readString();
8234
              } else { 
8235
                TProtocolUtil.skip(iprot, field.type);
8236
              }
8237
              break;
8238
            case PASSWORD:
8239
              if (field.type == TType.STRING) {
8240
                this.password = iprot.readString();
8241
              } else { 
8242
                TProtocolUtil.skip(iprot, field.type);
8243
              }
8244
              break;
8245
          }
8246
          iprot.readFieldEnd();
8247
        }
8248
      }
8249
      iprot.readStructEnd();
8250
      validate();
8251
    }
8252
 
8253
    public void write(TProtocol oprot) throws TException {
8254
      validate();
8255
 
8256
      oprot.writeStructBegin(STRUCT_DESC);
8257
      if (this.email != null) {
8258
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8259
        oprot.writeString(this.email);
8260
        oprot.writeFieldEnd();
8261
      }
8262
      if (this.password != null) {
8263
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
8264
        oprot.writeString(this.password);
8265
        oprot.writeFieldEnd();
8266
      }
8267
      oprot.writeFieldStop();
8268
      oprot.writeStructEnd();
8269
    }
8270
 
8271
    @Override
8272
    public String toString() {
553 chandransh 8273
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 8274
      boolean first = true;
8275
 
8276
      sb.append("email:");
8277
      if (this.email == null) {
8278
        sb.append("null");
8279
      } else {
8280
        sb.append(this.email);
8281
      }
8282
      first = false;
8283
      if (!first) sb.append(", ");
8284
      sb.append("password:");
8285
      if (this.password == null) {
8286
        sb.append("null");
8287
      } else {
8288
        sb.append(this.password);
8289
      }
8290
      first = false;
8291
      sb.append(")");
8292
      return sb.toString();
8293
    }
8294
 
8295
    public void validate() throws TException {
8296
      // check for required fields
8297
    }
8298
 
8299
  }
8300
 
571 rajveer 8301
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 8302
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 8303
 
8304
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 8305
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 8306
 
553 chandransh 8307
    private User success;
8308
    private AuthenticationException auex;
48 ashish 8309
 
8310
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8311
    public enum _Fields implements TFieldIdEnum {
8312
      SUCCESS((short)0, "success"),
553 chandransh 8313
      AUEX((short)1, "auex");
48 ashish 8314
 
8315
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8316
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8317
 
8318
      static {
8319
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8320
          byId.put((int)field._thriftId, field);
8321
          byName.put(field.getFieldName(), field);
8322
        }
8323
      }
8324
 
8325
      /**
8326
       * Find the _Fields constant that matches fieldId, or null if its not found.
8327
       */
8328
      public static _Fields findByThriftId(int fieldId) {
8329
        return byId.get(fieldId);
8330
      }
8331
 
8332
      /**
8333
       * Find the _Fields constant that matches fieldId, throwing an exception
8334
       * if it is not found.
8335
       */
8336
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8337
        _Fields fields = findByThriftId(fieldId);
8338
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8339
        return fields;
8340
      }
8341
 
8342
      /**
8343
       * Find the _Fields constant that matches name, or null if its not found.
8344
       */
8345
      public static _Fields findByName(String name) {
8346
        return byName.get(name);
8347
      }
8348
 
8349
      private final short _thriftId;
8350
      private final String _fieldName;
8351
 
8352
      _Fields(short thriftId, String fieldName) {
8353
        _thriftId = thriftId;
8354
        _fieldName = fieldName;
8355
      }
8356
 
8357
      public short getThriftFieldId() {
8358
        return _thriftId;
8359
      }
8360
 
8361
      public String getFieldName() {
8362
        return _fieldName;
8363
      }
8364
    }
8365
 
8366
    // isset id assignments
8367
 
8368
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8369
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 8370
          new StructMetaData(TType.STRUCT, User.class)));
8371
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 8372
          new FieldValueMetaData(TType.STRUCT)));
8373
    }});
8374
 
8375
    static {
553 chandransh 8376
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 8377
    }
8378
 
553 chandransh 8379
    public authenticateUser_result() {
48 ashish 8380
    }
8381
 
553 chandransh 8382
    public authenticateUser_result(
8383
      User success,
8384
      AuthenticationException auex)
48 ashish 8385
    {
8386
      this();
8387
      this.success = success;
553 chandransh 8388
      this.auex = auex;
48 ashish 8389
    }
8390
 
8391
    /**
8392
     * Performs a deep copy on <i>other</i>.
8393
     */
553 chandransh 8394
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 8395
      if (other.isSetSuccess()) {
553 chandransh 8396
        this.success = new User(other.success);
48 ashish 8397
      }
553 chandransh 8398
      if (other.isSetAuex()) {
8399
        this.auex = new AuthenticationException(other.auex);
48 ashish 8400
      }
8401
    }
8402
 
553 chandransh 8403
    public authenticateUser_result deepCopy() {
8404
      return new authenticateUser_result(this);
48 ashish 8405
    }
8406
 
8407
    @Deprecated
553 chandransh 8408
    public authenticateUser_result clone() {
8409
      return new authenticateUser_result(this);
48 ashish 8410
    }
8411
 
553 chandransh 8412
    public User getSuccess() {
48 ashish 8413
      return this.success;
8414
    }
8415
 
553 chandransh 8416
    public authenticateUser_result setSuccess(User success) {
48 ashish 8417
      this.success = success;
8418
      return this;
8419
    }
8420
 
8421
    public void unsetSuccess() {
8422
      this.success = null;
8423
    }
8424
 
8425
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8426
    public boolean isSetSuccess() {
8427
      return this.success != null;
8428
    }
8429
 
8430
    public void setSuccessIsSet(boolean value) {
8431
      if (!value) {
8432
        this.success = null;
8433
      }
8434
    }
8435
 
553 chandransh 8436
    public AuthenticationException getAuex() {
8437
      return this.auex;
48 ashish 8438
    }
8439
 
553 chandransh 8440
    public authenticateUser_result setAuex(AuthenticationException auex) {
8441
      this.auex = auex;
48 ashish 8442
      return this;
8443
    }
8444
 
553 chandransh 8445
    public void unsetAuex() {
8446
      this.auex = null;
48 ashish 8447
    }
8448
 
553 chandransh 8449
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
8450
    public boolean isSetAuex() {
8451
      return this.auex != null;
48 ashish 8452
    }
8453
 
553 chandransh 8454
    public void setAuexIsSet(boolean value) {
48 ashish 8455
      if (!value) {
553 chandransh 8456
        this.auex = null;
48 ashish 8457
      }
8458
    }
8459
 
8460
    public void setFieldValue(_Fields field, Object value) {
8461
      switch (field) {
8462
      case SUCCESS:
8463
        if (value == null) {
8464
          unsetSuccess();
8465
        } else {
553 chandransh 8466
          setSuccess((User)value);
48 ashish 8467
        }
8468
        break;
8469
 
553 chandransh 8470
      case AUEX:
48 ashish 8471
        if (value == null) {
553 chandransh 8472
          unsetAuex();
48 ashish 8473
        } else {
553 chandransh 8474
          setAuex((AuthenticationException)value);
48 ashish 8475
        }
8476
        break;
8477
 
8478
      }
8479
    }
8480
 
8481
    public void setFieldValue(int fieldID, Object value) {
8482
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8483
    }
8484
 
8485
    public Object getFieldValue(_Fields field) {
8486
      switch (field) {
8487
      case SUCCESS:
8488
        return getSuccess();
8489
 
553 chandransh 8490
      case AUEX:
8491
        return getAuex();
48 ashish 8492
 
8493
      }
8494
      throw new IllegalStateException();
8495
    }
8496
 
8497
    public Object getFieldValue(int fieldId) {
8498
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8499
    }
8500
 
8501
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8502
    public boolean isSet(_Fields field) {
8503
      switch (field) {
8504
      case SUCCESS:
8505
        return isSetSuccess();
553 chandransh 8506
      case AUEX:
8507
        return isSetAuex();
48 ashish 8508
      }
8509
      throw new IllegalStateException();
8510
    }
8511
 
8512
    public boolean isSet(int fieldID) {
8513
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8514
    }
8515
 
8516
    @Override
8517
    public boolean equals(Object that) {
8518
      if (that == null)
8519
        return false;
553 chandransh 8520
      if (that instanceof authenticateUser_result)
8521
        return this.equals((authenticateUser_result)that);
48 ashish 8522
      return false;
8523
    }
8524
 
553 chandransh 8525
    public boolean equals(authenticateUser_result that) {
48 ashish 8526
      if (that == null)
8527
        return false;
8528
 
8529
      boolean this_present_success = true && this.isSetSuccess();
8530
      boolean that_present_success = true && that.isSetSuccess();
8531
      if (this_present_success || that_present_success) {
8532
        if (!(this_present_success && that_present_success))
8533
          return false;
8534
        if (!this.success.equals(that.success))
8535
          return false;
8536
      }
8537
 
553 chandransh 8538
      boolean this_present_auex = true && this.isSetAuex();
8539
      boolean that_present_auex = true && that.isSetAuex();
8540
      if (this_present_auex || that_present_auex) {
8541
        if (!(this_present_auex && that_present_auex))
48 ashish 8542
          return false;
553 chandransh 8543
        if (!this.auex.equals(that.auex))
48 ashish 8544
          return false;
8545
      }
8546
 
8547
      return true;
8548
    }
8549
 
8550
    @Override
8551
    public int hashCode() {
8552
      return 0;
8553
    }
8554
 
571 rajveer 8555
    public int compareTo(authenticateUser_result other) {
8556
      if (!getClass().equals(other.getClass())) {
8557
        return getClass().getName().compareTo(other.getClass().getName());
8558
      }
8559
 
8560
      int lastComparison = 0;
8561
      authenticateUser_result typedOther = (authenticateUser_result)other;
8562
 
8563
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8564
      if (lastComparison != 0) {
8565
        return lastComparison;
8566
      }
8567
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8568
      if (lastComparison != 0) {
8569
        return lastComparison;
8570
      }
8571
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
8572
      if (lastComparison != 0) {
8573
        return lastComparison;
8574
      }
8575
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
8576
      if (lastComparison != 0) {
8577
        return lastComparison;
8578
      }
8579
      return 0;
8580
    }
8581
 
48 ashish 8582
    public void read(TProtocol iprot) throws TException {
8583
      TField field;
8584
      iprot.readStructBegin();
8585
      while (true)
8586
      {
8587
        field = iprot.readFieldBegin();
8588
        if (field.type == TType.STOP) { 
8589
          break;
8590
        }
8591
        _Fields fieldId = _Fields.findByThriftId(field.id);
8592
        if (fieldId == null) {
8593
          TProtocolUtil.skip(iprot, field.type);
8594
        } else {
8595
          switch (fieldId) {
8596
            case SUCCESS:
8597
              if (field.type == TType.STRUCT) {
553 chandransh 8598
                this.success = new User();
48 ashish 8599
                this.success.read(iprot);
8600
              } else { 
8601
                TProtocolUtil.skip(iprot, field.type);
8602
              }
8603
              break;
553 chandransh 8604
            case AUEX:
48 ashish 8605
              if (field.type == TType.STRUCT) {
553 chandransh 8606
                this.auex = new AuthenticationException();
8607
                this.auex.read(iprot);
48 ashish 8608
              } else { 
8609
                TProtocolUtil.skip(iprot, field.type);
8610
              }
8611
              break;
8612
          }
8613
          iprot.readFieldEnd();
8614
        }
8615
      }
8616
      iprot.readStructEnd();
8617
      validate();
8618
    }
8619
 
8620
    public void write(TProtocol oprot) throws TException {
8621
      oprot.writeStructBegin(STRUCT_DESC);
8622
 
8623
      if (this.isSetSuccess()) {
8624
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8625
        this.success.write(oprot);
8626
        oprot.writeFieldEnd();
553 chandransh 8627
      } else if (this.isSetAuex()) {
8628
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
8629
        this.auex.write(oprot);
48 ashish 8630
        oprot.writeFieldEnd();
8631
      }
8632
      oprot.writeFieldStop();
8633
      oprot.writeStructEnd();
8634
    }
8635
 
8636
    @Override
8637
    public String toString() {
553 chandransh 8638
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 8639
      boolean first = true;
8640
 
8641
      sb.append("success:");
8642
      if (this.success == null) {
8643
        sb.append("null");
8644
      } else {
8645
        sb.append(this.success);
8646
      }
8647
      first = false;
8648
      if (!first) sb.append(", ");
553 chandransh 8649
      sb.append("auex:");
8650
      if (this.auex == null) {
48 ashish 8651
        sb.append("null");
8652
      } else {
553 chandransh 8653
        sb.append(this.auex);
48 ashish 8654
      }
8655
      first = false;
8656
      sb.append(")");
8657
      return sb.toString();
8658
    }
8659
 
8660
    public void validate() throws TException {
8661
      // check for required fields
8662
    }
8663
 
8664
  }
8665
 
553 chandransh 8666
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
8667
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 8668
 
553 chandransh 8669
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 8670
 
553 chandransh 8671
    private String email;
123 ashish 8672
 
8673
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8674
    public enum _Fields implements TFieldIdEnum {
553 chandransh 8675
      EMAIL((short)1, "email");
123 ashish 8676
 
8677
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8678
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8679
 
8680
      static {
8681
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8682
          byId.put((int)field._thriftId, field);
8683
          byName.put(field.getFieldName(), field);
8684
        }
8685
      }
8686
 
8687
      /**
8688
       * Find the _Fields constant that matches fieldId, or null if its not found.
8689
       */
8690
      public static _Fields findByThriftId(int fieldId) {
8691
        return byId.get(fieldId);
8692
      }
8693
 
8694
      /**
8695
       * Find the _Fields constant that matches fieldId, throwing an exception
8696
       * if it is not found.
8697
       */
8698
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8699
        _Fields fields = findByThriftId(fieldId);
8700
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8701
        return fields;
8702
      }
8703
 
8704
      /**
8705
       * Find the _Fields constant that matches name, or null if its not found.
8706
       */
8707
      public static _Fields findByName(String name) {
8708
        return byName.get(name);
8709
      }
8710
 
8711
      private final short _thriftId;
8712
      private final String _fieldName;
8713
 
8714
      _Fields(short thriftId, String fieldName) {
8715
        _thriftId = thriftId;
8716
        _fieldName = fieldName;
8717
      }
8718
 
8719
      public short getThriftFieldId() {
8720
        return _thriftId;
8721
      }
8722
 
8723
      public String getFieldName() {
8724
        return _fieldName;
8725
      }
8726
    }
8727
 
8728
    // isset id assignments
553 chandransh 8729
 
8730
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8731
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
8732
          new FieldValueMetaData(TType.STRING)));
8733
    }});
8734
 
8735
    static {
8736
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
8737
    }
8738
 
8739
    public userExists_args() {
8740
    }
8741
 
8742
    public userExists_args(
8743
      String email)
8744
    {
8745
      this();
8746
      this.email = email;
8747
    }
8748
 
8749
    /**
8750
     * Performs a deep copy on <i>other</i>.
8751
     */
8752
    public userExists_args(userExists_args other) {
8753
      if (other.isSetEmail()) {
8754
        this.email = other.email;
8755
      }
8756
    }
8757
 
8758
    public userExists_args deepCopy() {
8759
      return new userExists_args(this);
8760
    }
8761
 
8762
    @Deprecated
8763
    public userExists_args clone() {
8764
      return new userExists_args(this);
8765
    }
8766
 
8767
    public String getEmail() {
8768
      return this.email;
8769
    }
8770
 
8771
    public userExists_args setEmail(String email) {
8772
      this.email = email;
8773
      return this;
8774
    }
8775
 
8776
    public void unsetEmail() {
8777
      this.email = null;
8778
    }
8779
 
8780
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
8781
    public boolean isSetEmail() {
8782
      return this.email != null;
8783
    }
8784
 
8785
    public void setEmailIsSet(boolean value) {
8786
      if (!value) {
8787
        this.email = null;
8788
      }
8789
    }
8790
 
8791
    public void setFieldValue(_Fields field, Object value) {
8792
      switch (field) {
8793
      case EMAIL:
8794
        if (value == null) {
8795
          unsetEmail();
8796
        } else {
8797
          setEmail((String)value);
8798
        }
8799
        break;
8800
 
8801
      }
8802
    }
8803
 
8804
    public void setFieldValue(int fieldID, Object value) {
8805
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8806
    }
8807
 
8808
    public Object getFieldValue(_Fields field) {
8809
      switch (field) {
8810
      case EMAIL:
8811
        return getEmail();
8812
 
8813
      }
8814
      throw new IllegalStateException();
8815
    }
8816
 
8817
    public Object getFieldValue(int fieldId) {
8818
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8819
    }
8820
 
8821
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8822
    public boolean isSet(_Fields field) {
8823
      switch (field) {
8824
      case EMAIL:
8825
        return isSetEmail();
8826
      }
8827
      throw new IllegalStateException();
8828
    }
8829
 
8830
    public boolean isSet(int fieldID) {
8831
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8832
    }
8833
 
8834
    @Override
8835
    public boolean equals(Object that) {
8836
      if (that == null)
8837
        return false;
8838
      if (that instanceof userExists_args)
8839
        return this.equals((userExists_args)that);
8840
      return false;
8841
    }
8842
 
8843
    public boolean equals(userExists_args that) {
8844
      if (that == null)
8845
        return false;
8846
 
8847
      boolean this_present_email = true && this.isSetEmail();
8848
      boolean that_present_email = true && that.isSetEmail();
8849
      if (this_present_email || that_present_email) {
8850
        if (!(this_present_email && that_present_email))
8851
          return false;
8852
        if (!this.email.equals(that.email))
8853
          return false;
8854
      }
8855
 
8856
      return true;
8857
    }
8858
 
8859
    @Override
8860
    public int hashCode() {
8861
      return 0;
8862
    }
8863
 
8864
    public int compareTo(userExists_args other) {
8865
      if (!getClass().equals(other.getClass())) {
8866
        return getClass().getName().compareTo(other.getClass().getName());
8867
      }
8868
 
8869
      int lastComparison = 0;
8870
      userExists_args typedOther = (userExists_args)other;
8871
 
8872
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8873
      if (lastComparison != 0) {
8874
        return lastComparison;
8875
      }
8876
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8877
      if (lastComparison != 0) {
8878
        return lastComparison;
8879
      }
8880
      return 0;
8881
    }
8882
 
8883
    public void read(TProtocol iprot) throws TException {
8884
      TField field;
8885
      iprot.readStructBegin();
8886
      while (true)
8887
      {
8888
        field = iprot.readFieldBegin();
8889
        if (field.type == TType.STOP) { 
8890
          break;
8891
        }
8892
        _Fields fieldId = _Fields.findByThriftId(field.id);
8893
        if (fieldId == null) {
8894
          TProtocolUtil.skip(iprot, field.type);
8895
        } else {
8896
          switch (fieldId) {
8897
            case EMAIL:
8898
              if (field.type == TType.STRING) {
8899
                this.email = iprot.readString();
8900
              } else { 
8901
                TProtocolUtil.skip(iprot, field.type);
8902
              }
8903
              break;
8904
          }
8905
          iprot.readFieldEnd();
8906
        }
8907
      }
8908
      iprot.readStructEnd();
8909
      validate();
8910
    }
8911
 
8912
    public void write(TProtocol oprot) throws TException {
8913
      validate();
8914
 
8915
      oprot.writeStructBegin(STRUCT_DESC);
8916
      if (this.email != null) {
8917
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8918
        oprot.writeString(this.email);
8919
        oprot.writeFieldEnd();
8920
      }
8921
      oprot.writeFieldStop();
8922
      oprot.writeStructEnd();
8923
    }
8924
 
8925
    @Override
8926
    public String toString() {
8927
      StringBuilder sb = new StringBuilder("userExists_args(");
8928
      boolean first = true;
8929
 
8930
      sb.append("email:");
8931
      if (this.email == null) {
8932
        sb.append("null");
8933
      } else {
8934
        sb.append(this.email);
8935
      }
8936
      first = false;
8937
      sb.append(")");
8938
      return sb.toString();
8939
    }
8940
 
8941
    public void validate() throws TException {
8942
      // check for required fields
8943
    }
8944
 
8945
  }
8946
 
8947
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
8948
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
8949
 
8950
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8951
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8952
 
8953
    private boolean success;
8954
    private UserContextException ucx;
8955
 
8956
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8957
    public enum _Fields implements TFieldIdEnum {
8958
      SUCCESS((short)0, "success"),
8959
      UCX((short)1, "ucx");
8960
 
8961
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8962
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8963
 
8964
      static {
8965
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8966
          byId.put((int)field._thriftId, field);
8967
          byName.put(field.getFieldName(), field);
8968
        }
8969
      }
8970
 
8971
      /**
8972
       * Find the _Fields constant that matches fieldId, or null if its not found.
8973
       */
8974
      public static _Fields findByThriftId(int fieldId) {
8975
        return byId.get(fieldId);
8976
      }
8977
 
8978
      /**
8979
       * Find the _Fields constant that matches fieldId, throwing an exception
8980
       * if it is not found.
8981
       */
8982
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8983
        _Fields fields = findByThriftId(fieldId);
8984
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8985
        return fields;
8986
      }
8987
 
8988
      /**
8989
       * Find the _Fields constant that matches name, or null if its not found.
8990
       */
8991
      public static _Fields findByName(String name) {
8992
        return byName.get(name);
8993
      }
8994
 
8995
      private final short _thriftId;
8996
      private final String _fieldName;
8997
 
8998
      _Fields(short thriftId, String fieldName) {
8999
        _thriftId = thriftId;
9000
        _fieldName = fieldName;
9001
      }
9002
 
9003
      public short getThriftFieldId() {
9004
        return _thriftId;
9005
      }
9006
 
9007
      public String getFieldName() {
9008
        return _fieldName;
9009
      }
9010
    }
9011
 
9012
    // isset id assignments
9013
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 9014
    private BitSet __isset_bit_vector = new BitSet(1);
9015
 
9016
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9017
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 9018
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 9019
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9020
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 9021
    }});
9022
 
9023
    static {
553 chandransh 9024
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 9025
    }
9026
 
553 chandransh 9027
    public userExists_result() {
123 ashish 9028
    }
9029
 
553 chandransh 9030
    public userExists_result(
9031
      boolean success,
9032
      UserContextException ucx)
123 ashish 9033
    {
9034
      this();
553 chandransh 9035
      this.success = success;
9036
      setSuccessIsSet(true);
9037
      this.ucx = ucx;
123 ashish 9038
    }
9039
 
9040
    /**
9041
     * Performs a deep copy on <i>other</i>.
9042
     */
553 chandransh 9043
    public userExists_result(userExists_result other) {
123 ashish 9044
      __isset_bit_vector.clear();
9045
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 9046
      this.success = other.success;
9047
      if (other.isSetUcx()) {
9048
        this.ucx = new UserContextException(other.ucx);
123 ashish 9049
      }
9050
    }
9051
 
553 chandransh 9052
    public userExists_result deepCopy() {
9053
      return new userExists_result(this);
123 ashish 9054
    }
9055
 
9056
    @Deprecated
553 chandransh 9057
    public userExists_result clone() {
9058
      return new userExists_result(this);
123 ashish 9059
    }
9060
 
553 chandransh 9061
    public boolean isSuccess() {
9062
      return this.success;
123 ashish 9063
    }
9064
 
553 chandransh 9065
    public userExists_result setSuccess(boolean success) {
9066
      this.success = success;
9067
      setSuccessIsSet(true);
123 ashish 9068
      return this;
9069
    }
9070
 
553 chandransh 9071
    public void unsetSuccess() {
9072
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 9073
    }
9074
 
553 chandransh 9075
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9076
    public boolean isSetSuccess() {
9077
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 9078
    }
9079
 
553 chandransh 9080
    public void setSuccessIsSet(boolean value) {
9081
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9082
    }
9083
 
9084
    public UserContextException getUcx() {
9085
      return this.ucx;
9086
    }
9087
 
9088
    public userExists_result setUcx(UserContextException ucx) {
9089
      this.ucx = ucx;
9090
      return this;
9091
    }
9092
 
9093
    public void unsetUcx() {
9094
      this.ucx = null;
9095
    }
9096
 
9097
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9098
    public boolean isSetUcx() {
9099
      return this.ucx != null;
9100
    }
9101
 
9102
    public void setUcxIsSet(boolean value) {
123 ashish 9103
      if (!value) {
553 chandransh 9104
        this.ucx = null;
123 ashish 9105
      }
9106
    }
9107
 
553 chandransh 9108
    public void setFieldValue(_Fields field, Object value) {
9109
      switch (field) {
9110
      case SUCCESS:
9111
        if (value == null) {
9112
          unsetSuccess();
9113
        } else {
9114
          setSuccess((Boolean)value);
9115
        }
9116
        break;
9117
 
9118
      case UCX:
9119
        if (value == null) {
9120
          unsetUcx();
9121
        } else {
9122
          setUcx((UserContextException)value);
9123
        }
9124
        break;
9125
 
9126
      }
123 ashish 9127
    }
9128
 
553 chandransh 9129
    public void setFieldValue(int fieldID, Object value) {
9130
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9131
    }
9132
 
9133
    public Object getFieldValue(_Fields field) {
9134
      switch (field) {
9135
      case SUCCESS:
9136
        return new Boolean(isSuccess());
9137
 
9138
      case UCX:
9139
        return getUcx();
9140
 
9141
      }
9142
      throw new IllegalStateException();
9143
    }
9144
 
9145
    public Object getFieldValue(int fieldId) {
9146
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9147
    }
9148
 
9149
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9150
    public boolean isSet(_Fields field) {
9151
      switch (field) {
9152
      case SUCCESS:
9153
        return isSetSuccess();
9154
      case UCX:
9155
        return isSetUcx();
9156
      }
9157
      throw new IllegalStateException();
9158
    }
9159
 
9160
    public boolean isSet(int fieldID) {
9161
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9162
    }
9163
 
9164
    @Override
9165
    public boolean equals(Object that) {
9166
      if (that == null)
9167
        return false;
9168
      if (that instanceof userExists_result)
9169
        return this.equals((userExists_result)that);
9170
      return false;
9171
    }
9172
 
9173
    public boolean equals(userExists_result that) {
9174
      if (that == null)
9175
        return false;
9176
 
9177
      boolean this_present_success = true;
9178
      boolean that_present_success = true;
9179
      if (this_present_success || that_present_success) {
9180
        if (!(this_present_success && that_present_success))
9181
          return false;
9182
        if (this.success != that.success)
9183
          return false;
9184
      }
9185
 
9186
      boolean this_present_ucx = true && this.isSetUcx();
9187
      boolean that_present_ucx = true && that.isSetUcx();
9188
      if (this_present_ucx || that_present_ucx) {
9189
        if (!(this_present_ucx && that_present_ucx))
9190
          return false;
9191
        if (!this.ucx.equals(that.ucx))
9192
          return false;
9193
      }
9194
 
9195
      return true;
9196
    }
9197
 
9198
    @Override
9199
    public int hashCode() {
9200
      return 0;
9201
    }
9202
 
9203
    public int compareTo(userExists_result other) {
9204
      if (!getClass().equals(other.getClass())) {
9205
        return getClass().getName().compareTo(other.getClass().getName());
9206
      }
9207
 
9208
      int lastComparison = 0;
9209
      userExists_result typedOther = (userExists_result)other;
9210
 
9211
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9212
      if (lastComparison != 0) {
9213
        return lastComparison;
9214
      }
9215
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9216
      if (lastComparison != 0) {
9217
        return lastComparison;
9218
      }
9219
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
9220
      if (lastComparison != 0) {
9221
        return lastComparison;
9222
      }
9223
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
9224
      if (lastComparison != 0) {
9225
        return lastComparison;
9226
      }
9227
      return 0;
9228
    }
9229
 
9230
    public void read(TProtocol iprot) throws TException {
9231
      TField field;
9232
      iprot.readStructBegin();
9233
      while (true)
9234
      {
9235
        field = iprot.readFieldBegin();
9236
        if (field.type == TType.STOP) { 
9237
          break;
9238
        }
9239
        _Fields fieldId = _Fields.findByThriftId(field.id);
9240
        if (fieldId == null) {
9241
          TProtocolUtil.skip(iprot, field.type);
9242
        } else {
9243
          switch (fieldId) {
9244
            case SUCCESS:
9245
              if (field.type == TType.BOOL) {
9246
                this.success = iprot.readBool();
9247
                setSuccessIsSet(true);
9248
              } else { 
9249
                TProtocolUtil.skip(iprot, field.type);
9250
              }
9251
              break;
9252
            case UCX:
9253
              if (field.type == TType.STRUCT) {
9254
                this.ucx = new UserContextException();
9255
                this.ucx.read(iprot);
9256
              } else { 
9257
                TProtocolUtil.skip(iprot, field.type);
9258
              }
9259
              break;
9260
          }
9261
          iprot.readFieldEnd();
9262
        }
9263
      }
9264
      iprot.readStructEnd();
9265
      validate();
9266
    }
9267
 
9268
    public void write(TProtocol oprot) throws TException {
9269
      oprot.writeStructBegin(STRUCT_DESC);
9270
 
9271
      if (this.isSetSuccess()) {
9272
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9273
        oprot.writeBool(this.success);
9274
        oprot.writeFieldEnd();
9275
      } else if (this.isSetUcx()) {
9276
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9277
        this.ucx.write(oprot);
9278
        oprot.writeFieldEnd();
9279
      }
9280
      oprot.writeFieldStop();
9281
      oprot.writeStructEnd();
9282
    }
9283
 
9284
    @Override
9285
    public String toString() {
9286
      StringBuilder sb = new StringBuilder("userExists_result(");
9287
      boolean first = true;
9288
 
9289
      sb.append("success:");
9290
      sb.append(this.success);
9291
      first = false;
9292
      if (!first) sb.append(", ");
9293
      sb.append("ucx:");
9294
      if (this.ucx == null) {
9295
        sb.append("null");
9296
      } else {
9297
        sb.append(this.ucx);
9298
      }
9299
      first = false;
9300
      sb.append(")");
9301
      return sb.toString();
9302
    }
9303
 
9304
    public void validate() throws TException {
9305
      // check for required fields
9306
    }
9307
 
9308
  }
9309
 
9310
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
9311
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
9312
 
9313
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
9314
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 9315
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 9316
 
9317
    private long userId;
9318
    private Address address;
9319
    private boolean setDefault;
9320
 
9321
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9322
    public enum _Fields implements TFieldIdEnum {
9323
      USER_ID((short)1, "userId"),
9324
      ADDRESS((short)2, "address"),
571 rajveer 9325
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 9326
 
9327
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9328
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9329
 
9330
      static {
9331
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9332
          byId.put((int)field._thriftId, field);
9333
          byName.put(field.getFieldName(), field);
9334
        }
9335
      }
9336
 
9337
      /**
9338
       * Find the _Fields constant that matches fieldId, or null if its not found.
9339
       */
9340
      public static _Fields findByThriftId(int fieldId) {
9341
        return byId.get(fieldId);
9342
      }
9343
 
9344
      /**
9345
       * Find the _Fields constant that matches fieldId, throwing an exception
9346
       * if it is not found.
9347
       */
9348
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9349
        _Fields fields = findByThriftId(fieldId);
9350
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9351
        return fields;
9352
      }
9353
 
9354
      /**
9355
       * Find the _Fields constant that matches name, or null if its not found.
9356
       */
9357
      public static _Fields findByName(String name) {
9358
        return byName.get(name);
9359
      }
9360
 
9361
      private final short _thriftId;
9362
      private final String _fieldName;
9363
 
9364
      _Fields(short thriftId, String fieldName) {
9365
        _thriftId = thriftId;
9366
        _fieldName = fieldName;
9367
      }
9368
 
9369
      public short getThriftFieldId() {
9370
        return _thriftId;
9371
      }
9372
 
9373
      public String getFieldName() {
9374
        return _fieldName;
9375
      }
9376
    }
9377
 
9378
    // isset id assignments
9379
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 9380
    private static final int __SETDEFAULT_ISSET_ID = 1;
9381
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 9382
 
9383
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9384
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
9385
          new FieldValueMetaData(TType.I64)));
9386
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
9387
          new StructMetaData(TType.STRUCT, Address.class)));
9388
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
9389
          new FieldValueMetaData(TType.BOOL)));
9390
    }});
9391
 
9392
    static {
9393
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
9394
    }
9395
 
9396
    public addAddressForUser_args() {
9397
    }
9398
 
9399
    public addAddressForUser_args(
9400
      long userId,
9401
      Address address,
9402
      boolean setDefault)
9403
    {
9404
      this();
9405
      this.userId = userId;
9406
      setUserIdIsSet(true);
9407
      this.address = address;
9408
      this.setDefault = setDefault;
9409
      setSetDefaultIsSet(true);
9410
    }
9411
 
9412
    /**
9413
     * Performs a deep copy on <i>other</i>.
9414
     */
9415
    public addAddressForUser_args(addAddressForUser_args other) {
9416
      __isset_bit_vector.clear();
9417
      __isset_bit_vector.or(other.__isset_bit_vector);
9418
      this.userId = other.userId;
9419
      if (other.isSetAddress()) {
9420
        this.address = new Address(other.address);
9421
      }
9422
      this.setDefault = other.setDefault;
9423
    }
9424
 
9425
    public addAddressForUser_args deepCopy() {
9426
      return new addAddressForUser_args(this);
9427
    }
9428
 
9429
    @Deprecated
9430
    public addAddressForUser_args clone() {
9431
      return new addAddressForUser_args(this);
9432
    }
9433
 
9434
    public long getUserId() {
9435
      return this.userId;
9436
    }
9437
 
9438
    public addAddressForUser_args setUserId(long userId) {
9439
      this.userId = userId;
9440
      setUserIdIsSet(true);
123 ashish 9441
      return this;
9442
    }
9443
 
553 chandransh 9444
    public void unsetUserId() {
9445
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 9446
    }
9447
 
553 chandransh 9448
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
9449
    public boolean isSetUserId() {
9450
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 9451
    }
9452
 
553 chandransh 9453
    public void setUserIdIsSet(boolean value) {
9454
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
9455
    }
9456
 
9457
    public Address getAddress() {
9458
      return this.address;
9459
    }
9460
 
9461
    public addAddressForUser_args setAddress(Address address) {
9462
      this.address = address;
9463
      return this;
9464
    }
9465
 
9466
    public void unsetAddress() {
9467
      this.address = null;
9468
    }
9469
 
9470
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
9471
    public boolean isSetAddress() {
9472
      return this.address != null;
9473
    }
9474
 
9475
    public void setAddressIsSet(boolean value) {
123 ashish 9476
      if (!value) {
553 chandransh 9477
        this.address = null;
123 ashish 9478
      }
9479
    }
9480
 
553 chandransh 9481
    public boolean isSetDefault() {
9482
      return this.setDefault;
9483
    }
9484
 
9485
    public addAddressForUser_args setSetDefault(boolean setDefault) {
9486
      this.setDefault = setDefault;
9487
      setSetDefaultIsSet(true);
9488
      return this;
9489
    }
9490
 
9491
    public void unsetSetDefault() {
9492
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
9493
    }
9494
 
9495
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
9496
    public boolean isSetSetDefault() {
9497
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
9498
    }
9499
 
9500
    public void setSetDefaultIsSet(boolean value) {
9501
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
9502
    }
9503
 
123 ashish 9504
    public void setFieldValue(_Fields field, Object value) {
9505
      switch (field) {
553 chandransh 9506
      case USER_ID:
123 ashish 9507
        if (value == null) {
553 chandransh 9508
          unsetUserId();
123 ashish 9509
        } else {
553 chandransh 9510
          setUserId((Long)value);
123 ashish 9511
        }
9512
        break;
9513
 
553 chandransh 9514
      case ADDRESS:
123 ashish 9515
        if (value == null) {
553 chandransh 9516
          unsetAddress();
123 ashish 9517
        } else {
553 chandransh 9518
          setAddress((Address)value);
123 ashish 9519
        }
9520
        break;
9521
 
553 chandransh 9522
      case SET_DEFAULT:
9523
        if (value == null) {
9524
          unsetSetDefault();
9525
        } else {
9526
          setSetDefault((Boolean)value);
9527
        }
9528
        break;
9529
 
123 ashish 9530
      }
9531
    }
9532
 
9533
    public void setFieldValue(int fieldID, Object value) {
9534
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9535
    }
9536
 
9537
    public Object getFieldValue(_Fields field) {
9538
      switch (field) {
553 chandransh 9539
      case USER_ID:
9540
        return new Long(getUserId());
123 ashish 9541
 
553 chandransh 9542
      case ADDRESS:
9543
        return getAddress();
123 ashish 9544
 
553 chandransh 9545
      case SET_DEFAULT:
9546
        return new Boolean(isSetDefault());
9547
 
123 ashish 9548
      }
9549
      throw new IllegalStateException();
9550
    }
9551
 
9552
    public Object getFieldValue(int fieldId) {
9553
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9554
    }
9555
 
9556
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9557
    public boolean isSet(_Fields field) {
9558
      switch (field) {
553 chandransh 9559
      case USER_ID:
9560
        return isSetUserId();
9561
      case ADDRESS:
9562
        return isSetAddress();
9563
      case SET_DEFAULT:
9564
        return isSetSetDefault();
123 ashish 9565
      }
9566
      throw new IllegalStateException();
9567
    }
9568
 
9569
    public boolean isSet(int fieldID) {
9570
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9571
    }
9572
 
9573
    @Override
9574
    public boolean equals(Object that) {
9575
      if (that == null)
9576
        return false;
553 chandransh 9577
      if (that instanceof addAddressForUser_args)
9578
        return this.equals((addAddressForUser_args)that);
123 ashish 9579
      return false;
9580
    }
9581
 
553 chandransh 9582
    public boolean equals(addAddressForUser_args that) {
123 ashish 9583
      if (that == null)
9584
        return false;
9585
 
553 chandransh 9586
      boolean this_present_userId = true;
9587
      boolean that_present_userId = true;
9588
      if (this_present_userId || that_present_userId) {
9589
        if (!(this_present_userId && that_present_userId))
123 ashish 9590
          return false;
553 chandransh 9591
        if (this.userId != that.userId)
123 ashish 9592
          return false;
9593
      }
9594
 
553 chandransh 9595
      boolean this_present_address = true && this.isSetAddress();
9596
      boolean that_present_address = true && that.isSetAddress();
9597
      if (this_present_address || that_present_address) {
9598
        if (!(this_present_address && that_present_address))
123 ashish 9599
          return false;
553 chandransh 9600
        if (!this.address.equals(that.address))
123 ashish 9601
          return false;
9602
      }
9603
 
553 chandransh 9604
      boolean this_present_setDefault = true;
9605
      boolean that_present_setDefault = true;
9606
      if (this_present_setDefault || that_present_setDefault) {
9607
        if (!(this_present_setDefault && that_present_setDefault))
9608
          return false;
9609
        if (this.setDefault != that.setDefault)
9610
          return false;
9611
      }
9612
 
123 ashish 9613
      return true;
9614
    }
9615
 
9616
    @Override
9617
    public int hashCode() {
9618
      return 0;
9619
    }
9620
 
553 chandransh 9621
    public int compareTo(addAddressForUser_args other) {
123 ashish 9622
      if (!getClass().equals(other.getClass())) {
9623
        return getClass().getName().compareTo(other.getClass().getName());
9624
      }
9625
 
9626
      int lastComparison = 0;
553 chandransh 9627
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 9628
 
553 chandransh 9629
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 9630
      if (lastComparison != 0) {
9631
        return lastComparison;
9632
      }
553 chandransh 9633
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 9634
      if (lastComparison != 0) {
9635
        return lastComparison;
9636
      }
553 chandransh 9637
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 9638
      if (lastComparison != 0) {
9639
        return lastComparison;
9640
      }
553 chandransh 9641
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 9642
      if (lastComparison != 0) {
9643
        return lastComparison;
9644
      }
553 chandransh 9645
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
9646
      if (lastComparison != 0) {
9647
        return lastComparison;
9648
      }
9649
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
9650
      if (lastComparison != 0) {
9651
        return lastComparison;
9652
      }
123 ashish 9653
      return 0;
9654
    }
9655
 
9656
    public void read(TProtocol iprot) throws TException {
9657
      TField field;
9658
      iprot.readStructBegin();
9659
      while (true)
9660
      {
9661
        field = iprot.readFieldBegin();
9662
        if (field.type == TType.STOP) { 
9663
          break;
9664
        }
9665
        _Fields fieldId = _Fields.findByThriftId(field.id);
9666
        if (fieldId == null) {
9667
          TProtocolUtil.skip(iprot, field.type);
9668
        } else {
9669
          switch (fieldId) {
553 chandransh 9670
            case USER_ID:
9671
              if (field.type == TType.I64) {
9672
                this.userId = iprot.readI64();
9673
                setUserIdIsSet(true);
123 ashish 9674
              } else { 
9675
                TProtocolUtil.skip(iprot, field.type);
9676
              }
9677
              break;
553 chandransh 9678
            case ADDRESS:
9679
              if (field.type == TType.STRUCT) {
9680
                this.address = new Address();
9681
                this.address.read(iprot);
123 ashish 9682
              } else { 
9683
                TProtocolUtil.skip(iprot, field.type);
9684
              }
9685
              break;
553 chandransh 9686
            case SET_DEFAULT:
123 ashish 9687
              if (field.type == TType.BOOL) {
553 chandransh 9688
                this.setDefault = iprot.readBool();
9689
                setSetDefaultIsSet(true);
123 ashish 9690
              } else { 
9691
                TProtocolUtil.skip(iprot, field.type);
9692
              }
9693
              break;
9694
          }
9695
          iprot.readFieldEnd();
9696
        }
9697
      }
9698
      iprot.readStructEnd();
9699
      validate();
9700
    }
9701
 
9702
    public void write(TProtocol oprot) throws TException {
9703
      validate();
9704
 
9705
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9706
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
9707
      oprot.writeI64(this.userId);
9708
      oprot.writeFieldEnd();
9709
      if (this.address != null) {
9710
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
9711
        this.address.write(oprot);
123 ashish 9712
        oprot.writeFieldEnd();
9713
      }
553 chandransh 9714
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
9715
      oprot.writeBool(this.setDefault);
9716
      oprot.writeFieldEnd();
123 ashish 9717
      oprot.writeFieldStop();
9718
      oprot.writeStructEnd();
9719
    }
9720
 
9721
    @Override
9722
    public String toString() {
553 chandransh 9723
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 9724
      boolean first = true;
9725
 
553 chandransh 9726
      sb.append("userId:");
9727
      sb.append(this.userId);
123 ashish 9728
      first = false;
9729
      if (!first) sb.append(", ");
553 chandransh 9730
      sb.append("address:");
9731
      if (this.address == null) {
123 ashish 9732
        sb.append("null");
9733
      } else {
553 chandransh 9734
        sb.append(this.address);
123 ashish 9735
      }
9736
      first = false;
9737
      if (!first) sb.append(", ");
553 chandransh 9738
      sb.append("setDefault:");
9739
      sb.append(this.setDefault);
9740
      first = false;
123 ashish 9741
      sb.append(")");
9742
      return sb.toString();
9743
    }
9744
 
9745
    public void validate() throws TException {
9746
      // check for required fields
9747
    }
9748
 
9749
  }
9750
 
553 chandransh 9751
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
9752
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 9753
 
571 rajveer 9754
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 9755
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 9756
 
571 rajveer 9757
    private long success;
553 chandransh 9758
    private UserContextException ucx;
123 ashish 9759
 
9760
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9761
    public enum _Fields implements TFieldIdEnum {
9762
      SUCCESS((short)0, "success"),
553 chandransh 9763
      UCX((short)1, "ucx");
123 ashish 9764
 
9765
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9766
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9767
 
9768
      static {
9769
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9770
          byId.put((int)field._thriftId, field);
9771
          byName.put(field.getFieldName(), field);
9772
        }
9773
      }
9774
 
9775
      /**
9776
       * Find the _Fields constant that matches fieldId, or null if its not found.
9777
       */
9778
      public static _Fields findByThriftId(int fieldId) {
9779
        return byId.get(fieldId);
9780
      }
9781
 
9782
      /**
9783
       * Find the _Fields constant that matches fieldId, throwing an exception
9784
       * if it is not found.
9785
       */
9786
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9787
        _Fields fields = findByThriftId(fieldId);
9788
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9789
        return fields;
9790
      }
9791
 
9792
      /**
9793
       * Find the _Fields constant that matches name, or null if its not found.
9794
       */
9795
      public static _Fields findByName(String name) {
9796
        return byName.get(name);
9797
      }
9798
 
9799
      private final short _thriftId;
9800
      private final String _fieldName;
9801
 
9802
      _Fields(short thriftId, String fieldName) {
9803
        _thriftId = thriftId;
9804
        _fieldName = fieldName;
9805
      }
9806
 
9807
      public short getThriftFieldId() {
9808
        return _thriftId;
9809
      }
9810
 
9811
      public String getFieldName() {
9812
        return _fieldName;
9813
      }
9814
    }
9815
 
9816
    // isset id assignments
9817
    private static final int __SUCCESS_ISSET_ID = 0;
9818
    private BitSet __isset_bit_vector = new BitSet(1);
9819
 
9820
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9821
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 9822
          new FieldValueMetaData(TType.I64)));
553 chandransh 9823
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 9824
          new FieldValueMetaData(TType.STRUCT)));
9825
    }});
9826
 
9827
    static {
553 chandransh 9828
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 9829
    }
9830
 
553 chandransh 9831
    public addAddressForUser_result() {
123 ashish 9832
    }
9833
 
553 chandransh 9834
    public addAddressForUser_result(
571 rajveer 9835
      long success,
553 chandransh 9836
      UserContextException ucx)
123 ashish 9837
    {
9838
      this();
9839
      this.success = success;
9840
      setSuccessIsSet(true);
553 chandransh 9841
      this.ucx = ucx;
123 ashish 9842
    }
9843
 
9844
    /**
9845
     * Performs a deep copy on <i>other</i>.
9846
     */
553 chandransh 9847
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 9848
      __isset_bit_vector.clear();
9849
      __isset_bit_vector.or(other.__isset_bit_vector);
9850
      this.success = other.success;
553 chandransh 9851
      if (other.isSetUcx()) {
9852
        this.ucx = new UserContextException(other.ucx);
123 ashish 9853
      }
9854
    }
9855
 
553 chandransh 9856
    public addAddressForUser_result deepCopy() {
9857
      return new addAddressForUser_result(this);
123 ashish 9858
    }
9859
 
9860
    @Deprecated
553 chandransh 9861
    public addAddressForUser_result clone() {
9862
      return new addAddressForUser_result(this);
123 ashish 9863
    }
9864
 
571 rajveer 9865
    public long getSuccess() {
123 ashish 9866
      return this.success;
9867
    }
9868
 
571 rajveer 9869
    public addAddressForUser_result setSuccess(long success) {
123 ashish 9870
      this.success = success;
9871
      setSuccessIsSet(true);
9872
      return this;
9873
    }
9874
 
9875
    public void unsetSuccess() {
9876
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9877
    }
9878
 
9879
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9880
    public boolean isSetSuccess() {
9881
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9882
    }
9883
 
9884
    public void setSuccessIsSet(boolean value) {
9885
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9886
    }
9887
 
553 chandransh 9888
    public UserContextException getUcx() {
9889
      return this.ucx;
123 ashish 9890
    }
9891
 
553 chandransh 9892
    public addAddressForUser_result setUcx(UserContextException ucx) {
9893
      this.ucx = ucx;
123 ashish 9894
      return this;
9895
    }
9896
 
553 chandransh 9897
    public void unsetUcx() {
9898
      this.ucx = null;
123 ashish 9899
    }
9900
 
553 chandransh 9901
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9902
    public boolean isSetUcx() {
9903
      return this.ucx != null;
123 ashish 9904
    }
9905
 
553 chandransh 9906
    public void setUcxIsSet(boolean value) {
123 ashish 9907
      if (!value) {
553 chandransh 9908
        this.ucx = null;
123 ashish 9909
      }
9910
    }
9911
 
9912
    public void setFieldValue(_Fields field, Object value) {
9913
      switch (field) {
9914
      case SUCCESS:
9915
        if (value == null) {
9916
          unsetSuccess();
9917
        } else {
571 rajveer 9918
          setSuccess((Long)value);
123 ashish 9919
        }
9920
        break;
9921
 
553 chandransh 9922
      case UCX:
123 ashish 9923
        if (value == null) {
553 chandransh 9924
          unsetUcx();
123 ashish 9925
        } else {
553 chandransh 9926
          setUcx((UserContextException)value);
123 ashish 9927
        }
9928
        break;
9929
 
9930
      }
9931
    }
9932
 
9933
    public void setFieldValue(int fieldID, Object value) {
9934
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9935
    }
9936
 
9937
    public Object getFieldValue(_Fields field) {
9938
      switch (field) {
9939
      case SUCCESS:
571 rajveer 9940
        return new Long(getSuccess());
123 ashish 9941
 
553 chandransh 9942
      case UCX:
9943
        return getUcx();
123 ashish 9944
 
9945
      }
9946
      throw new IllegalStateException();
9947
    }
9948
 
9949
    public Object getFieldValue(int fieldId) {
9950
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9951
    }
9952
 
9953
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9954
    public boolean isSet(_Fields field) {
9955
      switch (field) {
9956
      case SUCCESS:
9957
        return isSetSuccess();
553 chandransh 9958
      case UCX:
9959
        return isSetUcx();
123 ashish 9960
      }
9961
      throw new IllegalStateException();
9962
    }
9963
 
9964
    public boolean isSet(int fieldID) {
9965
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9966
    }
9967
 
9968
    @Override
9969
    public boolean equals(Object that) {
9970
      if (that == null)
9971
        return false;
553 chandransh 9972
      if (that instanceof addAddressForUser_result)
9973
        return this.equals((addAddressForUser_result)that);
123 ashish 9974
      return false;
9975
    }
9976
 
553 chandransh 9977
    public boolean equals(addAddressForUser_result that) {
123 ashish 9978
      if (that == null)
9979
        return false;
9980
 
9981
      boolean this_present_success = true;
9982
      boolean that_present_success = true;
9983
      if (this_present_success || that_present_success) {
9984
        if (!(this_present_success && that_present_success))
9985
          return false;
9986
        if (this.success != that.success)
9987
          return false;
9988
      }
9989
 
553 chandransh 9990
      boolean this_present_ucx = true && this.isSetUcx();
9991
      boolean that_present_ucx = true && that.isSetUcx();
9992
      if (this_present_ucx || that_present_ucx) {
9993
        if (!(this_present_ucx && that_present_ucx))
123 ashish 9994
          return false;
553 chandransh 9995
        if (!this.ucx.equals(that.ucx))
123 ashish 9996
          return false;
9997
      }
9998
 
9999
      return true;
10000
    }
10001
 
10002
    @Override
10003
    public int hashCode() {
10004
      return 0;
10005
    }
10006
 
553 chandransh 10007
    public int compareTo(addAddressForUser_result other) {
123 ashish 10008
      if (!getClass().equals(other.getClass())) {
10009
        return getClass().getName().compareTo(other.getClass().getName());
10010
      }
10011
 
10012
      int lastComparison = 0;
553 chandransh 10013
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 10014
 
10015
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10016
      if (lastComparison != 0) {
10017
        return lastComparison;
10018
      }
10019
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10020
      if (lastComparison != 0) {
10021
        return lastComparison;
10022
      }
553 chandransh 10023
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 10024
      if (lastComparison != 0) {
10025
        return lastComparison;
10026
      }
553 chandransh 10027
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 10028
      if (lastComparison != 0) {
10029
        return lastComparison;
10030
      }
10031
      return 0;
10032
    }
10033
 
10034
    public void read(TProtocol iprot) throws TException {
10035
      TField field;
10036
      iprot.readStructBegin();
10037
      while (true)
10038
      {
10039
        field = iprot.readFieldBegin();
10040
        if (field.type == TType.STOP) { 
10041
          break;
10042
        }
10043
        _Fields fieldId = _Fields.findByThriftId(field.id);
10044
        if (fieldId == null) {
10045
          TProtocolUtil.skip(iprot, field.type);
10046
        } else {
10047
          switch (fieldId) {
10048
            case SUCCESS:
571 rajveer 10049
              if (field.type == TType.I64) {
10050
                this.success = iprot.readI64();
123 ashish 10051
                setSuccessIsSet(true);
10052
              } else { 
10053
                TProtocolUtil.skip(iprot, field.type);
10054
              }
10055
              break;
553 chandransh 10056
            case UCX:
123 ashish 10057
              if (field.type == TType.STRUCT) {
553 chandransh 10058
                this.ucx = new UserContextException();
10059
                this.ucx.read(iprot);
123 ashish 10060
              } else { 
10061
                TProtocolUtil.skip(iprot, field.type);
10062
              }
10063
              break;
10064
          }
10065
          iprot.readFieldEnd();
10066
        }
10067
      }
10068
      iprot.readStructEnd();
10069
      validate();
10070
    }
10071
 
10072
    public void write(TProtocol oprot) throws TException {
10073
      oprot.writeStructBegin(STRUCT_DESC);
10074
 
10075
      if (this.isSetSuccess()) {
10076
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 10077
        oprot.writeI64(this.success);
123 ashish 10078
        oprot.writeFieldEnd();
553 chandransh 10079
      } else if (this.isSetUcx()) {
10080
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10081
        this.ucx.write(oprot);
123 ashish 10082
        oprot.writeFieldEnd();
10083
      }
10084
      oprot.writeFieldStop();
10085
      oprot.writeStructEnd();
10086
    }
10087
 
10088
    @Override
10089
    public String toString() {
553 chandransh 10090
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 10091
      boolean first = true;
10092
 
10093
      sb.append("success:");
10094
      sb.append(this.success);
10095
      first = false;
10096
      if (!first) sb.append(", ");
553 chandransh 10097
      sb.append("ucx:");
10098
      if (this.ucx == null) {
123 ashish 10099
        sb.append("null");
10100
      } else {
553 chandransh 10101
        sb.append(this.ucx);
123 ashish 10102
      }
10103
      first = false;
10104
      sb.append(")");
10105
      return sb.toString();
10106
    }
10107
 
10108
    public void validate() throws TException {
10109
      // check for required fields
10110
    }
10111
 
10112
  }
10113
 
553 chandransh 10114
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
10115
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 10116
 
553 chandransh 10117
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10118
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 10119
 
553 chandransh 10120
    private long userid;
10121
    private long addressId;
48 ashish 10122
 
10123
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10124
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10125
      USERID((short)1, "userid"),
10126
      ADDRESS_ID((short)2, "addressId");
48 ashish 10127
 
10128
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10129
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10130
 
10131
      static {
10132
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10133
          byId.put((int)field._thriftId, field);
10134
          byName.put(field.getFieldName(), field);
10135
        }
10136
      }
10137
 
10138
      /**
10139
       * Find the _Fields constant that matches fieldId, or null if its not found.
10140
       */
10141
      public static _Fields findByThriftId(int fieldId) {
10142
        return byId.get(fieldId);
10143
      }
10144
 
10145
      /**
10146
       * Find the _Fields constant that matches fieldId, throwing an exception
10147
       * if it is not found.
10148
       */
10149
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10150
        _Fields fields = findByThriftId(fieldId);
10151
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10152
        return fields;
10153
      }
10154
 
10155
      /**
10156
       * Find the _Fields constant that matches name, or null if its not found.
10157
       */
10158
      public static _Fields findByName(String name) {
10159
        return byName.get(name);
10160
      }
10161
 
10162
      private final short _thriftId;
10163
      private final String _fieldName;
10164
 
10165
      _Fields(short thriftId, String fieldName) {
10166
        _thriftId = thriftId;
10167
        _fieldName = fieldName;
10168
      }
10169
 
10170
      public short getThriftFieldId() {
10171
        return _thriftId;
10172
      }
10173
 
10174
      public String getFieldName() {
10175
        return _fieldName;
10176
      }
10177
    }
10178
 
10179
    // isset id assignments
553 chandransh 10180
    private static final int __USERID_ISSET_ID = 0;
10181
    private static final int __ADDRESSID_ISSET_ID = 1;
10182
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10183
 
10184
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10185
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10186
          new FieldValueMetaData(TType.I64)));
10187
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
10188
          new FieldValueMetaData(TType.I64)));
48 ashish 10189
    }});
10190
 
10191
    static {
553 chandransh 10192
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 10193
    }
10194
 
553 chandransh 10195
    public removeAddressForUser_args() {
48 ashish 10196
    }
10197
 
553 chandransh 10198
    public removeAddressForUser_args(
10199
      long userid,
10200
      long addressId)
48 ashish 10201
    {
10202
      this();
553 chandransh 10203
      this.userid = userid;
10204
      setUseridIsSet(true);
10205
      this.addressId = addressId;
10206
      setAddressIdIsSet(true);
48 ashish 10207
    }
10208
 
10209
    /**
10210
     * Performs a deep copy on <i>other</i>.
10211
     */
553 chandransh 10212
    public removeAddressForUser_args(removeAddressForUser_args other) {
10213
      __isset_bit_vector.clear();
10214
      __isset_bit_vector.or(other.__isset_bit_vector);
10215
      this.userid = other.userid;
10216
      this.addressId = other.addressId;
48 ashish 10217
    }
10218
 
553 chandransh 10219
    public removeAddressForUser_args deepCopy() {
10220
      return new removeAddressForUser_args(this);
48 ashish 10221
    }
10222
 
10223
    @Deprecated
553 chandransh 10224
    public removeAddressForUser_args clone() {
10225
      return new removeAddressForUser_args(this);
48 ashish 10226
    }
10227
 
553 chandransh 10228
    public long getUserid() {
10229
      return this.userid;
48 ashish 10230
    }
10231
 
553 chandransh 10232
    public removeAddressForUser_args setUserid(long userid) {
10233
      this.userid = userid;
10234
      setUseridIsSet(true);
48 ashish 10235
      return this;
10236
    }
10237
 
553 chandransh 10238
    public void unsetUserid() {
10239
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10240
    }
10241
 
553 chandransh 10242
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10243
    public boolean isSetUserid() {
10244
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10245
    }
10246
 
553 chandransh 10247
    public void setUseridIsSet(boolean value) {
10248
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10249
    }
10250
 
553 chandransh 10251
    public long getAddressId() {
10252
      return this.addressId;
10253
    }
10254
 
10255
    public removeAddressForUser_args setAddressId(long addressId) {
10256
      this.addressId = addressId;
10257
      setAddressIdIsSet(true);
10258
      return this;
10259
    }
10260
 
10261
    public void unsetAddressId() {
10262
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
10263
    }
10264
 
10265
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
10266
    public boolean isSetAddressId() {
10267
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
10268
    }
10269
 
10270
    public void setAddressIdIsSet(boolean value) {
10271
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
10272
    }
10273
 
48 ashish 10274
    public void setFieldValue(_Fields field, Object value) {
10275
      switch (field) {
553 chandransh 10276
      case USERID:
48 ashish 10277
        if (value == null) {
553 chandransh 10278
          unsetUserid();
48 ashish 10279
        } else {
553 chandransh 10280
          setUserid((Long)value);
48 ashish 10281
        }
10282
        break;
10283
 
553 chandransh 10284
      case ADDRESS_ID:
10285
        if (value == null) {
10286
          unsetAddressId();
10287
        } else {
10288
          setAddressId((Long)value);
10289
        }
10290
        break;
10291
 
48 ashish 10292
      }
10293
    }
10294
 
10295
    public void setFieldValue(int fieldID, Object value) {
10296
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10297
    }
10298
 
10299
    public Object getFieldValue(_Fields field) {
10300
      switch (field) {
553 chandransh 10301
      case USERID:
10302
        return new Long(getUserid());
48 ashish 10303
 
553 chandransh 10304
      case ADDRESS_ID:
10305
        return new Long(getAddressId());
10306
 
48 ashish 10307
      }
10308
      throw new IllegalStateException();
10309
    }
10310
 
10311
    public Object getFieldValue(int fieldId) {
10312
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10313
    }
10314
 
10315
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10316
    public boolean isSet(_Fields field) {
10317
      switch (field) {
553 chandransh 10318
      case USERID:
10319
        return isSetUserid();
10320
      case ADDRESS_ID:
10321
        return isSetAddressId();
48 ashish 10322
      }
10323
      throw new IllegalStateException();
10324
    }
10325
 
10326
    public boolean isSet(int fieldID) {
10327
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10328
    }
10329
 
10330
    @Override
10331
    public boolean equals(Object that) {
10332
      if (that == null)
10333
        return false;
553 chandransh 10334
      if (that instanceof removeAddressForUser_args)
10335
        return this.equals((removeAddressForUser_args)that);
48 ashish 10336
      return false;
10337
    }
10338
 
553 chandransh 10339
    public boolean equals(removeAddressForUser_args that) {
48 ashish 10340
      if (that == null)
10341
        return false;
10342
 
553 chandransh 10343
      boolean this_present_userid = true;
10344
      boolean that_present_userid = true;
10345
      if (this_present_userid || that_present_userid) {
10346
        if (!(this_present_userid && that_present_userid))
48 ashish 10347
          return false;
553 chandransh 10348
        if (this.userid != that.userid)
48 ashish 10349
          return false;
10350
      }
10351
 
553 chandransh 10352
      boolean this_present_addressId = true;
10353
      boolean that_present_addressId = true;
10354
      if (this_present_addressId || that_present_addressId) {
10355
        if (!(this_present_addressId && that_present_addressId))
10356
          return false;
10357
        if (this.addressId != that.addressId)
10358
          return false;
10359
      }
10360
 
48 ashish 10361
      return true;
10362
    }
10363
 
10364
    @Override
10365
    public int hashCode() {
10366
      return 0;
10367
    }
10368
 
553 chandransh 10369
    public int compareTo(removeAddressForUser_args other) {
48 ashish 10370
      if (!getClass().equals(other.getClass())) {
10371
        return getClass().getName().compareTo(other.getClass().getName());
10372
      }
10373
 
10374
      int lastComparison = 0;
553 chandransh 10375
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 10376
 
553 chandransh 10377
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 10378
      if (lastComparison != 0) {
10379
        return lastComparison;
10380
      }
553 chandransh 10381
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 10382
      if (lastComparison != 0) {
10383
        return lastComparison;
10384
      }
553 chandransh 10385
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
10386
      if (lastComparison != 0) {
10387
        return lastComparison;
10388
      }
10389
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
10390
      if (lastComparison != 0) {
10391
        return lastComparison;
10392
      }
48 ashish 10393
      return 0;
10394
    }
10395
 
10396
    public void read(TProtocol iprot) throws TException {
10397
      TField field;
10398
      iprot.readStructBegin();
10399
      while (true)
10400
      {
10401
        field = iprot.readFieldBegin();
10402
        if (field.type == TType.STOP) { 
10403
          break;
10404
        }
10405
        _Fields fieldId = _Fields.findByThriftId(field.id);
10406
        if (fieldId == null) {
10407
          TProtocolUtil.skip(iprot, field.type);
10408
        } else {
10409
          switch (fieldId) {
553 chandransh 10410
            case USERID:
10411
              if (field.type == TType.I64) {
10412
                this.userid = iprot.readI64();
10413
                setUseridIsSet(true);
48 ashish 10414
              } else { 
10415
                TProtocolUtil.skip(iprot, field.type);
10416
              }
10417
              break;
553 chandransh 10418
            case ADDRESS_ID:
10419
              if (field.type == TType.I64) {
10420
                this.addressId = iprot.readI64();
10421
                setAddressIdIsSet(true);
10422
              } else { 
10423
                TProtocolUtil.skip(iprot, field.type);
10424
              }
10425
              break;
48 ashish 10426
          }
10427
          iprot.readFieldEnd();
10428
        }
10429
      }
10430
      iprot.readStructEnd();
10431
      validate();
10432
    }
10433
 
10434
    public void write(TProtocol oprot) throws TException {
10435
      validate();
10436
 
10437
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10438
      oprot.writeFieldBegin(USERID_FIELD_DESC);
10439
      oprot.writeI64(this.userid);
10440
      oprot.writeFieldEnd();
10441
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
10442
      oprot.writeI64(this.addressId);
10443
      oprot.writeFieldEnd();
48 ashish 10444
      oprot.writeFieldStop();
10445
      oprot.writeStructEnd();
10446
    }
10447
 
10448
    @Override
10449
    public String toString() {
553 chandransh 10450
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 10451
      boolean first = true;
10452
 
553 chandransh 10453
      sb.append("userid:");
10454
      sb.append(this.userid);
48 ashish 10455
      first = false;
553 chandransh 10456
      if (!first) sb.append(", ");
10457
      sb.append("addressId:");
10458
      sb.append(this.addressId);
10459
      first = false;
48 ashish 10460
      sb.append(")");
10461
      return sb.toString();
10462
    }
10463
 
10464
    public void validate() throws TException {
10465
      // check for required fields
10466
    }
10467
 
10468
  }
10469
 
553 chandransh 10470
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
10471
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 10472
 
10473
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10474
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10475
 
10476
    private boolean success;
10477
    private UserContextException ucx;
10478
 
10479
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10480
    public enum _Fields implements TFieldIdEnum {
10481
      SUCCESS((short)0, "success"),
10482
      UCX((short)1, "ucx");
10483
 
10484
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10485
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10486
 
10487
      static {
10488
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10489
          byId.put((int)field._thriftId, field);
10490
          byName.put(field.getFieldName(), field);
10491
        }
10492
      }
10493
 
10494
      /**
10495
       * Find the _Fields constant that matches fieldId, or null if its not found.
10496
       */
10497
      public static _Fields findByThriftId(int fieldId) {
10498
        return byId.get(fieldId);
10499
      }
10500
 
10501
      /**
10502
       * Find the _Fields constant that matches fieldId, throwing an exception
10503
       * if it is not found.
10504
       */
10505
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10506
        _Fields fields = findByThriftId(fieldId);
10507
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10508
        return fields;
10509
      }
10510
 
10511
      /**
10512
       * Find the _Fields constant that matches name, or null if its not found.
10513
       */
10514
      public static _Fields findByName(String name) {
10515
        return byName.get(name);
10516
      }
10517
 
10518
      private final short _thriftId;
10519
      private final String _fieldName;
10520
 
10521
      _Fields(short thriftId, String fieldName) {
10522
        _thriftId = thriftId;
10523
        _fieldName = fieldName;
10524
      }
10525
 
10526
      public short getThriftFieldId() {
10527
        return _thriftId;
10528
      }
10529
 
10530
      public String getFieldName() {
10531
        return _fieldName;
10532
      }
10533
    }
10534
 
10535
    // isset id assignments
10536
    private static final int __SUCCESS_ISSET_ID = 0;
10537
    private BitSet __isset_bit_vector = new BitSet(1);
10538
 
10539
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10540
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10541
          new FieldValueMetaData(TType.BOOL)));
10542
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10543
          new FieldValueMetaData(TType.STRUCT)));
10544
    }});
10545
 
10546
    static {
553 chandransh 10547
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 10548
    }
10549
 
553 chandransh 10550
    public removeAddressForUser_result() {
48 ashish 10551
    }
10552
 
553 chandransh 10553
    public removeAddressForUser_result(
48 ashish 10554
      boolean success,
10555
      UserContextException ucx)
10556
    {
10557
      this();
10558
      this.success = success;
10559
      setSuccessIsSet(true);
10560
      this.ucx = ucx;
10561
    }
10562
 
10563
    /**
10564
     * Performs a deep copy on <i>other</i>.
10565
     */
553 chandransh 10566
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 10567
      __isset_bit_vector.clear();
10568
      __isset_bit_vector.or(other.__isset_bit_vector);
10569
      this.success = other.success;
10570
      if (other.isSetUcx()) {
10571
        this.ucx = new UserContextException(other.ucx);
10572
      }
10573
    }
10574
 
553 chandransh 10575
    public removeAddressForUser_result deepCopy() {
10576
      return new removeAddressForUser_result(this);
48 ashish 10577
    }
10578
 
10579
    @Deprecated
553 chandransh 10580
    public removeAddressForUser_result clone() {
10581
      return new removeAddressForUser_result(this);
48 ashish 10582
    }
10583
 
10584
    public boolean isSuccess() {
10585
      return this.success;
10586
    }
10587
 
553 chandransh 10588
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 10589
      this.success = success;
10590
      setSuccessIsSet(true);
10591
      return this;
10592
    }
10593
 
10594
    public void unsetSuccess() {
10595
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10596
    }
10597
 
10598
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10599
    public boolean isSetSuccess() {
10600
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10601
    }
10602
 
10603
    public void setSuccessIsSet(boolean value) {
10604
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10605
    }
10606
 
10607
    public UserContextException getUcx() {
10608
      return this.ucx;
10609
    }
10610
 
553 chandransh 10611
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 10612
      this.ucx = ucx;
10613
      return this;
10614
    }
10615
 
10616
    public void unsetUcx() {
10617
      this.ucx = null;
10618
    }
10619
 
10620
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10621
    public boolean isSetUcx() {
10622
      return this.ucx != null;
10623
    }
10624
 
10625
    public void setUcxIsSet(boolean value) {
10626
      if (!value) {
10627
        this.ucx = null;
10628
      }
10629
    }
10630
 
10631
    public void setFieldValue(_Fields field, Object value) {
10632
      switch (field) {
10633
      case SUCCESS:
10634
        if (value == null) {
10635
          unsetSuccess();
10636
        } else {
10637
          setSuccess((Boolean)value);
10638
        }
10639
        break;
10640
 
10641
      case UCX:
10642
        if (value == null) {
10643
          unsetUcx();
10644
        } else {
10645
          setUcx((UserContextException)value);
10646
        }
10647
        break;
10648
 
10649
      }
10650
    }
10651
 
10652
    public void setFieldValue(int fieldID, Object value) {
10653
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10654
    }
10655
 
10656
    public Object getFieldValue(_Fields field) {
10657
      switch (field) {
10658
      case SUCCESS:
10659
        return new Boolean(isSuccess());
10660
 
10661
      case UCX:
10662
        return getUcx();
10663
 
10664
      }
10665
      throw new IllegalStateException();
10666
    }
10667
 
10668
    public Object getFieldValue(int fieldId) {
10669
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10670
    }
10671
 
10672
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10673
    public boolean isSet(_Fields field) {
10674
      switch (field) {
10675
      case SUCCESS:
10676
        return isSetSuccess();
10677
      case UCX:
10678
        return isSetUcx();
10679
      }
10680
      throw new IllegalStateException();
10681
    }
10682
 
10683
    public boolean isSet(int fieldID) {
10684
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10685
    }
10686
 
10687
    @Override
10688
    public boolean equals(Object that) {
10689
      if (that == null)
10690
        return false;
553 chandransh 10691
      if (that instanceof removeAddressForUser_result)
10692
        return this.equals((removeAddressForUser_result)that);
48 ashish 10693
      return false;
10694
    }
10695
 
553 chandransh 10696
    public boolean equals(removeAddressForUser_result that) {
48 ashish 10697
      if (that == null)
10698
        return false;
10699
 
10700
      boolean this_present_success = true;
10701
      boolean that_present_success = true;
10702
      if (this_present_success || that_present_success) {
10703
        if (!(this_present_success && that_present_success))
10704
          return false;
10705
        if (this.success != that.success)
10706
          return false;
10707
      }
10708
 
10709
      boolean this_present_ucx = true && this.isSetUcx();
10710
      boolean that_present_ucx = true && that.isSetUcx();
10711
      if (this_present_ucx || that_present_ucx) {
10712
        if (!(this_present_ucx && that_present_ucx))
10713
          return false;
10714
        if (!this.ucx.equals(that.ucx))
10715
          return false;
10716
      }
10717
 
10718
      return true;
10719
    }
10720
 
10721
    @Override
10722
    public int hashCode() {
10723
      return 0;
10724
    }
10725
 
553 chandransh 10726
    public int compareTo(removeAddressForUser_result other) {
48 ashish 10727
      if (!getClass().equals(other.getClass())) {
10728
        return getClass().getName().compareTo(other.getClass().getName());
10729
      }
10730
 
10731
      int lastComparison = 0;
553 chandransh 10732
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 10733
 
10734
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10735
      if (lastComparison != 0) {
10736
        return lastComparison;
10737
      }
10738
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10739
      if (lastComparison != 0) {
10740
        return lastComparison;
10741
      }
10742
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10743
      if (lastComparison != 0) {
10744
        return lastComparison;
10745
      }
10746
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10747
      if (lastComparison != 0) {
10748
        return lastComparison;
10749
      }
10750
      return 0;
10751
    }
10752
 
10753
    public void read(TProtocol iprot) throws TException {
10754
      TField field;
10755
      iprot.readStructBegin();
10756
      while (true)
10757
      {
10758
        field = iprot.readFieldBegin();
10759
        if (field.type == TType.STOP) { 
10760
          break;
10761
        }
10762
        _Fields fieldId = _Fields.findByThriftId(field.id);
10763
        if (fieldId == null) {
10764
          TProtocolUtil.skip(iprot, field.type);
10765
        } else {
10766
          switch (fieldId) {
10767
            case SUCCESS:
10768
              if (field.type == TType.BOOL) {
10769
                this.success = iprot.readBool();
10770
                setSuccessIsSet(true);
10771
              } else { 
10772
                TProtocolUtil.skip(iprot, field.type);
10773
              }
10774
              break;
10775
            case UCX:
10776
              if (field.type == TType.STRUCT) {
10777
                this.ucx = new UserContextException();
10778
                this.ucx.read(iprot);
10779
              } else { 
10780
                TProtocolUtil.skip(iprot, field.type);
10781
              }
10782
              break;
10783
          }
10784
          iprot.readFieldEnd();
10785
        }
10786
      }
10787
      iprot.readStructEnd();
10788
      validate();
10789
    }
10790
 
10791
    public void write(TProtocol oprot) throws TException {
10792
      oprot.writeStructBegin(STRUCT_DESC);
10793
 
10794
      if (this.isSetSuccess()) {
10795
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10796
        oprot.writeBool(this.success);
10797
        oprot.writeFieldEnd();
10798
      } else if (this.isSetUcx()) {
10799
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10800
        this.ucx.write(oprot);
10801
        oprot.writeFieldEnd();
10802
      }
10803
      oprot.writeFieldStop();
10804
      oprot.writeStructEnd();
10805
    }
10806
 
10807
    @Override
10808
    public String toString() {
553 chandransh 10809
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 10810
      boolean first = true;
10811
 
10812
      sb.append("success:");
10813
      sb.append(this.success);
10814
      first = false;
10815
      if (!first) sb.append(", ");
10816
      sb.append("ucx:");
10817
      if (this.ucx == null) {
10818
        sb.append("null");
10819
      } else {
10820
        sb.append(this.ucx);
10821
      }
10822
      first = false;
10823
      sb.append(")");
10824
      return sb.toString();
10825
    }
10826
 
10827
    public void validate() throws TException {
10828
      // check for required fields
10829
    }
10830
 
10831
  }
10832
 
553 chandransh 10833
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10834
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 10835
 
553 chandransh 10836
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 10837
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10838
 
553 chandransh 10839
    private long userId;
48 ashish 10840
    private long timestamp;
10841
 
10842
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10843
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10844
      USER_ID((short)1, "userId"),
10845
      TIMESTAMP((short)2, "timestamp");
48 ashish 10846
 
10847
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10848
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10849
 
10850
      static {
10851
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10852
          byId.put((int)field._thriftId, field);
10853
          byName.put(field.getFieldName(), field);
10854
        }
10855
      }
10856
 
10857
      /**
10858
       * Find the _Fields constant that matches fieldId, or null if its not found.
10859
       */
10860
      public static _Fields findByThriftId(int fieldId) {
10861
        return byId.get(fieldId);
10862
      }
10863
 
10864
      /**
10865
       * Find the _Fields constant that matches fieldId, throwing an exception
10866
       * if it is not found.
10867
       */
10868
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10869
        _Fields fields = findByThriftId(fieldId);
10870
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10871
        return fields;
10872
      }
10873
 
10874
      /**
10875
       * Find the _Fields constant that matches name, or null if its not found.
10876
       */
10877
      public static _Fields findByName(String name) {
10878
        return byName.get(name);
10879
      }
10880
 
10881
      private final short _thriftId;
10882
      private final String _fieldName;
10883
 
10884
      _Fields(short thriftId, String fieldName) {
10885
        _thriftId = thriftId;
10886
        _fieldName = fieldName;
10887
      }
10888
 
10889
      public short getThriftFieldId() {
10890
        return _thriftId;
10891
      }
10892
 
10893
      public String getFieldName() {
10894
        return _fieldName;
10895
      }
10896
    }
10897
 
10898
    // isset id assignments
553 chandransh 10899
    private static final int __USERID_ISSET_ID = 0;
10900
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 10901
    private BitSet __isset_bit_vector = new BitSet(2);
10902
 
10903
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10904
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10905
          new FieldValueMetaData(TType.I64)));
48 ashish 10906
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10907
          new FieldValueMetaData(TType.I64)));
10908
    }});
10909
 
10910
    static {
553 chandransh 10911
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 10912
    }
10913
 
553 chandransh 10914
    public setUserAsLoggedIn_args() {
48 ashish 10915
    }
10916
 
553 chandransh 10917
    public setUserAsLoggedIn_args(
10918
      long userId,
10919
      long timestamp)
48 ashish 10920
    {
10921
      this();
553 chandransh 10922
      this.userId = userId;
10923
      setUserIdIsSet(true);
48 ashish 10924
      this.timestamp = timestamp;
10925
      setTimestampIsSet(true);
10926
    }
10927
 
10928
    /**
10929
     * Performs a deep copy on <i>other</i>.
10930
     */
553 chandransh 10931
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 10932
      __isset_bit_vector.clear();
10933
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 10934
      this.userId = other.userId;
48 ashish 10935
      this.timestamp = other.timestamp;
10936
    }
10937
 
553 chandransh 10938
    public setUserAsLoggedIn_args deepCopy() {
10939
      return new setUserAsLoggedIn_args(this);
48 ashish 10940
    }
10941
 
10942
    @Deprecated
553 chandransh 10943
    public setUserAsLoggedIn_args clone() {
10944
      return new setUserAsLoggedIn_args(this);
48 ashish 10945
    }
10946
 
553 chandransh 10947
    public long getUserId() {
10948
      return this.userId;
48 ashish 10949
    }
10950
 
553 chandransh 10951
    public setUserAsLoggedIn_args setUserId(long userId) {
10952
      this.userId = userId;
10953
      setUserIdIsSet(true);
48 ashish 10954
      return this;
10955
    }
10956
 
553 chandransh 10957
    public void unsetUserId() {
10958
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10959
    }
10960
 
553 chandransh 10961
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10962
    public boolean isSetUserId() {
10963
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10964
    }
10965
 
553 chandransh 10966
    public void setUserIdIsSet(boolean value) {
10967
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10968
    }
10969
 
10970
    public long getTimestamp() {
10971
      return this.timestamp;
10972
    }
10973
 
553 chandransh 10974
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 10975
      this.timestamp = timestamp;
10976
      setTimestampIsSet(true);
10977
      return this;
10978
    }
10979
 
10980
    public void unsetTimestamp() {
10981
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10982
    }
10983
 
10984
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10985
    public boolean isSetTimestamp() {
10986
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10987
    }
10988
 
10989
    public void setTimestampIsSet(boolean value) {
10990
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10991
    }
10992
 
10993
    public void setFieldValue(_Fields field, Object value) {
10994
      switch (field) {
553 chandransh 10995
      case USER_ID:
48 ashish 10996
        if (value == null) {
553 chandransh 10997
          unsetUserId();
48 ashish 10998
        } else {
553 chandransh 10999
          setUserId((Long)value);
48 ashish 11000
        }
11001
        break;
11002
 
11003
      case TIMESTAMP:
11004
        if (value == null) {
11005
          unsetTimestamp();
11006
        } else {
11007
          setTimestamp((Long)value);
11008
        }
11009
        break;
11010
 
11011
      }
11012
    }
11013
 
11014
    public void setFieldValue(int fieldID, Object value) {
11015
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11016
    }
11017
 
11018
    public Object getFieldValue(_Fields field) {
11019
      switch (field) {
553 chandransh 11020
      case USER_ID:
11021
        return new Long(getUserId());
48 ashish 11022
 
11023
      case TIMESTAMP:
11024
        return new Long(getTimestamp());
11025
 
11026
      }
11027
      throw new IllegalStateException();
11028
    }
11029
 
11030
    public Object getFieldValue(int fieldId) {
11031
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11032
    }
11033
 
11034
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11035
    public boolean isSet(_Fields field) {
11036
      switch (field) {
553 chandransh 11037
      case USER_ID:
11038
        return isSetUserId();
48 ashish 11039
      case TIMESTAMP:
11040
        return isSetTimestamp();
11041
      }
11042
      throw new IllegalStateException();
11043
    }
11044
 
11045
    public boolean isSet(int fieldID) {
11046
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11047
    }
11048
 
11049
    @Override
11050
    public boolean equals(Object that) {
11051
      if (that == null)
11052
        return false;
553 chandransh 11053
      if (that instanceof setUserAsLoggedIn_args)
11054
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 11055
      return false;
11056
    }
11057
 
553 chandransh 11058
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 11059
      if (that == null)
11060
        return false;
11061
 
553 chandransh 11062
      boolean this_present_userId = true;
11063
      boolean that_present_userId = true;
11064
      if (this_present_userId || that_present_userId) {
11065
        if (!(this_present_userId && that_present_userId))
48 ashish 11066
          return false;
553 chandransh 11067
        if (this.userId != that.userId)
48 ashish 11068
          return false;
11069
      }
11070
 
11071
      boolean this_present_timestamp = true;
11072
      boolean that_present_timestamp = true;
11073
      if (this_present_timestamp || that_present_timestamp) {
11074
        if (!(this_present_timestamp && that_present_timestamp))
11075
          return false;
11076
        if (this.timestamp != that.timestamp)
11077
          return false;
11078
      }
11079
 
11080
      return true;
11081
    }
11082
 
11083
    @Override
11084
    public int hashCode() {
11085
      return 0;
11086
    }
11087
 
553 chandransh 11088
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 11089
      if (!getClass().equals(other.getClass())) {
11090
        return getClass().getName().compareTo(other.getClass().getName());
11091
      }
11092
 
11093
      int lastComparison = 0;
553 chandransh 11094
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 11095
 
553 chandransh 11096
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 11097
      if (lastComparison != 0) {
11098
        return lastComparison;
11099
      }
553 chandransh 11100
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 11101
      if (lastComparison != 0) {
11102
        return lastComparison;
11103
      }
11104
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11105
      if (lastComparison != 0) {
11106
        return lastComparison;
11107
      }
11108
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11109
      if (lastComparison != 0) {
11110
        return lastComparison;
11111
      }
11112
      return 0;
11113
    }
11114
 
11115
    public void read(TProtocol iprot) throws TException {
11116
      TField field;
11117
      iprot.readStructBegin();
11118
      while (true)
11119
      {
11120
        field = iprot.readFieldBegin();
11121
        if (field.type == TType.STOP) { 
11122
          break;
11123
        }
11124
        _Fields fieldId = _Fields.findByThriftId(field.id);
11125
        if (fieldId == null) {
11126
          TProtocolUtil.skip(iprot, field.type);
11127
        } else {
11128
          switch (fieldId) {
553 chandransh 11129
            case USER_ID:
11130
              if (field.type == TType.I64) {
11131
                this.userId = iprot.readI64();
11132
                setUserIdIsSet(true);
48 ashish 11133
              } else { 
11134
                TProtocolUtil.skip(iprot, field.type);
11135
              }
11136
              break;
11137
            case TIMESTAMP:
11138
              if (field.type == TType.I64) {
11139
                this.timestamp = iprot.readI64();
11140
                setTimestampIsSet(true);
11141
              } else { 
11142
                TProtocolUtil.skip(iprot, field.type);
11143
              }
11144
              break;
11145
          }
11146
          iprot.readFieldEnd();
11147
        }
11148
      }
11149
      iprot.readStructEnd();
11150
      validate();
11151
    }
11152
 
11153
    public void write(TProtocol oprot) throws TException {
11154
      validate();
11155
 
11156
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 11157
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
11158
      oprot.writeI64(this.userId);
11159
      oprot.writeFieldEnd();
48 ashish 11160
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11161
      oprot.writeI64(this.timestamp);
11162
      oprot.writeFieldEnd();
11163
      oprot.writeFieldStop();
11164
      oprot.writeStructEnd();
11165
    }
11166
 
11167
    @Override
11168
    public String toString() {
553 chandransh 11169
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 11170
      boolean first = true;
11171
 
553 chandransh 11172
      sb.append("userId:");
11173
      sb.append(this.userId);
48 ashish 11174
      first = false;
11175
      if (!first) sb.append(", ");
11176
      sb.append("timestamp:");
11177
      sb.append(this.timestamp);
11178
      first = false;
11179
      sb.append(")");
11180
      return sb.toString();
11181
    }
11182
 
11183
    public void validate() throws TException {
11184
      // check for required fields
11185
    }
11186
 
11187
  }
11188
 
553 chandransh 11189
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
11190
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 11191
 
11192
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11193
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11194
 
11195
    private boolean success;
11196
    private UserContextException ucx;
11197
 
11198
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11199
    public enum _Fields implements TFieldIdEnum {
11200
      SUCCESS((short)0, "success"),
11201
      UCX((short)1, "ucx");
11202
 
11203
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11204
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11205
 
11206
      static {
11207
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11208
          byId.put((int)field._thriftId, field);
11209
          byName.put(field.getFieldName(), field);
11210
        }
11211
      }
11212
 
11213
      /**
11214
       * Find the _Fields constant that matches fieldId, or null if its not found.
11215
       */
11216
      public static _Fields findByThriftId(int fieldId) {
11217
        return byId.get(fieldId);
11218
      }
11219
 
11220
      /**
11221
       * Find the _Fields constant that matches fieldId, throwing an exception
11222
       * if it is not found.
11223
       */
11224
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11225
        _Fields fields = findByThriftId(fieldId);
11226
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11227
        return fields;
11228
      }
11229
 
11230
      /**
11231
       * Find the _Fields constant that matches name, or null if its not found.
11232
       */
11233
      public static _Fields findByName(String name) {
11234
        return byName.get(name);
11235
      }
11236
 
11237
      private final short _thriftId;
11238
      private final String _fieldName;
11239
 
11240
      _Fields(short thriftId, String fieldName) {
11241
        _thriftId = thriftId;
11242
        _fieldName = fieldName;
11243
      }
11244
 
11245
      public short getThriftFieldId() {
11246
        return _thriftId;
11247
      }
11248
 
11249
      public String getFieldName() {
11250
        return _fieldName;
11251
      }
11252
    }
11253
 
11254
    // isset id assignments
11255
    private static final int __SUCCESS_ISSET_ID = 0;
11256
    private BitSet __isset_bit_vector = new BitSet(1);
11257
 
11258
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11259
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11260
          new FieldValueMetaData(TType.BOOL)));
11261
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11262
          new FieldValueMetaData(TType.STRUCT)));
11263
    }});
11264
 
11265
    static {
553 chandransh 11266
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 11267
    }
11268
 
553 chandransh 11269
    public setUserAsLoggedIn_result() {
48 ashish 11270
    }
11271
 
553 chandransh 11272
    public setUserAsLoggedIn_result(
48 ashish 11273
      boolean success,
11274
      UserContextException ucx)
11275
    {
11276
      this();
11277
      this.success = success;
11278
      setSuccessIsSet(true);
11279
      this.ucx = ucx;
11280
    }
11281
 
11282
    /**
11283
     * Performs a deep copy on <i>other</i>.
11284
     */
553 chandransh 11285
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 11286
      __isset_bit_vector.clear();
11287
      __isset_bit_vector.or(other.__isset_bit_vector);
11288
      this.success = other.success;
11289
      if (other.isSetUcx()) {
11290
        this.ucx = new UserContextException(other.ucx);
11291
      }
11292
    }
11293
 
553 chandransh 11294
    public setUserAsLoggedIn_result deepCopy() {
11295
      return new setUserAsLoggedIn_result(this);
48 ashish 11296
    }
11297
 
11298
    @Deprecated
553 chandransh 11299
    public setUserAsLoggedIn_result clone() {
11300
      return new setUserAsLoggedIn_result(this);
48 ashish 11301
    }
11302
 
11303
    public boolean isSuccess() {
11304
      return this.success;
11305
    }
11306
 
553 chandransh 11307
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 11308
      this.success = success;
11309
      setSuccessIsSet(true);
11310
      return this;
11311
    }
11312
 
11313
    public void unsetSuccess() {
11314
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11315
    }
11316
 
11317
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11318
    public boolean isSetSuccess() {
11319
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11320
    }
11321
 
11322
    public void setSuccessIsSet(boolean value) {
11323
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11324
    }
11325
 
11326
    public UserContextException getUcx() {
11327
      return this.ucx;
11328
    }
11329
 
553 chandransh 11330
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 11331
      this.ucx = ucx;
11332
      return this;
11333
    }
11334
 
11335
    public void unsetUcx() {
11336
      this.ucx = null;
11337
    }
11338
 
11339
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11340
    public boolean isSetUcx() {
11341
      return this.ucx != null;
11342
    }
11343
 
11344
    public void setUcxIsSet(boolean value) {
11345
      if (!value) {
11346
        this.ucx = null;
11347
      }
11348
    }
11349
 
11350
    public void setFieldValue(_Fields field, Object value) {
11351
      switch (field) {
11352
      case SUCCESS:
11353
        if (value == null) {
11354
          unsetSuccess();
11355
        } else {
11356
          setSuccess((Boolean)value);
11357
        }
11358
        break;
11359
 
11360
      case UCX:
11361
        if (value == null) {
11362
          unsetUcx();
11363
        } else {
11364
          setUcx((UserContextException)value);
11365
        }
11366
        break;
11367
 
11368
      }
11369
    }
11370
 
11371
    public void setFieldValue(int fieldID, Object value) {
11372
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11373
    }
11374
 
11375
    public Object getFieldValue(_Fields field) {
11376
      switch (field) {
11377
      case SUCCESS:
11378
        return new Boolean(isSuccess());
11379
 
11380
      case UCX:
11381
        return getUcx();
11382
 
11383
      }
11384
      throw new IllegalStateException();
11385
    }
11386
 
11387
    public Object getFieldValue(int fieldId) {
11388
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11389
    }
11390
 
11391
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11392
    public boolean isSet(_Fields field) {
11393
      switch (field) {
11394
      case SUCCESS:
11395
        return isSetSuccess();
11396
      case UCX:
11397
        return isSetUcx();
11398
      }
11399
      throw new IllegalStateException();
11400
    }
11401
 
11402
    public boolean isSet(int fieldID) {
11403
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11404
    }
11405
 
11406
    @Override
11407
    public boolean equals(Object that) {
11408
      if (that == null)
11409
        return false;
553 chandransh 11410
      if (that instanceof setUserAsLoggedIn_result)
11411
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 11412
      return false;
11413
    }
11414
 
553 chandransh 11415
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 11416
      if (that == null)
11417
        return false;
11418
 
11419
      boolean this_present_success = true;
11420
      boolean that_present_success = true;
11421
      if (this_present_success || that_present_success) {
11422
        if (!(this_present_success && that_present_success))
11423
          return false;
11424
        if (this.success != that.success)
11425
          return false;
11426
      }
11427
 
11428
      boolean this_present_ucx = true && this.isSetUcx();
11429
      boolean that_present_ucx = true && that.isSetUcx();
11430
      if (this_present_ucx || that_present_ucx) {
11431
        if (!(this_present_ucx && that_present_ucx))
11432
          return false;
11433
        if (!this.ucx.equals(that.ucx))
11434
          return false;
11435
      }
11436
 
11437
      return true;
11438
    }
11439
 
11440
    @Override
11441
    public int hashCode() {
11442
      return 0;
11443
    }
11444
 
553 chandransh 11445
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 11446
      if (!getClass().equals(other.getClass())) {
11447
        return getClass().getName().compareTo(other.getClass().getName());
11448
      }
11449
 
11450
      int lastComparison = 0;
553 chandransh 11451
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 11452
 
11453
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11454
      if (lastComparison != 0) {
11455
        return lastComparison;
11456
      }
11457
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11458
      if (lastComparison != 0) {
11459
        return lastComparison;
11460
      }
11461
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11462
      if (lastComparison != 0) {
11463
        return lastComparison;
11464
      }
11465
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11466
      if (lastComparison != 0) {
11467
        return lastComparison;
11468
      }
11469
      return 0;
11470
    }
11471
 
11472
    public void read(TProtocol iprot) throws TException {
11473
      TField field;
11474
      iprot.readStructBegin();
11475
      while (true)
11476
      {
11477
        field = iprot.readFieldBegin();
11478
        if (field.type == TType.STOP) { 
11479
          break;
11480
        }
11481
        _Fields fieldId = _Fields.findByThriftId(field.id);
11482
        if (fieldId == null) {
11483
          TProtocolUtil.skip(iprot, field.type);
11484
        } else {
11485
          switch (fieldId) {
11486
            case SUCCESS:
11487
              if (field.type == TType.BOOL) {
11488
                this.success = iprot.readBool();
11489
                setSuccessIsSet(true);
11490
              } else { 
11491
                TProtocolUtil.skip(iprot, field.type);
11492
              }
11493
              break;
11494
            case UCX:
11495
              if (field.type == TType.STRUCT) {
11496
                this.ucx = new UserContextException();
11497
                this.ucx.read(iprot);
11498
              } else { 
11499
                TProtocolUtil.skip(iprot, field.type);
11500
              }
11501
              break;
11502
          }
11503
          iprot.readFieldEnd();
11504
        }
11505
      }
11506
      iprot.readStructEnd();
11507
      validate();
11508
    }
11509
 
11510
    public void write(TProtocol oprot) throws TException {
11511
      oprot.writeStructBegin(STRUCT_DESC);
11512
 
11513
      if (this.isSetSuccess()) {
11514
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11515
        oprot.writeBool(this.success);
11516
        oprot.writeFieldEnd();
11517
      } else if (this.isSetUcx()) {
11518
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11519
        this.ucx.write(oprot);
11520
        oprot.writeFieldEnd();
11521
      }
11522
      oprot.writeFieldStop();
11523
      oprot.writeStructEnd();
11524
    }
11525
 
11526
    @Override
11527
    public String toString() {
553 chandransh 11528
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 11529
      boolean first = true;
11530
 
11531
      sb.append("success:");
11532
      sb.append(this.success);
11533
      first = false;
11534
      if (!first) sb.append(", ");
11535
      sb.append("ucx:");
11536
      if (this.ucx == null) {
11537
        sb.append("null");
11538
      } else {
11539
        sb.append(this.ucx);
11540
      }
11541
      first = false;
11542
      sb.append(")");
11543
      return sb.toString();
11544
    }
11545
 
11546
    public void validate() throws TException {
11547
      // check for required fields
11548
    }
11549
 
11550
  }
11551
 
553 chandransh 11552
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
11553
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 11554
 
553 chandransh 11555
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11556
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 11557
 
11558
    private long userid;
11559
    private long timestamp;
11560
 
11561
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11562
    public enum _Fields implements TFieldIdEnum {
553 chandransh 11563
      USERID((short)1, "userid"),
11564
      TIMESTAMP((short)2, "timestamp");
48 ashish 11565
 
11566
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11567
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11568
 
11569
      static {
11570
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11571
          byId.put((int)field._thriftId, field);
11572
          byName.put(field.getFieldName(), field);
11573
        }
11574
      }
11575
 
11576
      /**
11577
       * Find the _Fields constant that matches fieldId, or null if its not found.
11578
       */
11579
      public static _Fields findByThriftId(int fieldId) {
11580
        return byId.get(fieldId);
11581
      }
11582
 
11583
      /**
11584
       * Find the _Fields constant that matches fieldId, throwing an exception
11585
       * if it is not found.
11586
       */
11587
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11588
        _Fields fields = findByThriftId(fieldId);
11589
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11590
        return fields;
11591
      }
11592
 
11593
      /**
11594
       * Find the _Fields constant that matches name, or null if its not found.
11595
       */
11596
      public static _Fields findByName(String name) {
11597
        return byName.get(name);
11598
      }
11599
 
11600
      private final short _thriftId;
11601
      private final String _fieldName;
11602
 
11603
      _Fields(short thriftId, String fieldName) {
11604
        _thriftId = thriftId;
11605
        _fieldName = fieldName;
11606
      }
11607
 
11608
      public short getThriftFieldId() {
11609
        return _thriftId;
11610
      }
11611
 
11612
      public String getFieldName() {
11613
        return _fieldName;
11614
      }
11615
    }
11616
 
11617
    // isset id assignments
11618
    private static final int __USERID_ISSET_ID = 0;
11619
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 11620
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 11621
 
11622
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11623
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11624
          new FieldValueMetaData(TType.I64)));
11625
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
11626
          new FieldValueMetaData(TType.I64)));
11627
    }});
11628
 
11629
    static {
553 chandransh 11630
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 11631
    }
11632
 
553 chandransh 11633
    public setUserAsLoggedOut_args() {
48 ashish 11634
    }
11635
 
553 chandransh 11636
    public setUserAsLoggedOut_args(
48 ashish 11637
      long userid,
553 chandransh 11638
      long timestamp)
48 ashish 11639
    {
11640
      this();
11641
      this.userid = userid;
11642
      setUseridIsSet(true);
11643
      this.timestamp = timestamp;
11644
      setTimestampIsSet(true);
11645
    }
11646
 
11647
    /**
11648
     * Performs a deep copy on <i>other</i>.
11649
     */
553 chandransh 11650
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 11651
      __isset_bit_vector.clear();
11652
      __isset_bit_vector.or(other.__isset_bit_vector);
11653
      this.userid = other.userid;
11654
      this.timestamp = other.timestamp;
11655
    }
11656
 
553 chandransh 11657
    public setUserAsLoggedOut_args deepCopy() {
11658
      return new setUserAsLoggedOut_args(this);
48 ashish 11659
    }
11660
 
11661
    @Deprecated
553 chandransh 11662
    public setUserAsLoggedOut_args clone() {
11663
      return new setUserAsLoggedOut_args(this);
48 ashish 11664
    }
11665
 
11666
    public long getUserid() {
11667
      return this.userid;
11668
    }
11669
 
553 chandransh 11670
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 11671
      this.userid = userid;
11672
      setUseridIsSet(true);
11673
      return this;
11674
    }
11675
 
11676
    public void unsetUserid() {
11677
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11678
    }
11679
 
11680
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11681
    public boolean isSetUserid() {
11682
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11683
    }
11684
 
11685
    public void setUseridIsSet(boolean value) {
11686
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11687
    }
11688
 
11689
    public long getTimestamp() {
11690
      return this.timestamp;
11691
    }
11692
 
553 chandransh 11693
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 11694
      this.timestamp = timestamp;
11695
      setTimestampIsSet(true);
11696
      return this;
11697
    }
11698
 
11699
    public void unsetTimestamp() {
11700
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
11701
    }
11702
 
11703
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
11704
    public boolean isSetTimestamp() {
11705
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
11706
    }
11707
 
11708
    public void setTimestampIsSet(boolean value) {
11709
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
11710
    }
11711
 
11712
    public void setFieldValue(_Fields field, Object value) {
11713
      switch (field) {
11714
      case USERID:
11715
        if (value == null) {
11716
          unsetUserid();
11717
        } else {
11718
          setUserid((Long)value);
11719
        }
11720
        break;
11721
 
11722
      case TIMESTAMP:
11723
        if (value == null) {
11724
          unsetTimestamp();
11725
        } else {
11726
          setTimestamp((Long)value);
11727
        }
11728
        break;
11729
 
11730
      }
11731
    }
11732
 
11733
    public void setFieldValue(int fieldID, Object value) {
11734
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11735
    }
11736
 
11737
    public Object getFieldValue(_Fields field) {
11738
      switch (field) {
11739
      case USERID:
11740
        return new Long(getUserid());
11741
 
11742
      case TIMESTAMP:
11743
        return new Long(getTimestamp());
11744
 
11745
      }
11746
      throw new IllegalStateException();
11747
    }
11748
 
11749
    public Object getFieldValue(int fieldId) {
11750
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11751
    }
11752
 
11753
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11754
    public boolean isSet(_Fields field) {
11755
      switch (field) {
11756
      case USERID:
11757
        return isSetUserid();
11758
      case TIMESTAMP:
11759
        return isSetTimestamp();
11760
      }
11761
      throw new IllegalStateException();
11762
    }
11763
 
11764
    public boolean isSet(int fieldID) {
11765
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11766
    }
11767
 
11768
    @Override
11769
    public boolean equals(Object that) {
11770
      if (that == null)
11771
        return false;
553 chandransh 11772
      if (that instanceof setUserAsLoggedOut_args)
11773
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 11774
      return false;
11775
    }
11776
 
553 chandransh 11777
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 11778
      if (that == null)
11779
        return false;
11780
 
11781
      boolean this_present_userid = true;
11782
      boolean that_present_userid = true;
11783
      if (this_present_userid || that_present_userid) {
11784
        if (!(this_present_userid && that_present_userid))
11785
          return false;
11786
        if (this.userid != that.userid)
11787
          return false;
11788
      }
11789
 
11790
      boolean this_present_timestamp = true;
11791
      boolean that_present_timestamp = true;
11792
      if (this_present_timestamp || that_present_timestamp) {
11793
        if (!(this_present_timestamp && that_present_timestamp))
11794
          return false;
11795
        if (this.timestamp != that.timestamp)
11796
          return false;
11797
      }
11798
 
11799
      return true;
11800
    }
11801
 
11802
    @Override
11803
    public int hashCode() {
11804
      return 0;
11805
    }
11806
 
553 chandransh 11807
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 11808
      if (!getClass().equals(other.getClass())) {
11809
        return getClass().getName().compareTo(other.getClass().getName());
11810
      }
11811
 
11812
      int lastComparison = 0;
553 chandransh 11813
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 11814
 
11815
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11816
      if (lastComparison != 0) {
11817
        return lastComparison;
11818
      }
11819
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11820
      if (lastComparison != 0) {
11821
        return lastComparison;
11822
      }
11823
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11824
      if (lastComparison != 0) {
11825
        return lastComparison;
11826
      }
11827
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11828
      if (lastComparison != 0) {
11829
        return lastComparison;
11830
      }
11831
      return 0;
11832
    }
11833
 
11834
    public void read(TProtocol iprot) throws TException {
11835
      TField field;
11836
      iprot.readStructBegin();
11837
      while (true)
11838
      {
11839
        field = iprot.readFieldBegin();
11840
        if (field.type == TType.STOP) { 
11841
          break;
11842
        }
11843
        _Fields fieldId = _Fields.findByThriftId(field.id);
11844
        if (fieldId == null) {
11845
          TProtocolUtil.skip(iprot, field.type);
11846
        } else {
11847
          switch (fieldId) {
11848
            case USERID:
11849
              if (field.type == TType.I64) {
11850
                this.userid = iprot.readI64();
11851
                setUseridIsSet(true);
11852
              } else { 
11853
                TProtocolUtil.skip(iprot, field.type);
11854
              }
11855
              break;
11856
            case TIMESTAMP:
11857
              if (field.type == TType.I64) {
11858
                this.timestamp = iprot.readI64();
11859
                setTimestampIsSet(true);
11860
              } else { 
11861
                TProtocolUtil.skip(iprot, field.type);
11862
              }
11863
              break;
11864
          }
11865
          iprot.readFieldEnd();
11866
        }
11867
      }
11868
      iprot.readStructEnd();
11869
      validate();
11870
    }
11871
 
11872
    public void write(TProtocol oprot) throws TException {
11873
      validate();
11874
 
11875
      oprot.writeStructBegin(STRUCT_DESC);
11876
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11877
      oprot.writeI64(this.userid);
11878
      oprot.writeFieldEnd();
11879
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11880
      oprot.writeI64(this.timestamp);
11881
      oprot.writeFieldEnd();
11882
      oprot.writeFieldStop();
11883
      oprot.writeStructEnd();
11884
    }
11885
 
11886
    @Override
11887
    public String toString() {
553 chandransh 11888
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 11889
      boolean first = true;
11890
 
11891
      sb.append("userid:");
11892
      sb.append(this.userid);
11893
      first = false;
11894
      if (!first) sb.append(", ");
11895
      sb.append("timestamp:");
11896
      sb.append(this.timestamp);
11897
      first = false;
11898
      sb.append(")");
11899
      return sb.toString();
11900
    }
11901
 
11902
    public void validate() throws TException {
11903
      // check for required fields
11904
    }
11905
 
11906
  }
11907
 
553 chandransh 11908
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11909
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 11910
 
11911
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11912
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11913
 
11914
    private boolean success;
11915
    private UserContextException ucx;
11916
 
11917
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11918
    public enum _Fields implements TFieldIdEnum {
11919
      SUCCESS((short)0, "success"),
11920
      UCX((short)1, "ucx");
11921
 
11922
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11923
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11924
 
11925
      static {
11926
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11927
          byId.put((int)field._thriftId, field);
11928
          byName.put(field.getFieldName(), field);
11929
        }
11930
      }
11931
 
11932
      /**
11933
       * Find the _Fields constant that matches fieldId, or null if its not found.
11934
       */
11935
      public static _Fields findByThriftId(int fieldId) {
11936
        return byId.get(fieldId);
11937
      }
11938
 
11939
      /**
11940
       * Find the _Fields constant that matches fieldId, throwing an exception
11941
       * if it is not found.
11942
       */
11943
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11944
        _Fields fields = findByThriftId(fieldId);
11945
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11946
        return fields;
11947
      }
11948
 
11949
      /**
11950
       * Find the _Fields constant that matches name, or null if its not found.
11951
       */
11952
      public static _Fields findByName(String name) {
11953
        return byName.get(name);
11954
      }
11955
 
11956
      private final short _thriftId;
11957
      private final String _fieldName;
11958
 
11959
      _Fields(short thriftId, String fieldName) {
11960
        _thriftId = thriftId;
11961
        _fieldName = fieldName;
11962
      }
11963
 
11964
      public short getThriftFieldId() {
11965
        return _thriftId;
11966
      }
11967
 
11968
      public String getFieldName() {
11969
        return _fieldName;
11970
      }
11971
    }
11972
 
11973
    // isset id assignments
11974
    private static final int __SUCCESS_ISSET_ID = 0;
11975
    private BitSet __isset_bit_vector = new BitSet(1);
11976
 
11977
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11978
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11979
          new FieldValueMetaData(TType.BOOL)));
11980
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11981
          new FieldValueMetaData(TType.STRUCT)));
11982
    }});
11983
 
11984
    static {
553 chandransh 11985
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 11986
    }
11987
 
553 chandransh 11988
    public setUserAsLoggedOut_result() {
48 ashish 11989
    }
11990
 
553 chandransh 11991
    public setUserAsLoggedOut_result(
48 ashish 11992
      boolean success,
11993
      UserContextException ucx)
11994
    {
11995
      this();
11996
      this.success = success;
11997
      setSuccessIsSet(true);
11998
      this.ucx = ucx;
11999
    }
12000
 
12001
    /**
12002
     * Performs a deep copy on <i>other</i>.
12003
     */
553 chandransh 12004
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 12005
      __isset_bit_vector.clear();
12006
      __isset_bit_vector.or(other.__isset_bit_vector);
12007
      this.success = other.success;
12008
      if (other.isSetUcx()) {
12009
        this.ucx = new UserContextException(other.ucx);
12010
      }
12011
    }
12012
 
553 chandransh 12013
    public setUserAsLoggedOut_result deepCopy() {
12014
      return new setUserAsLoggedOut_result(this);
48 ashish 12015
    }
12016
 
12017
    @Deprecated
553 chandransh 12018
    public setUserAsLoggedOut_result clone() {
12019
      return new setUserAsLoggedOut_result(this);
48 ashish 12020
    }
12021
 
12022
    public boolean isSuccess() {
12023
      return this.success;
12024
    }
12025
 
553 chandransh 12026
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 12027
      this.success = success;
12028
      setSuccessIsSet(true);
12029
      return this;
12030
    }
12031
 
12032
    public void unsetSuccess() {
12033
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12034
    }
12035
 
12036
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12037
    public boolean isSetSuccess() {
12038
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12039
    }
12040
 
12041
    public void setSuccessIsSet(boolean value) {
12042
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12043
    }
12044
 
12045
    public UserContextException getUcx() {
12046
      return this.ucx;
12047
    }
12048
 
553 chandransh 12049
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 12050
      this.ucx = ucx;
12051
      return this;
12052
    }
12053
 
12054
    public void unsetUcx() {
12055
      this.ucx = null;
12056
    }
12057
 
12058
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12059
    public boolean isSetUcx() {
12060
      return this.ucx != null;
12061
    }
12062
 
12063
    public void setUcxIsSet(boolean value) {
12064
      if (!value) {
12065
        this.ucx = null;
12066
      }
12067
    }
12068
 
12069
    public void setFieldValue(_Fields field, Object value) {
12070
      switch (field) {
12071
      case SUCCESS:
12072
        if (value == null) {
12073
          unsetSuccess();
12074
        } else {
12075
          setSuccess((Boolean)value);
12076
        }
12077
        break;
12078
 
12079
      case UCX:
12080
        if (value == null) {
12081
          unsetUcx();
12082
        } else {
12083
          setUcx((UserContextException)value);
12084
        }
12085
        break;
12086
 
12087
      }
12088
    }
12089
 
12090
    public void setFieldValue(int fieldID, Object value) {
12091
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12092
    }
12093
 
12094
    public Object getFieldValue(_Fields field) {
12095
      switch (field) {
12096
      case SUCCESS:
12097
        return new Boolean(isSuccess());
12098
 
12099
      case UCX:
12100
        return getUcx();
12101
 
12102
      }
12103
      throw new IllegalStateException();
12104
    }
12105
 
12106
    public Object getFieldValue(int fieldId) {
12107
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12108
    }
12109
 
12110
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12111
    public boolean isSet(_Fields field) {
12112
      switch (field) {
12113
      case SUCCESS:
12114
        return isSetSuccess();
12115
      case UCX:
12116
        return isSetUcx();
12117
      }
12118
      throw new IllegalStateException();
12119
    }
12120
 
12121
    public boolean isSet(int fieldID) {
12122
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12123
    }
12124
 
12125
    @Override
12126
    public boolean equals(Object that) {
12127
      if (that == null)
12128
        return false;
553 chandransh 12129
      if (that instanceof setUserAsLoggedOut_result)
12130
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 12131
      return false;
12132
    }
12133
 
553 chandransh 12134
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 12135
      if (that == null)
12136
        return false;
12137
 
12138
      boolean this_present_success = true;
12139
      boolean that_present_success = true;
12140
      if (this_present_success || that_present_success) {
12141
        if (!(this_present_success && that_present_success))
12142
          return false;
12143
        if (this.success != that.success)
12144
          return false;
12145
      }
12146
 
12147
      boolean this_present_ucx = true && this.isSetUcx();
12148
      boolean that_present_ucx = true && that.isSetUcx();
12149
      if (this_present_ucx || that_present_ucx) {
12150
        if (!(this_present_ucx && that_present_ucx))
12151
          return false;
12152
        if (!this.ucx.equals(that.ucx))
12153
          return false;
12154
      }
12155
 
12156
      return true;
12157
    }
12158
 
12159
    @Override
12160
    public int hashCode() {
12161
      return 0;
12162
    }
12163
 
553 chandransh 12164
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 12165
      if (!getClass().equals(other.getClass())) {
12166
        return getClass().getName().compareTo(other.getClass().getName());
12167
      }
12168
 
12169
      int lastComparison = 0;
553 chandransh 12170
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 12171
 
12172
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12173
      if (lastComparison != 0) {
12174
        return lastComparison;
12175
      }
12176
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12177
      if (lastComparison != 0) {
12178
        return lastComparison;
12179
      }
12180
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12181
      if (lastComparison != 0) {
12182
        return lastComparison;
12183
      }
12184
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12185
      if (lastComparison != 0) {
12186
        return lastComparison;
12187
      }
12188
      return 0;
12189
    }
12190
 
12191
    public void read(TProtocol iprot) throws TException {
12192
      TField field;
12193
      iprot.readStructBegin();
12194
      while (true)
12195
      {
12196
        field = iprot.readFieldBegin();
12197
        if (field.type == TType.STOP) { 
12198
          break;
12199
        }
12200
        _Fields fieldId = _Fields.findByThriftId(field.id);
12201
        if (fieldId == null) {
12202
          TProtocolUtil.skip(iprot, field.type);
12203
        } else {
12204
          switch (fieldId) {
12205
            case SUCCESS:
12206
              if (field.type == TType.BOOL) {
12207
                this.success = iprot.readBool();
12208
                setSuccessIsSet(true);
12209
              } else { 
12210
                TProtocolUtil.skip(iprot, field.type);
12211
              }
12212
              break;
12213
            case UCX:
12214
              if (field.type == TType.STRUCT) {
12215
                this.ucx = new UserContextException();
12216
                this.ucx.read(iprot);
12217
              } else { 
12218
                TProtocolUtil.skip(iprot, field.type);
12219
              }
12220
              break;
12221
          }
12222
          iprot.readFieldEnd();
12223
        }
12224
      }
12225
      iprot.readStructEnd();
12226
      validate();
12227
    }
12228
 
12229
    public void write(TProtocol oprot) throws TException {
12230
      oprot.writeStructBegin(STRUCT_DESC);
12231
 
12232
      if (this.isSetSuccess()) {
12233
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12234
        oprot.writeBool(this.success);
12235
        oprot.writeFieldEnd();
12236
      } else if (this.isSetUcx()) {
12237
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12238
        this.ucx.write(oprot);
12239
        oprot.writeFieldEnd();
12240
      }
12241
      oprot.writeFieldStop();
12242
      oprot.writeStructEnd();
12243
    }
12244
 
12245
    @Override
12246
    public String toString() {
553 chandransh 12247
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 12248
      boolean first = true;
12249
 
12250
      sb.append("success:");
12251
      sb.append(this.success);
12252
      first = false;
12253
      if (!first) sb.append(", ");
12254
      sb.append("ucx:");
12255
      if (this.ucx == null) {
12256
        sb.append("null");
12257
      } else {
12258
        sb.append(this.ucx);
12259
      }
12260
      first = false;
12261
      sb.append(")");
12262
      return sb.toString();
12263
    }
12264
 
12265
    public void validate() throws TException {
12266
      // check for required fields
12267
    }
12268
 
12269
  }
12270
 
553 chandransh 12271
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
12272
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 12273
 
12274
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
12275
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
12276
 
12277
    private long userid;
12278
    private long addressId;
12279
 
12280
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12281
    public enum _Fields implements TFieldIdEnum {
12282
      USERID((short)1, "userid"),
12283
      ADDRESS_ID((short)2, "addressId");
12284
 
12285
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12286
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12287
 
12288
      static {
12289
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12290
          byId.put((int)field._thriftId, field);
12291
          byName.put(field.getFieldName(), field);
12292
        }
12293
      }
12294
 
12295
      /**
12296
       * Find the _Fields constant that matches fieldId, or null if its not found.
12297
       */
12298
      public static _Fields findByThriftId(int fieldId) {
12299
        return byId.get(fieldId);
12300
      }
12301
 
12302
      /**
12303
       * Find the _Fields constant that matches fieldId, throwing an exception
12304
       * if it is not found.
12305
       */
12306
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12307
        _Fields fields = findByThriftId(fieldId);
12308
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12309
        return fields;
12310
      }
12311
 
12312
      /**
12313
       * Find the _Fields constant that matches name, or null if its not found.
12314
       */
12315
      public static _Fields findByName(String name) {
12316
        return byName.get(name);
12317
      }
12318
 
12319
      private final short _thriftId;
12320
      private final String _fieldName;
12321
 
12322
      _Fields(short thriftId, String fieldName) {
12323
        _thriftId = thriftId;
12324
        _fieldName = fieldName;
12325
      }
12326
 
12327
      public short getThriftFieldId() {
12328
        return _thriftId;
12329
      }
12330
 
12331
      public String getFieldName() {
12332
        return _fieldName;
12333
      }
12334
    }
12335
 
12336
    // isset id assignments
12337
    private static final int __USERID_ISSET_ID = 0;
12338
    private static final int __ADDRESSID_ISSET_ID = 1;
12339
    private BitSet __isset_bit_vector = new BitSet(2);
12340
 
12341
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12342
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
12343
          new FieldValueMetaData(TType.I64)));
12344
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
12345
          new FieldValueMetaData(TType.I64)));
12346
    }});
12347
 
12348
    static {
553 chandransh 12349
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 12350
    }
12351
 
553 chandransh 12352
    public setDefaultAddress_args() {
48 ashish 12353
    }
12354
 
553 chandransh 12355
    public setDefaultAddress_args(
48 ashish 12356
      long userid,
12357
      long addressId)
12358
    {
12359
      this();
12360
      this.userid = userid;
12361
      setUseridIsSet(true);
12362
      this.addressId = addressId;
12363
      setAddressIdIsSet(true);
12364
    }
12365
 
12366
    /**
12367
     * Performs a deep copy on <i>other</i>.
12368
     */
553 chandransh 12369
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 12370
      __isset_bit_vector.clear();
12371
      __isset_bit_vector.or(other.__isset_bit_vector);
12372
      this.userid = other.userid;
12373
      this.addressId = other.addressId;
12374
    }
12375
 
553 chandransh 12376
    public setDefaultAddress_args deepCopy() {
12377
      return new setDefaultAddress_args(this);
48 ashish 12378
    }
12379
 
12380
    @Deprecated
553 chandransh 12381
    public setDefaultAddress_args clone() {
12382
      return new setDefaultAddress_args(this);
48 ashish 12383
    }
12384
 
12385
    public long getUserid() {
12386
      return this.userid;
12387
    }
12388
 
553 chandransh 12389
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 12390
      this.userid = userid;
12391
      setUseridIsSet(true);
12392
      return this;
12393
    }
12394
 
12395
    public void unsetUserid() {
12396
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12397
    }
12398
 
12399
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12400
    public boolean isSetUserid() {
12401
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12402
    }
12403
 
12404
    public void setUseridIsSet(boolean value) {
12405
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12406
    }
12407
 
12408
    public long getAddressId() {
12409
      return this.addressId;
12410
    }
12411
 
553 chandransh 12412
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 12413
      this.addressId = addressId;
12414
      setAddressIdIsSet(true);
12415
      return this;
12416
    }
12417
 
12418
    public void unsetAddressId() {
12419
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
12420
    }
12421
 
12422
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
12423
    public boolean isSetAddressId() {
12424
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
12425
    }
12426
 
12427
    public void setAddressIdIsSet(boolean value) {
12428
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
12429
    }
12430
 
12431
    public void setFieldValue(_Fields field, Object value) {
12432
      switch (field) {
12433
      case USERID:
12434
        if (value == null) {
12435
          unsetUserid();
12436
        } else {
12437
          setUserid((Long)value);
12438
        }
12439
        break;
12440
 
12441
      case ADDRESS_ID:
12442
        if (value == null) {
12443
          unsetAddressId();
12444
        } else {
12445
          setAddressId((Long)value);
12446
        }
12447
        break;
12448
 
12449
      }
12450
    }
12451
 
12452
    public void setFieldValue(int fieldID, Object value) {
12453
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12454
    }
12455
 
12456
    public Object getFieldValue(_Fields field) {
12457
      switch (field) {
12458
      case USERID:
12459
        return new Long(getUserid());
12460
 
12461
      case ADDRESS_ID:
12462
        return new Long(getAddressId());
12463
 
12464
      }
12465
      throw new IllegalStateException();
12466
    }
12467
 
12468
    public Object getFieldValue(int fieldId) {
12469
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12470
    }
12471
 
12472
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12473
    public boolean isSet(_Fields field) {
12474
      switch (field) {
12475
      case USERID:
12476
        return isSetUserid();
12477
      case ADDRESS_ID:
12478
        return isSetAddressId();
12479
      }
12480
      throw new IllegalStateException();
12481
    }
12482
 
12483
    public boolean isSet(int fieldID) {
12484
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12485
    }
12486
 
12487
    @Override
12488
    public boolean equals(Object that) {
12489
      if (that == null)
12490
        return false;
553 chandransh 12491
      if (that instanceof setDefaultAddress_args)
12492
        return this.equals((setDefaultAddress_args)that);
48 ashish 12493
      return false;
12494
    }
12495
 
553 chandransh 12496
    public boolean equals(setDefaultAddress_args that) {
48 ashish 12497
      if (that == null)
12498
        return false;
12499
 
12500
      boolean this_present_userid = true;
12501
      boolean that_present_userid = true;
12502
      if (this_present_userid || that_present_userid) {
12503
        if (!(this_present_userid && that_present_userid))
12504
          return false;
12505
        if (this.userid != that.userid)
12506
          return false;
12507
      }
12508
 
12509
      boolean this_present_addressId = true;
12510
      boolean that_present_addressId = true;
12511
      if (this_present_addressId || that_present_addressId) {
12512
        if (!(this_present_addressId && that_present_addressId))
12513
          return false;
12514
        if (this.addressId != that.addressId)
12515
          return false;
12516
      }
12517
 
12518
      return true;
12519
    }
12520
 
12521
    @Override
12522
    public int hashCode() {
12523
      return 0;
12524
    }
12525
 
553 chandransh 12526
    public int compareTo(setDefaultAddress_args other) {
48 ashish 12527
      if (!getClass().equals(other.getClass())) {
12528
        return getClass().getName().compareTo(other.getClass().getName());
12529
      }
12530
 
12531
      int lastComparison = 0;
553 chandransh 12532
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 12533
 
12534
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
12535
      if (lastComparison != 0) {
12536
        return lastComparison;
12537
      }
12538
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
12539
      if (lastComparison != 0) {
12540
        return lastComparison;
12541
      }
12542
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
12543
      if (lastComparison != 0) {
12544
        return lastComparison;
12545
      }
12546
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
12547
      if (lastComparison != 0) {
12548
        return lastComparison;
12549
      }
12550
      return 0;
12551
    }
12552
 
12553
    public void read(TProtocol iprot) throws TException {
12554
      TField field;
12555
      iprot.readStructBegin();
12556
      while (true)
12557
      {
12558
        field = iprot.readFieldBegin();
12559
        if (field.type == TType.STOP) { 
12560
          break;
12561
        }
12562
        _Fields fieldId = _Fields.findByThriftId(field.id);
12563
        if (fieldId == null) {
12564
          TProtocolUtil.skip(iprot, field.type);
12565
        } else {
12566
          switch (fieldId) {
12567
            case USERID:
12568
              if (field.type == TType.I64) {
12569
                this.userid = iprot.readI64();
12570
                setUseridIsSet(true);
12571
              } else { 
12572
                TProtocolUtil.skip(iprot, field.type);
12573
              }
12574
              break;
12575
            case ADDRESS_ID:
12576
              if (field.type == TType.I64) {
12577
                this.addressId = iprot.readI64();
12578
                setAddressIdIsSet(true);
12579
              } else { 
12580
                TProtocolUtil.skip(iprot, field.type);
12581
              }
12582
              break;
12583
          }
12584
          iprot.readFieldEnd();
12585
        }
12586
      }
12587
      iprot.readStructEnd();
12588
      validate();
12589
    }
12590
 
12591
    public void write(TProtocol oprot) throws TException {
12592
      validate();
12593
 
12594
      oprot.writeStructBegin(STRUCT_DESC);
12595
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12596
      oprot.writeI64(this.userid);
12597
      oprot.writeFieldEnd();
12598
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
12599
      oprot.writeI64(this.addressId);
12600
      oprot.writeFieldEnd();
12601
      oprot.writeFieldStop();
12602
      oprot.writeStructEnd();
12603
    }
12604
 
12605
    @Override
12606
    public String toString() {
553 chandransh 12607
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 12608
      boolean first = true;
12609
 
12610
      sb.append("userid:");
12611
      sb.append(this.userid);
12612
      first = false;
12613
      if (!first) sb.append(", ");
12614
      sb.append("addressId:");
12615
      sb.append(this.addressId);
12616
      first = false;
12617
      sb.append(")");
12618
      return sb.toString();
12619
    }
12620
 
12621
    public void validate() throws TException {
12622
      // check for required fields
12623
    }
12624
 
12625
  }
12626
 
553 chandransh 12627
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
12628
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 12629
 
12630
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12631
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12632
 
12633
    private boolean success;
12634
    private UserContextException ucx;
12635
 
12636
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12637
    public enum _Fields implements TFieldIdEnum {
12638
      SUCCESS((short)0, "success"),
12639
      UCX((short)1, "ucx");
12640
 
12641
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12642
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12643
 
12644
      static {
12645
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12646
          byId.put((int)field._thriftId, field);
12647
          byName.put(field.getFieldName(), field);
12648
        }
12649
      }
12650
 
12651
      /**
12652
       * Find the _Fields constant that matches fieldId, or null if its not found.
12653
       */
12654
      public static _Fields findByThriftId(int fieldId) {
12655
        return byId.get(fieldId);
12656
      }
12657
 
12658
      /**
12659
       * Find the _Fields constant that matches fieldId, throwing an exception
12660
       * if it is not found.
12661
       */
12662
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12663
        _Fields fields = findByThriftId(fieldId);
12664
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12665
        return fields;
12666
      }
12667
 
12668
      /**
12669
       * Find the _Fields constant that matches name, or null if its not found.
12670
       */
12671
      public static _Fields findByName(String name) {
12672
        return byName.get(name);
12673
      }
12674
 
12675
      private final short _thriftId;
12676
      private final String _fieldName;
12677
 
12678
      _Fields(short thriftId, String fieldName) {
12679
        _thriftId = thriftId;
12680
        _fieldName = fieldName;
12681
      }
12682
 
12683
      public short getThriftFieldId() {
12684
        return _thriftId;
12685
      }
12686
 
12687
      public String getFieldName() {
12688
        return _fieldName;
12689
      }
12690
    }
12691
 
12692
    // isset id assignments
12693
    private static final int __SUCCESS_ISSET_ID = 0;
12694
    private BitSet __isset_bit_vector = new BitSet(1);
12695
 
12696
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12697
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12698
          new FieldValueMetaData(TType.BOOL)));
12699
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12700
          new FieldValueMetaData(TType.STRUCT)));
12701
    }});
12702
 
12703
    static {
553 chandransh 12704
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 12705
    }
12706
 
553 chandransh 12707
    public setDefaultAddress_result() {
48 ashish 12708
    }
12709
 
553 chandransh 12710
    public setDefaultAddress_result(
48 ashish 12711
      boolean success,
12712
      UserContextException ucx)
12713
    {
12714
      this();
12715
      this.success = success;
12716
      setSuccessIsSet(true);
12717
      this.ucx = ucx;
12718
    }
12719
 
12720
    /**
12721
     * Performs a deep copy on <i>other</i>.
12722
     */
553 chandransh 12723
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 12724
      __isset_bit_vector.clear();
12725
      __isset_bit_vector.or(other.__isset_bit_vector);
12726
      this.success = other.success;
12727
      if (other.isSetUcx()) {
12728
        this.ucx = new UserContextException(other.ucx);
12729
      }
12730
    }
12731
 
553 chandransh 12732
    public setDefaultAddress_result deepCopy() {
12733
      return new setDefaultAddress_result(this);
48 ashish 12734
    }
12735
 
12736
    @Deprecated
553 chandransh 12737
    public setDefaultAddress_result clone() {
12738
      return new setDefaultAddress_result(this);
48 ashish 12739
    }
12740
 
12741
    public boolean isSuccess() {
12742
      return this.success;
12743
    }
12744
 
553 chandransh 12745
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 12746
      this.success = success;
12747
      setSuccessIsSet(true);
12748
      return this;
12749
    }
12750
 
12751
    public void unsetSuccess() {
12752
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12753
    }
12754
 
12755
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12756
    public boolean isSetSuccess() {
12757
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12758
    }
12759
 
12760
    public void setSuccessIsSet(boolean value) {
12761
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12762
    }
12763
 
12764
    public UserContextException getUcx() {
12765
      return this.ucx;
12766
    }
12767
 
553 chandransh 12768
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 12769
      this.ucx = ucx;
12770
      return this;
12771
    }
12772
 
12773
    public void unsetUcx() {
12774
      this.ucx = null;
12775
    }
12776
 
12777
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12778
    public boolean isSetUcx() {
12779
      return this.ucx != null;
12780
    }
12781
 
12782
    public void setUcxIsSet(boolean value) {
12783
      if (!value) {
12784
        this.ucx = null;
12785
      }
12786
    }
12787
 
12788
    public void setFieldValue(_Fields field, Object value) {
12789
      switch (field) {
12790
      case SUCCESS:
12791
        if (value == null) {
12792
          unsetSuccess();
12793
        } else {
12794
          setSuccess((Boolean)value);
12795
        }
12796
        break;
12797
 
12798
      case UCX:
12799
        if (value == null) {
12800
          unsetUcx();
12801
        } else {
12802
          setUcx((UserContextException)value);
12803
        }
12804
        break;
12805
 
12806
      }
12807
    }
12808
 
12809
    public void setFieldValue(int fieldID, Object value) {
12810
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12811
    }
12812
 
12813
    public Object getFieldValue(_Fields field) {
12814
      switch (field) {
12815
      case SUCCESS:
12816
        return new Boolean(isSuccess());
12817
 
12818
      case UCX:
12819
        return getUcx();
12820
 
12821
      }
12822
      throw new IllegalStateException();
12823
    }
12824
 
12825
    public Object getFieldValue(int fieldId) {
12826
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12827
    }
12828
 
12829
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12830
    public boolean isSet(_Fields field) {
12831
      switch (field) {
12832
      case SUCCESS:
12833
        return isSetSuccess();
12834
      case UCX:
12835
        return isSetUcx();
12836
      }
12837
      throw new IllegalStateException();
12838
    }
12839
 
12840
    public boolean isSet(int fieldID) {
12841
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12842
    }
12843
 
12844
    @Override
12845
    public boolean equals(Object that) {
12846
      if (that == null)
12847
        return false;
553 chandransh 12848
      if (that instanceof setDefaultAddress_result)
12849
        return this.equals((setDefaultAddress_result)that);
48 ashish 12850
      return false;
12851
    }
12852
 
553 chandransh 12853
    public boolean equals(setDefaultAddress_result that) {
48 ashish 12854
      if (that == null)
12855
        return false;
12856
 
12857
      boolean this_present_success = true;
12858
      boolean that_present_success = true;
12859
      if (this_present_success || that_present_success) {
12860
        if (!(this_present_success && that_present_success))
12861
          return false;
12862
        if (this.success != that.success)
12863
          return false;
12864
      }
12865
 
12866
      boolean this_present_ucx = true && this.isSetUcx();
12867
      boolean that_present_ucx = true && that.isSetUcx();
12868
      if (this_present_ucx || that_present_ucx) {
12869
        if (!(this_present_ucx && that_present_ucx))
12870
          return false;
12871
        if (!this.ucx.equals(that.ucx))
12872
          return false;
12873
      }
12874
 
12875
      return true;
12876
    }
12877
 
12878
    @Override
12879
    public int hashCode() {
12880
      return 0;
12881
    }
12882
 
553 chandransh 12883
    public int compareTo(setDefaultAddress_result other) {
48 ashish 12884
      if (!getClass().equals(other.getClass())) {
12885
        return getClass().getName().compareTo(other.getClass().getName());
12886
      }
12887
 
12888
      int lastComparison = 0;
553 chandransh 12889
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 12890
 
12891
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12892
      if (lastComparison != 0) {
12893
        return lastComparison;
12894
      }
12895
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12896
      if (lastComparison != 0) {
12897
        return lastComparison;
12898
      }
12899
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12900
      if (lastComparison != 0) {
12901
        return lastComparison;
12902
      }
12903
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12904
      if (lastComparison != 0) {
12905
        return lastComparison;
12906
      }
12907
      return 0;
12908
    }
12909
 
12910
    public void read(TProtocol iprot) throws TException {
12911
      TField field;
12912
      iprot.readStructBegin();
12913
      while (true)
12914
      {
12915
        field = iprot.readFieldBegin();
12916
        if (field.type == TType.STOP) { 
12917
          break;
12918
        }
12919
        _Fields fieldId = _Fields.findByThriftId(field.id);
12920
        if (fieldId == null) {
12921
          TProtocolUtil.skip(iprot, field.type);
12922
        } else {
12923
          switch (fieldId) {
12924
            case SUCCESS:
12925
              if (field.type == TType.BOOL) {
12926
                this.success = iprot.readBool();
12927
                setSuccessIsSet(true);
12928
              } else { 
12929
                TProtocolUtil.skip(iprot, field.type);
12930
              }
12931
              break;
12932
            case UCX:
12933
              if (field.type == TType.STRUCT) {
12934
                this.ucx = new UserContextException();
12935
                this.ucx.read(iprot);
12936
              } else { 
12937
                TProtocolUtil.skip(iprot, field.type);
12938
              }
12939
              break;
12940
          }
12941
          iprot.readFieldEnd();
12942
        }
12943
      }
12944
      iprot.readStructEnd();
12945
      validate();
12946
    }
12947
 
12948
    public void write(TProtocol oprot) throws TException {
12949
      oprot.writeStructBegin(STRUCT_DESC);
12950
 
12951
      if (this.isSetSuccess()) {
12952
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12953
        oprot.writeBool(this.success);
12954
        oprot.writeFieldEnd();
12955
      } else if (this.isSetUcx()) {
12956
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12957
        this.ucx.write(oprot);
12958
        oprot.writeFieldEnd();
12959
      }
12960
      oprot.writeFieldStop();
12961
      oprot.writeStructEnd();
12962
    }
12963
 
12964
    @Override
12965
    public String toString() {
553 chandransh 12966
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 12967
      boolean first = true;
12968
 
12969
      sb.append("success:");
12970
      sb.append(this.success);
12971
      first = false;
12972
      if (!first) sb.append(", ");
12973
      sb.append("ucx:");
12974
      if (this.ucx == null) {
12975
        sb.append("null");
12976
      } else {
12977
        sb.append(this.ucx);
12978
      }
12979
      first = false;
12980
      sb.append(")");
12981
      return sb.toString();
12982
    }
12983
 
12984
    public void validate() throws TException {
12985
      // check for required fields
12986
    }
12987
 
12988
  }
12989
 
553 chandransh 12990
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12991
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 12992
 
553 chandransh 12993
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 12994
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
12995
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 12996
 
553 chandransh 12997
    private long userid;
593 rajveer 12998
    private String oldPassword;
12999
    private String newPassword;
48 ashish 13000
 
13001
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13002
    public enum _Fields implements TFieldIdEnum {
553 chandransh 13003
      USERID((short)1, "userid"),
593 rajveer 13004
      OLD_PASSWORD((short)2, "oldPassword"),
13005
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 13006
 
13007
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13008
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13009
 
13010
      static {
13011
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13012
          byId.put((int)field._thriftId, field);
13013
          byName.put(field.getFieldName(), field);
13014
        }
13015
      }
13016
 
13017
      /**
13018
       * Find the _Fields constant that matches fieldId, or null if its not found.
13019
       */
13020
      public static _Fields findByThriftId(int fieldId) {
13021
        return byId.get(fieldId);
13022
      }
13023
 
13024
      /**
13025
       * Find the _Fields constant that matches fieldId, throwing an exception
13026
       * if it is not found.
13027
       */
13028
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13029
        _Fields fields = findByThriftId(fieldId);
13030
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13031
        return fields;
13032
      }
13033
 
13034
      /**
13035
       * Find the _Fields constant that matches name, or null if its not found.
13036
       */
13037
      public static _Fields findByName(String name) {
13038
        return byName.get(name);
13039
      }
13040
 
13041
      private final short _thriftId;
13042
      private final String _fieldName;
13043
 
13044
      _Fields(short thriftId, String fieldName) {
13045
        _thriftId = thriftId;
13046
        _fieldName = fieldName;
13047
      }
13048
 
13049
      public short getThriftFieldId() {
13050
        return _thriftId;
13051
      }
13052
 
13053
      public String getFieldName() {
13054
        return _fieldName;
13055
      }
13056
    }
13057
 
13058
    // isset id assignments
13059
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 13060
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 13061
 
13062
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 13063
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 13064
          new FieldValueMetaData(TType.I64)));
593 rajveer 13065
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 13066
          new FieldValueMetaData(TType.STRING)));
593 rajveer 13067
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
13068
          new FieldValueMetaData(TType.STRING)));
48 ashish 13069
    }});
13070
 
13071
    static {
553 chandransh 13072
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 13073
    }
13074
 
553 chandransh 13075
    public updatePassword_args() {
48 ashish 13076
    }
13077
 
553 chandransh 13078
    public updatePassword_args(
13079
      long userid,
593 rajveer 13080
      String oldPassword,
13081
      String newPassword)
48 ashish 13082
    {
13083
      this();
553 chandransh 13084
      this.userid = userid;
13085
      setUseridIsSet(true);
593 rajveer 13086
      this.oldPassword = oldPassword;
13087
      this.newPassword = newPassword;
48 ashish 13088
    }
13089
 
13090
    /**
13091
     * Performs a deep copy on <i>other</i>.
13092
     */
553 chandransh 13093
    public updatePassword_args(updatePassword_args other) {
48 ashish 13094
      __isset_bit_vector.clear();
13095
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 13096
      this.userid = other.userid;
593 rajveer 13097
      if (other.isSetOldPassword()) {
13098
        this.oldPassword = other.oldPassword;
553 chandransh 13099
      }
593 rajveer 13100
      if (other.isSetNewPassword()) {
13101
        this.newPassword = other.newPassword;
13102
      }
48 ashish 13103
    }
13104
 
553 chandransh 13105
    public updatePassword_args deepCopy() {
13106
      return new updatePassword_args(this);
48 ashish 13107
    }
13108
 
13109
    @Deprecated
553 chandransh 13110
    public updatePassword_args clone() {
13111
      return new updatePassword_args(this);
48 ashish 13112
    }
13113
 
553 chandransh 13114
    public long getUserid() {
13115
      return this.userid;
48 ashish 13116
    }
13117
 
553 chandransh 13118
    public updatePassword_args setUserid(long userid) {
13119
      this.userid = userid;
13120
      setUseridIsSet(true);
48 ashish 13121
      return this;
13122
    }
13123
 
553 chandransh 13124
    public void unsetUserid() {
48 ashish 13125
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13126
    }
13127
 
553 chandransh 13128
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
13129
    public boolean isSetUserid() {
48 ashish 13130
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13131
    }
13132
 
553 chandransh 13133
    public void setUseridIsSet(boolean value) {
48 ashish 13134
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13135
    }
13136
 
593 rajveer 13137
    public String getOldPassword() {
13138
      return this.oldPassword;
48 ashish 13139
    }
13140
 
593 rajveer 13141
    public updatePassword_args setOldPassword(String oldPassword) {
13142
      this.oldPassword = oldPassword;
48 ashish 13143
      return this;
13144
    }
13145
 
593 rajveer 13146
    public void unsetOldPassword() {
13147
      this.oldPassword = null;
48 ashish 13148
    }
13149
 
593 rajveer 13150
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
13151
    public boolean isSetOldPassword() {
13152
      return this.oldPassword != null;
48 ashish 13153
    }
13154
 
593 rajveer 13155
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 13156
      if (!value) {
593 rajveer 13157
        this.oldPassword = null;
553 chandransh 13158
      }
48 ashish 13159
    }
13160
 
593 rajveer 13161
    public String getNewPassword() {
13162
      return this.newPassword;
13163
    }
13164
 
13165
    public updatePassword_args setNewPassword(String newPassword) {
13166
      this.newPassword = newPassword;
13167
      return this;
13168
    }
13169
 
13170
    public void unsetNewPassword() {
13171
      this.newPassword = null;
13172
    }
13173
 
13174
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
13175
    public boolean isSetNewPassword() {
13176
      return this.newPassword != null;
13177
    }
13178
 
13179
    public void setNewPasswordIsSet(boolean value) {
13180
      if (!value) {
13181
        this.newPassword = null;
13182
      }
13183
    }
13184
 
48 ashish 13185
    public void setFieldValue(_Fields field, Object value) {
13186
      switch (field) {
553 chandransh 13187
      case USERID:
48 ashish 13188
        if (value == null) {
553 chandransh 13189
          unsetUserid();
48 ashish 13190
        } else {
553 chandransh 13191
          setUserid((Long)value);
48 ashish 13192
        }
13193
        break;
13194
 
593 rajveer 13195
      case OLD_PASSWORD:
48 ashish 13196
        if (value == null) {
593 rajveer 13197
          unsetOldPassword();
48 ashish 13198
        } else {
593 rajveer 13199
          setOldPassword((String)value);
48 ashish 13200
        }
13201
        break;
13202
 
593 rajveer 13203
      case NEW_PASSWORD:
13204
        if (value == null) {
13205
          unsetNewPassword();
13206
        } else {
13207
          setNewPassword((String)value);
13208
        }
13209
        break;
13210
 
48 ashish 13211
      }
13212
    }
13213
 
13214
    public void setFieldValue(int fieldID, Object value) {
13215
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13216
    }
13217
 
13218
    public Object getFieldValue(_Fields field) {
13219
      switch (field) {
553 chandransh 13220
      case USERID:
13221
        return new Long(getUserid());
48 ashish 13222
 
593 rajveer 13223
      case OLD_PASSWORD:
13224
        return getOldPassword();
48 ashish 13225
 
593 rajveer 13226
      case NEW_PASSWORD:
13227
        return getNewPassword();
13228
 
48 ashish 13229
      }
13230
      throw new IllegalStateException();
13231
    }
13232
 
13233
    public Object getFieldValue(int fieldId) {
13234
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13235
    }
13236
 
13237
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13238
    public boolean isSet(_Fields field) {
13239
      switch (field) {
553 chandransh 13240
      case USERID:
13241
        return isSetUserid();
593 rajveer 13242
      case OLD_PASSWORD:
13243
        return isSetOldPassword();
13244
      case NEW_PASSWORD:
13245
        return isSetNewPassword();
48 ashish 13246
      }
13247
      throw new IllegalStateException();
13248
    }
13249
 
13250
    public boolean isSet(int fieldID) {
13251
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13252
    }
13253
 
13254
    @Override
13255
    public boolean equals(Object that) {
13256
      if (that == null)
13257
        return false;
553 chandransh 13258
      if (that instanceof updatePassword_args)
13259
        return this.equals((updatePassword_args)that);
48 ashish 13260
      return false;
13261
    }
13262
 
553 chandransh 13263
    public boolean equals(updatePassword_args that) {
48 ashish 13264
      if (that == null)
13265
        return false;
13266
 
553 chandransh 13267
      boolean this_present_userid = true;
13268
      boolean that_present_userid = true;
13269
      if (this_present_userid || that_present_userid) {
13270
        if (!(this_present_userid && that_present_userid))
48 ashish 13271
          return false;
553 chandransh 13272
        if (this.userid != that.userid)
48 ashish 13273
          return false;
13274
      }
13275
 
593 rajveer 13276
      boolean this_present_oldPassword = true && this.isSetOldPassword();
13277
      boolean that_present_oldPassword = true && that.isSetOldPassword();
13278
      if (this_present_oldPassword || that_present_oldPassword) {
13279
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 13280
          return false;
593 rajveer 13281
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 13282
          return false;
13283
      }
13284
 
593 rajveer 13285
      boolean this_present_newPassword = true && this.isSetNewPassword();
13286
      boolean that_present_newPassword = true && that.isSetNewPassword();
13287
      if (this_present_newPassword || that_present_newPassword) {
13288
        if (!(this_present_newPassword && that_present_newPassword))
13289
          return false;
13290
        if (!this.newPassword.equals(that.newPassword))
13291
          return false;
13292
      }
13293
 
48 ashish 13294
      return true;
13295
    }
13296
 
13297
    @Override
13298
    public int hashCode() {
13299
      return 0;
13300
    }
13301
 
553 chandransh 13302
    public int compareTo(updatePassword_args other) {
48 ashish 13303
      if (!getClass().equals(other.getClass())) {
13304
        return getClass().getName().compareTo(other.getClass().getName());
13305
      }
13306
 
13307
      int lastComparison = 0;
553 chandransh 13308
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 13309
 
553 chandransh 13310
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 13311
      if (lastComparison != 0) {
13312
        return lastComparison;
13313
      }
553 chandransh 13314
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 13315
      if (lastComparison != 0) {
13316
        return lastComparison;
13317
      }
593 rajveer 13318
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 13319
      if (lastComparison != 0) {
13320
        return lastComparison;
13321
      }
593 rajveer 13322
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 13323
      if (lastComparison != 0) {
13324
        return lastComparison;
13325
      }
593 rajveer 13326
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
13327
      if (lastComparison != 0) {
13328
        return lastComparison;
13329
      }
13330
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
13331
      if (lastComparison != 0) {
13332
        return lastComparison;
13333
      }
48 ashish 13334
      return 0;
13335
    }
13336
 
13337
    public void read(TProtocol iprot) throws TException {
13338
      TField field;
13339
      iprot.readStructBegin();
13340
      while (true)
13341
      {
13342
        field = iprot.readFieldBegin();
13343
        if (field.type == TType.STOP) { 
13344
          break;
13345
        }
13346
        _Fields fieldId = _Fields.findByThriftId(field.id);
13347
        if (fieldId == null) {
13348
          TProtocolUtil.skip(iprot, field.type);
13349
        } else {
13350
          switch (fieldId) {
553 chandransh 13351
            case USERID:
48 ashish 13352
              if (field.type == TType.I64) {
553 chandransh 13353
                this.userid = iprot.readI64();
13354
                setUseridIsSet(true);
48 ashish 13355
              } else { 
13356
                TProtocolUtil.skip(iprot, field.type);
13357
              }
13358
              break;
593 rajveer 13359
            case OLD_PASSWORD:
553 chandransh 13360
              if (field.type == TType.STRING) {
593 rajveer 13361
                this.oldPassword = iprot.readString();
48 ashish 13362
              } else { 
13363
                TProtocolUtil.skip(iprot, field.type);
13364
              }
13365
              break;
593 rajveer 13366
            case NEW_PASSWORD:
13367
              if (field.type == TType.STRING) {
13368
                this.newPassword = iprot.readString();
13369
              } else { 
13370
                TProtocolUtil.skip(iprot, field.type);
13371
              }
13372
              break;
48 ashish 13373
          }
13374
          iprot.readFieldEnd();
13375
        }
13376
      }
13377
      iprot.readStructEnd();
13378
      validate();
13379
    }
13380
 
13381
    public void write(TProtocol oprot) throws TException {
13382
      validate();
13383
 
13384
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 13385
      oprot.writeFieldBegin(USERID_FIELD_DESC);
13386
      oprot.writeI64(this.userid);
48 ashish 13387
      oprot.writeFieldEnd();
593 rajveer 13388
      if (this.oldPassword != null) {
13389
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
13390
        oprot.writeString(this.oldPassword);
553 chandransh 13391
        oprot.writeFieldEnd();
13392
      }
593 rajveer 13393
      if (this.newPassword != null) {
13394
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
13395
        oprot.writeString(this.newPassword);
13396
        oprot.writeFieldEnd();
13397
      }
48 ashish 13398
      oprot.writeFieldStop();
13399
      oprot.writeStructEnd();
13400
    }
13401
 
13402
    @Override
13403
    public String toString() {
553 chandransh 13404
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 13405
      boolean first = true;
13406
 
553 chandransh 13407
      sb.append("userid:");
13408
      sb.append(this.userid);
48 ashish 13409
      first = false;
13410
      if (!first) sb.append(", ");
593 rajveer 13411
      sb.append("oldPassword:");
13412
      if (this.oldPassword == null) {
553 chandransh 13413
        sb.append("null");
13414
      } else {
593 rajveer 13415
        sb.append(this.oldPassword);
553 chandransh 13416
      }
48 ashish 13417
      first = false;
593 rajveer 13418
      if (!first) sb.append(", ");
13419
      sb.append("newPassword:");
13420
      if (this.newPassword == null) {
13421
        sb.append("null");
13422
      } else {
13423
        sb.append(this.newPassword);
13424
      }
13425
      first = false;
48 ashish 13426
      sb.append(")");
13427
      return sb.toString();
13428
    }
13429
 
13430
    public void validate() throws TException {
13431
      // check for required fields
13432
    }
13433
 
13434
  }
13435
 
553 chandransh 13436
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
13437
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 13438
 
13439
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13440
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13441
 
13442
    private boolean success;
13443
    private UserContextException ucx;
13444
 
13445
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13446
    public enum _Fields implements TFieldIdEnum {
13447
      SUCCESS((short)0, "success"),
13448
      UCX((short)1, "ucx");
13449
 
13450
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13451
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13452
 
13453
      static {
13454
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13455
          byId.put((int)field._thriftId, field);
13456
          byName.put(field.getFieldName(), field);
13457
        }
13458
      }
13459
 
13460
      /**
13461
       * Find the _Fields constant that matches fieldId, or null if its not found.
13462
       */
13463
      public static _Fields findByThriftId(int fieldId) {
13464
        return byId.get(fieldId);
13465
      }
13466
 
13467
      /**
13468
       * Find the _Fields constant that matches fieldId, throwing an exception
13469
       * if it is not found.
13470
       */
13471
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13472
        _Fields fields = findByThriftId(fieldId);
13473
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13474
        return fields;
13475
      }
13476
 
13477
      /**
13478
       * Find the _Fields constant that matches name, or null if its not found.
13479
       */
13480
      public static _Fields findByName(String name) {
13481
        return byName.get(name);
13482
      }
13483
 
13484
      private final short _thriftId;
13485
      private final String _fieldName;
13486
 
13487
      _Fields(short thriftId, String fieldName) {
13488
        _thriftId = thriftId;
13489
        _fieldName = fieldName;
13490
      }
13491
 
13492
      public short getThriftFieldId() {
13493
        return _thriftId;
13494
      }
13495
 
13496
      public String getFieldName() {
13497
        return _fieldName;
13498
      }
13499
    }
13500
 
13501
    // isset id assignments
13502
    private static final int __SUCCESS_ISSET_ID = 0;
13503
    private BitSet __isset_bit_vector = new BitSet(1);
13504
 
13505
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13506
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13507
          new FieldValueMetaData(TType.BOOL)));
13508
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13509
          new FieldValueMetaData(TType.STRUCT)));
13510
    }});
13511
 
13512
    static {
553 chandransh 13513
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 13514
    }
13515
 
553 chandransh 13516
    public updatePassword_result() {
48 ashish 13517
    }
13518
 
553 chandransh 13519
    public updatePassword_result(
48 ashish 13520
      boolean success,
13521
      UserContextException ucx)
13522
    {
13523
      this();
13524
      this.success = success;
13525
      setSuccessIsSet(true);
13526
      this.ucx = ucx;
13527
    }
13528
 
13529
    /**
13530
     * Performs a deep copy on <i>other</i>.
13531
     */
553 chandransh 13532
    public updatePassword_result(updatePassword_result other) {
48 ashish 13533
      __isset_bit_vector.clear();
13534
      __isset_bit_vector.or(other.__isset_bit_vector);
13535
      this.success = other.success;
13536
      if (other.isSetUcx()) {
13537
        this.ucx = new UserContextException(other.ucx);
13538
      }
13539
    }
13540
 
553 chandransh 13541
    public updatePassword_result deepCopy() {
13542
      return new updatePassword_result(this);
48 ashish 13543
    }
13544
 
13545
    @Deprecated
553 chandransh 13546
    public updatePassword_result clone() {
13547
      return new updatePassword_result(this);
48 ashish 13548
    }
13549
 
13550
    public boolean isSuccess() {
13551
      return this.success;
13552
    }
13553
 
553 chandransh 13554
    public updatePassword_result setSuccess(boolean success) {
48 ashish 13555
      this.success = success;
13556
      setSuccessIsSet(true);
13557
      return this;
13558
    }
13559
 
13560
    public void unsetSuccess() {
13561
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13562
    }
13563
 
13564
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13565
    public boolean isSetSuccess() {
13566
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13567
    }
13568
 
13569
    public void setSuccessIsSet(boolean value) {
13570
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13571
    }
13572
 
13573
    public UserContextException getUcx() {
13574
      return this.ucx;
13575
    }
13576
 
553 chandransh 13577
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 13578
      this.ucx = ucx;
13579
      return this;
13580
    }
13581
 
13582
    public void unsetUcx() {
13583
      this.ucx = null;
13584
    }
13585
 
13586
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13587
    public boolean isSetUcx() {
13588
      return this.ucx != null;
13589
    }
13590
 
13591
    public void setUcxIsSet(boolean value) {
13592
      if (!value) {
13593
        this.ucx = null;
13594
      }
13595
    }
13596
 
13597
    public void setFieldValue(_Fields field, Object value) {
13598
      switch (field) {
13599
      case SUCCESS:
13600
        if (value == null) {
13601
          unsetSuccess();
13602
        } else {
13603
          setSuccess((Boolean)value);
13604
        }
13605
        break;
13606
 
13607
      case UCX:
13608
        if (value == null) {
13609
          unsetUcx();
13610
        } else {
13611
          setUcx((UserContextException)value);
13612
        }
13613
        break;
13614
 
13615
      }
13616
    }
13617
 
13618
    public void setFieldValue(int fieldID, Object value) {
13619
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13620
    }
13621
 
13622
    public Object getFieldValue(_Fields field) {
13623
      switch (field) {
13624
      case SUCCESS:
13625
        return new Boolean(isSuccess());
13626
 
13627
      case UCX:
13628
        return getUcx();
13629
 
13630
      }
13631
      throw new IllegalStateException();
13632
    }
13633
 
13634
    public Object getFieldValue(int fieldId) {
13635
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13636
    }
13637
 
13638
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13639
    public boolean isSet(_Fields field) {
13640
      switch (field) {
13641
      case SUCCESS:
13642
        return isSetSuccess();
13643
      case UCX:
13644
        return isSetUcx();
13645
      }
13646
      throw new IllegalStateException();
13647
    }
13648
 
13649
    public boolean isSet(int fieldID) {
13650
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13651
    }
13652
 
13653
    @Override
13654
    public boolean equals(Object that) {
13655
      if (that == null)
13656
        return false;
553 chandransh 13657
      if (that instanceof updatePassword_result)
13658
        return this.equals((updatePassword_result)that);
48 ashish 13659
      return false;
13660
    }
13661
 
553 chandransh 13662
    public boolean equals(updatePassword_result that) {
48 ashish 13663
      if (that == null)
13664
        return false;
13665
 
13666
      boolean this_present_success = true;
13667
      boolean that_present_success = true;
13668
      if (this_present_success || that_present_success) {
13669
        if (!(this_present_success && that_present_success))
13670
          return false;
13671
        if (this.success != that.success)
13672
          return false;
13673
      }
13674
 
13675
      boolean this_present_ucx = true && this.isSetUcx();
13676
      boolean that_present_ucx = true && that.isSetUcx();
13677
      if (this_present_ucx || that_present_ucx) {
13678
        if (!(this_present_ucx && that_present_ucx))
13679
          return false;
13680
        if (!this.ucx.equals(that.ucx))
13681
          return false;
13682
      }
13683
 
13684
      return true;
13685
    }
13686
 
13687
    @Override
13688
    public int hashCode() {
13689
      return 0;
13690
    }
13691
 
553 chandransh 13692
    public int compareTo(updatePassword_result other) {
48 ashish 13693
      if (!getClass().equals(other.getClass())) {
13694
        return getClass().getName().compareTo(other.getClass().getName());
13695
      }
13696
 
13697
      int lastComparison = 0;
553 chandransh 13698
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 13699
 
13700
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13701
      if (lastComparison != 0) {
13702
        return lastComparison;
13703
      }
13704
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13705
      if (lastComparison != 0) {
13706
        return lastComparison;
13707
      }
13708
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13709
      if (lastComparison != 0) {
13710
        return lastComparison;
13711
      }
13712
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13713
      if (lastComparison != 0) {
13714
        return lastComparison;
13715
      }
13716
      return 0;
13717
    }
13718
 
13719
    public void read(TProtocol iprot) throws TException {
13720
      TField field;
13721
      iprot.readStructBegin();
13722
      while (true)
13723
      {
13724
        field = iprot.readFieldBegin();
13725
        if (field.type == TType.STOP) { 
13726
          break;
13727
        }
13728
        _Fields fieldId = _Fields.findByThriftId(field.id);
13729
        if (fieldId == null) {
13730
          TProtocolUtil.skip(iprot, field.type);
13731
        } else {
13732
          switch (fieldId) {
13733
            case SUCCESS:
13734
              if (field.type == TType.BOOL) {
13735
                this.success = iprot.readBool();
13736
                setSuccessIsSet(true);
13737
              } else { 
13738
                TProtocolUtil.skip(iprot, field.type);
13739
              }
13740
              break;
13741
            case UCX:
13742
              if (field.type == TType.STRUCT) {
13743
                this.ucx = new UserContextException();
13744
                this.ucx.read(iprot);
13745
              } else { 
13746
                TProtocolUtil.skip(iprot, field.type);
13747
              }
13748
              break;
13749
          }
13750
          iprot.readFieldEnd();
13751
        }
13752
      }
13753
      iprot.readStructEnd();
13754
      validate();
13755
    }
13756
 
13757
    public void write(TProtocol oprot) throws TException {
13758
      oprot.writeStructBegin(STRUCT_DESC);
13759
 
13760
      if (this.isSetSuccess()) {
13761
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13762
        oprot.writeBool(this.success);
13763
        oprot.writeFieldEnd();
13764
      } else if (this.isSetUcx()) {
13765
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13766
        this.ucx.write(oprot);
13767
        oprot.writeFieldEnd();
13768
      }
13769
      oprot.writeFieldStop();
13770
      oprot.writeStructEnd();
13771
    }
13772
 
13773
    @Override
13774
    public String toString() {
553 chandransh 13775
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 13776
      boolean first = true;
13777
 
13778
      sb.append("success:");
13779
      sb.append(this.success);
13780
      first = false;
13781
      if (!first) sb.append(", ");
13782
      sb.append("ucx:");
13783
      if (this.ucx == null) {
13784
        sb.append("null");
13785
      } else {
13786
        sb.append(this.ucx);
13787
      }
13788
      first = false;
13789
      sb.append(")");
13790
      return sb.toString();
13791
    }
13792
 
13793
    public void validate() throws TException {
13794
      // check for required fields
13795
    }
13796
 
13797
  }
13798
 
582 rajveer 13799
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
13800
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
13801
 
13802
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
896 rajveer 13803
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)2);
582 rajveer 13804
 
13805
    private String email;
896 rajveer 13806
    private String newPassword;
582 rajveer 13807
 
13808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13809
    public enum _Fields implements TFieldIdEnum {
896 rajveer 13810
      EMAIL((short)1, "email"),
13811
      NEW_PASSWORD((short)2, "newPassword");
582 rajveer 13812
 
13813
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13814
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13815
 
13816
      static {
13817
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13818
          byId.put((int)field._thriftId, field);
13819
          byName.put(field.getFieldName(), field);
13820
        }
13821
      }
13822
 
13823
      /**
13824
       * Find the _Fields constant that matches fieldId, or null if its not found.
13825
       */
13826
      public static _Fields findByThriftId(int fieldId) {
13827
        return byId.get(fieldId);
13828
      }
13829
 
13830
      /**
13831
       * Find the _Fields constant that matches fieldId, throwing an exception
13832
       * if it is not found.
13833
       */
13834
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13835
        _Fields fields = findByThriftId(fieldId);
13836
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13837
        return fields;
13838
      }
13839
 
13840
      /**
13841
       * Find the _Fields constant that matches name, or null if its not found.
13842
       */
13843
      public static _Fields findByName(String name) {
13844
        return byName.get(name);
13845
      }
13846
 
13847
      private final short _thriftId;
13848
      private final String _fieldName;
13849
 
13850
      _Fields(short thriftId, String fieldName) {
13851
        _thriftId = thriftId;
13852
        _fieldName = fieldName;
13853
      }
13854
 
13855
      public short getThriftFieldId() {
13856
        return _thriftId;
13857
      }
13858
 
13859
      public String getFieldName() {
13860
        return _fieldName;
13861
      }
13862
    }
13863
 
13864
    // isset id assignments
13865
 
13866
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13867
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
13868
          new FieldValueMetaData(TType.STRING)));
896 rajveer 13869
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
13870
          new FieldValueMetaData(TType.STRING)));
582 rajveer 13871
    }});
13872
 
13873
    static {
13874
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
13875
    }
13876
 
13877
    public forgotPassword_args() {
13878
    }
13879
 
13880
    public forgotPassword_args(
896 rajveer 13881
      String email,
13882
      String newPassword)
582 rajveer 13883
    {
13884
      this();
13885
      this.email = email;
896 rajveer 13886
      this.newPassword = newPassword;
582 rajveer 13887
    }
13888
 
13889
    /**
13890
     * Performs a deep copy on <i>other</i>.
13891
     */
13892
    public forgotPassword_args(forgotPassword_args other) {
13893
      if (other.isSetEmail()) {
13894
        this.email = other.email;
13895
      }
896 rajveer 13896
      if (other.isSetNewPassword()) {
13897
        this.newPassword = other.newPassword;
13898
      }
582 rajveer 13899
    }
13900
 
13901
    public forgotPassword_args deepCopy() {
13902
      return new forgotPassword_args(this);
13903
    }
13904
 
13905
    @Deprecated
13906
    public forgotPassword_args clone() {
13907
      return new forgotPassword_args(this);
13908
    }
13909
 
13910
    public String getEmail() {
13911
      return this.email;
13912
    }
13913
 
13914
    public forgotPassword_args setEmail(String email) {
13915
      this.email = email;
13916
      return this;
13917
    }
13918
 
13919
    public void unsetEmail() {
13920
      this.email = null;
13921
    }
13922
 
13923
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
13924
    public boolean isSetEmail() {
13925
      return this.email != null;
13926
    }
13927
 
13928
    public void setEmailIsSet(boolean value) {
13929
      if (!value) {
13930
        this.email = null;
13931
      }
13932
    }
13933
 
896 rajveer 13934
    public String getNewPassword() {
13935
      return this.newPassword;
13936
    }
13937
 
13938
    public forgotPassword_args setNewPassword(String newPassword) {
13939
      this.newPassword = newPassword;
13940
      return this;
13941
    }
13942
 
13943
    public void unsetNewPassword() {
13944
      this.newPassword = null;
13945
    }
13946
 
13947
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
13948
    public boolean isSetNewPassword() {
13949
      return this.newPassword != null;
13950
    }
13951
 
13952
    public void setNewPasswordIsSet(boolean value) {
13953
      if (!value) {
13954
        this.newPassword = null;
13955
      }
13956
    }
13957
 
582 rajveer 13958
    public void setFieldValue(_Fields field, Object value) {
13959
      switch (field) {
13960
      case EMAIL:
13961
        if (value == null) {
13962
          unsetEmail();
13963
        } else {
13964
          setEmail((String)value);
13965
        }
13966
        break;
13967
 
896 rajveer 13968
      case NEW_PASSWORD:
13969
        if (value == null) {
13970
          unsetNewPassword();
13971
        } else {
13972
          setNewPassword((String)value);
13973
        }
13974
        break;
13975
 
582 rajveer 13976
      }
13977
    }
13978
 
13979
    public void setFieldValue(int fieldID, Object value) {
13980
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13981
    }
13982
 
13983
    public Object getFieldValue(_Fields field) {
13984
      switch (field) {
13985
      case EMAIL:
13986
        return getEmail();
13987
 
896 rajveer 13988
      case NEW_PASSWORD:
13989
        return getNewPassword();
13990
 
582 rajveer 13991
      }
13992
      throw new IllegalStateException();
13993
    }
13994
 
13995
    public Object getFieldValue(int fieldId) {
13996
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13997
    }
13998
 
13999
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14000
    public boolean isSet(_Fields field) {
14001
      switch (field) {
14002
      case EMAIL:
14003
        return isSetEmail();
896 rajveer 14004
      case NEW_PASSWORD:
14005
        return isSetNewPassword();
582 rajveer 14006
      }
14007
      throw new IllegalStateException();
14008
    }
14009
 
14010
    public boolean isSet(int fieldID) {
14011
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14012
    }
14013
 
14014
    @Override
14015
    public boolean equals(Object that) {
14016
      if (that == null)
14017
        return false;
14018
      if (that instanceof forgotPassword_args)
14019
        return this.equals((forgotPassword_args)that);
14020
      return false;
14021
    }
14022
 
14023
    public boolean equals(forgotPassword_args that) {
14024
      if (that == null)
14025
        return false;
14026
 
14027
      boolean this_present_email = true && this.isSetEmail();
14028
      boolean that_present_email = true && that.isSetEmail();
14029
      if (this_present_email || that_present_email) {
14030
        if (!(this_present_email && that_present_email))
14031
          return false;
14032
        if (!this.email.equals(that.email))
14033
          return false;
14034
      }
14035
 
896 rajveer 14036
      boolean this_present_newPassword = true && this.isSetNewPassword();
14037
      boolean that_present_newPassword = true && that.isSetNewPassword();
14038
      if (this_present_newPassword || that_present_newPassword) {
14039
        if (!(this_present_newPassword && that_present_newPassword))
14040
          return false;
14041
        if (!this.newPassword.equals(that.newPassword))
14042
          return false;
14043
      }
14044
 
582 rajveer 14045
      return true;
14046
    }
14047
 
14048
    @Override
14049
    public int hashCode() {
14050
      return 0;
14051
    }
14052
 
14053
    public int compareTo(forgotPassword_args other) {
14054
      if (!getClass().equals(other.getClass())) {
14055
        return getClass().getName().compareTo(other.getClass().getName());
14056
      }
14057
 
14058
      int lastComparison = 0;
14059
      forgotPassword_args typedOther = (forgotPassword_args)other;
14060
 
14061
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
14062
      if (lastComparison != 0) {
14063
        return lastComparison;
14064
      }
14065
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
14066
      if (lastComparison != 0) {
14067
        return lastComparison;
14068
      }
896 rajveer 14069
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
14070
      if (lastComparison != 0) {
14071
        return lastComparison;
14072
      }
14073
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
14074
      if (lastComparison != 0) {
14075
        return lastComparison;
14076
      }
582 rajveer 14077
      return 0;
14078
    }
14079
 
14080
    public void read(TProtocol iprot) throws TException {
14081
      TField field;
14082
      iprot.readStructBegin();
14083
      while (true)
14084
      {
14085
        field = iprot.readFieldBegin();
14086
        if (field.type == TType.STOP) { 
14087
          break;
14088
        }
14089
        _Fields fieldId = _Fields.findByThriftId(field.id);
14090
        if (fieldId == null) {
14091
          TProtocolUtil.skip(iprot, field.type);
14092
        } else {
14093
          switch (fieldId) {
14094
            case EMAIL:
14095
              if (field.type == TType.STRING) {
14096
                this.email = iprot.readString();
14097
              } else { 
14098
                TProtocolUtil.skip(iprot, field.type);
14099
              }
14100
              break;
896 rajveer 14101
            case NEW_PASSWORD:
14102
              if (field.type == TType.STRING) {
14103
                this.newPassword = iprot.readString();
14104
              } else { 
14105
                TProtocolUtil.skip(iprot, field.type);
14106
              }
14107
              break;
582 rajveer 14108
          }
14109
          iprot.readFieldEnd();
14110
        }
14111
      }
14112
      iprot.readStructEnd();
14113
      validate();
14114
    }
14115
 
14116
    public void write(TProtocol oprot) throws TException {
14117
      validate();
14118
 
14119
      oprot.writeStructBegin(STRUCT_DESC);
14120
      if (this.email != null) {
14121
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
14122
        oprot.writeString(this.email);
14123
        oprot.writeFieldEnd();
14124
      }
896 rajveer 14125
      if (this.newPassword != null) {
14126
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
14127
        oprot.writeString(this.newPassword);
14128
        oprot.writeFieldEnd();
14129
      }
582 rajveer 14130
      oprot.writeFieldStop();
14131
      oprot.writeStructEnd();
14132
    }
14133
 
14134
    @Override
14135
    public String toString() {
14136
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
14137
      boolean first = true;
14138
 
14139
      sb.append("email:");
14140
      if (this.email == null) {
14141
        sb.append("null");
14142
      } else {
14143
        sb.append(this.email);
14144
      }
14145
      first = false;
896 rajveer 14146
      if (!first) sb.append(", ");
14147
      sb.append("newPassword:");
14148
      if (this.newPassword == null) {
14149
        sb.append("null");
14150
      } else {
14151
        sb.append(this.newPassword);
14152
      }
14153
      first = false;
582 rajveer 14154
      sb.append(")");
14155
      return sb.toString();
14156
    }
14157
 
14158
    public void validate() throws TException {
14159
      // check for required fields
14160
    }
14161
 
14162
  }
14163
 
14164
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
14165
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
14166
 
14167
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14168
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14169
 
14170
    private boolean success;
14171
    private UserContextException ucx;
14172
 
14173
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14174
    public enum _Fields implements TFieldIdEnum {
14175
      SUCCESS((short)0, "success"),
14176
      UCX((short)1, "ucx");
14177
 
14178
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14179
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14180
 
14181
      static {
14182
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14183
          byId.put((int)field._thriftId, field);
14184
          byName.put(field.getFieldName(), field);
14185
        }
14186
      }
14187
 
14188
      /**
14189
       * Find the _Fields constant that matches fieldId, or null if its not found.
14190
       */
14191
      public static _Fields findByThriftId(int fieldId) {
14192
        return byId.get(fieldId);
14193
      }
14194
 
14195
      /**
14196
       * Find the _Fields constant that matches fieldId, throwing an exception
14197
       * if it is not found.
14198
       */
14199
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14200
        _Fields fields = findByThriftId(fieldId);
14201
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14202
        return fields;
14203
      }
14204
 
14205
      /**
14206
       * Find the _Fields constant that matches name, or null if its not found.
14207
       */
14208
      public static _Fields findByName(String name) {
14209
        return byName.get(name);
14210
      }
14211
 
14212
      private final short _thriftId;
14213
      private final String _fieldName;
14214
 
14215
      _Fields(short thriftId, String fieldName) {
14216
        _thriftId = thriftId;
14217
        _fieldName = fieldName;
14218
      }
14219
 
14220
      public short getThriftFieldId() {
14221
        return _thriftId;
14222
      }
14223
 
14224
      public String getFieldName() {
14225
        return _fieldName;
14226
      }
14227
    }
14228
 
14229
    // isset id assignments
14230
    private static final int __SUCCESS_ISSET_ID = 0;
14231
    private BitSet __isset_bit_vector = new BitSet(1);
14232
 
14233
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14234
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14235
          new FieldValueMetaData(TType.BOOL)));
14236
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14237
          new FieldValueMetaData(TType.STRUCT)));
14238
    }});
14239
 
14240
    static {
14241
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
14242
    }
14243
 
14244
    public forgotPassword_result() {
14245
    }
14246
 
14247
    public forgotPassword_result(
14248
      boolean success,
14249
      UserContextException ucx)
14250
    {
14251
      this();
14252
      this.success = success;
14253
      setSuccessIsSet(true);
14254
      this.ucx = ucx;
14255
    }
14256
 
14257
    /**
14258
     * Performs a deep copy on <i>other</i>.
14259
     */
14260
    public forgotPassword_result(forgotPassword_result other) {
14261
      __isset_bit_vector.clear();
14262
      __isset_bit_vector.or(other.__isset_bit_vector);
14263
      this.success = other.success;
14264
      if (other.isSetUcx()) {
14265
        this.ucx = new UserContextException(other.ucx);
14266
      }
14267
    }
14268
 
14269
    public forgotPassword_result deepCopy() {
14270
      return new forgotPassword_result(this);
14271
    }
14272
 
14273
    @Deprecated
14274
    public forgotPassword_result clone() {
14275
      return new forgotPassword_result(this);
14276
    }
14277
 
14278
    public boolean isSuccess() {
14279
      return this.success;
14280
    }
14281
 
14282
    public forgotPassword_result setSuccess(boolean success) {
14283
      this.success = success;
14284
      setSuccessIsSet(true);
14285
      return this;
14286
    }
14287
 
14288
    public void unsetSuccess() {
14289
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14290
    }
14291
 
14292
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14293
    public boolean isSetSuccess() {
14294
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14295
    }
14296
 
14297
    public void setSuccessIsSet(boolean value) {
14298
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14299
    }
14300
 
14301
    public UserContextException getUcx() {
14302
      return this.ucx;
14303
    }
14304
 
14305
    public forgotPassword_result setUcx(UserContextException ucx) {
14306
      this.ucx = ucx;
14307
      return this;
14308
    }
14309
 
14310
    public void unsetUcx() {
14311
      this.ucx = null;
14312
    }
14313
 
14314
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14315
    public boolean isSetUcx() {
14316
      return this.ucx != null;
14317
    }
14318
 
14319
    public void setUcxIsSet(boolean value) {
14320
      if (!value) {
14321
        this.ucx = null;
14322
      }
14323
    }
14324
 
14325
    public void setFieldValue(_Fields field, Object value) {
14326
      switch (field) {
14327
      case SUCCESS:
14328
        if (value == null) {
14329
          unsetSuccess();
14330
        } else {
14331
          setSuccess((Boolean)value);
14332
        }
14333
        break;
14334
 
14335
      case UCX:
14336
        if (value == null) {
14337
          unsetUcx();
14338
        } else {
14339
          setUcx((UserContextException)value);
14340
        }
14341
        break;
14342
 
14343
      }
14344
    }
14345
 
14346
    public void setFieldValue(int fieldID, Object value) {
14347
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14348
    }
14349
 
14350
    public Object getFieldValue(_Fields field) {
14351
      switch (field) {
14352
      case SUCCESS:
14353
        return new Boolean(isSuccess());
14354
 
14355
      case UCX:
14356
        return getUcx();
14357
 
14358
      }
14359
      throw new IllegalStateException();
14360
    }
14361
 
14362
    public Object getFieldValue(int fieldId) {
14363
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14364
    }
14365
 
14366
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14367
    public boolean isSet(_Fields field) {
14368
      switch (field) {
14369
      case SUCCESS:
14370
        return isSetSuccess();
14371
      case UCX:
14372
        return isSetUcx();
14373
      }
14374
      throw new IllegalStateException();
14375
    }
14376
 
14377
    public boolean isSet(int fieldID) {
14378
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14379
    }
14380
 
14381
    @Override
14382
    public boolean equals(Object that) {
14383
      if (that == null)
14384
        return false;
14385
      if (that instanceof forgotPassword_result)
14386
        return this.equals((forgotPassword_result)that);
14387
      return false;
14388
    }
14389
 
14390
    public boolean equals(forgotPassword_result that) {
14391
      if (that == null)
14392
        return false;
14393
 
14394
      boolean this_present_success = true;
14395
      boolean that_present_success = true;
14396
      if (this_present_success || that_present_success) {
14397
        if (!(this_present_success && that_present_success))
14398
          return false;
14399
        if (this.success != that.success)
14400
          return false;
14401
      }
14402
 
14403
      boolean this_present_ucx = true && this.isSetUcx();
14404
      boolean that_present_ucx = true && that.isSetUcx();
14405
      if (this_present_ucx || that_present_ucx) {
14406
        if (!(this_present_ucx && that_present_ucx))
14407
          return false;
14408
        if (!this.ucx.equals(that.ucx))
14409
          return false;
14410
      }
14411
 
14412
      return true;
14413
    }
14414
 
14415
    @Override
14416
    public int hashCode() {
14417
      return 0;
14418
    }
14419
 
14420
    public int compareTo(forgotPassword_result other) {
14421
      if (!getClass().equals(other.getClass())) {
14422
        return getClass().getName().compareTo(other.getClass().getName());
14423
      }
14424
 
14425
      int lastComparison = 0;
14426
      forgotPassword_result typedOther = (forgotPassword_result)other;
14427
 
14428
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14429
      if (lastComparison != 0) {
14430
        return lastComparison;
14431
      }
14432
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14433
      if (lastComparison != 0) {
14434
        return lastComparison;
14435
      }
14436
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14437
      if (lastComparison != 0) {
14438
        return lastComparison;
14439
      }
14440
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14441
      if (lastComparison != 0) {
14442
        return lastComparison;
14443
      }
14444
      return 0;
14445
    }
14446
 
14447
    public void read(TProtocol iprot) throws TException {
14448
      TField field;
14449
      iprot.readStructBegin();
14450
      while (true)
14451
      {
14452
        field = iprot.readFieldBegin();
14453
        if (field.type == TType.STOP) { 
14454
          break;
14455
        }
14456
        _Fields fieldId = _Fields.findByThriftId(field.id);
14457
        if (fieldId == null) {
14458
          TProtocolUtil.skip(iprot, field.type);
14459
        } else {
14460
          switch (fieldId) {
14461
            case SUCCESS:
14462
              if (field.type == TType.BOOL) {
14463
                this.success = iprot.readBool();
14464
                setSuccessIsSet(true);
14465
              } else { 
14466
                TProtocolUtil.skip(iprot, field.type);
14467
              }
14468
              break;
14469
            case UCX:
14470
              if (field.type == TType.STRUCT) {
14471
                this.ucx = new UserContextException();
14472
                this.ucx.read(iprot);
14473
              } else { 
14474
                TProtocolUtil.skip(iprot, field.type);
14475
              }
14476
              break;
14477
          }
14478
          iprot.readFieldEnd();
14479
        }
14480
      }
14481
      iprot.readStructEnd();
14482
      validate();
14483
    }
14484
 
14485
    public void write(TProtocol oprot) throws TException {
14486
      oprot.writeStructBegin(STRUCT_DESC);
14487
 
14488
      if (this.isSetSuccess()) {
14489
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14490
        oprot.writeBool(this.success);
14491
        oprot.writeFieldEnd();
14492
      } else if (this.isSetUcx()) {
14493
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14494
        this.ucx.write(oprot);
14495
        oprot.writeFieldEnd();
14496
      }
14497
      oprot.writeFieldStop();
14498
      oprot.writeStructEnd();
14499
    }
14500
 
14501
    @Override
14502
    public String toString() {
14503
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
14504
      boolean first = true;
14505
 
14506
      sb.append("success:");
14507
      sb.append(this.success);
14508
      first = false;
14509
      if (!first) sb.append(", ");
14510
      sb.append("ucx:");
14511
      if (this.ucx == null) {
14512
        sb.append("null");
14513
      } else {
14514
        sb.append(this.ucx);
14515
      }
14516
      first = false;
14517
      sb.append(")");
14518
      return sb.toString();
14519
    }
14520
 
14521
    public void validate() throws TException {
14522
      // check for required fields
14523
    }
14524
 
14525
  }
14526
 
593 rajveer 14527
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
14528
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
14529
 
14530
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14531
 
14532
    private long userId;
14533
 
14534
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14535
    public enum _Fields implements TFieldIdEnum {
14536
      USER_ID((short)1, "userId");
14537
 
14538
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14539
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14540
 
14541
      static {
14542
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14543
          byId.put((int)field._thriftId, field);
14544
          byName.put(field.getFieldName(), field);
14545
        }
14546
      }
14547
 
14548
      /**
14549
       * Find the _Fields constant that matches fieldId, or null if its not found.
14550
       */
14551
      public static _Fields findByThriftId(int fieldId) {
14552
        return byId.get(fieldId);
14553
      }
14554
 
14555
      /**
14556
       * Find the _Fields constant that matches fieldId, throwing an exception
14557
       * if it is not found.
14558
       */
14559
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14560
        _Fields fields = findByThriftId(fieldId);
14561
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14562
        return fields;
14563
      }
14564
 
14565
      /**
14566
       * Find the _Fields constant that matches name, or null if its not found.
14567
       */
14568
      public static _Fields findByName(String name) {
14569
        return byName.get(name);
14570
      }
14571
 
14572
      private final short _thriftId;
14573
      private final String _fieldName;
14574
 
14575
      _Fields(short thriftId, String fieldName) {
14576
        _thriftId = thriftId;
14577
        _fieldName = fieldName;
14578
      }
14579
 
14580
      public short getThriftFieldId() {
14581
        return _thriftId;
14582
      }
14583
 
14584
      public String getFieldName() {
14585
        return _fieldName;
14586
      }
14587
    }
14588
 
14589
    // isset id assignments
14590
    private static final int __USERID_ISSET_ID = 0;
14591
    private BitSet __isset_bit_vector = new BitSet(1);
14592
 
14593
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14594
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14595
          new FieldValueMetaData(TType.I64)));
14596
    }});
14597
 
14598
    static {
14599
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
14600
    }
14601
 
14602
    public getAllAddressesForUser_args() {
14603
    }
14604
 
14605
    public getAllAddressesForUser_args(
14606
      long userId)
14607
    {
14608
      this();
14609
      this.userId = userId;
14610
      setUserIdIsSet(true);
14611
    }
14612
 
14613
    /**
14614
     * Performs a deep copy on <i>other</i>.
14615
     */
14616
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
14617
      __isset_bit_vector.clear();
14618
      __isset_bit_vector.or(other.__isset_bit_vector);
14619
      this.userId = other.userId;
14620
    }
14621
 
14622
    public getAllAddressesForUser_args deepCopy() {
14623
      return new getAllAddressesForUser_args(this);
14624
    }
14625
 
14626
    @Deprecated
14627
    public getAllAddressesForUser_args clone() {
14628
      return new getAllAddressesForUser_args(this);
14629
    }
14630
 
14631
    public long getUserId() {
14632
      return this.userId;
14633
    }
14634
 
14635
    public getAllAddressesForUser_args setUserId(long userId) {
14636
      this.userId = userId;
14637
      setUserIdIsSet(true);
14638
      return this;
14639
    }
14640
 
14641
    public void unsetUserId() {
14642
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14643
    }
14644
 
14645
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14646
    public boolean isSetUserId() {
14647
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14648
    }
14649
 
14650
    public void setUserIdIsSet(boolean value) {
14651
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14652
    }
14653
 
14654
    public void setFieldValue(_Fields field, Object value) {
14655
      switch (field) {
14656
      case USER_ID:
14657
        if (value == null) {
14658
          unsetUserId();
14659
        } else {
14660
          setUserId((Long)value);
14661
        }
14662
        break;
14663
 
14664
      }
14665
    }
14666
 
14667
    public void setFieldValue(int fieldID, Object value) {
14668
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14669
    }
14670
 
14671
    public Object getFieldValue(_Fields field) {
14672
      switch (field) {
14673
      case USER_ID:
14674
        return new Long(getUserId());
14675
 
14676
      }
14677
      throw new IllegalStateException();
14678
    }
14679
 
14680
    public Object getFieldValue(int fieldId) {
14681
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14682
    }
14683
 
14684
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14685
    public boolean isSet(_Fields field) {
14686
      switch (field) {
14687
      case USER_ID:
14688
        return isSetUserId();
14689
      }
14690
      throw new IllegalStateException();
14691
    }
14692
 
14693
    public boolean isSet(int fieldID) {
14694
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14695
    }
14696
 
14697
    @Override
14698
    public boolean equals(Object that) {
14699
      if (that == null)
14700
        return false;
14701
      if (that instanceof getAllAddressesForUser_args)
14702
        return this.equals((getAllAddressesForUser_args)that);
14703
      return false;
14704
    }
14705
 
14706
    public boolean equals(getAllAddressesForUser_args that) {
14707
      if (that == null)
14708
        return false;
14709
 
14710
      boolean this_present_userId = true;
14711
      boolean that_present_userId = true;
14712
      if (this_present_userId || that_present_userId) {
14713
        if (!(this_present_userId && that_present_userId))
14714
          return false;
14715
        if (this.userId != that.userId)
14716
          return false;
14717
      }
14718
 
14719
      return true;
14720
    }
14721
 
14722
    @Override
14723
    public int hashCode() {
14724
      return 0;
14725
    }
14726
 
14727
    public int compareTo(getAllAddressesForUser_args other) {
14728
      if (!getClass().equals(other.getClass())) {
14729
        return getClass().getName().compareTo(other.getClass().getName());
14730
      }
14731
 
14732
      int lastComparison = 0;
14733
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
14734
 
14735
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14736
      if (lastComparison != 0) {
14737
        return lastComparison;
14738
      }
14739
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14740
      if (lastComparison != 0) {
14741
        return lastComparison;
14742
      }
14743
      return 0;
14744
    }
14745
 
14746
    public void read(TProtocol iprot) throws TException {
14747
      TField field;
14748
      iprot.readStructBegin();
14749
      while (true)
14750
      {
14751
        field = iprot.readFieldBegin();
14752
        if (field.type == TType.STOP) { 
14753
          break;
14754
        }
14755
        _Fields fieldId = _Fields.findByThriftId(field.id);
14756
        if (fieldId == null) {
14757
          TProtocolUtil.skip(iprot, field.type);
14758
        } else {
14759
          switch (fieldId) {
14760
            case USER_ID:
14761
              if (field.type == TType.I64) {
14762
                this.userId = iprot.readI64();
14763
                setUserIdIsSet(true);
14764
              } else { 
14765
                TProtocolUtil.skip(iprot, field.type);
14766
              }
14767
              break;
14768
          }
14769
          iprot.readFieldEnd();
14770
        }
14771
      }
14772
      iprot.readStructEnd();
14773
      validate();
14774
    }
14775
 
14776
    public void write(TProtocol oprot) throws TException {
14777
      validate();
14778
 
14779
      oprot.writeStructBegin(STRUCT_DESC);
14780
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14781
      oprot.writeI64(this.userId);
14782
      oprot.writeFieldEnd();
14783
      oprot.writeFieldStop();
14784
      oprot.writeStructEnd();
14785
    }
14786
 
14787
    @Override
14788
    public String toString() {
14789
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
14790
      boolean first = true;
14791
 
14792
      sb.append("userId:");
14793
      sb.append(this.userId);
14794
      first = false;
14795
      sb.append(")");
14796
      return sb.toString();
14797
    }
14798
 
14799
    public void validate() throws TException {
14800
      // check for required fields
14801
    }
14802
 
14803
  }
14804
 
14805
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
14806
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
14807
 
14808
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
14809
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14810
 
14811
    private List<Address> success;
14812
    private UserContextException ucx;
14813
 
14814
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14815
    public enum _Fields implements TFieldIdEnum {
14816
      SUCCESS((short)0, "success"),
14817
      UCX((short)1, "ucx");
14818
 
14819
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14820
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14821
 
14822
      static {
14823
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14824
          byId.put((int)field._thriftId, field);
14825
          byName.put(field.getFieldName(), field);
14826
        }
14827
      }
14828
 
14829
      /**
14830
       * Find the _Fields constant that matches fieldId, or null if its not found.
14831
       */
14832
      public static _Fields findByThriftId(int fieldId) {
14833
        return byId.get(fieldId);
14834
      }
14835
 
14836
      /**
14837
       * Find the _Fields constant that matches fieldId, throwing an exception
14838
       * if it is not found.
14839
       */
14840
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14841
        _Fields fields = findByThriftId(fieldId);
14842
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14843
        return fields;
14844
      }
14845
 
14846
      /**
14847
       * Find the _Fields constant that matches name, or null if its not found.
14848
       */
14849
      public static _Fields findByName(String name) {
14850
        return byName.get(name);
14851
      }
14852
 
14853
      private final short _thriftId;
14854
      private final String _fieldName;
14855
 
14856
      _Fields(short thriftId, String fieldName) {
14857
        _thriftId = thriftId;
14858
        _fieldName = fieldName;
14859
      }
14860
 
14861
      public short getThriftFieldId() {
14862
        return _thriftId;
14863
      }
14864
 
14865
      public String getFieldName() {
14866
        return _fieldName;
14867
      }
14868
    }
14869
 
14870
    // isset id assignments
14871
 
14872
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14873
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14874
          new ListMetaData(TType.LIST, 
14875
              new StructMetaData(TType.STRUCT, Address.class))));
14876
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14877
          new FieldValueMetaData(TType.STRUCT)));
14878
    }});
14879
 
14880
    static {
14881
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
14882
    }
14883
 
14884
    public getAllAddressesForUser_result() {
14885
    }
14886
 
14887
    public getAllAddressesForUser_result(
14888
      List<Address> success,
14889
      UserContextException ucx)
14890
    {
14891
      this();
14892
      this.success = success;
14893
      this.ucx = ucx;
14894
    }
14895
 
14896
    /**
14897
     * Performs a deep copy on <i>other</i>.
14898
     */
14899
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
14900
      if (other.isSetSuccess()) {
14901
        List<Address> __this__success = new ArrayList<Address>();
14902
        for (Address other_element : other.success) {
14903
          __this__success.add(new Address(other_element));
14904
        }
14905
        this.success = __this__success;
14906
      }
14907
      if (other.isSetUcx()) {
14908
        this.ucx = new UserContextException(other.ucx);
14909
      }
14910
    }
14911
 
14912
    public getAllAddressesForUser_result deepCopy() {
14913
      return new getAllAddressesForUser_result(this);
14914
    }
14915
 
14916
    @Deprecated
14917
    public getAllAddressesForUser_result clone() {
14918
      return new getAllAddressesForUser_result(this);
14919
    }
14920
 
14921
    public int getSuccessSize() {
14922
      return (this.success == null) ? 0 : this.success.size();
14923
    }
14924
 
14925
    public java.util.Iterator<Address> getSuccessIterator() {
14926
      return (this.success == null) ? null : this.success.iterator();
14927
    }
14928
 
14929
    public void addToSuccess(Address elem) {
14930
      if (this.success == null) {
14931
        this.success = new ArrayList<Address>();
14932
      }
14933
      this.success.add(elem);
14934
    }
14935
 
14936
    public List<Address> getSuccess() {
14937
      return this.success;
14938
    }
14939
 
14940
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
14941
      this.success = success;
14942
      return this;
14943
    }
14944
 
14945
    public void unsetSuccess() {
14946
      this.success = null;
14947
    }
14948
 
14949
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14950
    public boolean isSetSuccess() {
14951
      return this.success != null;
14952
    }
14953
 
14954
    public void setSuccessIsSet(boolean value) {
14955
      if (!value) {
14956
        this.success = null;
14957
      }
14958
    }
14959
 
14960
    public UserContextException getUcx() {
14961
      return this.ucx;
14962
    }
14963
 
14964
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
14965
      this.ucx = ucx;
14966
      return this;
14967
    }
14968
 
14969
    public void unsetUcx() {
14970
      this.ucx = null;
14971
    }
14972
 
14973
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14974
    public boolean isSetUcx() {
14975
      return this.ucx != null;
14976
    }
14977
 
14978
    public void setUcxIsSet(boolean value) {
14979
      if (!value) {
14980
        this.ucx = null;
14981
      }
14982
    }
14983
 
14984
    public void setFieldValue(_Fields field, Object value) {
14985
      switch (field) {
14986
      case SUCCESS:
14987
        if (value == null) {
14988
          unsetSuccess();
14989
        } else {
14990
          setSuccess((List<Address>)value);
14991
        }
14992
        break;
14993
 
14994
      case UCX:
14995
        if (value == null) {
14996
          unsetUcx();
14997
        } else {
14998
          setUcx((UserContextException)value);
14999
        }
15000
        break;
15001
 
15002
      }
15003
    }
15004
 
15005
    public void setFieldValue(int fieldID, Object value) {
15006
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15007
    }
15008
 
15009
    public Object getFieldValue(_Fields field) {
15010
      switch (field) {
15011
      case SUCCESS:
15012
        return getSuccess();
15013
 
15014
      case UCX:
15015
        return getUcx();
15016
 
15017
      }
15018
      throw new IllegalStateException();
15019
    }
15020
 
15021
    public Object getFieldValue(int fieldId) {
15022
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15023
    }
15024
 
15025
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15026
    public boolean isSet(_Fields field) {
15027
      switch (field) {
15028
      case SUCCESS:
15029
        return isSetSuccess();
15030
      case UCX:
15031
        return isSetUcx();
15032
      }
15033
      throw new IllegalStateException();
15034
    }
15035
 
15036
    public boolean isSet(int fieldID) {
15037
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15038
    }
15039
 
15040
    @Override
15041
    public boolean equals(Object that) {
15042
      if (that == null)
15043
        return false;
15044
      if (that instanceof getAllAddressesForUser_result)
15045
        return this.equals((getAllAddressesForUser_result)that);
15046
      return false;
15047
    }
15048
 
15049
    public boolean equals(getAllAddressesForUser_result that) {
15050
      if (that == null)
15051
        return false;
15052
 
15053
      boolean this_present_success = true && this.isSetSuccess();
15054
      boolean that_present_success = true && that.isSetSuccess();
15055
      if (this_present_success || that_present_success) {
15056
        if (!(this_present_success && that_present_success))
15057
          return false;
15058
        if (!this.success.equals(that.success))
15059
          return false;
15060
      }
15061
 
15062
      boolean this_present_ucx = true && this.isSetUcx();
15063
      boolean that_present_ucx = true && that.isSetUcx();
15064
      if (this_present_ucx || that_present_ucx) {
15065
        if (!(this_present_ucx && that_present_ucx))
15066
          return false;
15067
        if (!this.ucx.equals(that.ucx))
15068
          return false;
15069
      }
15070
 
15071
      return true;
15072
    }
15073
 
15074
    @Override
15075
    public int hashCode() {
15076
      return 0;
15077
    }
15078
 
15079
    public int compareTo(getAllAddressesForUser_result other) {
15080
      if (!getClass().equals(other.getClass())) {
15081
        return getClass().getName().compareTo(other.getClass().getName());
15082
      }
15083
 
15084
      int lastComparison = 0;
15085
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
15086
 
15087
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15088
      if (lastComparison != 0) {
15089
        return lastComparison;
15090
      }
15091
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15092
      if (lastComparison != 0) {
15093
        return lastComparison;
15094
      }
15095
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15096
      if (lastComparison != 0) {
15097
        return lastComparison;
15098
      }
15099
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15100
      if (lastComparison != 0) {
15101
        return lastComparison;
15102
      }
15103
      return 0;
15104
    }
15105
 
15106
    public void read(TProtocol iprot) throws TException {
15107
      TField field;
15108
      iprot.readStructBegin();
15109
      while (true)
15110
      {
15111
        field = iprot.readFieldBegin();
15112
        if (field.type == TType.STOP) { 
15113
          break;
15114
        }
15115
        _Fields fieldId = _Fields.findByThriftId(field.id);
15116
        if (fieldId == null) {
15117
          TProtocolUtil.skip(iprot, field.type);
15118
        } else {
15119
          switch (fieldId) {
15120
            case SUCCESS:
15121
              if (field.type == TType.LIST) {
15122
                {
771 rajveer 15123
                  TList _list16 = iprot.readListBegin();
15124
                  this.success = new ArrayList<Address>(_list16.size);
15125
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
593 rajveer 15126
                  {
771 rajveer 15127
                    Address _elem18;
15128
                    _elem18 = new Address();
15129
                    _elem18.read(iprot);
15130
                    this.success.add(_elem18);
593 rajveer 15131
                  }
15132
                  iprot.readListEnd();
15133
                }
15134
              } else { 
15135
                TProtocolUtil.skip(iprot, field.type);
15136
              }
15137
              break;
15138
            case UCX:
15139
              if (field.type == TType.STRUCT) {
15140
                this.ucx = new UserContextException();
15141
                this.ucx.read(iprot);
15142
              } else { 
15143
                TProtocolUtil.skip(iprot, field.type);
15144
              }
15145
              break;
15146
          }
15147
          iprot.readFieldEnd();
15148
        }
15149
      }
15150
      iprot.readStructEnd();
15151
      validate();
15152
    }
15153
 
15154
    public void write(TProtocol oprot) throws TException {
15155
      oprot.writeStructBegin(STRUCT_DESC);
15156
 
15157
      if (this.isSetSuccess()) {
15158
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15159
        {
15160
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 15161
          for (Address _iter19 : this.success)
593 rajveer 15162
          {
771 rajveer 15163
            _iter19.write(oprot);
593 rajveer 15164
          }
15165
          oprot.writeListEnd();
15166
        }
15167
        oprot.writeFieldEnd();
15168
      } else if (this.isSetUcx()) {
15169
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15170
        this.ucx.write(oprot);
15171
        oprot.writeFieldEnd();
15172
      }
15173
      oprot.writeFieldStop();
15174
      oprot.writeStructEnd();
15175
    }
15176
 
15177
    @Override
15178
    public String toString() {
15179
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
15180
      boolean first = true;
15181
 
15182
      sb.append("success:");
15183
      if (this.success == null) {
15184
        sb.append("null");
15185
      } else {
15186
        sb.append(this.success);
15187
      }
15188
      first = false;
15189
      if (!first) sb.append(", ");
15190
      sb.append("ucx:");
15191
      if (this.ucx == null) {
15192
        sb.append("null");
15193
      } else {
15194
        sb.append(this.ucx);
15195
      }
15196
      first = false;
15197
      sb.append(")");
15198
      return sb.toString();
15199
    }
15200
 
15201
    public void validate() throws TException {
15202
      // check for required fields
15203
    }
15204
 
15205
  }
15206
 
15207
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
15208
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
15209
 
15210
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15211
 
15212
    private long userId;
15213
 
15214
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15215
    public enum _Fields implements TFieldIdEnum {
15216
      USER_ID((short)1, "userId");
15217
 
15218
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15219
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15220
 
15221
      static {
15222
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15223
          byId.put((int)field._thriftId, field);
15224
          byName.put(field.getFieldName(), field);
15225
        }
15226
      }
15227
 
15228
      /**
15229
       * Find the _Fields constant that matches fieldId, or null if its not found.
15230
       */
15231
      public static _Fields findByThriftId(int fieldId) {
15232
        return byId.get(fieldId);
15233
      }
15234
 
15235
      /**
15236
       * Find the _Fields constant that matches fieldId, throwing an exception
15237
       * if it is not found.
15238
       */
15239
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15240
        _Fields fields = findByThriftId(fieldId);
15241
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15242
        return fields;
15243
      }
15244
 
15245
      /**
15246
       * Find the _Fields constant that matches name, or null if its not found.
15247
       */
15248
      public static _Fields findByName(String name) {
15249
        return byName.get(name);
15250
      }
15251
 
15252
      private final short _thriftId;
15253
      private final String _fieldName;
15254
 
15255
      _Fields(short thriftId, String fieldName) {
15256
        _thriftId = thriftId;
15257
        _fieldName = fieldName;
15258
      }
15259
 
15260
      public short getThriftFieldId() {
15261
        return _thriftId;
15262
      }
15263
 
15264
      public String getFieldName() {
15265
        return _fieldName;
15266
      }
15267
    }
15268
 
15269
    // isset id assignments
15270
    private static final int __USERID_ISSET_ID = 0;
15271
    private BitSet __isset_bit_vector = new BitSet(1);
15272
 
15273
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15274
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15275
          new FieldValueMetaData(TType.I64)));
15276
    }});
15277
 
15278
    static {
15279
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
15280
    }
15281
 
15282
    public getDefaultAddressId_args() {
15283
    }
15284
 
15285
    public getDefaultAddressId_args(
15286
      long userId)
15287
    {
15288
      this();
15289
      this.userId = userId;
15290
      setUserIdIsSet(true);
15291
    }
15292
 
15293
    /**
15294
     * Performs a deep copy on <i>other</i>.
15295
     */
15296
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
15297
      __isset_bit_vector.clear();
15298
      __isset_bit_vector.or(other.__isset_bit_vector);
15299
      this.userId = other.userId;
15300
    }
15301
 
15302
    public getDefaultAddressId_args deepCopy() {
15303
      return new getDefaultAddressId_args(this);
15304
    }
15305
 
15306
    @Deprecated
15307
    public getDefaultAddressId_args clone() {
15308
      return new getDefaultAddressId_args(this);
15309
    }
15310
 
15311
    public long getUserId() {
15312
      return this.userId;
15313
    }
15314
 
15315
    public getDefaultAddressId_args setUserId(long userId) {
15316
      this.userId = userId;
15317
      setUserIdIsSet(true);
15318
      return this;
15319
    }
15320
 
15321
    public void unsetUserId() {
15322
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15323
    }
15324
 
15325
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15326
    public boolean isSetUserId() {
15327
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15328
    }
15329
 
15330
    public void setUserIdIsSet(boolean value) {
15331
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15332
    }
15333
 
15334
    public void setFieldValue(_Fields field, Object value) {
15335
      switch (field) {
15336
      case USER_ID:
15337
        if (value == null) {
15338
          unsetUserId();
15339
        } else {
15340
          setUserId((Long)value);
15341
        }
15342
        break;
15343
 
15344
      }
15345
    }
15346
 
15347
    public void setFieldValue(int fieldID, Object value) {
15348
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15349
    }
15350
 
15351
    public Object getFieldValue(_Fields field) {
15352
      switch (field) {
15353
      case USER_ID:
15354
        return new Long(getUserId());
15355
 
15356
      }
15357
      throw new IllegalStateException();
15358
    }
15359
 
15360
    public Object getFieldValue(int fieldId) {
15361
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15362
    }
15363
 
15364
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15365
    public boolean isSet(_Fields field) {
15366
      switch (field) {
15367
      case USER_ID:
15368
        return isSetUserId();
15369
      }
15370
      throw new IllegalStateException();
15371
    }
15372
 
15373
    public boolean isSet(int fieldID) {
15374
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15375
    }
15376
 
15377
    @Override
15378
    public boolean equals(Object that) {
15379
      if (that == null)
15380
        return false;
15381
      if (that instanceof getDefaultAddressId_args)
15382
        return this.equals((getDefaultAddressId_args)that);
15383
      return false;
15384
    }
15385
 
15386
    public boolean equals(getDefaultAddressId_args that) {
15387
      if (that == null)
15388
        return false;
15389
 
15390
      boolean this_present_userId = true;
15391
      boolean that_present_userId = true;
15392
      if (this_present_userId || that_present_userId) {
15393
        if (!(this_present_userId && that_present_userId))
15394
          return false;
15395
        if (this.userId != that.userId)
15396
          return false;
15397
      }
15398
 
15399
      return true;
15400
    }
15401
 
15402
    @Override
15403
    public int hashCode() {
15404
      return 0;
15405
    }
15406
 
15407
    public int compareTo(getDefaultAddressId_args other) {
15408
      if (!getClass().equals(other.getClass())) {
15409
        return getClass().getName().compareTo(other.getClass().getName());
15410
      }
15411
 
15412
      int lastComparison = 0;
15413
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
15414
 
15415
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15416
      if (lastComparison != 0) {
15417
        return lastComparison;
15418
      }
15419
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15420
      if (lastComparison != 0) {
15421
        return lastComparison;
15422
      }
15423
      return 0;
15424
    }
15425
 
15426
    public void read(TProtocol iprot) throws TException {
15427
      TField field;
15428
      iprot.readStructBegin();
15429
      while (true)
15430
      {
15431
        field = iprot.readFieldBegin();
15432
        if (field.type == TType.STOP) { 
15433
          break;
15434
        }
15435
        _Fields fieldId = _Fields.findByThriftId(field.id);
15436
        if (fieldId == null) {
15437
          TProtocolUtil.skip(iprot, field.type);
15438
        } else {
15439
          switch (fieldId) {
15440
            case USER_ID:
15441
              if (field.type == TType.I64) {
15442
                this.userId = iprot.readI64();
15443
                setUserIdIsSet(true);
15444
              } else { 
15445
                TProtocolUtil.skip(iprot, field.type);
15446
              }
15447
              break;
15448
          }
15449
          iprot.readFieldEnd();
15450
        }
15451
      }
15452
      iprot.readStructEnd();
15453
      validate();
15454
    }
15455
 
15456
    public void write(TProtocol oprot) throws TException {
15457
      validate();
15458
 
15459
      oprot.writeStructBegin(STRUCT_DESC);
15460
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15461
      oprot.writeI64(this.userId);
15462
      oprot.writeFieldEnd();
15463
      oprot.writeFieldStop();
15464
      oprot.writeStructEnd();
15465
    }
15466
 
15467
    @Override
15468
    public String toString() {
15469
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
15470
      boolean first = true;
15471
 
15472
      sb.append("userId:");
15473
      sb.append(this.userId);
15474
      first = false;
15475
      sb.append(")");
15476
      return sb.toString();
15477
    }
15478
 
15479
    public void validate() throws TException {
15480
      // check for required fields
15481
    }
15482
 
15483
  }
15484
 
15485
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
15486
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
15487
 
15488
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
15489
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15490
 
15491
    private long success;
15492
    private UserContextException ucx;
15493
 
15494
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15495
    public enum _Fields implements TFieldIdEnum {
15496
      SUCCESS((short)0, "success"),
15497
      UCX((short)1, "ucx");
15498
 
15499
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15500
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15501
 
15502
      static {
15503
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15504
          byId.put((int)field._thriftId, field);
15505
          byName.put(field.getFieldName(), field);
15506
        }
15507
      }
15508
 
15509
      /**
15510
       * Find the _Fields constant that matches fieldId, or null if its not found.
15511
       */
15512
      public static _Fields findByThriftId(int fieldId) {
15513
        return byId.get(fieldId);
15514
      }
15515
 
15516
      /**
15517
       * Find the _Fields constant that matches fieldId, throwing an exception
15518
       * if it is not found.
15519
       */
15520
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15521
        _Fields fields = findByThriftId(fieldId);
15522
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15523
        return fields;
15524
      }
15525
 
15526
      /**
15527
       * Find the _Fields constant that matches name, or null if its not found.
15528
       */
15529
      public static _Fields findByName(String name) {
15530
        return byName.get(name);
15531
      }
15532
 
15533
      private final short _thriftId;
15534
      private final String _fieldName;
15535
 
15536
      _Fields(short thriftId, String fieldName) {
15537
        _thriftId = thriftId;
15538
        _fieldName = fieldName;
15539
      }
15540
 
15541
      public short getThriftFieldId() {
15542
        return _thriftId;
15543
      }
15544
 
15545
      public String getFieldName() {
15546
        return _fieldName;
15547
      }
15548
    }
15549
 
15550
    // isset id assignments
15551
    private static final int __SUCCESS_ISSET_ID = 0;
15552
    private BitSet __isset_bit_vector = new BitSet(1);
15553
 
15554
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15555
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15556
          new FieldValueMetaData(TType.I64)));
15557
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15558
          new FieldValueMetaData(TType.STRUCT)));
15559
    }});
15560
 
15561
    static {
15562
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
15563
    }
15564
 
15565
    public getDefaultAddressId_result() {
15566
    }
15567
 
15568
    public getDefaultAddressId_result(
15569
      long success,
15570
      UserContextException ucx)
15571
    {
15572
      this();
15573
      this.success = success;
15574
      setSuccessIsSet(true);
15575
      this.ucx = ucx;
15576
    }
15577
 
15578
    /**
15579
     * Performs a deep copy on <i>other</i>.
15580
     */
15581
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
15582
      __isset_bit_vector.clear();
15583
      __isset_bit_vector.or(other.__isset_bit_vector);
15584
      this.success = other.success;
15585
      if (other.isSetUcx()) {
15586
        this.ucx = new UserContextException(other.ucx);
15587
      }
15588
    }
15589
 
15590
    public getDefaultAddressId_result deepCopy() {
15591
      return new getDefaultAddressId_result(this);
15592
    }
15593
 
15594
    @Deprecated
15595
    public getDefaultAddressId_result clone() {
15596
      return new getDefaultAddressId_result(this);
15597
    }
15598
 
15599
    public long getSuccess() {
15600
      return this.success;
15601
    }
15602
 
15603
    public getDefaultAddressId_result setSuccess(long success) {
15604
      this.success = success;
15605
      setSuccessIsSet(true);
15606
      return this;
15607
    }
15608
 
15609
    public void unsetSuccess() {
15610
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15611
    }
15612
 
15613
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15614
    public boolean isSetSuccess() {
15615
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15616
    }
15617
 
15618
    public void setSuccessIsSet(boolean value) {
15619
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15620
    }
15621
 
15622
    public UserContextException getUcx() {
15623
      return this.ucx;
15624
    }
15625
 
15626
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
15627
      this.ucx = ucx;
15628
      return this;
15629
    }
15630
 
15631
    public void unsetUcx() {
15632
      this.ucx = null;
15633
    }
15634
 
15635
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15636
    public boolean isSetUcx() {
15637
      return this.ucx != null;
15638
    }
15639
 
15640
    public void setUcxIsSet(boolean value) {
15641
      if (!value) {
15642
        this.ucx = null;
15643
      }
15644
    }
15645
 
15646
    public void setFieldValue(_Fields field, Object value) {
15647
      switch (field) {
15648
      case SUCCESS:
15649
        if (value == null) {
15650
          unsetSuccess();
15651
        } else {
15652
          setSuccess((Long)value);
15653
        }
15654
        break;
15655
 
15656
      case UCX:
15657
        if (value == null) {
15658
          unsetUcx();
15659
        } else {
15660
          setUcx((UserContextException)value);
15661
        }
15662
        break;
15663
 
15664
      }
15665
    }
15666
 
15667
    public void setFieldValue(int fieldID, Object value) {
15668
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15669
    }
15670
 
15671
    public Object getFieldValue(_Fields field) {
15672
      switch (field) {
15673
      case SUCCESS:
15674
        return new Long(getSuccess());
15675
 
15676
      case UCX:
15677
        return getUcx();
15678
 
15679
      }
15680
      throw new IllegalStateException();
15681
    }
15682
 
15683
    public Object getFieldValue(int fieldId) {
15684
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15685
    }
15686
 
15687
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15688
    public boolean isSet(_Fields field) {
15689
      switch (field) {
15690
      case SUCCESS:
15691
        return isSetSuccess();
15692
      case UCX:
15693
        return isSetUcx();
15694
      }
15695
      throw new IllegalStateException();
15696
    }
15697
 
15698
    public boolean isSet(int fieldID) {
15699
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15700
    }
15701
 
15702
    @Override
15703
    public boolean equals(Object that) {
15704
      if (that == null)
15705
        return false;
15706
      if (that instanceof getDefaultAddressId_result)
15707
        return this.equals((getDefaultAddressId_result)that);
15708
      return false;
15709
    }
15710
 
15711
    public boolean equals(getDefaultAddressId_result that) {
15712
      if (that == null)
15713
        return false;
15714
 
15715
      boolean this_present_success = true;
15716
      boolean that_present_success = true;
15717
      if (this_present_success || that_present_success) {
15718
        if (!(this_present_success && that_present_success))
15719
          return false;
15720
        if (this.success != that.success)
15721
          return false;
15722
      }
15723
 
15724
      boolean this_present_ucx = true && this.isSetUcx();
15725
      boolean that_present_ucx = true && that.isSetUcx();
15726
      if (this_present_ucx || that_present_ucx) {
15727
        if (!(this_present_ucx && that_present_ucx))
15728
          return false;
15729
        if (!this.ucx.equals(that.ucx))
15730
          return false;
15731
      }
15732
 
15733
      return true;
15734
    }
15735
 
15736
    @Override
15737
    public int hashCode() {
15738
      return 0;
15739
    }
15740
 
15741
    public int compareTo(getDefaultAddressId_result other) {
15742
      if (!getClass().equals(other.getClass())) {
15743
        return getClass().getName().compareTo(other.getClass().getName());
15744
      }
15745
 
15746
      int lastComparison = 0;
15747
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
15748
 
15749
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15750
      if (lastComparison != 0) {
15751
        return lastComparison;
15752
      }
15753
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15754
      if (lastComparison != 0) {
15755
        return lastComparison;
15756
      }
15757
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15758
      if (lastComparison != 0) {
15759
        return lastComparison;
15760
      }
15761
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15762
      if (lastComparison != 0) {
15763
        return lastComparison;
15764
      }
15765
      return 0;
15766
    }
15767
 
15768
    public void read(TProtocol iprot) throws TException {
15769
      TField field;
15770
      iprot.readStructBegin();
15771
      while (true)
15772
      {
15773
        field = iprot.readFieldBegin();
15774
        if (field.type == TType.STOP) { 
15775
          break;
15776
        }
15777
        _Fields fieldId = _Fields.findByThriftId(field.id);
15778
        if (fieldId == null) {
15779
          TProtocolUtil.skip(iprot, field.type);
15780
        } else {
15781
          switch (fieldId) {
15782
            case SUCCESS:
15783
              if (field.type == TType.I64) {
15784
                this.success = iprot.readI64();
15785
                setSuccessIsSet(true);
15786
              } else { 
15787
                TProtocolUtil.skip(iprot, field.type);
15788
              }
15789
              break;
15790
            case UCX:
15791
              if (field.type == TType.STRUCT) {
15792
                this.ucx = new UserContextException();
15793
                this.ucx.read(iprot);
15794
              } else { 
15795
                TProtocolUtil.skip(iprot, field.type);
15796
              }
15797
              break;
15798
          }
15799
          iprot.readFieldEnd();
15800
        }
15801
      }
15802
      iprot.readStructEnd();
15803
      validate();
15804
    }
15805
 
15806
    public void write(TProtocol oprot) throws TException {
15807
      oprot.writeStructBegin(STRUCT_DESC);
15808
 
15809
      if (this.isSetSuccess()) {
15810
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15811
        oprot.writeI64(this.success);
15812
        oprot.writeFieldEnd();
15813
      } else if (this.isSetUcx()) {
15814
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15815
        this.ucx.write(oprot);
15816
        oprot.writeFieldEnd();
15817
      }
15818
      oprot.writeFieldStop();
15819
      oprot.writeStructEnd();
15820
    }
15821
 
15822
    @Override
15823
    public String toString() {
15824
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
15825
      boolean first = true;
15826
 
15827
      sb.append("success:");
15828
      sb.append(this.success);
15829
      first = false;
15830
      if (!first) sb.append(", ");
15831
      sb.append("ucx:");
15832
      if (this.ucx == null) {
15833
        sb.append("null");
15834
      } else {
15835
        sb.append(this.ucx);
15836
      }
15837
      first = false;
15838
      sb.append(")");
15839
      return sb.toString();
15840
    }
15841
 
15842
    public void validate() throws TException {
15843
      // check for required fields
15844
    }
15845
 
15846
  }
15847
 
784 rajveer 15848
  public static class getDefaultPincode_args implements TBase<getDefaultPincode_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_args>   {
15849
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_args");
15850
 
15851
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15852
 
15853
    private long userId;
15854
 
15855
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15856
    public enum _Fields implements TFieldIdEnum {
15857
      USER_ID((short)1, "userId");
15858
 
15859
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15860
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15861
 
15862
      static {
15863
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15864
          byId.put((int)field._thriftId, field);
15865
          byName.put(field.getFieldName(), field);
15866
        }
15867
      }
15868
 
15869
      /**
15870
       * Find the _Fields constant that matches fieldId, or null if its not found.
15871
       */
15872
      public static _Fields findByThriftId(int fieldId) {
15873
        return byId.get(fieldId);
15874
      }
15875
 
15876
      /**
15877
       * Find the _Fields constant that matches fieldId, throwing an exception
15878
       * if it is not found.
15879
       */
15880
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15881
        _Fields fields = findByThriftId(fieldId);
15882
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15883
        return fields;
15884
      }
15885
 
15886
      /**
15887
       * Find the _Fields constant that matches name, or null if its not found.
15888
       */
15889
      public static _Fields findByName(String name) {
15890
        return byName.get(name);
15891
      }
15892
 
15893
      private final short _thriftId;
15894
      private final String _fieldName;
15895
 
15896
      _Fields(short thriftId, String fieldName) {
15897
        _thriftId = thriftId;
15898
        _fieldName = fieldName;
15899
      }
15900
 
15901
      public short getThriftFieldId() {
15902
        return _thriftId;
15903
      }
15904
 
15905
      public String getFieldName() {
15906
        return _fieldName;
15907
      }
15908
    }
15909
 
15910
    // isset id assignments
15911
    private static final int __USERID_ISSET_ID = 0;
15912
    private BitSet __isset_bit_vector = new BitSet(1);
15913
 
15914
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15915
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15916
          new FieldValueMetaData(TType.I64)));
15917
    }});
15918
 
15919
    static {
15920
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_args.class, metaDataMap);
15921
    }
15922
 
15923
    public getDefaultPincode_args() {
15924
    }
15925
 
15926
    public getDefaultPincode_args(
15927
      long userId)
15928
    {
15929
      this();
15930
      this.userId = userId;
15931
      setUserIdIsSet(true);
15932
    }
15933
 
15934
    /**
15935
     * Performs a deep copy on <i>other</i>.
15936
     */
15937
    public getDefaultPincode_args(getDefaultPincode_args other) {
15938
      __isset_bit_vector.clear();
15939
      __isset_bit_vector.or(other.__isset_bit_vector);
15940
      this.userId = other.userId;
15941
    }
15942
 
15943
    public getDefaultPincode_args deepCopy() {
15944
      return new getDefaultPincode_args(this);
15945
    }
15946
 
15947
    @Deprecated
15948
    public getDefaultPincode_args clone() {
15949
      return new getDefaultPincode_args(this);
15950
    }
15951
 
15952
    public long getUserId() {
15953
      return this.userId;
15954
    }
15955
 
15956
    public getDefaultPincode_args setUserId(long userId) {
15957
      this.userId = userId;
15958
      setUserIdIsSet(true);
15959
      return this;
15960
    }
15961
 
15962
    public void unsetUserId() {
15963
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15964
    }
15965
 
15966
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15967
    public boolean isSetUserId() {
15968
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15969
    }
15970
 
15971
    public void setUserIdIsSet(boolean value) {
15972
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15973
    }
15974
 
15975
    public void setFieldValue(_Fields field, Object value) {
15976
      switch (field) {
15977
      case USER_ID:
15978
        if (value == null) {
15979
          unsetUserId();
15980
        } else {
15981
          setUserId((Long)value);
15982
        }
15983
        break;
15984
 
15985
      }
15986
    }
15987
 
15988
    public void setFieldValue(int fieldID, Object value) {
15989
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15990
    }
15991
 
15992
    public Object getFieldValue(_Fields field) {
15993
      switch (field) {
15994
      case USER_ID:
15995
        return new Long(getUserId());
15996
 
15997
      }
15998
      throw new IllegalStateException();
15999
    }
16000
 
16001
    public Object getFieldValue(int fieldId) {
16002
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16003
    }
16004
 
16005
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16006
    public boolean isSet(_Fields field) {
16007
      switch (field) {
16008
      case USER_ID:
16009
        return isSetUserId();
16010
      }
16011
      throw new IllegalStateException();
16012
    }
16013
 
16014
    public boolean isSet(int fieldID) {
16015
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16016
    }
16017
 
16018
    @Override
16019
    public boolean equals(Object that) {
16020
      if (that == null)
16021
        return false;
16022
      if (that instanceof getDefaultPincode_args)
16023
        return this.equals((getDefaultPincode_args)that);
16024
      return false;
16025
    }
16026
 
16027
    public boolean equals(getDefaultPincode_args that) {
16028
      if (that == null)
16029
        return false;
16030
 
16031
      boolean this_present_userId = true;
16032
      boolean that_present_userId = true;
16033
      if (this_present_userId || that_present_userId) {
16034
        if (!(this_present_userId && that_present_userId))
16035
          return false;
16036
        if (this.userId != that.userId)
16037
          return false;
16038
      }
16039
 
16040
      return true;
16041
    }
16042
 
16043
    @Override
16044
    public int hashCode() {
16045
      return 0;
16046
    }
16047
 
16048
    public int compareTo(getDefaultPincode_args other) {
16049
      if (!getClass().equals(other.getClass())) {
16050
        return getClass().getName().compareTo(other.getClass().getName());
16051
      }
16052
 
16053
      int lastComparison = 0;
16054
      getDefaultPincode_args typedOther = (getDefaultPincode_args)other;
16055
 
16056
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
16057
      if (lastComparison != 0) {
16058
        return lastComparison;
16059
      }
16060
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
16061
      if (lastComparison != 0) {
16062
        return lastComparison;
16063
      }
16064
      return 0;
16065
    }
16066
 
16067
    public void read(TProtocol iprot) throws TException {
16068
      TField field;
16069
      iprot.readStructBegin();
16070
      while (true)
16071
      {
16072
        field = iprot.readFieldBegin();
16073
        if (field.type == TType.STOP) { 
16074
          break;
16075
        }
16076
        _Fields fieldId = _Fields.findByThriftId(field.id);
16077
        if (fieldId == null) {
16078
          TProtocolUtil.skip(iprot, field.type);
16079
        } else {
16080
          switch (fieldId) {
16081
            case USER_ID:
16082
              if (field.type == TType.I64) {
16083
                this.userId = iprot.readI64();
16084
                setUserIdIsSet(true);
16085
              } else { 
16086
                TProtocolUtil.skip(iprot, field.type);
16087
              }
16088
              break;
16089
          }
16090
          iprot.readFieldEnd();
16091
        }
16092
      }
16093
      iprot.readStructEnd();
16094
      validate();
16095
    }
16096
 
16097
    public void write(TProtocol oprot) throws TException {
16098
      validate();
16099
 
16100
      oprot.writeStructBegin(STRUCT_DESC);
16101
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
16102
      oprot.writeI64(this.userId);
16103
      oprot.writeFieldEnd();
16104
      oprot.writeFieldStop();
16105
      oprot.writeStructEnd();
16106
    }
16107
 
16108
    @Override
16109
    public String toString() {
16110
      StringBuilder sb = new StringBuilder("getDefaultPincode_args(");
16111
      boolean first = true;
16112
 
16113
      sb.append("userId:");
16114
      sb.append(this.userId);
16115
      first = false;
16116
      sb.append(")");
16117
      return sb.toString();
16118
    }
16119
 
16120
    public void validate() throws TException {
16121
      // check for required fields
16122
    }
16123
 
16124
  }
16125
 
16126
  public static class getDefaultPincode_result implements TBase<getDefaultPincode_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_result>   {
16127
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_result");
16128
 
16129
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
16130
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16131
 
16132
    private String success;
16133
    private UserContextException ucx;
16134
 
16135
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16136
    public enum _Fields implements TFieldIdEnum {
16137
      SUCCESS((short)0, "success"),
16138
      UCX((short)1, "ucx");
16139
 
16140
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16141
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16142
 
16143
      static {
16144
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16145
          byId.put((int)field._thriftId, field);
16146
          byName.put(field.getFieldName(), field);
16147
        }
16148
      }
16149
 
16150
      /**
16151
       * Find the _Fields constant that matches fieldId, or null if its not found.
16152
       */
16153
      public static _Fields findByThriftId(int fieldId) {
16154
        return byId.get(fieldId);
16155
      }
16156
 
16157
      /**
16158
       * Find the _Fields constant that matches fieldId, throwing an exception
16159
       * if it is not found.
16160
       */
16161
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16162
        _Fields fields = findByThriftId(fieldId);
16163
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16164
        return fields;
16165
      }
16166
 
16167
      /**
16168
       * Find the _Fields constant that matches name, or null if its not found.
16169
       */
16170
      public static _Fields findByName(String name) {
16171
        return byName.get(name);
16172
      }
16173
 
16174
      private final short _thriftId;
16175
      private final String _fieldName;
16176
 
16177
      _Fields(short thriftId, String fieldName) {
16178
        _thriftId = thriftId;
16179
        _fieldName = fieldName;
16180
      }
16181
 
16182
      public short getThriftFieldId() {
16183
        return _thriftId;
16184
      }
16185
 
16186
      public String getFieldName() {
16187
        return _fieldName;
16188
      }
16189
    }
16190
 
16191
    // isset id assignments
16192
 
16193
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16194
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16195
          new FieldValueMetaData(TType.STRING)));
16196
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16197
          new FieldValueMetaData(TType.STRUCT)));
16198
    }});
16199
 
16200
    static {
16201
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_result.class, metaDataMap);
16202
    }
16203
 
16204
    public getDefaultPincode_result() {
16205
    }
16206
 
16207
    public getDefaultPincode_result(
16208
      String success,
16209
      UserContextException ucx)
16210
    {
16211
      this();
16212
      this.success = success;
16213
      this.ucx = ucx;
16214
    }
16215
 
16216
    /**
16217
     * Performs a deep copy on <i>other</i>.
16218
     */
16219
    public getDefaultPincode_result(getDefaultPincode_result other) {
16220
      if (other.isSetSuccess()) {
16221
        this.success = other.success;
16222
      }
16223
      if (other.isSetUcx()) {
16224
        this.ucx = new UserContextException(other.ucx);
16225
      }
16226
    }
16227
 
16228
    public getDefaultPincode_result deepCopy() {
16229
      return new getDefaultPincode_result(this);
16230
    }
16231
 
16232
    @Deprecated
16233
    public getDefaultPincode_result clone() {
16234
      return new getDefaultPincode_result(this);
16235
    }
16236
 
16237
    public String getSuccess() {
16238
      return this.success;
16239
    }
16240
 
16241
    public getDefaultPincode_result setSuccess(String success) {
16242
      this.success = success;
16243
      return this;
16244
    }
16245
 
16246
    public void unsetSuccess() {
16247
      this.success = null;
16248
    }
16249
 
16250
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16251
    public boolean isSetSuccess() {
16252
      return this.success != null;
16253
    }
16254
 
16255
    public void setSuccessIsSet(boolean value) {
16256
      if (!value) {
16257
        this.success = null;
16258
      }
16259
    }
16260
 
16261
    public UserContextException getUcx() {
16262
      return this.ucx;
16263
    }
16264
 
16265
    public getDefaultPincode_result setUcx(UserContextException ucx) {
16266
      this.ucx = ucx;
16267
      return this;
16268
    }
16269
 
16270
    public void unsetUcx() {
16271
      this.ucx = null;
16272
    }
16273
 
16274
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
16275
    public boolean isSetUcx() {
16276
      return this.ucx != null;
16277
    }
16278
 
16279
    public void setUcxIsSet(boolean value) {
16280
      if (!value) {
16281
        this.ucx = null;
16282
      }
16283
    }
16284
 
16285
    public void setFieldValue(_Fields field, Object value) {
16286
      switch (field) {
16287
      case SUCCESS:
16288
        if (value == null) {
16289
          unsetSuccess();
16290
        } else {
16291
          setSuccess((String)value);
16292
        }
16293
        break;
16294
 
16295
      case UCX:
16296
        if (value == null) {
16297
          unsetUcx();
16298
        } else {
16299
          setUcx((UserContextException)value);
16300
        }
16301
        break;
16302
 
16303
      }
16304
    }
16305
 
16306
    public void setFieldValue(int fieldID, Object value) {
16307
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16308
    }
16309
 
16310
    public Object getFieldValue(_Fields field) {
16311
      switch (field) {
16312
      case SUCCESS:
16313
        return getSuccess();
16314
 
16315
      case UCX:
16316
        return getUcx();
16317
 
16318
      }
16319
      throw new IllegalStateException();
16320
    }
16321
 
16322
    public Object getFieldValue(int fieldId) {
16323
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16324
    }
16325
 
16326
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16327
    public boolean isSet(_Fields field) {
16328
      switch (field) {
16329
      case SUCCESS:
16330
        return isSetSuccess();
16331
      case UCX:
16332
        return isSetUcx();
16333
      }
16334
      throw new IllegalStateException();
16335
    }
16336
 
16337
    public boolean isSet(int fieldID) {
16338
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16339
    }
16340
 
16341
    @Override
16342
    public boolean equals(Object that) {
16343
      if (that == null)
16344
        return false;
16345
      if (that instanceof getDefaultPincode_result)
16346
        return this.equals((getDefaultPincode_result)that);
16347
      return false;
16348
    }
16349
 
16350
    public boolean equals(getDefaultPincode_result that) {
16351
      if (that == null)
16352
        return false;
16353
 
16354
      boolean this_present_success = true && this.isSetSuccess();
16355
      boolean that_present_success = true && that.isSetSuccess();
16356
      if (this_present_success || that_present_success) {
16357
        if (!(this_present_success && that_present_success))
16358
          return false;
16359
        if (!this.success.equals(that.success))
16360
          return false;
16361
      }
16362
 
16363
      boolean this_present_ucx = true && this.isSetUcx();
16364
      boolean that_present_ucx = true && that.isSetUcx();
16365
      if (this_present_ucx || that_present_ucx) {
16366
        if (!(this_present_ucx && that_present_ucx))
16367
          return false;
16368
        if (!this.ucx.equals(that.ucx))
16369
          return false;
16370
      }
16371
 
16372
      return true;
16373
    }
16374
 
16375
    @Override
16376
    public int hashCode() {
16377
      return 0;
16378
    }
16379
 
16380
    public int compareTo(getDefaultPincode_result other) {
16381
      if (!getClass().equals(other.getClass())) {
16382
        return getClass().getName().compareTo(other.getClass().getName());
16383
      }
16384
 
16385
      int lastComparison = 0;
16386
      getDefaultPincode_result typedOther = (getDefaultPincode_result)other;
16387
 
16388
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16389
      if (lastComparison != 0) {
16390
        return lastComparison;
16391
      }
16392
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16393
      if (lastComparison != 0) {
16394
        return lastComparison;
16395
      }
16396
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16397
      if (lastComparison != 0) {
16398
        return lastComparison;
16399
      }
16400
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16401
      if (lastComparison != 0) {
16402
        return lastComparison;
16403
      }
16404
      return 0;
16405
    }
16406
 
16407
    public void read(TProtocol iprot) throws TException {
16408
      TField field;
16409
      iprot.readStructBegin();
16410
      while (true)
16411
      {
16412
        field = iprot.readFieldBegin();
16413
        if (field.type == TType.STOP) { 
16414
          break;
16415
        }
16416
        _Fields fieldId = _Fields.findByThriftId(field.id);
16417
        if (fieldId == null) {
16418
          TProtocolUtil.skip(iprot, field.type);
16419
        } else {
16420
          switch (fieldId) {
16421
            case SUCCESS:
16422
              if (field.type == TType.STRING) {
16423
                this.success = iprot.readString();
16424
              } else { 
16425
                TProtocolUtil.skip(iprot, field.type);
16426
              }
16427
              break;
16428
            case UCX:
16429
              if (field.type == TType.STRUCT) {
16430
                this.ucx = new UserContextException();
16431
                this.ucx.read(iprot);
16432
              } else { 
16433
                TProtocolUtil.skip(iprot, field.type);
16434
              }
16435
              break;
16436
          }
16437
          iprot.readFieldEnd();
16438
        }
16439
      }
16440
      iprot.readStructEnd();
16441
      validate();
16442
    }
16443
 
16444
    public void write(TProtocol oprot) throws TException {
16445
      oprot.writeStructBegin(STRUCT_DESC);
16446
 
16447
      if (this.isSetSuccess()) {
16448
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16449
        oprot.writeString(this.success);
16450
        oprot.writeFieldEnd();
16451
      } else if (this.isSetUcx()) {
16452
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16453
        this.ucx.write(oprot);
16454
        oprot.writeFieldEnd();
16455
      }
16456
      oprot.writeFieldStop();
16457
      oprot.writeStructEnd();
16458
    }
16459
 
16460
    @Override
16461
    public String toString() {
16462
      StringBuilder sb = new StringBuilder("getDefaultPincode_result(");
16463
      boolean first = true;
16464
 
16465
      sb.append("success:");
16466
      if (this.success == null) {
16467
        sb.append("null");
16468
      } else {
16469
        sb.append(this.success);
16470
      }
16471
      first = false;
16472
      if (!first) sb.append(", ");
16473
      sb.append("ucx:");
16474
      if (this.ucx == null) {
16475
        sb.append("null");
16476
      } else {
16477
        sb.append(this.ucx);
16478
      }
16479
      first = false;
16480
      sb.append(")");
16481
      return sb.toString();
16482
    }
16483
 
16484
    public void validate() throws TException {
16485
      // check for required fields
16486
    }
16487
 
16488
  }
16489
 
1177 varun.gupt 16490
  public static class saveUserCommunication_args implements TBase<saveUserCommunication_args._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_args>   {
16491
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_args");
16492
 
16493
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
16494
    private static final TField REPLY_TO_FIELD_DESC = new TField("replyTo", TType.STRING, (short)2);
16495
    private static final TField COMMUNICATION_TYPE_FIELD_DESC = new TField("communicationType", TType.I64, (short)3);
16496
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)4);
16497
    private static final TField AIRWAYBILL_NO_FIELD_DESC = new TField("airwaybillNo", TType.STRING, (short)5);
16498
    private static final TField PRODUCT_NAME_FIELD_DESC = new TField("productName", TType.STRING, (short)6);
16499
    private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)7);
16500
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)8);
16501
 
16502
    private long userId;
16503
    private String replyTo;
16504
    private long communicationType;
16505
    private long orderId;
16506
    private String airwaybillNo;
16507
    private String productName;
16508
    private String subject;
16509
    private String message;
16510
 
16511
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16512
    public enum _Fields implements TFieldIdEnum {
16513
      USER_ID((short)1, "userId"),
16514
      REPLY_TO((short)2, "replyTo"),
16515
      COMMUNICATION_TYPE((short)3, "communicationType"),
16516
      ORDER_ID((short)4, "orderId"),
16517
      AIRWAYBILL_NO((short)5, "airwaybillNo"),
16518
      PRODUCT_NAME((short)6, "productName"),
16519
      SUBJECT((short)7, "subject"),
16520
      MESSAGE((short)8, "message");
16521
 
16522
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16523
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16524
 
16525
      static {
16526
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16527
          byId.put((int)field._thriftId, field);
16528
          byName.put(field.getFieldName(), field);
16529
        }
16530
      }
16531
 
16532
      /**
16533
       * Find the _Fields constant that matches fieldId, or null if its not found.
16534
       */
16535
      public static _Fields findByThriftId(int fieldId) {
16536
        return byId.get(fieldId);
16537
      }
16538
 
16539
      /**
16540
       * Find the _Fields constant that matches fieldId, throwing an exception
16541
       * if it is not found.
16542
       */
16543
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16544
        _Fields fields = findByThriftId(fieldId);
16545
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16546
        return fields;
16547
      }
16548
 
16549
      /**
16550
       * Find the _Fields constant that matches name, or null if its not found.
16551
       */
16552
      public static _Fields findByName(String name) {
16553
        return byName.get(name);
16554
      }
16555
 
16556
      private final short _thriftId;
16557
      private final String _fieldName;
16558
 
16559
      _Fields(short thriftId, String fieldName) {
16560
        _thriftId = thriftId;
16561
        _fieldName = fieldName;
16562
      }
16563
 
16564
      public short getThriftFieldId() {
16565
        return _thriftId;
16566
      }
16567
 
16568
      public String getFieldName() {
16569
        return _fieldName;
16570
      }
16571
    }
16572
 
16573
    // isset id assignments
16574
    private static final int __USERID_ISSET_ID = 0;
16575
    private static final int __COMMUNICATIONTYPE_ISSET_ID = 1;
16576
    private static final int __ORDERID_ISSET_ID = 2;
16577
    private BitSet __isset_bit_vector = new BitSet(3);
16578
 
16579
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16580
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
16581
          new FieldValueMetaData(TType.I64)));
16582
      put(_Fields.REPLY_TO, new FieldMetaData("replyTo", TFieldRequirementType.DEFAULT, 
16583
          new FieldValueMetaData(TType.STRING)));
16584
      put(_Fields.COMMUNICATION_TYPE, new FieldMetaData("communicationType", TFieldRequirementType.DEFAULT, 
16585
          new FieldValueMetaData(TType.I64)));
16586
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
16587
          new FieldValueMetaData(TType.I64)));
16588
      put(_Fields.AIRWAYBILL_NO, new FieldMetaData("airwaybillNo", TFieldRequirementType.DEFAULT, 
16589
          new FieldValueMetaData(TType.STRING)));
16590
      put(_Fields.PRODUCT_NAME, new FieldMetaData("productName", TFieldRequirementType.DEFAULT, 
16591
          new FieldValueMetaData(TType.STRING)));
16592
      put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
16593
          new FieldValueMetaData(TType.STRING)));
16594
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
16595
          new FieldValueMetaData(TType.STRING)));
16596
    }});
16597
 
16598
    static {
16599
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_args.class, metaDataMap);
16600
    }
16601
 
16602
    public saveUserCommunication_args() {
16603
    }
16604
 
16605
    public saveUserCommunication_args(
16606
      long userId,
16607
      String replyTo,
16608
      long communicationType,
16609
      long orderId,
16610
      String airwaybillNo,
16611
      String productName,
16612
      String subject,
16613
      String message)
16614
    {
16615
      this();
16616
      this.userId = userId;
16617
      setUserIdIsSet(true);
16618
      this.replyTo = replyTo;
16619
      this.communicationType = communicationType;
16620
      setCommunicationTypeIsSet(true);
16621
      this.orderId = orderId;
16622
      setOrderIdIsSet(true);
16623
      this.airwaybillNo = airwaybillNo;
16624
      this.productName = productName;
16625
      this.subject = subject;
16626
      this.message = message;
16627
    }
16628
 
16629
    /**
16630
     * Performs a deep copy on <i>other</i>.
16631
     */
16632
    public saveUserCommunication_args(saveUserCommunication_args other) {
16633
      __isset_bit_vector.clear();
16634
      __isset_bit_vector.or(other.__isset_bit_vector);
16635
      this.userId = other.userId;
16636
      if (other.isSetReplyTo()) {
16637
        this.replyTo = other.replyTo;
16638
      }
16639
      this.communicationType = other.communicationType;
16640
      this.orderId = other.orderId;
16641
      if (other.isSetAirwaybillNo()) {
16642
        this.airwaybillNo = other.airwaybillNo;
16643
      }
16644
      if (other.isSetProductName()) {
16645
        this.productName = other.productName;
16646
      }
16647
      if (other.isSetSubject()) {
16648
        this.subject = other.subject;
16649
      }
16650
      if (other.isSetMessage()) {
16651
        this.message = other.message;
16652
      }
16653
    }
16654
 
16655
    public saveUserCommunication_args deepCopy() {
16656
      return new saveUserCommunication_args(this);
16657
    }
16658
 
16659
    @Deprecated
16660
    public saveUserCommunication_args clone() {
16661
      return new saveUserCommunication_args(this);
16662
    }
16663
 
16664
    public long getUserId() {
16665
      return this.userId;
16666
    }
16667
 
16668
    public saveUserCommunication_args setUserId(long userId) {
16669
      this.userId = userId;
16670
      setUserIdIsSet(true);
16671
      return this;
16672
    }
16673
 
16674
    public void unsetUserId() {
16675
      __isset_bit_vector.clear(__USERID_ISSET_ID);
16676
    }
16677
 
16678
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
16679
    public boolean isSetUserId() {
16680
      return __isset_bit_vector.get(__USERID_ISSET_ID);
16681
    }
16682
 
16683
    public void setUserIdIsSet(boolean value) {
16684
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
16685
    }
16686
 
16687
    public String getReplyTo() {
16688
      return this.replyTo;
16689
    }
16690
 
16691
    public saveUserCommunication_args setReplyTo(String replyTo) {
16692
      this.replyTo = replyTo;
16693
      return this;
16694
    }
16695
 
16696
    public void unsetReplyTo() {
16697
      this.replyTo = null;
16698
    }
16699
 
16700
    /** Returns true if field replyTo is set (has been asigned a value) and false otherwise */
16701
    public boolean isSetReplyTo() {
16702
      return this.replyTo != null;
16703
    }
16704
 
16705
    public void setReplyToIsSet(boolean value) {
16706
      if (!value) {
16707
        this.replyTo = null;
16708
      }
16709
    }
16710
 
16711
    public long getCommunicationType() {
16712
      return this.communicationType;
16713
    }
16714
 
16715
    public saveUserCommunication_args setCommunicationType(long communicationType) {
16716
      this.communicationType = communicationType;
16717
      setCommunicationTypeIsSet(true);
16718
      return this;
16719
    }
16720
 
16721
    public void unsetCommunicationType() {
16722
      __isset_bit_vector.clear(__COMMUNICATIONTYPE_ISSET_ID);
16723
    }
16724
 
16725
    /** Returns true if field communicationType is set (has been asigned a value) and false otherwise */
16726
    public boolean isSetCommunicationType() {
16727
      return __isset_bit_vector.get(__COMMUNICATIONTYPE_ISSET_ID);
16728
    }
16729
 
16730
    public void setCommunicationTypeIsSet(boolean value) {
16731
      __isset_bit_vector.set(__COMMUNICATIONTYPE_ISSET_ID, value);
16732
    }
16733
 
16734
    public long getOrderId() {
16735
      return this.orderId;
16736
    }
16737
 
16738
    public saveUserCommunication_args setOrderId(long orderId) {
16739
      this.orderId = orderId;
16740
      setOrderIdIsSet(true);
16741
      return this;
16742
    }
16743
 
16744
    public void unsetOrderId() {
16745
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
16746
    }
16747
 
16748
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
16749
    public boolean isSetOrderId() {
16750
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
16751
    }
16752
 
16753
    public void setOrderIdIsSet(boolean value) {
16754
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
16755
    }
16756
 
16757
    public String getAirwaybillNo() {
16758
      return this.airwaybillNo;
16759
    }
16760
 
16761
    public saveUserCommunication_args setAirwaybillNo(String airwaybillNo) {
16762
      this.airwaybillNo = airwaybillNo;
16763
      return this;
16764
    }
16765
 
16766
    public void unsetAirwaybillNo() {
16767
      this.airwaybillNo = null;
16768
    }
16769
 
16770
    /** Returns true if field airwaybillNo is set (has been asigned a value) and false otherwise */
16771
    public boolean isSetAirwaybillNo() {
16772
      return this.airwaybillNo != null;
16773
    }
16774
 
16775
    public void setAirwaybillNoIsSet(boolean value) {
16776
      if (!value) {
16777
        this.airwaybillNo = null;
16778
      }
16779
    }
16780
 
16781
    public String getProductName() {
16782
      return this.productName;
16783
    }
16784
 
16785
    public saveUserCommunication_args setProductName(String productName) {
16786
      this.productName = productName;
16787
      return this;
16788
    }
16789
 
16790
    public void unsetProductName() {
16791
      this.productName = null;
16792
    }
16793
 
16794
    /** Returns true if field productName is set (has been asigned a value) and false otherwise */
16795
    public boolean isSetProductName() {
16796
      return this.productName != null;
16797
    }
16798
 
16799
    public void setProductNameIsSet(boolean value) {
16800
      if (!value) {
16801
        this.productName = null;
16802
      }
16803
    }
16804
 
16805
    public String getSubject() {
16806
      return this.subject;
16807
    }
16808
 
16809
    public saveUserCommunication_args setSubject(String subject) {
16810
      this.subject = subject;
16811
      return this;
16812
    }
16813
 
16814
    public void unsetSubject() {
16815
      this.subject = null;
16816
    }
16817
 
16818
    /** Returns true if field subject is set (has been asigned a value) and false otherwise */
16819
    public boolean isSetSubject() {
16820
      return this.subject != null;
16821
    }
16822
 
16823
    public void setSubjectIsSet(boolean value) {
16824
      if (!value) {
16825
        this.subject = null;
16826
      }
16827
    }
16828
 
16829
    public String getMessage() {
16830
      return this.message;
16831
    }
16832
 
16833
    public saveUserCommunication_args setMessage(String message) {
16834
      this.message = message;
16835
      return this;
16836
    }
16837
 
16838
    public void unsetMessage() {
16839
      this.message = null;
16840
    }
16841
 
16842
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
16843
    public boolean isSetMessage() {
16844
      return this.message != null;
16845
    }
16846
 
16847
    public void setMessageIsSet(boolean value) {
16848
      if (!value) {
16849
        this.message = null;
16850
      }
16851
    }
16852
 
16853
    public void setFieldValue(_Fields field, Object value) {
16854
      switch (field) {
16855
      case USER_ID:
16856
        if (value == null) {
16857
          unsetUserId();
16858
        } else {
16859
          setUserId((Long)value);
16860
        }
16861
        break;
16862
 
16863
      case REPLY_TO:
16864
        if (value == null) {
16865
          unsetReplyTo();
16866
        } else {
16867
          setReplyTo((String)value);
16868
        }
16869
        break;
16870
 
16871
      case COMMUNICATION_TYPE:
16872
        if (value == null) {
16873
          unsetCommunicationType();
16874
        } else {
16875
          setCommunicationType((Long)value);
16876
        }
16877
        break;
16878
 
16879
      case ORDER_ID:
16880
        if (value == null) {
16881
          unsetOrderId();
16882
        } else {
16883
          setOrderId((Long)value);
16884
        }
16885
        break;
16886
 
16887
      case AIRWAYBILL_NO:
16888
        if (value == null) {
16889
          unsetAirwaybillNo();
16890
        } else {
16891
          setAirwaybillNo((String)value);
16892
        }
16893
        break;
16894
 
16895
      case PRODUCT_NAME:
16896
        if (value == null) {
16897
          unsetProductName();
16898
        } else {
16899
          setProductName((String)value);
16900
        }
16901
        break;
16902
 
16903
      case SUBJECT:
16904
        if (value == null) {
16905
          unsetSubject();
16906
        } else {
16907
          setSubject((String)value);
16908
        }
16909
        break;
16910
 
16911
      case MESSAGE:
16912
        if (value == null) {
16913
          unsetMessage();
16914
        } else {
16915
          setMessage((String)value);
16916
        }
16917
        break;
16918
 
16919
      }
16920
    }
16921
 
16922
    public void setFieldValue(int fieldID, Object value) {
16923
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16924
    }
16925
 
16926
    public Object getFieldValue(_Fields field) {
16927
      switch (field) {
16928
      case USER_ID:
16929
        return new Long(getUserId());
16930
 
16931
      case REPLY_TO:
16932
        return getReplyTo();
16933
 
16934
      case COMMUNICATION_TYPE:
16935
        return new Long(getCommunicationType());
16936
 
16937
      case ORDER_ID:
16938
        return new Long(getOrderId());
16939
 
16940
      case AIRWAYBILL_NO:
16941
        return getAirwaybillNo();
16942
 
16943
      case PRODUCT_NAME:
16944
        return getProductName();
16945
 
16946
      case SUBJECT:
16947
        return getSubject();
16948
 
16949
      case MESSAGE:
16950
        return getMessage();
16951
 
16952
      }
16953
      throw new IllegalStateException();
16954
    }
16955
 
16956
    public Object getFieldValue(int fieldId) {
16957
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16958
    }
16959
 
16960
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16961
    public boolean isSet(_Fields field) {
16962
      switch (field) {
16963
      case USER_ID:
16964
        return isSetUserId();
16965
      case REPLY_TO:
16966
        return isSetReplyTo();
16967
      case COMMUNICATION_TYPE:
16968
        return isSetCommunicationType();
16969
      case ORDER_ID:
16970
        return isSetOrderId();
16971
      case AIRWAYBILL_NO:
16972
        return isSetAirwaybillNo();
16973
      case PRODUCT_NAME:
16974
        return isSetProductName();
16975
      case SUBJECT:
16976
        return isSetSubject();
16977
      case MESSAGE:
16978
        return isSetMessage();
16979
      }
16980
      throw new IllegalStateException();
16981
    }
16982
 
16983
    public boolean isSet(int fieldID) {
16984
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16985
    }
16986
 
16987
    @Override
16988
    public boolean equals(Object that) {
16989
      if (that == null)
16990
        return false;
16991
      if (that instanceof saveUserCommunication_args)
16992
        return this.equals((saveUserCommunication_args)that);
16993
      return false;
16994
    }
16995
 
16996
    public boolean equals(saveUserCommunication_args that) {
16997
      if (that == null)
16998
        return false;
16999
 
17000
      boolean this_present_userId = true;
17001
      boolean that_present_userId = true;
17002
      if (this_present_userId || that_present_userId) {
17003
        if (!(this_present_userId && that_present_userId))
17004
          return false;
17005
        if (this.userId != that.userId)
17006
          return false;
17007
      }
17008
 
17009
      boolean this_present_replyTo = true && this.isSetReplyTo();
17010
      boolean that_present_replyTo = true && that.isSetReplyTo();
17011
      if (this_present_replyTo || that_present_replyTo) {
17012
        if (!(this_present_replyTo && that_present_replyTo))
17013
          return false;
17014
        if (!this.replyTo.equals(that.replyTo))
17015
          return false;
17016
      }
17017
 
17018
      boolean this_present_communicationType = true;
17019
      boolean that_present_communicationType = true;
17020
      if (this_present_communicationType || that_present_communicationType) {
17021
        if (!(this_present_communicationType && that_present_communicationType))
17022
          return false;
17023
        if (this.communicationType != that.communicationType)
17024
          return false;
17025
      }
17026
 
17027
      boolean this_present_orderId = true;
17028
      boolean that_present_orderId = true;
17029
      if (this_present_orderId || that_present_orderId) {
17030
        if (!(this_present_orderId && that_present_orderId))
17031
          return false;
17032
        if (this.orderId != that.orderId)
17033
          return false;
17034
      }
17035
 
17036
      boolean this_present_airwaybillNo = true && this.isSetAirwaybillNo();
17037
      boolean that_present_airwaybillNo = true && that.isSetAirwaybillNo();
17038
      if (this_present_airwaybillNo || that_present_airwaybillNo) {
17039
        if (!(this_present_airwaybillNo && that_present_airwaybillNo))
17040
          return false;
17041
        if (!this.airwaybillNo.equals(that.airwaybillNo))
17042
          return false;
17043
      }
17044
 
17045
      boolean this_present_productName = true && this.isSetProductName();
17046
      boolean that_present_productName = true && that.isSetProductName();
17047
      if (this_present_productName || that_present_productName) {
17048
        if (!(this_present_productName && that_present_productName))
17049
          return false;
17050
        if (!this.productName.equals(that.productName))
17051
          return false;
17052
      }
17053
 
17054
      boolean this_present_subject = true && this.isSetSubject();
17055
      boolean that_present_subject = true && that.isSetSubject();
17056
      if (this_present_subject || that_present_subject) {
17057
        if (!(this_present_subject && that_present_subject))
17058
          return false;
17059
        if (!this.subject.equals(that.subject))
17060
          return false;
17061
      }
17062
 
17063
      boolean this_present_message = true && this.isSetMessage();
17064
      boolean that_present_message = true && that.isSetMessage();
17065
      if (this_present_message || that_present_message) {
17066
        if (!(this_present_message && that_present_message))
17067
          return false;
17068
        if (!this.message.equals(that.message))
17069
          return false;
17070
      }
17071
 
17072
      return true;
17073
    }
17074
 
17075
    @Override
17076
    public int hashCode() {
17077
      return 0;
17078
    }
17079
 
17080
    public int compareTo(saveUserCommunication_args other) {
17081
      if (!getClass().equals(other.getClass())) {
17082
        return getClass().getName().compareTo(other.getClass().getName());
17083
      }
17084
 
17085
      int lastComparison = 0;
17086
      saveUserCommunication_args typedOther = (saveUserCommunication_args)other;
17087
 
17088
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
17089
      if (lastComparison != 0) {
17090
        return lastComparison;
17091
      }
17092
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
17093
      if (lastComparison != 0) {
17094
        return lastComparison;
17095
      }
17096
      lastComparison = Boolean.valueOf(isSetReplyTo()).compareTo(isSetReplyTo());
17097
      if (lastComparison != 0) {
17098
        return lastComparison;
17099
      }
17100
      lastComparison = TBaseHelper.compareTo(replyTo, typedOther.replyTo);
17101
      if (lastComparison != 0) {
17102
        return lastComparison;
17103
      }
17104
      lastComparison = Boolean.valueOf(isSetCommunicationType()).compareTo(isSetCommunicationType());
17105
      if (lastComparison != 0) {
17106
        return lastComparison;
17107
      }
17108
      lastComparison = TBaseHelper.compareTo(communicationType, typedOther.communicationType);
17109
      if (lastComparison != 0) {
17110
        return lastComparison;
17111
      }
17112
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
17113
      if (lastComparison != 0) {
17114
        return lastComparison;
17115
      }
17116
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
17117
      if (lastComparison != 0) {
17118
        return lastComparison;
17119
      }
17120
      lastComparison = Boolean.valueOf(isSetAirwaybillNo()).compareTo(isSetAirwaybillNo());
17121
      if (lastComparison != 0) {
17122
        return lastComparison;
17123
      }
17124
      lastComparison = TBaseHelper.compareTo(airwaybillNo, typedOther.airwaybillNo);
17125
      if (lastComparison != 0) {
17126
        return lastComparison;
17127
      }
17128
      lastComparison = Boolean.valueOf(isSetProductName()).compareTo(isSetProductName());
17129
      if (lastComparison != 0) {
17130
        return lastComparison;
17131
      }
17132
      lastComparison = TBaseHelper.compareTo(productName, typedOther.productName);
17133
      if (lastComparison != 0) {
17134
        return lastComparison;
17135
      }
17136
      lastComparison = Boolean.valueOf(isSetSubject()).compareTo(isSetSubject());
17137
      if (lastComparison != 0) {
17138
        return lastComparison;
17139
      }
17140
      lastComparison = TBaseHelper.compareTo(subject, typedOther.subject);
17141
      if (lastComparison != 0) {
17142
        return lastComparison;
17143
      }
17144
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
17145
      if (lastComparison != 0) {
17146
        return lastComparison;
17147
      }
17148
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
17149
      if (lastComparison != 0) {
17150
        return lastComparison;
17151
      }
17152
      return 0;
17153
    }
17154
 
17155
    public void read(TProtocol iprot) throws TException {
17156
      TField field;
17157
      iprot.readStructBegin();
17158
      while (true)
17159
      {
17160
        field = iprot.readFieldBegin();
17161
        if (field.type == TType.STOP) { 
17162
          break;
17163
        }
17164
        _Fields fieldId = _Fields.findByThriftId(field.id);
17165
        if (fieldId == null) {
17166
          TProtocolUtil.skip(iprot, field.type);
17167
        } else {
17168
          switch (fieldId) {
17169
            case USER_ID:
17170
              if (field.type == TType.I64) {
17171
                this.userId = iprot.readI64();
17172
                setUserIdIsSet(true);
17173
              } else { 
17174
                TProtocolUtil.skip(iprot, field.type);
17175
              }
17176
              break;
17177
            case REPLY_TO:
17178
              if (field.type == TType.STRING) {
17179
                this.replyTo = iprot.readString();
17180
              } else { 
17181
                TProtocolUtil.skip(iprot, field.type);
17182
              }
17183
              break;
17184
            case COMMUNICATION_TYPE:
17185
              if (field.type == TType.I64) {
17186
                this.communicationType = iprot.readI64();
17187
                setCommunicationTypeIsSet(true);
17188
              } else { 
17189
                TProtocolUtil.skip(iprot, field.type);
17190
              }
17191
              break;
17192
            case ORDER_ID:
17193
              if (field.type == TType.I64) {
17194
                this.orderId = iprot.readI64();
17195
                setOrderIdIsSet(true);
17196
              } else { 
17197
                TProtocolUtil.skip(iprot, field.type);
17198
              }
17199
              break;
17200
            case AIRWAYBILL_NO:
17201
              if (field.type == TType.STRING) {
17202
                this.airwaybillNo = iprot.readString();
17203
              } else { 
17204
                TProtocolUtil.skip(iprot, field.type);
17205
              }
17206
              break;
17207
            case PRODUCT_NAME:
17208
              if (field.type == TType.STRING) {
17209
                this.productName = iprot.readString();
17210
              } else { 
17211
                TProtocolUtil.skip(iprot, field.type);
17212
              }
17213
              break;
17214
            case SUBJECT:
17215
              if (field.type == TType.STRING) {
17216
                this.subject = iprot.readString();
17217
              } else { 
17218
                TProtocolUtil.skip(iprot, field.type);
17219
              }
17220
              break;
17221
            case MESSAGE:
17222
              if (field.type == TType.STRING) {
17223
                this.message = iprot.readString();
17224
              } else { 
17225
                TProtocolUtil.skip(iprot, field.type);
17226
              }
17227
              break;
17228
          }
17229
          iprot.readFieldEnd();
17230
        }
17231
      }
17232
      iprot.readStructEnd();
17233
      validate();
17234
    }
17235
 
17236
    public void write(TProtocol oprot) throws TException {
17237
      validate();
17238
 
17239
      oprot.writeStructBegin(STRUCT_DESC);
17240
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17241
      oprot.writeI64(this.userId);
17242
      oprot.writeFieldEnd();
17243
      if (this.replyTo != null) {
17244
        oprot.writeFieldBegin(REPLY_TO_FIELD_DESC);
17245
        oprot.writeString(this.replyTo);
17246
        oprot.writeFieldEnd();
17247
      }
17248
      oprot.writeFieldBegin(COMMUNICATION_TYPE_FIELD_DESC);
17249
      oprot.writeI64(this.communicationType);
17250
      oprot.writeFieldEnd();
17251
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
17252
      oprot.writeI64(this.orderId);
17253
      oprot.writeFieldEnd();
17254
      if (this.airwaybillNo != null) {
17255
        oprot.writeFieldBegin(AIRWAYBILL_NO_FIELD_DESC);
17256
        oprot.writeString(this.airwaybillNo);
17257
        oprot.writeFieldEnd();
17258
      }
17259
      if (this.productName != null) {
17260
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
17261
        oprot.writeString(this.productName);
17262
        oprot.writeFieldEnd();
17263
      }
17264
      if (this.subject != null) {
17265
        oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
17266
        oprot.writeString(this.subject);
17267
        oprot.writeFieldEnd();
17268
      }
17269
      if (this.message != null) {
17270
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
17271
        oprot.writeString(this.message);
17272
        oprot.writeFieldEnd();
17273
      }
17274
      oprot.writeFieldStop();
17275
      oprot.writeStructEnd();
17276
    }
17277
 
17278
    @Override
17279
    public String toString() {
17280
      StringBuilder sb = new StringBuilder("saveUserCommunication_args(");
17281
      boolean first = true;
17282
 
17283
      sb.append("userId:");
17284
      sb.append(this.userId);
17285
      first = false;
17286
      if (!first) sb.append(", ");
17287
      sb.append("replyTo:");
17288
      if (this.replyTo == null) {
17289
        sb.append("null");
17290
      } else {
17291
        sb.append(this.replyTo);
17292
      }
17293
      first = false;
17294
      if (!first) sb.append(", ");
17295
      sb.append("communicationType:");
17296
      sb.append(this.communicationType);
17297
      first = false;
17298
      if (!first) sb.append(", ");
17299
      sb.append("orderId:");
17300
      sb.append(this.orderId);
17301
      first = false;
17302
      if (!first) sb.append(", ");
17303
      sb.append("airwaybillNo:");
17304
      if (this.airwaybillNo == null) {
17305
        sb.append("null");
17306
      } else {
17307
        sb.append(this.airwaybillNo);
17308
      }
17309
      first = false;
17310
      if (!first) sb.append(", ");
17311
      sb.append("productName:");
17312
      if (this.productName == null) {
17313
        sb.append("null");
17314
      } else {
17315
        sb.append(this.productName);
17316
      }
17317
      first = false;
17318
      if (!first) sb.append(", ");
17319
      sb.append("subject:");
17320
      if (this.subject == null) {
17321
        sb.append("null");
17322
      } else {
17323
        sb.append(this.subject);
17324
      }
17325
      first = false;
17326
      if (!first) sb.append(", ");
17327
      sb.append("message:");
17328
      if (this.message == null) {
17329
        sb.append("null");
17330
      } else {
17331
        sb.append(this.message);
17332
      }
17333
      first = false;
17334
      sb.append(")");
17335
      return sb.toString();
17336
    }
17337
 
17338
    public void validate() throws TException {
17339
      // check for required fields
17340
    }
17341
 
17342
  }
17343
 
17344
  public static class saveUserCommunication_result implements TBase<saveUserCommunication_result._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_result>   {
17345
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_result");
17346
 
17347
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
17348
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
17349
 
17350
    private boolean success;
17351
    private UserCommunicationException ucx;
17352
 
17353
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17354
    public enum _Fields implements TFieldIdEnum {
17355
      SUCCESS((short)0, "success"),
17356
      UCX((short)1, "ucx");
17357
 
17358
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17359
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17360
 
17361
      static {
17362
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17363
          byId.put((int)field._thriftId, field);
17364
          byName.put(field.getFieldName(), field);
17365
        }
17366
      }
17367
 
17368
      /**
17369
       * Find the _Fields constant that matches fieldId, or null if its not found.
17370
       */
17371
      public static _Fields findByThriftId(int fieldId) {
17372
        return byId.get(fieldId);
17373
      }
17374
 
17375
      /**
17376
       * Find the _Fields constant that matches fieldId, throwing an exception
17377
       * if it is not found.
17378
       */
17379
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17380
        _Fields fields = findByThriftId(fieldId);
17381
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17382
        return fields;
17383
      }
17384
 
17385
      /**
17386
       * Find the _Fields constant that matches name, or null if its not found.
17387
       */
17388
      public static _Fields findByName(String name) {
17389
        return byName.get(name);
17390
      }
17391
 
17392
      private final short _thriftId;
17393
      private final String _fieldName;
17394
 
17395
      _Fields(short thriftId, String fieldName) {
17396
        _thriftId = thriftId;
17397
        _fieldName = fieldName;
17398
      }
17399
 
17400
      public short getThriftFieldId() {
17401
        return _thriftId;
17402
      }
17403
 
17404
      public String getFieldName() {
17405
        return _fieldName;
17406
      }
17407
    }
17408
 
17409
    // isset id assignments
17410
    private static final int __SUCCESS_ISSET_ID = 0;
17411
    private BitSet __isset_bit_vector = new BitSet(1);
17412
 
17413
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17414
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17415
          new FieldValueMetaData(TType.BOOL)));
17416
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
17417
          new FieldValueMetaData(TType.STRUCT)));
17418
    }});
17419
 
17420
    static {
17421
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_result.class, metaDataMap);
17422
    }
17423
 
17424
    public saveUserCommunication_result() {
17425
    }
17426
 
17427
    public saveUserCommunication_result(
17428
      boolean success,
17429
      UserCommunicationException ucx)
17430
    {
17431
      this();
17432
      this.success = success;
17433
      setSuccessIsSet(true);
17434
      this.ucx = ucx;
17435
    }
17436
 
17437
    /**
17438
     * Performs a deep copy on <i>other</i>.
17439
     */
17440
    public saveUserCommunication_result(saveUserCommunication_result other) {
17441
      __isset_bit_vector.clear();
17442
      __isset_bit_vector.or(other.__isset_bit_vector);
17443
      this.success = other.success;
17444
      if (other.isSetUcx()) {
17445
        this.ucx = new UserCommunicationException(other.ucx);
17446
      }
17447
    }
17448
 
17449
    public saveUserCommunication_result deepCopy() {
17450
      return new saveUserCommunication_result(this);
17451
    }
17452
 
17453
    @Deprecated
17454
    public saveUserCommunication_result clone() {
17455
      return new saveUserCommunication_result(this);
17456
    }
17457
 
17458
    public boolean isSuccess() {
17459
      return this.success;
17460
    }
17461
 
17462
    public saveUserCommunication_result setSuccess(boolean success) {
17463
      this.success = success;
17464
      setSuccessIsSet(true);
17465
      return this;
17466
    }
17467
 
17468
    public void unsetSuccess() {
17469
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17470
    }
17471
 
17472
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17473
    public boolean isSetSuccess() {
17474
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17475
    }
17476
 
17477
    public void setSuccessIsSet(boolean value) {
17478
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17479
    }
17480
 
17481
    public UserCommunicationException getUcx() {
17482
      return this.ucx;
17483
    }
17484
 
17485
    public saveUserCommunication_result setUcx(UserCommunicationException ucx) {
17486
      this.ucx = ucx;
17487
      return this;
17488
    }
17489
 
17490
    public void unsetUcx() {
17491
      this.ucx = null;
17492
    }
17493
 
17494
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
17495
    public boolean isSetUcx() {
17496
      return this.ucx != null;
17497
    }
17498
 
17499
    public void setUcxIsSet(boolean value) {
17500
      if (!value) {
17501
        this.ucx = null;
17502
      }
17503
    }
17504
 
17505
    public void setFieldValue(_Fields field, Object value) {
17506
      switch (field) {
17507
      case SUCCESS:
17508
        if (value == null) {
17509
          unsetSuccess();
17510
        } else {
17511
          setSuccess((Boolean)value);
17512
        }
17513
        break;
17514
 
17515
      case UCX:
17516
        if (value == null) {
17517
          unsetUcx();
17518
        } else {
17519
          setUcx((UserCommunicationException)value);
17520
        }
17521
        break;
17522
 
17523
      }
17524
    }
17525
 
17526
    public void setFieldValue(int fieldID, Object value) {
17527
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17528
    }
17529
 
17530
    public Object getFieldValue(_Fields field) {
17531
      switch (field) {
17532
      case SUCCESS:
17533
        return new Boolean(isSuccess());
17534
 
17535
      case UCX:
17536
        return getUcx();
17537
 
17538
      }
17539
      throw new IllegalStateException();
17540
    }
17541
 
17542
    public Object getFieldValue(int fieldId) {
17543
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17544
    }
17545
 
17546
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17547
    public boolean isSet(_Fields field) {
17548
      switch (field) {
17549
      case SUCCESS:
17550
        return isSetSuccess();
17551
      case UCX:
17552
        return isSetUcx();
17553
      }
17554
      throw new IllegalStateException();
17555
    }
17556
 
17557
    public boolean isSet(int fieldID) {
17558
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17559
    }
17560
 
17561
    @Override
17562
    public boolean equals(Object that) {
17563
      if (that == null)
17564
        return false;
17565
      if (that instanceof saveUserCommunication_result)
17566
        return this.equals((saveUserCommunication_result)that);
17567
      return false;
17568
    }
17569
 
17570
    public boolean equals(saveUserCommunication_result that) {
17571
      if (that == null)
17572
        return false;
17573
 
17574
      boolean this_present_success = true;
17575
      boolean that_present_success = true;
17576
      if (this_present_success || that_present_success) {
17577
        if (!(this_present_success && that_present_success))
17578
          return false;
17579
        if (this.success != that.success)
17580
          return false;
17581
      }
17582
 
17583
      boolean this_present_ucx = true && this.isSetUcx();
17584
      boolean that_present_ucx = true && that.isSetUcx();
17585
      if (this_present_ucx || that_present_ucx) {
17586
        if (!(this_present_ucx && that_present_ucx))
17587
          return false;
17588
        if (!this.ucx.equals(that.ucx))
17589
          return false;
17590
      }
17591
 
17592
      return true;
17593
    }
17594
 
17595
    @Override
17596
    public int hashCode() {
17597
      return 0;
17598
    }
17599
 
17600
    public int compareTo(saveUserCommunication_result other) {
17601
      if (!getClass().equals(other.getClass())) {
17602
        return getClass().getName().compareTo(other.getClass().getName());
17603
      }
17604
 
17605
      int lastComparison = 0;
17606
      saveUserCommunication_result typedOther = (saveUserCommunication_result)other;
17607
 
17608
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17609
      if (lastComparison != 0) {
17610
        return lastComparison;
17611
      }
17612
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17613
      if (lastComparison != 0) {
17614
        return lastComparison;
17615
      }
17616
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
17617
      if (lastComparison != 0) {
17618
        return lastComparison;
17619
      }
17620
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
17621
      if (lastComparison != 0) {
17622
        return lastComparison;
17623
      }
17624
      return 0;
17625
    }
17626
 
17627
    public void read(TProtocol iprot) throws TException {
17628
      TField field;
17629
      iprot.readStructBegin();
17630
      while (true)
17631
      {
17632
        field = iprot.readFieldBegin();
17633
        if (field.type == TType.STOP) { 
17634
          break;
17635
        }
17636
        _Fields fieldId = _Fields.findByThriftId(field.id);
17637
        if (fieldId == null) {
17638
          TProtocolUtil.skip(iprot, field.type);
17639
        } else {
17640
          switch (fieldId) {
17641
            case SUCCESS:
17642
              if (field.type == TType.BOOL) {
17643
                this.success = iprot.readBool();
17644
                setSuccessIsSet(true);
17645
              } else { 
17646
                TProtocolUtil.skip(iprot, field.type);
17647
              }
17648
              break;
17649
            case UCX:
17650
              if (field.type == TType.STRUCT) {
17651
                this.ucx = new UserCommunicationException();
17652
                this.ucx.read(iprot);
17653
              } else { 
17654
                TProtocolUtil.skip(iprot, field.type);
17655
              }
17656
              break;
17657
          }
17658
          iprot.readFieldEnd();
17659
        }
17660
      }
17661
      iprot.readStructEnd();
17662
      validate();
17663
    }
17664
 
17665
    public void write(TProtocol oprot) throws TException {
17666
      oprot.writeStructBegin(STRUCT_DESC);
17667
 
17668
      if (this.isSetSuccess()) {
17669
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
17670
        oprot.writeBool(this.success);
17671
        oprot.writeFieldEnd();
17672
      } else if (this.isSetUcx()) {
17673
        oprot.writeFieldBegin(UCX_FIELD_DESC);
17674
        this.ucx.write(oprot);
17675
        oprot.writeFieldEnd();
17676
      }
17677
      oprot.writeFieldStop();
17678
      oprot.writeStructEnd();
17679
    }
17680
 
17681
    @Override
17682
    public String toString() {
17683
      StringBuilder sb = new StringBuilder("saveUserCommunication_result(");
17684
      boolean first = true;
17685
 
17686
      sb.append("success:");
17687
      sb.append(this.success);
17688
      first = false;
17689
      if (!first) sb.append(", ");
17690
      sb.append("ucx:");
17691
      if (this.ucx == null) {
17692
        sb.append("null");
17693
      } else {
17694
        sb.append(this.ucx);
17695
      }
17696
      first = false;
17697
      sb.append(")");
17698
      return sb.toString();
17699
    }
17700
 
17701
    public void validate() throws TException {
17702
      // check for required fields
17703
    }
17704
 
17705
  }
17706
 
553 chandransh 17707
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
17708
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 17709
 
553 chandransh 17710
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 17711
 
553 chandransh 17712
    private long userId;
48 ashish 17713
 
17714
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17715
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17716
      USER_ID((short)1, "userId");
48 ashish 17717
 
17718
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17719
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17720
 
17721
      static {
17722
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17723
          byId.put((int)field._thriftId, field);
17724
          byName.put(field.getFieldName(), field);
17725
        }
17726
      }
17727
 
17728
      /**
17729
       * Find the _Fields constant that matches fieldId, or null if its not found.
17730
       */
17731
      public static _Fields findByThriftId(int fieldId) {
17732
        return byId.get(fieldId);
17733
      }
17734
 
17735
      /**
17736
       * Find the _Fields constant that matches fieldId, throwing an exception
17737
       * if it is not found.
17738
       */
17739
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17740
        _Fields fields = findByThriftId(fieldId);
17741
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17742
        return fields;
17743
      }
17744
 
17745
      /**
17746
       * Find the _Fields constant that matches name, or null if its not found.
17747
       */
17748
      public static _Fields findByName(String name) {
17749
        return byName.get(name);
17750
      }
17751
 
17752
      private final short _thriftId;
17753
      private final String _fieldName;
17754
 
17755
      _Fields(short thriftId, String fieldName) {
17756
        _thriftId = thriftId;
17757
        _fieldName = fieldName;
17758
      }
17759
 
17760
      public short getThriftFieldId() {
17761
        return _thriftId;
17762
      }
17763
 
17764
      public String getFieldName() {
17765
        return _fieldName;
17766
      }
17767
    }
17768
 
17769
    // isset id assignments
17770
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 17771
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 17772
 
17773
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17774
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 17775
          new FieldValueMetaData(TType.I64)));
17776
    }});
17777
 
17778
    static {
553 chandransh 17779
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 17780
    }
17781
 
553 chandransh 17782
    public createCart_args() {
48 ashish 17783
    }
17784
 
553 chandransh 17785
    public createCart_args(
17786
      long userId)
48 ashish 17787
    {
17788
      this();
553 chandransh 17789
      this.userId = userId;
17790
      setUserIdIsSet(true);
48 ashish 17791
    }
17792
 
17793
    /**
17794
     * Performs a deep copy on <i>other</i>.
17795
     */
553 chandransh 17796
    public createCart_args(createCart_args other) {
48 ashish 17797
      __isset_bit_vector.clear();
17798
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17799
      this.userId = other.userId;
48 ashish 17800
    }
17801
 
553 chandransh 17802
    public createCart_args deepCopy() {
17803
      return new createCart_args(this);
48 ashish 17804
    }
17805
 
17806
    @Deprecated
553 chandransh 17807
    public createCart_args clone() {
17808
      return new createCart_args(this);
48 ashish 17809
    }
17810
 
553 chandransh 17811
    public long getUserId() {
17812
      return this.userId;
48 ashish 17813
    }
17814
 
553 chandransh 17815
    public createCart_args setUserId(long userId) {
17816
      this.userId = userId;
17817
      setUserIdIsSet(true);
48 ashish 17818
      return this;
17819
    }
17820
 
553 chandransh 17821
    public void unsetUserId() {
48 ashish 17822
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17823
    }
17824
 
553 chandransh 17825
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
17826
    public boolean isSetUserId() {
48 ashish 17827
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17828
    }
17829
 
553 chandransh 17830
    public void setUserIdIsSet(boolean value) {
48 ashish 17831
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17832
    }
17833
 
17834
    public void setFieldValue(_Fields field, Object value) {
17835
      switch (field) {
553 chandransh 17836
      case USER_ID:
48 ashish 17837
        if (value == null) {
553 chandransh 17838
          unsetUserId();
48 ashish 17839
        } else {
553 chandransh 17840
          setUserId((Long)value);
48 ashish 17841
        }
17842
        break;
17843
 
17844
      }
17845
    }
17846
 
17847
    public void setFieldValue(int fieldID, Object value) {
17848
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17849
    }
17850
 
17851
    public Object getFieldValue(_Fields field) {
17852
      switch (field) {
553 chandransh 17853
      case USER_ID:
17854
        return new Long(getUserId());
48 ashish 17855
 
17856
      }
17857
      throw new IllegalStateException();
17858
    }
17859
 
17860
    public Object getFieldValue(int fieldId) {
17861
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17862
    }
17863
 
17864
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17865
    public boolean isSet(_Fields field) {
17866
      switch (field) {
553 chandransh 17867
      case USER_ID:
17868
        return isSetUserId();
48 ashish 17869
      }
17870
      throw new IllegalStateException();
17871
    }
17872
 
17873
    public boolean isSet(int fieldID) {
17874
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17875
    }
17876
 
17877
    @Override
17878
    public boolean equals(Object that) {
17879
      if (that == null)
17880
        return false;
553 chandransh 17881
      if (that instanceof createCart_args)
17882
        return this.equals((createCart_args)that);
48 ashish 17883
      return false;
17884
    }
17885
 
553 chandransh 17886
    public boolean equals(createCart_args that) {
48 ashish 17887
      if (that == null)
17888
        return false;
17889
 
553 chandransh 17890
      boolean this_present_userId = true;
17891
      boolean that_present_userId = true;
17892
      if (this_present_userId || that_present_userId) {
17893
        if (!(this_present_userId && that_present_userId))
48 ashish 17894
          return false;
553 chandransh 17895
        if (this.userId != that.userId)
48 ashish 17896
          return false;
17897
      }
17898
 
17899
      return true;
17900
    }
17901
 
17902
    @Override
17903
    public int hashCode() {
17904
      return 0;
17905
    }
17906
 
553 chandransh 17907
    public int compareTo(createCart_args other) {
48 ashish 17908
      if (!getClass().equals(other.getClass())) {
17909
        return getClass().getName().compareTo(other.getClass().getName());
17910
      }
17911
 
17912
      int lastComparison = 0;
553 chandransh 17913
      createCart_args typedOther = (createCart_args)other;
48 ashish 17914
 
553 chandransh 17915
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 17916
      if (lastComparison != 0) {
17917
        return lastComparison;
17918
      }
553 chandransh 17919
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 17920
      if (lastComparison != 0) {
17921
        return lastComparison;
17922
      }
17923
      return 0;
17924
    }
17925
 
17926
    public void read(TProtocol iprot) throws TException {
17927
      TField field;
17928
      iprot.readStructBegin();
17929
      while (true)
17930
      {
17931
        field = iprot.readFieldBegin();
17932
        if (field.type == TType.STOP) { 
17933
          break;
17934
        }
17935
        _Fields fieldId = _Fields.findByThriftId(field.id);
17936
        if (fieldId == null) {
17937
          TProtocolUtil.skip(iprot, field.type);
17938
        } else {
17939
          switch (fieldId) {
553 chandransh 17940
            case USER_ID:
48 ashish 17941
              if (field.type == TType.I64) {
553 chandransh 17942
                this.userId = iprot.readI64();
17943
                setUserIdIsSet(true);
48 ashish 17944
              } else { 
17945
                TProtocolUtil.skip(iprot, field.type);
17946
              }
17947
              break;
17948
          }
17949
          iprot.readFieldEnd();
17950
        }
17951
      }
17952
      iprot.readStructEnd();
17953
      validate();
17954
    }
17955
 
17956
    public void write(TProtocol oprot) throws TException {
17957
      validate();
17958
 
17959
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17960
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17961
      oprot.writeI64(this.userId);
48 ashish 17962
      oprot.writeFieldEnd();
17963
      oprot.writeFieldStop();
17964
      oprot.writeStructEnd();
17965
    }
17966
 
17967
    @Override
17968
    public String toString() {
553 chandransh 17969
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 17970
      boolean first = true;
17971
 
553 chandransh 17972
      sb.append("userId:");
17973
      sb.append(this.userId);
48 ashish 17974
      first = false;
17975
      sb.append(")");
17976
      return sb.toString();
17977
    }
17978
 
17979
    public void validate() throws TException {
17980
      // check for required fields
17981
    }
17982
 
17983
  }
17984
 
553 chandransh 17985
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
17986
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 17987
 
553 chandransh 17988
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
17989
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17990
 
553 chandransh 17991
    private long success;
17992
    private ShoppingCartException scx;
48 ashish 17993
 
17994
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17995
    public enum _Fields implements TFieldIdEnum {
17996
      SUCCESS((short)0, "success"),
553 chandransh 17997
      SCX((short)1, "scx");
48 ashish 17998
 
17999
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18000
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18001
 
18002
      static {
18003
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18004
          byId.put((int)field._thriftId, field);
18005
          byName.put(field.getFieldName(), field);
18006
        }
18007
      }
18008
 
18009
      /**
18010
       * Find the _Fields constant that matches fieldId, or null if its not found.
18011
       */
18012
      public static _Fields findByThriftId(int fieldId) {
18013
        return byId.get(fieldId);
18014
      }
18015
 
18016
      /**
18017
       * Find the _Fields constant that matches fieldId, throwing an exception
18018
       * if it is not found.
18019
       */
18020
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18021
        _Fields fields = findByThriftId(fieldId);
18022
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18023
        return fields;
18024
      }
18025
 
18026
      /**
18027
       * Find the _Fields constant that matches name, or null if its not found.
18028
       */
18029
      public static _Fields findByName(String name) {
18030
        return byName.get(name);
18031
      }
18032
 
18033
      private final short _thriftId;
18034
      private final String _fieldName;
18035
 
18036
      _Fields(short thriftId, String fieldName) {
18037
        _thriftId = thriftId;
18038
        _fieldName = fieldName;
18039
      }
18040
 
18041
      public short getThriftFieldId() {
18042
        return _thriftId;
18043
      }
18044
 
18045
      public String getFieldName() {
18046
        return _fieldName;
18047
      }
18048
    }
18049
 
18050
    // isset id assignments
18051
    private static final int __SUCCESS_ISSET_ID = 0;
18052
    private BitSet __isset_bit_vector = new BitSet(1);
18053
 
18054
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18055
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 18056
          new FieldValueMetaData(TType.I64)));
18057
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 18058
          new FieldValueMetaData(TType.STRUCT)));
18059
    }});
18060
 
18061
    static {
553 chandransh 18062
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 18063
    }
18064
 
553 chandransh 18065
    public createCart_result() {
48 ashish 18066
    }
18067
 
553 chandransh 18068
    public createCart_result(
18069
      long success,
18070
      ShoppingCartException scx)
48 ashish 18071
    {
18072
      this();
18073
      this.success = success;
18074
      setSuccessIsSet(true);
553 chandransh 18075
      this.scx = scx;
48 ashish 18076
    }
18077
 
18078
    /**
18079
     * Performs a deep copy on <i>other</i>.
18080
     */
553 chandransh 18081
    public createCart_result(createCart_result other) {
48 ashish 18082
      __isset_bit_vector.clear();
18083
      __isset_bit_vector.or(other.__isset_bit_vector);
18084
      this.success = other.success;
553 chandransh 18085
      if (other.isSetScx()) {
18086
        this.scx = new ShoppingCartException(other.scx);
48 ashish 18087
      }
18088
    }
18089
 
553 chandransh 18090
    public createCart_result deepCopy() {
18091
      return new createCart_result(this);
48 ashish 18092
    }
18093
 
18094
    @Deprecated
553 chandransh 18095
    public createCart_result clone() {
18096
      return new createCart_result(this);
48 ashish 18097
    }
18098
 
553 chandransh 18099
    public long getSuccess() {
48 ashish 18100
      return this.success;
18101
    }
18102
 
553 chandransh 18103
    public createCart_result setSuccess(long success) {
48 ashish 18104
      this.success = success;
18105
      setSuccessIsSet(true);
18106
      return this;
18107
    }
18108
 
18109
    public void unsetSuccess() {
18110
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
18111
    }
18112
 
18113
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18114
    public boolean isSetSuccess() {
18115
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
18116
    }
18117
 
18118
    public void setSuccessIsSet(boolean value) {
18119
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
18120
    }
18121
 
553 chandransh 18122
    public ShoppingCartException getScx() {
18123
      return this.scx;
48 ashish 18124
    }
18125
 
553 chandransh 18126
    public createCart_result setScx(ShoppingCartException scx) {
18127
      this.scx = scx;
48 ashish 18128
      return this;
18129
    }
18130
 
553 chandransh 18131
    public void unsetScx() {
18132
      this.scx = null;
48 ashish 18133
    }
18134
 
553 chandransh 18135
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18136
    public boolean isSetScx() {
18137
      return this.scx != null;
48 ashish 18138
    }
18139
 
553 chandransh 18140
    public void setScxIsSet(boolean value) {
48 ashish 18141
      if (!value) {
553 chandransh 18142
        this.scx = null;
48 ashish 18143
      }
18144
    }
18145
 
18146
    public void setFieldValue(_Fields field, Object value) {
18147
      switch (field) {
18148
      case SUCCESS:
18149
        if (value == null) {
18150
          unsetSuccess();
18151
        } else {
553 chandransh 18152
          setSuccess((Long)value);
48 ashish 18153
        }
18154
        break;
18155
 
553 chandransh 18156
      case SCX:
48 ashish 18157
        if (value == null) {
553 chandransh 18158
          unsetScx();
48 ashish 18159
        } else {
553 chandransh 18160
          setScx((ShoppingCartException)value);
48 ashish 18161
        }
18162
        break;
18163
 
18164
      }
18165
    }
18166
 
18167
    public void setFieldValue(int fieldID, Object value) {
18168
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18169
    }
18170
 
18171
    public Object getFieldValue(_Fields field) {
18172
      switch (field) {
18173
      case SUCCESS:
553 chandransh 18174
        return new Long(getSuccess());
48 ashish 18175
 
553 chandransh 18176
      case SCX:
18177
        return getScx();
48 ashish 18178
 
18179
      }
18180
      throw new IllegalStateException();
18181
    }
18182
 
18183
    public Object getFieldValue(int fieldId) {
18184
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18185
    }
18186
 
18187
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18188
    public boolean isSet(_Fields field) {
18189
      switch (field) {
18190
      case SUCCESS:
18191
        return isSetSuccess();
553 chandransh 18192
      case SCX:
18193
        return isSetScx();
48 ashish 18194
      }
18195
      throw new IllegalStateException();
18196
    }
18197
 
18198
    public boolean isSet(int fieldID) {
18199
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18200
    }
18201
 
18202
    @Override
18203
    public boolean equals(Object that) {
18204
      if (that == null)
18205
        return false;
553 chandransh 18206
      if (that instanceof createCart_result)
18207
        return this.equals((createCart_result)that);
48 ashish 18208
      return false;
18209
    }
18210
 
553 chandransh 18211
    public boolean equals(createCart_result that) {
48 ashish 18212
      if (that == null)
18213
        return false;
18214
 
18215
      boolean this_present_success = true;
18216
      boolean that_present_success = true;
18217
      if (this_present_success || that_present_success) {
18218
        if (!(this_present_success && that_present_success))
18219
          return false;
18220
        if (this.success != that.success)
18221
          return false;
18222
      }
18223
 
553 chandransh 18224
      boolean this_present_scx = true && this.isSetScx();
18225
      boolean that_present_scx = true && that.isSetScx();
18226
      if (this_present_scx || that_present_scx) {
18227
        if (!(this_present_scx && that_present_scx))
48 ashish 18228
          return false;
553 chandransh 18229
        if (!this.scx.equals(that.scx))
48 ashish 18230
          return false;
18231
      }
18232
 
18233
      return true;
18234
    }
18235
 
18236
    @Override
18237
    public int hashCode() {
18238
      return 0;
18239
    }
18240
 
553 chandransh 18241
    public int compareTo(createCart_result other) {
48 ashish 18242
      if (!getClass().equals(other.getClass())) {
18243
        return getClass().getName().compareTo(other.getClass().getName());
18244
      }
18245
 
18246
      int lastComparison = 0;
553 chandransh 18247
      createCart_result typedOther = (createCart_result)other;
48 ashish 18248
 
18249
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18250
      if (lastComparison != 0) {
18251
        return lastComparison;
18252
      }
18253
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18254
      if (lastComparison != 0) {
18255
        return lastComparison;
18256
      }
553 chandransh 18257
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 18258
      if (lastComparison != 0) {
18259
        return lastComparison;
18260
      }
553 chandransh 18261
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 18262
      if (lastComparison != 0) {
18263
        return lastComparison;
18264
      }
18265
      return 0;
18266
    }
18267
 
18268
    public void read(TProtocol iprot) throws TException {
18269
      TField field;
18270
      iprot.readStructBegin();
18271
      while (true)
18272
      {
18273
        field = iprot.readFieldBegin();
18274
        if (field.type == TType.STOP) { 
18275
          break;
18276
        }
18277
        _Fields fieldId = _Fields.findByThriftId(field.id);
18278
        if (fieldId == null) {
18279
          TProtocolUtil.skip(iprot, field.type);
18280
        } else {
18281
          switch (fieldId) {
18282
            case SUCCESS:
553 chandransh 18283
              if (field.type == TType.I64) {
18284
                this.success = iprot.readI64();
48 ashish 18285
                setSuccessIsSet(true);
18286
              } else { 
18287
                TProtocolUtil.skip(iprot, field.type);
18288
              }
18289
              break;
553 chandransh 18290
            case SCX:
48 ashish 18291
              if (field.type == TType.STRUCT) {
553 chandransh 18292
                this.scx = new ShoppingCartException();
18293
                this.scx.read(iprot);
48 ashish 18294
              } else { 
18295
                TProtocolUtil.skip(iprot, field.type);
18296
              }
18297
              break;
18298
          }
18299
          iprot.readFieldEnd();
18300
        }
18301
      }
18302
      iprot.readStructEnd();
18303
      validate();
18304
    }
18305
 
18306
    public void write(TProtocol oprot) throws TException {
18307
      oprot.writeStructBegin(STRUCT_DESC);
18308
 
18309
      if (this.isSetSuccess()) {
18310
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 18311
        oprot.writeI64(this.success);
48 ashish 18312
        oprot.writeFieldEnd();
553 chandransh 18313
      } else if (this.isSetScx()) {
18314
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18315
        this.scx.write(oprot);
48 ashish 18316
        oprot.writeFieldEnd();
18317
      }
18318
      oprot.writeFieldStop();
18319
      oprot.writeStructEnd();
18320
    }
18321
 
18322
    @Override
18323
    public String toString() {
553 chandransh 18324
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 18325
      boolean first = true;
18326
 
18327
      sb.append("success:");
18328
      sb.append(this.success);
18329
      first = false;
18330
      if (!first) sb.append(", ");
553 chandransh 18331
      sb.append("scx:");
18332
      if (this.scx == null) {
48 ashish 18333
        sb.append("null");
18334
      } else {
553 chandransh 18335
        sb.append(this.scx);
48 ashish 18336
      }
18337
      first = false;
18338
      sb.append(")");
18339
      return sb.toString();
18340
    }
18341
 
18342
    public void validate() throws TException {
18343
      // check for required fields
18344
    }
18345
 
18346
  }
18347
 
553 chandransh 18348
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
18349
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 18350
 
553 chandransh 18351
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 18352
 
553 chandransh 18353
    private long userId;
506 rajveer 18354
 
18355
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18356
    public enum _Fields implements TFieldIdEnum {
553 chandransh 18357
      USER_ID((short)1, "userId");
506 rajveer 18358
 
18359
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18360
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18361
 
18362
      static {
18363
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18364
          byId.put((int)field._thriftId, field);
18365
          byName.put(field.getFieldName(), field);
18366
        }
18367
      }
18368
 
18369
      /**
18370
       * Find the _Fields constant that matches fieldId, or null if its not found.
18371
       */
18372
      public static _Fields findByThriftId(int fieldId) {
18373
        return byId.get(fieldId);
18374
      }
18375
 
18376
      /**
18377
       * Find the _Fields constant that matches fieldId, throwing an exception
18378
       * if it is not found.
18379
       */
18380
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18381
        _Fields fields = findByThriftId(fieldId);
18382
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18383
        return fields;
18384
      }
18385
 
18386
      /**
18387
       * Find the _Fields constant that matches name, or null if its not found.
18388
       */
18389
      public static _Fields findByName(String name) {
18390
        return byName.get(name);
18391
      }
18392
 
18393
      private final short _thriftId;
18394
      private final String _fieldName;
18395
 
18396
      _Fields(short thriftId, String fieldName) {
18397
        _thriftId = thriftId;
18398
        _fieldName = fieldName;
18399
      }
18400
 
18401
      public short getThriftFieldId() {
18402
        return _thriftId;
18403
      }
18404
 
18405
      public String getFieldName() {
18406
        return _fieldName;
18407
      }
18408
    }
18409
 
18410
    // isset id assignments
18411
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 18412
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 18413
 
18414
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18415
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 18416
          new FieldValueMetaData(TType.I64)));
18417
    }});
18418
 
18419
    static {
553 chandransh 18420
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 18421
    }
18422
 
553 chandransh 18423
    public getCurrentCart_args() {
506 rajveer 18424
    }
18425
 
553 chandransh 18426
    public getCurrentCart_args(
18427
      long userId)
506 rajveer 18428
    {
18429
      this();
553 chandransh 18430
      this.userId = userId;
18431
      setUserIdIsSet(true);
506 rajveer 18432
    }
18433
 
18434
    /**
18435
     * Performs a deep copy on <i>other</i>.
18436
     */
553 chandransh 18437
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 18438
      __isset_bit_vector.clear();
18439
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 18440
      this.userId = other.userId;
506 rajveer 18441
    }
18442
 
553 chandransh 18443
    public getCurrentCart_args deepCopy() {
18444
      return new getCurrentCart_args(this);
506 rajveer 18445
    }
18446
 
18447
    @Deprecated
553 chandransh 18448
    public getCurrentCart_args clone() {
18449
      return new getCurrentCart_args(this);
506 rajveer 18450
    }
18451
 
553 chandransh 18452
    public long getUserId() {
18453
      return this.userId;
506 rajveer 18454
    }
18455
 
553 chandransh 18456
    public getCurrentCart_args setUserId(long userId) {
18457
      this.userId = userId;
18458
      setUserIdIsSet(true);
506 rajveer 18459
      return this;
18460
    }
18461
 
553 chandransh 18462
    public void unsetUserId() {
506 rajveer 18463
      __isset_bit_vector.clear(__USERID_ISSET_ID);
18464
    }
18465
 
553 chandransh 18466
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
18467
    public boolean isSetUserId() {
506 rajveer 18468
      return __isset_bit_vector.get(__USERID_ISSET_ID);
18469
    }
18470
 
553 chandransh 18471
    public void setUserIdIsSet(boolean value) {
506 rajveer 18472
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
18473
    }
18474
 
553 chandransh 18475
    public void setFieldValue(_Fields field, Object value) {
18476
      switch (field) {
18477
      case USER_ID:
18478
        if (value == null) {
18479
          unsetUserId();
18480
        } else {
18481
          setUserId((Long)value);
18482
        }
18483
        break;
18484
 
18485
      }
506 rajveer 18486
    }
18487
 
553 chandransh 18488
    public void setFieldValue(int fieldID, Object value) {
18489
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18490
    }
18491
 
18492
    public Object getFieldValue(_Fields field) {
18493
      switch (field) {
18494
      case USER_ID:
18495
        return new Long(getUserId());
18496
 
18497
      }
18498
      throw new IllegalStateException();
18499
    }
18500
 
18501
    public Object getFieldValue(int fieldId) {
18502
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18503
    }
18504
 
18505
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18506
    public boolean isSet(_Fields field) {
18507
      switch (field) {
18508
      case USER_ID:
18509
        return isSetUserId();
18510
      }
18511
      throw new IllegalStateException();
18512
    }
18513
 
18514
    public boolean isSet(int fieldID) {
18515
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18516
    }
18517
 
18518
    @Override
18519
    public boolean equals(Object that) {
18520
      if (that == null)
18521
        return false;
18522
      if (that instanceof getCurrentCart_args)
18523
        return this.equals((getCurrentCart_args)that);
18524
      return false;
18525
    }
18526
 
18527
    public boolean equals(getCurrentCart_args that) {
18528
      if (that == null)
18529
        return false;
18530
 
18531
      boolean this_present_userId = true;
18532
      boolean that_present_userId = true;
18533
      if (this_present_userId || that_present_userId) {
18534
        if (!(this_present_userId && that_present_userId))
18535
          return false;
18536
        if (this.userId != that.userId)
18537
          return false;
18538
      }
18539
 
18540
      return true;
18541
    }
18542
 
18543
    @Override
18544
    public int hashCode() {
18545
      return 0;
18546
    }
18547
 
18548
    public int compareTo(getCurrentCart_args other) {
18549
      if (!getClass().equals(other.getClass())) {
18550
        return getClass().getName().compareTo(other.getClass().getName());
18551
      }
18552
 
18553
      int lastComparison = 0;
18554
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
18555
 
18556
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
18557
      if (lastComparison != 0) {
18558
        return lastComparison;
18559
      }
18560
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
18561
      if (lastComparison != 0) {
18562
        return lastComparison;
18563
      }
18564
      return 0;
18565
    }
18566
 
18567
    public void read(TProtocol iprot) throws TException {
18568
      TField field;
18569
      iprot.readStructBegin();
18570
      while (true)
18571
      {
18572
        field = iprot.readFieldBegin();
18573
        if (field.type == TType.STOP) { 
18574
          break;
18575
        }
18576
        _Fields fieldId = _Fields.findByThriftId(field.id);
18577
        if (fieldId == null) {
18578
          TProtocolUtil.skip(iprot, field.type);
18579
        } else {
18580
          switch (fieldId) {
18581
            case USER_ID:
18582
              if (field.type == TType.I64) {
18583
                this.userId = iprot.readI64();
18584
                setUserIdIsSet(true);
18585
              } else { 
18586
                TProtocolUtil.skip(iprot, field.type);
18587
              }
18588
              break;
18589
          }
18590
          iprot.readFieldEnd();
18591
        }
18592
      }
18593
      iprot.readStructEnd();
18594
      validate();
18595
    }
18596
 
18597
    public void write(TProtocol oprot) throws TException {
18598
      validate();
18599
 
18600
      oprot.writeStructBegin(STRUCT_DESC);
18601
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
18602
      oprot.writeI64(this.userId);
18603
      oprot.writeFieldEnd();
18604
      oprot.writeFieldStop();
18605
      oprot.writeStructEnd();
18606
    }
18607
 
18608
    @Override
18609
    public String toString() {
18610
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
18611
      boolean first = true;
18612
 
18613
      sb.append("userId:");
18614
      sb.append(this.userId);
18615
      first = false;
18616
      sb.append(")");
18617
      return sb.toString();
18618
    }
18619
 
18620
    public void validate() throws TException {
18621
      // check for required fields
18622
    }
18623
 
18624
  }
18625
 
18626
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
18627
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
18628
 
18629
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
18630
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
18631
 
18632
    private Cart success;
18633
    private ShoppingCartException scx;
18634
 
18635
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18636
    public enum _Fields implements TFieldIdEnum {
18637
      SUCCESS((short)0, "success"),
18638
      SCX((short)1, "scx");
18639
 
18640
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18641
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18642
 
18643
      static {
18644
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18645
          byId.put((int)field._thriftId, field);
18646
          byName.put(field.getFieldName(), field);
18647
        }
18648
      }
18649
 
18650
      /**
18651
       * Find the _Fields constant that matches fieldId, or null if its not found.
18652
       */
18653
      public static _Fields findByThriftId(int fieldId) {
18654
        return byId.get(fieldId);
18655
      }
18656
 
18657
      /**
18658
       * Find the _Fields constant that matches fieldId, throwing an exception
18659
       * if it is not found.
18660
       */
18661
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18662
        _Fields fields = findByThriftId(fieldId);
18663
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18664
        return fields;
18665
      }
18666
 
18667
      /**
18668
       * Find the _Fields constant that matches name, or null if its not found.
18669
       */
18670
      public static _Fields findByName(String name) {
18671
        return byName.get(name);
18672
      }
18673
 
18674
      private final short _thriftId;
18675
      private final String _fieldName;
18676
 
18677
      _Fields(short thriftId, String fieldName) {
18678
        _thriftId = thriftId;
18679
        _fieldName = fieldName;
18680
      }
18681
 
18682
      public short getThriftFieldId() {
18683
        return _thriftId;
18684
      }
18685
 
18686
      public String getFieldName() {
18687
        return _fieldName;
18688
      }
18689
    }
18690
 
18691
    // isset id assignments
18692
 
18693
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18694
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18695
          new StructMetaData(TType.STRUCT, Cart.class)));
18696
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
18697
          new FieldValueMetaData(TType.STRUCT)));
18698
    }});
18699
 
18700
    static {
18701
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
18702
    }
18703
 
18704
    public getCurrentCart_result() {
18705
    }
18706
 
18707
    public getCurrentCart_result(
18708
      Cart success,
18709
      ShoppingCartException scx)
18710
    {
18711
      this();
18712
      this.success = success;
18713
      this.scx = scx;
18714
    }
18715
 
18716
    /**
18717
     * Performs a deep copy on <i>other</i>.
18718
     */
18719
    public getCurrentCart_result(getCurrentCart_result other) {
18720
      if (other.isSetSuccess()) {
18721
        this.success = new Cart(other.success);
18722
      }
18723
      if (other.isSetScx()) {
18724
        this.scx = new ShoppingCartException(other.scx);
18725
      }
18726
    }
18727
 
18728
    public getCurrentCart_result deepCopy() {
18729
      return new getCurrentCart_result(this);
18730
    }
18731
 
18732
    @Deprecated
18733
    public getCurrentCart_result clone() {
18734
      return new getCurrentCart_result(this);
18735
    }
18736
 
18737
    public Cart getSuccess() {
18738
      return this.success;
18739
    }
18740
 
18741
    public getCurrentCart_result setSuccess(Cart success) {
18742
      this.success = success;
506 rajveer 18743
      return this;
18744
    }
18745
 
553 chandransh 18746
    public void unsetSuccess() {
18747
      this.success = null;
506 rajveer 18748
    }
18749
 
553 chandransh 18750
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18751
    public boolean isSetSuccess() {
18752
      return this.success != null;
506 rajveer 18753
    }
18754
 
553 chandransh 18755
    public void setSuccessIsSet(boolean value) {
18756
      if (!value) {
18757
        this.success = null;
18758
      }
506 rajveer 18759
    }
18760
 
553 chandransh 18761
    public ShoppingCartException getScx() {
18762
      return this.scx;
18763
    }
18764
 
18765
    public getCurrentCart_result setScx(ShoppingCartException scx) {
18766
      this.scx = scx;
18767
      return this;
18768
    }
18769
 
18770
    public void unsetScx() {
18771
      this.scx = null;
18772
    }
18773
 
18774
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18775
    public boolean isSetScx() {
18776
      return this.scx != null;
18777
    }
18778
 
18779
    public void setScxIsSet(boolean value) {
18780
      if (!value) {
18781
        this.scx = null;
18782
      }
18783
    }
18784
 
506 rajveer 18785
    public void setFieldValue(_Fields field, Object value) {
18786
      switch (field) {
553 chandransh 18787
      case SUCCESS:
506 rajveer 18788
        if (value == null) {
553 chandransh 18789
          unsetSuccess();
506 rajveer 18790
        } else {
553 chandransh 18791
          setSuccess((Cart)value);
506 rajveer 18792
        }
18793
        break;
18794
 
553 chandransh 18795
      case SCX:
506 rajveer 18796
        if (value == null) {
553 chandransh 18797
          unsetScx();
506 rajveer 18798
        } else {
553 chandransh 18799
          setScx((ShoppingCartException)value);
506 rajveer 18800
        }
18801
        break;
18802
 
18803
      }
18804
    }
18805
 
18806
    public void setFieldValue(int fieldID, Object value) {
18807
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18808
    }
18809
 
18810
    public Object getFieldValue(_Fields field) {
18811
      switch (field) {
553 chandransh 18812
      case SUCCESS:
18813
        return getSuccess();
506 rajveer 18814
 
553 chandransh 18815
      case SCX:
18816
        return getScx();
506 rajveer 18817
 
18818
      }
18819
      throw new IllegalStateException();
18820
    }
18821
 
18822
    public Object getFieldValue(int fieldId) {
18823
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18824
    }
18825
 
18826
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18827
    public boolean isSet(_Fields field) {
18828
      switch (field) {
553 chandransh 18829
      case SUCCESS:
18830
        return isSetSuccess();
18831
      case SCX:
18832
        return isSetScx();
506 rajveer 18833
      }
18834
      throw new IllegalStateException();
18835
    }
18836
 
18837
    public boolean isSet(int fieldID) {
18838
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18839
    }
18840
 
18841
    @Override
18842
    public boolean equals(Object that) {
18843
      if (that == null)
18844
        return false;
553 chandransh 18845
      if (that instanceof getCurrentCart_result)
18846
        return this.equals((getCurrentCart_result)that);
506 rajveer 18847
      return false;
18848
    }
18849
 
553 chandransh 18850
    public boolean equals(getCurrentCart_result that) {
506 rajveer 18851
      if (that == null)
18852
        return false;
18853
 
553 chandransh 18854
      boolean this_present_success = true && this.isSetSuccess();
18855
      boolean that_present_success = true && that.isSetSuccess();
18856
      if (this_present_success || that_present_success) {
18857
        if (!(this_present_success && that_present_success))
506 rajveer 18858
          return false;
553 chandransh 18859
        if (!this.success.equals(that.success))
506 rajveer 18860
          return false;
18861
      }
18862
 
553 chandransh 18863
      boolean this_present_scx = true && this.isSetScx();
18864
      boolean that_present_scx = true && that.isSetScx();
18865
      if (this_present_scx || that_present_scx) {
18866
        if (!(this_present_scx && that_present_scx))
506 rajveer 18867
          return false;
553 chandransh 18868
        if (!this.scx.equals(that.scx))
506 rajveer 18869
          return false;
18870
      }
18871
 
18872
      return true;
18873
    }
18874
 
18875
    @Override
18876
    public int hashCode() {
18877
      return 0;
18878
    }
18879
 
553 chandransh 18880
    public int compareTo(getCurrentCart_result other) {
506 rajveer 18881
      if (!getClass().equals(other.getClass())) {
18882
        return getClass().getName().compareTo(other.getClass().getName());
18883
      }
18884
 
18885
      int lastComparison = 0;
553 chandransh 18886
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 18887
 
553 chandransh 18888
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 18889
      if (lastComparison != 0) {
18890
        return lastComparison;
18891
      }
553 chandransh 18892
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 18893
      if (lastComparison != 0) {
18894
        return lastComparison;
18895
      }
553 chandransh 18896
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 18897
      if (lastComparison != 0) {
18898
        return lastComparison;
18899
      }
553 chandransh 18900
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 18901
      if (lastComparison != 0) {
18902
        return lastComparison;
18903
      }
18904
      return 0;
18905
    }
18906
 
18907
    public void read(TProtocol iprot) throws TException {
18908
      TField field;
18909
      iprot.readStructBegin();
18910
      while (true)
18911
      {
18912
        field = iprot.readFieldBegin();
18913
        if (field.type == TType.STOP) { 
18914
          break;
18915
        }
18916
        _Fields fieldId = _Fields.findByThriftId(field.id);
18917
        if (fieldId == null) {
18918
          TProtocolUtil.skip(iprot, field.type);
18919
        } else {
18920
          switch (fieldId) {
553 chandransh 18921
            case SUCCESS:
18922
              if (field.type == TType.STRUCT) {
18923
                this.success = new Cart();
18924
                this.success.read(iprot);
506 rajveer 18925
              } else { 
18926
                TProtocolUtil.skip(iprot, field.type);
18927
              }
18928
              break;
553 chandransh 18929
            case SCX:
18930
              if (field.type == TType.STRUCT) {
18931
                this.scx = new ShoppingCartException();
18932
                this.scx.read(iprot);
18933
              } else { 
18934
                TProtocolUtil.skip(iprot, field.type);
18935
              }
18936
              break;
18937
          }
18938
          iprot.readFieldEnd();
18939
        }
18940
      }
18941
      iprot.readStructEnd();
18942
      validate();
18943
    }
18944
 
18945
    public void write(TProtocol oprot) throws TException {
18946
      oprot.writeStructBegin(STRUCT_DESC);
18947
 
18948
      if (this.isSetSuccess()) {
18949
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18950
        this.success.write(oprot);
18951
        oprot.writeFieldEnd();
18952
      } else if (this.isSetScx()) {
18953
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18954
        this.scx.write(oprot);
18955
        oprot.writeFieldEnd();
18956
      }
18957
      oprot.writeFieldStop();
18958
      oprot.writeStructEnd();
18959
    }
18960
 
18961
    @Override
18962
    public String toString() {
18963
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
18964
      boolean first = true;
18965
 
18966
      sb.append("success:");
18967
      if (this.success == null) {
18968
        sb.append("null");
18969
      } else {
18970
        sb.append(this.success);
18971
      }
18972
      first = false;
18973
      if (!first) sb.append(", ");
18974
      sb.append("scx:");
18975
      if (this.scx == null) {
18976
        sb.append("null");
18977
      } else {
18978
        sb.append(this.scx);
18979
      }
18980
      first = false;
18981
      sb.append(")");
18982
      return sb.toString();
18983
    }
18984
 
18985
    public void validate() throws TException {
18986
      // check for required fields
18987
    }
18988
 
18989
  }
18990
 
18991
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
18992
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
18993
 
18994
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
18995
 
18996
    private long cartId;
18997
 
18998
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18999
    public enum _Fields implements TFieldIdEnum {
19000
      CART_ID((short)1, "cartId");
19001
 
19002
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19003
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19004
 
19005
      static {
19006
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19007
          byId.put((int)field._thriftId, field);
19008
          byName.put(field.getFieldName(), field);
19009
        }
19010
      }
19011
 
19012
      /**
19013
       * Find the _Fields constant that matches fieldId, or null if its not found.
19014
       */
19015
      public static _Fields findByThriftId(int fieldId) {
19016
        return byId.get(fieldId);
19017
      }
19018
 
19019
      /**
19020
       * Find the _Fields constant that matches fieldId, throwing an exception
19021
       * if it is not found.
19022
       */
19023
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19024
        _Fields fields = findByThriftId(fieldId);
19025
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19026
        return fields;
19027
      }
19028
 
19029
      /**
19030
       * Find the _Fields constant that matches name, or null if its not found.
19031
       */
19032
      public static _Fields findByName(String name) {
19033
        return byName.get(name);
19034
      }
19035
 
19036
      private final short _thriftId;
19037
      private final String _fieldName;
19038
 
19039
      _Fields(short thriftId, String fieldName) {
19040
        _thriftId = thriftId;
19041
        _fieldName = fieldName;
19042
      }
19043
 
19044
      public short getThriftFieldId() {
19045
        return _thriftId;
19046
      }
19047
 
19048
      public String getFieldName() {
19049
        return _fieldName;
19050
      }
19051
    }
19052
 
19053
    // isset id assignments
19054
    private static final int __CARTID_ISSET_ID = 0;
19055
    private BitSet __isset_bit_vector = new BitSet(1);
19056
 
19057
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19058
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
19059
          new FieldValueMetaData(TType.I64)));
19060
    }});
19061
 
19062
    static {
19063
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
19064
    }
19065
 
19066
    public getCart_args() {
19067
    }
19068
 
19069
    public getCart_args(
19070
      long cartId)
19071
    {
19072
      this();
19073
      this.cartId = cartId;
19074
      setCartIdIsSet(true);
19075
    }
19076
 
19077
    /**
19078
     * Performs a deep copy on <i>other</i>.
19079
     */
19080
    public getCart_args(getCart_args other) {
19081
      __isset_bit_vector.clear();
19082
      __isset_bit_vector.or(other.__isset_bit_vector);
19083
      this.cartId = other.cartId;
19084
    }
19085
 
19086
    public getCart_args deepCopy() {
19087
      return new getCart_args(this);
19088
    }
19089
 
19090
    @Deprecated
19091
    public getCart_args clone() {
19092
      return new getCart_args(this);
19093
    }
19094
 
19095
    public long getCartId() {
19096
      return this.cartId;
19097
    }
19098
 
19099
    public getCart_args setCartId(long cartId) {
19100
      this.cartId = cartId;
19101
      setCartIdIsSet(true);
19102
      return this;
19103
    }
19104
 
19105
    public void unsetCartId() {
19106
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
19107
    }
19108
 
19109
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
19110
    public boolean isSetCartId() {
19111
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
19112
    }
19113
 
19114
    public void setCartIdIsSet(boolean value) {
19115
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
19116
    }
19117
 
19118
    public void setFieldValue(_Fields field, Object value) {
19119
      switch (field) {
19120
      case CART_ID:
19121
        if (value == null) {
19122
          unsetCartId();
19123
        } else {
19124
          setCartId((Long)value);
19125
        }
19126
        break;
19127
 
19128
      }
19129
    }
19130
 
19131
    public void setFieldValue(int fieldID, Object value) {
19132
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19133
    }
19134
 
19135
    public Object getFieldValue(_Fields field) {
19136
      switch (field) {
19137
      case CART_ID:
19138
        return new Long(getCartId());
19139
 
19140
      }
19141
      throw new IllegalStateException();
19142
    }
19143
 
19144
    public Object getFieldValue(int fieldId) {
19145
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19146
    }
19147
 
19148
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19149
    public boolean isSet(_Fields field) {
19150
      switch (field) {
19151
      case CART_ID:
19152
        return isSetCartId();
19153
      }
19154
      throw new IllegalStateException();
19155
    }
19156
 
19157
    public boolean isSet(int fieldID) {
19158
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19159
    }
19160
 
19161
    @Override
19162
    public boolean equals(Object that) {
19163
      if (that == null)
19164
        return false;
19165
      if (that instanceof getCart_args)
19166
        return this.equals((getCart_args)that);
19167
      return false;
19168
    }
19169
 
19170
    public boolean equals(getCart_args that) {
19171
      if (that == null)
19172
        return false;
19173
 
19174
      boolean this_present_cartId = true;
19175
      boolean that_present_cartId = true;
19176
      if (this_present_cartId || that_present_cartId) {
19177
        if (!(this_present_cartId && that_present_cartId))
19178
          return false;
19179
        if (this.cartId != that.cartId)
19180
          return false;
19181
      }
19182
 
19183
      return true;
19184
    }
19185
 
19186
    @Override
19187
    public int hashCode() {
19188
      return 0;
19189
    }
19190
 
19191
    public int compareTo(getCart_args other) {
19192
      if (!getClass().equals(other.getClass())) {
19193
        return getClass().getName().compareTo(other.getClass().getName());
19194
      }
19195
 
19196
      int lastComparison = 0;
19197
      getCart_args typedOther = (getCart_args)other;
19198
 
19199
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
19200
      if (lastComparison != 0) {
19201
        return lastComparison;
19202
      }
19203
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
19204
      if (lastComparison != 0) {
19205
        return lastComparison;
19206
      }
19207
      return 0;
19208
    }
19209
 
19210
    public void read(TProtocol iprot) throws TException {
19211
      TField field;
19212
      iprot.readStructBegin();
19213
      while (true)
19214
      {
19215
        field = iprot.readFieldBegin();
19216
        if (field.type == TType.STOP) { 
19217
          break;
19218
        }
19219
        _Fields fieldId = _Fields.findByThriftId(field.id);
19220
        if (fieldId == null) {
19221
          TProtocolUtil.skip(iprot, field.type);
19222
        } else {
19223
          switch (fieldId) {
19224
            case CART_ID:
506 rajveer 19225
              if (field.type == TType.I64) {
553 chandransh 19226
                this.cartId = iprot.readI64();
19227
                setCartIdIsSet(true);
506 rajveer 19228
              } else { 
19229
                TProtocolUtil.skip(iprot, field.type);
19230
              }
19231
              break;
19232
          }
19233
          iprot.readFieldEnd();
19234
        }
19235
      }
19236
      iprot.readStructEnd();
19237
      validate();
19238
    }
19239
 
19240
    public void write(TProtocol oprot) throws TException {
19241
      validate();
19242
 
19243
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19244
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
19245
      oprot.writeI64(this.cartId);
506 rajveer 19246
      oprot.writeFieldEnd();
19247
      oprot.writeFieldStop();
19248
      oprot.writeStructEnd();
19249
    }
19250
 
19251
    @Override
19252
    public String toString() {
553 chandransh 19253
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 19254
      boolean first = true;
19255
 
553 chandransh 19256
      sb.append("cartId:");
19257
      sb.append(this.cartId);
506 rajveer 19258
      first = false;
19259
      sb.append(")");
19260
      return sb.toString();
19261
    }
19262
 
19263
    public void validate() throws TException {
19264
      // check for required fields
19265
    }
19266
 
19267
  }
19268
 
553 chandransh 19269
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
19270
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 19271
 
553 chandransh 19272
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
19273
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 19274
 
553 chandransh 19275
    private Cart success;
19276
    private ShoppingCartException scx;
506 rajveer 19277
 
19278
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19279
    public enum _Fields implements TFieldIdEnum {
19280
      SUCCESS((short)0, "success"),
553 chandransh 19281
      SCX((short)1, "scx");
506 rajveer 19282
 
19283
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19284
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19285
 
19286
      static {
19287
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19288
          byId.put((int)field._thriftId, field);
19289
          byName.put(field.getFieldName(), field);
19290
        }
19291
      }
19292
 
19293
      /**
19294
       * Find the _Fields constant that matches fieldId, or null if its not found.
19295
       */
19296
      public static _Fields findByThriftId(int fieldId) {
19297
        return byId.get(fieldId);
19298
      }
19299
 
19300
      /**
19301
       * Find the _Fields constant that matches fieldId, throwing an exception
19302
       * if it is not found.
19303
       */
19304
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19305
        _Fields fields = findByThriftId(fieldId);
19306
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19307
        return fields;
19308
      }
19309
 
19310
      /**
19311
       * Find the _Fields constant that matches name, or null if its not found.
19312
       */
19313
      public static _Fields findByName(String name) {
19314
        return byName.get(name);
19315
      }
19316
 
19317
      private final short _thriftId;
19318
      private final String _fieldName;
19319
 
19320
      _Fields(short thriftId, String fieldName) {
19321
        _thriftId = thriftId;
19322
        _fieldName = fieldName;
19323
      }
19324
 
19325
      public short getThriftFieldId() {
19326
        return _thriftId;
19327
      }
19328
 
19329
      public String getFieldName() {
19330
        return _fieldName;
19331
      }
19332
    }
19333
 
19334
    // isset id assignments
19335
 
19336
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19337
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 19338
          new StructMetaData(TType.STRUCT, Cart.class)));
19339
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 19340
          new FieldValueMetaData(TType.STRUCT)));
19341
    }});
19342
 
19343
    static {
553 chandransh 19344
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 19345
    }
19346
 
553 chandransh 19347
    public getCart_result() {
506 rajveer 19348
    }
19349
 
553 chandransh 19350
    public getCart_result(
19351
      Cart success,
19352
      ShoppingCartException scx)
506 rajveer 19353
    {
19354
      this();
19355
      this.success = success;
553 chandransh 19356
      this.scx = scx;
506 rajveer 19357
    }
19358
 
19359
    /**
19360
     * Performs a deep copy on <i>other</i>.
19361
     */
553 chandransh 19362
    public getCart_result(getCart_result other) {
19363
      if (other.isSetSuccess()) {
19364
        this.success = new Cart(other.success);
506 rajveer 19365
      }
553 chandransh 19366
      if (other.isSetScx()) {
19367
        this.scx = new ShoppingCartException(other.scx);
19368
      }
506 rajveer 19369
    }
19370
 
553 chandransh 19371
    public getCart_result deepCopy() {
19372
      return new getCart_result(this);
506 rajveer 19373
    }
19374
 
19375
    @Deprecated
553 chandransh 19376
    public getCart_result clone() {
19377
      return new getCart_result(this);
506 rajveer 19378
    }
19379
 
553 chandransh 19380
    public Cart getSuccess() {
506 rajveer 19381
      return this.success;
19382
    }
19383
 
553 chandransh 19384
    public getCart_result setSuccess(Cart success) {
506 rajveer 19385
      this.success = success;
19386
      return this;
19387
    }
19388
 
19389
    public void unsetSuccess() {
553 chandransh 19390
      this.success = null;
506 rajveer 19391
    }
19392
 
19393
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19394
    public boolean isSetSuccess() {
553 chandransh 19395
      return this.success != null;
506 rajveer 19396
    }
19397
 
19398
    public void setSuccessIsSet(boolean value) {
553 chandransh 19399
      if (!value) {
19400
        this.success = null;
19401
      }
506 rajveer 19402
    }
19403
 
553 chandransh 19404
    public ShoppingCartException getScx() {
19405
      return this.scx;
506 rajveer 19406
    }
19407
 
553 chandransh 19408
    public getCart_result setScx(ShoppingCartException scx) {
19409
      this.scx = scx;
506 rajveer 19410
      return this;
19411
    }
19412
 
553 chandransh 19413
    public void unsetScx() {
19414
      this.scx = null;
506 rajveer 19415
    }
19416
 
553 chandransh 19417
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19418
    public boolean isSetScx() {
19419
      return this.scx != null;
506 rajveer 19420
    }
19421
 
553 chandransh 19422
    public void setScxIsSet(boolean value) {
506 rajveer 19423
      if (!value) {
553 chandransh 19424
        this.scx = null;
506 rajveer 19425
      }
19426
    }
19427
 
19428
    public void setFieldValue(_Fields field, Object value) {
19429
      switch (field) {
19430
      case SUCCESS:
19431
        if (value == null) {
19432
          unsetSuccess();
19433
        } else {
553 chandransh 19434
          setSuccess((Cart)value);
506 rajveer 19435
        }
19436
        break;
19437
 
553 chandransh 19438
      case SCX:
506 rajveer 19439
        if (value == null) {
553 chandransh 19440
          unsetScx();
506 rajveer 19441
        } else {
553 chandransh 19442
          setScx((ShoppingCartException)value);
506 rajveer 19443
        }
19444
        break;
19445
 
19446
      }
19447
    }
19448
 
19449
    public void setFieldValue(int fieldID, Object value) {
19450
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19451
    }
19452
 
19453
    public Object getFieldValue(_Fields field) {
19454
      switch (field) {
19455
      case SUCCESS:
553 chandransh 19456
        return getSuccess();
506 rajveer 19457
 
553 chandransh 19458
      case SCX:
19459
        return getScx();
506 rajveer 19460
 
19461
      }
19462
      throw new IllegalStateException();
19463
    }
19464
 
19465
    public Object getFieldValue(int fieldId) {
19466
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19467
    }
19468
 
19469
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19470
    public boolean isSet(_Fields field) {
19471
      switch (field) {
19472
      case SUCCESS:
19473
        return isSetSuccess();
553 chandransh 19474
      case SCX:
19475
        return isSetScx();
506 rajveer 19476
      }
19477
      throw new IllegalStateException();
19478
    }
19479
 
19480
    public boolean isSet(int fieldID) {
19481
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19482
    }
19483
 
19484
    @Override
19485
    public boolean equals(Object that) {
19486
      if (that == null)
19487
        return false;
553 chandransh 19488
      if (that instanceof getCart_result)
19489
        return this.equals((getCart_result)that);
506 rajveer 19490
      return false;
19491
    }
19492
 
553 chandransh 19493
    public boolean equals(getCart_result that) {
506 rajveer 19494
      if (that == null)
19495
        return false;
19496
 
553 chandransh 19497
      boolean this_present_success = true && this.isSetSuccess();
19498
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 19499
      if (this_present_success || that_present_success) {
19500
        if (!(this_present_success && that_present_success))
19501
          return false;
553 chandransh 19502
        if (!this.success.equals(that.success))
506 rajveer 19503
          return false;
19504
      }
19505
 
553 chandransh 19506
      boolean this_present_scx = true && this.isSetScx();
19507
      boolean that_present_scx = true && that.isSetScx();
19508
      if (this_present_scx || that_present_scx) {
19509
        if (!(this_present_scx && that_present_scx))
506 rajveer 19510
          return false;
553 chandransh 19511
        if (!this.scx.equals(that.scx))
506 rajveer 19512
          return false;
19513
      }
19514
 
19515
      return true;
19516
    }
19517
 
19518
    @Override
19519
    public int hashCode() {
19520
      return 0;
19521
    }
19522
 
553 chandransh 19523
    public int compareTo(getCart_result other) {
506 rajveer 19524
      if (!getClass().equals(other.getClass())) {
19525
        return getClass().getName().compareTo(other.getClass().getName());
19526
      }
19527
 
19528
      int lastComparison = 0;
553 chandransh 19529
      getCart_result typedOther = (getCart_result)other;
506 rajveer 19530
 
19531
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19532
      if (lastComparison != 0) {
19533
        return lastComparison;
19534
      }
19535
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19536
      if (lastComparison != 0) {
19537
        return lastComparison;
19538
      }
553 chandransh 19539
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 19540
      if (lastComparison != 0) {
19541
        return lastComparison;
19542
      }
553 chandransh 19543
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 19544
      if (lastComparison != 0) {
19545
        return lastComparison;
19546
      }
19547
      return 0;
19548
    }
19549
 
19550
    public void read(TProtocol iprot) throws TException {
19551
      TField field;
19552
      iprot.readStructBegin();
19553
      while (true)
19554
      {
19555
        field = iprot.readFieldBegin();
19556
        if (field.type == TType.STOP) { 
19557
          break;
19558
        }
19559
        _Fields fieldId = _Fields.findByThriftId(field.id);
19560
        if (fieldId == null) {
19561
          TProtocolUtil.skip(iprot, field.type);
19562
        } else {
19563
          switch (fieldId) {
19564
            case SUCCESS:
553 chandransh 19565
              if (field.type == TType.STRUCT) {
19566
                this.success = new Cart();
19567
                this.success.read(iprot);
506 rajveer 19568
              } else { 
19569
                TProtocolUtil.skip(iprot, field.type);
19570
              }
19571
              break;
553 chandransh 19572
            case SCX:
506 rajveer 19573
              if (field.type == TType.STRUCT) {
553 chandransh 19574
                this.scx = new ShoppingCartException();
19575
                this.scx.read(iprot);
506 rajveer 19576
              } else { 
19577
                TProtocolUtil.skip(iprot, field.type);
19578
              }
19579
              break;
19580
          }
19581
          iprot.readFieldEnd();
19582
        }
19583
      }
19584
      iprot.readStructEnd();
19585
      validate();
19586
    }
19587
 
19588
    public void write(TProtocol oprot) throws TException {
19589
      oprot.writeStructBegin(STRUCT_DESC);
19590
 
19591
      if (this.isSetSuccess()) {
19592
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 19593
        this.success.write(oprot);
506 rajveer 19594
        oprot.writeFieldEnd();
553 chandransh 19595
      } else if (this.isSetScx()) {
19596
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19597
        this.scx.write(oprot);
506 rajveer 19598
        oprot.writeFieldEnd();
19599
      }
19600
      oprot.writeFieldStop();
19601
      oprot.writeStructEnd();
19602
    }
19603
 
19604
    @Override
19605
    public String toString() {
553 chandransh 19606
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 19607
      boolean first = true;
19608
 
19609
      sb.append("success:");
553 chandransh 19610
      if (this.success == null) {
19611
        sb.append("null");
19612
      } else {
19613
        sb.append(this.success);
19614
      }
506 rajveer 19615
      first = false;
19616
      if (!first) sb.append(", ");
553 chandransh 19617
      sb.append("scx:");
19618
      if (this.scx == null) {
506 rajveer 19619
        sb.append("null");
19620
      } else {
553 chandransh 19621
        sb.append(this.scx);
506 rajveer 19622
      }
19623
      first = false;
19624
      sb.append(")");
19625
      return sb.toString();
19626
    }
19627
 
19628
    public void validate() throws TException {
19629
      // check for required fields
19630
    }
19631
 
19632
  }
19633
 
553 chandransh 19634
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
19635
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 19636
 
553 chandransh 19637
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
19638
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 19639
 
553 chandransh 19640
    private long userId;
19641
    private CartStatus status;
48 ashish 19642
 
19643
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19644
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19645
      USER_ID((short)1, "userId"),
19646
      /**
19647
       * 
19648
       * @see CartStatus
19649
       */
19650
      STATUS((short)2, "status");
48 ashish 19651
 
19652
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19653
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19654
 
19655
      static {
19656
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19657
          byId.put((int)field._thriftId, field);
19658
          byName.put(field.getFieldName(), field);
19659
        }
19660
      }
19661
 
19662
      /**
19663
       * Find the _Fields constant that matches fieldId, or null if its not found.
19664
       */
19665
      public static _Fields findByThriftId(int fieldId) {
19666
        return byId.get(fieldId);
19667
      }
19668
 
19669
      /**
19670
       * Find the _Fields constant that matches fieldId, throwing an exception
19671
       * if it is not found.
19672
       */
19673
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19674
        _Fields fields = findByThriftId(fieldId);
19675
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19676
        return fields;
19677
      }
19678
 
19679
      /**
19680
       * Find the _Fields constant that matches name, or null if its not found.
19681
       */
19682
      public static _Fields findByName(String name) {
19683
        return byName.get(name);
19684
      }
19685
 
19686
      private final short _thriftId;
19687
      private final String _fieldName;
19688
 
19689
      _Fields(short thriftId, String fieldName) {
19690
        _thriftId = thriftId;
19691
        _fieldName = fieldName;
19692
      }
19693
 
19694
      public short getThriftFieldId() {
19695
        return _thriftId;
19696
      }
19697
 
19698
      public String getFieldName() {
19699
        return _fieldName;
19700
      }
19701
    }
19702
 
19703
    // isset id assignments
19704
    private static final int __USERID_ISSET_ID = 0;
19705
    private BitSet __isset_bit_vector = new BitSet(1);
19706
 
19707
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 19708
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 19709
          new FieldValueMetaData(TType.I64)));
553 chandransh 19710
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19711
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 19712
    }});
19713
 
19714
    static {
553 chandransh 19715
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 19716
    }
19717
 
553 chandransh 19718
    public getCartsForUser_args() {
48 ashish 19719
    }
19720
 
553 chandransh 19721
    public getCartsForUser_args(
19722
      long userId,
19723
      CartStatus status)
48 ashish 19724
    {
19725
      this();
553 chandransh 19726
      this.userId = userId;
19727
      setUserIdIsSet(true);
19728
      this.status = status;
48 ashish 19729
    }
19730
 
19731
    /**
19732
     * Performs a deep copy on <i>other</i>.
19733
     */
553 chandransh 19734
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 19735
      __isset_bit_vector.clear();
19736
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19737
      this.userId = other.userId;
19738
      if (other.isSetStatus()) {
19739
        this.status = other.status;
48 ashish 19740
      }
19741
    }
19742
 
553 chandransh 19743
    public getCartsForUser_args deepCopy() {
19744
      return new getCartsForUser_args(this);
48 ashish 19745
    }
19746
 
19747
    @Deprecated
553 chandransh 19748
    public getCartsForUser_args clone() {
19749
      return new getCartsForUser_args(this);
48 ashish 19750
    }
19751
 
553 chandransh 19752
    public long getUserId() {
19753
      return this.userId;
48 ashish 19754
    }
19755
 
553 chandransh 19756
    public getCartsForUser_args setUserId(long userId) {
19757
      this.userId = userId;
19758
      setUserIdIsSet(true);
48 ashish 19759
      return this;
19760
    }
19761
 
553 chandransh 19762
    public void unsetUserId() {
48 ashish 19763
      __isset_bit_vector.clear(__USERID_ISSET_ID);
19764
    }
19765
 
553 chandransh 19766
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
19767
    public boolean isSetUserId() {
48 ashish 19768
      return __isset_bit_vector.get(__USERID_ISSET_ID);
19769
    }
19770
 
553 chandransh 19771
    public void setUserIdIsSet(boolean value) {
48 ashish 19772
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
19773
    }
19774
 
553 chandransh 19775
    /**
19776
     * 
19777
     * @see CartStatus
19778
     */
19779
    public CartStatus getStatus() {
19780
      return this.status;
48 ashish 19781
    }
19782
 
553 chandransh 19783
    /**
19784
     * 
19785
     * @see CartStatus
19786
     */
19787
    public getCartsForUser_args setStatus(CartStatus status) {
19788
      this.status = status;
48 ashish 19789
      return this;
19790
    }
19791
 
553 chandransh 19792
    public void unsetStatus() {
19793
      this.status = null;
48 ashish 19794
    }
19795
 
553 chandransh 19796
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19797
    public boolean isSetStatus() {
19798
      return this.status != null;
48 ashish 19799
    }
19800
 
553 chandransh 19801
    public void setStatusIsSet(boolean value) {
48 ashish 19802
      if (!value) {
553 chandransh 19803
        this.status = null;
48 ashish 19804
      }
19805
    }
19806
 
19807
    public void setFieldValue(_Fields field, Object value) {
19808
      switch (field) {
553 chandransh 19809
      case USER_ID:
48 ashish 19810
        if (value == null) {
553 chandransh 19811
          unsetUserId();
48 ashish 19812
        } else {
553 chandransh 19813
          setUserId((Long)value);
48 ashish 19814
        }
19815
        break;
19816
 
553 chandransh 19817
      case STATUS:
48 ashish 19818
        if (value == null) {
553 chandransh 19819
          unsetStatus();
48 ashish 19820
        } else {
553 chandransh 19821
          setStatus((CartStatus)value);
48 ashish 19822
        }
19823
        break;
19824
 
19825
      }
19826
    }
19827
 
19828
    public void setFieldValue(int fieldID, Object value) {
19829
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19830
    }
19831
 
19832
    public Object getFieldValue(_Fields field) {
19833
      switch (field) {
553 chandransh 19834
      case USER_ID:
19835
        return new Long(getUserId());
48 ashish 19836
 
553 chandransh 19837
      case STATUS:
19838
        return getStatus();
48 ashish 19839
 
19840
      }
19841
      throw new IllegalStateException();
19842
    }
19843
 
19844
    public Object getFieldValue(int fieldId) {
19845
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19846
    }
19847
 
19848
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19849
    public boolean isSet(_Fields field) {
19850
      switch (field) {
553 chandransh 19851
      case USER_ID:
19852
        return isSetUserId();
19853
      case STATUS:
19854
        return isSetStatus();
48 ashish 19855
      }
19856
      throw new IllegalStateException();
19857
    }
19858
 
19859
    public boolean isSet(int fieldID) {
19860
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19861
    }
19862
 
19863
    @Override
19864
    public boolean equals(Object that) {
19865
      if (that == null)
19866
        return false;
553 chandransh 19867
      if (that instanceof getCartsForUser_args)
19868
        return this.equals((getCartsForUser_args)that);
48 ashish 19869
      return false;
19870
    }
19871
 
553 chandransh 19872
    public boolean equals(getCartsForUser_args that) {
48 ashish 19873
      if (that == null)
19874
        return false;
19875
 
553 chandransh 19876
      boolean this_present_userId = true;
19877
      boolean that_present_userId = true;
19878
      if (this_present_userId || that_present_userId) {
19879
        if (!(this_present_userId && that_present_userId))
48 ashish 19880
          return false;
553 chandransh 19881
        if (this.userId != that.userId)
48 ashish 19882
          return false;
19883
      }
19884
 
553 chandransh 19885
      boolean this_present_status = true && this.isSetStatus();
19886
      boolean that_present_status = true && that.isSetStatus();
19887
      if (this_present_status || that_present_status) {
19888
        if (!(this_present_status && that_present_status))
48 ashish 19889
          return false;
553 chandransh 19890
        if (!this.status.equals(that.status))
48 ashish 19891
          return false;
19892
      }
19893
 
19894
      return true;
19895
    }
19896
 
19897
    @Override
19898
    public int hashCode() {
19899
      return 0;
19900
    }
19901
 
553 chandransh 19902
    public int compareTo(getCartsForUser_args other) {
48 ashish 19903
      if (!getClass().equals(other.getClass())) {
19904
        return getClass().getName().compareTo(other.getClass().getName());
19905
      }
19906
 
19907
      int lastComparison = 0;
553 chandransh 19908
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 19909
 
553 chandransh 19910
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 19911
      if (lastComparison != 0) {
19912
        return lastComparison;
19913
      }
553 chandransh 19914
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 19915
      if (lastComparison != 0) {
19916
        return lastComparison;
19917
      }
553 chandransh 19918
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 19919
      if (lastComparison != 0) {
19920
        return lastComparison;
19921
      }
553 chandransh 19922
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 19923
      if (lastComparison != 0) {
19924
        return lastComparison;
19925
      }
19926
      return 0;
19927
    }
19928
 
19929
    public void read(TProtocol iprot) throws TException {
19930
      TField field;
19931
      iprot.readStructBegin();
19932
      while (true)
19933
      {
19934
        field = iprot.readFieldBegin();
19935
        if (field.type == TType.STOP) { 
19936
          break;
19937
        }
19938
        _Fields fieldId = _Fields.findByThriftId(field.id);
19939
        if (fieldId == null) {
19940
          TProtocolUtil.skip(iprot, field.type);
19941
        } else {
19942
          switch (fieldId) {
553 chandransh 19943
            case USER_ID:
48 ashish 19944
              if (field.type == TType.I64) {
553 chandransh 19945
                this.userId = iprot.readI64();
19946
                setUserIdIsSet(true);
48 ashish 19947
              } else { 
19948
                TProtocolUtil.skip(iprot, field.type);
19949
              }
19950
              break;
553 chandransh 19951
            case STATUS:
19952
              if (field.type == TType.I32) {
19953
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 19954
              } else { 
19955
                TProtocolUtil.skip(iprot, field.type);
19956
              }
19957
              break;
19958
          }
19959
          iprot.readFieldEnd();
19960
        }
19961
      }
19962
      iprot.readStructEnd();
19963
      validate();
19964
    }
19965
 
19966
    public void write(TProtocol oprot) throws TException {
19967
      validate();
19968
 
19969
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19970
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
19971
      oprot.writeI64(this.userId);
48 ashish 19972
      oprot.writeFieldEnd();
553 chandransh 19973
      if (this.status != null) {
19974
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19975
        oprot.writeI32(this.status.getValue());
48 ashish 19976
        oprot.writeFieldEnd();
19977
      }
19978
      oprot.writeFieldStop();
19979
      oprot.writeStructEnd();
19980
    }
19981
 
19982
    @Override
19983
    public String toString() {
553 chandransh 19984
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 19985
      boolean first = true;
19986
 
553 chandransh 19987
      sb.append("userId:");
19988
      sb.append(this.userId);
48 ashish 19989
      first = false;
19990
      if (!first) sb.append(", ");
553 chandransh 19991
      sb.append("status:");
19992
      if (this.status == null) {
48 ashish 19993
        sb.append("null");
19994
      } else {
553 chandransh 19995
        String status_name = status.name();
19996
        if (status_name != null) {
19997
          sb.append(status_name);
19998
          sb.append(" (");
19999
        }
20000
        sb.append(this.status);
20001
        if (status_name != null) {
20002
          sb.append(")");
20003
        }
48 ashish 20004
      }
20005
      first = false;
20006
      sb.append(")");
20007
      return sb.toString();
20008
    }
20009
 
20010
    public void validate() throws TException {
20011
      // check for required fields
20012
    }
20013
 
20014
  }
20015
 
553 chandransh 20016
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
20017
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 20018
 
553 chandransh 20019
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20020
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20021
 
553 chandransh 20022
    private List<Cart> success;
20023
    private ShoppingCartException scx;
48 ashish 20024
 
20025
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20026
    public enum _Fields implements TFieldIdEnum {
20027
      SUCCESS((short)0, "success"),
553 chandransh 20028
      SCX((short)1, "scx");
48 ashish 20029
 
20030
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20031
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20032
 
20033
      static {
20034
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20035
          byId.put((int)field._thriftId, field);
20036
          byName.put(field.getFieldName(), field);
20037
        }
20038
      }
20039
 
20040
      /**
20041
       * Find the _Fields constant that matches fieldId, or null if its not found.
20042
       */
20043
      public static _Fields findByThriftId(int fieldId) {
20044
        return byId.get(fieldId);
20045
      }
20046
 
20047
      /**
20048
       * Find the _Fields constant that matches fieldId, throwing an exception
20049
       * if it is not found.
20050
       */
20051
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20052
        _Fields fields = findByThriftId(fieldId);
20053
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20054
        return fields;
20055
      }
20056
 
20057
      /**
20058
       * Find the _Fields constant that matches name, or null if its not found.
20059
       */
20060
      public static _Fields findByName(String name) {
20061
        return byName.get(name);
20062
      }
20063
 
20064
      private final short _thriftId;
20065
      private final String _fieldName;
20066
 
20067
      _Fields(short thriftId, String fieldName) {
20068
        _thriftId = thriftId;
20069
        _fieldName = fieldName;
20070
      }
20071
 
20072
      public short getThriftFieldId() {
20073
        return _thriftId;
20074
      }
20075
 
20076
      public String getFieldName() {
20077
        return _fieldName;
20078
      }
20079
    }
20080
 
20081
    // isset id assignments
20082
 
20083
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20084
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 20085
          new ListMetaData(TType.LIST, 
20086
              new StructMetaData(TType.STRUCT, Cart.class))));
20087
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 20088
          new FieldValueMetaData(TType.STRUCT)));
20089
    }});
20090
 
20091
    static {
553 chandransh 20092
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 20093
    }
20094
 
553 chandransh 20095
    public getCartsForUser_result() {
48 ashish 20096
    }
20097
 
553 chandransh 20098
    public getCartsForUser_result(
20099
      List<Cart> success,
20100
      ShoppingCartException scx)
48 ashish 20101
    {
20102
      this();
20103
      this.success = success;
553 chandransh 20104
      this.scx = scx;
48 ashish 20105
    }
20106
 
20107
    /**
20108
     * Performs a deep copy on <i>other</i>.
20109
     */
553 chandransh 20110
    public getCartsForUser_result(getCartsForUser_result other) {
20111
      if (other.isSetSuccess()) {
20112
        List<Cart> __this__success = new ArrayList<Cart>();
20113
        for (Cart other_element : other.success) {
20114
          __this__success.add(new Cart(other_element));
20115
        }
20116
        this.success = __this__success;
48 ashish 20117
      }
553 chandransh 20118
      if (other.isSetScx()) {
20119
        this.scx = new ShoppingCartException(other.scx);
20120
      }
48 ashish 20121
    }
20122
 
553 chandransh 20123
    public getCartsForUser_result deepCopy() {
20124
      return new getCartsForUser_result(this);
48 ashish 20125
    }
20126
 
20127
    @Deprecated
553 chandransh 20128
    public getCartsForUser_result clone() {
20129
      return new getCartsForUser_result(this);
48 ashish 20130
    }
20131
 
553 chandransh 20132
    public int getSuccessSize() {
20133
      return (this.success == null) ? 0 : this.success.size();
20134
    }
20135
 
20136
    public java.util.Iterator<Cart> getSuccessIterator() {
20137
      return (this.success == null) ? null : this.success.iterator();
20138
    }
20139
 
20140
    public void addToSuccess(Cart elem) {
20141
      if (this.success == null) {
20142
        this.success = new ArrayList<Cart>();
20143
      }
20144
      this.success.add(elem);
20145
    }
20146
 
20147
    public List<Cart> getSuccess() {
48 ashish 20148
      return this.success;
20149
    }
20150
 
553 chandransh 20151
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 20152
      this.success = success;
20153
      return this;
20154
    }
20155
 
20156
    public void unsetSuccess() {
553 chandransh 20157
      this.success = null;
48 ashish 20158
    }
20159
 
20160
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20161
    public boolean isSetSuccess() {
553 chandransh 20162
      return this.success != null;
48 ashish 20163
    }
20164
 
20165
    public void setSuccessIsSet(boolean value) {
553 chandransh 20166
      if (!value) {
20167
        this.success = null;
20168
      }
48 ashish 20169
    }
20170
 
553 chandransh 20171
    public ShoppingCartException getScx() {
20172
      return this.scx;
48 ashish 20173
    }
20174
 
553 chandransh 20175
    public getCartsForUser_result setScx(ShoppingCartException scx) {
20176
      this.scx = scx;
48 ashish 20177
      return this;
20178
    }
20179
 
553 chandransh 20180
    public void unsetScx() {
20181
      this.scx = null;
48 ashish 20182
    }
20183
 
553 chandransh 20184
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20185
    public boolean isSetScx() {
20186
      return this.scx != null;
48 ashish 20187
    }
20188
 
553 chandransh 20189
    public void setScxIsSet(boolean value) {
48 ashish 20190
      if (!value) {
553 chandransh 20191
        this.scx = null;
48 ashish 20192
      }
20193
    }
20194
 
20195
    public void setFieldValue(_Fields field, Object value) {
20196
      switch (field) {
20197
      case SUCCESS:
20198
        if (value == null) {
20199
          unsetSuccess();
20200
        } else {
553 chandransh 20201
          setSuccess((List<Cart>)value);
48 ashish 20202
        }
20203
        break;
20204
 
553 chandransh 20205
      case SCX:
48 ashish 20206
        if (value == null) {
553 chandransh 20207
          unsetScx();
48 ashish 20208
        } else {
553 chandransh 20209
          setScx((ShoppingCartException)value);
48 ashish 20210
        }
20211
        break;
20212
 
20213
      }
20214
    }
20215
 
20216
    public void setFieldValue(int fieldID, Object value) {
20217
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20218
    }
20219
 
20220
    public Object getFieldValue(_Fields field) {
20221
      switch (field) {
20222
      case SUCCESS:
553 chandransh 20223
        return getSuccess();
48 ashish 20224
 
553 chandransh 20225
      case SCX:
20226
        return getScx();
48 ashish 20227
 
20228
      }
20229
      throw new IllegalStateException();
20230
    }
20231
 
20232
    public Object getFieldValue(int fieldId) {
20233
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20234
    }
20235
 
20236
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20237
    public boolean isSet(_Fields field) {
20238
      switch (field) {
20239
      case SUCCESS:
20240
        return isSetSuccess();
553 chandransh 20241
      case SCX:
20242
        return isSetScx();
48 ashish 20243
      }
20244
      throw new IllegalStateException();
20245
    }
20246
 
20247
    public boolean isSet(int fieldID) {
20248
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20249
    }
20250
 
20251
    @Override
20252
    public boolean equals(Object that) {
20253
      if (that == null)
20254
        return false;
553 chandransh 20255
      if (that instanceof getCartsForUser_result)
20256
        return this.equals((getCartsForUser_result)that);
48 ashish 20257
      return false;
20258
    }
20259
 
553 chandransh 20260
    public boolean equals(getCartsForUser_result that) {
48 ashish 20261
      if (that == null)
20262
        return false;
20263
 
553 chandransh 20264
      boolean this_present_success = true && this.isSetSuccess();
20265
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 20266
      if (this_present_success || that_present_success) {
20267
        if (!(this_present_success && that_present_success))
20268
          return false;
553 chandransh 20269
        if (!this.success.equals(that.success))
48 ashish 20270
          return false;
20271
      }
20272
 
553 chandransh 20273
      boolean this_present_scx = true && this.isSetScx();
20274
      boolean that_present_scx = true && that.isSetScx();
20275
      if (this_present_scx || that_present_scx) {
20276
        if (!(this_present_scx && that_present_scx))
48 ashish 20277
          return false;
553 chandransh 20278
        if (!this.scx.equals(that.scx))
48 ashish 20279
          return false;
20280
      }
20281
 
20282
      return true;
20283
    }
20284
 
20285
    @Override
20286
    public int hashCode() {
20287
      return 0;
20288
    }
20289
 
553 chandransh 20290
    public int compareTo(getCartsForUser_result other) {
48 ashish 20291
      if (!getClass().equals(other.getClass())) {
20292
        return getClass().getName().compareTo(other.getClass().getName());
20293
      }
20294
 
20295
      int lastComparison = 0;
553 chandransh 20296
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 20297
 
20298
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20299
      if (lastComparison != 0) {
20300
        return lastComparison;
20301
      }
20302
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20303
      if (lastComparison != 0) {
20304
        return lastComparison;
20305
      }
553 chandransh 20306
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 20307
      if (lastComparison != 0) {
20308
        return lastComparison;
20309
      }
553 chandransh 20310
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 20311
      if (lastComparison != 0) {
20312
        return lastComparison;
20313
      }
20314
      return 0;
20315
    }
20316
 
20317
    public void read(TProtocol iprot) throws TException {
20318
      TField field;
20319
      iprot.readStructBegin();
20320
      while (true)
20321
      {
20322
        field = iprot.readFieldBegin();
20323
        if (field.type == TType.STOP) { 
20324
          break;
20325
        }
20326
        _Fields fieldId = _Fields.findByThriftId(field.id);
20327
        if (fieldId == null) {
20328
          TProtocolUtil.skip(iprot, field.type);
20329
        } else {
20330
          switch (fieldId) {
20331
            case SUCCESS:
553 chandransh 20332
              if (field.type == TType.LIST) {
20333
                {
771 rajveer 20334
                  TList _list20 = iprot.readListBegin();
20335
                  this.success = new ArrayList<Cart>(_list20.size);
20336
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
553 chandransh 20337
                  {
771 rajveer 20338
                    Cart _elem22;
20339
                    _elem22 = new Cart();
20340
                    _elem22.read(iprot);
20341
                    this.success.add(_elem22);
553 chandransh 20342
                  }
20343
                  iprot.readListEnd();
20344
                }
48 ashish 20345
              } else { 
20346
                TProtocolUtil.skip(iprot, field.type);
20347
              }
20348
              break;
553 chandransh 20349
            case SCX:
48 ashish 20350
              if (field.type == TType.STRUCT) {
553 chandransh 20351
                this.scx = new ShoppingCartException();
20352
                this.scx.read(iprot);
48 ashish 20353
              } else { 
20354
                TProtocolUtil.skip(iprot, field.type);
20355
              }
20356
              break;
20357
          }
20358
          iprot.readFieldEnd();
20359
        }
20360
      }
20361
      iprot.readStructEnd();
20362
      validate();
20363
    }
20364
 
20365
    public void write(TProtocol oprot) throws TException {
20366
      oprot.writeStructBegin(STRUCT_DESC);
20367
 
20368
      if (this.isSetSuccess()) {
20369
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 20370
        {
20371
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 20372
          for (Cart _iter23 : this.success)
553 chandransh 20373
          {
771 rajveer 20374
            _iter23.write(oprot);
553 chandransh 20375
          }
20376
          oprot.writeListEnd();
20377
        }
48 ashish 20378
        oprot.writeFieldEnd();
553 chandransh 20379
      } else if (this.isSetScx()) {
20380
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20381
        this.scx.write(oprot);
48 ashish 20382
        oprot.writeFieldEnd();
20383
      }
20384
      oprot.writeFieldStop();
20385
      oprot.writeStructEnd();
20386
    }
20387
 
20388
    @Override
20389
    public String toString() {
553 chandransh 20390
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 20391
      boolean first = true;
20392
 
20393
      sb.append("success:");
553 chandransh 20394
      if (this.success == null) {
20395
        sb.append("null");
20396
      } else {
20397
        sb.append(this.success);
20398
      }
48 ashish 20399
      first = false;
20400
      if (!first) sb.append(", ");
553 chandransh 20401
      sb.append("scx:");
20402
      if (this.scx == null) {
48 ashish 20403
        sb.append("null");
20404
      } else {
553 chandransh 20405
        sb.append(this.scx);
48 ashish 20406
      }
20407
      first = false;
20408
      sb.append(")");
20409
      return sb.toString();
20410
    }
20411
 
20412
    public void validate() throws TException {
20413
      // check for required fields
20414
    }
20415
 
20416
  }
20417
 
553 chandransh 20418
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
20419
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 20420
 
553 chandransh 20421
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 20422
 
553 chandransh 20423
    private CartStatus status;
48 ashish 20424
 
20425
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20426
    public enum _Fields implements TFieldIdEnum {
553 chandransh 20427
      /**
20428
       * 
20429
       * @see CartStatus
20430
       */
20431
      STATUS((short)1, "status");
48 ashish 20432
 
20433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20435
 
20436
      static {
20437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20438
          byId.put((int)field._thriftId, field);
20439
          byName.put(field.getFieldName(), field);
20440
        }
20441
      }
20442
 
20443
      /**
20444
       * Find the _Fields constant that matches fieldId, or null if its not found.
20445
       */
20446
      public static _Fields findByThriftId(int fieldId) {
20447
        return byId.get(fieldId);
20448
      }
20449
 
20450
      /**
20451
       * Find the _Fields constant that matches fieldId, throwing an exception
20452
       * if it is not found.
20453
       */
20454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20455
        _Fields fields = findByThriftId(fieldId);
20456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20457
        return fields;
20458
      }
20459
 
20460
      /**
20461
       * Find the _Fields constant that matches name, or null if its not found.
20462
       */
20463
      public static _Fields findByName(String name) {
20464
        return byName.get(name);
20465
      }
20466
 
20467
      private final short _thriftId;
20468
      private final String _fieldName;
20469
 
20470
      _Fields(short thriftId, String fieldName) {
20471
        _thriftId = thriftId;
20472
        _fieldName = fieldName;
20473
      }
20474
 
20475
      public short getThriftFieldId() {
20476
        return _thriftId;
20477
      }
20478
 
20479
      public String getFieldName() {
20480
        return _fieldName;
20481
      }
20482
    }
20483
 
20484
    // isset id assignments
553 chandransh 20485
 
20486
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20487
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
20488
          new EnumMetaData(TType.ENUM, CartStatus.class)));
20489
    }});
20490
 
20491
    static {
20492
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
20493
    }
20494
 
20495
    public getCartsByStatus_args() {
20496
    }
20497
 
20498
    public getCartsByStatus_args(
20499
      CartStatus status)
20500
    {
20501
      this();
20502
      this.status = status;
20503
    }
20504
 
20505
    /**
20506
     * Performs a deep copy on <i>other</i>.
20507
     */
20508
    public getCartsByStatus_args(getCartsByStatus_args other) {
20509
      if (other.isSetStatus()) {
20510
        this.status = other.status;
20511
      }
20512
    }
20513
 
20514
    public getCartsByStatus_args deepCopy() {
20515
      return new getCartsByStatus_args(this);
20516
    }
20517
 
20518
    @Deprecated
20519
    public getCartsByStatus_args clone() {
20520
      return new getCartsByStatus_args(this);
20521
    }
20522
 
20523
    /**
20524
     * 
20525
     * @see CartStatus
20526
     */
20527
    public CartStatus getStatus() {
20528
      return this.status;
20529
    }
20530
 
20531
    /**
20532
     * 
20533
     * @see CartStatus
20534
     */
20535
    public getCartsByStatus_args setStatus(CartStatus status) {
20536
      this.status = status;
20537
      return this;
20538
    }
20539
 
20540
    public void unsetStatus() {
20541
      this.status = null;
20542
    }
20543
 
20544
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
20545
    public boolean isSetStatus() {
20546
      return this.status != null;
20547
    }
20548
 
20549
    public void setStatusIsSet(boolean value) {
20550
      if (!value) {
20551
        this.status = null;
20552
      }
20553
    }
20554
 
20555
    public void setFieldValue(_Fields field, Object value) {
20556
      switch (field) {
20557
      case STATUS:
20558
        if (value == null) {
20559
          unsetStatus();
20560
        } else {
20561
          setStatus((CartStatus)value);
20562
        }
20563
        break;
20564
 
20565
      }
20566
    }
20567
 
20568
    public void setFieldValue(int fieldID, Object value) {
20569
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20570
    }
20571
 
20572
    public Object getFieldValue(_Fields field) {
20573
      switch (field) {
20574
      case STATUS:
20575
        return getStatus();
20576
 
20577
      }
20578
      throw new IllegalStateException();
20579
    }
20580
 
20581
    public Object getFieldValue(int fieldId) {
20582
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20583
    }
20584
 
20585
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20586
    public boolean isSet(_Fields field) {
20587
      switch (field) {
20588
      case STATUS:
20589
        return isSetStatus();
20590
      }
20591
      throw new IllegalStateException();
20592
    }
20593
 
20594
    public boolean isSet(int fieldID) {
20595
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20596
    }
20597
 
20598
    @Override
20599
    public boolean equals(Object that) {
20600
      if (that == null)
20601
        return false;
20602
      if (that instanceof getCartsByStatus_args)
20603
        return this.equals((getCartsByStatus_args)that);
20604
      return false;
20605
    }
20606
 
20607
    public boolean equals(getCartsByStatus_args that) {
20608
      if (that == null)
20609
        return false;
20610
 
20611
      boolean this_present_status = true && this.isSetStatus();
20612
      boolean that_present_status = true && that.isSetStatus();
20613
      if (this_present_status || that_present_status) {
20614
        if (!(this_present_status && that_present_status))
20615
          return false;
20616
        if (!this.status.equals(that.status))
20617
          return false;
20618
      }
20619
 
20620
      return true;
20621
    }
20622
 
20623
    @Override
20624
    public int hashCode() {
20625
      return 0;
20626
    }
20627
 
20628
    public int compareTo(getCartsByStatus_args other) {
20629
      if (!getClass().equals(other.getClass())) {
20630
        return getClass().getName().compareTo(other.getClass().getName());
20631
      }
20632
 
20633
      int lastComparison = 0;
20634
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
20635
 
20636
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
20637
      if (lastComparison != 0) {
20638
        return lastComparison;
20639
      }
20640
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
20641
      if (lastComparison != 0) {
20642
        return lastComparison;
20643
      }
20644
      return 0;
20645
    }
20646
 
20647
    public void read(TProtocol iprot) throws TException {
20648
      TField field;
20649
      iprot.readStructBegin();
20650
      while (true)
20651
      {
20652
        field = iprot.readFieldBegin();
20653
        if (field.type == TType.STOP) { 
20654
          break;
20655
        }
20656
        _Fields fieldId = _Fields.findByThriftId(field.id);
20657
        if (fieldId == null) {
20658
          TProtocolUtil.skip(iprot, field.type);
20659
        } else {
20660
          switch (fieldId) {
20661
            case STATUS:
20662
              if (field.type == TType.I32) {
20663
                this.status = CartStatus.findByValue(iprot.readI32());
20664
              } else { 
20665
                TProtocolUtil.skip(iprot, field.type);
20666
              }
20667
              break;
20668
          }
20669
          iprot.readFieldEnd();
20670
        }
20671
      }
20672
      iprot.readStructEnd();
20673
      validate();
20674
    }
20675
 
20676
    public void write(TProtocol oprot) throws TException {
20677
      validate();
20678
 
20679
      oprot.writeStructBegin(STRUCT_DESC);
20680
      if (this.status != null) {
20681
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
20682
        oprot.writeI32(this.status.getValue());
20683
        oprot.writeFieldEnd();
20684
      }
20685
      oprot.writeFieldStop();
20686
      oprot.writeStructEnd();
20687
    }
20688
 
20689
    @Override
20690
    public String toString() {
20691
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
20692
      boolean first = true;
20693
 
20694
      sb.append("status:");
20695
      if (this.status == null) {
20696
        sb.append("null");
20697
      } else {
20698
        String status_name = status.name();
20699
        if (status_name != null) {
20700
          sb.append(status_name);
20701
          sb.append(" (");
20702
        }
20703
        sb.append(this.status);
20704
        if (status_name != null) {
20705
          sb.append(")");
20706
        }
20707
      }
20708
      first = false;
20709
      sb.append(")");
20710
      return sb.toString();
20711
    }
20712
 
20713
    public void validate() throws TException {
20714
      // check for required fields
20715
    }
20716
 
20717
  }
20718
 
20719
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
20720
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
20721
 
20722
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20723
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20724
 
20725
    private List<Cart> success;
20726
    private ShoppingCartException scx;
20727
 
20728
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20729
    public enum _Fields implements TFieldIdEnum {
20730
      SUCCESS((short)0, "success"),
20731
      SCX((short)1, "scx");
20732
 
20733
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20734
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20735
 
20736
      static {
20737
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20738
          byId.put((int)field._thriftId, field);
20739
          byName.put(field.getFieldName(), field);
20740
        }
20741
      }
20742
 
20743
      /**
20744
       * Find the _Fields constant that matches fieldId, or null if its not found.
20745
       */
20746
      public static _Fields findByThriftId(int fieldId) {
20747
        return byId.get(fieldId);
20748
      }
20749
 
20750
      /**
20751
       * Find the _Fields constant that matches fieldId, throwing an exception
20752
       * if it is not found.
20753
       */
20754
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20755
        _Fields fields = findByThriftId(fieldId);
20756
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20757
        return fields;
20758
      }
20759
 
20760
      /**
20761
       * Find the _Fields constant that matches name, or null if its not found.
20762
       */
20763
      public static _Fields findByName(String name) {
20764
        return byName.get(name);
20765
      }
20766
 
20767
      private final short _thriftId;
20768
      private final String _fieldName;
20769
 
20770
      _Fields(short thriftId, String fieldName) {
20771
        _thriftId = thriftId;
20772
        _fieldName = fieldName;
20773
      }
20774
 
20775
      public short getThriftFieldId() {
20776
        return _thriftId;
20777
      }
20778
 
20779
      public String getFieldName() {
20780
        return _fieldName;
20781
      }
20782
    }
20783
 
20784
    // isset id assignments
20785
 
20786
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20787
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20788
          new ListMetaData(TType.LIST, 
20789
              new StructMetaData(TType.STRUCT, Cart.class))));
20790
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20791
          new FieldValueMetaData(TType.STRUCT)));
20792
    }});
20793
 
20794
    static {
20795
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
20796
    }
20797
 
20798
    public getCartsByStatus_result() {
20799
    }
20800
 
20801
    public getCartsByStatus_result(
20802
      List<Cart> success,
20803
      ShoppingCartException scx)
20804
    {
20805
      this();
20806
      this.success = success;
20807
      this.scx = scx;
20808
    }
20809
 
20810
    /**
20811
     * Performs a deep copy on <i>other</i>.
20812
     */
20813
    public getCartsByStatus_result(getCartsByStatus_result other) {
20814
      if (other.isSetSuccess()) {
20815
        List<Cart> __this__success = new ArrayList<Cart>();
20816
        for (Cart other_element : other.success) {
20817
          __this__success.add(new Cart(other_element));
20818
        }
20819
        this.success = __this__success;
20820
      }
20821
      if (other.isSetScx()) {
20822
        this.scx = new ShoppingCartException(other.scx);
20823
      }
20824
    }
20825
 
20826
    public getCartsByStatus_result deepCopy() {
20827
      return new getCartsByStatus_result(this);
20828
    }
20829
 
20830
    @Deprecated
20831
    public getCartsByStatus_result clone() {
20832
      return new getCartsByStatus_result(this);
20833
    }
20834
 
20835
    public int getSuccessSize() {
20836
      return (this.success == null) ? 0 : this.success.size();
20837
    }
20838
 
20839
    public java.util.Iterator<Cart> getSuccessIterator() {
20840
      return (this.success == null) ? null : this.success.iterator();
20841
    }
20842
 
20843
    public void addToSuccess(Cart elem) {
20844
      if (this.success == null) {
20845
        this.success = new ArrayList<Cart>();
20846
      }
20847
      this.success.add(elem);
20848
    }
20849
 
20850
    public List<Cart> getSuccess() {
20851
      return this.success;
20852
    }
20853
 
20854
    public getCartsByStatus_result setSuccess(List<Cart> success) {
20855
      this.success = success;
20856
      return this;
20857
    }
20858
 
20859
    public void unsetSuccess() {
20860
      this.success = null;
20861
    }
20862
 
20863
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20864
    public boolean isSetSuccess() {
20865
      return this.success != null;
20866
    }
20867
 
20868
    public void setSuccessIsSet(boolean value) {
20869
      if (!value) {
20870
        this.success = null;
20871
      }
20872
    }
20873
 
20874
    public ShoppingCartException getScx() {
20875
      return this.scx;
20876
    }
20877
 
20878
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
20879
      this.scx = scx;
20880
      return this;
20881
    }
20882
 
20883
    public void unsetScx() {
20884
      this.scx = null;
20885
    }
20886
 
20887
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20888
    public boolean isSetScx() {
20889
      return this.scx != null;
20890
    }
20891
 
20892
    public void setScxIsSet(boolean value) {
20893
      if (!value) {
20894
        this.scx = null;
20895
      }
20896
    }
20897
 
20898
    public void setFieldValue(_Fields field, Object value) {
20899
      switch (field) {
20900
      case SUCCESS:
20901
        if (value == null) {
20902
          unsetSuccess();
20903
        } else {
20904
          setSuccess((List<Cart>)value);
20905
        }
20906
        break;
20907
 
20908
      case SCX:
20909
        if (value == null) {
20910
          unsetScx();
20911
        } else {
20912
          setScx((ShoppingCartException)value);
20913
        }
20914
        break;
20915
 
20916
      }
20917
    }
20918
 
20919
    public void setFieldValue(int fieldID, Object value) {
20920
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20921
    }
20922
 
20923
    public Object getFieldValue(_Fields field) {
20924
      switch (field) {
20925
      case SUCCESS:
20926
        return getSuccess();
20927
 
20928
      case SCX:
20929
        return getScx();
20930
 
20931
      }
20932
      throw new IllegalStateException();
20933
    }
20934
 
20935
    public Object getFieldValue(int fieldId) {
20936
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20937
    }
20938
 
20939
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20940
    public boolean isSet(_Fields field) {
20941
      switch (field) {
20942
      case SUCCESS:
20943
        return isSetSuccess();
20944
      case SCX:
20945
        return isSetScx();
20946
      }
20947
      throw new IllegalStateException();
20948
    }
20949
 
20950
    public boolean isSet(int fieldID) {
20951
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20952
    }
20953
 
20954
    @Override
20955
    public boolean equals(Object that) {
20956
      if (that == null)
20957
        return false;
20958
      if (that instanceof getCartsByStatus_result)
20959
        return this.equals((getCartsByStatus_result)that);
20960
      return false;
20961
    }
20962
 
20963
    public boolean equals(getCartsByStatus_result that) {
20964
      if (that == null)
20965
        return false;
20966
 
20967
      boolean this_present_success = true && this.isSetSuccess();
20968
      boolean that_present_success = true && that.isSetSuccess();
20969
      if (this_present_success || that_present_success) {
20970
        if (!(this_present_success && that_present_success))
20971
          return false;
20972
        if (!this.success.equals(that.success))
20973
          return false;
20974
      }
20975
 
20976
      boolean this_present_scx = true && this.isSetScx();
20977
      boolean that_present_scx = true && that.isSetScx();
20978
      if (this_present_scx || that_present_scx) {
20979
        if (!(this_present_scx && that_present_scx))
20980
          return false;
20981
        if (!this.scx.equals(that.scx))
20982
          return false;
20983
      }
20984
 
20985
      return true;
20986
    }
20987
 
20988
    @Override
20989
    public int hashCode() {
20990
      return 0;
20991
    }
20992
 
20993
    public int compareTo(getCartsByStatus_result other) {
20994
      if (!getClass().equals(other.getClass())) {
20995
        return getClass().getName().compareTo(other.getClass().getName());
20996
      }
20997
 
20998
      int lastComparison = 0;
20999
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
21000
 
21001
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21002
      if (lastComparison != 0) {
21003
        return lastComparison;
21004
      }
21005
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21006
      if (lastComparison != 0) {
21007
        return lastComparison;
21008
      }
21009
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21010
      if (lastComparison != 0) {
21011
        return lastComparison;
21012
      }
21013
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21014
      if (lastComparison != 0) {
21015
        return lastComparison;
21016
      }
21017
      return 0;
21018
    }
21019
 
21020
    public void read(TProtocol iprot) throws TException {
21021
      TField field;
21022
      iprot.readStructBegin();
21023
      while (true)
21024
      {
21025
        field = iprot.readFieldBegin();
21026
        if (field.type == TType.STOP) { 
21027
          break;
21028
        }
21029
        _Fields fieldId = _Fields.findByThriftId(field.id);
21030
        if (fieldId == null) {
21031
          TProtocolUtil.skip(iprot, field.type);
21032
        } else {
21033
          switch (fieldId) {
21034
            case SUCCESS:
21035
              if (field.type == TType.LIST) {
21036
                {
771 rajveer 21037
                  TList _list24 = iprot.readListBegin();
21038
                  this.success = new ArrayList<Cart>(_list24.size);
21039
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
553 chandransh 21040
                  {
771 rajveer 21041
                    Cart _elem26;
21042
                    _elem26 = new Cart();
21043
                    _elem26.read(iprot);
21044
                    this.success.add(_elem26);
553 chandransh 21045
                  }
21046
                  iprot.readListEnd();
21047
                }
21048
              } else { 
21049
                TProtocolUtil.skip(iprot, field.type);
21050
              }
21051
              break;
21052
            case SCX:
21053
              if (field.type == TType.STRUCT) {
21054
                this.scx = new ShoppingCartException();
21055
                this.scx.read(iprot);
21056
              } else { 
21057
                TProtocolUtil.skip(iprot, field.type);
21058
              }
21059
              break;
21060
          }
21061
          iprot.readFieldEnd();
21062
        }
21063
      }
21064
      iprot.readStructEnd();
21065
      validate();
21066
    }
21067
 
21068
    public void write(TProtocol oprot) throws TException {
21069
      oprot.writeStructBegin(STRUCT_DESC);
21070
 
21071
      if (this.isSetSuccess()) {
21072
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21073
        {
21074
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 21075
          for (Cart _iter27 : this.success)
553 chandransh 21076
          {
771 rajveer 21077
            _iter27.write(oprot);
553 chandransh 21078
          }
21079
          oprot.writeListEnd();
21080
        }
21081
        oprot.writeFieldEnd();
21082
      } else if (this.isSetScx()) {
21083
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21084
        this.scx.write(oprot);
21085
        oprot.writeFieldEnd();
21086
      }
21087
      oprot.writeFieldStop();
21088
      oprot.writeStructEnd();
21089
    }
21090
 
21091
    @Override
21092
    public String toString() {
21093
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
21094
      boolean first = true;
21095
 
21096
      sb.append("success:");
21097
      if (this.success == null) {
21098
        sb.append("null");
21099
      } else {
21100
        sb.append(this.success);
21101
      }
21102
      first = false;
21103
      if (!first) sb.append(", ");
21104
      sb.append("scx:");
21105
      if (this.scx == null) {
21106
        sb.append("null");
21107
      } else {
21108
        sb.append(this.scx);
21109
      }
21110
      first = false;
21111
      sb.append(")");
21112
      return sb.toString();
21113
    }
21114
 
21115
    public void validate() throws TException {
21116
      // check for required fields
21117
    }
21118
 
21119
  }
21120
 
21121
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
21122
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
21123
 
21124
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
21125
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
21126
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
21127
 
21128
    private long from_time;
21129
    private long to_time;
21130
    private CartStatus status;
21131
 
21132
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21133
    public enum _Fields implements TFieldIdEnum {
21134
      FROM_TIME((short)1, "from_time"),
21135
      TO_TIME((short)2, "to_time"),
21136
      /**
21137
       * 
21138
       * @see CartStatus
21139
       */
21140
      STATUS((short)3, "status");
21141
 
21142
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21143
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21144
 
21145
      static {
21146
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21147
          byId.put((int)field._thriftId, field);
21148
          byName.put(field.getFieldName(), field);
21149
        }
21150
      }
21151
 
21152
      /**
21153
       * Find the _Fields constant that matches fieldId, or null if its not found.
21154
       */
21155
      public static _Fields findByThriftId(int fieldId) {
21156
        return byId.get(fieldId);
21157
      }
21158
 
21159
      /**
21160
       * Find the _Fields constant that matches fieldId, throwing an exception
21161
       * if it is not found.
21162
       */
21163
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21164
        _Fields fields = findByThriftId(fieldId);
21165
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21166
        return fields;
21167
      }
21168
 
21169
      /**
21170
       * Find the _Fields constant that matches name, or null if its not found.
21171
       */
21172
      public static _Fields findByName(String name) {
21173
        return byName.get(name);
21174
      }
21175
 
21176
      private final short _thriftId;
21177
      private final String _fieldName;
21178
 
21179
      _Fields(short thriftId, String fieldName) {
21180
        _thriftId = thriftId;
21181
        _fieldName = fieldName;
21182
      }
21183
 
21184
      public short getThriftFieldId() {
21185
        return _thriftId;
21186
      }
21187
 
21188
      public String getFieldName() {
21189
        return _fieldName;
21190
      }
21191
    }
21192
 
21193
    // isset id assignments
21194
    private static final int __FROM_TIME_ISSET_ID = 0;
21195
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 21196
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 21197
 
21198
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21199
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 21200
          new FieldValueMetaData(TType.I64)));
553 chandransh 21201
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
21202
          new FieldValueMetaData(TType.I64)));
21203
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
21204
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 21205
    }});
21206
 
21207
    static {
553 chandransh 21208
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 21209
    }
21210
 
553 chandransh 21211
    public getCartsByTime_args() {
48 ashish 21212
    }
21213
 
553 chandransh 21214
    public getCartsByTime_args(
21215
      long from_time,
21216
      long to_time,
21217
      CartStatus status)
48 ashish 21218
    {
21219
      this();
553 chandransh 21220
      this.from_time = from_time;
21221
      setFrom_timeIsSet(true);
21222
      this.to_time = to_time;
21223
      setTo_timeIsSet(true);
21224
      this.status = status;
48 ashish 21225
    }
21226
 
21227
    /**
21228
     * Performs a deep copy on <i>other</i>.
21229
     */
553 chandransh 21230
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 21231
      __isset_bit_vector.clear();
21232
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21233
      this.from_time = other.from_time;
21234
      this.to_time = other.to_time;
21235
      if (other.isSetStatus()) {
21236
        this.status = other.status;
21237
      }
48 ashish 21238
    }
21239
 
553 chandransh 21240
    public getCartsByTime_args deepCopy() {
21241
      return new getCartsByTime_args(this);
48 ashish 21242
    }
21243
 
21244
    @Deprecated
553 chandransh 21245
    public getCartsByTime_args clone() {
21246
      return new getCartsByTime_args(this);
48 ashish 21247
    }
21248
 
553 chandransh 21249
    public long getFrom_time() {
21250
      return this.from_time;
48 ashish 21251
    }
21252
 
553 chandransh 21253
    public getCartsByTime_args setFrom_time(long from_time) {
21254
      this.from_time = from_time;
21255
      setFrom_timeIsSet(true);
48 ashish 21256
      return this;
21257
    }
21258
 
553 chandransh 21259
    public void unsetFrom_time() {
21260
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 21261
    }
21262
 
553 chandransh 21263
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
21264
    public boolean isSetFrom_time() {
21265
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 21266
    }
21267
 
553 chandransh 21268
    public void setFrom_timeIsSet(boolean value) {
21269
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 21270
    }
21271
 
553 chandransh 21272
    public long getTo_time() {
21273
      return this.to_time;
123 ashish 21274
    }
21275
 
553 chandransh 21276
    public getCartsByTime_args setTo_time(long to_time) {
21277
      this.to_time = to_time;
21278
      setTo_timeIsSet(true);
123 ashish 21279
      return this;
21280
    }
21281
 
553 chandransh 21282
    public void unsetTo_time() {
21283
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 21284
    }
21285
 
553 chandransh 21286
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
21287
    public boolean isSetTo_time() {
21288
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 21289
    }
21290
 
553 chandransh 21291
    public void setTo_timeIsSet(boolean value) {
21292
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 21293
    }
21294
 
553 chandransh 21295
    /**
21296
     * 
21297
     * @see CartStatus
21298
     */
21299
    public CartStatus getStatus() {
21300
      return this.status;
21301
    }
21302
 
21303
    /**
21304
     * 
21305
     * @see CartStatus
21306
     */
21307
    public getCartsByTime_args setStatus(CartStatus status) {
21308
      this.status = status;
21309
      return this;
21310
    }
21311
 
21312
    public void unsetStatus() {
21313
      this.status = null;
21314
    }
21315
 
21316
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
21317
    public boolean isSetStatus() {
21318
      return this.status != null;
21319
    }
21320
 
21321
    public void setStatusIsSet(boolean value) {
21322
      if (!value) {
21323
        this.status = null;
21324
      }
21325
    }
21326
 
48 ashish 21327
    public void setFieldValue(_Fields field, Object value) {
21328
      switch (field) {
553 chandransh 21329
      case FROM_TIME:
48 ashish 21330
        if (value == null) {
553 chandransh 21331
          unsetFrom_time();
48 ashish 21332
        } else {
553 chandransh 21333
          setFrom_time((Long)value);
48 ashish 21334
        }
21335
        break;
21336
 
553 chandransh 21337
      case TO_TIME:
123 ashish 21338
        if (value == null) {
553 chandransh 21339
          unsetTo_time();
123 ashish 21340
        } else {
553 chandransh 21341
          setTo_time((Long)value);
123 ashish 21342
        }
21343
        break;
21344
 
553 chandransh 21345
      case STATUS:
21346
        if (value == null) {
21347
          unsetStatus();
21348
        } else {
21349
          setStatus((CartStatus)value);
21350
        }
21351
        break;
21352
 
48 ashish 21353
      }
21354
    }
21355
 
21356
    public void setFieldValue(int fieldID, Object value) {
21357
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21358
    }
21359
 
21360
    public Object getFieldValue(_Fields field) {
21361
      switch (field) {
553 chandransh 21362
      case FROM_TIME:
21363
        return new Long(getFrom_time());
48 ashish 21364
 
553 chandransh 21365
      case TO_TIME:
21366
        return new Long(getTo_time());
123 ashish 21367
 
553 chandransh 21368
      case STATUS:
21369
        return getStatus();
21370
 
48 ashish 21371
      }
21372
      throw new IllegalStateException();
21373
    }
21374
 
21375
    public Object getFieldValue(int fieldId) {
21376
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21377
    }
21378
 
21379
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21380
    public boolean isSet(_Fields field) {
21381
      switch (field) {
553 chandransh 21382
      case FROM_TIME:
21383
        return isSetFrom_time();
21384
      case TO_TIME:
21385
        return isSetTo_time();
21386
      case STATUS:
21387
        return isSetStatus();
48 ashish 21388
      }
21389
      throw new IllegalStateException();
21390
    }
21391
 
21392
    public boolean isSet(int fieldID) {
21393
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21394
    }
21395
 
21396
    @Override
21397
    public boolean equals(Object that) {
21398
      if (that == null)
21399
        return false;
553 chandransh 21400
      if (that instanceof getCartsByTime_args)
21401
        return this.equals((getCartsByTime_args)that);
48 ashish 21402
      return false;
21403
    }
21404
 
553 chandransh 21405
    public boolean equals(getCartsByTime_args that) {
48 ashish 21406
      if (that == null)
21407
        return false;
21408
 
553 chandransh 21409
      boolean this_present_from_time = true;
21410
      boolean that_present_from_time = true;
21411
      if (this_present_from_time || that_present_from_time) {
21412
        if (!(this_present_from_time && that_present_from_time))
48 ashish 21413
          return false;
553 chandransh 21414
        if (this.from_time != that.from_time)
48 ashish 21415
          return false;
21416
      }
21417
 
553 chandransh 21418
      boolean this_present_to_time = true;
21419
      boolean that_present_to_time = true;
21420
      if (this_present_to_time || that_present_to_time) {
21421
        if (!(this_present_to_time && that_present_to_time))
123 ashish 21422
          return false;
553 chandransh 21423
        if (this.to_time != that.to_time)
123 ashish 21424
          return false;
21425
      }
21426
 
553 chandransh 21427
      boolean this_present_status = true && this.isSetStatus();
21428
      boolean that_present_status = true && that.isSetStatus();
21429
      if (this_present_status || that_present_status) {
21430
        if (!(this_present_status && that_present_status))
21431
          return false;
21432
        if (!this.status.equals(that.status))
21433
          return false;
21434
      }
21435
 
48 ashish 21436
      return true;
21437
    }
21438
 
21439
    @Override
21440
    public int hashCode() {
21441
      return 0;
21442
    }
21443
 
553 chandransh 21444
    public int compareTo(getCartsByTime_args other) {
48 ashish 21445
      if (!getClass().equals(other.getClass())) {
21446
        return getClass().getName().compareTo(other.getClass().getName());
21447
      }
21448
 
21449
      int lastComparison = 0;
553 chandransh 21450
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 21451
 
553 chandransh 21452
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 21453
      if (lastComparison != 0) {
21454
        return lastComparison;
21455
      }
553 chandransh 21456
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 21457
      if (lastComparison != 0) {
21458
        return lastComparison;
21459
      }
553 chandransh 21460
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 21461
      if (lastComparison != 0) {
21462
        return lastComparison;
21463
      }
553 chandransh 21464
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 21465
      if (lastComparison != 0) {
21466
        return lastComparison;
21467
      }
553 chandransh 21468
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
21469
      if (lastComparison != 0) {
21470
        return lastComparison;
21471
      }
21472
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
21473
      if (lastComparison != 0) {
21474
        return lastComparison;
21475
      }
48 ashish 21476
      return 0;
21477
    }
21478
 
21479
    public void read(TProtocol iprot) throws TException {
21480
      TField field;
21481
      iprot.readStructBegin();
21482
      while (true)
21483
      {
21484
        field = iprot.readFieldBegin();
21485
        if (field.type == TType.STOP) { 
21486
          break;
21487
        }
21488
        _Fields fieldId = _Fields.findByThriftId(field.id);
21489
        if (fieldId == null) {
21490
          TProtocolUtil.skip(iprot, field.type);
21491
        } else {
21492
          switch (fieldId) {
553 chandransh 21493
            case FROM_TIME:
48 ashish 21494
              if (field.type == TType.I64) {
553 chandransh 21495
                this.from_time = iprot.readI64();
21496
                setFrom_timeIsSet(true);
48 ashish 21497
              } else { 
21498
                TProtocolUtil.skip(iprot, field.type);
21499
              }
21500
              break;
553 chandransh 21501
            case TO_TIME:
21502
              if (field.type == TType.I64) {
21503
                this.to_time = iprot.readI64();
21504
                setTo_timeIsSet(true);
123 ashish 21505
              } else { 
21506
                TProtocolUtil.skip(iprot, field.type);
21507
              }
21508
              break;
553 chandransh 21509
            case STATUS:
21510
              if (field.type == TType.I32) {
21511
                this.status = CartStatus.findByValue(iprot.readI32());
21512
              } else { 
21513
                TProtocolUtil.skip(iprot, field.type);
21514
              }
21515
              break;
48 ashish 21516
          }
21517
          iprot.readFieldEnd();
21518
        }
21519
      }
21520
      iprot.readStructEnd();
21521
      validate();
21522
    }
21523
 
21524
    public void write(TProtocol oprot) throws TException {
21525
      validate();
21526
 
21527
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21528
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
21529
      oprot.writeI64(this.from_time);
48 ashish 21530
      oprot.writeFieldEnd();
553 chandransh 21531
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
21532
      oprot.writeI64(this.to_time);
123 ashish 21533
      oprot.writeFieldEnd();
553 chandransh 21534
      if (this.status != null) {
21535
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
21536
        oprot.writeI32(this.status.getValue());
21537
        oprot.writeFieldEnd();
21538
      }
48 ashish 21539
      oprot.writeFieldStop();
21540
      oprot.writeStructEnd();
21541
    }
21542
 
21543
    @Override
21544
    public String toString() {
553 chandransh 21545
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 21546
      boolean first = true;
21547
 
553 chandransh 21548
      sb.append("from_time:");
21549
      sb.append(this.from_time);
48 ashish 21550
      first = false;
123 ashish 21551
      if (!first) sb.append(", ");
553 chandransh 21552
      sb.append("to_time:");
21553
      sb.append(this.to_time);
123 ashish 21554
      first = false;
553 chandransh 21555
      if (!first) sb.append(", ");
21556
      sb.append("status:");
21557
      if (this.status == null) {
21558
        sb.append("null");
21559
      } else {
21560
        String status_name = status.name();
21561
        if (status_name != null) {
21562
          sb.append(status_name);
21563
          sb.append(" (");
21564
        }
21565
        sb.append(this.status);
21566
        if (status_name != null) {
21567
          sb.append(")");
21568
        }
21569
      }
21570
      first = false;
48 ashish 21571
      sb.append(")");
21572
      return sb.toString();
21573
    }
21574
 
21575
    public void validate() throws TException {
21576
      // check for required fields
21577
    }
21578
 
21579
  }
21580
 
553 chandransh 21581
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
21582
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 21583
 
553 chandransh 21584
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
21585
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 21586
 
553 chandransh 21587
    private List<Cart> success;
21588
    private ShoppingCartException scx;
48 ashish 21589
 
21590
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21591
    public enum _Fields implements TFieldIdEnum {
21592
      SUCCESS((short)0, "success"),
553 chandransh 21593
      SCX((short)1, "scx");
48 ashish 21594
 
21595
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21596
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21597
 
21598
      static {
21599
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21600
          byId.put((int)field._thriftId, field);
21601
          byName.put(field.getFieldName(), field);
21602
        }
21603
      }
21604
 
21605
      /**
21606
       * Find the _Fields constant that matches fieldId, or null if its not found.
21607
       */
21608
      public static _Fields findByThriftId(int fieldId) {
21609
        return byId.get(fieldId);
21610
      }
21611
 
21612
      /**
21613
       * Find the _Fields constant that matches fieldId, throwing an exception
21614
       * if it is not found.
21615
       */
21616
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21617
        _Fields fields = findByThriftId(fieldId);
21618
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21619
        return fields;
21620
      }
21621
 
21622
      /**
21623
       * Find the _Fields constant that matches name, or null if its not found.
21624
       */
21625
      public static _Fields findByName(String name) {
21626
        return byName.get(name);
21627
      }
21628
 
21629
      private final short _thriftId;
21630
      private final String _fieldName;
21631
 
21632
      _Fields(short thriftId, String fieldName) {
21633
        _thriftId = thriftId;
21634
        _fieldName = fieldName;
21635
      }
21636
 
21637
      public short getThriftFieldId() {
21638
        return _thriftId;
21639
      }
21640
 
21641
      public String getFieldName() {
21642
        return _fieldName;
21643
      }
21644
    }
21645
 
21646
    // isset id assignments
21647
 
21648
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21649
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 21650
          new ListMetaData(TType.LIST, 
21651
              new StructMetaData(TType.STRUCT, Cart.class))));
21652
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 21653
          new FieldValueMetaData(TType.STRUCT)));
21654
    }});
21655
 
21656
    static {
553 chandransh 21657
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 21658
    }
21659
 
553 chandransh 21660
    public getCartsByTime_result() {
48 ashish 21661
    }
21662
 
553 chandransh 21663
    public getCartsByTime_result(
21664
      List<Cart> success,
21665
      ShoppingCartException scx)
48 ashish 21666
    {
21667
      this();
21668
      this.success = success;
553 chandransh 21669
      this.scx = scx;
48 ashish 21670
    }
21671
 
21672
    /**
21673
     * Performs a deep copy on <i>other</i>.
21674
     */
553 chandransh 21675
    public getCartsByTime_result(getCartsByTime_result other) {
21676
      if (other.isSetSuccess()) {
21677
        List<Cart> __this__success = new ArrayList<Cart>();
21678
        for (Cart other_element : other.success) {
21679
          __this__success.add(new Cart(other_element));
21680
        }
21681
        this.success = __this__success;
48 ashish 21682
      }
553 chandransh 21683
      if (other.isSetScx()) {
21684
        this.scx = new ShoppingCartException(other.scx);
21685
      }
48 ashish 21686
    }
21687
 
553 chandransh 21688
    public getCartsByTime_result deepCopy() {
21689
      return new getCartsByTime_result(this);
48 ashish 21690
    }
21691
 
21692
    @Deprecated
553 chandransh 21693
    public getCartsByTime_result clone() {
21694
      return new getCartsByTime_result(this);
48 ashish 21695
    }
21696
 
553 chandransh 21697
    public int getSuccessSize() {
21698
      return (this.success == null) ? 0 : this.success.size();
21699
    }
21700
 
21701
    public java.util.Iterator<Cart> getSuccessIterator() {
21702
      return (this.success == null) ? null : this.success.iterator();
21703
    }
21704
 
21705
    public void addToSuccess(Cart elem) {
21706
      if (this.success == null) {
21707
        this.success = new ArrayList<Cart>();
21708
      }
21709
      this.success.add(elem);
21710
    }
21711
 
21712
    public List<Cart> getSuccess() {
48 ashish 21713
      return this.success;
21714
    }
21715
 
553 chandransh 21716
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 21717
      this.success = success;
21718
      return this;
21719
    }
21720
 
21721
    public void unsetSuccess() {
553 chandransh 21722
      this.success = null;
48 ashish 21723
    }
21724
 
21725
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21726
    public boolean isSetSuccess() {
553 chandransh 21727
      return this.success != null;
48 ashish 21728
    }
21729
 
21730
    public void setSuccessIsSet(boolean value) {
553 chandransh 21731
      if (!value) {
21732
        this.success = null;
21733
      }
48 ashish 21734
    }
21735
 
553 chandransh 21736
    public ShoppingCartException getScx() {
21737
      return this.scx;
48 ashish 21738
    }
21739
 
553 chandransh 21740
    public getCartsByTime_result setScx(ShoppingCartException scx) {
21741
      this.scx = scx;
48 ashish 21742
      return this;
21743
    }
21744
 
553 chandransh 21745
    public void unsetScx() {
21746
      this.scx = null;
48 ashish 21747
    }
21748
 
553 chandransh 21749
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21750
    public boolean isSetScx() {
21751
      return this.scx != null;
48 ashish 21752
    }
21753
 
553 chandransh 21754
    public void setScxIsSet(boolean value) {
48 ashish 21755
      if (!value) {
553 chandransh 21756
        this.scx = null;
48 ashish 21757
      }
21758
    }
21759
 
21760
    public void setFieldValue(_Fields field, Object value) {
21761
      switch (field) {
21762
      case SUCCESS:
21763
        if (value == null) {
21764
          unsetSuccess();
21765
        } else {
553 chandransh 21766
          setSuccess((List<Cart>)value);
48 ashish 21767
        }
21768
        break;
21769
 
553 chandransh 21770
      case SCX:
48 ashish 21771
        if (value == null) {
553 chandransh 21772
          unsetScx();
48 ashish 21773
        } else {
553 chandransh 21774
          setScx((ShoppingCartException)value);
48 ashish 21775
        }
21776
        break;
21777
 
21778
      }
21779
    }
21780
 
21781
    public void setFieldValue(int fieldID, Object value) {
21782
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21783
    }
21784
 
21785
    public Object getFieldValue(_Fields field) {
21786
      switch (field) {
21787
      case SUCCESS:
553 chandransh 21788
        return getSuccess();
48 ashish 21789
 
553 chandransh 21790
      case SCX:
21791
        return getScx();
48 ashish 21792
 
21793
      }
21794
      throw new IllegalStateException();
21795
    }
21796
 
21797
    public Object getFieldValue(int fieldId) {
21798
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21799
    }
21800
 
21801
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21802
    public boolean isSet(_Fields field) {
21803
      switch (field) {
21804
      case SUCCESS:
21805
        return isSetSuccess();
553 chandransh 21806
      case SCX:
21807
        return isSetScx();
48 ashish 21808
      }
21809
      throw new IllegalStateException();
21810
    }
21811
 
21812
    public boolean isSet(int fieldID) {
21813
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21814
    }
21815
 
21816
    @Override
21817
    public boolean equals(Object that) {
21818
      if (that == null)
21819
        return false;
553 chandransh 21820
      if (that instanceof getCartsByTime_result)
21821
        return this.equals((getCartsByTime_result)that);
48 ashish 21822
      return false;
21823
    }
21824
 
553 chandransh 21825
    public boolean equals(getCartsByTime_result that) {
48 ashish 21826
      if (that == null)
21827
        return false;
21828
 
553 chandransh 21829
      boolean this_present_success = true && this.isSetSuccess();
21830
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 21831
      if (this_present_success || that_present_success) {
21832
        if (!(this_present_success && that_present_success))
21833
          return false;
553 chandransh 21834
        if (!this.success.equals(that.success))
48 ashish 21835
          return false;
21836
      }
21837
 
553 chandransh 21838
      boolean this_present_scx = true && this.isSetScx();
21839
      boolean that_present_scx = true && that.isSetScx();
21840
      if (this_present_scx || that_present_scx) {
21841
        if (!(this_present_scx && that_present_scx))
48 ashish 21842
          return false;
553 chandransh 21843
        if (!this.scx.equals(that.scx))
48 ashish 21844
          return false;
21845
      }
21846
 
21847
      return true;
21848
    }
21849
 
21850
    @Override
21851
    public int hashCode() {
21852
      return 0;
21853
    }
21854
 
553 chandransh 21855
    public int compareTo(getCartsByTime_result other) {
48 ashish 21856
      if (!getClass().equals(other.getClass())) {
21857
        return getClass().getName().compareTo(other.getClass().getName());
21858
      }
21859
 
21860
      int lastComparison = 0;
553 chandransh 21861
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 21862
 
21863
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21864
      if (lastComparison != 0) {
21865
        return lastComparison;
21866
      }
21867
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21868
      if (lastComparison != 0) {
21869
        return lastComparison;
21870
      }
553 chandransh 21871
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 21872
      if (lastComparison != 0) {
21873
        return lastComparison;
21874
      }
553 chandransh 21875
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 21876
      if (lastComparison != 0) {
21877
        return lastComparison;
21878
      }
21879
      return 0;
21880
    }
21881
 
21882
    public void read(TProtocol iprot) throws TException {
21883
      TField field;
21884
      iprot.readStructBegin();
21885
      while (true)
21886
      {
21887
        field = iprot.readFieldBegin();
21888
        if (field.type == TType.STOP) { 
21889
          break;
21890
        }
21891
        _Fields fieldId = _Fields.findByThriftId(field.id);
21892
        if (fieldId == null) {
21893
          TProtocolUtil.skip(iprot, field.type);
21894
        } else {
21895
          switch (fieldId) {
21896
            case SUCCESS:
553 chandransh 21897
              if (field.type == TType.LIST) {
21898
                {
771 rajveer 21899
                  TList _list28 = iprot.readListBegin();
21900
                  this.success = new ArrayList<Cart>(_list28.size);
21901
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
553 chandransh 21902
                  {
771 rajveer 21903
                    Cart _elem30;
21904
                    _elem30 = new Cart();
21905
                    _elem30.read(iprot);
21906
                    this.success.add(_elem30);
553 chandransh 21907
                  }
21908
                  iprot.readListEnd();
21909
                }
48 ashish 21910
              } else { 
21911
                TProtocolUtil.skip(iprot, field.type);
21912
              }
21913
              break;
553 chandransh 21914
            case SCX:
48 ashish 21915
              if (field.type == TType.STRUCT) {
553 chandransh 21916
                this.scx = new ShoppingCartException();
21917
                this.scx.read(iprot);
48 ashish 21918
              } else { 
21919
                TProtocolUtil.skip(iprot, field.type);
21920
              }
21921
              break;
21922
          }
21923
          iprot.readFieldEnd();
21924
        }
21925
      }
21926
      iprot.readStructEnd();
21927
      validate();
21928
    }
21929
 
21930
    public void write(TProtocol oprot) throws TException {
21931
      oprot.writeStructBegin(STRUCT_DESC);
21932
 
21933
      if (this.isSetSuccess()) {
21934
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 21935
        {
21936
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 21937
          for (Cart _iter31 : this.success)
553 chandransh 21938
          {
771 rajveer 21939
            _iter31.write(oprot);
553 chandransh 21940
          }
21941
          oprot.writeListEnd();
21942
        }
48 ashish 21943
        oprot.writeFieldEnd();
553 chandransh 21944
      } else if (this.isSetScx()) {
21945
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21946
        this.scx.write(oprot);
48 ashish 21947
        oprot.writeFieldEnd();
21948
      }
21949
      oprot.writeFieldStop();
21950
      oprot.writeStructEnd();
21951
    }
21952
 
21953
    @Override
21954
    public String toString() {
553 chandransh 21955
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 21956
      boolean first = true;
21957
 
21958
      sb.append("success:");
553 chandransh 21959
      if (this.success == null) {
21960
        sb.append("null");
21961
      } else {
21962
        sb.append(this.success);
21963
      }
48 ashish 21964
      first = false;
21965
      if (!first) sb.append(", ");
553 chandransh 21966
      sb.append("scx:");
21967
      if (this.scx == null) {
48 ashish 21968
        sb.append("null");
21969
      } else {
553 chandransh 21970
        sb.append(this.scx);
48 ashish 21971
      }
21972
      first = false;
21973
      sb.append(")");
21974
      return sb.toString();
21975
    }
21976
 
21977
    public void validate() throws TException {
21978
      // check for required fields
21979
    }
21980
 
21981
  }
21982
 
553 chandransh 21983
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
21984
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 21985
 
553 chandransh 21986
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21987
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 21988
 
553 chandransh 21989
    private long cartId;
21990
    private CartStatus status;
48 ashish 21991
 
21992
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21993
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21994
      CART_ID((short)1, "cartId"),
21995
      /**
21996
       * 
21997
       * @see CartStatus
21998
       */
21999
      STATUS((short)2, "status");
48 ashish 22000
 
22001
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22002
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22003
 
22004
      static {
22005
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22006
          byId.put((int)field._thriftId, field);
22007
          byName.put(field.getFieldName(), field);
22008
        }
22009
      }
22010
 
22011
      /**
22012
       * Find the _Fields constant that matches fieldId, or null if its not found.
22013
       */
22014
      public static _Fields findByThriftId(int fieldId) {
22015
        return byId.get(fieldId);
22016
      }
22017
 
22018
      /**
22019
       * Find the _Fields constant that matches fieldId, throwing an exception
22020
       * if it is not found.
22021
       */
22022
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22023
        _Fields fields = findByThriftId(fieldId);
22024
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22025
        return fields;
22026
      }
22027
 
22028
      /**
22029
       * Find the _Fields constant that matches name, or null if its not found.
22030
       */
22031
      public static _Fields findByName(String name) {
22032
        return byName.get(name);
22033
      }
22034
 
22035
      private final short _thriftId;
22036
      private final String _fieldName;
22037
 
22038
      _Fields(short thriftId, String fieldName) {
22039
        _thriftId = thriftId;
22040
        _fieldName = fieldName;
22041
      }
22042
 
22043
      public short getThriftFieldId() {
22044
        return _thriftId;
22045
      }
22046
 
22047
      public String getFieldName() {
22048
        return _fieldName;
22049
      }
22050
    }
22051
 
22052
    // isset id assignments
553 chandransh 22053
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 22054
    private BitSet __isset_bit_vector = new BitSet(1);
22055
 
22056
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 22057
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 22058
          new FieldValueMetaData(TType.I64)));
553 chandransh 22059
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
22060
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 22061
    }});
22062
 
22063
    static {
553 chandransh 22064
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 22065
    }
22066
 
553 chandransh 22067
    public changeCartStatus_args() {
48 ashish 22068
    }
22069
 
553 chandransh 22070
    public changeCartStatus_args(
22071
      long cartId,
22072
      CartStatus status)
48 ashish 22073
    {
22074
      this();
553 chandransh 22075
      this.cartId = cartId;
22076
      setCartIdIsSet(true);
22077
      this.status = status;
48 ashish 22078
    }
22079
 
22080
    /**
22081
     * Performs a deep copy on <i>other</i>.
22082
     */
553 chandransh 22083
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 22084
      __isset_bit_vector.clear();
22085
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22086
      this.cartId = other.cartId;
22087
      if (other.isSetStatus()) {
22088
        this.status = other.status;
22089
      }
48 ashish 22090
    }
22091
 
553 chandransh 22092
    public changeCartStatus_args deepCopy() {
22093
      return new changeCartStatus_args(this);
48 ashish 22094
    }
22095
 
22096
    @Deprecated
553 chandransh 22097
    public changeCartStatus_args clone() {
22098
      return new changeCartStatus_args(this);
48 ashish 22099
    }
22100
 
553 chandransh 22101
    public long getCartId() {
22102
      return this.cartId;
48 ashish 22103
    }
22104
 
553 chandransh 22105
    public changeCartStatus_args setCartId(long cartId) {
22106
      this.cartId = cartId;
22107
      setCartIdIsSet(true);
48 ashish 22108
      return this;
22109
    }
22110
 
553 chandransh 22111
    public void unsetCartId() {
22112
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22113
    }
22114
 
553 chandransh 22115
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22116
    public boolean isSetCartId() {
22117
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22118
    }
22119
 
553 chandransh 22120
    public void setCartIdIsSet(boolean value) {
22121
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22122
    }
22123
 
553 chandransh 22124
    /**
22125
     * 
22126
     * @see CartStatus
22127
     */
22128
    public CartStatus getStatus() {
22129
      return this.status;
22130
    }
22131
 
22132
    /**
22133
     * 
22134
     * @see CartStatus
22135
     */
22136
    public changeCartStatus_args setStatus(CartStatus status) {
22137
      this.status = status;
22138
      return this;
22139
    }
22140
 
22141
    public void unsetStatus() {
22142
      this.status = null;
22143
    }
22144
 
22145
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
22146
    public boolean isSetStatus() {
22147
      return this.status != null;
22148
    }
22149
 
22150
    public void setStatusIsSet(boolean value) {
22151
      if (!value) {
22152
        this.status = null;
22153
      }
22154
    }
22155
 
48 ashish 22156
    public void setFieldValue(_Fields field, Object value) {
22157
      switch (field) {
553 chandransh 22158
      case CART_ID:
48 ashish 22159
        if (value == null) {
553 chandransh 22160
          unsetCartId();
48 ashish 22161
        } else {
553 chandransh 22162
          setCartId((Long)value);
48 ashish 22163
        }
22164
        break;
22165
 
553 chandransh 22166
      case STATUS:
22167
        if (value == null) {
22168
          unsetStatus();
22169
        } else {
22170
          setStatus((CartStatus)value);
22171
        }
22172
        break;
22173
 
48 ashish 22174
      }
22175
    }
22176
 
22177
    public void setFieldValue(int fieldID, Object value) {
22178
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22179
    }
22180
 
22181
    public Object getFieldValue(_Fields field) {
22182
      switch (field) {
553 chandransh 22183
      case CART_ID:
22184
        return new Long(getCartId());
48 ashish 22185
 
553 chandransh 22186
      case STATUS:
22187
        return getStatus();
22188
 
48 ashish 22189
      }
22190
      throw new IllegalStateException();
22191
    }
22192
 
22193
    public Object getFieldValue(int fieldId) {
22194
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22195
    }
22196
 
22197
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22198
    public boolean isSet(_Fields field) {
22199
      switch (field) {
553 chandransh 22200
      case CART_ID:
22201
        return isSetCartId();
22202
      case STATUS:
22203
        return isSetStatus();
48 ashish 22204
      }
22205
      throw new IllegalStateException();
22206
    }
22207
 
22208
    public boolean isSet(int fieldID) {
22209
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22210
    }
22211
 
22212
    @Override
22213
    public boolean equals(Object that) {
22214
      if (that == null)
22215
        return false;
553 chandransh 22216
      if (that instanceof changeCartStatus_args)
22217
        return this.equals((changeCartStatus_args)that);
48 ashish 22218
      return false;
22219
    }
22220
 
553 chandransh 22221
    public boolean equals(changeCartStatus_args that) {
48 ashish 22222
      if (that == null)
22223
        return false;
22224
 
553 chandransh 22225
      boolean this_present_cartId = true;
22226
      boolean that_present_cartId = true;
22227
      if (this_present_cartId || that_present_cartId) {
22228
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22229
          return false;
553 chandransh 22230
        if (this.cartId != that.cartId)
48 ashish 22231
          return false;
22232
      }
22233
 
553 chandransh 22234
      boolean this_present_status = true && this.isSetStatus();
22235
      boolean that_present_status = true && that.isSetStatus();
22236
      if (this_present_status || that_present_status) {
22237
        if (!(this_present_status && that_present_status))
22238
          return false;
22239
        if (!this.status.equals(that.status))
22240
          return false;
22241
      }
22242
 
48 ashish 22243
      return true;
22244
    }
22245
 
22246
    @Override
22247
    public int hashCode() {
22248
      return 0;
22249
    }
22250
 
553 chandransh 22251
    public int compareTo(changeCartStatus_args other) {
48 ashish 22252
      if (!getClass().equals(other.getClass())) {
22253
        return getClass().getName().compareTo(other.getClass().getName());
22254
      }
22255
 
22256
      int lastComparison = 0;
553 chandransh 22257
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 22258
 
553 chandransh 22259
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22260
      if (lastComparison != 0) {
22261
        return lastComparison;
22262
      }
553 chandransh 22263
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22264
      if (lastComparison != 0) {
22265
        return lastComparison;
22266
      }
553 chandransh 22267
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
22268
      if (lastComparison != 0) {
22269
        return lastComparison;
22270
      }
22271
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
22272
      if (lastComparison != 0) {
22273
        return lastComparison;
22274
      }
48 ashish 22275
      return 0;
22276
    }
22277
 
22278
    public void read(TProtocol iprot) throws TException {
22279
      TField field;
22280
      iprot.readStructBegin();
22281
      while (true)
22282
      {
22283
        field = iprot.readFieldBegin();
22284
        if (field.type == TType.STOP) { 
22285
          break;
22286
        }
22287
        _Fields fieldId = _Fields.findByThriftId(field.id);
22288
        if (fieldId == null) {
22289
          TProtocolUtil.skip(iprot, field.type);
22290
        } else {
22291
          switch (fieldId) {
553 chandransh 22292
            case CART_ID:
48 ashish 22293
              if (field.type == TType.I64) {
553 chandransh 22294
                this.cartId = iprot.readI64();
22295
                setCartIdIsSet(true);
48 ashish 22296
              } else { 
22297
                TProtocolUtil.skip(iprot, field.type);
22298
              }
22299
              break;
553 chandransh 22300
            case STATUS:
22301
              if (field.type == TType.I32) {
22302
                this.status = CartStatus.findByValue(iprot.readI32());
22303
              } else { 
22304
                TProtocolUtil.skip(iprot, field.type);
22305
              }
22306
              break;
48 ashish 22307
          }
22308
          iprot.readFieldEnd();
22309
        }
22310
      }
22311
      iprot.readStructEnd();
22312
      validate();
22313
    }
22314
 
22315
    public void write(TProtocol oprot) throws TException {
22316
      validate();
22317
 
22318
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 22319
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22320
      oprot.writeI64(this.cartId);
48 ashish 22321
      oprot.writeFieldEnd();
553 chandransh 22322
      if (this.status != null) {
22323
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
22324
        oprot.writeI32(this.status.getValue());
22325
        oprot.writeFieldEnd();
22326
      }
48 ashish 22327
      oprot.writeFieldStop();
22328
      oprot.writeStructEnd();
22329
    }
22330
 
22331
    @Override
22332
    public String toString() {
553 chandransh 22333
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 22334
      boolean first = true;
22335
 
553 chandransh 22336
      sb.append("cartId:");
22337
      sb.append(this.cartId);
48 ashish 22338
      first = false;
553 chandransh 22339
      if (!first) sb.append(", ");
22340
      sb.append("status:");
22341
      if (this.status == null) {
22342
        sb.append("null");
22343
      } else {
22344
        String status_name = status.name();
22345
        if (status_name != null) {
22346
          sb.append(status_name);
22347
          sb.append(" (");
22348
        }
22349
        sb.append(this.status);
22350
        if (status_name != null) {
22351
          sb.append(")");
22352
        }
22353
      }
22354
      first = false;
48 ashish 22355
      sb.append(")");
22356
      return sb.toString();
22357
    }
22358
 
22359
    public void validate() throws TException {
22360
      // check for required fields
22361
    }
22362
 
22363
  }
22364
 
553 chandransh 22365
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
22366
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 22367
 
553 chandransh 22368
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 22369
 
553 chandransh 22370
    private ShoppingCartException scx;
48 ashish 22371
 
22372
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22373
    public enum _Fields implements TFieldIdEnum {
553 chandransh 22374
      SCX((short)1, "scx");
48 ashish 22375
 
22376
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22377
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22378
 
22379
      static {
22380
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22381
          byId.put((int)field._thriftId, field);
22382
          byName.put(field.getFieldName(), field);
22383
        }
22384
      }
22385
 
22386
      /**
22387
       * Find the _Fields constant that matches fieldId, or null if its not found.
22388
       */
22389
      public static _Fields findByThriftId(int fieldId) {
22390
        return byId.get(fieldId);
22391
      }
22392
 
22393
      /**
22394
       * Find the _Fields constant that matches fieldId, throwing an exception
22395
       * if it is not found.
22396
       */
22397
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22398
        _Fields fields = findByThriftId(fieldId);
22399
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22400
        return fields;
22401
      }
22402
 
22403
      /**
22404
       * Find the _Fields constant that matches name, or null if its not found.
22405
       */
22406
      public static _Fields findByName(String name) {
22407
        return byName.get(name);
22408
      }
22409
 
22410
      private final short _thriftId;
22411
      private final String _fieldName;
22412
 
22413
      _Fields(short thriftId, String fieldName) {
22414
        _thriftId = thriftId;
22415
        _fieldName = fieldName;
22416
      }
22417
 
22418
      public short getThriftFieldId() {
22419
        return _thriftId;
22420
      }
22421
 
22422
      public String getFieldName() {
22423
        return _fieldName;
22424
      }
22425
    }
22426
 
22427
    // isset id assignments
22428
 
22429
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 22430
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 22431
          new FieldValueMetaData(TType.STRUCT)));
22432
    }});
22433
 
22434
    static {
553 chandransh 22435
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 22436
    }
22437
 
553 chandransh 22438
    public changeCartStatus_result() {
48 ashish 22439
    }
22440
 
553 chandransh 22441
    public changeCartStatus_result(
22442
      ShoppingCartException scx)
48 ashish 22443
    {
22444
      this();
553 chandransh 22445
      this.scx = scx;
48 ashish 22446
    }
22447
 
22448
    /**
22449
     * Performs a deep copy on <i>other</i>.
22450
     */
553 chandransh 22451
    public changeCartStatus_result(changeCartStatus_result other) {
22452
      if (other.isSetScx()) {
22453
        this.scx = new ShoppingCartException(other.scx);
22454
      }
22455
    }
22456
 
22457
    public changeCartStatus_result deepCopy() {
22458
      return new changeCartStatus_result(this);
22459
    }
22460
 
22461
    @Deprecated
22462
    public changeCartStatus_result clone() {
22463
      return new changeCartStatus_result(this);
22464
    }
22465
 
22466
    public ShoppingCartException getScx() {
22467
      return this.scx;
22468
    }
22469
 
22470
    public changeCartStatus_result setScx(ShoppingCartException scx) {
22471
      this.scx = scx;
22472
      return this;
22473
    }
22474
 
22475
    public void unsetScx() {
22476
      this.scx = null;
22477
    }
22478
 
22479
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22480
    public boolean isSetScx() {
22481
      return this.scx != null;
22482
    }
22483
 
22484
    public void setScxIsSet(boolean value) {
22485
      if (!value) {
22486
        this.scx = null;
22487
      }
22488
    }
22489
 
22490
    public void setFieldValue(_Fields field, Object value) {
22491
      switch (field) {
22492
      case SCX:
22493
        if (value == null) {
22494
          unsetScx();
22495
        } else {
22496
          setScx((ShoppingCartException)value);
22497
        }
22498
        break;
22499
 
22500
      }
22501
    }
22502
 
22503
    public void setFieldValue(int fieldID, Object value) {
22504
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22505
    }
22506
 
22507
    public Object getFieldValue(_Fields field) {
22508
      switch (field) {
22509
      case SCX:
22510
        return getScx();
22511
 
22512
      }
22513
      throw new IllegalStateException();
22514
    }
22515
 
22516
    public Object getFieldValue(int fieldId) {
22517
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22518
    }
22519
 
22520
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22521
    public boolean isSet(_Fields field) {
22522
      switch (field) {
22523
      case SCX:
22524
        return isSetScx();
22525
      }
22526
      throw new IllegalStateException();
22527
    }
22528
 
22529
    public boolean isSet(int fieldID) {
22530
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22531
    }
22532
 
22533
    @Override
22534
    public boolean equals(Object that) {
22535
      if (that == null)
22536
        return false;
22537
      if (that instanceof changeCartStatus_result)
22538
        return this.equals((changeCartStatus_result)that);
22539
      return false;
22540
    }
22541
 
22542
    public boolean equals(changeCartStatus_result that) {
22543
      if (that == null)
22544
        return false;
22545
 
22546
      boolean this_present_scx = true && this.isSetScx();
22547
      boolean that_present_scx = true && that.isSetScx();
22548
      if (this_present_scx || that_present_scx) {
22549
        if (!(this_present_scx && that_present_scx))
22550
          return false;
22551
        if (!this.scx.equals(that.scx))
22552
          return false;
22553
      }
22554
 
22555
      return true;
22556
    }
22557
 
22558
    @Override
22559
    public int hashCode() {
22560
      return 0;
22561
    }
22562
 
22563
    public int compareTo(changeCartStatus_result other) {
22564
      if (!getClass().equals(other.getClass())) {
22565
        return getClass().getName().compareTo(other.getClass().getName());
22566
      }
22567
 
22568
      int lastComparison = 0;
22569
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
22570
 
22571
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22572
      if (lastComparison != 0) {
22573
        return lastComparison;
22574
      }
22575
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22576
      if (lastComparison != 0) {
22577
        return lastComparison;
22578
      }
22579
      return 0;
22580
    }
22581
 
22582
    public void read(TProtocol iprot) throws TException {
22583
      TField field;
22584
      iprot.readStructBegin();
22585
      while (true)
22586
      {
22587
        field = iprot.readFieldBegin();
22588
        if (field.type == TType.STOP) { 
22589
          break;
22590
        }
22591
        _Fields fieldId = _Fields.findByThriftId(field.id);
22592
        if (fieldId == null) {
22593
          TProtocolUtil.skip(iprot, field.type);
22594
        } else {
22595
          switch (fieldId) {
22596
            case SCX:
22597
              if (field.type == TType.STRUCT) {
22598
                this.scx = new ShoppingCartException();
22599
                this.scx.read(iprot);
22600
              } else { 
22601
                TProtocolUtil.skip(iprot, field.type);
22602
              }
22603
              break;
22604
          }
22605
          iprot.readFieldEnd();
22606
        }
22607
      }
22608
      iprot.readStructEnd();
22609
      validate();
22610
    }
22611
 
22612
    public void write(TProtocol oprot) throws TException {
22613
      oprot.writeStructBegin(STRUCT_DESC);
22614
 
22615
      if (this.isSetScx()) {
22616
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22617
        this.scx.write(oprot);
22618
        oprot.writeFieldEnd();
22619
      }
22620
      oprot.writeFieldStop();
22621
      oprot.writeStructEnd();
22622
    }
22623
 
22624
    @Override
22625
    public String toString() {
22626
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
22627
      boolean first = true;
22628
 
22629
      sb.append("scx:");
22630
      if (this.scx == null) {
22631
        sb.append("null");
22632
      } else {
22633
        sb.append(this.scx);
22634
      }
22635
      first = false;
22636
      sb.append(")");
22637
      return sb.toString();
22638
    }
22639
 
22640
    public void validate() throws TException {
22641
      // check for required fields
22642
    }
22643
 
22644
  }
22645
 
22646
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
22647
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
22648
 
22649
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22650
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
22651
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
22652
 
22653
    private long cartId;
22654
    private long itemId;
22655
    private long quantity;
22656
 
22657
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22658
    public enum _Fields implements TFieldIdEnum {
22659
      CART_ID((short)1, "cartId"),
22660
      ITEM_ID((short)2, "itemId"),
22661
      QUANTITY((short)3, "quantity");
22662
 
22663
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22664
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22665
 
22666
      static {
22667
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22668
          byId.put((int)field._thriftId, field);
22669
          byName.put(field.getFieldName(), field);
22670
        }
22671
      }
22672
 
22673
      /**
22674
       * Find the _Fields constant that matches fieldId, or null if its not found.
22675
       */
22676
      public static _Fields findByThriftId(int fieldId) {
22677
        return byId.get(fieldId);
22678
      }
22679
 
22680
      /**
22681
       * Find the _Fields constant that matches fieldId, throwing an exception
22682
       * if it is not found.
22683
       */
22684
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22685
        _Fields fields = findByThriftId(fieldId);
22686
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22687
        return fields;
22688
      }
22689
 
22690
      /**
22691
       * Find the _Fields constant that matches name, or null if its not found.
22692
       */
22693
      public static _Fields findByName(String name) {
22694
        return byName.get(name);
22695
      }
22696
 
22697
      private final short _thriftId;
22698
      private final String _fieldName;
22699
 
22700
      _Fields(short thriftId, String fieldName) {
22701
        _thriftId = thriftId;
22702
        _fieldName = fieldName;
22703
      }
22704
 
22705
      public short getThriftFieldId() {
22706
        return _thriftId;
22707
      }
22708
 
22709
      public String getFieldName() {
22710
        return _fieldName;
22711
      }
22712
    }
22713
 
22714
    // isset id assignments
22715
    private static final int __CARTID_ISSET_ID = 0;
22716
    private static final int __ITEMID_ISSET_ID = 1;
22717
    private static final int __QUANTITY_ISSET_ID = 2;
22718
    private BitSet __isset_bit_vector = new BitSet(3);
22719
 
22720
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22721
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22722
          new FieldValueMetaData(TType.I64)));
22723
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22724
          new FieldValueMetaData(TType.I64)));
22725
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
22726
          new FieldValueMetaData(TType.I64)));
22727
    }});
22728
 
22729
    static {
22730
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
22731
    }
22732
 
22733
    public addItemToCart_args() {
22734
    }
22735
 
22736
    public addItemToCart_args(
22737
      long cartId,
22738
      long itemId,
22739
      long quantity)
22740
    {
22741
      this();
22742
      this.cartId = cartId;
22743
      setCartIdIsSet(true);
22744
      this.itemId = itemId;
22745
      setItemIdIsSet(true);
22746
      this.quantity = quantity;
22747
      setQuantityIsSet(true);
22748
    }
22749
 
22750
    /**
22751
     * Performs a deep copy on <i>other</i>.
22752
     */
22753
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 22754
      __isset_bit_vector.clear();
22755
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22756
      this.cartId = other.cartId;
22757
      this.itemId = other.itemId;
22758
      this.quantity = other.quantity;
48 ashish 22759
    }
22760
 
553 chandransh 22761
    public addItemToCart_args deepCopy() {
22762
      return new addItemToCart_args(this);
48 ashish 22763
    }
22764
 
22765
    @Deprecated
553 chandransh 22766
    public addItemToCart_args clone() {
22767
      return new addItemToCart_args(this);
48 ashish 22768
    }
22769
 
553 chandransh 22770
    public long getCartId() {
22771
      return this.cartId;
48 ashish 22772
    }
22773
 
553 chandransh 22774
    public addItemToCart_args setCartId(long cartId) {
22775
      this.cartId = cartId;
22776
      setCartIdIsSet(true);
48 ashish 22777
      return this;
22778
    }
22779
 
553 chandransh 22780
    public void unsetCartId() {
22781
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22782
    }
22783
 
553 chandransh 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);
48 ashish 22787
    }
22788
 
553 chandransh 22789
    public void setCartIdIsSet(boolean value) {
22790
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22791
    }
22792
 
553 chandransh 22793
    public long getItemId() {
22794
      return this.itemId;
48 ashish 22795
    }
22796
 
553 chandransh 22797
    public addItemToCart_args setItemId(long itemId) {
22798
      this.itemId = itemId;
22799
      setItemIdIsSet(true);
48 ashish 22800
      return this;
22801
    }
22802
 
553 chandransh 22803
    public void unsetItemId() {
22804
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 22805
    }
22806
 
553 chandransh 22807
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22808
    public boolean isSetItemId() {
22809
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 22810
    }
22811
 
553 chandransh 22812
    public void setItemIdIsSet(boolean value) {
22813
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22814
    }
22815
 
22816
    public long getQuantity() {
22817
      return this.quantity;
22818
    }
22819
 
22820
    public addItemToCart_args setQuantity(long quantity) {
22821
      this.quantity = quantity;
22822
      setQuantityIsSet(true);
22823
      return this;
22824
    }
22825
 
22826
    public void unsetQuantity() {
22827
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
22828
    }
22829
 
22830
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
22831
    public boolean isSetQuantity() {
22832
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
22833
    }
22834
 
22835
    public void setQuantityIsSet(boolean value) {
22836
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
22837
    }
22838
 
22839
    public void setFieldValue(_Fields field, Object value) {
22840
      switch (field) {
22841
      case CART_ID:
22842
        if (value == null) {
22843
          unsetCartId();
22844
        } else {
22845
          setCartId((Long)value);
22846
        }
22847
        break;
22848
 
22849
      case ITEM_ID:
22850
        if (value == null) {
22851
          unsetItemId();
22852
        } else {
22853
          setItemId((Long)value);
22854
        }
22855
        break;
22856
 
22857
      case QUANTITY:
22858
        if (value == null) {
22859
          unsetQuantity();
22860
        } else {
22861
          setQuantity((Long)value);
22862
        }
22863
        break;
22864
 
22865
      }
22866
    }
22867
 
22868
    public void setFieldValue(int fieldID, Object value) {
22869
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22870
    }
22871
 
22872
    public Object getFieldValue(_Fields field) {
22873
      switch (field) {
22874
      case CART_ID:
22875
        return new Long(getCartId());
22876
 
22877
      case ITEM_ID:
22878
        return new Long(getItemId());
22879
 
22880
      case QUANTITY:
22881
        return new Long(getQuantity());
22882
 
22883
      }
22884
      throw new IllegalStateException();
22885
    }
22886
 
22887
    public Object getFieldValue(int fieldId) {
22888
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22889
    }
22890
 
22891
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22892
    public boolean isSet(_Fields field) {
22893
      switch (field) {
22894
      case CART_ID:
22895
        return isSetCartId();
22896
      case ITEM_ID:
22897
        return isSetItemId();
22898
      case QUANTITY:
22899
        return isSetQuantity();
22900
      }
22901
      throw new IllegalStateException();
22902
    }
22903
 
22904
    public boolean isSet(int fieldID) {
22905
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22906
    }
22907
 
22908
    @Override
22909
    public boolean equals(Object that) {
22910
      if (that == null)
22911
        return false;
22912
      if (that instanceof addItemToCart_args)
22913
        return this.equals((addItemToCart_args)that);
22914
      return false;
22915
    }
22916
 
22917
    public boolean equals(addItemToCart_args that) {
22918
      if (that == null)
22919
        return false;
22920
 
22921
      boolean this_present_cartId = true;
22922
      boolean that_present_cartId = true;
22923
      if (this_present_cartId || that_present_cartId) {
22924
        if (!(this_present_cartId && that_present_cartId))
22925
          return false;
22926
        if (this.cartId != that.cartId)
22927
          return false;
22928
      }
22929
 
22930
      boolean this_present_itemId = true;
22931
      boolean that_present_itemId = true;
22932
      if (this_present_itemId || that_present_itemId) {
22933
        if (!(this_present_itemId && that_present_itemId))
22934
          return false;
22935
        if (this.itemId != that.itemId)
22936
          return false;
22937
      }
22938
 
22939
      boolean this_present_quantity = true;
22940
      boolean that_present_quantity = true;
22941
      if (this_present_quantity || that_present_quantity) {
22942
        if (!(this_present_quantity && that_present_quantity))
22943
          return false;
22944
        if (this.quantity != that.quantity)
22945
          return false;
22946
      }
22947
 
22948
      return true;
22949
    }
22950
 
22951
    @Override
22952
    public int hashCode() {
22953
      return 0;
22954
    }
22955
 
22956
    public int compareTo(addItemToCart_args other) {
22957
      if (!getClass().equals(other.getClass())) {
22958
        return getClass().getName().compareTo(other.getClass().getName());
22959
      }
22960
 
22961
      int lastComparison = 0;
22962
      addItemToCart_args typedOther = (addItemToCart_args)other;
22963
 
22964
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
22965
      if (lastComparison != 0) {
22966
        return lastComparison;
22967
      }
22968
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
22969
      if (lastComparison != 0) {
22970
        return lastComparison;
22971
      }
22972
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
22973
      if (lastComparison != 0) {
22974
        return lastComparison;
22975
      }
22976
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
22977
      if (lastComparison != 0) {
22978
        return lastComparison;
22979
      }
22980
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
22981
      if (lastComparison != 0) {
22982
        return lastComparison;
22983
      }
22984
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
22985
      if (lastComparison != 0) {
22986
        return lastComparison;
22987
      }
22988
      return 0;
22989
    }
22990
 
22991
    public void read(TProtocol iprot) throws TException {
22992
      TField field;
22993
      iprot.readStructBegin();
22994
      while (true)
22995
      {
22996
        field = iprot.readFieldBegin();
22997
        if (field.type == TType.STOP) { 
22998
          break;
22999
        }
23000
        _Fields fieldId = _Fields.findByThriftId(field.id);
23001
        if (fieldId == null) {
23002
          TProtocolUtil.skip(iprot, field.type);
23003
        } else {
23004
          switch (fieldId) {
23005
            case CART_ID:
23006
              if (field.type == TType.I64) {
23007
                this.cartId = iprot.readI64();
23008
                setCartIdIsSet(true);
23009
              } else { 
23010
                TProtocolUtil.skip(iprot, field.type);
23011
              }
23012
              break;
23013
            case ITEM_ID:
23014
              if (field.type == TType.I64) {
23015
                this.itemId = iprot.readI64();
23016
                setItemIdIsSet(true);
23017
              } else { 
23018
                TProtocolUtil.skip(iprot, field.type);
23019
              }
23020
              break;
23021
            case QUANTITY:
23022
              if (field.type == TType.I64) {
23023
                this.quantity = iprot.readI64();
23024
                setQuantityIsSet(true);
23025
              } else { 
23026
                TProtocolUtil.skip(iprot, field.type);
23027
              }
23028
              break;
23029
          }
23030
          iprot.readFieldEnd();
23031
        }
23032
      }
23033
      iprot.readStructEnd();
23034
      validate();
23035
    }
23036
 
23037
    public void write(TProtocol oprot) throws TException {
23038
      validate();
23039
 
23040
      oprot.writeStructBegin(STRUCT_DESC);
23041
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23042
      oprot.writeI64(this.cartId);
23043
      oprot.writeFieldEnd();
23044
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
23045
      oprot.writeI64(this.itemId);
23046
      oprot.writeFieldEnd();
23047
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
23048
      oprot.writeI64(this.quantity);
23049
      oprot.writeFieldEnd();
23050
      oprot.writeFieldStop();
23051
      oprot.writeStructEnd();
23052
    }
23053
 
23054
    @Override
23055
    public String toString() {
23056
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
23057
      boolean first = true;
23058
 
23059
      sb.append("cartId:");
23060
      sb.append(this.cartId);
23061
      first = false;
23062
      if (!first) sb.append(", ");
23063
      sb.append("itemId:");
23064
      sb.append(this.itemId);
23065
      first = false;
23066
      if (!first) sb.append(", ");
23067
      sb.append("quantity:");
23068
      sb.append(this.quantity);
23069
      first = false;
23070
      sb.append(")");
23071
      return sb.toString();
23072
    }
23073
 
23074
    public void validate() throws TException {
23075
      // check for required fields
23076
    }
23077
 
23078
  }
23079
 
23080
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
23081
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
23082
 
23083
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
23084
 
23085
    private ShoppingCartException scx;
23086
 
23087
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23088
    public enum _Fields implements TFieldIdEnum {
23089
      SCX((short)1, "scx");
23090
 
23091
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23092
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23093
 
23094
      static {
23095
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23096
          byId.put((int)field._thriftId, field);
23097
          byName.put(field.getFieldName(), field);
23098
        }
23099
      }
23100
 
23101
      /**
23102
       * Find the _Fields constant that matches fieldId, or null if its not found.
23103
       */
23104
      public static _Fields findByThriftId(int fieldId) {
23105
        return byId.get(fieldId);
23106
      }
23107
 
23108
      /**
23109
       * Find the _Fields constant that matches fieldId, throwing an exception
23110
       * if it is not found.
23111
       */
23112
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23113
        _Fields fields = findByThriftId(fieldId);
23114
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23115
        return fields;
23116
      }
23117
 
23118
      /**
23119
       * Find the _Fields constant that matches name, or null if its not found.
23120
       */
23121
      public static _Fields findByName(String name) {
23122
        return byName.get(name);
23123
      }
23124
 
23125
      private final short _thriftId;
23126
      private final String _fieldName;
23127
 
23128
      _Fields(short thriftId, String fieldName) {
23129
        _thriftId = thriftId;
23130
        _fieldName = fieldName;
23131
      }
23132
 
23133
      public short getThriftFieldId() {
23134
        return _thriftId;
23135
      }
23136
 
23137
      public String getFieldName() {
23138
        return _fieldName;
23139
      }
23140
    }
23141
 
23142
    // isset id assignments
23143
 
23144
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23145
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23146
          new FieldValueMetaData(TType.STRUCT)));
23147
    }});
23148
 
23149
    static {
23150
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
23151
    }
23152
 
23153
    public addItemToCart_result() {
23154
    }
23155
 
23156
    public addItemToCart_result(
23157
      ShoppingCartException scx)
23158
    {
23159
      this();
23160
      this.scx = scx;
23161
    }
23162
 
23163
    /**
23164
     * Performs a deep copy on <i>other</i>.
23165
     */
23166
    public addItemToCart_result(addItemToCart_result other) {
23167
      if (other.isSetScx()) {
23168
        this.scx = new ShoppingCartException(other.scx);
23169
      }
23170
    }
23171
 
23172
    public addItemToCart_result deepCopy() {
23173
      return new addItemToCart_result(this);
23174
    }
23175
 
23176
    @Deprecated
23177
    public addItemToCart_result clone() {
23178
      return new addItemToCart_result(this);
23179
    }
23180
 
23181
    public ShoppingCartException getScx() {
23182
      return this.scx;
23183
    }
23184
 
23185
    public addItemToCart_result setScx(ShoppingCartException scx) {
23186
      this.scx = scx;
23187
      return this;
23188
    }
23189
 
23190
    public void unsetScx() {
23191
      this.scx = null;
23192
    }
23193
 
23194
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23195
    public boolean isSetScx() {
23196
      return this.scx != null;
23197
    }
23198
 
23199
    public void setScxIsSet(boolean value) {
48 ashish 23200
      if (!value) {
553 chandransh 23201
        this.scx = null;
48 ashish 23202
      }
23203
    }
23204
 
23205
    public void setFieldValue(_Fields field, Object value) {
23206
      switch (field) {
553 chandransh 23207
      case SCX:
48 ashish 23208
        if (value == null) {
553 chandransh 23209
          unsetScx();
48 ashish 23210
        } else {
553 chandransh 23211
          setScx((ShoppingCartException)value);
48 ashish 23212
        }
23213
        break;
23214
 
553 chandransh 23215
      }
23216
    }
23217
 
23218
    public void setFieldValue(int fieldID, Object value) {
23219
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23220
    }
23221
 
23222
    public Object getFieldValue(_Fields field) {
23223
      switch (field) {
23224
      case SCX:
23225
        return getScx();
23226
 
23227
      }
23228
      throw new IllegalStateException();
23229
    }
23230
 
23231
    public Object getFieldValue(int fieldId) {
23232
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23233
    }
23234
 
23235
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23236
    public boolean isSet(_Fields field) {
23237
      switch (field) {
23238
      case SCX:
23239
        return isSetScx();
23240
      }
23241
      throw new IllegalStateException();
23242
    }
23243
 
23244
    public boolean isSet(int fieldID) {
23245
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23246
    }
23247
 
23248
    @Override
23249
    public boolean equals(Object that) {
23250
      if (that == null)
23251
        return false;
23252
      if (that instanceof addItemToCart_result)
23253
        return this.equals((addItemToCart_result)that);
23254
      return false;
23255
    }
23256
 
23257
    public boolean equals(addItemToCart_result that) {
23258
      if (that == null)
23259
        return false;
23260
 
23261
      boolean this_present_scx = true && this.isSetScx();
23262
      boolean that_present_scx = true && that.isSetScx();
23263
      if (this_present_scx || that_present_scx) {
23264
        if (!(this_present_scx && that_present_scx))
23265
          return false;
23266
        if (!this.scx.equals(that.scx))
23267
          return false;
23268
      }
23269
 
23270
      return true;
23271
    }
23272
 
23273
    @Override
23274
    public int hashCode() {
23275
      return 0;
23276
    }
23277
 
23278
    public int compareTo(addItemToCart_result other) {
23279
      if (!getClass().equals(other.getClass())) {
23280
        return getClass().getName().compareTo(other.getClass().getName());
23281
      }
23282
 
23283
      int lastComparison = 0;
23284
      addItemToCart_result typedOther = (addItemToCart_result)other;
23285
 
23286
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23287
      if (lastComparison != 0) {
23288
        return lastComparison;
23289
      }
23290
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23291
      if (lastComparison != 0) {
23292
        return lastComparison;
23293
      }
23294
      return 0;
23295
    }
23296
 
23297
    public void read(TProtocol iprot) throws TException {
23298
      TField field;
23299
      iprot.readStructBegin();
23300
      while (true)
23301
      {
23302
        field = iprot.readFieldBegin();
23303
        if (field.type == TType.STOP) { 
23304
          break;
23305
        }
23306
        _Fields fieldId = _Fields.findByThriftId(field.id);
23307
        if (fieldId == null) {
23308
          TProtocolUtil.skip(iprot, field.type);
23309
        } else {
23310
          switch (fieldId) {
23311
            case SCX:
23312
              if (field.type == TType.STRUCT) {
23313
                this.scx = new ShoppingCartException();
23314
                this.scx.read(iprot);
23315
              } else { 
23316
                TProtocolUtil.skip(iprot, field.type);
23317
              }
23318
              break;
23319
          }
23320
          iprot.readFieldEnd();
23321
        }
23322
      }
23323
      iprot.readStructEnd();
23324
      validate();
23325
    }
23326
 
23327
    public void write(TProtocol oprot) throws TException {
23328
      oprot.writeStructBegin(STRUCT_DESC);
23329
 
23330
      if (this.isSetScx()) {
23331
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23332
        this.scx.write(oprot);
23333
        oprot.writeFieldEnd();
23334
      }
23335
      oprot.writeFieldStop();
23336
      oprot.writeStructEnd();
23337
    }
23338
 
23339
    @Override
23340
    public String toString() {
23341
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
23342
      boolean first = true;
23343
 
23344
      sb.append("scx:");
23345
      if (this.scx == null) {
23346
        sb.append("null");
23347
      } else {
23348
        sb.append(this.scx);
23349
      }
23350
      first = false;
23351
      sb.append(")");
23352
      return sb.toString();
23353
    }
23354
 
23355
    public void validate() throws TException {
23356
      // check for required fields
23357
    }
23358
 
23359
  }
23360
 
23361
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
23362
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
23363
 
23364
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23365
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
23366
 
23367
    private long cartId;
23368
    private long itemId;
23369
 
23370
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23371
    public enum _Fields implements TFieldIdEnum {
23372
      CART_ID((short)1, "cartId"),
23373
      ITEM_ID((short)2, "itemId");
23374
 
23375
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23376
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23377
 
23378
      static {
23379
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23380
          byId.put((int)field._thriftId, field);
23381
          byName.put(field.getFieldName(), field);
23382
        }
23383
      }
23384
 
23385
      /**
23386
       * Find the _Fields constant that matches fieldId, or null if its not found.
23387
       */
23388
      public static _Fields findByThriftId(int fieldId) {
23389
        return byId.get(fieldId);
23390
      }
23391
 
23392
      /**
23393
       * Find the _Fields constant that matches fieldId, throwing an exception
23394
       * if it is not found.
23395
       */
23396
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23397
        _Fields fields = findByThriftId(fieldId);
23398
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23399
        return fields;
23400
      }
23401
 
23402
      /**
23403
       * Find the _Fields constant that matches name, or null if its not found.
23404
       */
23405
      public static _Fields findByName(String name) {
23406
        return byName.get(name);
23407
      }
23408
 
23409
      private final short _thriftId;
23410
      private final String _fieldName;
23411
 
23412
      _Fields(short thriftId, String fieldName) {
23413
        _thriftId = thriftId;
23414
        _fieldName = fieldName;
23415
      }
23416
 
23417
      public short getThriftFieldId() {
23418
        return _thriftId;
23419
      }
23420
 
23421
      public String getFieldName() {
23422
        return _fieldName;
23423
      }
23424
    }
23425
 
23426
    // isset id assignments
23427
    private static final int __CARTID_ISSET_ID = 0;
23428
    private static final int __ITEMID_ISSET_ID = 1;
23429
    private BitSet __isset_bit_vector = new BitSet(2);
23430
 
23431
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23432
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
23433
          new FieldValueMetaData(TType.I64)));
23434
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
23435
          new FieldValueMetaData(TType.I64)));
23436
    }});
23437
 
23438
    static {
23439
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
23440
    }
23441
 
23442
    public deleteItemFromCart_args() {
23443
    }
23444
 
23445
    public deleteItemFromCart_args(
23446
      long cartId,
23447
      long itemId)
23448
    {
23449
      this();
23450
      this.cartId = cartId;
23451
      setCartIdIsSet(true);
23452
      this.itemId = itemId;
23453
      setItemIdIsSet(true);
23454
    }
23455
 
23456
    /**
23457
     * Performs a deep copy on <i>other</i>.
23458
     */
23459
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
23460
      __isset_bit_vector.clear();
23461
      __isset_bit_vector.or(other.__isset_bit_vector);
23462
      this.cartId = other.cartId;
23463
      this.itemId = other.itemId;
23464
    }
23465
 
23466
    public deleteItemFromCart_args deepCopy() {
23467
      return new deleteItemFromCart_args(this);
23468
    }
23469
 
23470
    @Deprecated
23471
    public deleteItemFromCart_args clone() {
23472
      return new deleteItemFromCart_args(this);
23473
    }
23474
 
23475
    public long getCartId() {
23476
      return this.cartId;
23477
    }
23478
 
23479
    public deleteItemFromCart_args setCartId(long cartId) {
23480
      this.cartId = cartId;
23481
      setCartIdIsSet(true);
23482
      return this;
23483
    }
23484
 
23485
    public void unsetCartId() {
23486
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
23487
    }
23488
 
23489
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23490
    public boolean isSetCartId() {
23491
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
23492
    }
23493
 
23494
    public void setCartIdIsSet(boolean value) {
23495
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
23496
    }
23497
 
23498
    public long getItemId() {
23499
      return this.itemId;
23500
    }
23501
 
23502
    public deleteItemFromCart_args setItemId(long itemId) {
23503
      this.itemId = itemId;
23504
      setItemIdIsSet(true);
23505
      return this;
23506
    }
23507
 
23508
    public void unsetItemId() {
23509
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
23510
    }
23511
 
23512
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
23513
    public boolean isSetItemId() {
23514
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
23515
    }
23516
 
23517
    public void setItemIdIsSet(boolean value) {
23518
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
23519
    }
23520
 
23521
    public void setFieldValue(_Fields field, Object value) {
23522
      switch (field) {
23523
      case CART_ID:
48 ashish 23524
        if (value == null) {
553 chandransh 23525
          unsetCartId();
48 ashish 23526
        } else {
553 chandransh 23527
          setCartId((Long)value);
48 ashish 23528
        }
23529
        break;
23530
 
553 chandransh 23531
      case ITEM_ID:
23532
        if (value == null) {
23533
          unsetItemId();
23534
        } else {
23535
          setItemId((Long)value);
23536
        }
23537
        break;
23538
 
48 ashish 23539
      }
23540
    }
23541
 
23542
    public void setFieldValue(int fieldID, Object value) {
23543
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23544
    }
23545
 
23546
    public Object getFieldValue(_Fields field) {
23547
      switch (field) {
553 chandransh 23548
      case CART_ID:
23549
        return new Long(getCartId());
48 ashish 23550
 
553 chandransh 23551
      case ITEM_ID:
23552
        return new Long(getItemId());
48 ashish 23553
 
23554
      }
23555
      throw new IllegalStateException();
23556
    }
23557
 
23558
    public Object getFieldValue(int fieldId) {
23559
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23560
    }
23561
 
23562
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23563
    public boolean isSet(_Fields field) {
23564
      switch (field) {
553 chandransh 23565
      case CART_ID:
23566
        return isSetCartId();
23567
      case ITEM_ID:
23568
        return isSetItemId();
48 ashish 23569
      }
23570
      throw new IllegalStateException();
23571
    }
23572
 
23573
    public boolean isSet(int fieldID) {
23574
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23575
    }
23576
 
23577
    @Override
23578
    public boolean equals(Object that) {
23579
      if (that == null)
23580
        return false;
553 chandransh 23581
      if (that instanceof deleteItemFromCart_args)
23582
        return this.equals((deleteItemFromCart_args)that);
48 ashish 23583
      return false;
23584
    }
23585
 
553 chandransh 23586
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 23587
      if (that == null)
23588
        return false;
23589
 
553 chandransh 23590
      boolean this_present_cartId = true;
23591
      boolean that_present_cartId = true;
23592
      if (this_present_cartId || that_present_cartId) {
23593
        if (!(this_present_cartId && that_present_cartId))
48 ashish 23594
          return false;
553 chandransh 23595
        if (this.cartId != that.cartId)
48 ashish 23596
          return false;
23597
      }
23598
 
553 chandransh 23599
      boolean this_present_itemId = true;
23600
      boolean that_present_itemId = true;
23601
      if (this_present_itemId || that_present_itemId) {
23602
        if (!(this_present_itemId && that_present_itemId))
48 ashish 23603
          return false;
553 chandransh 23604
        if (this.itemId != that.itemId)
48 ashish 23605
          return false;
23606
      }
23607
 
23608
      return true;
23609
    }
23610
 
23611
    @Override
23612
    public int hashCode() {
23613
      return 0;
23614
    }
23615
 
553 chandransh 23616
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 23617
      if (!getClass().equals(other.getClass())) {
23618
        return getClass().getName().compareTo(other.getClass().getName());
23619
      }
23620
 
23621
      int lastComparison = 0;
553 chandransh 23622
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 23623
 
553 chandransh 23624
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 23625
      if (lastComparison != 0) {
23626
        return lastComparison;
23627
      }
553 chandransh 23628
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 23629
      if (lastComparison != 0) {
23630
        return lastComparison;
23631
      }
553 chandransh 23632
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 23633
      if (lastComparison != 0) {
23634
        return lastComparison;
23635
      }
553 chandransh 23636
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 23637
      if (lastComparison != 0) {
23638
        return lastComparison;
23639
      }
23640
      return 0;
23641
    }
23642
 
23643
    public void read(TProtocol iprot) throws TException {
23644
      TField field;
23645
      iprot.readStructBegin();
23646
      while (true)
23647
      {
23648
        field = iprot.readFieldBegin();
23649
        if (field.type == TType.STOP) { 
23650
          break;
23651
        }
23652
        _Fields fieldId = _Fields.findByThriftId(field.id);
23653
        if (fieldId == null) {
23654
          TProtocolUtil.skip(iprot, field.type);
23655
        } else {
23656
          switch (fieldId) {
553 chandransh 23657
            case CART_ID:
23658
              if (field.type == TType.I64) {
23659
                this.cartId = iprot.readI64();
23660
                setCartIdIsSet(true);
48 ashish 23661
              } else { 
23662
                TProtocolUtil.skip(iprot, field.type);
23663
              }
23664
              break;
553 chandransh 23665
            case ITEM_ID:
23666
              if (field.type == TType.I64) {
23667
                this.itemId = iprot.readI64();
23668
                setItemIdIsSet(true);
23669
              } else { 
23670
                TProtocolUtil.skip(iprot, field.type);
23671
              }
23672
              break;
23673
          }
23674
          iprot.readFieldEnd();
23675
        }
23676
      }
23677
      iprot.readStructEnd();
23678
      validate();
23679
    }
23680
 
23681
    public void write(TProtocol oprot) throws TException {
23682
      validate();
23683
 
23684
      oprot.writeStructBegin(STRUCT_DESC);
23685
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23686
      oprot.writeI64(this.cartId);
23687
      oprot.writeFieldEnd();
23688
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
23689
      oprot.writeI64(this.itemId);
23690
      oprot.writeFieldEnd();
23691
      oprot.writeFieldStop();
23692
      oprot.writeStructEnd();
23693
    }
23694
 
23695
    @Override
23696
    public String toString() {
23697
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
23698
      boolean first = true;
23699
 
23700
      sb.append("cartId:");
23701
      sb.append(this.cartId);
23702
      first = false;
23703
      if (!first) sb.append(", ");
23704
      sb.append("itemId:");
23705
      sb.append(this.itemId);
23706
      first = false;
23707
      sb.append(")");
23708
      return sb.toString();
23709
    }
23710
 
23711
    public void validate() throws TException {
23712
      // check for required fields
23713
    }
23714
 
23715
  }
23716
 
23717
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
23718
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
23719
 
23720
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
23721
 
23722
    private ShoppingCartException scx;
23723
 
23724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23725
    public enum _Fields implements TFieldIdEnum {
23726
      SCX((short)1, "scx");
23727
 
23728
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23729
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23730
 
23731
      static {
23732
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23733
          byId.put((int)field._thriftId, field);
23734
          byName.put(field.getFieldName(), field);
23735
        }
23736
      }
23737
 
23738
      /**
23739
       * Find the _Fields constant that matches fieldId, or null if its not found.
23740
       */
23741
      public static _Fields findByThriftId(int fieldId) {
23742
        return byId.get(fieldId);
23743
      }
23744
 
23745
      /**
23746
       * Find the _Fields constant that matches fieldId, throwing an exception
23747
       * if it is not found.
23748
       */
23749
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23750
        _Fields fields = findByThriftId(fieldId);
23751
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23752
        return fields;
23753
      }
23754
 
23755
      /**
23756
       * Find the _Fields constant that matches name, or null if its not found.
23757
       */
23758
      public static _Fields findByName(String name) {
23759
        return byName.get(name);
23760
      }
23761
 
23762
      private final short _thriftId;
23763
      private final String _fieldName;
23764
 
23765
      _Fields(short thriftId, String fieldName) {
23766
        _thriftId = thriftId;
23767
        _fieldName = fieldName;
23768
      }
23769
 
23770
      public short getThriftFieldId() {
23771
        return _thriftId;
23772
      }
23773
 
23774
      public String getFieldName() {
23775
        return _fieldName;
23776
      }
23777
    }
23778
 
23779
    // isset id assignments
23780
 
23781
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23782
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23783
          new FieldValueMetaData(TType.STRUCT)));
23784
    }});
23785
 
23786
    static {
23787
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
23788
    }
23789
 
23790
    public deleteItemFromCart_result() {
23791
    }
23792
 
23793
    public deleteItemFromCart_result(
23794
      ShoppingCartException scx)
23795
    {
23796
      this();
23797
      this.scx = scx;
23798
    }
23799
 
23800
    /**
23801
     * Performs a deep copy on <i>other</i>.
23802
     */
23803
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
23804
      if (other.isSetScx()) {
23805
        this.scx = new ShoppingCartException(other.scx);
23806
      }
23807
    }
23808
 
23809
    public deleteItemFromCart_result deepCopy() {
23810
      return new deleteItemFromCart_result(this);
23811
    }
23812
 
23813
    @Deprecated
23814
    public deleteItemFromCart_result clone() {
23815
      return new deleteItemFromCart_result(this);
23816
    }
23817
 
23818
    public ShoppingCartException getScx() {
23819
      return this.scx;
23820
    }
23821
 
23822
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
23823
      this.scx = scx;
23824
      return this;
23825
    }
23826
 
23827
    public void unsetScx() {
23828
      this.scx = null;
23829
    }
23830
 
23831
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23832
    public boolean isSetScx() {
23833
      return this.scx != null;
23834
    }
23835
 
23836
    public void setScxIsSet(boolean value) {
23837
      if (!value) {
23838
        this.scx = null;
23839
      }
23840
    }
23841
 
23842
    public void setFieldValue(_Fields field, Object value) {
23843
      switch (field) {
23844
      case SCX:
23845
        if (value == null) {
23846
          unsetScx();
23847
        } else {
23848
          setScx((ShoppingCartException)value);
23849
        }
23850
        break;
23851
 
23852
      }
23853
    }
23854
 
23855
    public void setFieldValue(int fieldID, Object value) {
23856
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23857
    }
23858
 
23859
    public Object getFieldValue(_Fields field) {
23860
      switch (field) {
23861
      case SCX:
23862
        return getScx();
23863
 
23864
      }
23865
      throw new IllegalStateException();
23866
    }
23867
 
23868
    public Object getFieldValue(int fieldId) {
23869
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23870
    }
23871
 
23872
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23873
    public boolean isSet(_Fields field) {
23874
      switch (field) {
23875
      case SCX:
23876
        return isSetScx();
23877
      }
23878
      throw new IllegalStateException();
23879
    }
23880
 
23881
    public boolean isSet(int fieldID) {
23882
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23883
    }
23884
 
23885
    @Override
23886
    public boolean equals(Object that) {
23887
      if (that == null)
23888
        return false;
23889
      if (that instanceof deleteItemFromCart_result)
23890
        return this.equals((deleteItemFromCart_result)that);
23891
      return false;
23892
    }
23893
 
23894
    public boolean equals(deleteItemFromCart_result that) {
23895
      if (that == null)
23896
        return false;
23897
 
23898
      boolean this_present_scx = true && this.isSetScx();
23899
      boolean that_present_scx = true && that.isSetScx();
23900
      if (this_present_scx || that_present_scx) {
23901
        if (!(this_present_scx && that_present_scx))
23902
          return false;
23903
        if (!this.scx.equals(that.scx))
23904
          return false;
23905
      }
23906
 
23907
      return true;
23908
    }
23909
 
23910
    @Override
23911
    public int hashCode() {
23912
      return 0;
23913
    }
23914
 
23915
    public int compareTo(deleteItemFromCart_result other) {
23916
      if (!getClass().equals(other.getClass())) {
23917
        return getClass().getName().compareTo(other.getClass().getName());
23918
      }
23919
 
23920
      int lastComparison = 0;
23921
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
23922
 
23923
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23924
      if (lastComparison != 0) {
23925
        return lastComparison;
23926
      }
23927
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23928
      if (lastComparison != 0) {
23929
        return lastComparison;
23930
      }
23931
      return 0;
23932
    }
23933
 
23934
    public void read(TProtocol iprot) throws TException {
23935
      TField field;
23936
      iprot.readStructBegin();
23937
      while (true)
23938
      {
23939
        field = iprot.readFieldBegin();
23940
        if (field.type == TType.STOP) { 
23941
          break;
23942
        }
23943
        _Fields fieldId = _Fields.findByThriftId(field.id);
23944
        if (fieldId == null) {
23945
          TProtocolUtil.skip(iprot, field.type);
23946
        } else {
23947
          switch (fieldId) {
23948
            case SCX:
48 ashish 23949
              if (field.type == TType.STRUCT) {
553 chandransh 23950
                this.scx = new ShoppingCartException();
23951
                this.scx.read(iprot);
48 ashish 23952
              } else { 
23953
                TProtocolUtil.skip(iprot, field.type);
23954
              }
23955
              break;
23956
          }
23957
          iprot.readFieldEnd();
23958
        }
23959
      }
23960
      iprot.readStructEnd();
23961
      validate();
23962
    }
23963
 
23964
    public void write(TProtocol oprot) throws TException {
23965
      oprot.writeStructBegin(STRUCT_DESC);
23966
 
553 chandransh 23967
      if (this.isSetScx()) {
23968
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23969
        this.scx.write(oprot);
48 ashish 23970
        oprot.writeFieldEnd();
23971
      }
23972
      oprot.writeFieldStop();
23973
      oprot.writeStructEnd();
23974
    }
23975
 
23976
    @Override
23977
    public String toString() {
553 chandransh 23978
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 23979
      boolean first = true;
23980
 
553 chandransh 23981
      sb.append("scx:");
23982
      if (this.scx == null) {
48 ashish 23983
        sb.append("null");
23984
      } else {
553 chandransh 23985
        sb.append(this.scx);
48 ashish 23986
      }
23987
      first = false;
23988
      sb.append(")");
23989
      return sb.toString();
23990
    }
23991
 
23992
    public void validate() throws TException {
23993
      // check for required fields
23994
    }
23995
 
23996
  }
23997
 
553 chandransh 23998
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
23999
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 24000
 
553 chandransh 24001
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24002
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
24003
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 24004
 
553 chandransh 24005
    private long cartId;
24006
    private long itemId;
24007
    private long quantity;
48 ashish 24008
 
24009
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24010
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24011
      CART_ID((short)1, "cartId"),
24012
      ITEM_ID((short)2, "itemId"),
24013
      QUANTITY((short)3, "quantity");
48 ashish 24014
 
24015
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24016
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24017
 
24018
      static {
24019
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24020
          byId.put((int)field._thriftId, field);
24021
          byName.put(field.getFieldName(), field);
24022
        }
24023
      }
24024
 
24025
      /**
24026
       * Find the _Fields constant that matches fieldId, or null if its not found.
24027
       */
24028
      public static _Fields findByThriftId(int fieldId) {
24029
        return byId.get(fieldId);
24030
      }
24031
 
24032
      /**
24033
       * Find the _Fields constant that matches fieldId, throwing an exception
24034
       * if it is not found.
24035
       */
24036
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24037
        _Fields fields = findByThriftId(fieldId);
24038
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24039
        return fields;
24040
      }
24041
 
24042
      /**
24043
       * Find the _Fields constant that matches name, or null if its not found.
24044
       */
24045
      public static _Fields findByName(String name) {
24046
        return byName.get(name);
24047
      }
24048
 
24049
      private final short _thriftId;
24050
      private final String _fieldName;
24051
 
24052
      _Fields(short thriftId, String fieldName) {
24053
        _thriftId = thriftId;
24054
        _fieldName = fieldName;
24055
      }
24056
 
24057
      public short getThriftFieldId() {
24058
        return _thriftId;
24059
      }
24060
 
24061
      public String getFieldName() {
24062
        return _fieldName;
24063
      }
24064
    }
24065
 
24066
    // isset id assignments
553 chandransh 24067
    private static final int __CARTID_ISSET_ID = 0;
24068
    private static final int __ITEMID_ISSET_ID = 1;
24069
    private static final int __QUANTITY_ISSET_ID = 2;
24070
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 24071
 
24072
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24073
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 24074
          new FieldValueMetaData(TType.I64)));
553 chandransh 24075
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
24076
          new FieldValueMetaData(TType.I64)));
24077
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
24078
          new FieldValueMetaData(TType.I64)));
48 ashish 24079
    }});
24080
 
24081
    static {
553 chandransh 24082
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 24083
    }
24084
 
553 chandransh 24085
    public changeQuantity_args() {
48 ashish 24086
    }
24087
 
553 chandransh 24088
    public changeQuantity_args(
24089
      long cartId,
24090
      long itemId,
24091
      long quantity)
48 ashish 24092
    {
24093
      this();
553 chandransh 24094
      this.cartId = cartId;
24095
      setCartIdIsSet(true);
24096
      this.itemId = itemId;
24097
      setItemIdIsSet(true);
24098
      this.quantity = quantity;
24099
      setQuantityIsSet(true);
48 ashish 24100
    }
24101
 
24102
    /**
24103
     * Performs a deep copy on <i>other</i>.
24104
     */
553 chandransh 24105
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 24106
      __isset_bit_vector.clear();
24107
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24108
      this.cartId = other.cartId;
24109
      this.itemId = other.itemId;
24110
      this.quantity = other.quantity;
48 ashish 24111
    }
24112
 
553 chandransh 24113
    public changeQuantity_args deepCopy() {
24114
      return new changeQuantity_args(this);
48 ashish 24115
    }
24116
 
24117
    @Deprecated
553 chandransh 24118
    public changeQuantity_args clone() {
24119
      return new changeQuantity_args(this);
48 ashish 24120
    }
24121
 
553 chandransh 24122
    public long getCartId() {
24123
      return this.cartId;
48 ashish 24124
    }
24125
 
553 chandransh 24126
    public changeQuantity_args setCartId(long cartId) {
24127
      this.cartId = cartId;
24128
      setCartIdIsSet(true);
48 ashish 24129
      return this;
24130
    }
24131
 
553 chandransh 24132
    public void unsetCartId() {
24133
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24134
    }
24135
 
553 chandransh 24136
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24137
    public boolean isSetCartId() {
24138
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24139
    }
24140
 
553 chandransh 24141
    public void setCartIdIsSet(boolean value) {
24142
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24143
    }
24144
 
553 chandransh 24145
    public long getItemId() {
24146
      return this.itemId;
24147
    }
24148
 
24149
    public changeQuantity_args setItemId(long itemId) {
24150
      this.itemId = itemId;
24151
      setItemIdIsSet(true);
24152
      return this;
24153
    }
24154
 
24155
    public void unsetItemId() {
24156
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
24157
    }
24158
 
24159
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
24160
    public boolean isSetItemId() {
24161
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
24162
    }
24163
 
24164
    public void setItemIdIsSet(boolean value) {
24165
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
24166
    }
24167
 
24168
    public long getQuantity() {
24169
      return this.quantity;
24170
    }
24171
 
24172
    public changeQuantity_args setQuantity(long quantity) {
24173
      this.quantity = quantity;
24174
      setQuantityIsSet(true);
24175
      return this;
24176
    }
24177
 
24178
    public void unsetQuantity() {
24179
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
24180
    }
24181
 
24182
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
24183
    public boolean isSetQuantity() {
24184
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
24185
    }
24186
 
24187
    public void setQuantityIsSet(boolean value) {
24188
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
24189
    }
24190
 
48 ashish 24191
    public void setFieldValue(_Fields field, Object value) {
24192
      switch (field) {
553 chandransh 24193
      case CART_ID:
48 ashish 24194
        if (value == null) {
553 chandransh 24195
          unsetCartId();
48 ashish 24196
        } else {
553 chandransh 24197
          setCartId((Long)value);
48 ashish 24198
        }
24199
        break;
24200
 
553 chandransh 24201
      case ITEM_ID:
24202
        if (value == null) {
24203
          unsetItemId();
24204
        } else {
24205
          setItemId((Long)value);
24206
        }
24207
        break;
24208
 
24209
      case QUANTITY:
24210
        if (value == null) {
24211
          unsetQuantity();
24212
        } else {
24213
          setQuantity((Long)value);
24214
        }
24215
        break;
24216
 
48 ashish 24217
      }
24218
    }
24219
 
24220
    public void setFieldValue(int fieldID, Object value) {
24221
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24222
    }
24223
 
24224
    public Object getFieldValue(_Fields field) {
24225
      switch (field) {
553 chandransh 24226
      case CART_ID:
24227
        return new Long(getCartId());
48 ashish 24228
 
553 chandransh 24229
      case ITEM_ID:
24230
        return new Long(getItemId());
24231
 
24232
      case QUANTITY:
24233
        return new Long(getQuantity());
24234
 
48 ashish 24235
      }
24236
      throw new IllegalStateException();
24237
    }
24238
 
24239
    public Object getFieldValue(int fieldId) {
24240
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24241
    }
24242
 
24243
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24244
    public boolean isSet(_Fields field) {
24245
      switch (field) {
553 chandransh 24246
      case CART_ID:
24247
        return isSetCartId();
24248
      case ITEM_ID:
24249
        return isSetItemId();
24250
      case QUANTITY:
24251
        return isSetQuantity();
48 ashish 24252
      }
24253
      throw new IllegalStateException();
24254
    }
24255
 
24256
    public boolean isSet(int fieldID) {
24257
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24258
    }
24259
 
24260
    @Override
24261
    public boolean equals(Object that) {
24262
      if (that == null)
24263
        return false;
553 chandransh 24264
      if (that instanceof changeQuantity_args)
24265
        return this.equals((changeQuantity_args)that);
48 ashish 24266
      return false;
24267
    }
24268
 
553 chandransh 24269
    public boolean equals(changeQuantity_args that) {
48 ashish 24270
      if (that == null)
24271
        return false;
24272
 
553 chandransh 24273
      boolean this_present_cartId = true;
24274
      boolean that_present_cartId = true;
24275
      if (this_present_cartId || that_present_cartId) {
24276
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24277
          return false;
553 chandransh 24278
        if (this.cartId != that.cartId)
48 ashish 24279
          return false;
24280
      }
24281
 
553 chandransh 24282
      boolean this_present_itemId = true;
24283
      boolean that_present_itemId = true;
24284
      if (this_present_itemId || that_present_itemId) {
24285
        if (!(this_present_itemId && that_present_itemId))
24286
          return false;
24287
        if (this.itemId != that.itemId)
24288
          return false;
24289
      }
24290
 
24291
      boolean this_present_quantity = true;
24292
      boolean that_present_quantity = true;
24293
      if (this_present_quantity || that_present_quantity) {
24294
        if (!(this_present_quantity && that_present_quantity))
24295
          return false;
24296
        if (this.quantity != that.quantity)
24297
          return false;
24298
      }
24299
 
48 ashish 24300
      return true;
24301
    }
24302
 
24303
    @Override
24304
    public int hashCode() {
24305
      return 0;
24306
    }
24307
 
553 chandransh 24308
    public int compareTo(changeQuantity_args other) {
48 ashish 24309
      if (!getClass().equals(other.getClass())) {
24310
        return getClass().getName().compareTo(other.getClass().getName());
24311
      }
24312
 
24313
      int lastComparison = 0;
553 chandransh 24314
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 24315
 
553 chandransh 24316
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24317
      if (lastComparison != 0) {
24318
        return lastComparison;
24319
      }
553 chandransh 24320
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24321
      if (lastComparison != 0) {
24322
        return lastComparison;
24323
      }
553 chandransh 24324
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
24325
      if (lastComparison != 0) {
24326
        return lastComparison;
24327
      }
24328
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
24329
      if (lastComparison != 0) {
24330
        return lastComparison;
24331
      }
24332
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
24333
      if (lastComparison != 0) {
24334
        return lastComparison;
24335
      }
24336
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
24337
      if (lastComparison != 0) {
24338
        return lastComparison;
24339
      }
48 ashish 24340
      return 0;
24341
    }
24342
 
24343
    public void read(TProtocol iprot) throws TException {
24344
      TField field;
24345
      iprot.readStructBegin();
24346
      while (true)
24347
      {
24348
        field = iprot.readFieldBegin();
24349
        if (field.type == TType.STOP) { 
24350
          break;
24351
        }
24352
        _Fields fieldId = _Fields.findByThriftId(field.id);
24353
        if (fieldId == null) {
24354
          TProtocolUtil.skip(iprot, field.type);
24355
        } else {
24356
          switch (fieldId) {
553 chandransh 24357
            case CART_ID:
48 ashish 24358
              if (field.type == TType.I64) {
553 chandransh 24359
                this.cartId = iprot.readI64();
24360
                setCartIdIsSet(true);
48 ashish 24361
              } else { 
24362
                TProtocolUtil.skip(iprot, field.type);
24363
              }
24364
              break;
553 chandransh 24365
            case ITEM_ID:
24366
              if (field.type == TType.I64) {
24367
                this.itemId = iprot.readI64();
24368
                setItemIdIsSet(true);
24369
              } else { 
24370
                TProtocolUtil.skip(iprot, field.type);
24371
              }
24372
              break;
24373
            case QUANTITY:
24374
              if (field.type == TType.I64) {
24375
                this.quantity = iprot.readI64();
24376
                setQuantityIsSet(true);
24377
              } else { 
24378
                TProtocolUtil.skip(iprot, field.type);
24379
              }
24380
              break;
48 ashish 24381
          }
24382
          iprot.readFieldEnd();
24383
        }
24384
      }
24385
      iprot.readStructEnd();
24386
      validate();
24387
    }
24388
 
24389
    public void write(TProtocol oprot) throws TException {
24390
      validate();
24391
 
24392
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24393
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24394
      oprot.writeI64(this.cartId);
48 ashish 24395
      oprot.writeFieldEnd();
553 chandransh 24396
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
24397
      oprot.writeI64(this.itemId);
24398
      oprot.writeFieldEnd();
24399
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
24400
      oprot.writeI64(this.quantity);
24401
      oprot.writeFieldEnd();
48 ashish 24402
      oprot.writeFieldStop();
24403
      oprot.writeStructEnd();
24404
    }
24405
 
24406
    @Override
24407
    public String toString() {
553 chandransh 24408
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 24409
      boolean first = true;
24410
 
553 chandransh 24411
      sb.append("cartId:");
24412
      sb.append(this.cartId);
48 ashish 24413
      first = false;
553 chandransh 24414
      if (!first) sb.append(", ");
24415
      sb.append("itemId:");
24416
      sb.append(this.itemId);
24417
      first = false;
24418
      if (!first) sb.append(", ");
24419
      sb.append("quantity:");
24420
      sb.append(this.quantity);
24421
      first = false;
48 ashish 24422
      sb.append(")");
24423
      return sb.toString();
24424
    }
24425
 
24426
    public void validate() throws TException {
24427
      // check for required fields
24428
    }
24429
 
24430
  }
24431
 
553 chandransh 24432
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
24433
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 24434
 
553 chandransh 24435
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 24436
 
553 chandransh 24437
    private ShoppingCartException scx;
48 ashish 24438
 
24439
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24440
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24441
      SCX((short)1, "scx");
48 ashish 24442
 
24443
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24444
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24445
 
24446
      static {
24447
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24448
          byId.put((int)field._thriftId, field);
24449
          byName.put(field.getFieldName(), field);
24450
        }
24451
      }
24452
 
24453
      /**
24454
       * Find the _Fields constant that matches fieldId, or null if its not found.
24455
       */
24456
      public static _Fields findByThriftId(int fieldId) {
24457
        return byId.get(fieldId);
24458
      }
24459
 
24460
      /**
24461
       * Find the _Fields constant that matches fieldId, throwing an exception
24462
       * if it is not found.
24463
       */
24464
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24465
        _Fields fields = findByThriftId(fieldId);
24466
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24467
        return fields;
24468
      }
24469
 
24470
      /**
24471
       * Find the _Fields constant that matches name, or null if its not found.
24472
       */
24473
      public static _Fields findByName(String name) {
24474
        return byName.get(name);
24475
      }
24476
 
24477
      private final short _thriftId;
24478
      private final String _fieldName;
24479
 
24480
      _Fields(short thriftId, String fieldName) {
24481
        _thriftId = thriftId;
24482
        _fieldName = fieldName;
24483
      }
24484
 
24485
      public short getThriftFieldId() {
24486
        return _thriftId;
24487
      }
24488
 
24489
      public String getFieldName() {
24490
        return _fieldName;
24491
      }
24492
    }
24493
 
24494
    // isset id assignments
24495
 
24496
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 24497
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 24498
          new FieldValueMetaData(TType.STRUCT)));
24499
    }});
24500
 
24501
    static {
553 chandransh 24502
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 24503
    }
24504
 
553 chandransh 24505
    public changeQuantity_result() {
48 ashish 24506
    }
24507
 
553 chandransh 24508
    public changeQuantity_result(
24509
      ShoppingCartException scx)
48 ashish 24510
    {
24511
      this();
553 chandransh 24512
      this.scx = scx;
48 ashish 24513
    }
24514
 
24515
    /**
24516
     * Performs a deep copy on <i>other</i>.
24517
     */
553 chandransh 24518
    public changeQuantity_result(changeQuantity_result other) {
24519
      if (other.isSetScx()) {
24520
        this.scx = new ShoppingCartException(other.scx);
24521
      }
24522
    }
24523
 
24524
    public changeQuantity_result deepCopy() {
24525
      return new changeQuantity_result(this);
24526
    }
24527
 
24528
    @Deprecated
24529
    public changeQuantity_result clone() {
24530
      return new changeQuantity_result(this);
24531
    }
24532
 
24533
    public ShoppingCartException getScx() {
24534
      return this.scx;
24535
    }
24536
 
24537
    public changeQuantity_result setScx(ShoppingCartException scx) {
24538
      this.scx = scx;
24539
      return this;
24540
    }
24541
 
24542
    public void unsetScx() {
24543
      this.scx = null;
24544
    }
24545
 
24546
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24547
    public boolean isSetScx() {
24548
      return this.scx != null;
24549
    }
24550
 
24551
    public void setScxIsSet(boolean value) {
24552
      if (!value) {
24553
        this.scx = null;
24554
      }
24555
    }
24556
 
24557
    public void setFieldValue(_Fields field, Object value) {
24558
      switch (field) {
24559
      case SCX:
24560
        if (value == null) {
24561
          unsetScx();
24562
        } else {
24563
          setScx((ShoppingCartException)value);
24564
        }
24565
        break;
24566
 
24567
      }
24568
    }
24569
 
24570
    public void setFieldValue(int fieldID, Object value) {
24571
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24572
    }
24573
 
24574
    public Object getFieldValue(_Fields field) {
24575
      switch (field) {
24576
      case SCX:
24577
        return getScx();
24578
 
24579
      }
24580
      throw new IllegalStateException();
24581
    }
24582
 
24583
    public Object getFieldValue(int fieldId) {
24584
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24585
    }
24586
 
24587
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24588
    public boolean isSet(_Fields field) {
24589
      switch (field) {
24590
      case SCX:
24591
        return isSetScx();
24592
      }
24593
      throw new IllegalStateException();
24594
    }
24595
 
24596
    public boolean isSet(int fieldID) {
24597
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24598
    }
24599
 
24600
    @Override
24601
    public boolean equals(Object that) {
24602
      if (that == null)
24603
        return false;
24604
      if (that instanceof changeQuantity_result)
24605
        return this.equals((changeQuantity_result)that);
24606
      return false;
24607
    }
24608
 
24609
    public boolean equals(changeQuantity_result that) {
24610
      if (that == null)
24611
        return false;
24612
 
24613
      boolean this_present_scx = true && this.isSetScx();
24614
      boolean that_present_scx = true && that.isSetScx();
24615
      if (this_present_scx || that_present_scx) {
24616
        if (!(this_present_scx && that_present_scx))
24617
          return false;
24618
        if (!this.scx.equals(that.scx))
24619
          return false;
24620
      }
24621
 
24622
      return true;
24623
    }
24624
 
24625
    @Override
24626
    public int hashCode() {
24627
      return 0;
24628
    }
24629
 
24630
    public int compareTo(changeQuantity_result other) {
24631
      if (!getClass().equals(other.getClass())) {
24632
        return getClass().getName().compareTo(other.getClass().getName());
24633
      }
24634
 
24635
      int lastComparison = 0;
24636
      changeQuantity_result typedOther = (changeQuantity_result)other;
24637
 
24638
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24639
      if (lastComparison != 0) {
24640
        return lastComparison;
24641
      }
24642
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24643
      if (lastComparison != 0) {
24644
        return lastComparison;
24645
      }
24646
      return 0;
24647
    }
24648
 
24649
    public void read(TProtocol iprot) throws TException {
24650
      TField field;
24651
      iprot.readStructBegin();
24652
      while (true)
24653
      {
24654
        field = iprot.readFieldBegin();
24655
        if (field.type == TType.STOP) { 
24656
          break;
24657
        }
24658
        _Fields fieldId = _Fields.findByThriftId(field.id);
24659
        if (fieldId == null) {
24660
          TProtocolUtil.skip(iprot, field.type);
24661
        } else {
24662
          switch (fieldId) {
24663
            case SCX:
24664
              if (field.type == TType.STRUCT) {
24665
                this.scx = new ShoppingCartException();
24666
                this.scx.read(iprot);
24667
              } else { 
24668
                TProtocolUtil.skip(iprot, field.type);
24669
              }
24670
              break;
24671
          }
24672
          iprot.readFieldEnd();
24673
        }
24674
      }
24675
      iprot.readStructEnd();
24676
      validate();
24677
    }
24678
 
24679
    public void write(TProtocol oprot) throws TException {
24680
      oprot.writeStructBegin(STRUCT_DESC);
24681
 
24682
      if (this.isSetScx()) {
24683
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24684
        this.scx.write(oprot);
24685
        oprot.writeFieldEnd();
24686
      }
24687
      oprot.writeFieldStop();
24688
      oprot.writeStructEnd();
24689
    }
24690
 
24691
    @Override
24692
    public String toString() {
24693
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
24694
      boolean first = true;
24695
 
24696
      sb.append("scx:");
24697
      if (this.scx == null) {
24698
        sb.append("null");
24699
      } else {
24700
        sb.append(this.scx);
24701
      }
24702
      first = false;
24703
      sb.append(")");
24704
      return sb.toString();
24705
    }
24706
 
24707
    public void validate() throws TException {
24708
      // check for required fields
24709
    }
24710
 
24711
  }
24712
 
24713
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
24714
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
24715
 
24716
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24717
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
24718
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
24719
 
24720
    private long cartId;
24721
    private long itemId;
24722
    private LineStatus status;
24723
 
24724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24725
    public enum _Fields implements TFieldIdEnum {
24726
      CART_ID((short)1, "cartId"),
24727
      ITEM_ID((short)2, "itemId"),
24728
      /**
24729
       * 
24730
       * @see LineStatus
24731
       */
24732
      STATUS((short)3, "status");
24733
 
24734
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24735
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24736
 
24737
      static {
24738
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24739
          byId.put((int)field._thriftId, field);
24740
          byName.put(field.getFieldName(), field);
24741
        }
24742
      }
24743
 
24744
      /**
24745
       * Find the _Fields constant that matches fieldId, or null if its not found.
24746
       */
24747
      public static _Fields findByThriftId(int fieldId) {
24748
        return byId.get(fieldId);
24749
      }
24750
 
24751
      /**
24752
       * Find the _Fields constant that matches fieldId, throwing an exception
24753
       * if it is not found.
24754
       */
24755
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24756
        _Fields fields = findByThriftId(fieldId);
24757
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24758
        return fields;
24759
      }
24760
 
24761
      /**
24762
       * Find the _Fields constant that matches name, or null if its not found.
24763
       */
24764
      public static _Fields findByName(String name) {
24765
        return byName.get(name);
24766
      }
24767
 
24768
      private final short _thriftId;
24769
      private final String _fieldName;
24770
 
24771
      _Fields(short thriftId, String fieldName) {
24772
        _thriftId = thriftId;
24773
        _fieldName = fieldName;
24774
      }
24775
 
24776
      public short getThriftFieldId() {
24777
        return _thriftId;
24778
      }
24779
 
24780
      public String getFieldName() {
24781
        return _fieldName;
24782
      }
24783
    }
24784
 
24785
    // isset id assignments
24786
    private static final int __CARTID_ISSET_ID = 0;
24787
    private static final int __ITEMID_ISSET_ID = 1;
24788
    private BitSet __isset_bit_vector = new BitSet(2);
24789
 
24790
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24791
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
24792
          new FieldValueMetaData(TType.I64)));
24793
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
24794
          new FieldValueMetaData(TType.I64)));
24795
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
24796
          new EnumMetaData(TType.ENUM, LineStatus.class)));
24797
    }});
24798
 
24799
    static {
24800
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
24801
    }
24802
 
24803
    public changeItemStatus_args() {
24804
    }
24805
 
24806
    public changeItemStatus_args(
24807
      long cartId,
24808
      long itemId,
24809
      LineStatus status)
24810
    {
24811
      this();
24812
      this.cartId = cartId;
24813
      setCartIdIsSet(true);
24814
      this.itemId = itemId;
24815
      setItemIdIsSet(true);
24816
      this.status = status;
24817
    }
24818
 
24819
    /**
24820
     * Performs a deep copy on <i>other</i>.
24821
     */
24822
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 24823
      __isset_bit_vector.clear();
24824
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24825
      this.cartId = other.cartId;
24826
      this.itemId = other.itemId;
24827
      if (other.isSetStatus()) {
24828
        this.status = other.status;
48 ashish 24829
      }
24830
    }
24831
 
553 chandransh 24832
    public changeItemStatus_args deepCopy() {
24833
      return new changeItemStatus_args(this);
48 ashish 24834
    }
24835
 
24836
    @Deprecated
553 chandransh 24837
    public changeItemStatus_args clone() {
24838
      return new changeItemStatus_args(this);
48 ashish 24839
    }
24840
 
553 chandransh 24841
    public long getCartId() {
24842
      return this.cartId;
48 ashish 24843
    }
24844
 
553 chandransh 24845
    public changeItemStatus_args setCartId(long cartId) {
24846
      this.cartId = cartId;
24847
      setCartIdIsSet(true);
48 ashish 24848
      return this;
24849
    }
24850
 
553 chandransh 24851
    public void unsetCartId() {
24852
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24853
    }
24854
 
553 chandransh 24855
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24856
    public boolean isSetCartId() {
24857
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24858
    }
24859
 
553 chandransh 24860
    public void setCartIdIsSet(boolean value) {
24861
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24862
    }
24863
 
553 chandransh 24864
    public long getItemId() {
24865
      return this.itemId;
48 ashish 24866
    }
24867
 
553 chandransh 24868
    public changeItemStatus_args setItemId(long itemId) {
24869
      this.itemId = itemId;
24870
      setItemIdIsSet(true);
48 ashish 24871
      return this;
24872
    }
24873
 
553 chandransh 24874
    public void unsetItemId() {
24875
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 24876
    }
24877
 
553 chandransh 24878
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
24879
    public boolean isSetItemId() {
24880
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 24881
    }
24882
 
553 chandransh 24883
    public void setItemIdIsSet(boolean value) {
24884
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
24885
    }
24886
 
24887
    /**
24888
     * 
24889
     * @see LineStatus
24890
     */
24891
    public LineStatus getStatus() {
24892
      return this.status;
24893
    }
24894
 
24895
    /**
24896
     * 
24897
     * @see LineStatus
24898
     */
24899
    public changeItemStatus_args setStatus(LineStatus status) {
24900
      this.status = status;
24901
      return this;
24902
    }
24903
 
24904
    public void unsetStatus() {
24905
      this.status = null;
24906
    }
24907
 
24908
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
24909
    public boolean isSetStatus() {
24910
      return this.status != null;
24911
    }
24912
 
24913
    public void setStatusIsSet(boolean value) {
48 ashish 24914
      if (!value) {
553 chandransh 24915
        this.status = null;
48 ashish 24916
      }
24917
    }
24918
 
24919
    public void setFieldValue(_Fields field, Object value) {
24920
      switch (field) {
553 chandransh 24921
      case CART_ID:
48 ashish 24922
        if (value == null) {
553 chandransh 24923
          unsetCartId();
48 ashish 24924
        } else {
553 chandransh 24925
          setCartId((Long)value);
48 ashish 24926
        }
24927
        break;
24928
 
553 chandransh 24929
      case ITEM_ID:
48 ashish 24930
        if (value == null) {
553 chandransh 24931
          unsetItemId();
48 ashish 24932
        } else {
553 chandransh 24933
          setItemId((Long)value);
48 ashish 24934
        }
24935
        break;
24936
 
553 chandransh 24937
      case STATUS:
24938
        if (value == null) {
24939
          unsetStatus();
24940
        } else {
24941
          setStatus((LineStatus)value);
24942
        }
24943
        break;
24944
 
48 ashish 24945
      }
24946
    }
24947
 
24948
    public void setFieldValue(int fieldID, Object value) {
24949
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24950
    }
24951
 
24952
    public Object getFieldValue(_Fields field) {
24953
      switch (field) {
553 chandransh 24954
      case CART_ID:
24955
        return new Long(getCartId());
48 ashish 24956
 
553 chandransh 24957
      case ITEM_ID:
24958
        return new Long(getItemId());
48 ashish 24959
 
553 chandransh 24960
      case STATUS:
24961
        return getStatus();
24962
 
48 ashish 24963
      }
24964
      throw new IllegalStateException();
24965
    }
24966
 
24967
    public Object getFieldValue(int fieldId) {
24968
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24969
    }
24970
 
24971
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24972
    public boolean isSet(_Fields field) {
24973
      switch (field) {
553 chandransh 24974
      case CART_ID:
24975
        return isSetCartId();
24976
      case ITEM_ID:
24977
        return isSetItemId();
24978
      case STATUS:
24979
        return isSetStatus();
48 ashish 24980
      }
24981
      throw new IllegalStateException();
24982
    }
24983
 
24984
    public boolean isSet(int fieldID) {
24985
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24986
    }
24987
 
24988
    @Override
24989
    public boolean equals(Object that) {
24990
      if (that == null)
24991
        return false;
553 chandransh 24992
      if (that instanceof changeItemStatus_args)
24993
        return this.equals((changeItemStatus_args)that);
48 ashish 24994
      return false;
24995
    }
24996
 
553 chandransh 24997
    public boolean equals(changeItemStatus_args that) {
48 ashish 24998
      if (that == null)
24999
        return false;
25000
 
553 chandransh 25001
      boolean this_present_cartId = true;
25002
      boolean that_present_cartId = true;
25003
      if (this_present_cartId || that_present_cartId) {
25004
        if (!(this_present_cartId && that_present_cartId))
48 ashish 25005
          return false;
553 chandransh 25006
        if (this.cartId != that.cartId)
48 ashish 25007
          return false;
25008
      }
25009
 
553 chandransh 25010
      boolean this_present_itemId = true;
25011
      boolean that_present_itemId = true;
25012
      if (this_present_itemId || that_present_itemId) {
25013
        if (!(this_present_itemId && that_present_itemId))
48 ashish 25014
          return false;
553 chandransh 25015
        if (this.itemId != that.itemId)
48 ashish 25016
          return false;
25017
      }
25018
 
553 chandransh 25019
      boolean this_present_status = true && this.isSetStatus();
25020
      boolean that_present_status = true && that.isSetStatus();
25021
      if (this_present_status || that_present_status) {
25022
        if (!(this_present_status && that_present_status))
25023
          return false;
25024
        if (!this.status.equals(that.status))
25025
          return false;
25026
      }
25027
 
48 ashish 25028
      return true;
25029
    }
25030
 
25031
    @Override
25032
    public int hashCode() {
25033
      return 0;
25034
    }
25035
 
553 chandransh 25036
    public int compareTo(changeItemStatus_args other) {
48 ashish 25037
      if (!getClass().equals(other.getClass())) {
25038
        return getClass().getName().compareTo(other.getClass().getName());
25039
      }
25040
 
25041
      int lastComparison = 0;
553 chandransh 25042
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 25043
 
553 chandransh 25044
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 25045
      if (lastComparison != 0) {
25046
        return lastComparison;
25047
      }
553 chandransh 25048
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 25049
      if (lastComparison != 0) {
25050
        return lastComparison;
25051
      }
553 chandransh 25052
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 25053
      if (lastComparison != 0) {
25054
        return lastComparison;
25055
      }
553 chandransh 25056
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 25057
      if (lastComparison != 0) {
25058
        return lastComparison;
25059
      }
553 chandransh 25060
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
25061
      if (lastComparison != 0) {
25062
        return lastComparison;
25063
      }
25064
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
25065
      if (lastComparison != 0) {
25066
        return lastComparison;
25067
      }
48 ashish 25068
      return 0;
25069
    }
25070
 
25071
    public void read(TProtocol iprot) throws TException {
25072
      TField field;
25073
      iprot.readStructBegin();
25074
      while (true)
25075
      {
25076
        field = iprot.readFieldBegin();
25077
        if (field.type == TType.STOP) { 
25078
          break;
25079
        }
25080
        _Fields fieldId = _Fields.findByThriftId(field.id);
25081
        if (fieldId == null) {
25082
          TProtocolUtil.skip(iprot, field.type);
25083
        } else {
25084
          switch (fieldId) {
553 chandransh 25085
            case CART_ID:
25086
              if (field.type == TType.I64) {
25087
                this.cartId = iprot.readI64();
25088
                setCartIdIsSet(true);
48 ashish 25089
              } else { 
25090
                TProtocolUtil.skip(iprot, field.type);
25091
              }
25092
              break;
553 chandransh 25093
            case ITEM_ID:
25094
              if (field.type == TType.I64) {
25095
                this.itemId = iprot.readI64();
25096
                setItemIdIsSet(true);
48 ashish 25097
              } else { 
25098
                TProtocolUtil.skip(iprot, field.type);
25099
              }
25100
              break;
553 chandransh 25101
            case STATUS:
25102
              if (field.type == TType.I32) {
25103
                this.status = LineStatus.findByValue(iprot.readI32());
25104
              } else { 
25105
                TProtocolUtil.skip(iprot, field.type);
25106
              }
25107
              break;
48 ashish 25108
          }
25109
          iprot.readFieldEnd();
25110
        }
25111
      }
25112
      iprot.readStructEnd();
25113
      validate();
25114
    }
25115
 
25116
    public void write(TProtocol oprot) throws TException {
553 chandransh 25117
      validate();
25118
 
48 ashish 25119
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 25120
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25121
      oprot.writeI64(this.cartId);
25122
      oprot.writeFieldEnd();
25123
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
25124
      oprot.writeI64(this.itemId);
25125
      oprot.writeFieldEnd();
25126
      if (this.status != null) {
25127
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
25128
        oprot.writeI32(this.status.getValue());
48 ashish 25129
        oprot.writeFieldEnd();
25130
      }
25131
      oprot.writeFieldStop();
25132
      oprot.writeStructEnd();
25133
    }
25134
 
25135
    @Override
25136
    public String toString() {
553 chandransh 25137
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 25138
      boolean first = true;
25139
 
553 chandransh 25140
      sb.append("cartId:");
25141
      sb.append(this.cartId);
48 ashish 25142
      first = false;
25143
      if (!first) sb.append(", ");
553 chandransh 25144
      sb.append("itemId:");
25145
      sb.append(this.itemId);
25146
      first = false;
25147
      if (!first) sb.append(", ");
25148
      sb.append("status:");
25149
      if (this.status == null) {
48 ashish 25150
        sb.append("null");
25151
      } else {
553 chandransh 25152
        String status_name = status.name();
25153
        if (status_name != null) {
25154
          sb.append(status_name);
25155
          sb.append(" (");
25156
        }
25157
        sb.append(this.status);
25158
        if (status_name != null) {
25159
          sb.append(")");
25160
        }
48 ashish 25161
      }
25162
      first = false;
25163
      sb.append(")");
25164
      return sb.toString();
25165
    }
25166
 
25167
    public void validate() throws TException {
25168
      // check for required fields
25169
    }
25170
 
25171
  }
25172
 
553 chandransh 25173
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
25174
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 25175
 
553 chandransh 25176
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 25177
 
553 chandransh 25178
    private ShoppingCartException scx;
48 ashish 25179
 
25180
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25181
    public enum _Fields implements TFieldIdEnum {
553 chandransh 25182
      SCX((short)1, "scx");
48 ashish 25183
 
25184
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25185
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25186
 
25187
      static {
25188
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25189
          byId.put((int)field._thriftId, field);
25190
          byName.put(field.getFieldName(), field);
25191
        }
25192
      }
25193
 
25194
      /**
25195
       * Find the _Fields constant that matches fieldId, or null if its not found.
25196
       */
25197
      public static _Fields findByThriftId(int fieldId) {
25198
        return byId.get(fieldId);
25199
      }
25200
 
25201
      /**
25202
       * Find the _Fields constant that matches fieldId, throwing an exception
25203
       * if it is not found.
25204
       */
25205
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25206
        _Fields fields = findByThriftId(fieldId);
25207
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25208
        return fields;
25209
      }
25210
 
25211
      /**
25212
       * Find the _Fields constant that matches name, or null if its not found.
25213
       */
25214
      public static _Fields findByName(String name) {
25215
        return byName.get(name);
25216
      }
25217
 
25218
      private final short _thriftId;
25219
      private final String _fieldName;
25220
 
25221
      _Fields(short thriftId, String fieldName) {
25222
        _thriftId = thriftId;
25223
        _fieldName = fieldName;
25224
      }
25225
 
25226
      public short getThriftFieldId() {
25227
        return _thriftId;
25228
      }
25229
 
25230
      public String getFieldName() {
25231
        return _fieldName;
25232
      }
25233
    }
25234
 
25235
    // isset id assignments
553 chandransh 25236
 
25237
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25238
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25239
          new FieldValueMetaData(TType.STRUCT)));
25240
    }});
25241
 
25242
    static {
25243
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
25244
    }
25245
 
25246
    public changeItemStatus_result() {
25247
    }
25248
 
25249
    public changeItemStatus_result(
25250
      ShoppingCartException scx)
25251
    {
25252
      this();
25253
      this.scx = scx;
25254
    }
25255
 
25256
    /**
25257
     * Performs a deep copy on <i>other</i>.
25258
     */
25259
    public changeItemStatus_result(changeItemStatus_result other) {
25260
      if (other.isSetScx()) {
25261
        this.scx = new ShoppingCartException(other.scx);
25262
      }
25263
    }
25264
 
25265
    public changeItemStatus_result deepCopy() {
25266
      return new changeItemStatus_result(this);
25267
    }
25268
 
25269
    @Deprecated
25270
    public changeItemStatus_result clone() {
25271
      return new changeItemStatus_result(this);
25272
    }
25273
 
25274
    public ShoppingCartException getScx() {
25275
      return this.scx;
25276
    }
25277
 
25278
    public changeItemStatus_result setScx(ShoppingCartException scx) {
25279
      this.scx = scx;
25280
      return this;
25281
    }
25282
 
25283
    public void unsetScx() {
25284
      this.scx = null;
25285
    }
25286
 
25287
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25288
    public boolean isSetScx() {
25289
      return this.scx != null;
25290
    }
25291
 
25292
    public void setScxIsSet(boolean value) {
25293
      if (!value) {
25294
        this.scx = null;
25295
      }
25296
    }
25297
 
25298
    public void setFieldValue(_Fields field, Object value) {
25299
      switch (field) {
25300
      case SCX:
25301
        if (value == null) {
25302
          unsetScx();
25303
        } else {
25304
          setScx((ShoppingCartException)value);
25305
        }
25306
        break;
25307
 
25308
      }
25309
    }
25310
 
25311
    public void setFieldValue(int fieldID, Object value) {
25312
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25313
    }
25314
 
25315
    public Object getFieldValue(_Fields field) {
25316
      switch (field) {
25317
      case SCX:
25318
        return getScx();
25319
 
25320
      }
25321
      throw new IllegalStateException();
25322
    }
25323
 
25324
    public Object getFieldValue(int fieldId) {
25325
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25326
    }
25327
 
25328
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25329
    public boolean isSet(_Fields field) {
25330
      switch (field) {
25331
      case SCX:
25332
        return isSetScx();
25333
      }
25334
      throw new IllegalStateException();
25335
    }
25336
 
25337
    public boolean isSet(int fieldID) {
25338
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25339
    }
25340
 
25341
    @Override
25342
    public boolean equals(Object that) {
25343
      if (that == null)
25344
        return false;
25345
      if (that instanceof changeItemStatus_result)
25346
        return this.equals((changeItemStatus_result)that);
25347
      return false;
25348
    }
25349
 
25350
    public boolean equals(changeItemStatus_result that) {
25351
      if (that == null)
25352
        return false;
25353
 
25354
      boolean this_present_scx = true && this.isSetScx();
25355
      boolean that_present_scx = true && that.isSetScx();
25356
      if (this_present_scx || that_present_scx) {
25357
        if (!(this_present_scx && that_present_scx))
25358
          return false;
25359
        if (!this.scx.equals(that.scx))
25360
          return false;
25361
      }
25362
 
25363
      return true;
25364
    }
25365
 
25366
    @Override
25367
    public int hashCode() {
25368
      return 0;
25369
    }
25370
 
25371
    public int compareTo(changeItemStatus_result other) {
25372
      if (!getClass().equals(other.getClass())) {
25373
        return getClass().getName().compareTo(other.getClass().getName());
25374
      }
25375
 
25376
      int lastComparison = 0;
25377
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
25378
 
25379
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
25380
      if (lastComparison != 0) {
25381
        return lastComparison;
25382
      }
25383
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
25384
      if (lastComparison != 0) {
25385
        return lastComparison;
25386
      }
25387
      return 0;
25388
    }
25389
 
25390
    public void read(TProtocol iprot) throws TException {
25391
      TField field;
25392
      iprot.readStructBegin();
25393
      while (true)
25394
      {
25395
        field = iprot.readFieldBegin();
25396
        if (field.type == TType.STOP) { 
25397
          break;
25398
        }
25399
        _Fields fieldId = _Fields.findByThriftId(field.id);
25400
        if (fieldId == null) {
25401
          TProtocolUtil.skip(iprot, field.type);
25402
        } else {
25403
          switch (fieldId) {
25404
            case SCX:
25405
              if (field.type == TType.STRUCT) {
25406
                this.scx = new ShoppingCartException();
25407
                this.scx.read(iprot);
25408
              } else { 
25409
                TProtocolUtil.skip(iprot, field.type);
25410
              }
25411
              break;
25412
          }
25413
          iprot.readFieldEnd();
25414
        }
25415
      }
25416
      iprot.readStructEnd();
25417
      validate();
25418
    }
25419
 
25420
    public void write(TProtocol oprot) throws TException {
25421
      oprot.writeStructBegin(STRUCT_DESC);
25422
 
25423
      if (this.isSetScx()) {
25424
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25425
        this.scx.write(oprot);
25426
        oprot.writeFieldEnd();
25427
      }
25428
      oprot.writeFieldStop();
25429
      oprot.writeStructEnd();
25430
    }
25431
 
25432
    @Override
25433
    public String toString() {
25434
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
25435
      boolean first = true;
25436
 
25437
      sb.append("scx:");
25438
      if (this.scx == null) {
25439
        sb.append("null");
25440
      } else {
25441
        sb.append(this.scx);
25442
      }
25443
      first = false;
25444
      sb.append(")");
25445
      return sb.toString();
25446
    }
25447
 
25448
    public void validate() throws TException {
25449
      // check for required fields
25450
    }
25451
 
25452
  }
25453
 
25454
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
25455
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
25456
 
25457
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25458
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
25459
 
25460
    private long cartId;
25461
    private long addressId;
25462
 
25463
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25464
    public enum _Fields implements TFieldIdEnum {
25465
      CART_ID((short)1, "cartId"),
25466
      ADDRESS_ID((short)2, "addressId");
25467
 
25468
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25469
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25470
 
25471
      static {
25472
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25473
          byId.put((int)field._thriftId, field);
25474
          byName.put(field.getFieldName(), field);
25475
        }
25476
      }
25477
 
25478
      /**
25479
       * Find the _Fields constant that matches fieldId, or null if its not found.
25480
       */
25481
      public static _Fields findByThriftId(int fieldId) {
25482
        return byId.get(fieldId);
25483
      }
25484
 
25485
      /**
25486
       * Find the _Fields constant that matches fieldId, throwing an exception
25487
       * if it is not found.
25488
       */
25489
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25490
        _Fields fields = findByThriftId(fieldId);
25491
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25492
        return fields;
25493
      }
25494
 
25495
      /**
25496
       * Find the _Fields constant that matches name, or null if its not found.
25497
       */
25498
      public static _Fields findByName(String name) {
25499
        return byName.get(name);
25500
      }
25501
 
25502
      private final short _thriftId;
25503
      private final String _fieldName;
25504
 
25505
      _Fields(short thriftId, String fieldName) {
25506
        _thriftId = thriftId;
25507
        _fieldName = fieldName;
25508
      }
25509
 
25510
      public short getThriftFieldId() {
25511
        return _thriftId;
25512
      }
25513
 
25514
      public String getFieldName() {
25515
        return _fieldName;
25516
      }
25517
    }
25518
 
25519
    // isset id assignments
25520
    private static final int __CARTID_ISSET_ID = 0;
25521
    private static final int __ADDRESSID_ISSET_ID = 1;
25522
    private BitSet __isset_bit_vector = new BitSet(2);
25523
 
25524
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25525
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
25526
          new FieldValueMetaData(TType.I64)));
25527
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
25528
          new FieldValueMetaData(TType.I64)));
25529
    }});
25530
 
25531
    static {
25532
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
25533
    }
25534
 
25535
    public addAddressToCart_args() {
25536
    }
25537
 
25538
    public addAddressToCart_args(
25539
      long cartId,
25540
      long addressId)
25541
    {
25542
      this();
25543
      this.cartId = cartId;
25544
      setCartIdIsSet(true);
25545
      this.addressId = addressId;
25546
      setAddressIdIsSet(true);
25547
    }
25548
 
25549
    /**
25550
     * Performs a deep copy on <i>other</i>.
25551
     */
25552
    public addAddressToCart_args(addAddressToCart_args other) {
25553
      __isset_bit_vector.clear();
25554
      __isset_bit_vector.or(other.__isset_bit_vector);
25555
      this.cartId = other.cartId;
25556
      this.addressId = other.addressId;
25557
    }
25558
 
25559
    public addAddressToCart_args deepCopy() {
25560
      return new addAddressToCart_args(this);
25561
    }
25562
 
25563
    @Deprecated
25564
    public addAddressToCart_args clone() {
25565
      return new addAddressToCart_args(this);
25566
    }
25567
 
25568
    public long getCartId() {
25569
      return this.cartId;
25570
    }
25571
 
25572
    public addAddressToCart_args setCartId(long cartId) {
25573
      this.cartId = cartId;
25574
      setCartIdIsSet(true);
25575
      return this;
25576
    }
25577
 
25578
    public void unsetCartId() {
25579
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
25580
    }
25581
 
25582
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25583
    public boolean isSetCartId() {
25584
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
25585
    }
25586
 
25587
    public void setCartIdIsSet(boolean value) {
25588
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
25589
    }
25590
 
25591
    public long getAddressId() {
25592
      return this.addressId;
25593
    }
25594
 
25595
    public addAddressToCart_args setAddressId(long addressId) {
25596
      this.addressId = addressId;
25597
      setAddressIdIsSet(true);
25598
      return this;
25599
    }
25600
 
25601
    public void unsetAddressId() {
25602
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
25603
    }
25604
 
25605
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
25606
    public boolean isSetAddressId() {
25607
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
25608
    }
25609
 
25610
    public void setAddressIdIsSet(boolean value) {
25611
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
25612
    }
25613
 
25614
    public void setFieldValue(_Fields field, Object value) {
25615
      switch (field) {
25616
      case CART_ID:
25617
        if (value == null) {
25618
          unsetCartId();
25619
        } else {
25620
          setCartId((Long)value);
25621
        }
25622
        break;
25623
 
25624
      case ADDRESS_ID:
25625
        if (value == null) {
25626
          unsetAddressId();
25627
        } else {
25628
          setAddressId((Long)value);
25629
        }
25630
        break;
25631
 
25632
      }
25633
    }
25634
 
25635
    public void setFieldValue(int fieldID, Object value) {
25636
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25637
    }
25638
 
25639
    public Object getFieldValue(_Fields field) {
25640
      switch (field) {
25641
      case CART_ID:
25642
        return new Long(getCartId());
25643
 
25644
      case ADDRESS_ID:
25645
        return new Long(getAddressId());
25646
 
25647
      }
25648
      throw new IllegalStateException();
25649
    }
25650
 
25651
    public Object getFieldValue(int fieldId) {
25652
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25653
    }
25654
 
25655
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25656
    public boolean isSet(_Fields field) {
25657
      switch (field) {
25658
      case CART_ID:
25659
        return isSetCartId();
25660
      case ADDRESS_ID:
25661
        return isSetAddressId();
25662
      }
25663
      throw new IllegalStateException();
25664
    }
25665
 
25666
    public boolean isSet(int fieldID) {
25667
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25668
    }
25669
 
25670
    @Override
25671
    public boolean equals(Object that) {
25672
      if (that == null)
25673
        return false;
25674
      if (that instanceof addAddressToCart_args)
25675
        return this.equals((addAddressToCart_args)that);
25676
      return false;
25677
    }
25678
 
25679
    public boolean equals(addAddressToCart_args that) {
25680
      if (that == null)
25681
        return false;
25682
 
25683
      boolean this_present_cartId = true;
25684
      boolean that_present_cartId = true;
25685
      if (this_present_cartId || that_present_cartId) {
25686
        if (!(this_present_cartId && that_present_cartId))
25687
          return false;
25688
        if (this.cartId != that.cartId)
25689
          return false;
25690
      }
25691
 
25692
      boolean this_present_addressId = true;
25693
      boolean that_present_addressId = true;
25694
      if (this_present_addressId || that_present_addressId) {
25695
        if (!(this_present_addressId && that_present_addressId))
25696
          return false;
25697
        if (this.addressId != that.addressId)
25698
          return false;
25699
      }
25700
 
25701
      return true;
25702
    }
25703
 
25704
    @Override
25705
    public int hashCode() {
25706
      return 0;
25707
    }
25708
 
25709
    public int compareTo(addAddressToCart_args other) {
25710
      if (!getClass().equals(other.getClass())) {
25711
        return getClass().getName().compareTo(other.getClass().getName());
25712
      }
25713
 
25714
      int lastComparison = 0;
25715
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
25716
 
25717
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
25718
      if (lastComparison != 0) {
25719
        return lastComparison;
25720
      }
25721
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
25722
      if (lastComparison != 0) {
25723
        return lastComparison;
25724
      }
25725
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
25726
      if (lastComparison != 0) {
25727
        return lastComparison;
25728
      }
25729
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
25730
      if (lastComparison != 0) {
25731
        return lastComparison;
25732
      }
25733
      return 0;
25734
    }
25735
 
25736
    public void read(TProtocol iprot) throws TException {
25737
      TField field;
25738
      iprot.readStructBegin();
25739
      while (true)
25740
      {
25741
        field = iprot.readFieldBegin();
25742
        if (field.type == TType.STOP) { 
25743
          break;
25744
        }
25745
        _Fields fieldId = _Fields.findByThriftId(field.id);
25746
        if (fieldId == null) {
25747
          TProtocolUtil.skip(iprot, field.type);
25748
        } else {
25749
          switch (fieldId) {
25750
            case CART_ID:
25751
              if (field.type == TType.I64) {
25752
                this.cartId = iprot.readI64();
25753
                setCartIdIsSet(true);
25754
              } else { 
25755
                TProtocolUtil.skip(iprot, field.type);
25756
              }
25757
              break;
25758
            case ADDRESS_ID:
25759
              if (field.type == TType.I64) {
25760
                this.addressId = iprot.readI64();
25761
                setAddressIdIsSet(true);
25762
              } else { 
25763
                TProtocolUtil.skip(iprot, field.type);
25764
              }
25765
              break;
25766
          }
25767
          iprot.readFieldEnd();
25768
        }
25769
      }
25770
      iprot.readStructEnd();
25771
      validate();
25772
    }
25773
 
25774
    public void write(TProtocol oprot) throws TException {
25775
      validate();
25776
 
25777
      oprot.writeStructBegin(STRUCT_DESC);
25778
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25779
      oprot.writeI64(this.cartId);
25780
      oprot.writeFieldEnd();
25781
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
25782
      oprot.writeI64(this.addressId);
25783
      oprot.writeFieldEnd();
25784
      oprot.writeFieldStop();
25785
      oprot.writeStructEnd();
25786
    }
25787
 
25788
    @Override
25789
    public String toString() {
25790
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
25791
      boolean first = true;
25792
 
25793
      sb.append("cartId:");
25794
      sb.append(this.cartId);
25795
      first = false;
25796
      if (!first) sb.append(", ");
25797
      sb.append("addressId:");
25798
      sb.append(this.addressId);
25799
      first = false;
25800
      sb.append(")");
25801
      return sb.toString();
25802
    }
25803
 
25804
    public void validate() throws TException {
25805
      // check for required fields
25806
    }
25807
 
25808
  }
25809
 
25810
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
25811
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
25812
 
578 chandransh 25813
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 25814
 
578 chandransh 25815
    private ShoppingCartException scx;
553 chandransh 25816
 
25817
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25818
    public enum _Fields implements TFieldIdEnum {
578 chandransh 25819
      SCX((short)1, "scx");
553 chandransh 25820
 
25821
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25822
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25823
 
25824
      static {
25825
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25826
          byId.put((int)field._thriftId, field);
25827
          byName.put(field.getFieldName(), field);
25828
        }
25829
      }
25830
 
25831
      /**
25832
       * Find the _Fields constant that matches fieldId, or null if its not found.
25833
       */
25834
      public static _Fields findByThriftId(int fieldId) {
25835
        return byId.get(fieldId);
25836
      }
25837
 
25838
      /**
25839
       * Find the _Fields constant that matches fieldId, throwing an exception
25840
       * if it is not found.
25841
       */
25842
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25843
        _Fields fields = findByThriftId(fieldId);
25844
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25845
        return fields;
25846
      }
25847
 
25848
      /**
25849
       * Find the _Fields constant that matches name, or null if its not found.
25850
       */
25851
      public static _Fields findByName(String name) {
25852
        return byName.get(name);
25853
      }
25854
 
25855
      private final short _thriftId;
25856
      private final String _fieldName;
25857
 
25858
      _Fields(short thriftId, String fieldName) {
25859
        _thriftId = thriftId;
25860
        _fieldName = fieldName;
25861
      }
25862
 
25863
      public short getThriftFieldId() {
25864
        return _thriftId;
25865
      }
25866
 
25867
      public String getFieldName() {
25868
        return _fieldName;
25869
      }
25870
    }
578 chandransh 25871
 
25872
    // isset id assignments
25873
 
553 chandransh 25874
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 25875
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25876
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 25877
    }});
25878
 
25879
    static {
25880
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
25881
    }
25882
 
25883
    public addAddressToCart_result() {
25884
    }
25885
 
578 chandransh 25886
    public addAddressToCart_result(
25887
      ShoppingCartException scx)
25888
    {
25889
      this();
25890
      this.scx = scx;
25891
    }
25892
 
553 chandransh 25893
    /**
25894
     * Performs a deep copy on <i>other</i>.
25895
     */
25896
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 25897
      if (other.isSetScx()) {
25898
        this.scx = new ShoppingCartException(other.scx);
25899
      }
553 chandransh 25900
    }
25901
 
25902
    public addAddressToCart_result deepCopy() {
25903
      return new addAddressToCart_result(this);
25904
    }
25905
 
25906
    @Deprecated
25907
    public addAddressToCart_result clone() {
25908
      return new addAddressToCart_result(this);
25909
    }
25910
 
578 chandransh 25911
    public ShoppingCartException getScx() {
25912
      return this.scx;
25913
    }
25914
 
25915
    public addAddressToCart_result setScx(ShoppingCartException scx) {
25916
      this.scx = scx;
25917
      return this;
25918
    }
25919
 
25920
    public void unsetScx() {
25921
      this.scx = null;
25922
    }
25923
 
25924
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25925
    public boolean isSetScx() {
25926
      return this.scx != null;
25927
    }
25928
 
25929
    public void setScxIsSet(boolean value) {
25930
      if (!value) {
25931
        this.scx = null;
25932
      }
25933
    }
25934
 
553 chandransh 25935
    public void setFieldValue(_Fields field, Object value) {
25936
      switch (field) {
578 chandransh 25937
      case SCX:
25938
        if (value == null) {
25939
          unsetScx();
25940
        } else {
25941
          setScx((ShoppingCartException)value);
25942
        }
25943
        break;
25944
 
553 chandransh 25945
      }
25946
    }
25947
 
25948
    public void setFieldValue(int fieldID, Object value) {
25949
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25950
    }
25951
 
25952
    public Object getFieldValue(_Fields field) {
25953
      switch (field) {
578 chandransh 25954
      case SCX:
25955
        return getScx();
25956
 
553 chandransh 25957
      }
25958
      throw new IllegalStateException();
25959
    }
25960
 
25961
    public Object getFieldValue(int fieldId) {
25962
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25963
    }
25964
 
25965
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25966
    public boolean isSet(_Fields field) {
25967
      switch (field) {
578 chandransh 25968
      case SCX:
25969
        return isSetScx();
553 chandransh 25970
      }
25971
      throw new IllegalStateException();
25972
    }
25973
 
25974
    public boolean isSet(int fieldID) {
25975
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25976
    }
25977
 
25978
    @Override
25979
    public boolean equals(Object that) {
25980
      if (that == null)
25981
        return false;
25982
      if (that instanceof addAddressToCart_result)
25983
        return this.equals((addAddressToCart_result)that);
25984
      return false;
25985
    }
25986
 
25987
    public boolean equals(addAddressToCart_result that) {
25988
      if (that == null)
25989
        return false;
25990
 
578 chandransh 25991
      boolean this_present_scx = true && this.isSetScx();
25992
      boolean that_present_scx = true && that.isSetScx();
25993
      if (this_present_scx || that_present_scx) {
25994
        if (!(this_present_scx && that_present_scx))
25995
          return false;
25996
        if (!this.scx.equals(that.scx))
25997
          return false;
25998
      }
25999
 
553 chandransh 26000
      return true;
26001
    }
26002
 
26003
    @Override
26004
    public int hashCode() {
26005
      return 0;
26006
    }
26007
 
26008
    public int compareTo(addAddressToCart_result other) {
26009
      if (!getClass().equals(other.getClass())) {
26010
        return getClass().getName().compareTo(other.getClass().getName());
26011
      }
26012
 
26013
      int lastComparison = 0;
26014
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
26015
 
578 chandransh 26016
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
26017
      if (lastComparison != 0) {
26018
        return lastComparison;
26019
      }
26020
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
26021
      if (lastComparison != 0) {
26022
        return lastComparison;
26023
      }
553 chandransh 26024
      return 0;
26025
    }
26026
 
26027
    public void read(TProtocol iprot) throws TException {
26028
      TField field;
26029
      iprot.readStructBegin();
26030
      while (true)
26031
      {
26032
        field = iprot.readFieldBegin();
26033
        if (field.type == TType.STOP) { 
26034
          break;
26035
        }
26036
        _Fields fieldId = _Fields.findByThriftId(field.id);
26037
        if (fieldId == null) {
26038
          TProtocolUtil.skip(iprot, field.type);
26039
        } else {
26040
          switch (fieldId) {
578 chandransh 26041
            case SCX:
26042
              if (field.type == TType.STRUCT) {
26043
                this.scx = new ShoppingCartException();
26044
                this.scx.read(iprot);
26045
              } else { 
26046
                TProtocolUtil.skip(iprot, field.type);
26047
              }
26048
              break;
553 chandransh 26049
          }
26050
          iprot.readFieldEnd();
26051
        }
26052
      }
26053
      iprot.readStructEnd();
26054
      validate();
26055
    }
26056
 
26057
    public void write(TProtocol oprot) throws TException {
26058
      oprot.writeStructBegin(STRUCT_DESC);
26059
 
578 chandransh 26060
      if (this.isSetScx()) {
26061
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26062
        this.scx.write(oprot);
26063
        oprot.writeFieldEnd();
26064
      }
553 chandransh 26065
      oprot.writeFieldStop();
26066
      oprot.writeStructEnd();
26067
    }
26068
 
26069
    @Override
26070
    public String toString() {
26071
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
26072
      boolean first = true;
26073
 
578 chandransh 26074
      sb.append("scx:");
26075
      if (this.scx == null) {
26076
        sb.append("null");
26077
      } else {
26078
        sb.append(this.scx);
26079
      }
26080
      first = false;
553 chandransh 26081
      sb.append(")");
26082
      return sb.toString();
26083
    }
26084
 
26085
    public void validate() throws TException {
26086
      // check for required fields
26087
    }
26088
 
26089
  }
26090
 
688 chandransh 26091
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
26092
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 26093
 
26094
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
26095
 
26096
    private long cartId;
26097
 
26098
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26099
    public enum _Fields implements TFieldIdEnum {
26100
      CART_ID((short)1, "cartId");
26101
 
26102
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26103
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26104
 
26105
      static {
26106
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26107
          byId.put((int)field._thriftId, field);
26108
          byName.put(field.getFieldName(), field);
26109
        }
26110
      }
26111
 
26112
      /**
26113
       * Find the _Fields constant that matches fieldId, or null if its not found.
26114
       */
26115
      public static _Fields findByThriftId(int fieldId) {
26116
        return byId.get(fieldId);
26117
      }
26118
 
26119
      /**
26120
       * Find the _Fields constant that matches fieldId, throwing an exception
26121
       * if it is not found.
26122
       */
26123
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26124
        _Fields fields = findByThriftId(fieldId);
26125
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26126
        return fields;
26127
      }
26128
 
26129
      /**
26130
       * Find the _Fields constant that matches name, or null if its not found.
26131
       */
26132
      public static _Fields findByName(String name) {
26133
        return byName.get(name);
26134
      }
26135
 
26136
      private final short _thriftId;
26137
      private final String _fieldName;
26138
 
26139
      _Fields(short thriftId, String fieldName) {
26140
        _thriftId = thriftId;
26141
        _fieldName = fieldName;
26142
      }
26143
 
26144
      public short getThriftFieldId() {
26145
        return _thriftId;
26146
      }
26147
 
26148
      public String getFieldName() {
26149
        return _fieldName;
26150
      }
26151
    }
26152
 
26153
    // isset id assignments
26154
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 26155
    private BitSet __isset_bit_vector = new BitSet(1);
26156
 
26157
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26158
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 26159
          new FieldValueMetaData(TType.I64)));
26160
    }});
26161
 
26162
    static {
688 chandransh 26163
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 26164
    }
26165
 
688 chandransh 26166
    public createOrders_args() {
48 ashish 26167
    }
26168
 
688 chandransh 26169
    public createOrders_args(
553 chandransh 26170
      long cartId)
48 ashish 26171
    {
26172
      this();
553 chandransh 26173
      this.cartId = cartId;
26174
      setCartIdIsSet(true);
48 ashish 26175
    }
26176
 
26177
    /**
26178
     * Performs a deep copy on <i>other</i>.
26179
     */
688 chandransh 26180
    public createOrders_args(createOrders_args other) {
48 ashish 26181
      __isset_bit_vector.clear();
26182
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 26183
      this.cartId = other.cartId;
48 ashish 26184
    }
26185
 
688 chandransh 26186
    public createOrders_args deepCopy() {
26187
      return new createOrders_args(this);
48 ashish 26188
    }
26189
 
26190
    @Deprecated
688 chandransh 26191
    public createOrders_args clone() {
26192
      return new createOrders_args(this);
48 ashish 26193
    }
26194
 
553 chandransh 26195
    public long getCartId() {
26196
      return this.cartId;
48 ashish 26197
    }
26198
 
688 chandransh 26199
    public createOrders_args setCartId(long cartId) {
553 chandransh 26200
      this.cartId = cartId;
26201
      setCartIdIsSet(true);
48 ashish 26202
      return this;
26203
    }
26204
 
553 chandransh 26205
    public void unsetCartId() {
26206
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26207
    }
26208
 
553 chandransh 26209
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26210
    public boolean isSetCartId() {
26211
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26212
    }
26213
 
553 chandransh 26214
    public void setCartIdIsSet(boolean value) {
26215
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 26216
    }
26217
 
26218
    public void setFieldValue(_Fields field, Object value) {
26219
      switch (field) {
553 chandransh 26220
      case CART_ID:
48 ashish 26221
        if (value == null) {
553 chandransh 26222
          unsetCartId();
48 ashish 26223
        } else {
553 chandransh 26224
          setCartId((Long)value);
48 ashish 26225
        }
26226
        break;
26227
 
26228
      }
26229
    }
26230
 
26231
    public void setFieldValue(int fieldID, Object value) {
26232
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26233
    }
26234
 
26235
    public Object getFieldValue(_Fields field) {
26236
      switch (field) {
553 chandransh 26237
      case CART_ID:
26238
        return new Long(getCartId());
48 ashish 26239
 
26240
      }
26241
      throw new IllegalStateException();
26242
    }
26243
 
26244
    public Object getFieldValue(int fieldId) {
26245
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26246
    }
26247
 
26248
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26249
    public boolean isSet(_Fields field) {
26250
      switch (field) {
553 chandransh 26251
      case CART_ID:
26252
        return isSetCartId();
48 ashish 26253
      }
26254
      throw new IllegalStateException();
26255
    }
26256
 
26257
    public boolean isSet(int fieldID) {
26258
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26259
    }
26260
 
26261
    @Override
26262
    public boolean equals(Object that) {
26263
      if (that == null)
26264
        return false;
688 chandransh 26265
      if (that instanceof createOrders_args)
26266
        return this.equals((createOrders_args)that);
48 ashish 26267
      return false;
26268
    }
26269
 
688 chandransh 26270
    public boolean equals(createOrders_args that) {
48 ashish 26271
      if (that == null)
26272
        return false;
26273
 
553 chandransh 26274
      boolean this_present_cartId = true;
26275
      boolean that_present_cartId = true;
26276
      if (this_present_cartId || that_present_cartId) {
26277
        if (!(this_present_cartId && that_present_cartId))
48 ashish 26278
          return false;
553 chandransh 26279
        if (this.cartId != that.cartId)
48 ashish 26280
          return false;
26281
      }
26282
 
26283
      return true;
26284
    }
26285
 
26286
    @Override
26287
    public int hashCode() {
26288
      return 0;
26289
    }
26290
 
688 chandransh 26291
    public int compareTo(createOrders_args other) {
48 ashish 26292
      if (!getClass().equals(other.getClass())) {
26293
        return getClass().getName().compareTo(other.getClass().getName());
26294
      }
26295
 
26296
      int lastComparison = 0;
688 chandransh 26297
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 26298
 
553 chandransh 26299
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 26300
      if (lastComparison != 0) {
26301
        return lastComparison;
26302
      }
553 chandransh 26303
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 26304
      if (lastComparison != 0) {
26305
        return lastComparison;
26306
      }
26307
      return 0;
26308
    }
26309
 
26310
    public void read(TProtocol iprot) throws TException {
26311
      TField field;
26312
      iprot.readStructBegin();
26313
      while (true)
26314
      {
26315
        field = iprot.readFieldBegin();
26316
        if (field.type == TType.STOP) { 
26317
          break;
26318
        }
26319
        _Fields fieldId = _Fields.findByThriftId(field.id);
26320
        if (fieldId == null) {
26321
          TProtocolUtil.skip(iprot, field.type);
26322
        } else {
26323
          switch (fieldId) {
553 chandransh 26324
            case CART_ID:
48 ashish 26325
              if (field.type == TType.I64) {
553 chandransh 26326
                this.cartId = iprot.readI64();
26327
                setCartIdIsSet(true);
48 ashish 26328
              } else { 
26329
                TProtocolUtil.skip(iprot, field.type);
26330
              }
26331
              break;
26332
          }
26333
          iprot.readFieldEnd();
26334
        }
26335
      }
26336
      iprot.readStructEnd();
26337
      validate();
26338
    }
26339
 
26340
    public void write(TProtocol oprot) throws TException {
26341
      validate();
26342
 
26343
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 26344
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26345
      oprot.writeI64(this.cartId);
48 ashish 26346
      oprot.writeFieldEnd();
26347
      oprot.writeFieldStop();
26348
      oprot.writeStructEnd();
26349
    }
26350
 
26351
    @Override
26352
    public String toString() {
688 chandransh 26353
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 26354
      boolean first = true;
26355
 
553 chandransh 26356
      sb.append("cartId:");
26357
      sb.append(this.cartId);
48 ashish 26358
      first = false;
26359
      sb.append(")");
26360
      return sb.toString();
26361
    }
26362
 
26363
    public void validate() throws TException {
26364
      // check for required fields
26365
    }
26366
 
26367
  }
26368
 
688 chandransh 26369
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
26370
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 26371
 
578 chandransh 26372
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 26373
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 26374
 
578 chandransh 26375
    private long success;
553 chandransh 26376
    private ShoppingCartException scx;
48 ashish 26377
 
26378
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26379
    public enum _Fields implements TFieldIdEnum {
26380
      SUCCESS((short)0, "success"),
553 chandransh 26381
      SCX((short)1, "scx");
48 ashish 26382
 
26383
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26384
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26385
 
26386
      static {
26387
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26388
          byId.put((int)field._thriftId, field);
26389
          byName.put(field.getFieldName(), field);
26390
        }
26391
      }
26392
 
26393
      /**
26394
       * Find the _Fields constant that matches fieldId, or null if its not found.
26395
       */
26396
      public static _Fields findByThriftId(int fieldId) {
26397
        return byId.get(fieldId);
26398
      }
26399
 
26400
      /**
26401
       * Find the _Fields constant that matches fieldId, throwing an exception
26402
       * if it is not found.
26403
       */
26404
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26405
        _Fields fields = findByThriftId(fieldId);
26406
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26407
        return fields;
26408
      }
26409
 
26410
      /**
26411
       * Find the _Fields constant that matches name, or null if its not found.
26412
       */
26413
      public static _Fields findByName(String name) {
26414
        return byName.get(name);
26415
      }
26416
 
26417
      private final short _thriftId;
26418
      private final String _fieldName;
26419
 
26420
      _Fields(short thriftId, String fieldName) {
26421
        _thriftId = thriftId;
26422
        _fieldName = fieldName;
26423
      }
26424
 
26425
      public short getThriftFieldId() {
26426
        return _thriftId;
26427
      }
26428
 
26429
      public String getFieldName() {
26430
        return _fieldName;
26431
      }
26432
    }
26433
 
26434
    // isset id assignments
26435
    private static final int __SUCCESS_ISSET_ID = 0;
26436
    private BitSet __isset_bit_vector = new BitSet(1);
26437
 
26438
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26439
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 26440
          new FieldValueMetaData(TType.I64)));
553 chandransh 26441
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 26442
          new FieldValueMetaData(TType.STRUCT)));
26443
    }});
26444
 
26445
    static {
688 chandransh 26446
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 26447
    }
26448
 
688 chandransh 26449
    public createOrders_result() {
48 ashish 26450
    }
26451
 
688 chandransh 26452
    public createOrders_result(
578 chandransh 26453
      long success,
553 chandransh 26454
      ShoppingCartException scx)
48 ashish 26455
    {
26456
      this();
26457
      this.success = success;
26458
      setSuccessIsSet(true);
553 chandransh 26459
      this.scx = scx;
48 ashish 26460
    }
26461
 
26462
    /**
26463
     * Performs a deep copy on <i>other</i>.
26464
     */
688 chandransh 26465
    public createOrders_result(createOrders_result other) {
48 ashish 26466
      __isset_bit_vector.clear();
26467
      __isset_bit_vector.or(other.__isset_bit_vector);
26468
      this.success = other.success;
553 chandransh 26469
      if (other.isSetScx()) {
26470
        this.scx = new ShoppingCartException(other.scx);
48 ashish 26471
      }
26472
    }
26473
 
688 chandransh 26474
    public createOrders_result deepCopy() {
26475
      return new createOrders_result(this);
48 ashish 26476
    }
26477
 
26478
    @Deprecated
688 chandransh 26479
    public createOrders_result clone() {
26480
      return new createOrders_result(this);
48 ashish 26481
    }
26482
 
578 chandransh 26483
    public long getSuccess() {
48 ashish 26484
      return this.success;
26485
    }
26486
 
688 chandransh 26487
    public createOrders_result setSuccess(long success) {
48 ashish 26488
      this.success = success;
26489
      setSuccessIsSet(true);
26490
      return this;
26491
    }
26492
 
26493
    public void unsetSuccess() {
26494
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26495
    }
26496
 
26497
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26498
    public boolean isSetSuccess() {
26499
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26500
    }
26501
 
26502
    public void setSuccessIsSet(boolean value) {
26503
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26504
    }
26505
 
553 chandransh 26506
    public ShoppingCartException getScx() {
26507
      return this.scx;
48 ashish 26508
    }
26509
 
688 chandransh 26510
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 26511
      this.scx = scx;
48 ashish 26512
      return this;
26513
    }
26514
 
553 chandransh 26515
    public void unsetScx() {
26516
      this.scx = null;
48 ashish 26517
    }
26518
 
553 chandransh 26519
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
26520
    public boolean isSetScx() {
26521
      return this.scx != null;
48 ashish 26522
    }
26523
 
553 chandransh 26524
    public void setScxIsSet(boolean value) {
48 ashish 26525
      if (!value) {
553 chandransh 26526
        this.scx = null;
48 ashish 26527
      }
26528
    }
26529
 
26530
    public void setFieldValue(_Fields field, Object value) {
26531
      switch (field) {
26532
      case SUCCESS:
26533
        if (value == null) {
26534
          unsetSuccess();
26535
        } else {
578 chandransh 26536
          setSuccess((Long)value);
48 ashish 26537
        }
26538
        break;
26539
 
553 chandransh 26540
      case SCX:
48 ashish 26541
        if (value == null) {
553 chandransh 26542
          unsetScx();
48 ashish 26543
        } else {
553 chandransh 26544
          setScx((ShoppingCartException)value);
48 ashish 26545
        }
26546
        break;
26547
 
26548
      }
26549
    }
26550
 
26551
    public void setFieldValue(int fieldID, Object value) {
26552
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26553
    }
26554
 
26555
    public Object getFieldValue(_Fields field) {
26556
      switch (field) {
26557
      case SUCCESS:
578 chandransh 26558
        return new Long(getSuccess());
48 ashish 26559
 
553 chandransh 26560
      case SCX:
26561
        return getScx();
48 ashish 26562
 
26563
      }
26564
      throw new IllegalStateException();
26565
    }
26566
 
26567
    public Object getFieldValue(int fieldId) {
26568
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26569
    }
26570
 
26571
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26572
    public boolean isSet(_Fields field) {
26573
      switch (field) {
26574
      case SUCCESS:
26575
        return isSetSuccess();
553 chandransh 26576
      case SCX:
26577
        return isSetScx();
48 ashish 26578
      }
26579
      throw new IllegalStateException();
26580
    }
26581
 
26582
    public boolean isSet(int fieldID) {
26583
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26584
    }
26585
 
26586
    @Override
26587
    public boolean equals(Object that) {
26588
      if (that == null)
26589
        return false;
688 chandransh 26590
      if (that instanceof createOrders_result)
26591
        return this.equals((createOrders_result)that);
48 ashish 26592
      return false;
26593
    }
26594
 
688 chandransh 26595
    public boolean equals(createOrders_result that) {
48 ashish 26596
      if (that == null)
26597
        return false;
26598
 
26599
      boolean this_present_success = true;
26600
      boolean that_present_success = true;
26601
      if (this_present_success || that_present_success) {
26602
        if (!(this_present_success && that_present_success))
26603
          return false;
26604
        if (this.success != that.success)
26605
          return false;
26606
      }
26607
 
553 chandransh 26608
      boolean this_present_scx = true && this.isSetScx();
26609
      boolean that_present_scx = true && that.isSetScx();
26610
      if (this_present_scx || that_present_scx) {
26611
        if (!(this_present_scx && that_present_scx))
48 ashish 26612
          return false;
553 chandransh 26613
        if (!this.scx.equals(that.scx))
48 ashish 26614
          return false;
26615
      }
26616
 
26617
      return true;
26618
    }
26619
 
26620
    @Override
26621
    public int hashCode() {
26622
      return 0;
26623
    }
26624
 
688 chandransh 26625
    public int compareTo(createOrders_result other) {
48 ashish 26626
      if (!getClass().equals(other.getClass())) {
26627
        return getClass().getName().compareTo(other.getClass().getName());
26628
      }
26629
 
26630
      int lastComparison = 0;
688 chandransh 26631
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 26632
 
26633
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26634
      if (lastComparison != 0) {
26635
        return lastComparison;
26636
      }
26637
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26638
      if (lastComparison != 0) {
26639
        return lastComparison;
26640
      }
553 chandransh 26641
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 26642
      if (lastComparison != 0) {
26643
        return lastComparison;
26644
      }
553 chandransh 26645
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 26646
      if (lastComparison != 0) {
26647
        return lastComparison;
26648
      }
26649
      return 0;
26650
    }
26651
 
26652
    public void read(TProtocol iprot) throws TException {
26653
      TField field;
26654
      iprot.readStructBegin();
26655
      while (true)
26656
      {
26657
        field = iprot.readFieldBegin();
26658
        if (field.type == TType.STOP) { 
26659
          break;
26660
        }
26661
        _Fields fieldId = _Fields.findByThriftId(field.id);
26662
        if (fieldId == null) {
26663
          TProtocolUtil.skip(iprot, field.type);
26664
        } else {
26665
          switch (fieldId) {
26666
            case SUCCESS:
578 chandransh 26667
              if (field.type == TType.I64) {
26668
                this.success = iprot.readI64();
48 ashish 26669
                setSuccessIsSet(true);
26670
              } else { 
26671
                TProtocolUtil.skip(iprot, field.type);
26672
              }
26673
              break;
553 chandransh 26674
            case SCX:
48 ashish 26675
              if (field.type == TType.STRUCT) {
553 chandransh 26676
                this.scx = new ShoppingCartException();
26677
                this.scx.read(iprot);
48 ashish 26678
              } else { 
26679
                TProtocolUtil.skip(iprot, field.type);
26680
              }
26681
              break;
26682
          }
26683
          iprot.readFieldEnd();
26684
        }
26685
      }
26686
      iprot.readStructEnd();
26687
      validate();
26688
    }
26689
 
26690
    public void write(TProtocol oprot) throws TException {
26691
      oprot.writeStructBegin(STRUCT_DESC);
26692
 
26693
      if (this.isSetSuccess()) {
26694
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 26695
        oprot.writeI64(this.success);
48 ashish 26696
        oprot.writeFieldEnd();
553 chandransh 26697
      } else if (this.isSetScx()) {
26698
        oprot.writeFieldBegin(SCX_FIELD_DESC);
26699
        this.scx.write(oprot);
48 ashish 26700
        oprot.writeFieldEnd();
26701
      }
26702
      oprot.writeFieldStop();
26703
      oprot.writeStructEnd();
26704
    }
26705
 
26706
    @Override
26707
    public String toString() {
688 chandransh 26708
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 26709
      boolean first = true;
26710
 
26711
      sb.append("success:");
26712
      sb.append(this.success);
26713
      first = false;
26714
      if (!first) sb.append(", ");
553 chandransh 26715
      sb.append("scx:");
26716
      if (this.scx == null) {
48 ashish 26717
        sb.append("null");
26718
      } else {
553 chandransh 26719
        sb.append(this.scx);
48 ashish 26720
      }
26721
      first = false;
26722
      sb.append(")");
26723
      return sb.toString();
26724
    }
26725
 
26726
    public void validate() throws TException {
26727
      // check for required fields
26728
    }
26729
 
26730
  }
26731
 
553 chandransh 26732
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
26733
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 26734
 
553 chandransh 26735
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 26736
 
553 chandransh 26737
    private long cartId;
48 ashish 26738
 
26739
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26740
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26741
      CART_ID((short)1, "cartId");
48 ashish 26742
 
26743
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26744
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26745
 
26746
      static {
26747
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26748
          byId.put((int)field._thriftId, field);
26749
          byName.put(field.getFieldName(), field);
26750
        }
26751
      }
26752
 
26753
      /**
26754
       * Find the _Fields constant that matches fieldId, or null if its not found.
26755
       */
26756
      public static _Fields findByThriftId(int fieldId) {
26757
        return byId.get(fieldId);
26758
      }
26759
 
26760
      /**
26761
       * Find the _Fields constant that matches fieldId, throwing an exception
26762
       * if it is not found.
26763
       */
26764
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26765
        _Fields fields = findByThriftId(fieldId);
26766
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26767
        return fields;
26768
      }
26769
 
26770
      /**
26771
       * Find the _Fields constant that matches name, or null if its not found.
26772
       */
26773
      public static _Fields findByName(String name) {
26774
        return byName.get(name);
26775
      }
26776
 
26777
      private final short _thriftId;
26778
      private final String _fieldName;
26779
 
26780
      _Fields(short thriftId, String fieldName) {
26781
        _thriftId = thriftId;
26782
        _fieldName = fieldName;
26783
      }
26784
 
26785
      public short getThriftFieldId() {
26786
        return _thriftId;
26787
      }
26788
 
26789
      public String getFieldName() {
26790
        return _fieldName;
26791
      }
26792
    }
26793
 
26794
    // isset id assignments
553 chandransh 26795
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 26796
    private BitSet __isset_bit_vector = new BitSet(1);
26797
 
26798
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26799
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 26800
          new FieldValueMetaData(TType.I64)));
26801
    }});
26802
 
26803
    static {
553 chandransh 26804
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 26805
    }
26806
 
553 chandransh 26807
    public validateCart_args() {
48 ashish 26808
    }
26809
 
553 chandransh 26810
    public validateCart_args(
26811
      long cartId)
48 ashish 26812
    {
26813
      this();
553 chandransh 26814
      this.cartId = cartId;
26815
      setCartIdIsSet(true);
48 ashish 26816
    }
26817
 
26818
    /**
26819
     * Performs a deep copy on <i>other</i>.
26820
     */
553 chandransh 26821
    public validateCart_args(validateCart_args other) {
48 ashish 26822
      __isset_bit_vector.clear();
26823
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 26824
      this.cartId = other.cartId;
48 ashish 26825
    }
26826
 
553 chandransh 26827
    public validateCart_args deepCopy() {
26828
      return new validateCart_args(this);
48 ashish 26829
    }
26830
 
26831
    @Deprecated
553 chandransh 26832
    public validateCart_args clone() {
26833
      return new validateCart_args(this);
48 ashish 26834
    }
26835
 
553 chandransh 26836
    public long getCartId() {
26837
      return this.cartId;
48 ashish 26838
    }
26839
 
553 chandransh 26840
    public validateCart_args setCartId(long cartId) {
26841
      this.cartId = cartId;
26842
      setCartIdIsSet(true);
48 ashish 26843
      return this;
26844
    }
26845
 
553 chandransh 26846
    public void unsetCartId() {
26847
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26848
    }
26849
 
553 chandransh 26850
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26851
    public boolean isSetCartId() {
26852
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26853
    }
26854
 
553 chandransh 26855
    public void setCartIdIsSet(boolean value) {
26856
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 26857
    }
26858
 
26859
    public void setFieldValue(_Fields field, Object value) {
26860
      switch (field) {
553 chandransh 26861
      case CART_ID:
48 ashish 26862
        if (value == null) {
553 chandransh 26863
          unsetCartId();
48 ashish 26864
        } else {
553 chandransh 26865
          setCartId((Long)value);
48 ashish 26866
        }
26867
        break;
26868
 
26869
      }
26870
    }
26871
 
26872
    public void setFieldValue(int fieldID, Object value) {
26873
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26874
    }
26875
 
26876
    public Object getFieldValue(_Fields field) {
26877
      switch (field) {
553 chandransh 26878
      case CART_ID:
26879
        return new Long(getCartId());
48 ashish 26880
 
26881
      }
26882
      throw new IllegalStateException();
26883
    }
26884
 
26885
    public Object getFieldValue(int fieldId) {
26886
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26887
    }
26888
 
26889
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26890
    public boolean isSet(_Fields field) {
26891
      switch (field) {
553 chandransh 26892
      case CART_ID:
26893
        return isSetCartId();
48 ashish 26894
      }
26895
      throw new IllegalStateException();
26896
    }
26897
 
26898
    public boolean isSet(int fieldID) {
26899
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26900
    }
26901
 
26902
    @Override
26903
    public boolean equals(Object that) {
26904
      if (that == null)
26905
        return false;
553 chandransh 26906
      if (that instanceof validateCart_args)
26907
        return this.equals((validateCart_args)that);
48 ashish 26908
      return false;
26909
    }
26910
 
553 chandransh 26911
    public boolean equals(validateCart_args that) {
48 ashish 26912
      if (that == null)
26913
        return false;
26914
 
553 chandransh 26915
      boolean this_present_cartId = true;
26916
      boolean that_present_cartId = true;
26917
      if (this_present_cartId || that_present_cartId) {
26918
        if (!(this_present_cartId && that_present_cartId))
48 ashish 26919
          return false;
553 chandransh 26920
        if (this.cartId != that.cartId)
48 ashish 26921
          return false;
26922
      }
26923
 
26924
      return true;
26925
    }
26926
 
26927
    @Override
26928
    public int hashCode() {
26929
      return 0;
26930
    }
26931
 
553 chandransh 26932
    public int compareTo(validateCart_args other) {
48 ashish 26933
      if (!getClass().equals(other.getClass())) {
26934
        return getClass().getName().compareTo(other.getClass().getName());
26935
      }
26936
 
26937
      int lastComparison = 0;
553 chandransh 26938
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 26939
 
553 chandransh 26940
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 26941
      if (lastComparison != 0) {
26942
        return lastComparison;
26943
      }
553 chandransh 26944
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 26945
      if (lastComparison != 0) {
26946
        return lastComparison;
26947
      }
26948
      return 0;
26949
    }
26950
 
26951
    public void read(TProtocol iprot) throws TException {
26952
      TField field;
26953
      iprot.readStructBegin();
26954
      while (true)
26955
      {
26956
        field = iprot.readFieldBegin();
26957
        if (field.type == TType.STOP) { 
26958
          break;
26959
        }
26960
        _Fields fieldId = _Fields.findByThriftId(field.id);
26961
        if (fieldId == null) {
26962
          TProtocolUtil.skip(iprot, field.type);
26963
        } else {
26964
          switch (fieldId) {
553 chandransh 26965
            case CART_ID:
48 ashish 26966
              if (field.type == TType.I64) {
553 chandransh 26967
                this.cartId = iprot.readI64();
26968
                setCartIdIsSet(true);
48 ashish 26969
              } else { 
26970
                TProtocolUtil.skip(iprot, field.type);
26971
              }
26972
              break;
26973
          }
26974
          iprot.readFieldEnd();
26975
        }
26976
      }
26977
      iprot.readStructEnd();
26978
      validate();
26979
    }
26980
 
26981
    public void write(TProtocol oprot) throws TException {
26982
      validate();
26983
 
26984
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 26985
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26986
      oprot.writeI64(this.cartId);
48 ashish 26987
      oprot.writeFieldEnd();
26988
      oprot.writeFieldStop();
26989
      oprot.writeStructEnd();
26990
    }
26991
 
26992
    @Override
26993
    public String toString() {
553 chandransh 26994
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 26995
      boolean first = true;
26996
 
553 chandransh 26997
      sb.append("cartId:");
26998
      sb.append(this.cartId);
48 ashish 26999
      first = false;
27000
      sb.append(")");
27001
      return sb.toString();
27002
    }
27003
 
27004
    public void validate() throws TException {
27005
      // check for required fields
27006
    }
27007
 
27008
  }
27009
 
553 chandransh 27010
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
27011
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 27012
 
1466 ankur.sing 27013
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
578 chandransh 27014
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 27015
 
1466 ankur.sing 27016
    private String success;
578 chandransh 27017
    private ShoppingCartException scex;
48 ashish 27018
 
27019
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27020
    public enum _Fields implements TFieldIdEnum {
578 chandransh 27021
      SUCCESS((short)0, "success"),
27022
      SCEX((short)1, "scex");
48 ashish 27023
 
27024
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27025
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27026
 
27027
      static {
27028
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27029
          byId.put((int)field._thriftId, field);
27030
          byName.put(field.getFieldName(), field);
27031
        }
27032
      }
27033
 
27034
      /**
27035
       * Find the _Fields constant that matches fieldId, or null if its not found.
27036
       */
27037
      public static _Fields findByThriftId(int fieldId) {
27038
        return byId.get(fieldId);
27039
      }
27040
 
27041
      /**
27042
       * Find the _Fields constant that matches fieldId, throwing an exception
27043
       * if it is not found.
27044
       */
27045
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27046
        _Fields fields = findByThriftId(fieldId);
27047
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27048
        return fields;
27049
      }
27050
 
27051
      /**
27052
       * Find the _Fields constant that matches name, or null if its not found.
27053
       */
27054
      public static _Fields findByName(String name) {
27055
        return byName.get(name);
27056
      }
27057
 
27058
      private final short _thriftId;
27059
      private final String _fieldName;
27060
 
27061
      _Fields(short thriftId, String fieldName) {
27062
        _thriftId = thriftId;
27063
        _fieldName = fieldName;
27064
      }
27065
 
27066
      public short getThriftFieldId() {
27067
        return _thriftId;
27068
      }
27069
 
27070
      public String getFieldName() {
27071
        return _fieldName;
27072
      }
27073
    }
27074
 
27075
    // isset id assignments
27076
 
27077
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27078
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1466 ankur.sing 27079
          new FieldValueMetaData(TType.STRING)));
578 chandransh 27080
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
27081
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 27082
    }});
27083
 
27084
    static {
553 chandransh 27085
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 27086
    }
27087
 
553 chandransh 27088
    public validateCart_result() {
48 ashish 27089
    }
27090
 
553 chandransh 27091
    public validateCart_result(
1466 ankur.sing 27092
      String success,
578 chandransh 27093
      ShoppingCartException scex)
48 ashish 27094
    {
27095
      this();
27096
      this.success = success;
578 chandransh 27097
      this.scex = scex;
48 ashish 27098
    }
27099
 
27100
    /**
27101
     * Performs a deep copy on <i>other</i>.
27102
     */
553 chandransh 27103
    public validateCart_result(validateCart_result other) {
1466 ankur.sing 27104
      if (other.isSetSuccess()) {
27105
        this.success = other.success;
27106
      }
578 chandransh 27107
      if (other.isSetScex()) {
27108
        this.scex = new ShoppingCartException(other.scex);
27109
      }
48 ashish 27110
    }
27111
 
553 chandransh 27112
    public validateCart_result deepCopy() {
27113
      return new validateCart_result(this);
48 ashish 27114
    }
27115
 
27116
    @Deprecated
553 chandransh 27117
    public validateCart_result clone() {
27118
      return new validateCart_result(this);
48 ashish 27119
    }
27120
 
1466 ankur.sing 27121
    public String getSuccess() {
48 ashish 27122
      return this.success;
27123
    }
27124
 
1466 ankur.sing 27125
    public validateCart_result setSuccess(String success) {
48 ashish 27126
      this.success = success;
27127
      return this;
27128
    }
27129
 
27130
    public void unsetSuccess() {
1466 ankur.sing 27131
      this.success = null;
48 ashish 27132
    }
27133
 
27134
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27135
    public boolean isSetSuccess() {
1466 ankur.sing 27136
      return this.success != null;
48 ashish 27137
    }
27138
 
27139
    public void setSuccessIsSet(boolean value) {
1466 ankur.sing 27140
      if (!value) {
27141
        this.success = null;
27142
      }
48 ashish 27143
    }
27144
 
578 chandransh 27145
    public ShoppingCartException getScex() {
27146
      return this.scex;
27147
    }
27148
 
27149
    public validateCart_result setScex(ShoppingCartException scex) {
27150
      this.scex = scex;
27151
      return this;
27152
    }
27153
 
27154
    public void unsetScex() {
27155
      this.scex = null;
27156
    }
27157
 
27158
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
27159
    public boolean isSetScex() {
27160
      return this.scex != null;
27161
    }
27162
 
27163
    public void setScexIsSet(boolean value) {
27164
      if (!value) {
27165
        this.scex = null;
27166
      }
27167
    }
27168
 
553 chandransh 27169
    public void setFieldValue(_Fields field, Object value) {
27170
      switch (field) {
27171
      case SUCCESS:
27172
        if (value == null) {
27173
          unsetSuccess();
27174
        } else {
1466 ankur.sing 27175
          setSuccess((String)value);
553 chandransh 27176
        }
27177
        break;
27178
 
578 chandransh 27179
      case SCEX:
27180
        if (value == null) {
27181
          unsetScex();
27182
        } else {
27183
          setScex((ShoppingCartException)value);
27184
        }
27185
        break;
27186
 
553 chandransh 27187
      }
48 ashish 27188
    }
27189
 
553 chandransh 27190
    public void setFieldValue(int fieldID, Object value) {
27191
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27192
    }
27193
 
27194
    public Object getFieldValue(_Fields field) {
27195
      switch (field) {
27196
      case SUCCESS:
1466 ankur.sing 27197
        return getSuccess();
553 chandransh 27198
 
578 chandransh 27199
      case SCEX:
27200
        return getScex();
27201
 
553 chandransh 27202
      }
27203
      throw new IllegalStateException();
27204
    }
27205
 
27206
    public Object getFieldValue(int fieldId) {
27207
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27208
    }
27209
 
27210
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27211
    public boolean isSet(_Fields field) {
27212
      switch (field) {
27213
      case SUCCESS:
27214
        return isSetSuccess();
578 chandransh 27215
      case SCEX:
27216
        return isSetScex();
553 chandransh 27217
      }
27218
      throw new IllegalStateException();
27219
    }
27220
 
27221
    public boolean isSet(int fieldID) {
27222
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27223
    }
27224
 
27225
    @Override
27226
    public boolean equals(Object that) {
27227
      if (that == null)
27228
        return false;
27229
      if (that instanceof validateCart_result)
27230
        return this.equals((validateCart_result)that);
27231
      return false;
27232
    }
27233
 
27234
    public boolean equals(validateCart_result that) {
27235
      if (that == null)
27236
        return false;
27237
 
1466 ankur.sing 27238
      boolean this_present_success = true && this.isSetSuccess();
27239
      boolean that_present_success = true && that.isSetSuccess();
553 chandransh 27240
      if (this_present_success || that_present_success) {
27241
        if (!(this_present_success && that_present_success))
27242
          return false;
1466 ankur.sing 27243
        if (!this.success.equals(that.success))
553 chandransh 27244
          return false;
27245
      }
27246
 
578 chandransh 27247
      boolean this_present_scex = true && this.isSetScex();
27248
      boolean that_present_scex = true && that.isSetScex();
27249
      if (this_present_scex || that_present_scex) {
27250
        if (!(this_present_scex && that_present_scex))
27251
          return false;
27252
        if (!this.scex.equals(that.scex))
27253
          return false;
27254
      }
27255
 
553 chandransh 27256
      return true;
27257
    }
27258
 
27259
    @Override
27260
    public int hashCode() {
27261
      return 0;
27262
    }
27263
 
27264
    public int compareTo(validateCart_result other) {
27265
      if (!getClass().equals(other.getClass())) {
27266
        return getClass().getName().compareTo(other.getClass().getName());
27267
      }
27268
 
27269
      int lastComparison = 0;
27270
      validateCart_result typedOther = (validateCart_result)other;
27271
 
27272
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27273
      if (lastComparison != 0) {
27274
        return lastComparison;
27275
      }
27276
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27277
      if (lastComparison != 0) {
27278
        return lastComparison;
27279
      }
578 chandransh 27280
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
27281
      if (lastComparison != 0) {
27282
        return lastComparison;
27283
      }
27284
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
27285
      if (lastComparison != 0) {
27286
        return lastComparison;
27287
      }
553 chandransh 27288
      return 0;
27289
    }
27290
 
27291
    public void read(TProtocol iprot) throws TException {
27292
      TField field;
27293
      iprot.readStructBegin();
27294
      while (true)
27295
      {
27296
        field = iprot.readFieldBegin();
27297
        if (field.type == TType.STOP) { 
27298
          break;
27299
        }
27300
        _Fields fieldId = _Fields.findByThriftId(field.id);
27301
        if (fieldId == null) {
27302
          TProtocolUtil.skip(iprot, field.type);
27303
        } else {
27304
          switch (fieldId) {
27305
            case SUCCESS:
1466 ankur.sing 27306
              if (field.type == TType.STRING) {
27307
                this.success = iprot.readString();
553 chandransh 27308
              } else { 
27309
                TProtocolUtil.skip(iprot, field.type);
27310
              }
27311
              break;
578 chandransh 27312
            case SCEX:
27313
              if (field.type == TType.STRUCT) {
27314
                this.scex = new ShoppingCartException();
27315
                this.scex.read(iprot);
27316
              } else { 
27317
                TProtocolUtil.skip(iprot, field.type);
27318
              }
27319
              break;
553 chandransh 27320
          }
27321
          iprot.readFieldEnd();
27322
        }
27323
      }
27324
      iprot.readStructEnd();
27325
      validate();
27326
    }
27327
 
27328
    public void write(TProtocol oprot) throws TException {
27329
      oprot.writeStructBegin(STRUCT_DESC);
27330
 
27331
      if (this.isSetSuccess()) {
27332
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1466 ankur.sing 27333
        oprot.writeString(this.success);
553 chandransh 27334
        oprot.writeFieldEnd();
578 chandransh 27335
      } else if (this.isSetScex()) {
27336
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
27337
        this.scex.write(oprot);
27338
        oprot.writeFieldEnd();
553 chandransh 27339
      }
27340
      oprot.writeFieldStop();
27341
      oprot.writeStructEnd();
27342
    }
27343
 
27344
    @Override
27345
    public String toString() {
27346
      StringBuilder sb = new StringBuilder("validateCart_result(");
27347
      boolean first = true;
27348
 
27349
      sb.append("success:");
1466 ankur.sing 27350
      if (this.success == null) {
27351
        sb.append("null");
27352
      } else {
27353
        sb.append(this.success);
27354
      }
553 chandransh 27355
      first = false;
578 chandransh 27356
      if (!first) sb.append(", ");
27357
      sb.append("scex:");
27358
      if (this.scex == null) {
27359
        sb.append("null");
27360
      } else {
27361
        sb.append(this.scex);
27362
      }
27363
      first = false;
553 chandransh 27364
      sb.append(")");
27365
      return sb.toString();
27366
    }
27367
 
27368
    public void validate() throws TException {
27369
      // check for required fields
27370
    }
27371
 
27372
  }
27373
 
688 chandransh 27374
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
27375
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
578 chandransh 27376
 
688 chandransh 27377
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
27378
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
27379
 
27380
    private long fromCartId;
27381
    private long toCartId;
27382
 
27383
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27384
    public enum _Fields implements TFieldIdEnum {
27385
      FROM_CART_ID((short)1, "fromCartId"),
27386
      TO_CART_ID((short)2, "toCartId");
27387
 
27388
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27389
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27390
 
27391
      static {
27392
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27393
          byId.put((int)field._thriftId, field);
27394
          byName.put(field.getFieldName(), field);
27395
        }
27396
      }
27397
 
27398
      /**
27399
       * Find the _Fields constant that matches fieldId, or null if its not found.
27400
       */
27401
      public static _Fields findByThriftId(int fieldId) {
27402
        return byId.get(fieldId);
27403
      }
27404
 
27405
      /**
27406
       * Find the _Fields constant that matches fieldId, throwing an exception
27407
       * if it is not found.
27408
       */
27409
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27410
        _Fields fields = findByThriftId(fieldId);
27411
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27412
        return fields;
27413
      }
27414
 
27415
      /**
27416
       * Find the _Fields constant that matches name, or null if its not found.
27417
       */
27418
      public static _Fields findByName(String name) {
27419
        return byName.get(name);
27420
      }
27421
 
27422
      private final short _thriftId;
27423
      private final String _fieldName;
27424
 
27425
      _Fields(short thriftId, String fieldName) {
27426
        _thriftId = thriftId;
27427
        _fieldName = fieldName;
27428
      }
27429
 
27430
      public short getThriftFieldId() {
27431
        return _thriftId;
27432
      }
27433
 
27434
      public String getFieldName() {
27435
        return _fieldName;
27436
      }
27437
    }
27438
 
27439
    // isset id assignments
27440
    private static final int __FROMCARTID_ISSET_ID = 0;
27441
    private static final int __TOCARTID_ISSET_ID = 1;
27442
    private BitSet __isset_bit_vector = new BitSet(2);
27443
 
27444
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27445
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
27446
          new FieldValueMetaData(TType.I64)));
27447
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
27448
          new FieldValueMetaData(TType.I64)));
27449
    }});
27450
 
27451
    static {
27452
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
27453
    }
27454
 
27455
    public mergeCart_args() {
27456
    }
27457
 
27458
    public mergeCart_args(
27459
      long fromCartId,
27460
      long toCartId)
27461
    {
27462
      this();
27463
      this.fromCartId = fromCartId;
27464
      setFromCartIdIsSet(true);
27465
      this.toCartId = toCartId;
27466
      setToCartIdIsSet(true);
27467
    }
27468
 
27469
    /**
27470
     * Performs a deep copy on <i>other</i>.
27471
     */
27472
    public mergeCart_args(mergeCart_args other) {
27473
      __isset_bit_vector.clear();
27474
      __isset_bit_vector.or(other.__isset_bit_vector);
27475
      this.fromCartId = other.fromCartId;
27476
      this.toCartId = other.toCartId;
27477
    }
27478
 
27479
    public mergeCart_args deepCopy() {
27480
      return new mergeCart_args(this);
27481
    }
27482
 
27483
    @Deprecated
27484
    public mergeCart_args clone() {
27485
      return new mergeCart_args(this);
27486
    }
27487
 
27488
    public long getFromCartId() {
27489
      return this.fromCartId;
27490
    }
27491
 
27492
    public mergeCart_args setFromCartId(long fromCartId) {
27493
      this.fromCartId = fromCartId;
27494
      setFromCartIdIsSet(true);
27495
      return this;
27496
    }
27497
 
27498
    public void unsetFromCartId() {
27499
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
27500
    }
27501
 
27502
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
27503
    public boolean isSetFromCartId() {
27504
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
27505
    }
27506
 
27507
    public void setFromCartIdIsSet(boolean value) {
27508
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
27509
    }
27510
 
27511
    public long getToCartId() {
27512
      return this.toCartId;
27513
    }
27514
 
27515
    public mergeCart_args setToCartId(long toCartId) {
27516
      this.toCartId = toCartId;
27517
      setToCartIdIsSet(true);
27518
      return this;
27519
    }
27520
 
27521
    public void unsetToCartId() {
27522
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
27523
    }
27524
 
27525
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
27526
    public boolean isSetToCartId() {
27527
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
27528
    }
27529
 
27530
    public void setToCartIdIsSet(boolean value) {
27531
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
27532
    }
27533
 
27534
    public void setFieldValue(_Fields field, Object value) {
27535
      switch (field) {
27536
      case FROM_CART_ID:
27537
        if (value == null) {
27538
          unsetFromCartId();
27539
        } else {
27540
          setFromCartId((Long)value);
27541
        }
27542
        break;
27543
 
27544
      case TO_CART_ID:
27545
        if (value == null) {
27546
          unsetToCartId();
27547
        } else {
27548
          setToCartId((Long)value);
27549
        }
27550
        break;
27551
 
27552
      }
27553
    }
27554
 
27555
    public void setFieldValue(int fieldID, Object value) {
27556
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27557
    }
27558
 
27559
    public Object getFieldValue(_Fields field) {
27560
      switch (field) {
27561
      case FROM_CART_ID:
27562
        return new Long(getFromCartId());
27563
 
27564
      case TO_CART_ID:
27565
        return new Long(getToCartId());
27566
 
27567
      }
27568
      throw new IllegalStateException();
27569
    }
27570
 
27571
    public Object getFieldValue(int fieldId) {
27572
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27573
    }
27574
 
27575
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27576
    public boolean isSet(_Fields field) {
27577
      switch (field) {
27578
      case FROM_CART_ID:
27579
        return isSetFromCartId();
27580
      case TO_CART_ID:
27581
        return isSetToCartId();
27582
      }
27583
      throw new IllegalStateException();
27584
    }
27585
 
27586
    public boolean isSet(int fieldID) {
27587
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27588
    }
27589
 
27590
    @Override
27591
    public boolean equals(Object that) {
27592
      if (that == null)
27593
        return false;
27594
      if (that instanceof mergeCart_args)
27595
        return this.equals((mergeCart_args)that);
27596
      return false;
27597
    }
27598
 
27599
    public boolean equals(mergeCart_args that) {
27600
      if (that == null)
27601
        return false;
27602
 
27603
      boolean this_present_fromCartId = true;
27604
      boolean that_present_fromCartId = true;
27605
      if (this_present_fromCartId || that_present_fromCartId) {
27606
        if (!(this_present_fromCartId && that_present_fromCartId))
27607
          return false;
27608
        if (this.fromCartId != that.fromCartId)
27609
          return false;
27610
      }
27611
 
27612
      boolean this_present_toCartId = true;
27613
      boolean that_present_toCartId = true;
27614
      if (this_present_toCartId || that_present_toCartId) {
27615
        if (!(this_present_toCartId && that_present_toCartId))
27616
          return false;
27617
        if (this.toCartId != that.toCartId)
27618
          return false;
27619
      }
27620
 
27621
      return true;
27622
    }
27623
 
27624
    @Override
27625
    public int hashCode() {
27626
      return 0;
27627
    }
27628
 
27629
    public int compareTo(mergeCart_args other) {
27630
      if (!getClass().equals(other.getClass())) {
27631
        return getClass().getName().compareTo(other.getClass().getName());
27632
      }
27633
 
27634
      int lastComparison = 0;
27635
      mergeCart_args typedOther = (mergeCart_args)other;
27636
 
27637
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
27638
      if (lastComparison != 0) {
27639
        return lastComparison;
27640
      }
27641
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
27642
      if (lastComparison != 0) {
27643
        return lastComparison;
27644
      }
27645
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
27646
      if (lastComparison != 0) {
27647
        return lastComparison;
27648
      }
27649
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
27650
      if (lastComparison != 0) {
27651
        return lastComparison;
27652
      }
27653
      return 0;
27654
    }
27655
 
27656
    public void read(TProtocol iprot) throws TException {
27657
      TField field;
27658
      iprot.readStructBegin();
27659
      while (true)
27660
      {
27661
        field = iprot.readFieldBegin();
27662
        if (field.type == TType.STOP) { 
27663
          break;
27664
        }
27665
        _Fields fieldId = _Fields.findByThriftId(field.id);
27666
        if (fieldId == null) {
27667
          TProtocolUtil.skip(iprot, field.type);
27668
        } else {
27669
          switch (fieldId) {
27670
            case FROM_CART_ID:
27671
              if (field.type == TType.I64) {
27672
                this.fromCartId = iprot.readI64();
27673
                setFromCartIdIsSet(true);
27674
              } else { 
27675
                TProtocolUtil.skip(iprot, field.type);
27676
              }
27677
              break;
27678
            case TO_CART_ID:
27679
              if (field.type == TType.I64) {
27680
                this.toCartId = iprot.readI64();
27681
                setToCartIdIsSet(true);
27682
              } else { 
27683
                TProtocolUtil.skip(iprot, field.type);
27684
              }
27685
              break;
27686
          }
27687
          iprot.readFieldEnd();
27688
        }
27689
      }
27690
      iprot.readStructEnd();
27691
      validate();
27692
    }
27693
 
27694
    public void write(TProtocol oprot) throws TException {
27695
      validate();
27696
 
27697
      oprot.writeStructBegin(STRUCT_DESC);
27698
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
27699
      oprot.writeI64(this.fromCartId);
27700
      oprot.writeFieldEnd();
27701
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
27702
      oprot.writeI64(this.toCartId);
27703
      oprot.writeFieldEnd();
27704
      oprot.writeFieldStop();
27705
      oprot.writeStructEnd();
27706
    }
27707
 
27708
    @Override
27709
    public String toString() {
27710
      StringBuilder sb = new StringBuilder("mergeCart_args(");
27711
      boolean first = true;
27712
 
27713
      sb.append("fromCartId:");
27714
      sb.append(this.fromCartId);
27715
      first = false;
27716
      if (!first) sb.append(", ");
27717
      sb.append("toCartId:");
27718
      sb.append(this.toCartId);
27719
      first = false;
27720
      sb.append(")");
27721
      return sb.toString();
27722
    }
27723
 
27724
    public void validate() throws TException {
27725
      // check for required fields
27726
    }
27727
 
27728
  }
27729
 
27730
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
27731
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
27732
 
27733
 
27734
 
27735
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27736
    public enum _Fields implements TFieldIdEnum {
27737
;
27738
 
27739
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27740
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27741
 
27742
      static {
27743
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27744
          byId.put((int)field._thriftId, field);
27745
          byName.put(field.getFieldName(), field);
27746
        }
27747
      }
27748
 
27749
      /**
27750
       * Find the _Fields constant that matches fieldId, or null if its not found.
27751
       */
27752
      public static _Fields findByThriftId(int fieldId) {
27753
        return byId.get(fieldId);
27754
      }
27755
 
27756
      /**
27757
       * Find the _Fields constant that matches fieldId, throwing an exception
27758
       * if it is not found.
27759
       */
27760
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27761
        _Fields fields = findByThriftId(fieldId);
27762
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27763
        return fields;
27764
      }
27765
 
27766
      /**
27767
       * Find the _Fields constant that matches name, or null if its not found.
27768
       */
27769
      public static _Fields findByName(String name) {
27770
        return byName.get(name);
27771
      }
27772
 
27773
      private final short _thriftId;
27774
      private final String _fieldName;
27775
 
27776
      _Fields(short thriftId, String fieldName) {
27777
        _thriftId = thriftId;
27778
        _fieldName = fieldName;
27779
      }
27780
 
27781
      public short getThriftFieldId() {
27782
        return _thriftId;
27783
      }
27784
 
27785
      public String getFieldName() {
27786
        return _fieldName;
27787
      }
27788
    }
27789
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27790
    }});
27791
 
27792
    static {
27793
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
27794
    }
27795
 
27796
    public mergeCart_result() {
27797
    }
27798
 
27799
    /**
27800
     * Performs a deep copy on <i>other</i>.
27801
     */
27802
    public mergeCart_result(mergeCart_result other) {
27803
    }
27804
 
27805
    public mergeCart_result deepCopy() {
27806
      return new mergeCart_result(this);
27807
    }
27808
 
27809
    @Deprecated
27810
    public mergeCart_result clone() {
27811
      return new mergeCart_result(this);
27812
    }
27813
 
27814
    public void setFieldValue(_Fields field, Object value) {
27815
      switch (field) {
27816
      }
27817
    }
27818
 
27819
    public void setFieldValue(int fieldID, Object value) {
27820
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27821
    }
27822
 
27823
    public Object getFieldValue(_Fields field) {
27824
      switch (field) {
27825
      }
27826
      throw new IllegalStateException();
27827
    }
27828
 
27829
    public Object getFieldValue(int fieldId) {
27830
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27831
    }
27832
 
27833
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27834
    public boolean isSet(_Fields field) {
27835
      switch (field) {
27836
      }
27837
      throw new IllegalStateException();
27838
    }
27839
 
27840
    public boolean isSet(int fieldID) {
27841
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27842
    }
27843
 
27844
    @Override
27845
    public boolean equals(Object that) {
27846
      if (that == null)
27847
        return false;
27848
      if (that instanceof mergeCart_result)
27849
        return this.equals((mergeCart_result)that);
27850
      return false;
27851
    }
27852
 
27853
    public boolean equals(mergeCart_result that) {
27854
      if (that == null)
27855
        return false;
27856
 
27857
      return true;
27858
    }
27859
 
27860
    @Override
27861
    public int hashCode() {
27862
      return 0;
27863
    }
27864
 
27865
    public int compareTo(mergeCart_result other) {
27866
      if (!getClass().equals(other.getClass())) {
27867
        return getClass().getName().compareTo(other.getClass().getName());
27868
      }
27869
 
27870
      int lastComparison = 0;
27871
      mergeCart_result typedOther = (mergeCart_result)other;
27872
 
27873
      return 0;
27874
    }
27875
 
27876
    public void read(TProtocol iprot) throws TException {
27877
      TField field;
27878
      iprot.readStructBegin();
27879
      while (true)
27880
      {
27881
        field = iprot.readFieldBegin();
27882
        if (field.type == TType.STOP) { 
27883
          break;
27884
        }
27885
        _Fields fieldId = _Fields.findByThriftId(field.id);
27886
        if (fieldId == null) {
27887
          TProtocolUtil.skip(iprot, field.type);
27888
        } else {
27889
          switch (fieldId) {
27890
          }
27891
          iprot.readFieldEnd();
27892
        }
27893
      }
27894
      iprot.readStructEnd();
27895
      validate();
27896
    }
27897
 
27898
    public void write(TProtocol oprot) throws TException {
27899
      oprot.writeStructBegin(STRUCT_DESC);
27900
 
27901
      oprot.writeFieldStop();
27902
      oprot.writeStructEnd();
27903
    }
27904
 
27905
    @Override
27906
    public String toString() {
27907
      StringBuilder sb = new StringBuilder("mergeCart_result(");
27908
      boolean first = true;
27909
 
27910
      sb.append(")");
27911
      return sb.toString();
27912
    }
27913
 
27914
    public void validate() throws TException {
27915
      // check for required fields
27916
    }
27917
 
27918
  }
27919
 
27920
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
27921
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
27922
 
578 chandransh 27923
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
27924
 
27925
    private long cartId;
27926
 
27927
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27928
    public enum _Fields implements TFieldIdEnum {
27929
      CART_ID((short)1, "cartId");
27930
 
27931
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27932
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27933
 
27934
      static {
27935
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27936
          byId.put((int)field._thriftId, field);
27937
          byName.put(field.getFieldName(), field);
27938
        }
27939
      }
27940
 
27941
      /**
27942
       * Find the _Fields constant that matches fieldId, or null if its not found.
27943
       */
27944
      public static _Fields findByThriftId(int fieldId) {
27945
        return byId.get(fieldId);
27946
      }
27947
 
27948
      /**
27949
       * Find the _Fields constant that matches fieldId, throwing an exception
27950
       * if it is not found.
27951
       */
27952
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27953
        _Fields fields = findByThriftId(fieldId);
27954
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27955
        return fields;
27956
      }
27957
 
27958
      /**
27959
       * Find the _Fields constant that matches name, or null if its not found.
27960
       */
27961
      public static _Fields findByName(String name) {
27962
        return byName.get(name);
27963
      }
27964
 
27965
      private final short _thriftId;
27966
      private final String _fieldName;
27967
 
27968
      _Fields(short thriftId, String fieldName) {
27969
        _thriftId = thriftId;
27970
        _fieldName = fieldName;
27971
      }
27972
 
27973
      public short getThriftFieldId() {
27974
        return _thriftId;
27975
      }
27976
 
27977
      public String getFieldName() {
27978
        return _fieldName;
27979
      }
27980
    }
27981
 
27982
    // isset id assignments
27983
    private static final int __CARTID_ISSET_ID = 0;
27984
    private BitSet __isset_bit_vector = new BitSet(1);
27985
 
27986
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27987
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
27988
          new FieldValueMetaData(TType.I64)));
27989
    }});
27990
 
27991
    static {
688 chandransh 27992
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
578 chandransh 27993
    }
27994
 
688 chandransh 27995
    public checkOut_args() {
578 chandransh 27996
    }
27997
 
688 chandransh 27998
    public checkOut_args(
578 chandransh 27999
      long cartId)
28000
    {
28001
      this();
28002
      this.cartId = cartId;
28003
      setCartIdIsSet(true);
28004
    }
28005
 
28006
    /**
28007
     * Performs a deep copy on <i>other</i>.
28008
     */
688 chandransh 28009
    public checkOut_args(checkOut_args other) {
578 chandransh 28010
      __isset_bit_vector.clear();
28011
      __isset_bit_vector.or(other.__isset_bit_vector);
28012
      this.cartId = other.cartId;
28013
    }
28014
 
688 chandransh 28015
    public checkOut_args deepCopy() {
28016
      return new checkOut_args(this);
578 chandransh 28017
    }
28018
 
28019
    @Deprecated
688 chandransh 28020
    public checkOut_args clone() {
28021
      return new checkOut_args(this);
578 chandransh 28022
    }
28023
 
28024
    public long getCartId() {
28025
      return this.cartId;
28026
    }
28027
 
688 chandransh 28028
    public checkOut_args setCartId(long cartId) {
578 chandransh 28029
      this.cartId = cartId;
28030
      setCartIdIsSet(true);
28031
      return this;
28032
    }
28033
 
28034
    public void unsetCartId() {
28035
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
28036
    }
28037
 
28038
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
28039
    public boolean isSetCartId() {
28040
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
28041
    }
28042
 
28043
    public void setCartIdIsSet(boolean value) {
28044
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
28045
    }
28046
 
28047
    public void setFieldValue(_Fields field, Object value) {
28048
      switch (field) {
28049
      case CART_ID:
28050
        if (value == null) {
28051
          unsetCartId();
28052
        } else {
28053
          setCartId((Long)value);
28054
        }
28055
        break;
28056
 
28057
      }
28058
    }
28059
 
28060
    public void setFieldValue(int fieldID, Object value) {
28061
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28062
    }
28063
 
28064
    public Object getFieldValue(_Fields field) {
28065
      switch (field) {
28066
      case CART_ID:
28067
        return new Long(getCartId());
28068
 
28069
      }
28070
      throw new IllegalStateException();
28071
    }
28072
 
28073
    public Object getFieldValue(int fieldId) {
28074
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28075
    }
28076
 
28077
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28078
    public boolean isSet(_Fields field) {
28079
      switch (field) {
28080
      case CART_ID:
28081
        return isSetCartId();
28082
      }
28083
      throw new IllegalStateException();
28084
    }
28085
 
28086
    public boolean isSet(int fieldID) {
28087
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28088
    }
28089
 
28090
    @Override
28091
    public boolean equals(Object that) {
28092
      if (that == null)
28093
        return false;
688 chandransh 28094
      if (that instanceof checkOut_args)
28095
        return this.equals((checkOut_args)that);
578 chandransh 28096
      return false;
28097
    }
28098
 
688 chandransh 28099
    public boolean equals(checkOut_args that) {
578 chandransh 28100
      if (that == null)
28101
        return false;
28102
 
28103
      boolean this_present_cartId = true;
28104
      boolean that_present_cartId = true;
28105
      if (this_present_cartId || that_present_cartId) {
28106
        if (!(this_present_cartId && that_present_cartId))
28107
          return false;
28108
        if (this.cartId != that.cartId)
28109
          return false;
28110
      }
28111
 
28112
      return true;
28113
    }
28114
 
28115
    @Override
28116
    public int hashCode() {
28117
      return 0;
28118
    }
28119
 
688 chandransh 28120
    public int compareTo(checkOut_args other) {
578 chandransh 28121
      if (!getClass().equals(other.getClass())) {
28122
        return getClass().getName().compareTo(other.getClass().getName());
28123
      }
28124
 
28125
      int lastComparison = 0;
688 chandransh 28126
      checkOut_args typedOther = (checkOut_args)other;
578 chandransh 28127
 
28128
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
28129
      if (lastComparison != 0) {
28130
        return lastComparison;
28131
      }
28132
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
28133
      if (lastComparison != 0) {
28134
        return lastComparison;
28135
      }
28136
      return 0;
28137
    }
28138
 
28139
    public void read(TProtocol iprot) throws TException {
28140
      TField field;
28141
      iprot.readStructBegin();
28142
      while (true)
28143
      {
28144
        field = iprot.readFieldBegin();
28145
        if (field.type == TType.STOP) { 
28146
          break;
28147
        }
28148
        _Fields fieldId = _Fields.findByThriftId(field.id);
28149
        if (fieldId == null) {
28150
          TProtocolUtil.skip(iprot, field.type);
28151
        } else {
28152
          switch (fieldId) {
28153
            case CART_ID:
28154
              if (field.type == TType.I64) {
28155
                this.cartId = iprot.readI64();
28156
                setCartIdIsSet(true);
28157
              } else { 
28158
                TProtocolUtil.skip(iprot, field.type);
28159
              }
28160
              break;
28161
          }
28162
          iprot.readFieldEnd();
28163
        }
28164
      }
28165
      iprot.readStructEnd();
28166
      validate();
28167
    }
28168
 
28169
    public void write(TProtocol oprot) throws TException {
28170
      validate();
28171
 
28172
      oprot.writeStructBegin(STRUCT_DESC);
28173
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
28174
      oprot.writeI64(this.cartId);
28175
      oprot.writeFieldEnd();
28176
      oprot.writeFieldStop();
28177
      oprot.writeStructEnd();
28178
    }
28179
 
28180
    @Override
28181
    public String toString() {
688 chandransh 28182
      StringBuilder sb = new StringBuilder("checkOut_args(");
578 chandransh 28183
      boolean first = true;
28184
 
28185
      sb.append("cartId:");
28186
      sb.append(this.cartId);
28187
      first = false;
28188
      sb.append(")");
28189
      return sb.toString();
28190
    }
28191
 
28192
    public void validate() throws TException {
28193
      // check for required fields
28194
    }
28195
 
28196
  }
28197
 
688 chandransh 28198
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
28199
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
578 chandransh 28200
 
28201
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
28202
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
28203
 
28204
    private boolean success;
28205
    private ShoppingCartException scex;
28206
 
28207
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28208
    public enum _Fields implements TFieldIdEnum {
28209
      SUCCESS((short)0, "success"),
28210
      SCEX((short)1, "scex");
28211
 
28212
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28213
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28214
 
28215
      static {
28216
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28217
          byId.put((int)field._thriftId, field);
28218
          byName.put(field.getFieldName(), field);
28219
        }
28220
      }
28221
 
28222
      /**
28223
       * Find the _Fields constant that matches fieldId, or null if its not found.
28224
       */
28225
      public static _Fields findByThriftId(int fieldId) {
28226
        return byId.get(fieldId);
28227
      }
28228
 
28229
      /**
28230
       * Find the _Fields constant that matches fieldId, throwing an exception
28231
       * if it is not found.
28232
       */
28233
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28234
        _Fields fields = findByThriftId(fieldId);
28235
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28236
        return fields;
28237
      }
28238
 
28239
      /**
28240
       * Find the _Fields constant that matches name, or null if its not found.
28241
       */
28242
      public static _Fields findByName(String name) {
28243
        return byName.get(name);
28244
      }
28245
 
28246
      private final short _thriftId;
28247
      private final String _fieldName;
28248
 
28249
      _Fields(short thriftId, String fieldName) {
28250
        _thriftId = thriftId;
28251
        _fieldName = fieldName;
28252
      }
28253
 
28254
      public short getThriftFieldId() {
28255
        return _thriftId;
28256
      }
28257
 
28258
      public String getFieldName() {
28259
        return _fieldName;
28260
      }
28261
    }
28262
 
28263
    // isset id assignments
28264
    private static final int __SUCCESS_ISSET_ID = 0;
28265
    private BitSet __isset_bit_vector = new BitSet(1);
28266
 
28267
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28268
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28269
          new FieldValueMetaData(TType.BOOL)));
28270
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
28271
          new FieldValueMetaData(TType.STRUCT)));
28272
    }});
28273
 
28274
    static {
688 chandransh 28275
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
578 chandransh 28276
    }
28277
 
688 chandransh 28278
    public checkOut_result() {
578 chandransh 28279
    }
28280
 
688 chandransh 28281
    public checkOut_result(
578 chandransh 28282
      boolean success,
28283
      ShoppingCartException scex)
28284
    {
28285
      this();
28286
      this.success = success;
28287
      setSuccessIsSet(true);
28288
      this.scex = scex;
28289
    }
28290
 
28291
    /**
28292
     * Performs a deep copy on <i>other</i>.
28293
     */
688 chandransh 28294
    public checkOut_result(checkOut_result other) {
578 chandransh 28295
      __isset_bit_vector.clear();
28296
      __isset_bit_vector.or(other.__isset_bit_vector);
28297
      this.success = other.success;
28298
      if (other.isSetScex()) {
28299
        this.scex = new ShoppingCartException(other.scex);
28300
      }
28301
    }
28302
 
688 chandransh 28303
    public checkOut_result deepCopy() {
28304
      return new checkOut_result(this);
578 chandransh 28305
    }
28306
 
28307
    @Deprecated
688 chandransh 28308
    public checkOut_result clone() {
28309
      return new checkOut_result(this);
578 chandransh 28310
    }
28311
 
28312
    public boolean isSuccess() {
28313
      return this.success;
28314
    }
28315
 
688 chandransh 28316
    public checkOut_result setSuccess(boolean success) {
578 chandransh 28317
      this.success = success;
28318
      setSuccessIsSet(true);
28319
      return this;
28320
    }
28321
 
28322
    public void unsetSuccess() {
28323
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
28324
    }
28325
 
28326
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28327
    public boolean isSetSuccess() {
28328
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
28329
    }
28330
 
28331
    public void setSuccessIsSet(boolean value) {
28332
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
28333
    }
28334
 
28335
    public ShoppingCartException getScex() {
28336
      return this.scex;
28337
    }
28338
 
688 chandransh 28339
    public checkOut_result setScex(ShoppingCartException scex) {
578 chandransh 28340
      this.scex = scex;
28341
      return this;
28342
    }
28343
 
28344
    public void unsetScex() {
28345
      this.scex = null;
28346
    }
28347
 
28348
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
28349
    public boolean isSetScex() {
28350
      return this.scex != null;
28351
    }
28352
 
28353
    public void setScexIsSet(boolean value) {
28354
      if (!value) {
28355
        this.scex = null;
28356
      }
28357
    }
28358
 
28359
    public void setFieldValue(_Fields field, Object value) {
28360
      switch (field) {
28361
      case SUCCESS:
28362
        if (value == null) {
28363
          unsetSuccess();
28364
        } else {
28365
          setSuccess((Boolean)value);
28366
        }
28367
        break;
28368
 
28369
      case SCEX:
28370
        if (value == null) {
28371
          unsetScex();
28372
        } else {
28373
          setScex((ShoppingCartException)value);
28374
        }
28375
        break;
28376
 
28377
      }
28378
    }
28379
 
28380
    public void setFieldValue(int fieldID, Object value) {
28381
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28382
    }
28383
 
28384
    public Object getFieldValue(_Fields field) {
28385
      switch (field) {
28386
      case SUCCESS:
28387
        return new Boolean(isSuccess());
28388
 
28389
      case SCEX:
28390
        return getScex();
28391
 
28392
      }
28393
      throw new IllegalStateException();
28394
    }
28395
 
28396
    public Object getFieldValue(int fieldId) {
28397
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28398
    }
28399
 
28400
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28401
    public boolean isSet(_Fields field) {
28402
      switch (field) {
28403
      case SUCCESS:
28404
        return isSetSuccess();
28405
      case SCEX:
28406
        return isSetScex();
28407
      }
28408
      throw new IllegalStateException();
28409
    }
28410
 
28411
    public boolean isSet(int fieldID) {
28412
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28413
    }
28414
 
28415
    @Override
28416
    public boolean equals(Object that) {
28417
      if (that == null)
28418
        return false;
688 chandransh 28419
      if (that instanceof checkOut_result)
28420
        return this.equals((checkOut_result)that);
578 chandransh 28421
      return false;
28422
    }
28423
 
688 chandransh 28424
    public boolean equals(checkOut_result that) {
578 chandransh 28425
      if (that == null)
28426
        return false;
28427
 
28428
      boolean this_present_success = true;
28429
      boolean that_present_success = true;
28430
      if (this_present_success || that_present_success) {
28431
        if (!(this_present_success && that_present_success))
28432
          return false;
28433
        if (this.success != that.success)
28434
          return false;
28435
      }
28436
 
28437
      boolean this_present_scex = true && this.isSetScex();
28438
      boolean that_present_scex = true && that.isSetScex();
28439
      if (this_present_scex || that_present_scex) {
28440
        if (!(this_present_scex && that_present_scex))
28441
          return false;
28442
        if (!this.scex.equals(that.scex))
28443
          return false;
28444
      }
28445
 
28446
      return true;
28447
    }
28448
 
28449
    @Override
28450
    public int hashCode() {
28451
      return 0;
28452
    }
28453
 
688 chandransh 28454
    public int compareTo(checkOut_result other) {
578 chandransh 28455
      if (!getClass().equals(other.getClass())) {
28456
        return getClass().getName().compareTo(other.getClass().getName());
28457
      }
28458
 
28459
      int lastComparison = 0;
688 chandransh 28460
      checkOut_result typedOther = (checkOut_result)other;
578 chandransh 28461
 
28462
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28463
      if (lastComparison != 0) {
28464
        return lastComparison;
28465
      }
28466
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28467
      if (lastComparison != 0) {
28468
        return lastComparison;
28469
      }
28470
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
28471
      if (lastComparison != 0) {
28472
        return lastComparison;
28473
      }
28474
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
28475
      if (lastComparison != 0) {
28476
        return lastComparison;
28477
      }
28478
      return 0;
28479
    }
28480
 
28481
    public void read(TProtocol iprot) throws TException {
28482
      TField field;
28483
      iprot.readStructBegin();
28484
      while (true)
28485
      {
28486
        field = iprot.readFieldBegin();
28487
        if (field.type == TType.STOP) { 
28488
          break;
28489
        }
28490
        _Fields fieldId = _Fields.findByThriftId(field.id);
28491
        if (fieldId == null) {
28492
          TProtocolUtil.skip(iprot, field.type);
28493
        } else {
28494
          switch (fieldId) {
28495
            case SUCCESS:
28496
              if (field.type == TType.BOOL) {
28497
                this.success = iprot.readBool();
28498
                setSuccessIsSet(true);
28499
              } else { 
28500
                TProtocolUtil.skip(iprot, field.type);
28501
              }
28502
              break;
28503
            case SCEX:
28504
              if (field.type == TType.STRUCT) {
28505
                this.scex = new ShoppingCartException();
28506
                this.scex.read(iprot);
28507
              } else { 
28508
                TProtocolUtil.skip(iprot, field.type);
28509
              }
28510
              break;
28511
          }
28512
          iprot.readFieldEnd();
28513
        }
28514
      }
28515
      iprot.readStructEnd();
28516
      validate();
28517
    }
28518
 
28519
    public void write(TProtocol oprot) throws TException {
28520
      oprot.writeStructBegin(STRUCT_DESC);
28521
 
28522
      if (this.isSetSuccess()) {
28523
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28524
        oprot.writeBool(this.success);
28525
        oprot.writeFieldEnd();
28526
      } else if (this.isSetScex()) {
28527
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
28528
        this.scex.write(oprot);
28529
        oprot.writeFieldEnd();
28530
      }
28531
      oprot.writeFieldStop();
28532
      oprot.writeStructEnd();
28533
    }
28534
 
28535
    @Override
28536
    public String toString() {
688 chandransh 28537
      StringBuilder sb = new StringBuilder("checkOut_result(");
578 chandransh 28538
      boolean first = true;
28539
 
28540
      sb.append("success:");
28541
      sb.append(this.success);
28542
      first = false;
28543
      if (!first) sb.append(", ");
28544
      sb.append("scex:");
28545
      if (this.scex == null) {
28546
        sb.append("null");
28547
      } else {
28548
        sb.append(this.scex);
28549
      }
28550
      first = false;
28551
      sb.append(")");
28552
      return sb.toString();
28553
    }
28554
 
28555
    public void validate() throws TException {
28556
      // check for required fields
28557
    }
28558
 
28559
  }
28560
 
688 chandransh 28561
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
28562
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
553 chandransh 28563
 
688 chandransh 28564
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
28565
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
553 chandransh 28566
 
688 chandransh 28567
    private long cartId;
708 rajveer 28568
    private Map<Long,Double> items;
553 chandransh 28569
 
28570
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28571
    public enum _Fields implements TFieldIdEnum {
688 chandransh 28572
      CART_ID((short)1, "cartId"),
28573
      ITEMS((short)2, "items");
553 chandransh 28574
 
28575
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28576
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28577
 
28578
      static {
28579
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28580
          byId.put((int)field._thriftId, field);
28581
          byName.put(field.getFieldName(), field);
28582
        }
28583
      }
28584
 
28585
      /**
28586
       * Find the _Fields constant that matches fieldId, or null if its not found.
28587
       */
28588
      public static _Fields findByThriftId(int fieldId) {
28589
        return byId.get(fieldId);
28590
      }
28591
 
28592
      /**
28593
       * Find the _Fields constant that matches fieldId, throwing an exception
28594
       * if it is not found.
28595
       */
28596
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28597
        _Fields fields = findByThriftId(fieldId);
28598
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28599
        return fields;
28600
      }
28601
 
28602
      /**
28603
       * Find the _Fields constant that matches name, or null if its not found.
28604
       */
28605
      public static _Fields findByName(String name) {
28606
        return byName.get(name);
28607
      }
28608
 
28609
      private final short _thriftId;
28610
      private final String _fieldName;
28611
 
28612
      _Fields(short thriftId, String fieldName) {
28613
        _thriftId = thriftId;
28614
        _fieldName = fieldName;
28615
      }
28616
 
28617
      public short getThriftFieldId() {
28618
        return _thriftId;
28619
      }
28620
 
28621
      public String getFieldName() {
28622
        return _fieldName;
28623
      }
28624
    }
28625
 
28626
    // isset id assignments
688 chandransh 28627
    private static final int __CARTID_ISSET_ID = 0;
28628
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 28629
 
28630
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 28631
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
553 chandransh 28632
          new FieldValueMetaData(TType.I64)));
688 chandransh 28633
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
28634
          new MapMetaData(TType.MAP, 
28635
              new FieldValueMetaData(TType.I64), 
708 rajveer 28636
              new FieldValueMetaData(TType.DOUBLE))));
553 chandransh 28637
    }});
28638
 
28639
    static {
688 chandransh 28640
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
553 chandransh 28641
    }
28642
 
688 chandransh 28643
    public resetCart_args() {
553 chandransh 28644
    }
28645
 
688 chandransh 28646
    public resetCart_args(
28647
      long cartId,
708 rajveer 28648
      Map<Long,Double> items)
553 chandransh 28649
    {
28650
      this();
688 chandransh 28651
      this.cartId = cartId;
28652
      setCartIdIsSet(true);
28653
      this.items = items;
553 chandransh 28654
    }
28655
 
28656
    /**
28657
     * Performs a deep copy on <i>other</i>.
28658
     */
688 chandransh 28659
    public resetCart_args(resetCart_args other) {
553 chandransh 28660
      __isset_bit_vector.clear();
28661
      __isset_bit_vector.or(other.__isset_bit_vector);
688 chandransh 28662
      this.cartId = other.cartId;
28663
      if (other.isSetItems()) {
708 rajveer 28664
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
28665
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {
688 chandransh 28666
 
28667
          Long other_element_key = other_element.getKey();
708 rajveer 28668
          Double other_element_value = other_element.getValue();
688 chandransh 28669
 
28670
          Long __this__items_copy_key = other_element_key;
28671
 
708 rajveer 28672
          Double __this__items_copy_value = other_element_value;
688 chandransh 28673
 
28674
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
28675
        }
28676
        this.items = __this__items;
28677
      }
553 chandransh 28678
    }
28679
 
688 chandransh 28680
    public resetCart_args deepCopy() {
28681
      return new resetCart_args(this);
553 chandransh 28682
    }
28683
 
28684
    @Deprecated
688 chandransh 28685
    public resetCart_args clone() {
28686
      return new resetCart_args(this);
553 chandransh 28687
    }
28688
 
688 chandransh 28689
    public long getCartId() {
28690
      return this.cartId;
553 chandransh 28691
    }
28692
 
688 chandransh 28693
    public resetCart_args setCartId(long cartId) {
28694
      this.cartId = cartId;
28695
      setCartIdIsSet(true);
48 ashish 28696
      return this;
28697
    }
28698
 
688 chandransh 28699
    public void unsetCartId() {
28700
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 28701
    }
28702
 
688 chandransh 28703
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
28704
    public boolean isSetCartId() {
28705
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 28706
    }
28707
 
688 chandransh 28708
    public void setCartIdIsSet(boolean value) {
28709
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 28710
    }
28711
 
688 chandransh 28712
    public int getItemsSize() {
28713
      return (this.items == null) ? 0 : this.items.size();
553 chandransh 28714
    }
28715
 
708 rajveer 28716
    public void putToItems(long key, double val) {
688 chandransh 28717
      if (this.items == null) {
708 rajveer 28718
        this.items = new HashMap<Long,Double>();
688 chandransh 28719
      }
28720
      this.items.put(key, val);
28721
    }
28722
 
708 rajveer 28723
    public Map<Long,Double> getItems() {
688 chandransh 28724
      return this.items;
28725
    }
28726
 
708 rajveer 28727
    public resetCart_args setItems(Map<Long,Double> items) {
688 chandransh 28728
      this.items = items;
553 chandransh 28729
      return this;
28730
    }
28731
 
688 chandransh 28732
    public void unsetItems() {
28733
      this.items = null;
553 chandransh 28734
    }
28735
 
688 chandransh 28736
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
28737
    public boolean isSetItems() {
28738
      return this.items != null;
553 chandransh 28739
    }
28740
 
688 chandransh 28741
    public void setItemsIsSet(boolean value) {
28742
      if (!value) {
28743
        this.items = null;
28744
      }
553 chandransh 28745
    }
28746
 
28747
    public void setFieldValue(_Fields field, Object value) {
28748
      switch (field) {
688 chandransh 28749
      case CART_ID:
553 chandransh 28750
        if (value == null) {
688 chandransh 28751
          unsetCartId();
553 chandransh 28752
        } else {
688 chandransh 28753
          setCartId((Long)value);
553 chandransh 28754
        }
28755
        break;
28756
 
688 chandransh 28757
      case ITEMS:
553 chandransh 28758
        if (value == null) {
688 chandransh 28759
          unsetItems();
553 chandransh 28760
        } else {
708 rajveer 28761
          setItems((Map<Long,Double>)value);
553 chandransh 28762
        }
28763
        break;
28764
 
28765
      }
28766
    }
28767
 
28768
    public void setFieldValue(int fieldID, Object value) {
28769
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28770
    }
28771
 
28772
    public Object getFieldValue(_Fields field) {
28773
      switch (field) {
688 chandransh 28774
      case CART_ID:
28775
        return new Long(getCartId());
553 chandransh 28776
 
688 chandransh 28777
      case ITEMS:
28778
        return getItems();
553 chandransh 28779
 
28780
      }
28781
      throw new IllegalStateException();
28782
    }
28783
 
28784
    public Object getFieldValue(int fieldId) {
28785
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28786
    }
28787
 
28788
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28789
    public boolean isSet(_Fields field) {
28790
      switch (field) {
688 chandransh 28791
      case CART_ID:
28792
        return isSetCartId();
28793
      case ITEMS:
28794
        return isSetItems();
553 chandransh 28795
      }
28796
      throw new IllegalStateException();
28797
    }
28798
 
28799
    public boolean isSet(int fieldID) {
28800
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28801
    }
28802
 
28803
    @Override
28804
    public boolean equals(Object that) {
28805
      if (that == null)
28806
        return false;
688 chandransh 28807
      if (that instanceof resetCart_args)
28808
        return this.equals((resetCart_args)that);
553 chandransh 28809
      return false;
28810
    }
28811
 
688 chandransh 28812
    public boolean equals(resetCart_args that) {
553 chandransh 28813
      if (that == null)
28814
        return false;
28815
 
688 chandransh 28816
      boolean this_present_cartId = true;
28817
      boolean that_present_cartId = true;
28818
      if (this_present_cartId || that_present_cartId) {
28819
        if (!(this_present_cartId && that_present_cartId))
553 chandransh 28820
          return false;
688 chandransh 28821
        if (this.cartId != that.cartId)
553 chandransh 28822
          return false;
28823
      }
28824
 
688 chandransh 28825
      boolean this_present_items = true && this.isSetItems();
28826
      boolean that_present_items = true && that.isSetItems();
28827
      if (this_present_items || that_present_items) {
28828
        if (!(this_present_items && that_present_items))
553 chandransh 28829
          return false;
688 chandransh 28830
        if (!this.items.equals(that.items))
553 chandransh 28831
          return false;
28832
      }
28833
 
28834
      return true;
28835
    }
28836
 
28837
    @Override
28838
    public int hashCode() {
28839
      return 0;
28840
    }
28841
 
28842
    public void read(TProtocol iprot) throws TException {
28843
      TField field;
28844
      iprot.readStructBegin();
28845
      while (true)
28846
      {
28847
        field = iprot.readFieldBegin();
28848
        if (field.type == TType.STOP) { 
28849
          break;
28850
        }
28851
        _Fields fieldId = _Fields.findByThriftId(field.id);
28852
        if (fieldId == null) {
28853
          TProtocolUtil.skip(iprot, field.type);
28854
        } else {
28855
          switch (fieldId) {
688 chandransh 28856
            case CART_ID:
553 chandransh 28857
              if (field.type == TType.I64) {
688 chandransh 28858
                this.cartId = iprot.readI64();
28859
                setCartIdIsSet(true);
553 chandransh 28860
              } else { 
28861
                TProtocolUtil.skip(iprot, field.type);
28862
              }
28863
              break;
688 chandransh 28864
            case ITEMS:
28865
              if (field.type == TType.MAP) {
28866
                {
771 rajveer 28867
                  TMap _map32 = iprot.readMapBegin();
28868
                  this.items = new HashMap<Long,Double>(2*_map32.size);
28869
                  for (int _i33 = 0; _i33 < _map32.size; ++_i33)
688 chandransh 28870
                  {
771 rajveer 28871
                    long _key34;
28872
                    double _val35;
28873
                    _key34 = iprot.readI64();
28874
                    _val35 = iprot.readDouble();
28875
                    this.items.put(_key34, _val35);
688 chandransh 28876
                  }
28877
                  iprot.readMapEnd();
28878
                }
553 chandransh 28879
              } else { 
28880
                TProtocolUtil.skip(iprot, field.type);
28881
              }
28882
              break;
28883
          }
28884
          iprot.readFieldEnd();
28885
        }
28886
      }
28887
      iprot.readStructEnd();
28888
      validate();
28889
    }
28890
 
28891
    public void write(TProtocol oprot) throws TException {
28892
      validate();
28893
 
28894
      oprot.writeStructBegin(STRUCT_DESC);
688 chandransh 28895
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
28896
      oprot.writeI64(this.cartId);
553 chandransh 28897
      oprot.writeFieldEnd();
688 chandransh 28898
      if (this.items != null) {
28899
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
28900
        {
708 rajveer 28901
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
771 rajveer 28902
          for (Map.Entry<Long, Double> _iter36 : this.items.entrySet())
688 chandransh 28903
          {
771 rajveer 28904
            oprot.writeI64(_iter36.getKey());
28905
            oprot.writeDouble(_iter36.getValue());
688 chandransh 28906
          }
28907
          oprot.writeMapEnd();
28908
        }
28909
        oprot.writeFieldEnd();
28910
      }
553 chandransh 28911
      oprot.writeFieldStop();
28912
      oprot.writeStructEnd();
28913
    }
28914
 
28915
    @Override
28916
    public String toString() {
688 chandransh 28917
      StringBuilder sb = new StringBuilder("resetCart_args(");
553 chandransh 28918
      boolean first = true;
28919
 
688 chandransh 28920
      sb.append("cartId:");
28921
      sb.append(this.cartId);
553 chandransh 28922
      first = false;
28923
      if (!first) sb.append(", ");
688 chandransh 28924
      sb.append("items:");
28925
      if (this.items == null) {
28926
        sb.append("null");
28927
      } else {
28928
        sb.append(this.items);
28929
      }
553 chandransh 28930
      first = false;
28931
      sb.append(")");
28932
      return sb.toString();
28933
    }
28934
 
28935
    public void validate() throws TException {
28936
      // check for required fields
28937
    }
28938
 
28939
  }
28940
 
688 chandransh 28941
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
28942
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
553 chandransh 28943
 
688 chandransh 28944
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
28945
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
553 chandransh 28946
 
688 chandransh 28947
    private boolean success;
28948
    private ShoppingCartException scex;
553 chandransh 28949
 
28950
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28951
    public enum _Fields implements TFieldIdEnum {
688 chandransh 28952
      SUCCESS((short)0, "success"),
28953
      SCEX((short)1, "scex");
553 chandransh 28954
 
28955
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28956
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28957
 
28958
      static {
28959
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28960
          byId.put((int)field._thriftId, field);
28961
          byName.put(field.getFieldName(), field);
28962
        }
28963
      }
28964
 
28965
      /**
28966
       * Find the _Fields constant that matches fieldId, or null if its not found.
28967
       */
28968
      public static _Fields findByThriftId(int fieldId) {
28969
        return byId.get(fieldId);
28970
      }
28971
 
28972
      /**
28973
       * Find the _Fields constant that matches fieldId, throwing an exception
28974
       * if it is not found.
28975
       */
28976
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28977
        _Fields fields = findByThriftId(fieldId);
28978
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28979
        return fields;
28980
      }
28981
 
28982
      /**
28983
       * Find the _Fields constant that matches name, or null if its not found.
28984
       */
28985
      public static _Fields findByName(String name) {
28986
        return byName.get(name);
28987
      }
28988
 
28989
      private final short _thriftId;
28990
      private final String _fieldName;
28991
 
28992
      _Fields(short thriftId, String fieldName) {
28993
        _thriftId = thriftId;
28994
        _fieldName = fieldName;
28995
      }
28996
 
28997
      public short getThriftFieldId() {
28998
        return _thriftId;
28999
      }
29000
 
29001
      public String getFieldName() {
29002
        return _fieldName;
29003
      }
29004
    }
688 chandransh 29005
 
29006
    // isset id assignments
29007
    private static final int __SUCCESS_ISSET_ID = 0;
29008
    private BitSet __isset_bit_vector = new BitSet(1);
29009
 
553 chandransh 29010
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 29011
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29012
          new FieldValueMetaData(TType.BOOL)));
29013
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
29014
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 29015
    }});
29016
 
29017
    static {
688 chandransh 29018
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
553 chandransh 29019
    }
29020
 
688 chandransh 29021
    public resetCart_result() {
553 chandransh 29022
    }
29023
 
688 chandransh 29024
    public resetCart_result(
29025
      boolean success,
29026
      ShoppingCartException scex)
29027
    {
29028
      this();
29029
      this.success = success;
29030
      setSuccessIsSet(true);
29031
      this.scex = scex;
29032
    }
29033
 
553 chandransh 29034
    /**
29035
     * Performs a deep copy on <i>other</i>.
29036
     */
688 chandransh 29037
    public resetCart_result(resetCart_result other) {
29038
      __isset_bit_vector.clear();
29039
      __isset_bit_vector.or(other.__isset_bit_vector);
29040
      this.success = other.success;
29041
      if (other.isSetScex()) {
29042
        this.scex = new ShoppingCartException(other.scex);
29043
      }
553 chandransh 29044
    }
29045
 
688 chandransh 29046
    public resetCart_result deepCopy() {
29047
      return new resetCart_result(this);
553 chandransh 29048
    }
29049
 
29050
    @Deprecated
688 chandransh 29051
    public resetCart_result clone() {
29052
      return new resetCart_result(this);
553 chandransh 29053
    }
29054
 
688 chandransh 29055
    public boolean isSuccess() {
29056
      return this.success;
29057
    }
29058
 
29059
    public resetCart_result setSuccess(boolean success) {
29060
      this.success = success;
29061
      setSuccessIsSet(true);
29062
      return this;
29063
    }
29064
 
29065
    public void unsetSuccess() {
29066
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29067
    }
29068
 
29069
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29070
    public boolean isSetSuccess() {
29071
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29072
    }
29073
 
29074
    public void setSuccessIsSet(boolean value) {
29075
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29076
    }
29077
 
29078
    public ShoppingCartException getScex() {
29079
      return this.scex;
29080
    }
29081
 
29082
    public resetCart_result setScex(ShoppingCartException scex) {
29083
      this.scex = scex;
29084
      return this;
29085
    }
29086
 
29087
    public void unsetScex() {
29088
      this.scex = null;
29089
    }
29090
 
29091
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
29092
    public boolean isSetScex() {
29093
      return this.scex != null;
29094
    }
29095
 
29096
    public void setScexIsSet(boolean value) {
29097
      if (!value) {
29098
        this.scex = null;
29099
      }
29100
    }
29101
 
553 chandransh 29102
    public void setFieldValue(_Fields field, Object value) {
29103
      switch (field) {
688 chandransh 29104
      case SUCCESS:
29105
        if (value == null) {
29106
          unsetSuccess();
29107
        } else {
29108
          setSuccess((Boolean)value);
29109
        }
29110
        break;
29111
 
29112
      case SCEX:
29113
        if (value == null) {
29114
          unsetScex();
29115
        } else {
29116
          setScex((ShoppingCartException)value);
29117
        }
29118
        break;
29119
 
553 chandransh 29120
      }
29121
    }
29122
 
29123
    public void setFieldValue(int fieldID, Object value) {
29124
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29125
    }
29126
 
29127
    public Object getFieldValue(_Fields field) {
29128
      switch (field) {
688 chandransh 29129
      case SUCCESS:
29130
        return new Boolean(isSuccess());
29131
 
29132
      case SCEX:
29133
        return getScex();
29134
 
553 chandransh 29135
      }
29136
      throw new IllegalStateException();
29137
    }
29138
 
29139
    public Object getFieldValue(int fieldId) {
29140
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29141
    }
29142
 
29143
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29144
    public boolean isSet(_Fields field) {
29145
      switch (field) {
688 chandransh 29146
      case SUCCESS:
29147
        return isSetSuccess();
29148
      case SCEX:
29149
        return isSetScex();
553 chandransh 29150
      }
29151
      throw new IllegalStateException();
29152
    }
29153
 
29154
    public boolean isSet(int fieldID) {
29155
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29156
    }
29157
 
29158
    @Override
29159
    public boolean equals(Object that) {
29160
      if (that == null)
29161
        return false;
688 chandransh 29162
      if (that instanceof resetCart_result)
29163
        return this.equals((resetCart_result)that);
553 chandransh 29164
      return false;
29165
    }
29166
 
688 chandransh 29167
    public boolean equals(resetCart_result that) {
553 chandransh 29168
      if (that == null)
29169
        return false;
29170
 
688 chandransh 29171
      boolean this_present_success = true;
29172
      boolean that_present_success = true;
29173
      if (this_present_success || that_present_success) {
29174
        if (!(this_present_success && that_present_success))
29175
          return false;
29176
        if (this.success != that.success)
29177
          return false;
29178
      }
29179
 
29180
      boolean this_present_scex = true && this.isSetScex();
29181
      boolean that_present_scex = true && that.isSetScex();
29182
      if (this_present_scex || that_present_scex) {
29183
        if (!(this_present_scex && that_present_scex))
29184
          return false;
29185
        if (!this.scex.equals(that.scex))
29186
          return false;
29187
      }
29188
 
553 chandransh 29189
      return true;
29190
    }
29191
 
29192
    @Override
29193
    public int hashCode() {
29194
      return 0;
29195
    }
29196
 
688 chandransh 29197
    public int compareTo(resetCart_result other) {
553 chandransh 29198
      if (!getClass().equals(other.getClass())) {
29199
        return getClass().getName().compareTo(other.getClass().getName());
29200
      }
29201
 
29202
      int lastComparison = 0;
688 chandransh 29203
      resetCart_result typedOther = (resetCart_result)other;
553 chandransh 29204
 
688 chandransh 29205
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29206
      if (lastComparison != 0) {
29207
        return lastComparison;
29208
      }
29209
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29210
      if (lastComparison != 0) {
29211
        return lastComparison;
29212
      }
29213
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
29214
      if (lastComparison != 0) {
29215
        return lastComparison;
29216
      }
29217
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
29218
      if (lastComparison != 0) {
29219
        return lastComparison;
29220
      }
553 chandransh 29221
      return 0;
29222
    }
29223
 
29224
    public void read(TProtocol iprot) throws TException {
29225
      TField field;
29226
      iprot.readStructBegin();
29227
      while (true)
29228
      {
29229
        field = iprot.readFieldBegin();
29230
        if (field.type == TType.STOP) { 
29231
          break;
29232
        }
29233
        _Fields fieldId = _Fields.findByThriftId(field.id);
29234
        if (fieldId == null) {
29235
          TProtocolUtil.skip(iprot, field.type);
29236
        } else {
29237
          switch (fieldId) {
688 chandransh 29238
            case SUCCESS:
29239
              if (field.type == TType.BOOL) {
29240
                this.success = iprot.readBool();
29241
                setSuccessIsSet(true);
29242
              } else { 
29243
                TProtocolUtil.skip(iprot, field.type);
29244
              }
29245
              break;
29246
            case SCEX:
29247
              if (field.type == TType.STRUCT) {
29248
                this.scex = new ShoppingCartException();
29249
                this.scex.read(iprot);
29250
              } else { 
29251
                TProtocolUtil.skip(iprot, field.type);
29252
              }
29253
              break;
553 chandransh 29254
          }
29255
          iprot.readFieldEnd();
29256
        }
29257
      }
29258
      iprot.readStructEnd();
29259
      validate();
29260
    }
29261
 
29262
    public void write(TProtocol oprot) throws TException {
29263
      oprot.writeStructBegin(STRUCT_DESC);
29264
 
688 chandransh 29265
      if (this.isSetSuccess()) {
29266
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29267
        oprot.writeBool(this.success);
29268
        oprot.writeFieldEnd();
29269
      } else if (this.isSetScex()) {
29270
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
29271
        this.scex.write(oprot);
29272
        oprot.writeFieldEnd();
29273
      }
553 chandransh 29274
      oprot.writeFieldStop();
29275
      oprot.writeStructEnd();
29276
    }
29277
 
29278
    @Override
29279
    public String toString() {
688 chandransh 29280
      StringBuilder sb = new StringBuilder("resetCart_result(");
553 chandransh 29281
      boolean first = true;
29282
 
688 chandransh 29283
      sb.append("success:");
29284
      sb.append(this.success);
29285
      first = false;
29286
      if (!first) sb.append(", ");
29287
      sb.append("scex:");
29288
      if (this.scex == null) {
29289
        sb.append("null");
29290
      } else {
29291
        sb.append(this.scex);
29292
      }
29293
      first = false;
553 chandransh 29294
      sb.append(")");
29295
      return sb.toString();
29296
    }
29297
 
29298
    public void validate() throws TException {
29299
      // check for required fields
29300
    }
29301
 
29302
  }
29303
 
771 rajveer 29304
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
29305
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
553 chandransh 29306
 
771 rajveer 29307
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 29308
 
29309
    private long userId;
29310
 
29311
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29312
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29313
      USER_ID((short)1, "userId");
553 chandransh 29314
 
29315
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29316
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29317
 
29318
      static {
29319
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29320
          byId.put((int)field._thriftId, field);
29321
          byName.put(field.getFieldName(), field);
29322
        }
29323
      }
29324
 
29325
      /**
29326
       * Find the _Fields constant that matches fieldId, or null if its not found.
29327
       */
29328
      public static _Fields findByThriftId(int fieldId) {
29329
        return byId.get(fieldId);
29330
      }
29331
 
29332
      /**
29333
       * Find the _Fields constant that matches fieldId, throwing an exception
29334
       * if it is not found.
29335
       */
29336
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29337
        _Fields fields = findByThriftId(fieldId);
29338
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29339
        return fields;
29340
      }
29341
 
29342
      /**
29343
       * Find the _Fields constant that matches name, or null if its not found.
29344
       */
29345
      public static _Fields findByName(String name) {
29346
        return byName.get(name);
29347
      }
29348
 
29349
      private final short _thriftId;
29350
      private final String _fieldName;
29351
 
29352
      _Fields(short thriftId, String fieldName) {
29353
        _thriftId = thriftId;
29354
        _fieldName = fieldName;
29355
      }
29356
 
29357
      public short getThriftFieldId() {
29358
        return _thriftId;
29359
      }
29360
 
29361
      public String getFieldName() {
29362
        return _fieldName;
29363
      }
29364
    }
29365
 
29366
    // isset id assignments
29367
    private static final int __USERID_ISSET_ID = 0;
771 rajveer 29368
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 29369
 
29370
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29371
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
29372
          new FieldValueMetaData(TType.I64)));
29373
    }});
29374
 
29375
    static {
771 rajveer 29376
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
553 chandransh 29377
    }
29378
 
771 rajveer 29379
    public getMyResearch_args() {
553 chandransh 29380
    }
29381
 
771 rajveer 29382
    public getMyResearch_args(
29383
      long userId)
553 chandransh 29384
    {
29385
      this();
29386
      this.userId = userId;
29387
      setUserIdIsSet(true);
29388
    }
29389
 
29390
    /**
29391
     * Performs a deep copy on <i>other</i>.
29392
     */
771 rajveer 29393
    public getMyResearch_args(getMyResearch_args other) {
553 chandransh 29394
      __isset_bit_vector.clear();
29395
      __isset_bit_vector.or(other.__isset_bit_vector);
29396
      this.userId = other.userId;
29397
    }
29398
 
771 rajveer 29399
    public getMyResearch_args deepCopy() {
29400
      return new getMyResearch_args(this);
553 chandransh 29401
    }
29402
 
29403
    @Deprecated
771 rajveer 29404
    public getMyResearch_args clone() {
29405
      return new getMyResearch_args(this);
553 chandransh 29406
    }
29407
 
29408
    public long getUserId() {
29409
      return this.userId;
29410
    }
29411
 
771 rajveer 29412
    public getMyResearch_args setUserId(long userId) {
553 chandransh 29413
      this.userId = userId;
29414
      setUserIdIsSet(true);
29415
      return this;
29416
    }
29417
 
29418
    public void unsetUserId() {
29419
      __isset_bit_vector.clear(__USERID_ISSET_ID);
29420
    }
29421
 
29422
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
29423
    public boolean isSetUserId() {
29424
      return __isset_bit_vector.get(__USERID_ISSET_ID);
29425
    }
29426
 
29427
    public void setUserIdIsSet(boolean value) {
29428
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
29429
    }
29430
 
48 ashish 29431
    public void setFieldValue(_Fields field, Object value) {
29432
      switch (field) {
553 chandransh 29433
      case USER_ID:
48 ashish 29434
        if (value == null) {
553 chandransh 29435
          unsetUserId();
48 ashish 29436
        } else {
553 chandransh 29437
          setUserId((Long)value);
48 ashish 29438
        }
29439
        break;
29440
 
29441
      }
29442
    }
29443
 
29444
    public void setFieldValue(int fieldID, Object value) {
29445
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29446
    }
29447
 
29448
    public Object getFieldValue(_Fields field) {
29449
      switch (field) {
553 chandransh 29450
      case USER_ID:
29451
        return new Long(getUserId());
48 ashish 29452
 
29453
      }
29454
      throw new IllegalStateException();
29455
    }
29456
 
29457
    public Object getFieldValue(int fieldId) {
29458
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29459
    }
29460
 
29461
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29462
    public boolean isSet(_Fields field) {
29463
      switch (field) {
553 chandransh 29464
      case USER_ID:
29465
        return isSetUserId();
48 ashish 29466
      }
29467
      throw new IllegalStateException();
29468
    }
29469
 
29470
    public boolean isSet(int fieldID) {
29471
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29472
    }
29473
 
29474
    @Override
29475
    public boolean equals(Object that) {
29476
      if (that == null)
29477
        return false;
771 rajveer 29478
      if (that instanceof getMyResearch_args)
29479
        return this.equals((getMyResearch_args)that);
48 ashish 29480
      return false;
29481
    }
29482
 
771 rajveer 29483
    public boolean equals(getMyResearch_args that) {
48 ashish 29484
      if (that == null)
29485
        return false;
29486
 
553 chandransh 29487
      boolean this_present_userId = true;
29488
      boolean that_present_userId = true;
29489
      if (this_present_userId || that_present_userId) {
29490
        if (!(this_present_userId && that_present_userId))
48 ashish 29491
          return false;
553 chandransh 29492
        if (this.userId != that.userId)
48 ashish 29493
          return false;
29494
      }
29495
 
29496
      return true;
29497
    }
29498
 
29499
    @Override
29500
    public int hashCode() {
29501
      return 0;
29502
    }
29503
 
771 rajveer 29504
    public int compareTo(getMyResearch_args other) {
48 ashish 29505
      if (!getClass().equals(other.getClass())) {
29506
        return getClass().getName().compareTo(other.getClass().getName());
29507
      }
29508
 
29509
      int lastComparison = 0;
771 rajveer 29510
      getMyResearch_args typedOther = (getMyResearch_args)other;
48 ashish 29511
 
553 chandransh 29512
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 29513
      if (lastComparison != 0) {
29514
        return lastComparison;
29515
      }
553 chandransh 29516
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 29517
      if (lastComparison != 0) {
29518
        return lastComparison;
29519
      }
29520
      return 0;
29521
    }
29522
 
29523
    public void read(TProtocol iprot) throws TException {
29524
      TField field;
29525
      iprot.readStructBegin();
29526
      while (true)
29527
      {
29528
        field = iprot.readFieldBegin();
29529
        if (field.type == TType.STOP) { 
29530
          break;
29531
        }
29532
        _Fields fieldId = _Fields.findByThriftId(field.id);
29533
        if (fieldId == null) {
29534
          TProtocolUtil.skip(iprot, field.type);
29535
        } else {
29536
          switch (fieldId) {
553 chandransh 29537
            case USER_ID:
29538
              if (field.type == TType.I64) {
29539
                this.userId = iprot.readI64();
29540
                setUserIdIsSet(true);
48 ashish 29541
              } else { 
29542
                TProtocolUtil.skip(iprot, field.type);
29543
              }
29544
              break;
29545
          }
29546
          iprot.readFieldEnd();
29547
        }
29548
      }
29549
      iprot.readStructEnd();
29550
      validate();
29551
    }
29552
 
29553
    public void write(TProtocol oprot) throws TException {
29554
      validate();
29555
 
29556
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 29557
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
29558
      oprot.writeI64(this.userId);
29559
      oprot.writeFieldEnd();
29560
      oprot.writeFieldStop();
29561
      oprot.writeStructEnd();
29562
    }
29563
 
29564
    @Override
29565
    public String toString() {
771 rajveer 29566
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
553 chandransh 29567
      boolean first = true;
29568
 
29569
      sb.append("userId:");
29570
      sb.append(this.userId);
29571
      first = false;
29572
      sb.append(")");
29573
      return sb.toString();
29574
    }
29575
 
29576
    public void validate() throws TException {
29577
      // check for required fields
29578
    }
29579
 
29580
  }
29581
 
29582
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
29583
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
29584
 
29585
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
29586
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
29587
 
29588
    private Widget success;
29589
    private WidgetException scx;
29590
 
29591
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29592
    public enum _Fields implements TFieldIdEnum {
29593
      SUCCESS((short)0, "success"),
29594
      SCX((short)1, "scx");
29595
 
29596
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29597
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29598
 
29599
      static {
29600
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29601
          byId.put((int)field._thriftId, field);
29602
          byName.put(field.getFieldName(), field);
29603
        }
29604
      }
29605
 
29606
      /**
29607
       * Find the _Fields constant that matches fieldId, or null if its not found.
29608
       */
29609
      public static _Fields findByThriftId(int fieldId) {
29610
        return byId.get(fieldId);
29611
      }
29612
 
29613
      /**
29614
       * Find the _Fields constant that matches fieldId, throwing an exception
29615
       * if it is not found.
29616
       */
29617
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29618
        _Fields fields = findByThriftId(fieldId);
29619
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29620
        return fields;
29621
      }
29622
 
29623
      /**
29624
       * Find the _Fields constant that matches name, or null if its not found.
29625
       */
29626
      public static _Fields findByName(String name) {
29627
        return byName.get(name);
29628
      }
29629
 
29630
      private final short _thriftId;
29631
      private final String _fieldName;
29632
 
29633
      _Fields(short thriftId, String fieldName) {
29634
        _thriftId = thriftId;
29635
        _fieldName = fieldName;
29636
      }
29637
 
29638
      public short getThriftFieldId() {
29639
        return _thriftId;
29640
      }
29641
 
29642
      public String getFieldName() {
29643
        return _fieldName;
29644
      }
29645
    }
29646
 
29647
    // isset id assignments
29648
 
29649
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 29650
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 29651
          new StructMetaData(TType.STRUCT, Widget.class)));
29652
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 29653
          new FieldValueMetaData(TType.STRUCT)));
29654
    }});
29655
 
29656
    static {
553 chandransh 29657
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 29658
    }
29659
 
553 chandransh 29660
    public getMyResearch_result() {
48 ashish 29661
    }
29662
 
553 chandransh 29663
    public getMyResearch_result(
29664
      Widget success,
29665
      WidgetException scx)
48 ashish 29666
    {
29667
      this();
29668
      this.success = success;
553 chandransh 29669
      this.scx = scx;
48 ashish 29670
    }
29671
 
29672
    /**
29673
     * Performs a deep copy on <i>other</i>.
29674
     */
553 chandransh 29675
    public getMyResearch_result(getMyResearch_result other) {
29676
      if (other.isSetSuccess()) {
29677
        this.success = new Widget(other.success);
48 ashish 29678
      }
553 chandransh 29679
      if (other.isSetScx()) {
29680
        this.scx = new WidgetException(other.scx);
29681
      }
48 ashish 29682
    }
29683
 
553 chandransh 29684
    public getMyResearch_result deepCopy() {
29685
      return new getMyResearch_result(this);
48 ashish 29686
    }
29687
 
29688
    @Deprecated
553 chandransh 29689
    public getMyResearch_result clone() {
29690
      return new getMyResearch_result(this);
48 ashish 29691
    }
29692
 
553 chandransh 29693
    public Widget getSuccess() {
48 ashish 29694
      return this.success;
29695
    }
29696
 
553 chandransh 29697
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 29698
      this.success = success;
29699
      return this;
29700
    }
29701
 
29702
    public void unsetSuccess() {
553 chandransh 29703
      this.success = null;
48 ashish 29704
    }
29705
 
29706
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29707
    public boolean isSetSuccess() {
553 chandransh 29708
      return this.success != null;
48 ashish 29709
    }
29710
 
29711
    public void setSuccessIsSet(boolean value) {
553 chandransh 29712
      if (!value) {
29713
        this.success = null;
29714
      }
48 ashish 29715
    }
29716
 
553 chandransh 29717
    public WidgetException getScx() {
29718
      return this.scx;
48 ashish 29719
    }
29720
 
553 chandransh 29721
    public getMyResearch_result setScx(WidgetException scx) {
29722
      this.scx = scx;
48 ashish 29723
      return this;
29724
    }
29725
 
553 chandransh 29726
    public void unsetScx() {
29727
      this.scx = null;
48 ashish 29728
    }
29729
 
553 chandransh 29730
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29731
    public boolean isSetScx() {
29732
      return this.scx != null;
48 ashish 29733
    }
29734
 
553 chandransh 29735
    public void setScxIsSet(boolean value) {
48 ashish 29736
      if (!value) {
553 chandransh 29737
        this.scx = null;
48 ashish 29738
      }
29739
    }
29740
 
29741
    public void setFieldValue(_Fields field, Object value) {
29742
      switch (field) {
29743
      case SUCCESS:
29744
        if (value == null) {
29745
          unsetSuccess();
29746
        } else {
553 chandransh 29747
          setSuccess((Widget)value);
48 ashish 29748
        }
29749
        break;
29750
 
553 chandransh 29751
      case SCX:
48 ashish 29752
        if (value == null) {
553 chandransh 29753
          unsetScx();
48 ashish 29754
        } else {
553 chandransh 29755
          setScx((WidgetException)value);
48 ashish 29756
        }
29757
        break;
29758
 
29759
      }
29760
    }
29761
 
29762
    public void setFieldValue(int fieldID, Object value) {
29763
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29764
    }
29765
 
29766
    public Object getFieldValue(_Fields field) {
29767
      switch (field) {
29768
      case SUCCESS:
553 chandransh 29769
        return getSuccess();
48 ashish 29770
 
553 chandransh 29771
      case SCX:
29772
        return getScx();
48 ashish 29773
 
29774
      }
29775
      throw new IllegalStateException();
29776
    }
29777
 
29778
    public Object getFieldValue(int fieldId) {
29779
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29780
    }
29781
 
29782
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29783
    public boolean isSet(_Fields field) {
29784
      switch (field) {
29785
      case SUCCESS:
29786
        return isSetSuccess();
553 chandransh 29787
      case SCX:
29788
        return isSetScx();
48 ashish 29789
      }
29790
      throw new IllegalStateException();
29791
    }
29792
 
29793
    public boolean isSet(int fieldID) {
29794
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29795
    }
29796
 
29797
    @Override
29798
    public boolean equals(Object that) {
29799
      if (that == null)
29800
        return false;
553 chandransh 29801
      if (that instanceof getMyResearch_result)
29802
        return this.equals((getMyResearch_result)that);
48 ashish 29803
      return false;
29804
    }
29805
 
553 chandransh 29806
    public boolean equals(getMyResearch_result that) {
48 ashish 29807
      if (that == null)
29808
        return false;
29809
 
553 chandransh 29810
      boolean this_present_success = true && this.isSetSuccess();
29811
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 29812
      if (this_present_success || that_present_success) {
29813
        if (!(this_present_success && that_present_success))
29814
          return false;
553 chandransh 29815
        if (!this.success.equals(that.success))
48 ashish 29816
          return false;
29817
      }
29818
 
553 chandransh 29819
      boolean this_present_scx = true && this.isSetScx();
29820
      boolean that_present_scx = true && that.isSetScx();
29821
      if (this_present_scx || that_present_scx) {
29822
        if (!(this_present_scx && that_present_scx))
48 ashish 29823
          return false;
553 chandransh 29824
        if (!this.scx.equals(that.scx))
48 ashish 29825
          return false;
29826
      }
29827
 
29828
      return true;
29829
    }
29830
 
29831
    @Override
29832
    public int hashCode() {
29833
      return 0;
29834
    }
29835
 
553 chandransh 29836
    public int compareTo(getMyResearch_result other) {
48 ashish 29837
      if (!getClass().equals(other.getClass())) {
29838
        return getClass().getName().compareTo(other.getClass().getName());
29839
      }
29840
 
29841
      int lastComparison = 0;
553 chandransh 29842
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 29843
 
29844
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29845
      if (lastComparison != 0) {
29846
        return lastComparison;
29847
      }
29848
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29849
      if (lastComparison != 0) {
29850
        return lastComparison;
29851
      }
553 chandransh 29852
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 29853
      if (lastComparison != 0) {
29854
        return lastComparison;
29855
      }
553 chandransh 29856
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 29857
      if (lastComparison != 0) {
29858
        return lastComparison;
29859
      }
29860
      return 0;
29861
    }
29862
 
29863
    public void read(TProtocol iprot) throws TException {
29864
      TField field;
29865
      iprot.readStructBegin();
29866
      while (true)
29867
      {
29868
        field = iprot.readFieldBegin();
29869
        if (field.type == TType.STOP) { 
29870
          break;
29871
        }
29872
        _Fields fieldId = _Fields.findByThriftId(field.id);
29873
        if (fieldId == null) {
29874
          TProtocolUtil.skip(iprot, field.type);
29875
        } else {
29876
          switch (fieldId) {
29877
            case SUCCESS:
553 chandransh 29878
              if (field.type == TType.STRUCT) {
29879
                this.success = new Widget();
29880
                this.success.read(iprot);
48 ashish 29881
              } else { 
29882
                TProtocolUtil.skip(iprot, field.type);
29883
              }
29884
              break;
553 chandransh 29885
            case SCX:
48 ashish 29886
              if (field.type == TType.STRUCT) {
553 chandransh 29887
                this.scx = new WidgetException();
29888
                this.scx.read(iprot);
48 ashish 29889
              } else { 
29890
                TProtocolUtil.skip(iprot, field.type);
29891
              }
29892
              break;
29893
          }
29894
          iprot.readFieldEnd();
29895
        }
29896
      }
29897
      iprot.readStructEnd();
29898
      validate();
29899
    }
29900
 
29901
    public void write(TProtocol oprot) throws TException {
29902
      oprot.writeStructBegin(STRUCT_DESC);
29903
 
29904
      if (this.isSetSuccess()) {
29905
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 29906
        this.success.write(oprot);
48 ashish 29907
        oprot.writeFieldEnd();
553 chandransh 29908
      } else if (this.isSetScx()) {
29909
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29910
        this.scx.write(oprot);
48 ashish 29911
        oprot.writeFieldEnd();
29912
      }
29913
      oprot.writeFieldStop();
29914
      oprot.writeStructEnd();
29915
    }
29916
 
29917
    @Override
29918
    public String toString() {
553 chandransh 29919
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 29920
      boolean first = true;
29921
 
29922
      sb.append("success:");
553 chandransh 29923
      if (this.success == null) {
29924
        sb.append("null");
29925
      } else {
29926
        sb.append(this.success);
29927
      }
48 ashish 29928
      first = false;
29929
      if (!first) sb.append(", ");
553 chandransh 29930
      sb.append("scx:");
29931
      if (this.scx == null) {
48 ashish 29932
        sb.append("null");
29933
      } else {
553 chandransh 29934
        sb.append(this.scx);
48 ashish 29935
      }
29936
      first = false;
29937
      sb.append(")");
29938
      return sb.toString();
29939
    }
29940
 
29941
    public void validate() throws TException {
29942
      // check for required fields
29943
    }
29944
 
29945
  }
29946
 
553 chandransh 29947
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
29948
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 29949
 
771 rajveer 29950
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
29951
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 29952
 
771 rajveer 29953
    private long userId;
29954
    private long itemId;
130 ashish 29955
 
29956
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29957
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29958
      USER_ID((short)1, "userId"),
29959
      ITEM_ID((short)2, "itemId");
130 ashish 29960
 
29961
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29962
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29963
 
29964
      static {
29965
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29966
          byId.put((int)field._thriftId, field);
29967
          byName.put(field.getFieldName(), field);
29968
        }
29969
      }
29970
 
29971
      /**
29972
       * Find the _Fields constant that matches fieldId, or null if its not found.
29973
       */
29974
      public static _Fields findByThriftId(int fieldId) {
29975
        return byId.get(fieldId);
29976
      }
29977
 
29978
      /**
29979
       * Find the _Fields constant that matches fieldId, throwing an exception
29980
       * if it is not found.
29981
       */
29982
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29983
        _Fields fields = findByThriftId(fieldId);
29984
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29985
        return fields;
29986
      }
29987
 
29988
      /**
29989
       * Find the _Fields constant that matches name, or null if its not found.
29990
       */
29991
      public static _Fields findByName(String name) {
29992
        return byName.get(name);
29993
      }
29994
 
29995
      private final short _thriftId;
29996
      private final String _fieldName;
29997
 
29998
      _Fields(short thriftId, String fieldName) {
29999
        _thriftId = thriftId;
30000
        _fieldName = fieldName;
30001
      }
30002
 
30003
      public short getThriftFieldId() {
30004
        return _thriftId;
30005
      }
30006
 
30007
      public String getFieldName() {
30008
        return _fieldName;
30009
      }
30010
    }
30011
 
30012
    // isset id assignments
771 rajveer 30013
    private static final int __USERID_ISSET_ID = 0;
30014
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 30015
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 30016
 
30017
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 30018
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
130 ashish 30019
          new FieldValueMetaData(TType.I64)));
771 rajveer 30020
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 30021
          new FieldValueMetaData(TType.I64)));
130 ashish 30022
    }});
30023
 
30024
    static {
553 chandransh 30025
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 30026
    }
30027
 
553 chandransh 30028
    public updateMyResearch_args() {
130 ashish 30029
    }
30030
 
553 chandransh 30031
    public updateMyResearch_args(
771 rajveer 30032
      long userId,
30033
      long itemId)
130 ashish 30034
    {
30035
      this();
771 rajveer 30036
      this.userId = userId;
30037
      setUserIdIsSet(true);
30038
      this.itemId = itemId;
30039
      setItemIdIsSet(true);
130 ashish 30040
    }
30041
 
30042
    /**
30043
     * Performs a deep copy on <i>other</i>.
30044
     */
553 chandransh 30045
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 30046
      __isset_bit_vector.clear();
30047
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 30048
      this.userId = other.userId;
30049
      this.itemId = other.itemId;
130 ashish 30050
    }
30051
 
553 chandransh 30052
    public updateMyResearch_args deepCopy() {
30053
      return new updateMyResearch_args(this);
130 ashish 30054
    }
30055
 
30056
    @Deprecated
553 chandransh 30057
    public updateMyResearch_args clone() {
30058
      return new updateMyResearch_args(this);
130 ashish 30059
    }
30060
 
771 rajveer 30061
    public long getUserId() {
30062
      return this.userId;
130 ashish 30063
    }
30064
 
771 rajveer 30065
    public updateMyResearch_args setUserId(long userId) {
30066
      this.userId = userId;
30067
      setUserIdIsSet(true);
130 ashish 30068
      return this;
30069
    }
30070
 
771 rajveer 30071
    public void unsetUserId() {
30072
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 30073
    }
30074
 
771 rajveer 30075
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
30076
    public boolean isSetUserId() {
30077
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 30078
    }
30079
 
771 rajveer 30080
    public void setUserIdIsSet(boolean value) {
30081
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 30082
    }
30083
 
771 rajveer 30084
    public long getItemId() {
30085
      return this.itemId;
553 chandransh 30086
    }
30087
 
771 rajveer 30088
    public updateMyResearch_args setItemId(long itemId) {
30089
      this.itemId = itemId;
30090
      setItemIdIsSet(true);
553 chandransh 30091
      return this;
30092
    }
30093
 
771 rajveer 30094
    public void unsetItemId() {
30095
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 30096
    }
30097
 
771 rajveer 30098
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
30099
    public boolean isSetItemId() {
30100
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 30101
    }
30102
 
771 rajveer 30103
    public void setItemIdIsSet(boolean value) {
30104
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 30105
    }
30106
 
130 ashish 30107
    public void setFieldValue(_Fields field, Object value) {
30108
      switch (field) {
553 chandransh 30109
      case USER_ID:
130 ashish 30110
        if (value == null) {
771 rajveer 30111
          unsetUserId();
130 ashish 30112
        } else {
771 rajveer 30113
          setUserId((Long)value);
130 ashish 30114
        }
30115
        break;
30116
 
553 chandransh 30117
      case ITEM_ID:
30118
        if (value == null) {
771 rajveer 30119
          unsetItemId();
553 chandransh 30120
        } else {
771 rajveer 30121
          setItemId((Long)value);
553 chandransh 30122
        }
30123
        break;
30124
 
130 ashish 30125
      }
30126
    }
30127
 
30128
    public void setFieldValue(int fieldID, Object value) {
30129
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30130
    }
30131
 
30132
    public Object getFieldValue(_Fields field) {
30133
      switch (field) {
553 chandransh 30134
      case USER_ID:
771 rajveer 30135
        return new Long(getUserId());
130 ashish 30136
 
553 chandransh 30137
      case ITEM_ID:
771 rajveer 30138
        return new Long(getItemId());
553 chandransh 30139
 
130 ashish 30140
      }
30141
      throw new IllegalStateException();
30142
    }
30143
 
30144
    public Object getFieldValue(int fieldId) {
30145
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30146
    }
30147
 
30148
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30149
    public boolean isSet(_Fields field) {
30150
      switch (field) {
553 chandransh 30151
      case USER_ID:
771 rajveer 30152
        return isSetUserId();
553 chandransh 30153
      case ITEM_ID:
771 rajveer 30154
        return isSetItemId();
130 ashish 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;
553 chandransh 30167
      if (that instanceof updateMyResearch_args)
30168
        return this.equals((updateMyResearch_args)that);
130 ashish 30169
      return false;
30170
    }
30171
 
553 chandransh 30172
    public boolean equals(updateMyResearch_args that) {
130 ashish 30173
      if (that == null)
30174
        return false;
30175
 
771 rajveer 30176
      boolean this_present_userId = true;
30177
      boolean that_present_userId = true;
30178
      if (this_present_userId || that_present_userId) {
30179
        if (!(this_present_userId && that_present_userId))
130 ashish 30180
          return false;
771 rajveer 30181
        if (this.userId != that.userId)
130 ashish 30182
          return false;
30183
      }
30184
 
771 rajveer 30185
      boolean this_present_itemId = true;
30186
      boolean that_present_itemId = true;
30187
      if (this_present_itemId || that_present_itemId) {
30188
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 30189
          return false;
771 rajveer 30190
        if (this.itemId != that.itemId)
553 chandransh 30191
          return false;
30192
      }
30193
 
130 ashish 30194
      return true;
30195
    }
30196
 
30197
    @Override
30198
    public int hashCode() {
30199
      return 0;
30200
    }
30201
 
553 chandransh 30202
    public int compareTo(updateMyResearch_args other) {
130 ashish 30203
      if (!getClass().equals(other.getClass())) {
30204
        return getClass().getName().compareTo(other.getClass().getName());
30205
      }
30206
 
30207
      int lastComparison = 0;
553 chandransh 30208
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 30209
 
771 rajveer 30210
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 30211
      if (lastComparison != 0) {
30212
        return lastComparison;
30213
      }
771 rajveer 30214
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 30215
      if (lastComparison != 0) {
30216
        return lastComparison;
30217
      }
771 rajveer 30218
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 30219
      if (lastComparison != 0) {
30220
        return lastComparison;
30221
      }
771 rajveer 30222
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 30223
      if (lastComparison != 0) {
30224
        return lastComparison;
30225
      }
130 ashish 30226
      return 0;
30227
    }
30228
 
30229
    public void read(TProtocol iprot) throws TException {
30230
      TField field;
30231
      iprot.readStructBegin();
30232
      while (true)
30233
      {
30234
        field = iprot.readFieldBegin();
30235
        if (field.type == TType.STOP) { 
30236
          break;
30237
        }
30238
        _Fields fieldId = _Fields.findByThriftId(field.id);
30239
        if (fieldId == null) {
30240
          TProtocolUtil.skip(iprot, field.type);
30241
        } else {
30242
          switch (fieldId) {
553 chandransh 30243
            case USER_ID:
130 ashish 30244
              if (field.type == TType.I64) {
771 rajveer 30245
                this.userId = iprot.readI64();
30246
                setUserIdIsSet(true);
130 ashish 30247
              } else { 
30248
                TProtocolUtil.skip(iprot, field.type);
30249
              }
30250
              break;
553 chandransh 30251
            case ITEM_ID:
30252
              if (field.type == TType.I64) {
771 rajveer 30253
                this.itemId = iprot.readI64();
30254
                setItemIdIsSet(true);
553 chandransh 30255
              } else { 
30256
                TProtocolUtil.skip(iprot, field.type);
30257
              }
30258
              break;
130 ashish 30259
          }
30260
          iprot.readFieldEnd();
30261
        }
30262
      }
30263
      iprot.readStructEnd();
30264
      validate();
30265
    }
30266
 
30267
    public void write(TProtocol oprot) throws TException {
30268
      validate();
30269
 
30270
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 30271
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 30272
      oprot.writeI64(this.userId);
130 ashish 30273
      oprot.writeFieldEnd();
553 chandransh 30274
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 30275
      oprot.writeI64(this.itemId);
553 chandransh 30276
      oprot.writeFieldEnd();
130 ashish 30277
      oprot.writeFieldStop();
30278
      oprot.writeStructEnd();
30279
    }
30280
 
30281
    @Override
30282
    public String toString() {
553 chandransh 30283
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 30284
      boolean first = true;
30285
 
771 rajveer 30286
      sb.append("userId:");
30287
      sb.append(this.userId);
130 ashish 30288
      first = false;
553 chandransh 30289
      if (!first) sb.append(", ");
771 rajveer 30290
      sb.append("itemId:");
30291
      sb.append(this.itemId);
553 chandransh 30292
      first = false;
130 ashish 30293
      sb.append(")");
30294
      return sb.toString();
30295
    }
30296
 
30297
    public void validate() throws TException {
30298
      // check for required fields
30299
    }
30300
 
30301
  }
30302
 
553 chandransh 30303
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
30304
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 30305
 
30306
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 30307
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 30308
 
30309
    private boolean success;
553 chandransh 30310
    private WidgetException scx;
130 ashish 30311
 
30312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30313
    public enum _Fields implements TFieldIdEnum {
30314
      SUCCESS((short)0, "success"),
553 chandransh 30315
      SCX((short)1, "scx");
130 ashish 30316
 
30317
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30318
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30319
 
30320
      static {
30321
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30322
          byId.put((int)field._thriftId, field);
30323
          byName.put(field.getFieldName(), field);
30324
        }
30325
      }
30326
 
30327
      /**
30328
       * Find the _Fields constant that matches fieldId, or null if its not found.
30329
       */
30330
      public static _Fields findByThriftId(int fieldId) {
30331
        return byId.get(fieldId);
30332
      }
30333
 
30334
      /**
30335
       * Find the _Fields constant that matches fieldId, throwing an exception
30336
       * if it is not found.
30337
       */
30338
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30339
        _Fields fields = findByThriftId(fieldId);
30340
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30341
        return fields;
30342
      }
30343
 
30344
      /**
30345
       * Find the _Fields constant that matches name, or null if its not found.
30346
       */
30347
      public static _Fields findByName(String name) {
30348
        return byName.get(name);
30349
      }
30350
 
30351
      private final short _thriftId;
30352
      private final String _fieldName;
30353
 
30354
      _Fields(short thriftId, String fieldName) {
30355
        _thriftId = thriftId;
30356
        _fieldName = fieldName;
30357
      }
30358
 
30359
      public short getThriftFieldId() {
30360
        return _thriftId;
30361
      }
30362
 
30363
      public String getFieldName() {
30364
        return _fieldName;
30365
      }
30366
    }
30367
 
30368
    // isset id assignments
30369
    private static final int __SUCCESS_ISSET_ID = 0;
30370
    private BitSet __isset_bit_vector = new BitSet(1);
30371
 
30372
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30373
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30374
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 30375
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 30376
          new FieldValueMetaData(TType.STRUCT)));
30377
    }});
30378
 
30379
    static {
553 chandransh 30380
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 30381
    }
30382
 
553 chandransh 30383
    public updateMyResearch_result() {
130 ashish 30384
    }
30385
 
553 chandransh 30386
    public updateMyResearch_result(
130 ashish 30387
      boolean success,
553 chandransh 30388
      WidgetException scx)
130 ashish 30389
    {
30390
      this();
30391
      this.success = success;
30392
      setSuccessIsSet(true);
553 chandransh 30393
      this.scx = scx;
130 ashish 30394
    }
30395
 
30396
    /**
30397
     * Performs a deep copy on <i>other</i>.
30398
     */
553 chandransh 30399
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 30400
      __isset_bit_vector.clear();
30401
      __isset_bit_vector.or(other.__isset_bit_vector);
30402
      this.success = other.success;
553 chandransh 30403
      if (other.isSetScx()) {
30404
        this.scx = new WidgetException(other.scx);
130 ashish 30405
      }
30406
    }
30407
 
553 chandransh 30408
    public updateMyResearch_result deepCopy() {
30409
      return new updateMyResearch_result(this);
130 ashish 30410
    }
30411
 
30412
    @Deprecated
553 chandransh 30413
    public updateMyResearch_result clone() {
30414
      return new updateMyResearch_result(this);
130 ashish 30415
    }
30416
 
30417
    public boolean isSuccess() {
30418
      return this.success;
30419
    }
30420
 
553 chandransh 30421
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 30422
      this.success = success;
30423
      setSuccessIsSet(true);
30424
      return this;
30425
    }
30426
 
30427
    public void unsetSuccess() {
30428
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
30429
    }
30430
 
30431
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30432
    public boolean isSetSuccess() {
30433
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
30434
    }
30435
 
30436
    public void setSuccessIsSet(boolean value) {
30437
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
30438
    }
30439
 
553 chandransh 30440
    public WidgetException getScx() {
30441
      return this.scx;
130 ashish 30442
    }
30443
 
553 chandransh 30444
    public updateMyResearch_result setScx(WidgetException scx) {
30445
      this.scx = scx;
130 ashish 30446
      return this;
30447
    }
30448
 
553 chandransh 30449
    public void unsetScx() {
30450
      this.scx = null;
130 ashish 30451
    }
30452
 
553 chandransh 30453
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30454
    public boolean isSetScx() {
30455
      return this.scx != null;
130 ashish 30456
    }
30457
 
553 chandransh 30458
    public void setScxIsSet(boolean value) {
130 ashish 30459
      if (!value) {
553 chandransh 30460
        this.scx = null;
130 ashish 30461
      }
30462
    }
30463
 
30464
    public void setFieldValue(_Fields field, Object value) {
30465
      switch (field) {
30466
      case SUCCESS:
30467
        if (value == null) {
30468
          unsetSuccess();
30469
        } else {
30470
          setSuccess((Boolean)value);
30471
        }
30472
        break;
30473
 
553 chandransh 30474
      case SCX:
130 ashish 30475
        if (value == null) {
553 chandransh 30476
          unsetScx();
130 ashish 30477
        } else {
553 chandransh 30478
          setScx((WidgetException)value);
130 ashish 30479
        }
30480
        break;
30481
 
30482
      }
30483
    }
30484
 
30485
    public void setFieldValue(int fieldID, Object value) {
30486
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30487
    }
30488
 
30489
    public Object getFieldValue(_Fields field) {
30490
      switch (field) {
30491
      case SUCCESS:
30492
        return new Boolean(isSuccess());
30493
 
553 chandransh 30494
      case SCX:
30495
        return getScx();
130 ashish 30496
 
30497
      }
30498
      throw new IllegalStateException();
30499
    }
30500
 
30501
    public Object getFieldValue(int fieldId) {
30502
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30503
    }
30504
 
30505
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30506
    public boolean isSet(_Fields field) {
30507
      switch (field) {
30508
      case SUCCESS:
30509
        return isSetSuccess();
553 chandransh 30510
      case SCX:
30511
        return isSetScx();
130 ashish 30512
      }
30513
      throw new IllegalStateException();
30514
    }
30515
 
30516
    public boolean isSet(int fieldID) {
30517
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30518
    }
30519
 
30520
    @Override
30521
    public boolean equals(Object that) {
30522
      if (that == null)
30523
        return false;
553 chandransh 30524
      if (that instanceof updateMyResearch_result)
30525
        return this.equals((updateMyResearch_result)that);
130 ashish 30526
      return false;
30527
    }
30528
 
553 chandransh 30529
    public boolean equals(updateMyResearch_result that) {
130 ashish 30530
      if (that == null)
30531
        return false;
30532
 
30533
      boolean this_present_success = true;
30534
      boolean that_present_success = true;
30535
      if (this_present_success || that_present_success) {
30536
        if (!(this_present_success && that_present_success))
30537
          return false;
30538
        if (this.success != that.success)
30539
          return false;
30540
      }
30541
 
553 chandransh 30542
      boolean this_present_scx = true && this.isSetScx();
30543
      boolean that_present_scx = true && that.isSetScx();
30544
      if (this_present_scx || that_present_scx) {
30545
        if (!(this_present_scx && that_present_scx))
130 ashish 30546
          return false;
553 chandransh 30547
        if (!this.scx.equals(that.scx))
130 ashish 30548
          return false;
30549
      }
30550
 
30551
      return true;
30552
    }
30553
 
30554
    @Override
30555
    public int hashCode() {
30556
      return 0;
30557
    }
30558
 
553 chandransh 30559
    public int compareTo(updateMyResearch_result other) {
130 ashish 30560
      if (!getClass().equals(other.getClass())) {
30561
        return getClass().getName().compareTo(other.getClass().getName());
30562
      }
30563
 
30564
      int lastComparison = 0;
553 chandransh 30565
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 30566
 
30567
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30568
      if (lastComparison != 0) {
30569
        return lastComparison;
30570
      }
30571
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30572
      if (lastComparison != 0) {
30573
        return lastComparison;
30574
      }
553 chandransh 30575
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 30576
      if (lastComparison != 0) {
30577
        return lastComparison;
30578
      }
553 chandransh 30579
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 30580
      if (lastComparison != 0) {
30581
        return lastComparison;
30582
      }
30583
      return 0;
30584
    }
30585
 
30586
    public void read(TProtocol iprot) throws TException {
30587
      TField field;
30588
      iprot.readStructBegin();
30589
      while (true)
30590
      {
30591
        field = iprot.readFieldBegin();
30592
        if (field.type == TType.STOP) { 
30593
          break;
30594
        }
30595
        _Fields fieldId = _Fields.findByThriftId(field.id);
30596
        if (fieldId == null) {
30597
          TProtocolUtil.skip(iprot, field.type);
30598
        } else {
30599
          switch (fieldId) {
30600
            case SUCCESS:
30601
              if (field.type == TType.BOOL) {
30602
                this.success = iprot.readBool();
30603
                setSuccessIsSet(true);
30604
              } else { 
30605
                TProtocolUtil.skip(iprot, field.type);
30606
              }
30607
              break;
553 chandransh 30608
            case SCX:
130 ashish 30609
              if (field.type == TType.STRUCT) {
553 chandransh 30610
                this.scx = new WidgetException();
30611
                this.scx.read(iprot);
130 ashish 30612
              } else { 
30613
                TProtocolUtil.skip(iprot, field.type);
30614
              }
30615
              break;
30616
          }
30617
          iprot.readFieldEnd();
30618
        }
30619
      }
30620
      iprot.readStructEnd();
30621
      validate();
30622
    }
30623
 
30624
    public void write(TProtocol oprot) throws TException {
30625
      oprot.writeStructBegin(STRUCT_DESC);
30626
 
30627
      if (this.isSetSuccess()) {
30628
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30629
        oprot.writeBool(this.success);
30630
        oprot.writeFieldEnd();
553 chandransh 30631
      } else if (this.isSetScx()) {
30632
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30633
        this.scx.write(oprot);
130 ashish 30634
        oprot.writeFieldEnd();
30635
      }
30636
      oprot.writeFieldStop();
30637
      oprot.writeStructEnd();
30638
    }
30639
 
30640
    @Override
30641
    public String toString() {
553 chandransh 30642
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 30643
      boolean first = true;
30644
 
30645
      sb.append("success:");
30646
      sb.append(this.success);
30647
      first = false;
30648
      if (!first) sb.append(", ");
553 chandransh 30649
      sb.append("scx:");
30650
      if (this.scx == null) {
130 ashish 30651
        sb.append("null");
30652
      } else {
553 chandransh 30653
        sb.append(this.scx);
130 ashish 30654
      }
30655
      first = false;
30656
      sb.append(")");
30657
      return sb.toString();
30658
    }
30659
 
30660
    public void validate() throws TException {
30661
      // check for required fields
30662
    }
30663
 
30664
  }
30665
 
553 chandransh 30666
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
30667
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 30668
 
771 rajveer 30669
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
30670
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 30671
 
771 rajveer 30672
    private long userId;
30673
    private long itemId;
130 ashish 30674
 
30675
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30676
    public enum _Fields implements TFieldIdEnum {
771 rajveer 30677
      USER_ID((short)1, "userId"),
30678
      ITEM_ID((short)2, "itemId");
130 ashish 30679
 
30680
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30681
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30682
 
30683
      static {
30684
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30685
          byId.put((int)field._thriftId, field);
30686
          byName.put(field.getFieldName(), field);
30687
        }
30688
      }
30689
 
30690
      /**
30691
       * Find the _Fields constant that matches fieldId, or null if its not found.
30692
       */
30693
      public static _Fields findByThriftId(int fieldId) {
30694
        return byId.get(fieldId);
30695
      }
30696
 
30697
      /**
30698
       * Find the _Fields constant that matches fieldId, throwing an exception
30699
       * if it is not found.
30700
       */
30701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30702
        _Fields fields = findByThriftId(fieldId);
30703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30704
        return fields;
30705
      }
30706
 
30707
      /**
30708
       * Find the _Fields constant that matches name, or null if its not found.
30709
       */
30710
      public static _Fields findByName(String name) {
30711
        return byName.get(name);
30712
      }
30713
 
30714
      private final short _thriftId;
30715
      private final String _fieldName;
30716
 
30717
      _Fields(short thriftId, String fieldName) {
30718
        _thriftId = thriftId;
30719
        _fieldName = fieldName;
30720
      }
30721
 
30722
      public short getThriftFieldId() {
30723
        return _thriftId;
30724
      }
30725
 
30726
      public String getFieldName() {
30727
        return _fieldName;
30728
      }
30729
    }
30730
 
30731
    // isset id assignments
771 rajveer 30732
    private static final int __USERID_ISSET_ID = 0;
30733
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 30734
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 30735
 
30736
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 30737
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 30738
          new FieldValueMetaData(TType.I64)));
771 rajveer 30739
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 30740
          new FieldValueMetaData(TType.I64)));
130 ashish 30741
    }});
30742
 
30743
    static {
553 chandransh 30744
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 30745
    }
30746
 
553 chandransh 30747
    public deleteItemFromMyResearch_args() {
130 ashish 30748
    }
30749
 
553 chandransh 30750
    public deleteItemFromMyResearch_args(
771 rajveer 30751
      long userId,
30752
      long itemId)
130 ashish 30753
    {
30754
      this();
771 rajveer 30755
      this.userId = userId;
30756
      setUserIdIsSet(true);
30757
      this.itemId = itemId;
30758
      setItemIdIsSet(true);
130 ashish 30759
    }
30760
 
30761
    /**
30762
     * Performs a deep copy on <i>other</i>.
30763
     */
553 chandransh 30764
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 30765
      __isset_bit_vector.clear();
30766
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 30767
      this.userId = other.userId;
30768
      this.itemId = other.itemId;
553 chandransh 30769
    }
30770
 
30771
    public deleteItemFromMyResearch_args deepCopy() {
30772
      return new deleteItemFromMyResearch_args(this);
30773
    }
30774
 
30775
    @Deprecated
30776
    public deleteItemFromMyResearch_args clone() {
30777
      return new deleteItemFromMyResearch_args(this);
30778
    }
30779
 
771 rajveer 30780
    public long getUserId() {
30781
      return this.userId;
553 chandransh 30782
    }
30783
 
771 rajveer 30784
    public deleteItemFromMyResearch_args setUserId(long userId) {
30785
      this.userId = userId;
30786
      setUserIdIsSet(true);
553 chandransh 30787
      return this;
30788
    }
30789
 
771 rajveer 30790
    public void unsetUserId() {
30791
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 30792
    }
30793
 
771 rajveer 30794
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
30795
    public boolean isSetUserId() {
30796
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 30797
    }
30798
 
771 rajveer 30799
    public void setUserIdIsSet(boolean value) {
30800
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 30801
    }
30802
 
771 rajveer 30803
    public long getItemId() {
30804
      return this.itemId;
553 chandransh 30805
    }
30806
 
771 rajveer 30807
    public deleteItemFromMyResearch_args setItemId(long itemId) {
30808
      this.itemId = itemId;
30809
      setItemIdIsSet(true);
553 chandransh 30810
      return this;
30811
    }
30812
 
771 rajveer 30813
    public void unsetItemId() {
30814
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 30815
    }
30816
 
771 rajveer 30817
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
30818
    public boolean isSetItemId() {
30819
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 30820
    }
30821
 
771 rajveer 30822
    public void setItemIdIsSet(boolean value) {
30823
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 30824
    }
30825
 
30826
    public void setFieldValue(_Fields field, Object value) {
30827
      switch (field) {
30828
      case USER_ID:
30829
        if (value == null) {
771 rajveer 30830
          unsetUserId();
553 chandransh 30831
        } else {
771 rajveer 30832
          setUserId((Long)value);
553 chandransh 30833
        }
30834
        break;
30835
 
30836
      case ITEM_ID:
30837
        if (value == null) {
771 rajveer 30838
          unsetItemId();
553 chandransh 30839
        } else {
771 rajveer 30840
          setItemId((Long)value);
553 chandransh 30841
        }
30842
        break;
30843
 
130 ashish 30844
      }
30845
    }
30846
 
553 chandransh 30847
    public void setFieldValue(int fieldID, Object value) {
30848
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 30849
    }
30850
 
553 chandransh 30851
    public Object getFieldValue(_Fields field) {
30852
      switch (field) {
30853
      case USER_ID:
771 rajveer 30854
        return new Long(getUserId());
553 chandransh 30855
 
30856
      case ITEM_ID:
771 rajveer 30857
        return new Long(getItemId());
553 chandransh 30858
 
30859
      }
30860
      throw new IllegalStateException();
30861
    }
30862
 
30863
    public Object getFieldValue(int fieldId) {
30864
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30865
    }
30866
 
30867
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30868
    public boolean isSet(_Fields field) {
30869
      switch (field) {
30870
      case USER_ID:
771 rajveer 30871
        return isSetUserId();
553 chandransh 30872
      case ITEM_ID:
771 rajveer 30873
        return isSetItemId();
553 chandransh 30874
      }
30875
      throw new IllegalStateException();
30876
    }
30877
 
30878
    public boolean isSet(int fieldID) {
30879
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30880
    }
30881
 
30882
    @Override
30883
    public boolean equals(Object that) {
30884
      if (that == null)
30885
        return false;
30886
      if (that instanceof deleteItemFromMyResearch_args)
30887
        return this.equals((deleteItemFromMyResearch_args)that);
30888
      return false;
30889
    }
30890
 
30891
    public boolean equals(deleteItemFromMyResearch_args that) {
30892
      if (that == null)
30893
        return false;
30894
 
771 rajveer 30895
      boolean this_present_userId = true;
30896
      boolean that_present_userId = true;
30897
      if (this_present_userId || that_present_userId) {
30898
        if (!(this_present_userId && that_present_userId))
553 chandransh 30899
          return false;
771 rajveer 30900
        if (this.userId != that.userId)
553 chandransh 30901
          return false;
30902
      }
30903
 
771 rajveer 30904
      boolean this_present_itemId = true;
30905
      boolean that_present_itemId = true;
30906
      if (this_present_itemId || that_present_itemId) {
30907
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 30908
          return false;
771 rajveer 30909
        if (this.itemId != that.itemId)
553 chandransh 30910
          return false;
30911
      }
30912
 
30913
      return true;
30914
    }
30915
 
30916
    @Override
30917
    public int hashCode() {
30918
      return 0;
30919
    }
30920
 
30921
    public int compareTo(deleteItemFromMyResearch_args other) {
30922
      if (!getClass().equals(other.getClass())) {
30923
        return getClass().getName().compareTo(other.getClass().getName());
30924
      }
30925
 
30926
      int lastComparison = 0;
30927
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
30928
 
771 rajveer 30929
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 30930
      if (lastComparison != 0) {
30931
        return lastComparison;
30932
      }
771 rajveer 30933
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 30934
      if (lastComparison != 0) {
30935
        return lastComparison;
30936
      }
771 rajveer 30937
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 30938
      if (lastComparison != 0) {
30939
        return lastComparison;
30940
      }
771 rajveer 30941
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 30942
      if (lastComparison != 0) {
30943
        return lastComparison;
30944
      }
30945
      return 0;
30946
    }
30947
 
30948
    public void read(TProtocol iprot) throws TException {
30949
      TField field;
30950
      iprot.readStructBegin();
30951
      while (true)
30952
      {
30953
        field = iprot.readFieldBegin();
30954
        if (field.type == TType.STOP) { 
30955
          break;
30956
        }
30957
        _Fields fieldId = _Fields.findByThriftId(field.id);
30958
        if (fieldId == null) {
30959
          TProtocolUtil.skip(iprot, field.type);
30960
        } else {
30961
          switch (fieldId) {
30962
            case USER_ID:
30963
              if (field.type == TType.I64) {
771 rajveer 30964
                this.userId = iprot.readI64();
30965
                setUserIdIsSet(true);
553 chandransh 30966
              } else { 
30967
                TProtocolUtil.skip(iprot, field.type);
30968
              }
30969
              break;
30970
            case ITEM_ID:
30971
              if (field.type == TType.I64) {
771 rajveer 30972
                this.itemId = iprot.readI64();
30973
                setItemIdIsSet(true);
553 chandransh 30974
              } else { 
30975
                TProtocolUtil.skip(iprot, field.type);
30976
              }
30977
              break;
30978
          }
30979
          iprot.readFieldEnd();
30980
        }
30981
      }
30982
      iprot.readStructEnd();
30983
      validate();
30984
    }
30985
 
30986
    public void write(TProtocol oprot) throws TException {
30987
      validate();
30988
 
30989
      oprot.writeStructBegin(STRUCT_DESC);
30990
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 30991
      oprot.writeI64(this.userId);
553 chandransh 30992
      oprot.writeFieldEnd();
30993
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 30994
      oprot.writeI64(this.itemId);
553 chandransh 30995
      oprot.writeFieldEnd();
30996
      oprot.writeFieldStop();
30997
      oprot.writeStructEnd();
30998
    }
30999
 
31000
    @Override
31001
    public String toString() {
31002
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
31003
      boolean first = true;
31004
 
771 rajveer 31005
      sb.append("userId:");
31006
      sb.append(this.userId);
553 chandransh 31007
      first = false;
31008
      if (!first) sb.append(", ");
771 rajveer 31009
      sb.append("itemId:");
31010
      sb.append(this.itemId);
553 chandransh 31011
      first = false;
31012
      sb.append(")");
31013
      return sb.toString();
31014
    }
31015
 
31016
    public void validate() throws TException {
31017
      // check for required fields
31018
    }
31019
 
31020
  }
31021
 
31022
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
31023
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
31024
 
31025
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
31026
 
31027
    private WidgetException scx;
31028
 
31029
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31030
    public enum _Fields implements TFieldIdEnum {
31031
      SCX((short)1, "scx");
31032
 
31033
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31034
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31035
 
31036
      static {
31037
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31038
          byId.put((int)field._thriftId, field);
31039
          byName.put(field.getFieldName(), field);
31040
        }
31041
      }
31042
 
31043
      /**
31044
       * Find the _Fields constant that matches fieldId, or null if its not found.
31045
       */
31046
      public static _Fields findByThriftId(int fieldId) {
31047
        return byId.get(fieldId);
31048
      }
31049
 
31050
      /**
31051
       * Find the _Fields constant that matches fieldId, throwing an exception
31052
       * if it is not found.
31053
       */
31054
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31055
        _Fields fields = findByThriftId(fieldId);
31056
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31057
        return fields;
31058
      }
31059
 
31060
      /**
31061
       * Find the _Fields constant that matches name, or null if its not found.
31062
       */
31063
      public static _Fields findByName(String name) {
31064
        return byName.get(name);
31065
      }
31066
 
31067
      private final short _thriftId;
31068
      private final String _fieldName;
31069
 
31070
      _Fields(short thriftId, String fieldName) {
31071
        _thriftId = thriftId;
31072
        _fieldName = fieldName;
31073
      }
31074
 
31075
      public short getThriftFieldId() {
31076
        return _thriftId;
31077
      }
31078
 
31079
      public String getFieldName() {
31080
        return _fieldName;
31081
      }
31082
    }
31083
 
31084
    // isset id assignments
31085
 
31086
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31087
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
31088
          new FieldValueMetaData(TType.STRUCT)));
31089
    }});
31090
 
31091
    static {
31092
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
31093
    }
31094
 
31095
    public deleteItemFromMyResearch_result() {
31096
    }
31097
 
31098
    public deleteItemFromMyResearch_result(
31099
      WidgetException scx)
31100
    {
31101
      this();
31102
      this.scx = scx;
31103
    }
31104
 
31105
    /**
31106
     * Performs a deep copy on <i>other</i>.
31107
     */
31108
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
31109
      if (other.isSetScx()) {
31110
        this.scx = new WidgetException(other.scx);
31111
      }
31112
    }
31113
 
31114
    public deleteItemFromMyResearch_result deepCopy() {
31115
      return new deleteItemFromMyResearch_result(this);
31116
    }
31117
 
130 ashish 31118
    @Deprecated
553 chandransh 31119
    public deleteItemFromMyResearch_result clone() {
31120
      return new deleteItemFromMyResearch_result(this);
130 ashish 31121
    }
31122
 
553 chandransh 31123
    public WidgetException getScx() {
31124
      return this.scx;
130 ashish 31125
    }
31126
 
553 chandransh 31127
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
31128
      this.scx = scx;
130 ashish 31129
      return this;
31130
    }
31131
 
553 chandransh 31132
    public void unsetScx() {
31133
      this.scx = null;
130 ashish 31134
    }
31135
 
553 chandransh 31136
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
31137
    public boolean isSetScx() {
31138
      return this.scx != null;
130 ashish 31139
    }
31140
 
553 chandransh 31141
    public void setScxIsSet(boolean value) {
130 ashish 31142
      if (!value) {
553 chandransh 31143
        this.scx = null;
130 ashish 31144
      }
31145
    }
31146
 
553 chandransh 31147
    public void setFieldValue(_Fields field, Object value) {
31148
      switch (field) {
31149
      case SCX:
31150
        if (value == null) {
31151
          unsetScx();
31152
        } else {
31153
          setScx((WidgetException)value);
31154
        }
31155
        break;
31156
 
31157
      }
130 ashish 31158
    }
31159
 
553 chandransh 31160
    public void setFieldValue(int fieldID, Object value) {
31161
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31162
    }
31163
 
31164
    public Object getFieldValue(_Fields field) {
31165
      switch (field) {
31166
      case SCX:
31167
        return getScx();
31168
 
31169
      }
31170
      throw new IllegalStateException();
31171
    }
31172
 
31173
    public Object getFieldValue(int fieldId) {
31174
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31175
    }
31176
 
31177
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31178
    public boolean isSet(_Fields field) {
31179
      switch (field) {
31180
      case SCX:
31181
        return isSetScx();
31182
      }
31183
      throw new IllegalStateException();
31184
    }
31185
 
31186
    public boolean isSet(int fieldID) {
31187
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31188
    }
31189
 
31190
    @Override
31191
    public boolean equals(Object that) {
31192
      if (that == null)
31193
        return false;
31194
      if (that instanceof deleteItemFromMyResearch_result)
31195
        return this.equals((deleteItemFromMyResearch_result)that);
31196
      return false;
31197
    }
31198
 
31199
    public boolean equals(deleteItemFromMyResearch_result that) {
31200
      if (that == null)
31201
        return false;
31202
 
31203
      boolean this_present_scx = true && this.isSetScx();
31204
      boolean that_present_scx = true && that.isSetScx();
31205
      if (this_present_scx || that_present_scx) {
31206
        if (!(this_present_scx && that_present_scx))
31207
          return false;
31208
        if (!this.scx.equals(that.scx))
31209
          return false;
31210
      }
31211
 
31212
      return true;
31213
    }
31214
 
31215
    @Override
31216
    public int hashCode() {
31217
      return 0;
31218
    }
31219
 
31220
    public int compareTo(deleteItemFromMyResearch_result other) {
31221
      if (!getClass().equals(other.getClass())) {
31222
        return getClass().getName().compareTo(other.getClass().getName());
31223
      }
31224
 
31225
      int lastComparison = 0;
31226
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
31227
 
31228
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
31229
      if (lastComparison != 0) {
31230
        return lastComparison;
31231
      }
31232
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
31233
      if (lastComparison != 0) {
31234
        return lastComparison;
31235
      }
31236
      return 0;
31237
    }
31238
 
31239
    public void read(TProtocol iprot) throws TException {
31240
      TField field;
31241
      iprot.readStructBegin();
31242
      while (true)
31243
      {
31244
        field = iprot.readFieldBegin();
31245
        if (field.type == TType.STOP) { 
31246
          break;
31247
        }
31248
        _Fields fieldId = _Fields.findByThriftId(field.id);
31249
        if (fieldId == null) {
31250
          TProtocolUtil.skip(iprot, field.type);
31251
        } else {
31252
          switch (fieldId) {
31253
            case SCX:
31254
              if (field.type == TType.STRUCT) {
31255
                this.scx = new WidgetException();
31256
                this.scx.read(iprot);
31257
              } else { 
31258
                TProtocolUtil.skip(iprot, field.type);
31259
              }
31260
              break;
31261
          }
31262
          iprot.readFieldEnd();
31263
        }
31264
      }
31265
      iprot.readStructEnd();
31266
      validate();
31267
    }
31268
 
31269
    public void write(TProtocol oprot) throws TException {
31270
      oprot.writeStructBegin(STRUCT_DESC);
31271
 
31272
      if (this.isSetScx()) {
31273
        oprot.writeFieldBegin(SCX_FIELD_DESC);
31274
        this.scx.write(oprot);
31275
        oprot.writeFieldEnd();
31276
      }
31277
      oprot.writeFieldStop();
31278
      oprot.writeStructEnd();
31279
    }
31280
 
31281
    @Override
31282
    public String toString() {
31283
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
31284
      boolean first = true;
31285
 
31286
      sb.append("scx:");
31287
      if (this.scx == null) {
31288
        sb.append("null");
31289
      } else {
31290
        sb.append(this.scx);
31291
      }
31292
      first = false;
31293
      sb.append(")");
31294
      return sb.toString();
31295
    }
31296
 
31297
    public void validate() throws TException {
31298
      // check for required fields
31299
    }
31300
 
31301
  }
31302
 
771 rajveer 31303
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
31304
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
553 chandransh 31305
 
771 rajveer 31306
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
31307
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
553 chandransh 31308
 
771 rajveer 31309
    private long userId;
31310
    private long itemId;
553 chandransh 31311
 
31312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31313
    public enum _Fields implements TFieldIdEnum {
771 rajveer 31314
      USER_ID((short)1, "userId"),
31315
      ITEM_ID((short)2, "itemId");
553 chandransh 31316
 
31317
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31318
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31319
 
31320
      static {
31321
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31322
          byId.put((int)field._thriftId, field);
31323
          byName.put(field.getFieldName(), field);
31324
        }
31325
      }
31326
 
31327
      /**
31328
       * Find the _Fields constant that matches fieldId, or null if its not found.
31329
       */
31330
      public static _Fields findByThriftId(int fieldId) {
31331
        return byId.get(fieldId);
31332
      }
31333
 
31334
      /**
31335
       * Find the _Fields constant that matches fieldId, throwing an exception
31336
       * if it is not found.
31337
       */
31338
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31339
        _Fields fields = findByThriftId(fieldId);
31340
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31341
        return fields;
31342
      }
31343
 
31344
      /**
31345
       * Find the _Fields constant that matches name, or null if its not found.
31346
       */
31347
      public static _Fields findByName(String name) {
31348
        return byName.get(name);
31349
      }
31350
 
31351
      private final short _thriftId;
31352
      private final String _fieldName;
31353
 
31354
      _Fields(short thriftId, String fieldName) {
31355
        _thriftId = thriftId;
31356
        _fieldName = fieldName;
31357
      }
31358
 
31359
      public short getThriftFieldId() {
31360
        return _thriftId;
31361
      }
31362
 
31363
      public String getFieldName() {
31364
        return _fieldName;
31365
      }
31366
    }
31367
 
31368
    // isset id assignments
771 rajveer 31369
    private static final int __USERID_ISSET_ID = 0;
31370
    private static final int __ITEMID_ISSET_ID = 1;
31371
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 31372
 
31373
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 31374
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 31375
          new FieldValueMetaData(TType.I64)));
771 rajveer 31376
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 31377
          new FieldValueMetaData(TType.I64)));
31378
    }});
31379
 
31380
    static {
771 rajveer 31381
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
553 chandransh 31382
    }
31383
 
771 rajveer 31384
    public updateBrowseHistory_args() {
553 chandransh 31385
    }
31386
 
771 rajveer 31387
    public updateBrowseHistory_args(
31388
      long userId,
31389
      long itemId)
553 chandransh 31390
    {
31391
      this();
771 rajveer 31392
      this.userId = userId;
31393
      setUserIdIsSet(true);
31394
      this.itemId = itemId;
31395
      setItemIdIsSet(true);
553 chandransh 31396
    }
31397
 
31398
    /**
31399
     * Performs a deep copy on <i>other</i>.
31400
     */
771 rajveer 31401
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
553 chandransh 31402
      __isset_bit_vector.clear();
31403
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 31404
      this.userId = other.userId;
31405
      this.itemId = other.itemId;
553 chandransh 31406
    }
31407
 
771 rajveer 31408
    public updateBrowseHistory_args deepCopy() {
31409
      return new updateBrowseHistory_args(this);
553 chandransh 31410
    }
31411
 
31412
    @Deprecated
771 rajveer 31413
    public updateBrowseHistory_args clone() {
31414
      return new updateBrowseHistory_args(this);
553 chandransh 31415
    }
31416
 
771 rajveer 31417
    public long getUserId() {
31418
      return this.userId;
553 chandransh 31419
    }
31420
 
771 rajveer 31421
    public updateBrowseHistory_args setUserId(long userId) {
31422
      this.userId = userId;
31423
      setUserIdIsSet(true);
130 ashish 31424
      return this;
31425
    }
31426
 
771 rajveer 31427
    public void unsetUserId() {
31428
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 31429
    }
31430
 
771 rajveer 31431
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
31432
    public boolean isSetUserId() {
31433
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 31434
    }
31435
 
771 rajveer 31436
    public void setUserIdIsSet(boolean value) {
31437
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 31438
    }
31439
 
771 rajveer 31440
    public long getItemId() {
31441
      return this.itemId;
553 chandransh 31442
    }
31443
 
771 rajveer 31444
    public updateBrowseHistory_args setItemId(long itemId) {
31445
      this.itemId = itemId;
31446
      setItemIdIsSet(true);
553 chandransh 31447
      return this;
31448
    }
31449
 
771 rajveer 31450
    public void unsetItemId() {
31451
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 31452
    }
31453
 
771 rajveer 31454
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
31455
    public boolean isSetItemId() {
31456
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 31457
    }
31458
 
771 rajveer 31459
    public void setItemIdIsSet(boolean value) {
31460
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 31461
    }
31462
 
130 ashish 31463
    public void setFieldValue(_Fields field, Object value) {
31464
      switch (field) {
771 rajveer 31465
      case USER_ID:
130 ashish 31466
        if (value == null) {
771 rajveer 31467
          unsetUserId();
130 ashish 31468
        } else {
771 rajveer 31469
          setUserId((Long)value);
130 ashish 31470
        }
31471
        break;
31472
 
771 rajveer 31473
      case ITEM_ID:
130 ashish 31474
        if (value == null) {
771 rajveer 31475
          unsetItemId();
130 ashish 31476
        } else {
771 rajveer 31477
          setItemId((Long)value);
130 ashish 31478
        }
31479
        break;
31480
 
31481
      }
31482
    }
31483
 
31484
    public void setFieldValue(int fieldID, Object value) {
31485
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31486
    }
31487
 
31488
    public Object getFieldValue(_Fields field) {
31489
      switch (field) {
771 rajveer 31490
      case USER_ID:
31491
        return new Long(getUserId());
31492
 
553 chandransh 31493
      case ITEM_ID:
771 rajveer 31494
        return new Long(getItemId());
130 ashish 31495
 
31496
      }
31497
      throw new IllegalStateException();
31498
    }
31499
 
31500
    public Object getFieldValue(int fieldId) {
31501
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31502
    }
31503
 
31504
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31505
    public boolean isSet(_Fields field) {
31506
      switch (field) {
771 rajveer 31507
      case USER_ID:
31508
        return isSetUserId();
553 chandransh 31509
      case ITEM_ID:
771 rajveer 31510
        return isSetItemId();
130 ashish 31511
      }
31512
      throw new IllegalStateException();
31513
    }
31514
 
31515
    public boolean isSet(int fieldID) {
31516
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31517
    }
31518
 
31519
    @Override
31520
    public boolean equals(Object that) {
31521
      if (that == null)
31522
        return false;
771 rajveer 31523
      if (that instanceof updateBrowseHistory_args)
31524
        return this.equals((updateBrowseHistory_args)that);
130 ashish 31525
      return false;
31526
    }
31527
 
771 rajveer 31528
    public boolean equals(updateBrowseHistory_args that) {
130 ashish 31529
      if (that == null)
31530
        return false;
31531
 
771 rajveer 31532
      boolean this_present_userId = true;
31533
      boolean that_present_userId = true;
31534
      if (this_present_userId || that_present_userId) {
31535
        if (!(this_present_userId && that_present_userId))
130 ashish 31536
          return false;
771 rajveer 31537
        if (this.userId != that.userId)
130 ashish 31538
          return false;
31539
      }
31540
 
771 rajveer 31541
      boolean this_present_itemId = true;
31542
      boolean that_present_itemId = true;
31543
      if (this_present_itemId || that_present_itemId) {
31544
        if (!(this_present_itemId && that_present_itemId))
130 ashish 31545
          return false;
771 rajveer 31546
        if (this.itemId != that.itemId)
130 ashish 31547
          return false;
31548
      }
31549
 
31550
      return true;
31551
    }
31552
 
31553
    @Override
31554
    public int hashCode() {
31555
      return 0;
31556
    }
31557
 
771 rajveer 31558
    public int compareTo(updateBrowseHistory_args other) {
130 ashish 31559
      if (!getClass().equals(other.getClass())) {
31560
        return getClass().getName().compareTo(other.getClass().getName());
31561
      }
31562
 
31563
      int lastComparison = 0;
771 rajveer 31564
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
130 ashish 31565
 
771 rajveer 31566
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 31567
      if (lastComparison != 0) {
31568
        return lastComparison;
31569
      }
771 rajveer 31570
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 31571
      if (lastComparison != 0) {
31572
        return lastComparison;
31573
      }
771 rajveer 31574
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
130 ashish 31575
      if (lastComparison != 0) {
31576
        return lastComparison;
31577
      }
771 rajveer 31578
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
130 ashish 31579
      if (lastComparison != 0) {
31580
        return lastComparison;
31581
      }
31582
      return 0;
31583
    }
31584
 
31585
    public void read(TProtocol iprot) throws TException {
31586
      TField field;
31587
      iprot.readStructBegin();
31588
      while (true)
31589
      {
31590
        field = iprot.readFieldBegin();
31591
        if (field.type == TType.STOP) { 
31592
          break;
31593
        }
31594
        _Fields fieldId = _Fields.findByThriftId(field.id);
31595
        if (fieldId == null) {
31596
          TProtocolUtil.skip(iprot, field.type);
31597
        } else {
31598
          switch (fieldId) {
771 rajveer 31599
            case USER_ID:
553 chandransh 31600
              if (field.type == TType.I64) {
771 rajveer 31601
                this.userId = iprot.readI64();
31602
                setUserIdIsSet(true);
130 ashish 31603
              } else { 
31604
                TProtocolUtil.skip(iprot, field.type);
31605
              }
31606
              break;
771 rajveer 31607
            case ITEM_ID:
553 chandransh 31608
              if (field.type == TType.I64) {
771 rajveer 31609
                this.itemId = iprot.readI64();
31610
                setItemIdIsSet(true);
553 chandransh 31611
              } else { 
31612
                TProtocolUtil.skip(iprot, field.type);
31613
              }
31614
              break;
130 ashish 31615
          }
31616
          iprot.readFieldEnd();
31617
        }
31618
      }
31619
      iprot.readStructEnd();
31620
      validate();
31621
    }
31622
 
31623
    public void write(TProtocol oprot) throws TException {
31624
      validate();
31625
 
31626
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 31627
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
31628
      oprot.writeI64(this.userId);
31629
      oprot.writeFieldEnd();
553 chandransh 31630
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 31631
      oprot.writeI64(this.itemId);
553 chandransh 31632
      oprot.writeFieldEnd();
130 ashish 31633
      oprot.writeFieldStop();
31634
      oprot.writeStructEnd();
31635
    }
31636
 
31637
    @Override
31638
    public String toString() {
771 rajveer 31639
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
130 ashish 31640
      boolean first = true;
31641
 
771 rajveer 31642
      sb.append("userId:");
31643
      sb.append(this.userId);
553 chandransh 31644
      first = false;
31645
      if (!first) sb.append(", ");
771 rajveer 31646
      sb.append("itemId:");
31647
      sb.append(this.itemId);
130 ashish 31648
      first = false;
31649
      sb.append(")");
31650
      return sb.toString();
31651
    }
31652
 
31653
    public void validate() throws TException {
31654
      // check for required fields
31655
    }
31656
 
31657
  }
31658
 
771 rajveer 31659
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
31660
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
130 ashish 31661
 
31662
 
31663
 
31664
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31665
    public enum _Fields implements TFieldIdEnum {
553 chandransh 31666
;
31667
 
31668
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31669
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31670
 
31671
      static {
31672
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31673
          byId.put((int)field._thriftId, field);
31674
          byName.put(field.getFieldName(), field);
31675
        }
31676
      }
31677
 
31678
      /**
31679
       * Find the _Fields constant that matches fieldId, or null if its not found.
31680
       */
31681
      public static _Fields findByThriftId(int fieldId) {
31682
        return byId.get(fieldId);
31683
      }
31684
 
31685
      /**
31686
       * Find the _Fields constant that matches fieldId, throwing an exception
31687
       * if it is not found.
31688
       */
31689
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31690
        _Fields fields = findByThriftId(fieldId);
31691
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31692
        return fields;
31693
      }
31694
 
31695
      /**
31696
       * Find the _Fields constant that matches name, or null if its not found.
31697
       */
31698
      public static _Fields findByName(String name) {
31699
        return byName.get(name);
31700
      }
31701
 
31702
      private final short _thriftId;
31703
      private final String _fieldName;
31704
 
31705
      _Fields(short thriftId, String fieldName) {
31706
        _thriftId = thriftId;
31707
        _fieldName = fieldName;
31708
      }
31709
 
31710
      public short getThriftFieldId() {
31711
        return _thriftId;
31712
      }
31713
 
31714
      public String getFieldName() {
31715
        return _fieldName;
31716
      }
31717
    }
31718
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31719
    }});
31720
 
31721
    static {
771 rajveer 31722
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
553 chandransh 31723
    }
31724
 
771 rajveer 31725
    public updateBrowseHistory_result() {
553 chandransh 31726
    }
31727
 
31728
    /**
31729
     * Performs a deep copy on <i>other</i>.
31730
     */
771 rajveer 31731
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
553 chandransh 31732
    }
31733
 
771 rajveer 31734
    public updateBrowseHistory_result deepCopy() {
31735
      return new updateBrowseHistory_result(this);
553 chandransh 31736
    }
31737
 
31738
    @Deprecated
771 rajveer 31739
    public updateBrowseHistory_result clone() {
31740
      return new updateBrowseHistory_result(this);
553 chandransh 31741
    }
31742
 
31743
    public void setFieldValue(_Fields field, Object value) {
31744
      switch (field) {
31745
      }
31746
    }
31747
 
31748
    public void setFieldValue(int fieldID, Object value) {
31749
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31750
    }
31751
 
31752
    public Object getFieldValue(_Fields field) {
31753
      switch (field) {
31754
      }
31755
      throw new IllegalStateException();
31756
    }
31757
 
31758
    public Object getFieldValue(int fieldId) {
31759
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31760
    }
31761
 
31762
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31763
    public boolean isSet(_Fields field) {
31764
      switch (field) {
31765
      }
31766
      throw new IllegalStateException();
31767
    }
31768
 
31769
    public boolean isSet(int fieldID) {
31770
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31771
    }
31772
 
31773
    @Override
31774
    public boolean equals(Object that) {
31775
      if (that == null)
31776
        return false;
771 rajveer 31777
      if (that instanceof updateBrowseHistory_result)
31778
        return this.equals((updateBrowseHistory_result)that);
553 chandransh 31779
      return false;
31780
    }
31781
 
771 rajveer 31782
    public boolean equals(updateBrowseHistory_result that) {
553 chandransh 31783
      if (that == null)
31784
        return false;
31785
 
31786
      return true;
31787
    }
31788
 
31789
    @Override
31790
    public int hashCode() {
31791
      return 0;
31792
    }
31793
 
771 rajveer 31794
    public int compareTo(updateBrowseHistory_result other) {
553 chandransh 31795
      if (!getClass().equals(other.getClass())) {
31796
        return getClass().getName().compareTo(other.getClass().getName());
31797
      }
31798
 
31799
      int lastComparison = 0;
771 rajveer 31800
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
553 chandransh 31801
 
31802
      return 0;
31803
    }
31804
 
31805
    public void read(TProtocol iprot) throws TException {
31806
      TField field;
31807
      iprot.readStructBegin();
31808
      while (true)
31809
      {
31810
        field = iprot.readFieldBegin();
31811
        if (field.type == TType.STOP) { 
31812
          break;
31813
        }
31814
        _Fields fieldId = _Fields.findByThriftId(field.id);
31815
        if (fieldId == null) {
31816
          TProtocolUtil.skip(iprot, field.type);
31817
        } else {
31818
          switch (fieldId) {
31819
          }
31820
          iprot.readFieldEnd();
31821
        }
31822
      }
31823
      iprot.readStructEnd();
31824
      validate();
31825
    }
31826
 
31827
    public void write(TProtocol oprot) throws TException {
31828
      oprot.writeStructBegin(STRUCT_DESC);
31829
 
31830
      oprot.writeFieldStop();
31831
      oprot.writeStructEnd();
31832
    }
31833
 
31834
    @Override
31835
    public String toString() {
771 rajveer 31836
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
553 chandransh 31837
      boolean first = true;
31838
 
31839
      sb.append(")");
31840
      return sb.toString();
31841
    }
31842
 
31843
    public void validate() throws TException {
31844
      // check for required fields
31845
    }
31846
 
31847
  }
31848
 
771 rajveer 31849
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
31850
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
553 chandransh 31851
 
771 rajveer 31852
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 31853
 
771 rajveer 31854
    private long userId;
553 chandransh 31855
 
31856
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31857
    public enum _Fields implements TFieldIdEnum {
771 rajveer 31858
      USER_ID((short)1, "userId");
553 chandransh 31859
 
31860
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31861
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31862
 
31863
      static {
31864
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31865
          byId.put((int)field._thriftId, field);
31866
          byName.put(field.getFieldName(), field);
31867
        }
31868
      }
31869
 
31870
      /**
31871
       * Find the _Fields constant that matches fieldId, or null if its not found.
31872
       */
31873
      public static _Fields findByThriftId(int fieldId) {
31874
        return byId.get(fieldId);
31875
      }
31876
 
31877
      /**
31878
       * Find the _Fields constant that matches fieldId, throwing an exception
31879
       * if it is not found.
31880
       */
31881
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31882
        _Fields fields = findByThriftId(fieldId);
31883
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31884
        return fields;
31885
      }
31886
 
31887
      /**
31888
       * Find the _Fields constant that matches name, or null if its not found.
31889
       */
31890
      public static _Fields findByName(String name) {
31891
        return byName.get(name);
31892
      }
31893
 
31894
      private final short _thriftId;
31895
      private final String _fieldName;
31896
 
31897
      _Fields(short thriftId, String fieldName) {
31898
        _thriftId = thriftId;
31899
        _fieldName = fieldName;
31900
      }
31901
 
31902
      public short getThriftFieldId() {
31903
        return _thriftId;
31904
      }
31905
 
31906
      public String getFieldName() {
31907
        return _fieldName;
31908
      }
31909
    }
31910
 
31911
    // isset id assignments
771 rajveer 31912
    private static final int __USERID_ISSET_ID = 0;
31913
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 31914
 
31915
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 31916
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 31917
          new FieldValueMetaData(TType.I64)));
31918
    }});
31919
 
31920
    static {
771 rajveer 31921
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
553 chandransh 31922
    }
31923
 
771 rajveer 31924
    public getBrowseHistory_args() {
553 chandransh 31925
    }
31926
 
771 rajveer 31927
    public getBrowseHistory_args(
31928
      long userId)
553 chandransh 31929
    {
31930
      this();
771 rajveer 31931
      this.userId = userId;
31932
      setUserIdIsSet(true);
553 chandransh 31933
    }
31934
 
31935
    /**
31936
     * Performs a deep copy on <i>other</i>.
31937
     */
771 rajveer 31938
    public getBrowseHistory_args(getBrowseHistory_args other) {
553 chandransh 31939
      __isset_bit_vector.clear();
31940
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 31941
      this.userId = other.userId;
553 chandransh 31942
    }
31943
 
771 rajveer 31944
    public getBrowseHistory_args deepCopy() {
31945
      return new getBrowseHistory_args(this);
553 chandransh 31946
    }
31947
 
31948
    @Deprecated
771 rajveer 31949
    public getBrowseHistory_args clone() {
31950
      return new getBrowseHistory_args(this);
553 chandransh 31951
    }
31952
 
771 rajveer 31953
    public long getUserId() {
31954
      return this.userId;
553 chandransh 31955
    }
31956
 
771 rajveer 31957
    public getBrowseHistory_args setUserId(long userId) {
31958
      this.userId = userId;
31959
      setUserIdIsSet(true);
553 chandransh 31960
      return this;
31961
    }
31962
 
771 rajveer 31963
    public void unsetUserId() {
31964
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 31965
    }
31966
 
771 rajveer 31967
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
31968
    public boolean isSetUserId() {
31969
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 31970
    }
31971
 
771 rajveer 31972
    public void setUserIdIsSet(boolean value) {
31973
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 31974
    }
31975
 
31976
    public void setFieldValue(_Fields field, Object value) {
31977
      switch (field) {
31978
      case USER_ID:
31979
        if (value == null) {
771 rajveer 31980
          unsetUserId();
553 chandransh 31981
        } else {
771 rajveer 31982
          setUserId((Long)value);
553 chandransh 31983
        }
31984
        break;
31985
 
31986
      }
31987
    }
31988
 
31989
    public void setFieldValue(int fieldID, Object value) {
31990
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31991
    }
31992
 
31993
    public Object getFieldValue(_Fields field) {
31994
      switch (field) {
31995
      case USER_ID:
771 rajveer 31996
        return new Long(getUserId());
553 chandransh 31997
 
31998
      }
31999
      throw new IllegalStateException();
32000
    }
32001
 
32002
    public Object getFieldValue(int fieldId) {
32003
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32004
    }
32005
 
32006
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32007
    public boolean isSet(_Fields field) {
32008
      switch (field) {
32009
      case USER_ID:
771 rajveer 32010
        return isSetUserId();
553 chandransh 32011
      }
32012
      throw new IllegalStateException();
32013
    }
32014
 
32015
    public boolean isSet(int fieldID) {
32016
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32017
    }
32018
 
32019
    @Override
32020
    public boolean equals(Object that) {
32021
      if (that == null)
32022
        return false;
771 rajveer 32023
      if (that instanceof getBrowseHistory_args)
32024
        return this.equals((getBrowseHistory_args)that);
553 chandransh 32025
      return false;
32026
    }
32027
 
771 rajveer 32028
    public boolean equals(getBrowseHistory_args that) {
553 chandransh 32029
      if (that == null)
32030
        return false;
32031
 
771 rajveer 32032
      boolean this_present_userId = true;
32033
      boolean that_present_userId = true;
32034
      if (this_present_userId || that_present_userId) {
32035
        if (!(this_present_userId && that_present_userId))
553 chandransh 32036
          return false;
771 rajveer 32037
        if (this.userId != that.userId)
553 chandransh 32038
          return false;
32039
      }
32040
 
32041
      return true;
32042
    }
32043
 
32044
    @Override
32045
    public int hashCode() {
32046
      return 0;
32047
    }
32048
 
771 rajveer 32049
    public int compareTo(getBrowseHistory_args other) {
553 chandransh 32050
      if (!getClass().equals(other.getClass())) {
32051
        return getClass().getName().compareTo(other.getClass().getName());
32052
      }
32053
 
32054
      int lastComparison = 0;
771 rajveer 32055
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
553 chandransh 32056
 
771 rajveer 32057
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 32058
      if (lastComparison != 0) {
32059
        return lastComparison;
32060
      }
771 rajveer 32061
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 32062
      if (lastComparison != 0) {
32063
        return lastComparison;
32064
      }
32065
      return 0;
32066
    }
32067
 
32068
    public void read(TProtocol iprot) throws TException {
32069
      TField field;
32070
      iprot.readStructBegin();
32071
      while (true)
32072
      {
32073
        field = iprot.readFieldBegin();
32074
        if (field.type == TType.STOP) { 
32075
          break;
32076
        }
32077
        _Fields fieldId = _Fields.findByThriftId(field.id);
32078
        if (fieldId == null) {
32079
          TProtocolUtil.skip(iprot, field.type);
32080
        } else {
32081
          switch (fieldId) {
32082
            case USER_ID:
32083
              if (field.type == TType.I64) {
771 rajveer 32084
                this.userId = iprot.readI64();
32085
                setUserIdIsSet(true);
553 chandransh 32086
              } else { 
32087
                TProtocolUtil.skip(iprot, field.type);
32088
              }
32089
              break;
32090
          }
32091
          iprot.readFieldEnd();
32092
        }
32093
      }
32094
      iprot.readStructEnd();
32095
      validate();
32096
    }
32097
 
32098
    public void write(TProtocol oprot) throws TException {
32099
      validate();
32100
 
32101
      oprot.writeStructBegin(STRUCT_DESC);
32102
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 32103
      oprot.writeI64(this.userId);
553 chandransh 32104
      oprot.writeFieldEnd();
32105
      oprot.writeFieldStop();
32106
      oprot.writeStructEnd();
32107
    }
32108
 
32109
    @Override
32110
    public String toString() {
771 rajveer 32111
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
553 chandransh 32112
      boolean first = true;
32113
 
771 rajveer 32114
      sb.append("userId:");
32115
      sb.append(this.userId);
553 chandransh 32116
      first = false;
32117
      sb.append(")");
32118
      return sb.toString();
32119
    }
32120
 
32121
    public void validate() throws TException {
32122
      // check for required fields
32123
    }
32124
 
32125
  }
32126
 
771 rajveer 32127
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
32128
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
553 chandransh 32129
 
32130
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
32131
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
32132
 
771 rajveer 32133
    private Widget success;
553 chandransh 32134
    private WidgetException scx;
32135
 
32136
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32137
    public enum _Fields implements TFieldIdEnum {
130 ashish 32138
      SUCCESS((short)0, "success"),
553 chandransh 32139
      SCX((short)1, "scx");
130 ashish 32140
 
32141
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32142
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32143
 
32144
      static {
32145
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32146
          byId.put((int)field._thriftId, field);
32147
          byName.put(field.getFieldName(), field);
32148
        }
32149
      }
32150
 
32151
      /**
32152
       * Find the _Fields constant that matches fieldId, or null if its not found.
32153
       */
32154
      public static _Fields findByThriftId(int fieldId) {
32155
        return byId.get(fieldId);
32156
      }
32157
 
32158
      /**
32159
       * Find the _Fields constant that matches fieldId, throwing an exception
32160
       * if it is not found.
32161
       */
32162
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32163
        _Fields fields = findByThriftId(fieldId);
32164
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32165
        return fields;
32166
      }
32167
 
32168
      /**
32169
       * Find the _Fields constant that matches name, or null if its not found.
32170
       */
32171
      public static _Fields findByName(String name) {
32172
        return byName.get(name);
32173
      }
32174
 
32175
      private final short _thriftId;
32176
      private final String _fieldName;
32177
 
32178
      _Fields(short thriftId, String fieldName) {
32179
        _thriftId = thriftId;
32180
        _fieldName = fieldName;
32181
      }
32182
 
32183
      public short getThriftFieldId() {
32184
        return _thriftId;
32185
      }
32186
 
32187
      public String getFieldName() {
32188
        return _fieldName;
32189
      }
32190
    }
32191
 
32192
    // isset id assignments
32193
 
32194
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32195
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
771 rajveer 32196
          new StructMetaData(TType.STRUCT, Widget.class)));
553 chandransh 32197
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 32198
          new FieldValueMetaData(TType.STRUCT)));
32199
    }});
32200
 
32201
    static {
771 rajveer 32202
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
130 ashish 32203
    }
32204
 
771 rajveer 32205
    public getBrowseHistory_result() {
130 ashish 32206
    }
32207
 
771 rajveer 32208
    public getBrowseHistory_result(
32209
      Widget success,
553 chandransh 32210
      WidgetException scx)
130 ashish 32211
    {
32212
      this();
32213
      this.success = success;
553 chandransh 32214
      this.scx = scx;
130 ashish 32215
    }
32216
 
32217
    /**
32218
     * Performs a deep copy on <i>other</i>.
32219
     */
771 rajveer 32220
    public getBrowseHistory_result(getBrowseHistory_result other) {
553 chandransh 32221
      if (other.isSetSuccess()) {
771 rajveer 32222
        this.success = new Widget(other.success);
553 chandransh 32223
      }
32224
      if (other.isSetScx()) {
32225
        this.scx = new WidgetException(other.scx);
32226
      }
32227
    }
32228
 
771 rajveer 32229
    public getBrowseHistory_result deepCopy() {
32230
      return new getBrowseHistory_result(this);
553 chandransh 32231
    }
32232
 
32233
    @Deprecated
771 rajveer 32234
    public getBrowseHistory_result clone() {
32235
      return new getBrowseHistory_result(this);
553 chandransh 32236
    }
32237
 
771 rajveer 32238
    public Widget getSuccess() {
553 chandransh 32239
      return this.success;
32240
    }
32241
 
771 rajveer 32242
    public getBrowseHistory_result setSuccess(Widget success) {
553 chandransh 32243
      this.success = success;
32244
      return this;
32245
    }
32246
 
32247
    public void unsetSuccess() {
32248
      this.success = null;
32249
    }
32250
 
32251
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
32252
    public boolean isSetSuccess() {
32253
      return this.success != null;
32254
    }
32255
 
32256
    public void setSuccessIsSet(boolean value) {
32257
      if (!value) {
32258
        this.success = null;
32259
      }
32260
    }
32261
 
32262
    public WidgetException getScx() {
32263
      return this.scx;
32264
    }
32265
 
771 rajveer 32266
    public getBrowseHistory_result setScx(WidgetException scx) {
553 chandransh 32267
      this.scx = scx;
32268
      return this;
32269
    }
32270
 
32271
    public void unsetScx() {
32272
      this.scx = null;
32273
    }
32274
 
32275
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
32276
    public boolean isSetScx() {
32277
      return this.scx != null;
32278
    }
32279
 
32280
    public void setScxIsSet(boolean value) {
32281
      if (!value) {
32282
        this.scx = null;
32283
      }
32284
    }
32285
 
32286
    public void setFieldValue(_Fields field, Object value) {
32287
      switch (field) {
32288
      case SUCCESS:
32289
        if (value == null) {
32290
          unsetSuccess();
32291
        } else {
771 rajveer 32292
          setSuccess((Widget)value);
553 chandransh 32293
        }
32294
        break;
32295
 
32296
      case SCX:
32297
        if (value == null) {
32298
          unsetScx();
32299
        } else {
32300
          setScx((WidgetException)value);
32301
        }
32302
        break;
32303
 
32304
      }
32305
    }
32306
 
32307
    public void setFieldValue(int fieldID, Object value) {
32308
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32309
    }
32310
 
32311
    public Object getFieldValue(_Fields field) {
32312
      switch (field) {
32313
      case SUCCESS:
32314
        return getSuccess();
32315
 
32316
      case SCX:
32317
        return getScx();
32318
 
32319
      }
32320
      throw new IllegalStateException();
32321
    }
32322
 
32323
    public Object getFieldValue(int fieldId) {
32324
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32325
    }
32326
 
32327
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32328
    public boolean isSet(_Fields field) {
32329
      switch (field) {
32330
      case SUCCESS:
32331
        return isSetSuccess();
32332
      case SCX:
32333
        return isSetScx();
32334
      }
32335
      throw new IllegalStateException();
32336
    }
32337
 
32338
    public boolean isSet(int fieldID) {
32339
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32340
    }
32341
 
32342
    @Override
32343
    public boolean equals(Object that) {
32344
      if (that == null)
32345
        return false;
771 rajveer 32346
      if (that instanceof getBrowseHistory_result)
32347
        return this.equals((getBrowseHistory_result)that);
553 chandransh 32348
      return false;
32349
    }
32350
 
771 rajveer 32351
    public boolean equals(getBrowseHistory_result that) {
553 chandransh 32352
      if (that == null)
32353
        return false;
32354
 
32355
      boolean this_present_success = true && this.isSetSuccess();
32356
      boolean that_present_success = true && that.isSetSuccess();
32357
      if (this_present_success || that_present_success) {
32358
        if (!(this_present_success && that_present_success))
32359
          return false;
32360
        if (!this.success.equals(that.success))
32361
          return false;
32362
      }
32363
 
32364
      boolean this_present_scx = true && this.isSetScx();
32365
      boolean that_present_scx = true && that.isSetScx();
32366
      if (this_present_scx || that_present_scx) {
32367
        if (!(this_present_scx && that_present_scx))
32368
          return false;
32369
        if (!this.scx.equals(that.scx))
32370
          return false;
32371
      }
32372
 
32373
      return true;
32374
    }
32375
 
32376
    @Override
32377
    public int hashCode() {
32378
      return 0;
32379
    }
32380
 
771 rajveer 32381
    public int compareTo(getBrowseHistory_result other) {
32382
      if (!getClass().equals(other.getClass())) {
32383
        return getClass().getName().compareTo(other.getClass().getName());
32384
      }
32385
 
32386
      int lastComparison = 0;
32387
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
32388
 
32389
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32390
      if (lastComparison != 0) {
32391
        return lastComparison;
32392
      }
32393
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32394
      if (lastComparison != 0) {
32395
        return lastComparison;
32396
      }
32397
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
32398
      if (lastComparison != 0) {
32399
        return lastComparison;
32400
      }
32401
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
32402
      if (lastComparison != 0) {
32403
        return lastComparison;
32404
      }
32405
      return 0;
32406
    }
32407
 
553 chandransh 32408
    public void read(TProtocol iprot) throws TException {
32409
      TField field;
32410
      iprot.readStructBegin();
32411
      while (true)
32412
      {
32413
        field = iprot.readFieldBegin();
32414
        if (field.type == TType.STOP) { 
32415
          break;
32416
        }
32417
        _Fields fieldId = _Fields.findByThriftId(field.id);
32418
        if (fieldId == null) {
32419
          TProtocolUtil.skip(iprot, field.type);
32420
        } else {
32421
          switch (fieldId) {
32422
            case SUCCESS:
32423
              if (field.type == TType.STRUCT) {
771 rajveer 32424
                this.success = new Widget();
553 chandransh 32425
                this.success.read(iprot);
32426
              } else { 
32427
                TProtocolUtil.skip(iprot, field.type);
32428
              }
32429
              break;
32430
            case SCX:
32431
              if (field.type == TType.STRUCT) {
32432
                this.scx = new WidgetException();
32433
                this.scx.read(iprot);
32434
              } else { 
32435
                TProtocolUtil.skip(iprot, field.type);
32436
              }
32437
              break;
32438
          }
32439
          iprot.readFieldEnd();
32440
        }
32441
      }
32442
      iprot.readStructEnd();
32443
      validate();
32444
    }
32445
 
32446
    public void write(TProtocol oprot) throws TException {
32447
      oprot.writeStructBegin(STRUCT_DESC);
32448
 
32449
      if (this.isSetSuccess()) {
32450
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32451
        this.success.write(oprot);
32452
        oprot.writeFieldEnd();
32453
      } else if (this.isSetScx()) {
32454
        oprot.writeFieldBegin(SCX_FIELD_DESC);
32455
        this.scx.write(oprot);
32456
        oprot.writeFieldEnd();
32457
      }
32458
      oprot.writeFieldStop();
32459
      oprot.writeStructEnd();
32460
    }
32461
 
32462
    @Override
32463
    public String toString() {
771 rajveer 32464
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
553 chandransh 32465
      boolean first = true;
32466
 
32467
      sb.append("success:");
32468
      if (this.success == null) {
32469
        sb.append("null");
32470
      } else {
32471
        sb.append(this.success);
32472
      }
32473
      first = false;
32474
      if (!first) sb.append(", ");
32475
      sb.append("scx:");
32476
      if (this.scx == null) {
32477
        sb.append("null");
32478
      } else {
32479
        sb.append(this.scx);
32480
      }
32481
      first = false;
32482
      sb.append(")");
32483
      return sb.toString();
32484
    }
32485
 
32486
    public void validate() throws TException {
32487
      // check for required fields
32488
    }
32489
 
32490
  }
32491
 
771 rajveer 32492
  public static class mergeBrowseHistory_args implements TBase<mergeBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_args>   {
32493
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_args");
553 chandransh 32494
 
771 rajveer 32495
    private static final TField FROM_USER_ID_FIELD_DESC = new TField("fromUserId", TType.I64, (short)1);
32496
    private static final TField TO_USER_ID_FIELD_DESC = new TField("toUserId", TType.I64, (short)2);
553 chandransh 32497
 
771 rajveer 32498
    private long fromUserId;
32499
    private long toUserId;
553 chandransh 32500
 
32501
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32502
    public enum _Fields implements TFieldIdEnum {
771 rajveer 32503
      FROM_USER_ID((short)1, "fromUserId"),
32504
      TO_USER_ID((short)2, "toUserId");
553 chandransh 32505
 
32506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32508
 
32509
      static {
32510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32511
          byId.put((int)field._thriftId, field);
32512
          byName.put(field.getFieldName(), field);
32513
        }
32514
      }
32515
 
32516
      /**
32517
       * Find the _Fields constant that matches fieldId, or null if its not found.
32518
       */
32519
      public static _Fields findByThriftId(int fieldId) {
32520
        return byId.get(fieldId);
32521
      }
32522
 
32523
      /**
32524
       * Find the _Fields constant that matches fieldId, throwing an exception
32525
       * if it is not found.
32526
       */
32527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32528
        _Fields fields = findByThriftId(fieldId);
32529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32530
        return fields;
32531
      }
32532
 
32533
      /**
32534
       * Find the _Fields constant that matches name, or null if its not found.
32535
       */
32536
      public static _Fields findByName(String name) {
32537
        return byName.get(name);
32538
      }
32539
 
32540
      private final short _thriftId;
32541
      private final String _fieldName;
32542
 
32543
      _Fields(short thriftId, String fieldName) {
32544
        _thriftId = thriftId;
32545
        _fieldName = fieldName;
32546
      }
32547
 
32548
      public short getThriftFieldId() {
32549
        return _thriftId;
32550
      }
32551
 
32552
      public String getFieldName() {
32553
        return _fieldName;
32554
      }
32555
    }
32556
 
32557
    // isset id assignments
771 rajveer 32558
    private static final int __FROMUSERID_ISSET_ID = 0;
32559
    private static final int __TOUSERID_ISSET_ID = 1;
32560
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 32561
 
32562
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 32563
      put(_Fields.FROM_USER_ID, new FieldMetaData("fromUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 32564
          new FieldValueMetaData(TType.I64)));
771 rajveer 32565
      put(_Fields.TO_USER_ID, new FieldMetaData("toUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 32566
          new FieldValueMetaData(TType.I64)));
32567
    }});
32568
 
32569
    static {
771 rajveer 32570
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_args.class, metaDataMap);
553 chandransh 32571
    }
32572
 
771 rajveer 32573
    public mergeBrowseHistory_args() {
553 chandransh 32574
    }
32575
 
771 rajveer 32576
    public mergeBrowseHistory_args(
32577
      long fromUserId,
32578
      long toUserId)
553 chandransh 32579
    {
32580
      this();
771 rajveer 32581
      this.fromUserId = fromUserId;
32582
      setFromUserIdIsSet(true);
32583
      this.toUserId = toUserId;
32584
      setToUserIdIsSet(true);
553 chandransh 32585
    }
32586
 
32587
    /**
32588
     * Performs a deep copy on <i>other</i>.
32589
     */
771 rajveer 32590
    public mergeBrowseHistory_args(mergeBrowseHistory_args other) {
130 ashish 32591
      __isset_bit_vector.clear();
32592
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 32593
      this.fromUserId = other.fromUserId;
32594
      this.toUserId = other.toUserId;
553 chandransh 32595
    }
32596
 
771 rajveer 32597
    public mergeBrowseHistory_args deepCopy() {
32598
      return new mergeBrowseHistory_args(this);
553 chandransh 32599
    }
32600
 
32601
    @Deprecated
771 rajveer 32602
    public mergeBrowseHistory_args clone() {
32603
      return new mergeBrowseHistory_args(this);
553 chandransh 32604
    }
32605
 
771 rajveer 32606
    public long getFromUserId() {
32607
      return this.fromUserId;
553 chandransh 32608
    }
32609
 
771 rajveer 32610
    public mergeBrowseHistory_args setFromUserId(long fromUserId) {
32611
      this.fromUserId = fromUserId;
32612
      setFromUserIdIsSet(true);
553 chandransh 32613
      return this;
32614
    }
32615
 
771 rajveer 32616
    public void unsetFromUserId() {
32617
      __isset_bit_vector.clear(__FROMUSERID_ISSET_ID);
553 chandransh 32618
    }
32619
 
771 rajveer 32620
    /** Returns true if field fromUserId is set (has been asigned a value) and false otherwise */
32621
    public boolean isSetFromUserId() {
32622
      return __isset_bit_vector.get(__FROMUSERID_ISSET_ID);
553 chandransh 32623
    }
32624
 
771 rajveer 32625
    public void setFromUserIdIsSet(boolean value) {
32626
      __isset_bit_vector.set(__FROMUSERID_ISSET_ID, value);
553 chandransh 32627
    }
32628
 
771 rajveer 32629
    public long getToUserId() {
32630
      return this.toUserId;
553 chandransh 32631
    }
32632
 
771 rajveer 32633
    public mergeBrowseHistory_args setToUserId(long toUserId) {
32634
      this.toUserId = toUserId;
32635
      setToUserIdIsSet(true);
553 chandransh 32636
      return this;
32637
    }
32638
 
771 rajveer 32639
    public void unsetToUserId() {
32640
      __isset_bit_vector.clear(__TOUSERID_ISSET_ID);
553 chandransh 32641
    }
32642
 
771 rajveer 32643
    /** Returns true if field toUserId is set (has been asigned a value) and false otherwise */
32644
    public boolean isSetToUserId() {
32645
      return __isset_bit_vector.get(__TOUSERID_ISSET_ID);
553 chandransh 32646
    }
32647
 
771 rajveer 32648
    public void setToUserIdIsSet(boolean value) {
32649
      __isset_bit_vector.set(__TOUSERID_ISSET_ID, value);
553 chandransh 32650
    }
32651
 
32652
    public void setFieldValue(_Fields field, Object value) {
32653
      switch (field) {
771 rajveer 32654
      case FROM_USER_ID:
553 chandransh 32655
        if (value == null) {
771 rajveer 32656
          unsetFromUserId();
553 chandransh 32657
        } else {
771 rajveer 32658
          setFromUserId((Long)value);
553 chandransh 32659
        }
32660
        break;
32661
 
771 rajveer 32662
      case TO_USER_ID:
553 chandransh 32663
        if (value == null) {
771 rajveer 32664
          unsetToUserId();
553 chandransh 32665
        } else {
771 rajveer 32666
          setToUserId((Long)value);
553 chandransh 32667
        }
32668
        break;
32669
 
130 ashish 32670
      }
32671
    }
32672
 
553 chandransh 32673
    public void setFieldValue(int fieldID, Object value) {
32674
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 32675
    }
32676
 
553 chandransh 32677
    public Object getFieldValue(_Fields field) {
32678
      switch (field) {
771 rajveer 32679
      case FROM_USER_ID:
32680
        return new Long(getFromUserId());
553 chandransh 32681
 
771 rajveer 32682
      case TO_USER_ID:
32683
        return new Long(getToUserId());
553 chandransh 32684
 
32685
      }
32686
      throw new IllegalStateException();
32687
    }
32688
 
32689
    public Object getFieldValue(int fieldId) {
32690
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32691
    }
32692
 
32693
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32694
    public boolean isSet(_Fields field) {
32695
      switch (field) {
771 rajveer 32696
      case FROM_USER_ID:
32697
        return isSetFromUserId();
32698
      case TO_USER_ID:
32699
        return isSetToUserId();
553 chandransh 32700
      }
32701
      throw new IllegalStateException();
32702
    }
32703
 
32704
    public boolean isSet(int fieldID) {
32705
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32706
    }
32707
 
32708
    @Override
32709
    public boolean equals(Object that) {
32710
      if (that == null)
32711
        return false;
771 rajveer 32712
      if (that instanceof mergeBrowseHistory_args)
32713
        return this.equals((mergeBrowseHistory_args)that);
553 chandransh 32714
      return false;
32715
    }
32716
 
771 rajveer 32717
    public boolean equals(mergeBrowseHistory_args that) {
553 chandransh 32718
      if (that == null)
32719
        return false;
32720
 
771 rajveer 32721
      boolean this_present_fromUserId = true;
32722
      boolean that_present_fromUserId = true;
32723
      if (this_present_fromUserId || that_present_fromUserId) {
32724
        if (!(this_present_fromUserId && that_present_fromUserId))
553 chandransh 32725
          return false;
771 rajveer 32726
        if (this.fromUserId != that.fromUserId)
553 chandransh 32727
          return false;
32728
      }
32729
 
771 rajveer 32730
      boolean this_present_toUserId = true;
32731
      boolean that_present_toUserId = true;
32732
      if (this_present_toUserId || that_present_toUserId) {
32733
        if (!(this_present_toUserId && that_present_toUserId))
553 chandransh 32734
          return false;
771 rajveer 32735
        if (this.toUserId != that.toUserId)
553 chandransh 32736
          return false;
32737
      }
32738
 
32739
      return true;
32740
    }
32741
 
32742
    @Override
32743
    public int hashCode() {
32744
      return 0;
32745
    }
32746
 
771 rajveer 32747
    public int compareTo(mergeBrowseHistory_args other) {
553 chandransh 32748
      if (!getClass().equals(other.getClass())) {
32749
        return getClass().getName().compareTo(other.getClass().getName());
32750
      }
32751
 
32752
      int lastComparison = 0;
771 rajveer 32753
      mergeBrowseHistory_args typedOther = (mergeBrowseHistory_args)other;
553 chandransh 32754
 
771 rajveer 32755
      lastComparison = Boolean.valueOf(isSetFromUserId()).compareTo(isSetFromUserId());
553 chandransh 32756
      if (lastComparison != 0) {
32757
        return lastComparison;
32758
      }
771 rajveer 32759
      lastComparison = TBaseHelper.compareTo(fromUserId, typedOther.fromUserId);
553 chandransh 32760
      if (lastComparison != 0) {
32761
        return lastComparison;
32762
      }
771 rajveer 32763
      lastComparison = Boolean.valueOf(isSetToUserId()).compareTo(isSetToUserId());
553 chandransh 32764
      if (lastComparison != 0) {
32765
        return lastComparison;
32766
      }
771 rajveer 32767
      lastComparison = TBaseHelper.compareTo(toUserId, typedOther.toUserId);
553 chandransh 32768
      if (lastComparison != 0) {
32769
        return lastComparison;
32770
      }
32771
      return 0;
32772
    }
32773
 
32774
    public void read(TProtocol iprot) throws TException {
32775
      TField field;
32776
      iprot.readStructBegin();
32777
      while (true)
32778
      {
32779
        field = iprot.readFieldBegin();
32780
        if (field.type == TType.STOP) { 
32781
          break;
32782
        }
32783
        _Fields fieldId = _Fields.findByThriftId(field.id);
32784
        if (fieldId == null) {
32785
          TProtocolUtil.skip(iprot, field.type);
32786
        } else {
32787
          switch (fieldId) {
771 rajveer 32788
            case FROM_USER_ID:
553 chandransh 32789
              if (field.type == TType.I64) {
771 rajveer 32790
                this.fromUserId = iprot.readI64();
32791
                setFromUserIdIsSet(true);
553 chandransh 32792
              } else { 
32793
                TProtocolUtil.skip(iprot, field.type);
32794
              }
32795
              break;
771 rajveer 32796
            case TO_USER_ID:
553 chandransh 32797
              if (field.type == TType.I64) {
771 rajveer 32798
                this.toUserId = iprot.readI64();
32799
                setToUserIdIsSet(true);
553 chandransh 32800
              } else { 
32801
                TProtocolUtil.skip(iprot, field.type);
32802
              }
32803
              break;
32804
          }
32805
          iprot.readFieldEnd();
32806
        }
32807
      }
32808
      iprot.readStructEnd();
32809
      validate();
32810
    }
32811
 
32812
    public void write(TProtocol oprot) throws TException {
32813
      validate();
32814
 
32815
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 32816
      oprot.writeFieldBegin(FROM_USER_ID_FIELD_DESC);
32817
      oprot.writeI64(this.fromUserId);
553 chandransh 32818
      oprot.writeFieldEnd();
771 rajveer 32819
      oprot.writeFieldBegin(TO_USER_ID_FIELD_DESC);
32820
      oprot.writeI64(this.toUserId);
553 chandransh 32821
      oprot.writeFieldEnd();
32822
      oprot.writeFieldStop();
32823
      oprot.writeStructEnd();
32824
    }
32825
 
32826
    @Override
32827
    public String toString() {
771 rajveer 32828
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_args(");
553 chandransh 32829
      boolean first = true;
32830
 
771 rajveer 32831
      sb.append("fromUserId:");
32832
      sb.append(this.fromUserId);
553 chandransh 32833
      first = false;
32834
      if (!first) sb.append(", ");
771 rajveer 32835
      sb.append("toUserId:");
32836
      sb.append(this.toUserId);
553 chandransh 32837
      first = false;
32838
      sb.append(")");
32839
      return sb.toString();
32840
    }
32841
 
32842
    public void validate() throws TException {
32843
      // check for required fields
32844
    }
32845
 
32846
  }
32847
 
771 rajveer 32848
  public static class mergeBrowseHistory_result implements TBase<mergeBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_result>   {
32849
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_result");
553 chandransh 32850
 
32851
 
32852
 
32853
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32854
    public enum _Fields implements TFieldIdEnum {
32855
;
32856
 
32857
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32858
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32859
 
32860
      static {
32861
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32862
          byId.put((int)field._thriftId, field);
32863
          byName.put(field.getFieldName(), field);
32864
        }
32865
      }
32866
 
32867
      /**
32868
       * Find the _Fields constant that matches fieldId, or null if its not found.
32869
       */
32870
      public static _Fields findByThriftId(int fieldId) {
32871
        return byId.get(fieldId);
32872
      }
32873
 
32874
      /**
32875
       * Find the _Fields constant that matches fieldId, throwing an exception
32876
       * if it is not found.
32877
       */
32878
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32879
        _Fields fields = findByThriftId(fieldId);
32880
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32881
        return fields;
32882
      }
32883
 
32884
      /**
32885
       * Find the _Fields constant that matches name, or null if its not found.
32886
       */
32887
      public static _Fields findByName(String name) {
32888
        return byName.get(name);
32889
      }
32890
 
32891
      private final short _thriftId;
32892
      private final String _fieldName;
32893
 
32894
      _Fields(short thriftId, String fieldName) {
32895
        _thriftId = thriftId;
32896
        _fieldName = fieldName;
32897
      }
32898
 
32899
      public short getThriftFieldId() {
32900
        return _thriftId;
32901
      }
32902
 
32903
      public String getFieldName() {
32904
        return _fieldName;
32905
      }
32906
    }
32907
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32908
    }});
32909
 
32910
    static {
771 rajveer 32911
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_result.class, metaDataMap);
553 chandransh 32912
    }
32913
 
771 rajveer 32914
    public mergeBrowseHistory_result() {
553 chandransh 32915
    }
32916
 
32917
    /**
32918
     * Performs a deep copy on <i>other</i>.
32919
     */
771 rajveer 32920
    public mergeBrowseHistory_result(mergeBrowseHistory_result other) {
553 chandransh 32921
    }
32922
 
771 rajveer 32923
    public mergeBrowseHistory_result deepCopy() {
32924
      return new mergeBrowseHistory_result(this);
553 chandransh 32925
    }
32926
 
130 ashish 32927
    @Deprecated
771 rajveer 32928
    public mergeBrowseHistory_result clone() {
32929
      return new mergeBrowseHistory_result(this);
130 ashish 32930
    }
32931
 
553 chandransh 32932
    public void setFieldValue(_Fields field, Object value) {
32933
      switch (field) {
32934
      }
32935
    }
32936
 
32937
    public void setFieldValue(int fieldID, Object value) {
32938
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32939
    }
32940
 
32941
    public Object getFieldValue(_Fields field) {
32942
      switch (field) {
32943
      }
32944
      throw new IllegalStateException();
32945
    }
32946
 
32947
    public Object getFieldValue(int fieldId) {
32948
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32949
    }
32950
 
32951
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32952
    public boolean isSet(_Fields field) {
32953
      switch (field) {
32954
      }
32955
      throw new IllegalStateException();
32956
    }
32957
 
32958
    public boolean isSet(int fieldID) {
32959
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32960
    }
32961
 
32962
    @Override
32963
    public boolean equals(Object that) {
32964
      if (that == null)
32965
        return false;
771 rajveer 32966
      if (that instanceof mergeBrowseHistory_result)
32967
        return this.equals((mergeBrowseHistory_result)that);
553 chandransh 32968
      return false;
32969
    }
32970
 
771 rajveer 32971
    public boolean equals(mergeBrowseHistory_result that) {
553 chandransh 32972
      if (that == null)
32973
        return false;
32974
 
32975
      return true;
32976
    }
32977
 
32978
    @Override
32979
    public int hashCode() {
32980
      return 0;
32981
    }
32982
 
771 rajveer 32983
    public int compareTo(mergeBrowseHistory_result other) {
553 chandransh 32984
      if (!getClass().equals(other.getClass())) {
32985
        return getClass().getName().compareTo(other.getClass().getName());
32986
      }
32987
 
32988
      int lastComparison = 0;
771 rajveer 32989
      mergeBrowseHistory_result typedOther = (mergeBrowseHistory_result)other;
553 chandransh 32990
 
32991
      return 0;
32992
    }
32993
 
32994
    public void read(TProtocol iprot) throws TException {
32995
      TField field;
32996
      iprot.readStructBegin();
32997
      while (true)
32998
      {
32999
        field = iprot.readFieldBegin();
33000
        if (field.type == TType.STOP) { 
33001
          break;
33002
        }
33003
        _Fields fieldId = _Fields.findByThriftId(field.id);
33004
        if (fieldId == null) {
33005
          TProtocolUtil.skip(iprot, field.type);
33006
        } else {
33007
          switch (fieldId) {
33008
          }
33009
          iprot.readFieldEnd();
33010
        }
33011
      }
33012
      iprot.readStructEnd();
33013
      validate();
33014
    }
33015
 
33016
    public void write(TProtocol oprot) throws TException {
33017
      oprot.writeStructBegin(STRUCT_DESC);
33018
 
33019
      oprot.writeFieldStop();
33020
      oprot.writeStructEnd();
33021
    }
33022
 
33023
    @Override
33024
    public String toString() {
771 rajveer 33025
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_result(");
553 chandransh 33026
      boolean first = true;
33027
 
33028
      sb.append(")");
33029
      return sb.toString();
33030
    }
33031
 
33032
    public void validate() throws TException {
33033
      // check for required fields
33034
    }
33035
 
33036
  }
33037
 
48 ashish 33038
}