Subversion Repositories SmartDukaan

Rev

Rev 1013 | Rev 1466 | 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
 
553 chandransh 42
    public User createUser(User user) throws UserContextException, TException;
48 ashish 43
 
553 chandransh 44
    public User updateUser(User user) throws UserContextException, TException;
48 ashish 45
 
553 chandransh 46
    public boolean deleteUser(long userId) throws UserContextException, TException;
48 ashish 47
 
553 chandransh 48
    public UserState getUserState(long userId) throws UserContextException, TException;
48 ashish 49
 
553 chandransh 50
    public User authenticateUser(String email, String password) throws AuthenticationException, TException;
48 ashish 51
 
52
    public boolean userExists(String email) throws UserContextException, TException;
53
 
571 rajveer 54
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException;
48 ashish 55
 
56
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException;
57
 
58
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException;
59
 
60
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException;
61
 
506 rajveer 62
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException;
63
 
593 rajveer 64
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException;
48 ashish 65
 
896 rajveer 66
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException;
582 rajveer 67
 
593 rajveer 68
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException;
69
 
70
    public long getDefaultAddressId(long userId) throws UserContextException, TException;
71
 
784 rajveer 72
    public String getDefaultPincode(long userId) throws UserContextException, TException;
73
 
1177 varun.gupt 74
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException;
75
 
553 chandransh 76
    public long createCart(long userId) throws ShoppingCartException, TException;
48 ashish 77
 
553 chandransh 78
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException;
48 ashish 79
 
553 chandransh 80
    public Cart getCart(long cartId) throws ShoppingCartException, TException;
48 ashish 81
 
553 chandransh 82
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException;
48 ashish 83
 
553 chandransh 84
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException;
48 ashish 85
 
553 chandransh 86
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException;
48 ashish 87
 
553 chandransh 88
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException;
130 ashish 89
 
553 chandransh 90
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
130 ashish 91
 
553 chandransh 92
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException;
93
 
94
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException;
95
 
96
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException;
97
 
578 chandransh 98
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException;
553 chandransh 99
 
688 chandransh 100
    /**
101
     * Creates a transaction and multiple orders for the given cart. Returns the transaction ID created.
102
     * 
103
     * @param cartId
104
     */
105
    public long createOrders(long cartId) throws ShoppingCartException, TException;
553 chandransh 106
 
688 chandransh 107
    /**
108
     * Validates that:
109
     * 1. The checkout timestamp is greater than the updatedOn timestamp.
110
     * 2. None of the lines in the cart for an inactive item.
111
     * 3. The estimate for any of the lines in cart doesn't change.
112
     * Returns true only if all three hold.
113
     * 
114
     * @param cartId
115
     */
578 chandransh 116
    public boolean validateCart(long cartId) throws ShoppingCartException, TException;
553 chandransh 117
 
688 chandransh 118
    /**
119
     * Merges the lines from the first cart into the second cart. Lines with duplicate items are removed.
120
     * 
121
     * @param fromCartId
122
     * @param toCartId
123
     */
553 chandransh 124
    public void mergeCart(long fromCartId, long toCartId) throws TException;
125
 
688 chandransh 126
    /**
127
     * Sets the checkedOutOn timestamp of the cart. Raises an exception if the specified cart can't be found.
128
     * 
129
     * @param cartId
130
     */
131
    public boolean checkOut(long cartId) throws ShoppingCartException, TException;
132
 
133
    /**
134
     * The second parameter is a map of item ids and their quantities which have been successfully processed.
135
     * This methods removes the specified quantiry of the specified item from the cart.
136
     * 
137
     * @param cartId
138
     * @param items
139
     */
708 rajveer 140
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException;
688 chandransh 141
 
771 rajveer 142
    /**
143
     * Widgets
144
     * 
145
     * @param userId
146
     */
147
    public Widget getMyResearch(long userId) throws WidgetException, TException;
553 chandransh 148
 
771 rajveer 149
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 150
 
771 rajveer 151
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException;
553 chandransh 152
 
771 rajveer 153
    public void updateBrowseHistory(long userId, long itemId) throws TException;
553 chandransh 154
 
771 rajveer 155
    public Widget getBrowseHistory(long userId) throws WidgetException, TException;
553 chandransh 156
 
771 rajveer 157
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException;
553 chandransh 158
 
48 ashish 159
  }
160
 
161
  public static class Client implements Iface {
162
    public Client(TProtocol prot)
163
    {
164
      this(prot, prot);
165
    }
166
 
167
    public Client(TProtocol iprot, TProtocol oprot)
168
    {
169
      iprot_ = iprot;
170
      oprot_ = oprot;
171
    }
172
 
173
    protected TProtocol iprot_;
174
    protected TProtocol oprot_;
175
 
176
    protected int seqid_;
177
 
178
    public TProtocol getInputProtocol()
179
    {
180
      return this.iprot_;
181
    }
182
 
183
    public TProtocol getOutputProtocol()
184
    {
185
      return this.oprot_;
186
    }
187
 
764 rajveer 188
    public void closeSession() throws TException
189
    {
190
      send_closeSession();
191
      recv_closeSession();
192
    }
193
 
194
    public void send_closeSession() throws TException
195
    {
196
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
197
      closeSession_args args = new closeSession_args();
198
      args.write(oprot_);
199
      oprot_.writeMessageEnd();
200
      oprot_.getTransport().flush();
201
    }
202
 
203
    public void recv_closeSession() throws TException
204
    {
205
      TMessage msg = iprot_.readMessageBegin();
206
      if (msg.type == TMessageType.EXCEPTION) {
207
        TApplicationException x = TApplicationException.read(iprot_);
208
        iprot_.readMessageEnd();
209
        throw x;
210
      }
211
      closeSession_result result = new closeSession_result();
212
      result.read(iprot_);
213
      iprot_.readMessageEnd();
214
      return;
215
    }
216
 
553 chandransh 217
    public User createAnonymousUser(String jsessionId) throws UserContextException, TException
48 ashish 218
    {
553 chandransh 219
      send_createAnonymousUser(jsessionId);
220
      return recv_createAnonymousUser();
48 ashish 221
    }
222
 
553 chandransh 223
    public void send_createAnonymousUser(String jsessionId) throws TException
48 ashish 224
    {
553 chandransh 225
      oprot_.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.CALL, seqid_));
226
      createAnonymousUser_args args = new createAnonymousUser_args();
227
      args.jsessionId = jsessionId;
48 ashish 228
      args.write(oprot_);
229
      oprot_.writeMessageEnd();
230
      oprot_.getTransport().flush();
231
    }
232
 
553 chandransh 233
    public User recv_createAnonymousUser() throws UserContextException, TException
48 ashish 234
    {
235
      TMessage msg = iprot_.readMessageBegin();
236
      if (msg.type == TMessageType.EXCEPTION) {
237
        TApplicationException x = TApplicationException.read(iprot_);
238
        iprot_.readMessageEnd();
239
        throw x;
240
      }
553 chandransh 241
      createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 242
      result.read(iprot_);
243
      iprot_.readMessageEnd();
244
      if (result.isSetSuccess()) {
245
        return result.success;
246
      }
553 chandransh 247
      if (result.ucex != null) {
248
        throw result.ucex;
48 ashish 249
      }
553 chandransh 250
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createAnonymousUser failed: unknown result");
48 ashish 251
    }
252
 
553 chandransh 253
    public User getUserById(long userId) throws UserContextException, TException
48 ashish 254
    {
553 chandransh 255
      send_getUserById(userId);
256
      return recv_getUserById();
48 ashish 257
    }
258
 
553 chandransh 259
    public void send_getUserById(long userId) throws TException
48 ashish 260
    {
553 chandransh 261
      oprot_.writeMessageBegin(new TMessage("getUserById", TMessageType.CALL, seqid_));
262
      getUserById_args args = new getUserById_args();
48 ashish 263
      args.userId = userId;
264
      args.write(oprot_);
265
      oprot_.writeMessageEnd();
266
      oprot_.getTransport().flush();
267
    }
268
 
553 chandransh 269
    public User recv_getUserById() throws UserContextException, TException
48 ashish 270
    {
271
      TMessage msg = iprot_.readMessageBegin();
272
      if (msg.type == TMessageType.EXCEPTION) {
273
        TApplicationException x = TApplicationException.read(iprot_);
274
        iprot_.readMessageEnd();
275
        throw x;
276
      }
553 chandransh 277
      getUserById_result result = new getUserById_result();
48 ashish 278
      result.read(iprot_);
279
      iprot_.readMessageEnd();
280
      if (result.isSetSuccess()) {
281
        return result.success;
282
      }
553 chandransh 283
      if (result.ucex != null) {
284
        throw result.ucex;
48 ashish 285
      }
553 chandransh 286
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserById failed: unknown result");
48 ashish 287
    }
288
 
553 chandransh 289
    public User createUser(User user) throws UserContextException, TException
48 ashish 290
    {
553 chandransh 291
      send_createUser(user);
292
      return recv_createUser();
48 ashish 293
    }
294
 
553 chandransh 295
    public void send_createUser(User user) throws TException
48 ashish 296
    {
553 chandransh 297
      oprot_.writeMessageBegin(new TMessage("createUser", TMessageType.CALL, seqid_));
298
      createUser_args args = new createUser_args();
299
      args.user = user;
48 ashish 300
      args.write(oprot_);
301
      oprot_.writeMessageEnd();
302
      oprot_.getTransport().flush();
303
    }
304
 
553 chandransh 305
    public User recv_createUser() throws UserContextException, TException
48 ashish 306
    {
307
      TMessage msg = iprot_.readMessageBegin();
308
      if (msg.type == TMessageType.EXCEPTION) {
309
        TApplicationException x = TApplicationException.read(iprot_);
310
        iprot_.readMessageEnd();
311
        throw x;
312
      }
553 chandransh 313
      createUser_result result = new createUser_result();
48 ashish 314
      result.read(iprot_);
315
      iprot_.readMessageEnd();
316
      if (result.isSetSuccess()) {
317
        return result.success;
318
      }
553 chandransh 319
      if (result.ucex != null) {
320
        throw result.ucex;
48 ashish 321
      }
553 chandransh 322
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createUser failed: unknown result");
48 ashish 323
    }
324
 
553 chandransh 325
    public User updateUser(User user) throws UserContextException, TException
48 ashish 326
    {
553 chandransh 327
      send_updateUser(user);
328
      return recv_updateUser();
48 ashish 329
    }
330
 
553 chandransh 331
    public void send_updateUser(User user) throws TException
48 ashish 332
    {
553 chandransh 333
      oprot_.writeMessageBegin(new TMessage("updateUser", TMessageType.CALL, seqid_));
334
      updateUser_args args = new updateUser_args();
335
      args.user = user;
48 ashish 336
      args.write(oprot_);
337
      oprot_.writeMessageEnd();
338
      oprot_.getTransport().flush();
339
    }
340
 
553 chandransh 341
    public User recv_updateUser() throws UserContextException, TException
48 ashish 342
    {
343
      TMessage msg = iprot_.readMessageBegin();
344
      if (msg.type == TMessageType.EXCEPTION) {
345
        TApplicationException x = TApplicationException.read(iprot_);
346
        iprot_.readMessageEnd();
347
        throw x;
348
      }
553 chandransh 349
      updateUser_result result = new updateUser_result();
48 ashish 350
      result.read(iprot_);
351
      iprot_.readMessageEnd();
352
      if (result.isSetSuccess()) {
353
        return result.success;
354
      }
553 chandransh 355
      if (result.ucex != null) {
356
        throw result.ucex;
48 ashish 357
      }
553 chandransh 358
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateUser failed: unknown result");
48 ashish 359
    }
360
 
553 chandransh 361
    public boolean deleteUser(long userId) throws UserContextException, TException
48 ashish 362
    {
553 chandransh 363
      send_deleteUser(userId);
364
      return recv_deleteUser();
48 ashish 365
    }
366
 
553 chandransh 367
    public void send_deleteUser(long userId) throws TException
48 ashish 368
    {
553 chandransh 369
      oprot_.writeMessageBegin(new TMessage("deleteUser", TMessageType.CALL, seqid_));
370
      deleteUser_args args = new deleteUser_args();
48 ashish 371
      args.userId = userId;
372
      args.write(oprot_);
373
      oprot_.writeMessageEnd();
374
      oprot_.getTransport().flush();
375
    }
376
 
553 chandransh 377
    public boolean recv_deleteUser() throws UserContextException, TException
48 ashish 378
    {
379
      TMessage msg = iprot_.readMessageBegin();
380
      if (msg.type == TMessageType.EXCEPTION) {
381
        TApplicationException x = TApplicationException.read(iprot_);
382
        iprot_.readMessageEnd();
383
        throw x;
384
      }
553 chandransh 385
      deleteUser_result result = new deleteUser_result();
48 ashish 386
      result.read(iprot_);
387
      iprot_.readMessageEnd();
388
      if (result.isSetSuccess()) {
389
        return result.success;
390
      }
553 chandransh 391
      if (result.ucex != null) {
392
        throw result.ucex;
48 ashish 393
      }
553 chandransh 394
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "deleteUser failed: unknown result");
48 ashish 395
    }
396
 
553 chandransh 397
    public UserState getUserState(long userId) throws UserContextException, TException
48 ashish 398
    {
553 chandransh 399
      send_getUserState(userId);
400
      return recv_getUserState();
48 ashish 401
    }
402
 
553 chandransh 403
    public void send_getUserState(long userId) throws TException
48 ashish 404
    {
553 chandransh 405
      oprot_.writeMessageBegin(new TMessage("getUserState", TMessageType.CALL, seqid_));
406
      getUserState_args args = new getUserState_args();
48 ashish 407
      args.userId = userId;
408
      args.write(oprot_);
409
      oprot_.writeMessageEnd();
410
      oprot_.getTransport().flush();
411
    }
412
 
553 chandransh 413
    public UserState recv_getUserState() throws UserContextException, TException
48 ashish 414
    {
415
      TMessage msg = iprot_.readMessageBegin();
416
      if (msg.type == TMessageType.EXCEPTION) {
417
        TApplicationException x = TApplicationException.read(iprot_);
418
        iprot_.readMessageEnd();
419
        throw x;
420
      }
553 chandransh 421
      getUserState_result result = new getUserState_result();
48 ashish 422
      result.read(iprot_);
423
      iprot_.readMessageEnd();
424
      if (result.isSetSuccess()) {
425
        return result.success;
426
      }
553 chandransh 427
      if (result.ucex != null) {
428
        throw result.ucex;
48 ashish 429
      }
553 chandransh 430
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUserState failed: unknown result");
48 ashish 431
    }
432
 
553 chandransh 433
    public User authenticateUser(String email, String password) throws AuthenticationException, TException
48 ashish 434
    {
553 chandransh 435
      send_authenticateUser(email, password);
123 ashish 436
      return recv_authenticateUser();
437
    }
438
 
553 chandransh 439
    public void send_authenticateUser(String email, String password) throws TException
123 ashish 440
    {
441
      oprot_.writeMessageBegin(new TMessage("authenticateUser", TMessageType.CALL, seqid_));
442
      authenticateUser_args args = new authenticateUser_args();
553 chandransh 443
      args.email = email;
123 ashish 444
      args.password = password;
445
      args.write(oprot_);
446
      oprot_.writeMessageEnd();
447
      oprot_.getTransport().flush();
448
    }
449
 
553 chandransh 450
    public User recv_authenticateUser() throws AuthenticationException, TException
123 ashish 451
    {
452
      TMessage msg = iprot_.readMessageBegin();
453
      if (msg.type == TMessageType.EXCEPTION) {
454
        TApplicationException x = TApplicationException.read(iprot_);
455
        iprot_.readMessageEnd();
456
        throw x;
457
      }
458
      authenticateUser_result result = new authenticateUser_result();
459
      result.read(iprot_);
460
      iprot_.readMessageEnd();
461
      if (result.isSetSuccess()) {
462
        return result.success;
463
      }
553 chandransh 464
      if (result.auex != null) {
465
        throw result.auex;
123 ashish 466
      }
467
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authenticateUser failed: unknown result");
468
    }
469
 
48 ashish 470
    public boolean userExists(String email) throws UserContextException, TException
471
    {
472
      send_userExists(email);
473
      return recv_userExists();
474
    }
475
 
476
    public void send_userExists(String email) throws TException
477
    {
478
      oprot_.writeMessageBegin(new TMessage("userExists", TMessageType.CALL, seqid_));
479
      userExists_args args = new userExists_args();
480
      args.email = email;
481
      args.write(oprot_);
482
      oprot_.writeMessageEnd();
483
      oprot_.getTransport().flush();
484
    }
485
 
486
    public boolean recv_userExists() throws UserContextException, TException
487
    {
488
      TMessage msg = iprot_.readMessageBegin();
489
      if (msg.type == TMessageType.EXCEPTION) {
490
        TApplicationException x = TApplicationException.read(iprot_);
491
        iprot_.readMessageEnd();
492
        throw x;
493
      }
494
      userExists_result result = new userExists_result();
495
      result.read(iprot_);
496
      iprot_.readMessageEnd();
497
      if (result.isSetSuccess()) {
498
        return result.success;
499
      }
500
      if (result.ucx != null) {
501
        throw result.ucx;
502
      }
503
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "userExists failed: unknown result");
504
    }
505
 
571 rajveer 506
    public long addAddressForUser(long userId, Address address, boolean setDefault) throws UserContextException, TException
48 ashish 507
    {
571 rajveer 508
      send_addAddressForUser(userId, address, setDefault);
48 ashish 509
      return recv_addAddressForUser();
510
    }
511
 
571 rajveer 512
    public void send_addAddressForUser(long userId, Address address, boolean setDefault) throws TException
48 ashish 513
    {
514
      oprot_.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.CALL, seqid_));
515
      addAddressForUser_args args = new addAddressForUser_args();
553 chandransh 516
      args.userId = userId;
48 ashish 517
      args.address = address;
513 rajveer 518
      args.setDefault = setDefault;
48 ashish 519
      args.write(oprot_);
520
      oprot_.writeMessageEnd();
521
      oprot_.getTransport().flush();
522
    }
523
 
571 rajveer 524
    public long recv_addAddressForUser() throws UserContextException, TException
48 ashish 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
      addAddressForUser_result result = new addAddressForUser_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, "addAddressForUser failed: unknown result");
542
    }
543
 
544
    public boolean removeAddressForUser(long userid, long addressId) throws UserContextException, TException
545
    {
546
      send_removeAddressForUser(userid, addressId);
547
      return recv_removeAddressForUser();
548
    }
549
 
550
    public void send_removeAddressForUser(long userid, long addressId) throws TException
551
    {
552
      oprot_.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.CALL, seqid_));
553
      removeAddressForUser_args args = new removeAddressForUser_args();
554
      args.userid = userid;
555
      args.addressId = addressId;
556
      args.write(oprot_);
557
      oprot_.writeMessageEnd();
558
      oprot_.getTransport().flush();
559
    }
560
 
561
    public boolean recv_removeAddressForUser() throws UserContextException, TException
562
    {
563
      TMessage msg = iprot_.readMessageBegin();
564
      if (msg.type == TMessageType.EXCEPTION) {
565
        TApplicationException x = TApplicationException.read(iprot_);
566
        iprot_.readMessageEnd();
567
        throw x;
568
      }
569
      removeAddressForUser_result result = new removeAddressForUser_result();
570
      result.read(iprot_);
571
      iprot_.readMessageEnd();
572
      if (result.isSetSuccess()) {
573
        return result.success;
574
      }
575
      if (result.ucx != null) {
576
        throw result.ucx;
577
      }
578
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "removeAddressForUser failed: unknown result");
579
    }
580
 
581
    public boolean setUserAsLoggedIn(long userId, long timestamp) throws UserContextException, TException
582
    {
583
      send_setUserAsLoggedIn(userId, timestamp);
584
      return recv_setUserAsLoggedIn();
585
    }
586
 
587
    public void send_setUserAsLoggedIn(long userId, long timestamp) throws TException
588
    {
589
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.CALL, seqid_));
590
      setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
591
      args.userId = userId;
592
      args.timestamp = timestamp;
593
      args.write(oprot_);
594
      oprot_.writeMessageEnd();
595
      oprot_.getTransport().flush();
596
    }
597
 
598
    public boolean recv_setUserAsLoggedIn() throws UserContextException, TException
599
    {
600
      TMessage msg = iprot_.readMessageBegin();
601
      if (msg.type == TMessageType.EXCEPTION) {
602
        TApplicationException x = TApplicationException.read(iprot_);
603
        iprot_.readMessageEnd();
604
        throw x;
605
      }
606
      setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
607
      result.read(iprot_);
608
      iprot_.readMessageEnd();
609
      if (result.isSetSuccess()) {
610
        return result.success;
611
      }
612
      if (result.ucx != null) {
613
        throw result.ucx;
614
      }
615
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedIn failed: unknown result");
616
    }
617
 
618
    public boolean setUserAsLoggedOut(long userid, long timestamp) throws UserContextException, TException
619
    {
620
      send_setUserAsLoggedOut(userid, timestamp);
621
      return recv_setUserAsLoggedOut();
622
    }
623
 
624
    public void send_setUserAsLoggedOut(long userid, long timestamp) throws TException
625
    {
626
      oprot_.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.CALL, seqid_));
627
      setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
628
      args.userid = userid;
629
      args.timestamp = timestamp;
630
      args.write(oprot_);
631
      oprot_.writeMessageEnd();
632
      oprot_.getTransport().flush();
633
    }
634
 
635
    public boolean recv_setUserAsLoggedOut() throws UserContextException, TException
636
    {
637
      TMessage msg = iprot_.readMessageBegin();
638
      if (msg.type == TMessageType.EXCEPTION) {
639
        TApplicationException x = TApplicationException.read(iprot_);
640
        iprot_.readMessageEnd();
641
        throw x;
642
      }
643
      setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
644
      result.read(iprot_);
645
      iprot_.readMessageEnd();
646
      if (result.isSetSuccess()) {
647
        return result.success;
648
      }
649
      if (result.ucx != null) {
650
        throw result.ucx;
651
      }
652
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setUserAsLoggedOut failed: unknown result");
653
    }
654
 
506 rajveer 655
    public boolean setDefaultAddress(long userid, long addressId) throws UserContextException, TException
656
    {
657
      send_setDefaultAddress(userid, addressId);
658
      return recv_setDefaultAddress();
659
    }
660
 
661
    public void send_setDefaultAddress(long userid, long addressId) throws TException
662
    {
663
      oprot_.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.CALL, seqid_));
664
      setDefaultAddress_args args = new setDefaultAddress_args();
665
      args.userid = userid;
666
      args.addressId = addressId;
667
      args.write(oprot_);
668
      oprot_.writeMessageEnd();
669
      oprot_.getTransport().flush();
670
    }
671
 
672
    public boolean recv_setDefaultAddress() throws UserContextException, TException
673
    {
674
      TMessage msg = iprot_.readMessageBegin();
675
      if (msg.type == TMessageType.EXCEPTION) {
676
        TApplicationException x = TApplicationException.read(iprot_);
677
        iprot_.readMessageEnd();
678
        throw x;
679
      }
680
      setDefaultAddress_result result = new setDefaultAddress_result();
681
      result.read(iprot_);
682
      iprot_.readMessageEnd();
683
      if (result.isSetSuccess()) {
684
        return result.success;
685
      }
686
      if (result.ucx != null) {
687
        throw result.ucx;
688
      }
689
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "setDefaultAddress failed: unknown result");
690
    }
691
 
593 rajveer 692
    public boolean updatePassword(long userid, String oldPassword, String newPassword) throws UserContextException, TException
48 ashish 693
    {
593 rajveer 694
      send_updatePassword(userid, oldPassword, newPassword);
48 ashish 695
      return recv_updatePassword();
696
    }
697
 
593 rajveer 698
    public void send_updatePassword(long userid, String oldPassword, String newPassword) throws TException
48 ashish 699
    {
700
      oprot_.writeMessageBegin(new TMessage("updatePassword", TMessageType.CALL, seqid_));
701
      updatePassword_args args = new updatePassword_args();
702
      args.userid = userid;
593 rajveer 703
      args.oldPassword = oldPassword;
704
      args.newPassword = newPassword;
48 ashish 705
      args.write(oprot_);
706
      oprot_.writeMessageEnd();
707
      oprot_.getTransport().flush();
708
    }
709
 
710
    public boolean recv_updatePassword() 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
      updatePassword_result result = new updatePassword_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, "updatePassword failed: unknown result");
728
    }
729
 
896 rajveer 730
    public boolean forgotPassword(String email, String newPassword) throws UserContextException, TException
582 rajveer 731
    {
896 rajveer 732
      send_forgotPassword(email, newPassword);
582 rajveer 733
      return recv_forgotPassword();
734
    }
735
 
896 rajveer 736
    public void send_forgotPassword(String email, String newPassword) throws TException
582 rajveer 737
    {
738
      oprot_.writeMessageBegin(new TMessage("forgotPassword", TMessageType.CALL, seqid_));
739
      forgotPassword_args args = new forgotPassword_args();
740
      args.email = email;
896 rajveer 741
      args.newPassword = newPassword;
582 rajveer 742
      args.write(oprot_);
743
      oprot_.writeMessageEnd();
744
      oprot_.getTransport().flush();
745
    }
746
 
747
    public boolean recv_forgotPassword() throws UserContextException, TException
748
    {
749
      TMessage msg = iprot_.readMessageBegin();
750
      if (msg.type == TMessageType.EXCEPTION) {
751
        TApplicationException x = TApplicationException.read(iprot_);
752
        iprot_.readMessageEnd();
753
        throw x;
754
      }
755
      forgotPassword_result result = new forgotPassword_result();
756
      result.read(iprot_);
757
      iprot_.readMessageEnd();
758
      if (result.isSetSuccess()) {
759
        return result.success;
760
      }
761
      if (result.ucx != null) {
762
        throw result.ucx;
763
      }
764
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "forgotPassword failed: unknown result");
765
    }
766
 
593 rajveer 767
    public List<Address> getAllAddressesForUser(long userId) throws UserContextException, TException
768
    {
769
      send_getAllAddressesForUser(userId);
770
      return recv_getAllAddressesForUser();
771
    }
772
 
773
    public void send_getAllAddressesForUser(long userId) throws TException
774
    {
775
      oprot_.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.CALL, seqid_));
776
      getAllAddressesForUser_args args = new getAllAddressesForUser_args();
777
      args.userId = userId;
778
      args.write(oprot_);
779
      oprot_.writeMessageEnd();
780
      oprot_.getTransport().flush();
781
    }
782
 
783
    public List<Address> recv_getAllAddressesForUser() throws UserContextException, TException
784
    {
785
      TMessage msg = iprot_.readMessageBegin();
786
      if (msg.type == TMessageType.EXCEPTION) {
787
        TApplicationException x = TApplicationException.read(iprot_);
788
        iprot_.readMessageEnd();
789
        throw x;
790
      }
791
      getAllAddressesForUser_result result = new getAllAddressesForUser_result();
792
      result.read(iprot_);
793
      iprot_.readMessageEnd();
794
      if (result.isSetSuccess()) {
795
        return result.success;
796
      }
797
      if (result.ucx != null) {
798
        throw result.ucx;
799
      }
800
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllAddressesForUser failed: unknown result");
801
    }
802
 
803
    public long getDefaultAddressId(long userId) throws UserContextException, TException
804
    {
805
      send_getDefaultAddressId(userId);
806
      return recv_getDefaultAddressId();
807
    }
808
 
809
    public void send_getDefaultAddressId(long userId) throws TException
810
    {
811
      oprot_.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.CALL, seqid_));
812
      getDefaultAddressId_args args = new getDefaultAddressId_args();
813
      args.userId = userId;
814
      args.write(oprot_);
815
      oprot_.writeMessageEnd();
816
      oprot_.getTransport().flush();
817
    }
818
 
819
    public long recv_getDefaultAddressId() throws UserContextException, TException
820
    {
821
      TMessage msg = iprot_.readMessageBegin();
822
      if (msg.type == TMessageType.EXCEPTION) {
823
        TApplicationException x = TApplicationException.read(iprot_);
824
        iprot_.readMessageEnd();
825
        throw x;
826
      }
827
      getDefaultAddressId_result result = new getDefaultAddressId_result();
828
      result.read(iprot_);
829
      iprot_.readMessageEnd();
830
      if (result.isSetSuccess()) {
831
        return result.success;
832
      }
833
      if (result.ucx != null) {
834
        throw result.ucx;
835
      }
836
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultAddressId failed: unknown result");
837
    }
838
 
784 rajveer 839
    public String getDefaultPincode(long userId) throws UserContextException, TException
840
    {
841
      send_getDefaultPincode(userId);
842
      return recv_getDefaultPincode();
843
    }
844
 
845
    public void send_getDefaultPincode(long userId) throws TException
846
    {
847
      oprot_.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.CALL, seqid_));
848
      getDefaultPincode_args args = new getDefaultPincode_args();
849
      args.userId = userId;
850
      args.write(oprot_);
851
      oprot_.writeMessageEnd();
852
      oprot_.getTransport().flush();
853
    }
854
 
855
    public String recv_getDefaultPincode() throws UserContextException, TException
856
    {
857
      TMessage msg = iprot_.readMessageBegin();
858
      if (msg.type == TMessageType.EXCEPTION) {
859
        TApplicationException x = TApplicationException.read(iprot_);
860
        iprot_.readMessageEnd();
861
        throw x;
862
      }
863
      getDefaultPincode_result result = new getDefaultPincode_result();
864
      result.read(iprot_);
865
      iprot_.readMessageEnd();
866
      if (result.isSetSuccess()) {
867
        return result.success;
868
      }
869
      if (result.ucx != null) {
870
        throw result.ucx;
871
      }
872
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getDefaultPincode failed: unknown result");
873
    }
874
 
1177 varun.gupt 875
    public boolean saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws UserCommunicationException, TException
876
    {
877
      send_saveUserCommunication(userId, replyTo, communicationType, orderId, airwaybillNo, productName, subject, message);
878
      return recv_saveUserCommunication();
879
    }
880
 
881
    public void send_saveUserCommunication(long userId, String replyTo, long communicationType, long orderId, String airwaybillNo, String productName, String subject, String message) throws TException
882
    {
883
      oprot_.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.CALL, seqid_));
884
      saveUserCommunication_args args = new saveUserCommunication_args();
885
      args.userId = userId;
886
      args.replyTo = replyTo;
887
      args.communicationType = communicationType;
888
      args.orderId = orderId;
889
      args.airwaybillNo = airwaybillNo;
890
      args.productName = productName;
891
      args.subject = subject;
892
      args.message = message;
893
      args.write(oprot_);
894
      oprot_.writeMessageEnd();
895
      oprot_.getTransport().flush();
896
    }
897
 
898
    public boolean recv_saveUserCommunication() throws UserCommunicationException, TException
899
    {
900
      TMessage msg = iprot_.readMessageBegin();
901
      if (msg.type == TMessageType.EXCEPTION) {
902
        TApplicationException x = TApplicationException.read(iprot_);
903
        iprot_.readMessageEnd();
904
        throw x;
905
      }
906
      saveUserCommunication_result result = new saveUserCommunication_result();
907
      result.read(iprot_);
908
      iprot_.readMessageEnd();
909
      if (result.isSetSuccess()) {
910
        return result.success;
911
      }
912
      if (result.ucx != null) {
913
        throw result.ucx;
914
      }
915
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "saveUserCommunication failed: unknown result");
916
    }
917
 
553 chandransh 918
    public long createCart(long userId) throws ShoppingCartException, TException
48 ashish 919
    {
553 chandransh 920
      send_createCart(userId);
921
      return recv_createCart();
48 ashish 922
    }
923
 
553 chandransh 924
    public void send_createCart(long userId) throws TException
48 ashish 925
    {
553 chandransh 926
      oprot_.writeMessageBegin(new TMessage("createCart", TMessageType.CALL, seqid_));
927
      createCart_args args = new createCart_args();
928
      args.userId = userId;
48 ashish 929
      args.write(oprot_);
930
      oprot_.writeMessageEnd();
931
      oprot_.getTransport().flush();
932
    }
933
 
553 chandransh 934
    public long recv_createCart() throws ShoppingCartException, TException
48 ashish 935
    {
936
      TMessage msg = iprot_.readMessageBegin();
937
      if (msg.type == TMessageType.EXCEPTION) {
938
        TApplicationException x = TApplicationException.read(iprot_);
939
        iprot_.readMessageEnd();
940
        throw x;
941
      }
553 chandransh 942
      createCart_result result = new createCart_result();
48 ashish 943
      result.read(iprot_);
944
      iprot_.readMessageEnd();
945
      if (result.isSetSuccess()) {
946
        return result.success;
947
      }
553 chandransh 948
      if (result.scx != null) {
949
        throw result.scx;
48 ashish 950
      }
553 chandransh 951
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createCart failed: unknown result");
48 ashish 952
    }
953
 
553 chandransh 954
    public Cart getCurrentCart(long userId) throws ShoppingCartException, TException
48 ashish 955
    {
553 chandransh 956
      send_getCurrentCart(userId);
957
      return recv_getCurrentCart();
48 ashish 958
    }
959
 
553 chandransh 960
    public void send_getCurrentCart(long userId) throws TException
48 ashish 961
    {
553 chandransh 962
      oprot_.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.CALL, seqid_));
963
      getCurrentCart_args args = new getCurrentCart_args();
964
      args.userId = userId;
48 ashish 965
      args.write(oprot_);
966
      oprot_.writeMessageEnd();
967
      oprot_.getTransport().flush();
968
    }
969
 
553 chandransh 970
    public Cart recv_getCurrentCart() throws ShoppingCartException, TException
48 ashish 971
    {
972
      TMessage msg = iprot_.readMessageBegin();
973
      if (msg.type == TMessageType.EXCEPTION) {
974
        TApplicationException x = TApplicationException.read(iprot_);
975
        iprot_.readMessageEnd();
976
        throw x;
977
      }
553 chandransh 978
      getCurrentCart_result result = new getCurrentCart_result();
48 ashish 979
      result.read(iprot_);
980
      iprot_.readMessageEnd();
981
      if (result.isSetSuccess()) {
982
        return result.success;
983
      }
553 chandransh 984
      if (result.scx != null) {
985
        throw result.scx;
48 ashish 986
      }
553 chandransh 987
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCurrentCart failed: unknown result");
48 ashish 988
    }
989
 
553 chandransh 990
    public Cart getCart(long cartId) throws ShoppingCartException, TException
48 ashish 991
    {
553 chandransh 992
      send_getCart(cartId);
993
      return recv_getCart();
48 ashish 994
    }
995
 
553 chandransh 996
    public void send_getCart(long cartId) throws TException
48 ashish 997
    {
553 chandransh 998
      oprot_.writeMessageBegin(new TMessage("getCart", TMessageType.CALL, seqid_));
999
      getCart_args args = new getCart_args();
1000
      args.cartId = cartId;
48 ashish 1001
      args.write(oprot_);
1002
      oprot_.writeMessageEnd();
1003
      oprot_.getTransport().flush();
1004
    }
1005
 
553 chandransh 1006
    public Cart recv_getCart() throws ShoppingCartException, TException
48 ashish 1007
    {
1008
      TMessage msg = iprot_.readMessageBegin();
1009
      if (msg.type == TMessageType.EXCEPTION) {
1010
        TApplicationException x = TApplicationException.read(iprot_);
1011
        iprot_.readMessageEnd();
1012
        throw x;
1013
      }
553 chandransh 1014
      getCart_result result = new getCart_result();
48 ashish 1015
      result.read(iprot_);
1016
      iprot_.readMessageEnd();
1017
      if (result.isSetSuccess()) {
1018
        return result.success;
1019
      }
553 chandransh 1020
      if (result.scx != null) {
1021
        throw result.scx;
48 ashish 1022
      }
553 chandransh 1023
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCart failed: unknown result");
48 ashish 1024
    }
1025
 
553 chandransh 1026
    public List<Cart> getCartsForUser(long userId, CartStatus status) throws ShoppingCartException, TException
48 ashish 1027
    {
553 chandransh 1028
      send_getCartsForUser(userId, status);
1029
      return recv_getCartsForUser();
48 ashish 1030
    }
1031
 
553 chandransh 1032
    public void send_getCartsForUser(long userId, CartStatus status) throws TException
48 ashish 1033
    {
553 chandransh 1034
      oprot_.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.CALL, seqid_));
1035
      getCartsForUser_args args = new getCartsForUser_args();
1036
      args.userId = userId;
1037
      args.status = status;
48 ashish 1038
      args.write(oprot_);
1039
      oprot_.writeMessageEnd();
1040
      oprot_.getTransport().flush();
1041
    }
1042
 
553 chandransh 1043
    public List<Cart> recv_getCartsForUser() throws ShoppingCartException, TException
48 ashish 1044
    {
1045
      TMessage msg = iprot_.readMessageBegin();
1046
      if (msg.type == TMessageType.EXCEPTION) {
1047
        TApplicationException x = TApplicationException.read(iprot_);
1048
        iprot_.readMessageEnd();
1049
        throw x;
1050
      }
553 chandransh 1051
      getCartsForUser_result result = new getCartsForUser_result();
48 ashish 1052
      result.read(iprot_);
1053
      iprot_.readMessageEnd();
1054
      if (result.isSetSuccess()) {
1055
        return result.success;
1056
      }
553 chandransh 1057
      if (result.scx != null) {
1058
        throw result.scx;
48 ashish 1059
      }
553 chandransh 1060
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsForUser failed: unknown result");
48 ashish 1061
    }
1062
 
553 chandransh 1063
    public List<Cart> getCartsByStatus(CartStatus status) throws ShoppingCartException, TException
48 ashish 1064
    {
553 chandransh 1065
      send_getCartsByStatus(status);
1066
      return recv_getCartsByStatus();
48 ashish 1067
    }
1068
 
553 chandransh 1069
    public void send_getCartsByStatus(CartStatus status) throws TException
48 ashish 1070
    {
553 chandransh 1071
      oprot_.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.CALL, seqid_));
1072
      getCartsByStatus_args args = new getCartsByStatus_args();
1073
      args.status = status;
48 ashish 1074
      args.write(oprot_);
1075
      oprot_.writeMessageEnd();
1076
      oprot_.getTransport().flush();
1077
    }
1078
 
553 chandransh 1079
    public List<Cart> recv_getCartsByStatus() throws ShoppingCartException, TException
48 ashish 1080
    {
1081
      TMessage msg = iprot_.readMessageBegin();
1082
      if (msg.type == TMessageType.EXCEPTION) {
1083
        TApplicationException x = TApplicationException.read(iprot_);
1084
        iprot_.readMessageEnd();
1085
        throw x;
1086
      }
553 chandransh 1087
      getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 1088
      result.read(iprot_);
1089
      iprot_.readMessageEnd();
1090
      if (result.isSetSuccess()) {
1091
        return result.success;
1092
      }
553 chandransh 1093
      if (result.scx != null) {
1094
        throw result.scx;
48 ashish 1095
      }
553 chandransh 1096
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCartsByStatus failed: unknown result");
48 ashish 1097
    }
1098
 
553 chandransh 1099
    public List<Cart> getCartsByTime(long from_time, long to_time, CartStatus status) throws ShoppingCartException, TException
48 ashish 1100
    {
553 chandransh 1101
      send_getCartsByTime(from_time, to_time, status);
1102
      return recv_getCartsByTime();
48 ashish 1103
    }
1104
 
553 chandransh 1105
    public void send_getCartsByTime(long from_time, long to_time, CartStatus status) throws TException
48 ashish 1106
    {
553 chandransh 1107
      oprot_.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.CALL, seqid_));
1108
      getCartsByTime_args args = new getCartsByTime_args();
1109
      args.from_time = from_time;
1110
      args.to_time = to_time;
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_getCartsByTime() 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
      getCartsByTime_result result = new getCartsByTime_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, "getCartsByTime failed: unknown result");
48 ashish 1135
    }
1136
 
553 chandransh 1137
    public void changeCartStatus(long cartId, CartStatus status) throws ShoppingCartException, TException
130 ashish 1138
    {
553 chandransh 1139
      send_changeCartStatus(cartId, status);
1140
      recv_changeCartStatus();
130 ashish 1141
    }
1142
 
553 chandransh 1143
    public void send_changeCartStatus(long cartId, CartStatus status) throws TException
130 ashish 1144
    {
553 chandransh 1145
      oprot_.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.CALL, seqid_));
1146
      changeCartStatus_args args = new changeCartStatus_args();
1147
      args.cartId = cartId;
1148
      args.status = status;
130 ashish 1149
      args.write(oprot_);
1150
      oprot_.writeMessageEnd();
1151
      oprot_.getTransport().flush();
1152
    }
1153
 
553 chandransh 1154
    public void recv_changeCartStatus() throws ShoppingCartException, TException
130 ashish 1155
    {
1156
      TMessage msg = iprot_.readMessageBegin();
1157
      if (msg.type == TMessageType.EXCEPTION) {
1158
        TApplicationException x = TApplicationException.read(iprot_);
1159
        iprot_.readMessageEnd();
1160
        throw x;
1161
      }
553 chandransh 1162
      changeCartStatus_result result = new changeCartStatus_result();
130 ashish 1163
      result.read(iprot_);
1164
      iprot_.readMessageEnd();
553 chandransh 1165
      if (result.scx != null) {
1166
        throw result.scx;
1167
      }
1168
      return;
1169
    }
1170
 
1171
    public void addItemToCart(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1172
    {
1173
      send_addItemToCart(cartId, itemId, quantity);
1174
      recv_addItemToCart();
1175
    }
1176
 
1177
    public void send_addItemToCart(long cartId, long itemId, long quantity) throws TException
1178
    {
1179
      oprot_.writeMessageBegin(new TMessage("addItemToCart", TMessageType.CALL, seqid_));
1180
      addItemToCart_args args = new addItemToCart_args();
1181
      args.cartId = cartId;
1182
      args.itemId = itemId;
1183
      args.quantity = quantity;
1184
      args.write(oprot_);
1185
      oprot_.writeMessageEnd();
1186
      oprot_.getTransport().flush();
1187
    }
1188
 
1189
    public void recv_addItemToCart() throws ShoppingCartException, TException
1190
    {
1191
      TMessage msg = iprot_.readMessageBegin();
1192
      if (msg.type == TMessageType.EXCEPTION) {
1193
        TApplicationException x = TApplicationException.read(iprot_);
1194
        iprot_.readMessageEnd();
1195
        throw x;
1196
      }
1197
      addItemToCart_result result = new addItemToCart_result();
1198
      result.read(iprot_);
1199
      iprot_.readMessageEnd();
1200
      if (result.scx != null) {
1201
        throw result.scx;
1202
      }
1203
      return;
1204
    }
1205
 
1206
    public void deleteItemFromCart(long cartId, long itemId) throws ShoppingCartException, TException
1207
    {
1208
      send_deleteItemFromCart(cartId, itemId);
1209
      recv_deleteItemFromCart();
1210
    }
1211
 
1212
    public void send_deleteItemFromCart(long cartId, long itemId) throws TException
1213
    {
1214
      oprot_.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.CALL, seqid_));
1215
      deleteItemFromCart_args args = new deleteItemFromCart_args();
1216
      args.cartId = cartId;
1217
      args.itemId = itemId;
1218
      args.write(oprot_);
1219
      oprot_.writeMessageEnd();
1220
      oprot_.getTransport().flush();
1221
    }
1222
 
1223
    public void recv_deleteItemFromCart() throws ShoppingCartException, TException
1224
    {
1225
      TMessage msg = iprot_.readMessageBegin();
1226
      if (msg.type == TMessageType.EXCEPTION) {
1227
        TApplicationException x = TApplicationException.read(iprot_);
1228
        iprot_.readMessageEnd();
1229
        throw x;
1230
      }
1231
      deleteItemFromCart_result result = new deleteItemFromCart_result();
1232
      result.read(iprot_);
1233
      iprot_.readMessageEnd();
1234
      if (result.scx != null) {
1235
        throw result.scx;
1236
      }
1237
      return;
1238
    }
1239
 
1240
    public void changeQuantity(long cartId, long itemId, long quantity) throws ShoppingCartException, TException
1241
    {
1242
      send_changeQuantity(cartId, itemId, quantity);
1243
      recv_changeQuantity();
1244
    }
1245
 
1246
    public void send_changeQuantity(long cartId, long itemId, long quantity) throws TException
1247
    {
1248
      oprot_.writeMessageBegin(new TMessage("changeQuantity", TMessageType.CALL, seqid_));
1249
      changeQuantity_args args = new changeQuantity_args();
1250
      args.cartId = cartId;
1251
      args.itemId = itemId;
1252
      args.quantity = quantity;
1253
      args.write(oprot_);
1254
      oprot_.writeMessageEnd();
1255
      oprot_.getTransport().flush();
1256
    }
1257
 
1258
    public void recv_changeQuantity() throws ShoppingCartException, TException
1259
    {
1260
      TMessage msg = iprot_.readMessageBegin();
1261
      if (msg.type == TMessageType.EXCEPTION) {
1262
        TApplicationException x = TApplicationException.read(iprot_);
1263
        iprot_.readMessageEnd();
1264
        throw x;
1265
      }
1266
      changeQuantity_result result = new changeQuantity_result();
1267
      result.read(iprot_);
1268
      iprot_.readMessageEnd();
1269
      if (result.scx != null) {
1270
        throw result.scx;
1271
      }
1272
      return;
1273
    }
1274
 
1275
    public void changeItemStatus(long cartId, long itemId, LineStatus status) throws ShoppingCartException, TException
1276
    {
1277
      send_changeItemStatus(cartId, itemId, status);
1278
      recv_changeItemStatus();
1279
    }
1280
 
1281
    public void send_changeItemStatus(long cartId, long itemId, LineStatus status) throws TException
1282
    {
1283
      oprot_.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.CALL, seqid_));
1284
      changeItemStatus_args args = new changeItemStatus_args();
1285
      args.cartId = cartId;
1286
      args.itemId = itemId;
1287
      args.status = status;
1288
      args.write(oprot_);
1289
      oprot_.writeMessageEnd();
1290
      oprot_.getTransport().flush();
1291
    }
1292
 
1293
    public void recv_changeItemStatus() throws ShoppingCartException, TException
1294
    {
1295
      TMessage msg = iprot_.readMessageBegin();
1296
      if (msg.type == TMessageType.EXCEPTION) {
1297
        TApplicationException x = TApplicationException.read(iprot_);
1298
        iprot_.readMessageEnd();
1299
        throw x;
1300
      }
1301
      changeItemStatus_result result = new changeItemStatus_result();
1302
      result.read(iprot_);
1303
      iprot_.readMessageEnd();
1304
      if (result.scx != null) {
1305
        throw result.scx;
1306
      }
1307
      return;
1308
    }
1309
 
578 chandransh 1310
    public void addAddressToCart(long cartId, long addressId) throws ShoppingCartException, TException
553 chandransh 1311
    {
1312
      send_addAddressToCart(cartId, addressId);
1313
      recv_addAddressToCart();
1314
    }
1315
 
1316
    public void send_addAddressToCart(long cartId, long addressId) throws TException
1317
    {
1318
      oprot_.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.CALL, seqid_));
1319
      addAddressToCart_args args = new addAddressToCart_args();
1320
      args.cartId = cartId;
1321
      args.addressId = addressId;
1322
      args.write(oprot_);
1323
      oprot_.writeMessageEnd();
1324
      oprot_.getTransport().flush();
1325
    }
1326
 
578 chandransh 1327
    public void recv_addAddressToCart() throws ShoppingCartException, TException
553 chandransh 1328
    {
1329
      TMessage msg = iprot_.readMessageBegin();
1330
      if (msg.type == TMessageType.EXCEPTION) {
1331
        TApplicationException x = TApplicationException.read(iprot_);
1332
        iprot_.readMessageEnd();
1333
        throw x;
1334
      }
1335
      addAddressToCart_result result = new addAddressToCart_result();
1336
      result.read(iprot_);
1337
      iprot_.readMessageEnd();
578 chandransh 1338
      if (result.scx != null) {
1339
        throw result.scx;
1340
      }
553 chandransh 1341
      return;
1342
    }
1343
 
688 chandransh 1344
    public long createOrders(long cartId) throws ShoppingCartException, TException
553 chandransh 1345
    {
688 chandransh 1346
      send_createOrders(cartId);
1347
      return recv_createOrders();
553 chandransh 1348
    }
1349
 
688 chandransh 1350
    public void send_createOrders(long cartId) throws TException
553 chandransh 1351
    {
688 chandransh 1352
      oprot_.writeMessageBegin(new TMessage("createOrders", TMessageType.CALL, seqid_));
1353
      createOrders_args args = new createOrders_args();
553 chandransh 1354
      args.cartId = cartId;
1355
      args.write(oprot_);
1356
      oprot_.writeMessageEnd();
1357
      oprot_.getTransport().flush();
1358
    }
1359
 
688 chandransh 1360
    public long recv_createOrders() throws ShoppingCartException, TException
553 chandransh 1361
    {
1362
      TMessage msg = iprot_.readMessageBegin();
1363
      if (msg.type == TMessageType.EXCEPTION) {
1364
        TApplicationException x = TApplicationException.read(iprot_);
1365
        iprot_.readMessageEnd();
1366
        throw x;
1367
      }
688 chandransh 1368
      createOrders_result result = new createOrders_result();
553 chandransh 1369
      result.read(iprot_);
1370
      iprot_.readMessageEnd();
130 ashish 1371
      if (result.isSetSuccess()) {
1372
        return result.success;
1373
      }
553 chandransh 1374
      if (result.scx != null) {
1375
        throw result.scx;
130 ashish 1376
      }
688 chandransh 1377
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrders failed: unknown result");
130 ashish 1378
    }
1379
 
578 chandransh 1380
    public boolean validateCart(long cartId) throws ShoppingCartException, TException
130 ashish 1381
    {
553 chandransh 1382
      send_validateCart(cartId);
1383
      return recv_validateCart();
130 ashish 1384
    }
1385
 
553 chandransh 1386
    public void send_validateCart(long cartId) throws TException
130 ashish 1387
    {
553 chandransh 1388
      oprot_.writeMessageBegin(new TMessage("validateCart", TMessageType.CALL, seqid_));
1389
      validateCart_args args = new validateCart_args();
1390
      args.cartId = cartId;
130 ashish 1391
      args.write(oprot_);
1392
      oprot_.writeMessageEnd();
1393
      oprot_.getTransport().flush();
1394
    }
1395
 
578 chandransh 1396
    public boolean recv_validateCart() throws ShoppingCartException, TException
130 ashish 1397
    {
1398
      TMessage msg = iprot_.readMessageBegin();
1399
      if (msg.type == TMessageType.EXCEPTION) {
1400
        TApplicationException x = TApplicationException.read(iprot_);
1401
        iprot_.readMessageEnd();
1402
        throw x;
1403
      }
553 chandransh 1404
      validateCart_result result = new validateCart_result();
130 ashish 1405
      result.read(iprot_);
1406
      iprot_.readMessageEnd();
1407
      if (result.isSetSuccess()) {
1408
        return result.success;
1409
      }
578 chandransh 1410
      if (result.scex != null) {
1411
        throw result.scex;
1412
      }
553 chandransh 1413
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateCart failed: unknown result");
1414
    }
1415
 
688 chandransh 1416
    public void mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1417
    {
688 chandransh 1418
      send_mergeCart(fromCartId, toCartId);
1419
      recv_mergeCart();
578 chandransh 1420
    }
1421
 
688 chandransh 1422
    public void send_mergeCart(long fromCartId, long toCartId) throws TException
578 chandransh 1423
    {
688 chandransh 1424
      oprot_.writeMessageBegin(new TMessage("mergeCart", TMessageType.CALL, seqid_));
1425
      mergeCart_args args = new mergeCart_args();
1426
      args.fromCartId = fromCartId;
1427
      args.toCartId = toCartId;
1428
      args.write(oprot_);
1429
      oprot_.writeMessageEnd();
1430
      oprot_.getTransport().flush();
1431
    }
1432
 
1433
    public void recv_mergeCart() throws TException
1434
    {
1435
      TMessage msg = iprot_.readMessageBegin();
1436
      if (msg.type == TMessageType.EXCEPTION) {
1437
        TApplicationException x = TApplicationException.read(iprot_);
1438
        iprot_.readMessageEnd();
1439
        throw x;
1440
      }
1441
      mergeCart_result result = new mergeCart_result();
1442
      result.read(iprot_);
1443
      iprot_.readMessageEnd();
1444
      return;
1445
    }
1446
 
1447
    public boolean checkOut(long cartId) throws ShoppingCartException, TException
1448
    {
1449
      send_checkOut(cartId);
1450
      return recv_checkOut();
1451
    }
1452
 
1453
    public void send_checkOut(long cartId) throws TException
1454
    {
1455
      oprot_.writeMessageBegin(new TMessage("checkOut", TMessageType.CALL, seqid_));
1456
      checkOut_args args = new checkOut_args();
578 chandransh 1457
      args.cartId = cartId;
1458
      args.write(oprot_);
1459
      oprot_.writeMessageEnd();
1460
      oprot_.getTransport().flush();
1461
    }
1462
 
688 chandransh 1463
    public boolean recv_checkOut() throws ShoppingCartException, TException
578 chandransh 1464
    {
1465
      TMessage msg = iprot_.readMessageBegin();
1466
      if (msg.type == TMessageType.EXCEPTION) {
1467
        TApplicationException x = TApplicationException.read(iprot_);
1468
        iprot_.readMessageEnd();
1469
        throw x;
1470
      }
688 chandransh 1471
      checkOut_result result = new checkOut_result();
578 chandransh 1472
      result.read(iprot_);
1473
      iprot_.readMessageEnd();
1474
      if (result.isSetSuccess()) {
1475
        return result.success;
1476
      }
1477
      if (result.scex != null) {
1478
        throw result.scex;
1479
      }
688 chandransh 1480
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "checkOut failed: unknown result");
578 chandransh 1481
    }
1482
 
708 rajveer 1483
    public boolean resetCart(long cartId, Map<Long,Double> items) throws ShoppingCartException, TException
553 chandransh 1484
    {
688 chandransh 1485
      send_resetCart(cartId, items);
1486
      return recv_resetCart();
553 chandransh 1487
    }
1488
 
708 rajveer 1489
    public void send_resetCart(long cartId, Map<Long,Double> items) throws TException
553 chandransh 1490
    {
688 chandransh 1491
      oprot_.writeMessageBegin(new TMessage("resetCart", TMessageType.CALL, seqid_));
1492
      resetCart_args args = new resetCart_args();
1493
      args.cartId = cartId;
1494
      args.items = items;
553 chandransh 1495
      args.write(oprot_);
1496
      oprot_.writeMessageEnd();
1497
      oprot_.getTransport().flush();
1498
    }
1499
 
688 chandransh 1500
    public boolean recv_resetCart() throws ShoppingCartException, TException
553 chandransh 1501
    {
1502
      TMessage msg = iprot_.readMessageBegin();
1503
      if (msg.type == TMessageType.EXCEPTION) {
1504
        TApplicationException x = TApplicationException.read(iprot_);
1505
        iprot_.readMessageEnd();
1506
        throw x;
130 ashish 1507
      }
688 chandransh 1508
      resetCart_result result = new resetCart_result();
553 chandransh 1509
      result.read(iprot_);
1510
      iprot_.readMessageEnd();
688 chandransh 1511
      if (result.isSetSuccess()) {
1512
        return result.success;
1513
      }
1514
      if (result.scex != null) {
1515
        throw result.scex;
1516
      }
1517
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "resetCart failed: unknown result");
130 ashish 1518
    }
1519
 
771 rajveer 1520
    public Widget getMyResearch(long userId) throws WidgetException, TException
553 chandransh 1521
    {
771 rajveer 1522
      send_getMyResearch(userId);
553 chandransh 1523
      return recv_getMyResearch();
1524
    }
1525
 
771 rajveer 1526
    public void send_getMyResearch(long userId) throws TException
553 chandransh 1527
    {
1528
      oprot_.writeMessageBegin(new TMessage("getMyResearch", TMessageType.CALL, seqid_));
1529
      getMyResearch_args args = new getMyResearch_args();
771 rajveer 1530
      args.userId = userId;
553 chandransh 1531
      args.write(oprot_);
1532
      oprot_.writeMessageEnd();
1533
      oprot_.getTransport().flush();
1534
    }
1535
 
1536
    public Widget recv_getMyResearch() throws WidgetException, TException
1537
    {
1538
      TMessage msg = iprot_.readMessageBegin();
1539
      if (msg.type == TMessageType.EXCEPTION) {
1540
        TApplicationException x = TApplicationException.read(iprot_);
1541
        iprot_.readMessageEnd();
1542
        throw x;
1543
      }
1544
      getMyResearch_result result = new getMyResearch_result();
1545
      result.read(iprot_);
1546
      iprot_.readMessageEnd();
1547
      if (result.isSetSuccess()) {
1548
        return result.success;
1549
      }
1550
      if (result.scx != null) {
1551
        throw result.scx;
1552
      }
1553
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getMyResearch failed: unknown result");
1554
    }
1555
 
771 rajveer 1556
    public boolean updateMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1557
    {
771 rajveer 1558
      send_updateMyResearch(userId, itemId);
553 chandransh 1559
      return recv_updateMyResearch();
1560
    }
1561
 
771 rajveer 1562
    public void send_updateMyResearch(long userId, long itemId) throws TException
553 chandransh 1563
    {
1564
      oprot_.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.CALL, seqid_));
1565
      updateMyResearch_args args = new updateMyResearch_args();
771 rajveer 1566
      args.userId = userId;
1567
      args.itemId = itemId;
553 chandransh 1568
      args.write(oprot_);
1569
      oprot_.writeMessageEnd();
1570
      oprot_.getTransport().flush();
1571
    }
1572
 
1573
    public boolean recv_updateMyResearch() throws WidgetException, TException
1574
    {
1575
      TMessage msg = iprot_.readMessageBegin();
1576
      if (msg.type == TMessageType.EXCEPTION) {
1577
        TApplicationException x = TApplicationException.read(iprot_);
1578
        iprot_.readMessageEnd();
1579
        throw x;
1580
      }
1581
      updateMyResearch_result result = new updateMyResearch_result();
1582
      result.read(iprot_);
1583
      iprot_.readMessageEnd();
1584
      if (result.isSetSuccess()) {
1585
        return result.success;
1586
      }
1587
      if (result.scx != null) {
1588
        throw result.scx;
1589
      }
1590
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "updateMyResearch failed: unknown result");
1591
    }
1592
 
771 rajveer 1593
    public void deleteItemFromMyResearch(long userId, long itemId) throws WidgetException, TException
553 chandransh 1594
    {
771 rajveer 1595
      send_deleteItemFromMyResearch(userId, itemId);
553 chandransh 1596
      recv_deleteItemFromMyResearch();
1597
    }
1598
 
771 rajveer 1599
    public void send_deleteItemFromMyResearch(long userId, long itemId) throws TException
553 chandransh 1600
    {
1601
      oprot_.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.CALL, seqid_));
1602
      deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
771 rajveer 1603
      args.userId = userId;
1604
      args.itemId = itemId;
553 chandransh 1605
      args.write(oprot_);
1606
      oprot_.writeMessageEnd();
1607
      oprot_.getTransport().flush();
1608
    }
1609
 
1610
    public void recv_deleteItemFromMyResearch() throws WidgetException, TException
1611
    {
1612
      TMessage msg = iprot_.readMessageBegin();
1613
      if (msg.type == TMessageType.EXCEPTION) {
1614
        TApplicationException x = TApplicationException.read(iprot_);
1615
        iprot_.readMessageEnd();
1616
        throw x;
1617
      }
1618
      deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
1619
      result.read(iprot_);
1620
      iprot_.readMessageEnd();
1621
      if (result.scx != null) {
1622
        throw result.scx;
1623
      }
1624
      return;
1625
    }
1626
 
771 rajveer 1627
    public void updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1628
    {
771 rajveer 1629
      send_updateBrowseHistory(userId, itemId);
1630
      recv_updateBrowseHistory();
553 chandransh 1631
    }
1632
 
771 rajveer 1633
    public void send_updateBrowseHistory(long userId, long itemId) throws TException
553 chandransh 1634
    {
771 rajveer 1635
      oprot_.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.CALL, seqid_));
1636
      updateBrowseHistory_args args = new updateBrowseHistory_args();
1637
      args.userId = userId;
1638
      args.itemId = itemId;
553 chandransh 1639
      args.write(oprot_);
1640
      oprot_.writeMessageEnd();
1641
      oprot_.getTransport().flush();
1642
    }
1643
 
771 rajveer 1644
    public void recv_updateBrowseHistory() throws TException
553 chandransh 1645
    {
1646
      TMessage msg = iprot_.readMessageBegin();
1647
      if (msg.type == TMessageType.EXCEPTION) {
1648
        TApplicationException x = TApplicationException.read(iprot_);
1649
        iprot_.readMessageEnd();
1650
        throw x;
1651
      }
771 rajveer 1652
      updateBrowseHistory_result result = new updateBrowseHistory_result();
553 chandransh 1653
      result.read(iprot_);
1654
      iprot_.readMessageEnd();
1655
      return;
1656
    }
1657
 
771 rajveer 1658
    public Widget getBrowseHistory(long userId) throws WidgetException, TException
553 chandransh 1659
    {
771 rajveer 1660
      send_getBrowseHistory(userId);
1661
      return recv_getBrowseHistory();
553 chandransh 1662
    }
1663
 
771 rajveer 1664
    public void send_getBrowseHistory(long userId) throws TException
553 chandransh 1665
    {
771 rajveer 1666
      oprot_.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.CALL, seqid_));
1667
      getBrowseHistory_args args = new getBrowseHistory_args();
1668
      args.userId = userId;
553 chandransh 1669
      args.write(oprot_);
1670
      oprot_.writeMessageEnd();
1671
      oprot_.getTransport().flush();
1672
    }
1673
 
771 rajveer 1674
    public Widget recv_getBrowseHistory() throws WidgetException, TException
553 chandransh 1675
    {
1676
      TMessage msg = iprot_.readMessageBegin();
1677
      if (msg.type == TMessageType.EXCEPTION) {
1678
        TApplicationException x = TApplicationException.read(iprot_);
1679
        iprot_.readMessageEnd();
1680
        throw x;
1681
      }
771 rajveer 1682
      getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 1683
      result.read(iprot_);
1684
      iprot_.readMessageEnd();
1685
      if (result.isSetSuccess()) {
1686
        return result.success;
1687
      }
1688
      if (result.scx != null) {
1689
        throw result.scx;
1690
      }
771 rajveer 1691
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getBrowseHistory failed: unknown result");
553 chandransh 1692
    }
1693
 
771 rajveer 1694
    public void mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1695
    {
771 rajveer 1696
      send_mergeBrowseHistory(fromUserId, toUserId);
1697
      recv_mergeBrowseHistory();
553 chandransh 1698
    }
1699
 
771 rajveer 1700
    public void send_mergeBrowseHistory(long fromUserId, long toUserId) throws TException
553 chandransh 1701
    {
771 rajveer 1702
      oprot_.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.CALL, seqid_));
1703
      mergeBrowseHistory_args args = new mergeBrowseHistory_args();
1704
      args.fromUserId = fromUserId;
1705
      args.toUserId = toUserId;
553 chandransh 1706
      args.write(oprot_);
1707
      oprot_.writeMessageEnd();
1708
      oprot_.getTransport().flush();
1709
    }
1710
 
771 rajveer 1711
    public void recv_mergeBrowseHistory() throws TException
553 chandransh 1712
    {
1713
      TMessage msg = iprot_.readMessageBegin();
1714
      if (msg.type == TMessageType.EXCEPTION) {
1715
        TApplicationException x = TApplicationException.read(iprot_);
1716
        iprot_.readMessageEnd();
1717
        throw x;
1718
      }
771 rajveer 1719
      mergeBrowseHistory_result result = new mergeBrowseHistory_result();
553 chandransh 1720
      result.read(iprot_);
1721
      iprot_.readMessageEnd();
1722
      return;
1723
    }
1724
 
48 ashish 1725
  }
1726
  public static class Processor implements TProcessor {
1727
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1728
    public Processor(Iface iface)
1729
    {
1730
      iface_ = iface;
764 rajveer 1731
      processMap_.put("closeSession", new closeSession());
553 chandransh 1732
      processMap_.put("createAnonymousUser", new createAnonymousUser());
1733
      processMap_.put("getUserById", new getUserById());
1734
      processMap_.put("createUser", new createUser());
1735
      processMap_.put("updateUser", new updateUser());
1736
      processMap_.put("deleteUser", new deleteUser());
1737
      processMap_.put("getUserState", new getUserState());
123 ashish 1738
      processMap_.put("authenticateUser", new authenticateUser());
48 ashish 1739
      processMap_.put("userExists", new userExists());
1740
      processMap_.put("addAddressForUser", new addAddressForUser());
1741
      processMap_.put("removeAddressForUser", new removeAddressForUser());
1742
      processMap_.put("setUserAsLoggedIn", new setUserAsLoggedIn());
1743
      processMap_.put("setUserAsLoggedOut", new setUserAsLoggedOut());
506 rajveer 1744
      processMap_.put("setDefaultAddress", new setDefaultAddress());
48 ashish 1745
      processMap_.put("updatePassword", new updatePassword());
582 rajveer 1746
      processMap_.put("forgotPassword", new forgotPassword());
593 rajveer 1747
      processMap_.put("getAllAddressesForUser", new getAllAddressesForUser());
1748
      processMap_.put("getDefaultAddressId", new getDefaultAddressId());
784 rajveer 1749
      processMap_.put("getDefaultPincode", new getDefaultPincode());
1177 varun.gupt 1750
      processMap_.put("saveUserCommunication", new saveUserCommunication());
553 chandransh 1751
      processMap_.put("createCart", new createCart());
1752
      processMap_.put("getCurrentCart", new getCurrentCart());
1753
      processMap_.put("getCart", new getCart());
1754
      processMap_.put("getCartsForUser", new getCartsForUser());
1755
      processMap_.put("getCartsByStatus", new getCartsByStatus());
1756
      processMap_.put("getCartsByTime", new getCartsByTime());
1757
      processMap_.put("changeCartStatus", new changeCartStatus());
1758
      processMap_.put("addItemToCart", new addItemToCart());
1759
      processMap_.put("deleteItemFromCart", new deleteItemFromCart());
1760
      processMap_.put("changeQuantity", new changeQuantity());
1761
      processMap_.put("changeItemStatus", new changeItemStatus());
1762
      processMap_.put("addAddressToCart", new addAddressToCart());
688 chandransh 1763
      processMap_.put("createOrders", new createOrders());
553 chandransh 1764
      processMap_.put("validateCart", new validateCart());
1765
      processMap_.put("mergeCart", new mergeCart());
688 chandransh 1766
      processMap_.put("checkOut", new checkOut());
1767
      processMap_.put("resetCart", new resetCart());
553 chandransh 1768
      processMap_.put("getMyResearch", new getMyResearch());
1769
      processMap_.put("updateMyResearch", new updateMyResearch());
1770
      processMap_.put("deleteItemFromMyResearch", new deleteItemFromMyResearch());
1771
      processMap_.put("updateBrowseHistory", new updateBrowseHistory());
1772
      processMap_.put("getBrowseHistory", new getBrowseHistory());
771 rajveer 1773
      processMap_.put("mergeBrowseHistory", new mergeBrowseHistory());
48 ashish 1774
    }
1775
 
1776
    protected static interface ProcessFunction {
1777
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1778
    }
1779
 
1780
    private Iface iface_;
1781
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1782
 
1783
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1784
    {
1785
      TMessage msg = iprot.readMessageBegin();
1786
      ProcessFunction fn = processMap_.get(msg.name);
1787
      if (fn == null) {
1788
        TProtocolUtil.skip(iprot, TType.STRUCT);
1789
        iprot.readMessageEnd();
1790
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1791
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1792
        x.write(oprot);
1793
        oprot.writeMessageEnd();
1794
        oprot.getTransport().flush();
1795
        return true;
1796
      }
1797
      fn.process(msg.seqid, iprot, oprot);
1798
      return true;
1799
    }
1800
 
764 rajveer 1801
    private class closeSession implements ProcessFunction {
1802
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1803
      {
1804
        closeSession_args args = new closeSession_args();
1805
        args.read(iprot);
1806
        iprot.readMessageEnd();
1807
        closeSession_result result = new closeSession_result();
1808
        iface_.closeSession();
1809
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1810
        result.write(oprot);
1811
        oprot.writeMessageEnd();
1812
        oprot.getTransport().flush();
1813
      }
1814
 
1815
    }
1816
 
553 chandransh 1817
    private class createAnonymousUser implements ProcessFunction {
48 ashish 1818
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1819
      {
553 chandransh 1820
        createAnonymousUser_args args = new createAnonymousUser_args();
48 ashish 1821
        args.read(iprot);
1822
        iprot.readMessageEnd();
553 chandransh 1823
        createAnonymousUser_result result = new createAnonymousUser_result();
48 ashish 1824
        try {
553 chandransh 1825
          result.success = iface_.createAnonymousUser(args.jsessionId);
1826
        } catch (UserContextException ucex) {
1827
          result.ucex = ucex;
48 ashish 1828
        } catch (Throwable th) {
553 chandransh 1829
          LOGGER.error("Internal error processing createAnonymousUser", th);
1830
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createAnonymousUser");
1831
          oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.EXCEPTION, seqid));
48 ashish 1832
          x.write(oprot);
1833
          oprot.writeMessageEnd();
1834
          oprot.getTransport().flush();
1835
          return;
1836
        }
553 chandransh 1837
        oprot.writeMessageBegin(new TMessage("createAnonymousUser", TMessageType.REPLY, seqid));
48 ashish 1838
        result.write(oprot);
1839
        oprot.writeMessageEnd();
1840
        oprot.getTransport().flush();
1841
      }
1842
 
1843
    }
1844
 
553 chandransh 1845
    private class getUserById implements ProcessFunction {
48 ashish 1846
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1847
      {
553 chandransh 1848
        getUserById_args args = new getUserById_args();
48 ashish 1849
        args.read(iprot);
1850
        iprot.readMessageEnd();
553 chandransh 1851
        getUserById_result result = new getUserById_result();
48 ashish 1852
        try {
553 chandransh 1853
          result.success = iface_.getUserById(args.userId);
1854
        } catch (UserContextException ucex) {
1855
          result.ucex = ucex;
48 ashish 1856
        } catch (Throwable th) {
553 chandransh 1857
          LOGGER.error("Internal error processing getUserById", th);
1858
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserById");
1859
          oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.EXCEPTION, seqid));
48 ashish 1860
          x.write(oprot);
1861
          oprot.writeMessageEnd();
1862
          oprot.getTransport().flush();
1863
          return;
1864
        }
553 chandransh 1865
        oprot.writeMessageBegin(new TMessage("getUserById", TMessageType.REPLY, seqid));
48 ashish 1866
        result.write(oprot);
1867
        oprot.writeMessageEnd();
1868
        oprot.getTransport().flush();
1869
      }
1870
 
1871
    }
1872
 
553 chandransh 1873
    private class createUser implements ProcessFunction {
48 ashish 1874
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1875
      {
553 chandransh 1876
        createUser_args args = new createUser_args();
48 ashish 1877
        args.read(iprot);
1878
        iprot.readMessageEnd();
553 chandransh 1879
        createUser_result result = new createUser_result();
48 ashish 1880
        try {
553 chandransh 1881
          result.success = iface_.createUser(args.user);
1882
        } catch (UserContextException ucex) {
1883
          result.ucex = ucex;
48 ashish 1884
        } catch (Throwable th) {
553 chandransh 1885
          LOGGER.error("Internal error processing createUser", th);
1886
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createUser");
1887
          oprot.writeMessageBegin(new TMessage("createUser", TMessageType.EXCEPTION, seqid));
48 ashish 1888
          x.write(oprot);
1889
          oprot.writeMessageEnd();
1890
          oprot.getTransport().flush();
1891
          return;
1892
        }
553 chandransh 1893
        oprot.writeMessageBegin(new TMessage("createUser", TMessageType.REPLY, seqid));
48 ashish 1894
        result.write(oprot);
1895
        oprot.writeMessageEnd();
1896
        oprot.getTransport().flush();
1897
      }
1898
 
1899
    }
1900
 
553 chandransh 1901
    private class updateUser implements ProcessFunction {
48 ashish 1902
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1903
      {
553 chandransh 1904
        updateUser_args args = new updateUser_args();
48 ashish 1905
        args.read(iprot);
1906
        iprot.readMessageEnd();
553 chandransh 1907
        updateUser_result result = new updateUser_result();
48 ashish 1908
        try {
553 chandransh 1909
          result.success = iface_.updateUser(args.user);
1910
        } catch (UserContextException ucex) {
1911
          result.ucex = ucex;
48 ashish 1912
        } catch (Throwable th) {
553 chandransh 1913
          LOGGER.error("Internal error processing updateUser", th);
1914
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateUser");
1915
          oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.EXCEPTION, seqid));
48 ashish 1916
          x.write(oprot);
1917
          oprot.writeMessageEnd();
1918
          oprot.getTransport().flush();
1919
          return;
1920
        }
553 chandransh 1921
        oprot.writeMessageBegin(new TMessage("updateUser", TMessageType.REPLY, seqid));
48 ashish 1922
        result.write(oprot);
1923
        oprot.writeMessageEnd();
1924
        oprot.getTransport().flush();
1925
      }
1926
 
1927
    }
1928
 
553 chandransh 1929
    private class deleteUser implements ProcessFunction {
48 ashish 1930
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1931
      {
553 chandransh 1932
        deleteUser_args args = new deleteUser_args();
48 ashish 1933
        args.read(iprot);
1934
        iprot.readMessageEnd();
553 chandransh 1935
        deleteUser_result result = new deleteUser_result();
48 ashish 1936
        try {
553 chandransh 1937
          result.success = iface_.deleteUser(args.userId);
1938
          result.setSuccessIsSet(true);
1939
        } catch (UserContextException ucex) {
1940
          result.ucex = ucex;
48 ashish 1941
        } catch (Throwable th) {
553 chandransh 1942
          LOGGER.error("Internal error processing deleteUser", th);
1943
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteUser");
1944
          oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.EXCEPTION, seqid));
48 ashish 1945
          x.write(oprot);
1946
          oprot.writeMessageEnd();
1947
          oprot.getTransport().flush();
1948
          return;
1949
        }
553 chandransh 1950
        oprot.writeMessageBegin(new TMessage("deleteUser", TMessageType.REPLY, seqid));
48 ashish 1951
        result.write(oprot);
1952
        oprot.writeMessageEnd();
1953
        oprot.getTransport().flush();
1954
      }
1955
 
1956
    }
1957
 
553 chandransh 1958
    private class getUserState implements ProcessFunction {
48 ashish 1959
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1960
      {
553 chandransh 1961
        getUserState_args args = new getUserState_args();
48 ashish 1962
        args.read(iprot);
1963
        iprot.readMessageEnd();
553 chandransh 1964
        getUserState_result result = new getUserState_result();
48 ashish 1965
        try {
553 chandransh 1966
          result.success = iface_.getUserState(args.userId);
1967
        } catch (UserContextException ucex) {
1968
          result.ucex = ucex;
48 ashish 1969
        } catch (Throwable th) {
553 chandransh 1970
          LOGGER.error("Internal error processing getUserState", th);
1971
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getUserState");
1972
          oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.EXCEPTION, seqid));
48 ashish 1973
          x.write(oprot);
1974
          oprot.writeMessageEnd();
1975
          oprot.getTransport().flush();
1976
          return;
1977
        }
553 chandransh 1978
        oprot.writeMessageBegin(new TMessage("getUserState", TMessageType.REPLY, seqid));
48 ashish 1979
        result.write(oprot);
1980
        oprot.writeMessageEnd();
1981
        oprot.getTransport().flush();
1982
      }
1983
 
1984
    }
1985
 
123 ashish 1986
    private class authenticateUser implements ProcessFunction {
1987
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1988
      {
1989
        authenticateUser_args args = new authenticateUser_args();
1990
        args.read(iprot);
1991
        iprot.readMessageEnd();
1992
        authenticateUser_result result = new authenticateUser_result();
1993
        try {
553 chandransh 1994
          result.success = iface_.authenticateUser(args.email, args.password);
1995
        } catch (AuthenticationException auex) {
1996
          result.auex = auex;
123 ashish 1997
        } catch (Throwable th) {
1998
          LOGGER.error("Internal error processing authenticateUser", th);
1999
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authenticateUser");
2000
          oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.EXCEPTION, seqid));
2001
          x.write(oprot);
2002
          oprot.writeMessageEnd();
2003
          oprot.getTransport().flush();
2004
          return;
2005
        }
2006
        oprot.writeMessageBegin(new TMessage("authenticateUser", TMessageType.REPLY, seqid));
2007
        result.write(oprot);
2008
        oprot.writeMessageEnd();
2009
        oprot.getTransport().flush();
2010
      }
2011
 
2012
    }
2013
 
48 ashish 2014
    private class userExists implements ProcessFunction {
2015
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2016
      {
2017
        userExists_args args = new userExists_args();
2018
        args.read(iprot);
2019
        iprot.readMessageEnd();
2020
        userExists_result result = new userExists_result();
2021
        try {
2022
          result.success = iface_.userExists(args.email);
2023
          result.setSuccessIsSet(true);
2024
        } catch (UserContextException ucx) {
2025
          result.ucx = ucx;
2026
        } catch (Throwable th) {
2027
          LOGGER.error("Internal error processing userExists", th);
2028
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing userExists");
2029
          oprot.writeMessageBegin(new TMessage("userExists", TMessageType.EXCEPTION, seqid));
2030
          x.write(oprot);
2031
          oprot.writeMessageEnd();
2032
          oprot.getTransport().flush();
2033
          return;
2034
        }
2035
        oprot.writeMessageBegin(new TMessage("userExists", TMessageType.REPLY, seqid));
2036
        result.write(oprot);
2037
        oprot.writeMessageEnd();
2038
        oprot.getTransport().flush();
2039
      }
2040
 
2041
    }
2042
 
2043
    private class addAddressForUser implements ProcessFunction {
2044
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2045
      {
2046
        addAddressForUser_args args = new addAddressForUser_args();
2047
        args.read(iprot);
2048
        iprot.readMessageEnd();
2049
        addAddressForUser_result result = new addAddressForUser_result();
2050
        try {
571 rajveer 2051
          result.success = iface_.addAddressForUser(args.userId, args.address, args.setDefault);
48 ashish 2052
          result.setSuccessIsSet(true);
2053
        } catch (UserContextException ucx) {
2054
          result.ucx = ucx;
2055
        } catch (Throwable th) {
2056
          LOGGER.error("Internal error processing addAddressForUser", th);
2057
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressForUser");
2058
          oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.EXCEPTION, seqid));
2059
          x.write(oprot);
2060
          oprot.writeMessageEnd();
2061
          oprot.getTransport().flush();
2062
          return;
2063
        }
2064
        oprot.writeMessageBegin(new TMessage("addAddressForUser", TMessageType.REPLY, seqid));
2065
        result.write(oprot);
2066
        oprot.writeMessageEnd();
2067
        oprot.getTransport().flush();
2068
      }
2069
 
2070
    }
2071
 
2072
    private class removeAddressForUser implements ProcessFunction {
2073
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2074
      {
2075
        removeAddressForUser_args args = new removeAddressForUser_args();
2076
        args.read(iprot);
2077
        iprot.readMessageEnd();
2078
        removeAddressForUser_result result = new removeAddressForUser_result();
2079
        try {
2080
          result.success = iface_.removeAddressForUser(args.userid, args.addressId);
2081
          result.setSuccessIsSet(true);
2082
        } catch (UserContextException ucx) {
2083
          result.ucx = ucx;
2084
        } catch (Throwable th) {
2085
          LOGGER.error("Internal error processing removeAddressForUser", th);
2086
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing removeAddressForUser");
2087
          oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.EXCEPTION, seqid));
2088
          x.write(oprot);
2089
          oprot.writeMessageEnd();
2090
          oprot.getTransport().flush();
2091
          return;
2092
        }
2093
        oprot.writeMessageBegin(new TMessage("removeAddressForUser", TMessageType.REPLY, seqid));
2094
        result.write(oprot);
2095
        oprot.writeMessageEnd();
2096
        oprot.getTransport().flush();
2097
      }
2098
 
2099
    }
2100
 
2101
    private class setUserAsLoggedIn implements ProcessFunction {
2102
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2103
      {
2104
        setUserAsLoggedIn_args args = new setUserAsLoggedIn_args();
2105
        args.read(iprot);
2106
        iprot.readMessageEnd();
2107
        setUserAsLoggedIn_result result = new setUserAsLoggedIn_result();
2108
        try {
2109
          result.success = iface_.setUserAsLoggedIn(args.userId, args.timestamp);
2110
          result.setSuccessIsSet(true);
2111
        } catch (UserContextException ucx) {
2112
          result.ucx = ucx;
2113
        } catch (Throwable th) {
2114
          LOGGER.error("Internal error processing setUserAsLoggedIn", th);
2115
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedIn");
2116
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.EXCEPTION, seqid));
2117
          x.write(oprot);
2118
          oprot.writeMessageEnd();
2119
          oprot.getTransport().flush();
2120
          return;
2121
        }
2122
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedIn", TMessageType.REPLY, seqid));
2123
        result.write(oprot);
2124
        oprot.writeMessageEnd();
2125
        oprot.getTransport().flush();
2126
      }
2127
 
2128
    }
2129
 
2130
    private class setUserAsLoggedOut implements ProcessFunction {
2131
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2132
      {
2133
        setUserAsLoggedOut_args args = new setUserAsLoggedOut_args();
2134
        args.read(iprot);
2135
        iprot.readMessageEnd();
2136
        setUserAsLoggedOut_result result = new setUserAsLoggedOut_result();
2137
        try {
2138
          result.success = iface_.setUserAsLoggedOut(args.userid, args.timestamp);
2139
          result.setSuccessIsSet(true);
2140
        } catch (UserContextException ucx) {
2141
          result.ucx = ucx;
2142
        } catch (Throwable th) {
2143
          LOGGER.error("Internal error processing setUserAsLoggedOut", th);
2144
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setUserAsLoggedOut");
2145
          oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.EXCEPTION, seqid));
2146
          x.write(oprot);
2147
          oprot.writeMessageEnd();
2148
          oprot.getTransport().flush();
2149
          return;
2150
        }
2151
        oprot.writeMessageBegin(new TMessage("setUserAsLoggedOut", TMessageType.REPLY, seqid));
2152
        result.write(oprot);
2153
        oprot.writeMessageEnd();
2154
        oprot.getTransport().flush();
2155
      }
2156
 
2157
    }
2158
 
506 rajveer 2159
    private class setDefaultAddress implements ProcessFunction {
2160
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2161
      {
2162
        setDefaultAddress_args args = new setDefaultAddress_args();
2163
        args.read(iprot);
2164
        iprot.readMessageEnd();
2165
        setDefaultAddress_result result = new setDefaultAddress_result();
2166
        try {
2167
          result.success = iface_.setDefaultAddress(args.userid, args.addressId);
2168
          result.setSuccessIsSet(true);
2169
        } catch (UserContextException ucx) {
2170
          result.ucx = ucx;
2171
        } catch (Throwable th) {
2172
          LOGGER.error("Internal error processing setDefaultAddress", th);
2173
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing setDefaultAddress");
2174
          oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.EXCEPTION, seqid));
2175
          x.write(oprot);
2176
          oprot.writeMessageEnd();
2177
          oprot.getTransport().flush();
2178
          return;
2179
        }
2180
        oprot.writeMessageBegin(new TMessage("setDefaultAddress", TMessageType.REPLY, seqid));
2181
        result.write(oprot);
2182
        oprot.writeMessageEnd();
2183
        oprot.getTransport().flush();
2184
      }
2185
 
2186
    }
2187
 
48 ashish 2188
    private class updatePassword implements ProcessFunction {
2189
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2190
      {
2191
        updatePassword_args args = new updatePassword_args();
2192
        args.read(iprot);
2193
        iprot.readMessageEnd();
2194
        updatePassword_result result = new updatePassword_result();
2195
        try {
593 rajveer 2196
          result.success = iface_.updatePassword(args.userid, args.oldPassword, args.newPassword);
48 ashish 2197
          result.setSuccessIsSet(true);
2198
        } catch (UserContextException ucx) {
2199
          result.ucx = ucx;
2200
        } catch (Throwable th) {
2201
          LOGGER.error("Internal error processing updatePassword", th);
2202
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updatePassword");
2203
          oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.EXCEPTION, seqid));
2204
          x.write(oprot);
2205
          oprot.writeMessageEnd();
2206
          oprot.getTransport().flush();
2207
          return;
2208
        }
2209
        oprot.writeMessageBegin(new TMessage("updatePassword", TMessageType.REPLY, seqid));
2210
        result.write(oprot);
2211
        oprot.writeMessageEnd();
2212
        oprot.getTransport().flush();
2213
      }
2214
 
2215
    }
2216
 
582 rajveer 2217
    private class forgotPassword implements ProcessFunction {
2218
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2219
      {
2220
        forgotPassword_args args = new forgotPassword_args();
2221
        args.read(iprot);
2222
        iprot.readMessageEnd();
2223
        forgotPassword_result result = new forgotPassword_result();
2224
        try {
896 rajveer 2225
          result.success = iface_.forgotPassword(args.email, args.newPassword);
582 rajveer 2226
          result.setSuccessIsSet(true);
2227
        } catch (UserContextException ucx) {
2228
          result.ucx = ucx;
2229
        } catch (Throwable th) {
2230
          LOGGER.error("Internal error processing forgotPassword", th);
2231
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing forgotPassword");
2232
          oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.EXCEPTION, seqid));
2233
          x.write(oprot);
2234
          oprot.writeMessageEnd();
2235
          oprot.getTransport().flush();
2236
          return;
2237
        }
2238
        oprot.writeMessageBegin(new TMessage("forgotPassword", TMessageType.REPLY, seqid));
2239
        result.write(oprot);
2240
        oprot.writeMessageEnd();
2241
        oprot.getTransport().flush();
2242
      }
2243
 
2244
    }
2245
 
593 rajveer 2246
    private class getAllAddressesForUser implements ProcessFunction {
2247
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2248
      {
2249
        getAllAddressesForUser_args args = new getAllAddressesForUser_args();
2250
        args.read(iprot);
2251
        iprot.readMessageEnd();
2252
        getAllAddressesForUser_result result = new getAllAddressesForUser_result();
2253
        try {
2254
          result.success = iface_.getAllAddressesForUser(args.userId);
2255
        } catch (UserContextException ucx) {
2256
          result.ucx = ucx;
2257
        } catch (Throwable th) {
2258
          LOGGER.error("Internal error processing getAllAddressesForUser", th);
2259
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllAddressesForUser");
2260
          oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.EXCEPTION, seqid));
2261
          x.write(oprot);
2262
          oprot.writeMessageEnd();
2263
          oprot.getTransport().flush();
2264
          return;
2265
        }
2266
        oprot.writeMessageBegin(new TMessage("getAllAddressesForUser", TMessageType.REPLY, seqid));
2267
        result.write(oprot);
2268
        oprot.writeMessageEnd();
2269
        oprot.getTransport().flush();
2270
      }
2271
 
2272
    }
2273
 
2274
    private class getDefaultAddressId implements ProcessFunction {
2275
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2276
      {
2277
        getDefaultAddressId_args args = new getDefaultAddressId_args();
2278
        args.read(iprot);
2279
        iprot.readMessageEnd();
2280
        getDefaultAddressId_result result = new getDefaultAddressId_result();
2281
        try {
2282
          result.success = iface_.getDefaultAddressId(args.userId);
2283
          result.setSuccessIsSet(true);
2284
        } catch (UserContextException ucx) {
2285
          result.ucx = ucx;
2286
        } catch (Throwable th) {
2287
          LOGGER.error("Internal error processing getDefaultAddressId", th);
2288
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultAddressId");
2289
          oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.EXCEPTION, seqid));
2290
          x.write(oprot);
2291
          oprot.writeMessageEnd();
2292
          oprot.getTransport().flush();
2293
          return;
2294
        }
2295
        oprot.writeMessageBegin(new TMessage("getDefaultAddressId", TMessageType.REPLY, seqid));
2296
        result.write(oprot);
2297
        oprot.writeMessageEnd();
2298
        oprot.getTransport().flush();
2299
      }
2300
 
2301
    }
2302
 
784 rajveer 2303
    private class getDefaultPincode implements ProcessFunction {
2304
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2305
      {
2306
        getDefaultPincode_args args = new getDefaultPincode_args();
2307
        args.read(iprot);
2308
        iprot.readMessageEnd();
2309
        getDefaultPincode_result result = new getDefaultPincode_result();
2310
        try {
2311
          result.success = iface_.getDefaultPincode(args.userId);
2312
        } catch (UserContextException ucx) {
2313
          result.ucx = ucx;
2314
        } catch (Throwable th) {
2315
          LOGGER.error("Internal error processing getDefaultPincode", th);
2316
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getDefaultPincode");
2317
          oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.EXCEPTION, seqid));
2318
          x.write(oprot);
2319
          oprot.writeMessageEnd();
2320
          oprot.getTransport().flush();
2321
          return;
2322
        }
2323
        oprot.writeMessageBegin(new TMessage("getDefaultPincode", TMessageType.REPLY, seqid));
2324
        result.write(oprot);
2325
        oprot.writeMessageEnd();
2326
        oprot.getTransport().flush();
2327
      }
2328
 
2329
    }
2330
 
1177 varun.gupt 2331
    private class saveUserCommunication implements ProcessFunction {
2332
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2333
      {
2334
        saveUserCommunication_args args = new saveUserCommunication_args();
2335
        args.read(iprot);
2336
        iprot.readMessageEnd();
2337
        saveUserCommunication_result result = new saveUserCommunication_result();
2338
        try {
2339
          result.success = iface_.saveUserCommunication(args.userId, args.replyTo, args.communicationType, args.orderId, args.airwaybillNo, args.productName, args.subject, args.message);
2340
          result.setSuccessIsSet(true);
2341
        } catch (UserCommunicationException ucx) {
2342
          result.ucx = ucx;
2343
        } catch (Throwable th) {
2344
          LOGGER.error("Internal error processing saveUserCommunication", th);
2345
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing saveUserCommunication");
2346
          oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.EXCEPTION, seqid));
2347
          x.write(oprot);
2348
          oprot.writeMessageEnd();
2349
          oprot.getTransport().flush();
2350
          return;
2351
        }
2352
        oprot.writeMessageBegin(new TMessage("saveUserCommunication", TMessageType.REPLY, seqid));
2353
        result.write(oprot);
2354
        oprot.writeMessageEnd();
2355
        oprot.getTransport().flush();
2356
      }
2357
 
2358
    }
2359
 
553 chandransh 2360
    private class createCart implements ProcessFunction {
48 ashish 2361
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2362
      {
553 chandransh 2363
        createCart_args args = new createCart_args();
48 ashish 2364
        args.read(iprot);
2365
        iprot.readMessageEnd();
553 chandransh 2366
        createCart_result result = new createCart_result();
48 ashish 2367
        try {
553 chandransh 2368
          result.success = iface_.createCart(args.userId);
48 ashish 2369
          result.setSuccessIsSet(true);
553 chandransh 2370
        } catch (ShoppingCartException scx) {
2371
          result.scx = scx;
48 ashish 2372
        } catch (Throwable th) {
553 chandransh 2373
          LOGGER.error("Internal error processing createCart", th);
2374
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createCart");
2375
          oprot.writeMessageBegin(new TMessage("createCart", TMessageType.EXCEPTION, seqid));
48 ashish 2376
          x.write(oprot);
2377
          oprot.writeMessageEnd();
2378
          oprot.getTransport().flush();
2379
          return;
2380
        }
553 chandransh 2381
        oprot.writeMessageBegin(new TMessage("createCart", TMessageType.REPLY, seqid));
48 ashish 2382
        result.write(oprot);
2383
        oprot.writeMessageEnd();
2384
        oprot.getTransport().flush();
2385
      }
2386
 
2387
    }
2388
 
553 chandransh 2389
    private class getCurrentCart implements ProcessFunction {
48 ashish 2390
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2391
      {
553 chandransh 2392
        getCurrentCart_args args = new getCurrentCart_args();
48 ashish 2393
        args.read(iprot);
2394
        iprot.readMessageEnd();
553 chandransh 2395
        getCurrentCart_result result = new getCurrentCart_result();
48 ashish 2396
        try {
553 chandransh 2397
          result.success = iface_.getCurrentCart(args.userId);
2398
        } catch (ShoppingCartException scx) {
2399
          result.scx = scx;
48 ashish 2400
        } catch (Throwable th) {
553 chandransh 2401
          LOGGER.error("Internal error processing getCurrentCart", th);
2402
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCurrentCart");
2403
          oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.EXCEPTION, seqid));
48 ashish 2404
          x.write(oprot);
2405
          oprot.writeMessageEnd();
2406
          oprot.getTransport().flush();
2407
          return;
2408
        }
553 chandransh 2409
        oprot.writeMessageBegin(new TMessage("getCurrentCart", TMessageType.REPLY, seqid));
48 ashish 2410
        result.write(oprot);
2411
        oprot.writeMessageEnd();
2412
        oprot.getTransport().flush();
2413
      }
2414
 
2415
    }
2416
 
553 chandransh 2417
    private class getCart implements ProcessFunction {
48 ashish 2418
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2419
      {
553 chandransh 2420
        getCart_args args = new getCart_args();
48 ashish 2421
        args.read(iprot);
2422
        iprot.readMessageEnd();
553 chandransh 2423
        getCart_result result = new getCart_result();
48 ashish 2424
        try {
553 chandransh 2425
          result.success = iface_.getCart(args.cartId);
2426
        } catch (ShoppingCartException scx) {
2427
          result.scx = scx;
48 ashish 2428
        } catch (Throwable th) {
553 chandransh 2429
          LOGGER.error("Internal error processing getCart", th);
2430
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCart");
2431
          oprot.writeMessageBegin(new TMessage("getCart", TMessageType.EXCEPTION, seqid));
48 ashish 2432
          x.write(oprot);
2433
          oprot.writeMessageEnd();
2434
          oprot.getTransport().flush();
2435
          return;
2436
        }
553 chandransh 2437
        oprot.writeMessageBegin(new TMessage("getCart", TMessageType.REPLY, seqid));
48 ashish 2438
        result.write(oprot);
2439
        oprot.writeMessageEnd();
2440
        oprot.getTransport().flush();
2441
      }
2442
 
2443
    }
2444
 
553 chandransh 2445
    private class getCartsForUser implements ProcessFunction {
48 ashish 2446
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2447
      {
553 chandransh 2448
        getCartsForUser_args args = new getCartsForUser_args();
48 ashish 2449
        args.read(iprot);
2450
        iprot.readMessageEnd();
553 chandransh 2451
        getCartsForUser_result result = new getCartsForUser_result();
48 ashish 2452
        try {
553 chandransh 2453
          result.success = iface_.getCartsForUser(args.userId, args.status);
2454
        } catch (ShoppingCartException scx) {
2455
          result.scx = scx;
48 ashish 2456
        } catch (Throwable th) {
553 chandransh 2457
          LOGGER.error("Internal error processing getCartsForUser", th);
2458
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsForUser");
2459
          oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.EXCEPTION, seqid));
48 ashish 2460
          x.write(oprot);
2461
          oprot.writeMessageEnd();
2462
          oprot.getTransport().flush();
2463
          return;
2464
        }
553 chandransh 2465
        oprot.writeMessageBegin(new TMessage("getCartsForUser", TMessageType.REPLY, seqid));
48 ashish 2466
        result.write(oprot);
2467
        oprot.writeMessageEnd();
2468
        oprot.getTransport().flush();
2469
      }
2470
 
2471
    }
2472
 
553 chandransh 2473
    private class getCartsByStatus implements ProcessFunction {
48 ashish 2474
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2475
      {
553 chandransh 2476
        getCartsByStatus_args args = new getCartsByStatus_args();
48 ashish 2477
        args.read(iprot);
2478
        iprot.readMessageEnd();
553 chandransh 2479
        getCartsByStatus_result result = new getCartsByStatus_result();
48 ashish 2480
        try {
553 chandransh 2481
          result.success = iface_.getCartsByStatus(args.status);
2482
        } catch (ShoppingCartException scx) {
2483
          result.scx = scx;
48 ashish 2484
        } catch (Throwable th) {
553 chandransh 2485
          LOGGER.error("Internal error processing getCartsByStatus", th);
2486
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByStatus");
2487
          oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.EXCEPTION, seqid));
48 ashish 2488
          x.write(oprot);
2489
          oprot.writeMessageEnd();
2490
          oprot.getTransport().flush();
2491
          return;
2492
        }
553 chandransh 2493
        oprot.writeMessageBegin(new TMessage("getCartsByStatus", TMessageType.REPLY, seqid));
48 ashish 2494
        result.write(oprot);
2495
        oprot.writeMessageEnd();
2496
        oprot.getTransport().flush();
2497
      }
2498
 
2499
    }
2500
 
553 chandransh 2501
    private class getCartsByTime implements ProcessFunction {
48 ashish 2502
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2503
      {
553 chandransh 2504
        getCartsByTime_args args = new getCartsByTime_args();
48 ashish 2505
        args.read(iprot);
2506
        iprot.readMessageEnd();
553 chandransh 2507
        getCartsByTime_result result = new getCartsByTime_result();
48 ashish 2508
        try {
553 chandransh 2509
          result.success = iface_.getCartsByTime(args.from_time, args.to_time, args.status);
2510
        } catch (ShoppingCartException scx) {
2511
          result.scx = scx;
48 ashish 2512
        } catch (Throwable th) {
553 chandransh 2513
          LOGGER.error("Internal error processing getCartsByTime", th);
2514
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCartsByTime");
2515
          oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.EXCEPTION, seqid));
48 ashish 2516
          x.write(oprot);
2517
          oprot.writeMessageEnd();
2518
          oprot.getTransport().flush();
2519
          return;
2520
        }
553 chandransh 2521
        oprot.writeMessageBegin(new TMessage("getCartsByTime", TMessageType.REPLY, seqid));
48 ashish 2522
        result.write(oprot);
2523
        oprot.writeMessageEnd();
2524
        oprot.getTransport().flush();
2525
      }
2526
 
2527
    }
2528
 
553 chandransh 2529
    private class changeCartStatus implements ProcessFunction {
130 ashish 2530
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2531
      {
553 chandransh 2532
        changeCartStatus_args args = new changeCartStatus_args();
130 ashish 2533
        args.read(iprot);
2534
        iprot.readMessageEnd();
553 chandransh 2535
        changeCartStatus_result result = new changeCartStatus_result();
130 ashish 2536
        try {
553 chandransh 2537
          iface_.changeCartStatus(args.cartId, args.status);
2538
        } catch (ShoppingCartException scx) {
2539
          result.scx = scx;
2540
        } catch (Throwable th) {
2541
          LOGGER.error("Internal error processing changeCartStatus", th);
2542
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeCartStatus");
2543
          oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.EXCEPTION, seqid));
2544
          x.write(oprot);
2545
          oprot.writeMessageEnd();
2546
          oprot.getTransport().flush();
2547
          return;
2548
        }
2549
        oprot.writeMessageBegin(new TMessage("changeCartStatus", TMessageType.REPLY, seqid));
2550
        result.write(oprot);
2551
        oprot.writeMessageEnd();
2552
        oprot.getTransport().flush();
2553
      }
2554
 
2555
    }
2556
 
2557
    private class addItemToCart implements ProcessFunction {
2558
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2559
      {
2560
        addItemToCart_args args = new addItemToCart_args();
2561
        args.read(iprot);
2562
        iprot.readMessageEnd();
2563
        addItemToCart_result result = new addItemToCart_result();
2564
        try {
2565
          iface_.addItemToCart(args.cartId, args.itemId, args.quantity);
2566
        } catch (ShoppingCartException scx) {
2567
          result.scx = scx;
2568
        } catch (Throwable th) {
2569
          LOGGER.error("Internal error processing addItemToCart", th);
2570
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addItemToCart");
2571
          oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.EXCEPTION, seqid));
2572
          x.write(oprot);
2573
          oprot.writeMessageEnd();
2574
          oprot.getTransport().flush();
2575
          return;
2576
        }
2577
        oprot.writeMessageBegin(new TMessage("addItemToCart", TMessageType.REPLY, seqid));
2578
        result.write(oprot);
2579
        oprot.writeMessageEnd();
2580
        oprot.getTransport().flush();
2581
      }
2582
 
2583
    }
2584
 
2585
    private class deleteItemFromCart implements ProcessFunction {
2586
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2587
      {
2588
        deleteItemFromCart_args args = new deleteItemFromCart_args();
2589
        args.read(iprot);
2590
        iprot.readMessageEnd();
2591
        deleteItemFromCart_result result = new deleteItemFromCart_result();
2592
        try {
2593
          iface_.deleteItemFromCart(args.cartId, args.itemId);
2594
        } catch (ShoppingCartException scx) {
2595
          result.scx = scx;
2596
        } catch (Throwable th) {
2597
          LOGGER.error("Internal error processing deleteItemFromCart", th);
2598
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromCart");
2599
          oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.EXCEPTION, seqid));
2600
          x.write(oprot);
2601
          oprot.writeMessageEnd();
2602
          oprot.getTransport().flush();
2603
          return;
2604
        }
2605
        oprot.writeMessageBegin(new TMessage("deleteItemFromCart", TMessageType.REPLY, seqid));
2606
        result.write(oprot);
2607
        oprot.writeMessageEnd();
2608
        oprot.getTransport().flush();
2609
      }
2610
 
2611
    }
2612
 
2613
    private class changeQuantity implements ProcessFunction {
2614
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2615
      {
2616
        changeQuantity_args args = new changeQuantity_args();
2617
        args.read(iprot);
2618
        iprot.readMessageEnd();
2619
        changeQuantity_result result = new changeQuantity_result();
2620
        try {
2621
          iface_.changeQuantity(args.cartId, args.itemId, args.quantity);
2622
        } catch (ShoppingCartException scx) {
2623
          result.scx = scx;
2624
        } catch (Throwable th) {
2625
          LOGGER.error("Internal error processing changeQuantity", th);
2626
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeQuantity");
2627
          oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.EXCEPTION, seqid));
2628
          x.write(oprot);
2629
          oprot.writeMessageEnd();
2630
          oprot.getTransport().flush();
2631
          return;
2632
        }
2633
        oprot.writeMessageBegin(new TMessage("changeQuantity", TMessageType.REPLY, seqid));
2634
        result.write(oprot);
2635
        oprot.writeMessageEnd();
2636
        oprot.getTransport().flush();
2637
      }
2638
 
2639
    }
2640
 
2641
    private class changeItemStatus implements ProcessFunction {
2642
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2643
      {
2644
        changeItemStatus_args args = new changeItemStatus_args();
2645
        args.read(iprot);
2646
        iprot.readMessageEnd();
2647
        changeItemStatus_result result = new changeItemStatus_result();
2648
        try {
2649
          iface_.changeItemStatus(args.cartId, args.itemId, args.status);
2650
        } catch (ShoppingCartException scx) {
2651
          result.scx = scx;
2652
        } catch (Throwable th) {
2653
          LOGGER.error("Internal error processing changeItemStatus", th);
2654
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeItemStatus");
2655
          oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.EXCEPTION, seqid));
2656
          x.write(oprot);
2657
          oprot.writeMessageEnd();
2658
          oprot.getTransport().flush();
2659
          return;
2660
        }
2661
        oprot.writeMessageBegin(new TMessage("changeItemStatus", TMessageType.REPLY, seqid));
2662
        result.write(oprot);
2663
        oprot.writeMessageEnd();
2664
        oprot.getTransport().flush();
2665
      }
2666
 
2667
    }
2668
 
2669
    private class addAddressToCart implements ProcessFunction {
2670
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2671
      {
2672
        addAddressToCart_args args = new addAddressToCart_args();
2673
        args.read(iprot);
2674
        iprot.readMessageEnd();
2675
        addAddressToCart_result result = new addAddressToCart_result();
578 chandransh 2676
        try {
2677
          iface_.addAddressToCart(args.cartId, args.addressId);
2678
        } catch (ShoppingCartException scx) {
2679
          result.scx = scx;
2680
        } catch (Throwable th) {
2681
          LOGGER.error("Internal error processing addAddressToCart", th);
2682
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addAddressToCart");
2683
          oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.EXCEPTION, seqid));
2684
          x.write(oprot);
2685
          oprot.writeMessageEnd();
2686
          oprot.getTransport().flush();
2687
          return;
2688
        }
553 chandransh 2689
        oprot.writeMessageBegin(new TMessage("addAddressToCart", TMessageType.REPLY, seqid));
2690
        result.write(oprot);
2691
        oprot.writeMessageEnd();
2692
        oprot.getTransport().flush();
2693
      }
2694
 
2695
    }
2696
 
688 chandransh 2697
    private class createOrders implements ProcessFunction {
553 chandransh 2698
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2699
      {
688 chandransh 2700
        createOrders_args args = new createOrders_args();
553 chandransh 2701
        args.read(iprot);
2702
        iprot.readMessageEnd();
688 chandransh 2703
        createOrders_result result = new createOrders_result();
553 chandransh 2704
        try {
688 chandransh 2705
          result.success = iface_.createOrders(args.cartId);
130 ashish 2706
          result.setSuccessIsSet(true);
553 chandransh 2707
        } catch (ShoppingCartException scx) {
2708
          result.scx = scx;
130 ashish 2709
        } catch (Throwable th) {
688 chandransh 2710
          LOGGER.error("Internal error processing createOrders", th);
2711
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrders");
2712
          oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.EXCEPTION, seqid));
130 ashish 2713
          x.write(oprot);
2714
          oprot.writeMessageEnd();
2715
          oprot.getTransport().flush();
2716
          return;
2717
        }
688 chandransh 2718
        oprot.writeMessageBegin(new TMessage("createOrders", TMessageType.REPLY, seqid));
130 ashish 2719
        result.write(oprot);
2720
        oprot.writeMessageEnd();
2721
        oprot.getTransport().flush();
2722
      }
2723
 
2724
    }
2725
 
553 chandransh 2726
    private class validateCart implements ProcessFunction {
130 ashish 2727
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2728
      {
553 chandransh 2729
        validateCart_args args = new validateCart_args();
130 ashish 2730
        args.read(iprot);
2731
        iprot.readMessageEnd();
553 chandransh 2732
        validateCart_result result = new validateCart_result();
578 chandransh 2733
        try {
2734
          result.success = iface_.validateCart(args.cartId);
2735
          result.setSuccessIsSet(true);
2736
        } catch (ShoppingCartException scex) {
2737
          result.scex = scex;
2738
        } catch (Throwable th) {
2739
          LOGGER.error("Internal error processing validateCart", th);
2740
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2741
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2742
          x.write(oprot);
2743
          oprot.writeMessageEnd();
2744
          oprot.getTransport().flush();
2745
          return;
2746
        }
553 chandransh 2747
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2748
        result.write(oprot);
2749
        oprot.writeMessageEnd();
2750
        oprot.getTransport().flush();
2751
      }
2752
 
2753
    }
2754
 
688 chandransh 2755
    private class mergeCart implements ProcessFunction {
578 chandransh 2756
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2757
      {
688 chandransh 2758
        mergeCart_args args = new mergeCart_args();
578 chandransh 2759
        args.read(iprot);
2760
        iprot.readMessageEnd();
688 chandransh 2761
        mergeCart_result result = new mergeCart_result();
2762
        iface_.mergeCart(args.fromCartId, args.toCartId);
2763
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2764
        result.write(oprot);
2765
        oprot.writeMessageEnd();
2766
        oprot.getTransport().flush();
2767
      }
2768
 
2769
    }
2770
 
2771
    private class checkOut implements ProcessFunction {
2772
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2773
      {
2774
        checkOut_args args = new checkOut_args();
2775
        args.read(iprot);
2776
        iprot.readMessageEnd();
2777
        checkOut_result result = new checkOut_result();
578 chandransh 2778
        try {
688 chandransh 2779
          result.success = iface_.checkOut(args.cartId);
578 chandransh 2780
          result.setSuccessIsSet(true);
2781
        } catch (ShoppingCartException scex) {
2782
          result.scex = scex;
2783
        } catch (Throwable th) {
688 chandransh 2784
          LOGGER.error("Internal error processing checkOut", th);
2785
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
2786
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 2787
          x.write(oprot);
2788
          oprot.writeMessageEnd();
2789
          oprot.getTransport().flush();
2790
          return;
2791
        }
688 chandransh 2792
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 2793
        result.write(oprot);
2794
        oprot.writeMessageEnd();
2795
        oprot.getTransport().flush();
2796
      }
2797
 
2798
    }
2799
 
688 chandransh 2800
    private class resetCart implements ProcessFunction {
553 chandransh 2801
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2802
      {
688 chandransh 2803
        resetCart_args args = new resetCart_args();
553 chandransh 2804
        args.read(iprot);
2805
        iprot.readMessageEnd();
688 chandransh 2806
        resetCart_result result = new resetCart_result();
2807
        try {
2808
          result.success = iface_.resetCart(args.cartId, args.items);
2809
          result.setSuccessIsSet(true);
2810
        } catch (ShoppingCartException scex) {
2811
          result.scex = scex;
2812
        } catch (Throwable th) {
2813
          LOGGER.error("Internal error processing resetCart", th);
2814
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
2815
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
2816
          x.write(oprot);
2817
          oprot.writeMessageEnd();
2818
          oprot.getTransport().flush();
2819
          return;
2820
        }
2821
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 2822
        result.write(oprot);
2823
        oprot.writeMessageEnd();
2824
        oprot.getTransport().flush();
2825
      }
2826
 
2827
    }
2828
 
2829
    private class getMyResearch implements ProcessFunction {
2830
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2831
      {
2832
        getMyResearch_args args = new getMyResearch_args();
2833
        args.read(iprot);
2834
        iprot.readMessageEnd();
2835
        getMyResearch_result result = new getMyResearch_result();
2836
        try {
771 rajveer 2837
          result.success = iface_.getMyResearch(args.userId);
553 chandransh 2838
        } catch (WidgetException scx) {
2839
          result.scx = scx;
2840
        } catch (Throwable th) {
2841
          LOGGER.error("Internal error processing getMyResearch", th);
2842
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2843
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2844
          x.write(oprot);
2845
          oprot.writeMessageEnd();
2846
          oprot.getTransport().flush();
2847
          return;
2848
        }
2849
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2850
        result.write(oprot);
2851
        oprot.writeMessageEnd();
2852
        oprot.getTransport().flush();
2853
      }
2854
 
2855
    }
2856
 
2857
    private class updateMyResearch implements ProcessFunction {
2858
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2859
      {
2860
        updateMyResearch_args args = new updateMyResearch_args();
2861
        args.read(iprot);
2862
        iprot.readMessageEnd();
2863
        updateMyResearch_result result = new updateMyResearch_result();
2864
        try {
771 rajveer 2865
          result.success = iface_.updateMyResearch(args.userId, args.itemId);
130 ashish 2866
          result.setSuccessIsSet(true);
553 chandransh 2867
        } catch (WidgetException scx) {
2868
          result.scx = scx;
130 ashish 2869
        } catch (Throwable th) {
553 chandransh 2870
          LOGGER.error("Internal error processing updateMyResearch", th);
2871
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
2872
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 2873
          x.write(oprot);
2874
          oprot.writeMessageEnd();
2875
          oprot.getTransport().flush();
2876
          return;
2877
        }
553 chandransh 2878
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 2879
        result.write(oprot);
2880
        oprot.writeMessageEnd();
2881
        oprot.getTransport().flush();
2882
      }
2883
 
2884
    }
2885
 
553 chandransh 2886
    private class deleteItemFromMyResearch implements ProcessFunction {
2887
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2888
      {
2889
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
2890
        args.read(iprot);
2891
        iprot.readMessageEnd();
2892
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
2893
        try {
771 rajveer 2894
          iface_.deleteItemFromMyResearch(args.userId, args.itemId);
553 chandransh 2895
        } catch (WidgetException scx) {
2896
          result.scx = scx;
2897
        } catch (Throwable th) {
2898
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
2899
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
2900
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
2901
          x.write(oprot);
2902
          oprot.writeMessageEnd();
2903
          oprot.getTransport().flush();
2904
          return;
2905
        }
2906
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
2907
        result.write(oprot);
2908
        oprot.writeMessageEnd();
2909
        oprot.getTransport().flush();
2910
      }
2911
 
2912
    }
2913
 
771 rajveer 2914
    private class updateBrowseHistory implements ProcessFunction {
553 chandransh 2915
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2916
      {
771 rajveer 2917
        updateBrowseHistory_args args = new updateBrowseHistory_args();
553 chandransh 2918
        args.read(iprot);
2919
        iprot.readMessageEnd();
771 rajveer 2920
        updateBrowseHistory_result result = new updateBrowseHistory_result();
2921
        iface_.updateBrowseHistory(args.userId, args.itemId);
2922
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2923
        result.write(oprot);
2924
        oprot.writeMessageEnd();
2925
        oprot.getTransport().flush();
2926
      }
2927
 
2928
    }
2929
 
771 rajveer 2930
    private class getBrowseHistory implements ProcessFunction {
553 chandransh 2931
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2932
      {
771 rajveer 2933
        getBrowseHistory_args args = new getBrowseHistory_args();
553 chandransh 2934
        args.read(iprot);
2935
        iprot.readMessageEnd();
771 rajveer 2936
        getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 2937
        try {
771 rajveer 2938
          result.success = iface_.getBrowseHistory(args.userId);
553 chandransh 2939
        } catch (WidgetException scx) {
2940
          result.scx = scx;
2941
        } catch (Throwable th) {
771 rajveer 2942
          LOGGER.error("Internal error processing getBrowseHistory", th);
2943
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
2944
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
553 chandransh 2945
          x.write(oprot);
2946
          oprot.writeMessageEnd();
2947
          oprot.getTransport().flush();
2948
          return;
2949
        }
771 rajveer 2950
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2951
        result.write(oprot);
2952
        oprot.writeMessageEnd();
2953
        oprot.getTransport().flush();
2954
      }
2955
 
2956
    }
2957
 
771 rajveer 2958
    private class mergeBrowseHistory implements ProcessFunction {
553 chandransh 2959
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2960
      {
771 rajveer 2961
        mergeBrowseHistory_args args = new mergeBrowseHistory_args();
553 chandransh 2962
        args.read(iprot);
2963
        iprot.readMessageEnd();
771 rajveer 2964
        mergeBrowseHistory_result result = new mergeBrowseHistory_result();
2965
        iface_.mergeBrowseHistory(args.fromUserId, args.toUserId);
2966
        oprot.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2967
        result.write(oprot);
2968
        oprot.writeMessageEnd();
2969
        oprot.getTransport().flush();
2970
      }
2971
 
2972
    }
2973
 
48 ashish 2974
  }
2975
 
764 rajveer 2976
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2977
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2978
 
2979
 
2980
 
2981
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2982
    public enum _Fields implements TFieldIdEnum {
2983
;
2984
 
2985
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2986
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2987
 
2988
      static {
2989
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2990
          byId.put((int)field._thriftId, field);
2991
          byName.put(field.getFieldName(), field);
2992
        }
2993
      }
2994
 
2995
      /**
2996
       * Find the _Fields constant that matches fieldId, or null if its not found.
2997
       */
2998
      public static _Fields findByThriftId(int fieldId) {
2999
        return byId.get(fieldId);
3000
      }
3001
 
3002
      /**
3003
       * Find the _Fields constant that matches fieldId, throwing an exception
3004
       * if it is not found.
3005
       */
3006
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3007
        _Fields fields = findByThriftId(fieldId);
3008
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3009
        return fields;
3010
      }
3011
 
3012
      /**
3013
       * Find the _Fields constant that matches name, or null if its not found.
3014
       */
3015
      public static _Fields findByName(String name) {
3016
        return byName.get(name);
3017
      }
3018
 
3019
      private final short _thriftId;
3020
      private final String _fieldName;
3021
 
3022
      _Fields(short thriftId, String fieldName) {
3023
        _thriftId = thriftId;
3024
        _fieldName = fieldName;
3025
      }
3026
 
3027
      public short getThriftFieldId() {
3028
        return _thriftId;
3029
      }
3030
 
3031
      public String getFieldName() {
3032
        return _fieldName;
3033
      }
3034
    }
3035
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3036
    }});
3037
 
3038
    static {
3039
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3040
    }
3041
 
3042
    public closeSession_args() {
3043
    }
3044
 
3045
    /**
3046
     * Performs a deep copy on <i>other</i>.
3047
     */
3048
    public closeSession_args(closeSession_args other) {
3049
    }
3050
 
3051
    public closeSession_args deepCopy() {
3052
      return new closeSession_args(this);
3053
    }
3054
 
3055
    @Deprecated
3056
    public closeSession_args clone() {
3057
      return new closeSession_args(this);
3058
    }
3059
 
3060
    public void setFieldValue(_Fields field, Object value) {
3061
      switch (field) {
3062
      }
3063
    }
3064
 
3065
    public void setFieldValue(int fieldID, Object value) {
3066
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3067
    }
3068
 
3069
    public Object getFieldValue(_Fields field) {
3070
      switch (field) {
3071
      }
3072
      throw new IllegalStateException();
3073
    }
3074
 
3075
    public Object getFieldValue(int fieldId) {
3076
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3077
    }
3078
 
3079
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3080
    public boolean isSet(_Fields field) {
3081
      switch (field) {
3082
      }
3083
      throw new IllegalStateException();
3084
    }
3085
 
3086
    public boolean isSet(int fieldID) {
3087
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3088
    }
3089
 
3090
    @Override
3091
    public boolean equals(Object that) {
3092
      if (that == null)
3093
        return false;
3094
      if (that instanceof closeSession_args)
3095
        return this.equals((closeSession_args)that);
3096
      return false;
3097
    }
3098
 
3099
    public boolean equals(closeSession_args that) {
3100
      if (that == null)
3101
        return false;
3102
 
3103
      return true;
3104
    }
3105
 
3106
    @Override
3107
    public int hashCode() {
3108
      return 0;
3109
    }
3110
 
3111
    public int compareTo(closeSession_args other) {
3112
      if (!getClass().equals(other.getClass())) {
3113
        return getClass().getName().compareTo(other.getClass().getName());
3114
      }
3115
 
3116
      int lastComparison = 0;
3117
      closeSession_args typedOther = (closeSession_args)other;
3118
 
3119
      return 0;
3120
    }
3121
 
3122
    public void read(TProtocol iprot) throws TException {
3123
      TField field;
3124
      iprot.readStructBegin();
3125
      while (true)
3126
      {
3127
        field = iprot.readFieldBegin();
3128
        if (field.type == TType.STOP) { 
3129
          break;
3130
        }
3131
        _Fields fieldId = _Fields.findByThriftId(field.id);
3132
        if (fieldId == null) {
3133
          TProtocolUtil.skip(iprot, field.type);
3134
        } else {
3135
          switch (fieldId) {
3136
          }
3137
          iprot.readFieldEnd();
3138
        }
3139
      }
3140
      iprot.readStructEnd();
3141
      validate();
3142
    }
3143
 
3144
    public void write(TProtocol oprot) throws TException {
3145
      validate();
3146
 
3147
      oprot.writeStructBegin(STRUCT_DESC);
3148
      oprot.writeFieldStop();
3149
      oprot.writeStructEnd();
3150
    }
3151
 
3152
    @Override
3153
    public String toString() {
3154
      StringBuilder sb = new StringBuilder("closeSession_args(");
3155
      boolean first = true;
3156
 
3157
      sb.append(")");
3158
      return sb.toString();
3159
    }
3160
 
3161
    public void validate() throws TException {
3162
      // check for required fields
3163
    }
3164
 
3165
  }
3166
 
3167
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3168
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3169
 
3170
 
3171
 
3172
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3173
    public enum _Fields implements TFieldIdEnum {
3174
;
3175
 
3176
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3177
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3178
 
3179
      static {
3180
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3181
          byId.put((int)field._thriftId, field);
3182
          byName.put(field.getFieldName(), field);
3183
        }
3184
      }
3185
 
3186
      /**
3187
       * Find the _Fields constant that matches fieldId, or null if its not found.
3188
       */
3189
      public static _Fields findByThriftId(int fieldId) {
3190
        return byId.get(fieldId);
3191
      }
3192
 
3193
      /**
3194
       * Find the _Fields constant that matches fieldId, throwing an exception
3195
       * if it is not found.
3196
       */
3197
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3198
        _Fields fields = findByThriftId(fieldId);
3199
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3200
        return fields;
3201
      }
3202
 
3203
      /**
3204
       * Find the _Fields constant that matches name, or null if its not found.
3205
       */
3206
      public static _Fields findByName(String name) {
3207
        return byName.get(name);
3208
      }
3209
 
3210
      private final short _thriftId;
3211
      private final String _fieldName;
3212
 
3213
      _Fields(short thriftId, String fieldName) {
3214
        _thriftId = thriftId;
3215
        _fieldName = fieldName;
3216
      }
3217
 
3218
      public short getThriftFieldId() {
3219
        return _thriftId;
3220
      }
3221
 
3222
      public String getFieldName() {
3223
        return _fieldName;
3224
      }
3225
    }
3226
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3227
    }});
3228
 
3229
    static {
3230
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3231
    }
3232
 
3233
    public closeSession_result() {
3234
    }
3235
 
3236
    /**
3237
     * Performs a deep copy on <i>other</i>.
3238
     */
3239
    public closeSession_result(closeSession_result other) {
3240
    }
3241
 
3242
    public closeSession_result deepCopy() {
3243
      return new closeSession_result(this);
3244
    }
3245
 
3246
    @Deprecated
3247
    public closeSession_result clone() {
3248
      return new closeSession_result(this);
3249
    }
3250
 
3251
    public void setFieldValue(_Fields field, Object value) {
3252
      switch (field) {
3253
      }
3254
    }
3255
 
3256
    public void setFieldValue(int fieldID, Object value) {
3257
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3258
    }
3259
 
3260
    public Object getFieldValue(_Fields field) {
3261
      switch (field) {
3262
      }
3263
      throw new IllegalStateException();
3264
    }
3265
 
3266
    public Object getFieldValue(int fieldId) {
3267
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3268
    }
3269
 
3270
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3271
    public boolean isSet(_Fields field) {
3272
      switch (field) {
3273
      }
3274
      throw new IllegalStateException();
3275
    }
3276
 
3277
    public boolean isSet(int fieldID) {
3278
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3279
    }
3280
 
3281
    @Override
3282
    public boolean equals(Object that) {
3283
      if (that == null)
3284
        return false;
3285
      if (that instanceof closeSession_result)
3286
        return this.equals((closeSession_result)that);
3287
      return false;
3288
    }
3289
 
3290
    public boolean equals(closeSession_result that) {
3291
      if (that == null)
3292
        return false;
3293
 
3294
      return true;
3295
    }
3296
 
3297
    @Override
3298
    public int hashCode() {
3299
      return 0;
3300
    }
3301
 
3302
    public int compareTo(closeSession_result other) {
3303
      if (!getClass().equals(other.getClass())) {
3304
        return getClass().getName().compareTo(other.getClass().getName());
3305
      }
3306
 
3307
      int lastComparison = 0;
3308
      closeSession_result typedOther = (closeSession_result)other;
3309
 
3310
      return 0;
3311
    }
3312
 
3313
    public void read(TProtocol iprot) throws TException {
3314
      TField field;
3315
      iprot.readStructBegin();
3316
      while (true)
3317
      {
3318
        field = iprot.readFieldBegin();
3319
        if (field.type == TType.STOP) { 
3320
          break;
3321
        }
3322
        _Fields fieldId = _Fields.findByThriftId(field.id);
3323
        if (fieldId == null) {
3324
          TProtocolUtil.skip(iprot, field.type);
3325
        } else {
3326
          switch (fieldId) {
3327
          }
3328
          iprot.readFieldEnd();
3329
        }
3330
      }
3331
      iprot.readStructEnd();
3332
      validate();
3333
    }
3334
 
3335
    public void write(TProtocol oprot) throws TException {
3336
      oprot.writeStructBegin(STRUCT_DESC);
3337
 
3338
      oprot.writeFieldStop();
3339
      oprot.writeStructEnd();
3340
    }
3341
 
3342
    @Override
3343
    public String toString() {
3344
      StringBuilder sb = new StringBuilder("closeSession_result(");
3345
      boolean first = true;
3346
 
3347
      sb.append(")");
3348
      return sb.toString();
3349
    }
3350
 
3351
    public void validate() throws TException {
3352
      // check for required fields
3353
    }
3354
 
3355
  }
3356
 
553 chandransh 3357
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3358
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3359
 
553 chandransh 3360
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3361
 
553 chandransh 3362
    private String jsessionId;
48 ashish 3363
 
3364
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3365
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3366
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3367
 
3368
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3370
 
3371
      static {
3372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3373
          byId.put((int)field._thriftId, field);
3374
          byName.put(field.getFieldName(), field);
3375
        }
3376
      }
3377
 
3378
      /**
3379
       * Find the _Fields constant that matches fieldId, or null if its not found.
3380
       */
3381
      public static _Fields findByThriftId(int fieldId) {
3382
        return byId.get(fieldId);
3383
      }
3384
 
3385
      /**
3386
       * Find the _Fields constant that matches fieldId, throwing an exception
3387
       * if it is not found.
3388
       */
3389
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3390
        _Fields fields = findByThriftId(fieldId);
3391
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3392
        return fields;
3393
      }
3394
 
3395
      /**
3396
       * Find the _Fields constant that matches name, or null if its not found.
3397
       */
3398
      public static _Fields findByName(String name) {
3399
        return byName.get(name);
3400
      }
3401
 
3402
      private final short _thriftId;
3403
      private final String _fieldName;
3404
 
3405
      _Fields(short thriftId, String fieldName) {
3406
        _thriftId = thriftId;
3407
        _fieldName = fieldName;
3408
      }
3409
 
3410
      public short getThriftFieldId() {
3411
        return _thriftId;
3412
      }
3413
 
3414
      public String getFieldName() {
3415
        return _fieldName;
3416
      }
3417
    }
3418
 
3419
    // isset id assignments
3420
 
3421
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3422
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3423
          new FieldValueMetaData(TType.STRING)));
48 ashish 3424
    }});
3425
 
3426
    static {
553 chandransh 3427
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3428
    }
3429
 
553 chandransh 3430
    public createAnonymousUser_args() {
48 ashish 3431
    }
3432
 
553 chandransh 3433
    public createAnonymousUser_args(
3434
      String jsessionId)
48 ashish 3435
    {
3436
      this();
553 chandransh 3437
      this.jsessionId = jsessionId;
48 ashish 3438
    }
3439
 
3440
    /**
3441
     * Performs a deep copy on <i>other</i>.
3442
     */
553 chandransh 3443
    public createAnonymousUser_args(createAnonymousUser_args other) {
3444
      if (other.isSetJsessionId()) {
3445
        this.jsessionId = other.jsessionId;
48 ashish 3446
      }
3447
    }
3448
 
553 chandransh 3449
    public createAnonymousUser_args deepCopy() {
3450
      return new createAnonymousUser_args(this);
48 ashish 3451
    }
3452
 
3453
    @Deprecated
553 chandransh 3454
    public createAnonymousUser_args clone() {
3455
      return new createAnonymousUser_args(this);
48 ashish 3456
    }
3457
 
553 chandransh 3458
    public String getJsessionId() {
3459
      return this.jsessionId;
48 ashish 3460
    }
3461
 
553 chandransh 3462
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3463
      this.jsessionId = jsessionId;
48 ashish 3464
      return this;
3465
    }
3466
 
553 chandransh 3467
    public void unsetJsessionId() {
3468
      this.jsessionId = null;
48 ashish 3469
    }
3470
 
553 chandransh 3471
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3472
    public boolean isSetJsessionId() {
3473
      return this.jsessionId != null;
48 ashish 3474
    }
3475
 
553 chandransh 3476
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3477
      if (!value) {
553 chandransh 3478
        this.jsessionId = null;
48 ashish 3479
      }
3480
    }
3481
 
3482
    public void setFieldValue(_Fields field, Object value) {
3483
      switch (field) {
553 chandransh 3484
      case JSESSION_ID:
48 ashish 3485
        if (value == null) {
553 chandransh 3486
          unsetJsessionId();
48 ashish 3487
        } else {
553 chandransh 3488
          setJsessionId((String)value);
48 ashish 3489
        }
3490
        break;
3491
 
3492
      }
3493
    }
3494
 
3495
    public void setFieldValue(int fieldID, Object value) {
3496
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3497
    }
3498
 
3499
    public Object getFieldValue(_Fields field) {
3500
      switch (field) {
553 chandransh 3501
      case JSESSION_ID:
3502
        return getJsessionId();
48 ashish 3503
 
3504
      }
3505
      throw new IllegalStateException();
3506
    }
3507
 
3508
    public Object getFieldValue(int fieldId) {
3509
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3510
    }
3511
 
3512
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3513
    public boolean isSet(_Fields field) {
3514
      switch (field) {
553 chandransh 3515
      case JSESSION_ID:
3516
        return isSetJsessionId();
48 ashish 3517
      }
3518
      throw new IllegalStateException();
3519
    }
3520
 
3521
    public boolean isSet(int fieldID) {
3522
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3523
    }
3524
 
3525
    @Override
3526
    public boolean equals(Object that) {
3527
      if (that == null)
3528
        return false;
553 chandransh 3529
      if (that instanceof createAnonymousUser_args)
3530
        return this.equals((createAnonymousUser_args)that);
48 ashish 3531
      return false;
3532
    }
3533
 
553 chandransh 3534
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3535
      if (that == null)
3536
        return false;
3537
 
553 chandransh 3538
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3539
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3540
      if (this_present_jsessionId || that_present_jsessionId) {
3541
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3542
          return false;
553 chandransh 3543
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3544
          return false;
3545
      }
3546
 
3547
      return true;
3548
    }
3549
 
3550
    @Override
3551
    public int hashCode() {
3552
      return 0;
3553
    }
3554
 
553 chandransh 3555
    public int compareTo(createAnonymousUser_args other) {
3556
      if (!getClass().equals(other.getClass())) {
3557
        return getClass().getName().compareTo(other.getClass().getName());
3558
      }
3559
 
3560
      int lastComparison = 0;
3561
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3562
 
3563
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3564
      if (lastComparison != 0) {
3565
        return lastComparison;
3566
      }
3567
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3568
      if (lastComparison != 0) {
3569
        return lastComparison;
3570
      }
3571
      return 0;
3572
    }
3573
 
48 ashish 3574
    public void read(TProtocol iprot) throws TException {
3575
      TField field;
3576
      iprot.readStructBegin();
3577
      while (true)
3578
      {
3579
        field = iprot.readFieldBegin();
3580
        if (field.type == TType.STOP) { 
3581
          break;
3582
        }
3583
        _Fields fieldId = _Fields.findByThriftId(field.id);
3584
        if (fieldId == null) {
3585
          TProtocolUtil.skip(iprot, field.type);
3586
        } else {
3587
          switch (fieldId) {
553 chandransh 3588
            case JSESSION_ID:
3589
              if (field.type == TType.STRING) {
3590
                this.jsessionId = iprot.readString();
48 ashish 3591
              } else { 
3592
                TProtocolUtil.skip(iprot, field.type);
3593
              }
3594
              break;
3595
          }
3596
          iprot.readFieldEnd();
3597
        }
3598
      }
3599
      iprot.readStructEnd();
3600
      validate();
3601
    }
3602
 
3603
    public void write(TProtocol oprot) throws TException {
3604
      validate();
3605
 
3606
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3607
      if (this.jsessionId != null) {
3608
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3609
        oprot.writeString(this.jsessionId);
48 ashish 3610
        oprot.writeFieldEnd();
3611
      }
3612
      oprot.writeFieldStop();
3613
      oprot.writeStructEnd();
3614
    }
3615
 
3616
    @Override
3617
    public String toString() {
553 chandransh 3618
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3619
      boolean first = true;
3620
 
553 chandransh 3621
      sb.append("jsessionId:");
3622
      if (this.jsessionId == null) {
48 ashish 3623
        sb.append("null");
3624
      } else {
553 chandransh 3625
        sb.append(this.jsessionId);
48 ashish 3626
      }
3627
      first = false;
3628
      sb.append(")");
3629
      return sb.toString();
3630
    }
3631
 
3632
    public void validate() throws TException {
3633
      // check for required fields
3634
    }
3635
 
3636
  }
3637
 
571 rajveer 3638
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3639
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3640
 
3641
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3642
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3643
 
553 chandransh 3644
    private User success;
3645
    private UserContextException ucex;
48 ashish 3646
 
3647
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3648
    public enum _Fields implements TFieldIdEnum {
3649
      SUCCESS((short)0, "success"),
553 chandransh 3650
      UCEX((short)1, "ucex");
48 ashish 3651
 
3652
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3653
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3654
 
3655
      static {
3656
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3657
          byId.put((int)field._thriftId, field);
3658
          byName.put(field.getFieldName(), field);
3659
        }
3660
      }
3661
 
3662
      /**
3663
       * Find the _Fields constant that matches fieldId, or null if its not found.
3664
       */
3665
      public static _Fields findByThriftId(int fieldId) {
3666
        return byId.get(fieldId);
3667
      }
3668
 
3669
      /**
3670
       * Find the _Fields constant that matches fieldId, throwing an exception
3671
       * if it is not found.
3672
       */
3673
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3674
        _Fields fields = findByThriftId(fieldId);
3675
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3676
        return fields;
3677
      }
3678
 
3679
      /**
3680
       * Find the _Fields constant that matches name, or null if its not found.
3681
       */
3682
      public static _Fields findByName(String name) {
3683
        return byName.get(name);
3684
      }
3685
 
3686
      private final short _thriftId;
3687
      private final String _fieldName;
3688
 
3689
      _Fields(short thriftId, String fieldName) {
3690
        _thriftId = thriftId;
3691
        _fieldName = fieldName;
3692
      }
3693
 
3694
      public short getThriftFieldId() {
3695
        return _thriftId;
3696
      }
3697
 
3698
      public String getFieldName() {
3699
        return _fieldName;
3700
      }
3701
    }
3702
 
3703
    // isset id assignments
3704
 
3705
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3706
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3707
          new StructMetaData(TType.STRUCT, User.class)));
3708
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3709
          new FieldValueMetaData(TType.STRUCT)));
3710
    }});
3711
 
3712
    static {
553 chandransh 3713
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3714
    }
3715
 
553 chandransh 3716
    public createAnonymousUser_result() {
48 ashish 3717
    }
3718
 
553 chandransh 3719
    public createAnonymousUser_result(
3720
      User success,
3721
      UserContextException ucex)
48 ashish 3722
    {
3723
      this();
3724
      this.success = success;
553 chandransh 3725
      this.ucex = ucex;
48 ashish 3726
    }
3727
 
3728
    /**
3729
     * Performs a deep copy on <i>other</i>.
3730
     */
553 chandransh 3731
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3732
      if (other.isSetSuccess()) {
553 chandransh 3733
        this.success = new User(other.success);
48 ashish 3734
      }
553 chandransh 3735
      if (other.isSetUcex()) {
3736
        this.ucex = new UserContextException(other.ucex);
48 ashish 3737
      }
3738
    }
3739
 
553 chandransh 3740
    public createAnonymousUser_result deepCopy() {
3741
      return new createAnonymousUser_result(this);
48 ashish 3742
    }
3743
 
3744
    @Deprecated
553 chandransh 3745
    public createAnonymousUser_result clone() {
3746
      return new createAnonymousUser_result(this);
48 ashish 3747
    }
3748
 
553 chandransh 3749
    public User getSuccess() {
48 ashish 3750
      return this.success;
3751
    }
3752
 
553 chandransh 3753
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3754
      this.success = success;
3755
      return this;
3756
    }
3757
 
3758
    public void unsetSuccess() {
3759
      this.success = null;
3760
    }
3761
 
3762
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3763
    public boolean isSetSuccess() {
3764
      return this.success != null;
3765
    }
3766
 
3767
    public void setSuccessIsSet(boolean value) {
3768
      if (!value) {
3769
        this.success = null;
3770
      }
3771
    }
3772
 
553 chandransh 3773
    public UserContextException getUcex() {
3774
      return this.ucex;
48 ashish 3775
    }
3776
 
553 chandransh 3777
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3778
      this.ucex = ucex;
48 ashish 3779
      return this;
3780
    }
3781
 
553 chandransh 3782
    public void unsetUcex() {
3783
      this.ucex = null;
48 ashish 3784
    }
3785
 
553 chandransh 3786
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3787
    public boolean isSetUcex() {
3788
      return this.ucex != null;
48 ashish 3789
    }
3790
 
553 chandransh 3791
    public void setUcexIsSet(boolean value) {
48 ashish 3792
      if (!value) {
553 chandransh 3793
        this.ucex = null;
48 ashish 3794
      }
3795
    }
3796
 
3797
    public void setFieldValue(_Fields field, Object value) {
3798
      switch (field) {
3799
      case SUCCESS:
3800
        if (value == null) {
3801
          unsetSuccess();
3802
        } else {
553 chandransh 3803
          setSuccess((User)value);
48 ashish 3804
        }
3805
        break;
3806
 
553 chandransh 3807
      case UCEX:
48 ashish 3808
        if (value == null) {
553 chandransh 3809
          unsetUcex();
48 ashish 3810
        } else {
553 chandransh 3811
          setUcex((UserContextException)value);
48 ashish 3812
        }
3813
        break;
3814
 
3815
      }
3816
    }
3817
 
3818
    public void setFieldValue(int fieldID, Object value) {
3819
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3820
    }
3821
 
3822
    public Object getFieldValue(_Fields field) {
3823
      switch (field) {
3824
      case SUCCESS:
3825
        return getSuccess();
3826
 
553 chandransh 3827
      case UCEX:
3828
        return getUcex();
48 ashish 3829
 
3830
      }
3831
      throw new IllegalStateException();
3832
    }
3833
 
3834
    public Object getFieldValue(int fieldId) {
3835
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3836
    }
3837
 
3838
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3839
    public boolean isSet(_Fields field) {
3840
      switch (field) {
3841
      case SUCCESS:
3842
        return isSetSuccess();
553 chandransh 3843
      case UCEX:
3844
        return isSetUcex();
48 ashish 3845
      }
3846
      throw new IllegalStateException();
3847
    }
3848
 
3849
    public boolean isSet(int fieldID) {
3850
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3851
    }
3852
 
3853
    @Override
3854
    public boolean equals(Object that) {
3855
      if (that == null)
3856
        return false;
553 chandransh 3857
      if (that instanceof createAnonymousUser_result)
3858
        return this.equals((createAnonymousUser_result)that);
48 ashish 3859
      return false;
3860
    }
3861
 
553 chandransh 3862
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3863
      if (that == null)
3864
        return false;
3865
 
3866
      boolean this_present_success = true && this.isSetSuccess();
3867
      boolean that_present_success = true && that.isSetSuccess();
3868
      if (this_present_success || that_present_success) {
3869
        if (!(this_present_success && that_present_success))
3870
          return false;
3871
        if (!this.success.equals(that.success))
3872
          return false;
3873
      }
3874
 
553 chandransh 3875
      boolean this_present_ucex = true && this.isSetUcex();
3876
      boolean that_present_ucex = true && that.isSetUcex();
3877
      if (this_present_ucex || that_present_ucex) {
3878
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3879
          return false;
553 chandransh 3880
        if (!this.ucex.equals(that.ucex))
48 ashish 3881
          return false;
3882
      }
3883
 
3884
      return true;
3885
    }
3886
 
3887
    @Override
3888
    public int hashCode() {
3889
      return 0;
3890
    }
3891
 
571 rajveer 3892
    public int compareTo(createAnonymousUser_result other) {
3893
      if (!getClass().equals(other.getClass())) {
3894
        return getClass().getName().compareTo(other.getClass().getName());
3895
      }
3896
 
3897
      int lastComparison = 0;
3898
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3899
 
3900
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3901
      if (lastComparison != 0) {
3902
        return lastComparison;
3903
      }
3904
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3905
      if (lastComparison != 0) {
3906
        return lastComparison;
3907
      }
3908
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3909
      if (lastComparison != 0) {
3910
        return lastComparison;
3911
      }
3912
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3913
      if (lastComparison != 0) {
3914
        return lastComparison;
3915
      }
3916
      return 0;
3917
    }
3918
 
48 ashish 3919
    public void read(TProtocol iprot) throws TException {
3920
      TField field;
3921
      iprot.readStructBegin();
3922
      while (true)
3923
      {
3924
        field = iprot.readFieldBegin();
3925
        if (field.type == TType.STOP) { 
3926
          break;
3927
        }
3928
        _Fields fieldId = _Fields.findByThriftId(field.id);
3929
        if (fieldId == null) {
3930
          TProtocolUtil.skip(iprot, field.type);
3931
        } else {
3932
          switch (fieldId) {
3933
            case SUCCESS:
3934
              if (field.type == TType.STRUCT) {
553 chandransh 3935
                this.success = new User();
48 ashish 3936
                this.success.read(iprot);
3937
              } else { 
3938
                TProtocolUtil.skip(iprot, field.type);
3939
              }
3940
              break;
553 chandransh 3941
            case UCEX:
48 ashish 3942
              if (field.type == TType.STRUCT) {
553 chandransh 3943
                this.ucex = new UserContextException();
3944
                this.ucex.read(iprot);
48 ashish 3945
              } else { 
3946
                TProtocolUtil.skip(iprot, field.type);
3947
              }
3948
              break;
3949
          }
3950
          iprot.readFieldEnd();
3951
        }
3952
      }
3953
      iprot.readStructEnd();
3954
      validate();
3955
    }
3956
 
3957
    public void write(TProtocol oprot) throws TException {
3958
      oprot.writeStructBegin(STRUCT_DESC);
3959
 
3960
      if (this.isSetSuccess()) {
3961
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3962
        this.success.write(oprot);
3963
        oprot.writeFieldEnd();
553 chandransh 3964
      } else if (this.isSetUcex()) {
3965
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3966
        this.ucex.write(oprot);
48 ashish 3967
        oprot.writeFieldEnd();
3968
      }
3969
      oprot.writeFieldStop();
3970
      oprot.writeStructEnd();
3971
    }
3972
 
3973
    @Override
3974
    public String toString() {
553 chandransh 3975
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3976
      boolean first = true;
3977
 
3978
      sb.append("success:");
3979
      if (this.success == null) {
3980
        sb.append("null");
3981
      } else {
3982
        sb.append(this.success);
3983
      }
3984
      first = false;
3985
      if (!first) sb.append(", ");
553 chandransh 3986
      sb.append("ucex:");
3987
      if (this.ucex == null) {
48 ashish 3988
        sb.append("null");
3989
      } else {
553 chandransh 3990
        sb.append(this.ucex);
48 ashish 3991
      }
3992
      first = false;
3993
      sb.append(")");
3994
      return sb.toString();
3995
    }
3996
 
3997
    public void validate() throws TException {
3998
      // check for required fields
3999
    }
4000
 
4001
  }
4002
 
553 chandransh 4003
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
4004
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 4005
 
4006
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
4007
 
4008
    private long userId;
4009
 
4010
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4011
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4012
      USER_ID((short)1, "userId");
48 ashish 4013
 
4014
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4015
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4016
 
4017
      static {
4018
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4019
          byId.put((int)field._thriftId, field);
4020
          byName.put(field.getFieldName(), field);
4021
        }
4022
      }
4023
 
4024
      /**
4025
       * Find the _Fields constant that matches fieldId, or null if its not found.
4026
       */
4027
      public static _Fields findByThriftId(int fieldId) {
4028
        return byId.get(fieldId);
4029
      }
4030
 
4031
      /**
4032
       * Find the _Fields constant that matches fieldId, throwing an exception
4033
       * if it is not found.
4034
       */
4035
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4036
        _Fields fields = findByThriftId(fieldId);
4037
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4038
        return fields;
4039
      }
4040
 
4041
      /**
4042
       * Find the _Fields constant that matches name, or null if its not found.
4043
       */
4044
      public static _Fields findByName(String name) {
4045
        return byName.get(name);
4046
      }
4047
 
4048
      private final short _thriftId;
4049
      private final String _fieldName;
4050
 
4051
      _Fields(short thriftId, String fieldName) {
4052
        _thriftId = thriftId;
4053
        _fieldName = fieldName;
4054
      }
4055
 
4056
      public short getThriftFieldId() {
4057
        return _thriftId;
4058
      }
4059
 
4060
      public String getFieldName() {
4061
        return _fieldName;
4062
      }
4063
    }
4064
 
4065
    // isset id assignments
4066
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 4067
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 4068
 
4069
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4070
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4071
          new FieldValueMetaData(TType.I64)));
4072
    }});
4073
 
4074
    static {
553 chandransh 4075
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 4076
    }
4077
 
553 chandransh 4078
    public getUserById_args() {
48 ashish 4079
    }
4080
 
553 chandransh 4081
    public getUserById_args(
4082
      long userId)
48 ashish 4083
    {
4084
      this();
4085
      this.userId = userId;
4086
      setUserIdIsSet(true);
4087
    }
4088
 
4089
    /**
4090
     * Performs a deep copy on <i>other</i>.
4091
     */
553 chandransh 4092
    public getUserById_args(getUserById_args other) {
48 ashish 4093
      __isset_bit_vector.clear();
4094
      __isset_bit_vector.or(other.__isset_bit_vector);
4095
      this.userId = other.userId;
4096
    }
4097
 
553 chandransh 4098
    public getUserById_args deepCopy() {
4099
      return new getUserById_args(this);
48 ashish 4100
    }
4101
 
4102
    @Deprecated
553 chandransh 4103
    public getUserById_args clone() {
4104
      return new getUserById_args(this);
48 ashish 4105
    }
4106
 
4107
    public long getUserId() {
4108
      return this.userId;
4109
    }
4110
 
553 chandransh 4111
    public getUserById_args setUserId(long userId) {
48 ashish 4112
      this.userId = userId;
4113
      setUserIdIsSet(true);
4114
      return this;
4115
    }
4116
 
4117
    public void unsetUserId() {
4118
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4119
    }
4120
 
4121
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4122
    public boolean isSetUserId() {
4123
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4124
    }
4125
 
4126
    public void setUserIdIsSet(boolean value) {
4127
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4128
    }
4129
 
4130
    public void setFieldValue(_Fields field, Object value) {
4131
      switch (field) {
4132
      case USER_ID:
4133
        if (value == null) {
4134
          unsetUserId();
4135
        } else {
4136
          setUserId((Long)value);
4137
        }
4138
        break;
4139
 
4140
      }
4141
    }
4142
 
4143
    public void setFieldValue(int fieldID, Object value) {
4144
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4145
    }
4146
 
4147
    public Object getFieldValue(_Fields field) {
4148
      switch (field) {
4149
      case USER_ID:
4150
        return new Long(getUserId());
4151
 
4152
      }
4153
      throw new IllegalStateException();
4154
    }
4155
 
4156
    public Object getFieldValue(int fieldId) {
4157
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4158
    }
4159
 
4160
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4161
    public boolean isSet(_Fields field) {
4162
      switch (field) {
4163
      case USER_ID:
4164
        return isSetUserId();
4165
      }
4166
      throw new IllegalStateException();
4167
    }
4168
 
4169
    public boolean isSet(int fieldID) {
4170
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4171
    }
4172
 
4173
    @Override
4174
    public boolean equals(Object that) {
4175
      if (that == null)
4176
        return false;
553 chandransh 4177
      if (that instanceof getUserById_args)
4178
        return this.equals((getUserById_args)that);
48 ashish 4179
      return false;
4180
    }
4181
 
553 chandransh 4182
    public boolean equals(getUserById_args that) {
48 ashish 4183
      if (that == null)
4184
        return false;
4185
 
4186
      boolean this_present_userId = true;
4187
      boolean that_present_userId = true;
4188
      if (this_present_userId || that_present_userId) {
4189
        if (!(this_present_userId && that_present_userId))
4190
          return false;
4191
        if (this.userId != that.userId)
4192
          return false;
4193
      }
4194
 
4195
      return true;
4196
    }
4197
 
4198
    @Override
4199
    public int hashCode() {
4200
      return 0;
4201
    }
4202
 
553 chandransh 4203
    public int compareTo(getUserById_args other) {
48 ashish 4204
      if (!getClass().equals(other.getClass())) {
4205
        return getClass().getName().compareTo(other.getClass().getName());
4206
      }
4207
 
4208
      int lastComparison = 0;
553 chandransh 4209
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4210
 
4211
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4212
      if (lastComparison != 0) {
4213
        return lastComparison;
4214
      }
4215
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4216
      if (lastComparison != 0) {
4217
        return lastComparison;
4218
      }
4219
      return 0;
4220
    }
4221
 
4222
    public void read(TProtocol iprot) throws TException {
4223
      TField field;
4224
      iprot.readStructBegin();
4225
      while (true)
4226
      {
4227
        field = iprot.readFieldBegin();
4228
        if (field.type == TType.STOP) { 
4229
          break;
4230
        }
4231
        _Fields fieldId = _Fields.findByThriftId(field.id);
4232
        if (fieldId == null) {
4233
          TProtocolUtil.skip(iprot, field.type);
4234
        } else {
4235
          switch (fieldId) {
4236
            case USER_ID:
4237
              if (field.type == TType.I64) {
4238
                this.userId = iprot.readI64();
4239
                setUserIdIsSet(true);
4240
              } else { 
4241
                TProtocolUtil.skip(iprot, field.type);
4242
              }
4243
              break;
4244
          }
4245
          iprot.readFieldEnd();
4246
        }
4247
      }
4248
      iprot.readStructEnd();
4249
      validate();
4250
    }
4251
 
4252
    public void write(TProtocol oprot) throws TException {
4253
      validate();
4254
 
4255
      oprot.writeStructBegin(STRUCT_DESC);
4256
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4257
      oprot.writeI64(this.userId);
4258
      oprot.writeFieldEnd();
4259
      oprot.writeFieldStop();
4260
      oprot.writeStructEnd();
4261
    }
4262
 
4263
    @Override
4264
    public String toString() {
553 chandransh 4265
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4266
      boolean first = true;
4267
 
4268
      sb.append("userId:");
4269
      sb.append(this.userId);
4270
      first = false;
4271
      sb.append(")");
4272
      return sb.toString();
4273
    }
4274
 
4275
    public void validate() throws TException {
4276
      // check for required fields
4277
    }
4278
 
4279
  }
4280
 
571 rajveer 4281
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4282
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4283
 
4284
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4285
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4286
 
553 chandransh 4287
    private User success;
4288
    private UserContextException ucex;
48 ashish 4289
 
4290
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4291
    public enum _Fields implements TFieldIdEnum {
4292
      SUCCESS((short)0, "success"),
553 chandransh 4293
      UCEX((short)1, "ucex");
48 ashish 4294
 
4295
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4296
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4297
 
4298
      static {
4299
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4300
          byId.put((int)field._thriftId, field);
4301
          byName.put(field.getFieldName(), field);
4302
        }
4303
      }
4304
 
4305
      /**
4306
       * Find the _Fields constant that matches fieldId, or null if its not found.
4307
       */
4308
      public static _Fields findByThriftId(int fieldId) {
4309
        return byId.get(fieldId);
4310
      }
4311
 
4312
      /**
4313
       * Find the _Fields constant that matches fieldId, throwing an exception
4314
       * if it is not found.
4315
       */
4316
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4317
        _Fields fields = findByThriftId(fieldId);
4318
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4319
        return fields;
4320
      }
4321
 
4322
      /**
4323
       * Find the _Fields constant that matches name, or null if its not found.
4324
       */
4325
      public static _Fields findByName(String name) {
4326
        return byName.get(name);
4327
      }
4328
 
4329
      private final short _thriftId;
4330
      private final String _fieldName;
4331
 
4332
      _Fields(short thriftId, String fieldName) {
4333
        _thriftId = thriftId;
4334
        _fieldName = fieldName;
4335
      }
4336
 
4337
      public short getThriftFieldId() {
4338
        return _thriftId;
4339
      }
4340
 
4341
      public String getFieldName() {
4342
        return _fieldName;
4343
      }
4344
    }
4345
 
4346
    // isset id assignments
4347
 
4348
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4349
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4350
          new StructMetaData(TType.STRUCT, User.class)));
4351
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4352
          new FieldValueMetaData(TType.STRUCT)));
4353
    }});
4354
 
4355
    static {
553 chandransh 4356
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4357
    }
4358
 
553 chandransh 4359
    public getUserById_result() {
48 ashish 4360
    }
4361
 
553 chandransh 4362
    public getUserById_result(
4363
      User success,
4364
      UserContextException ucex)
48 ashish 4365
    {
4366
      this();
4367
      this.success = success;
553 chandransh 4368
      this.ucex = ucex;
48 ashish 4369
    }
4370
 
4371
    /**
4372
     * Performs a deep copy on <i>other</i>.
4373
     */
553 chandransh 4374
    public getUserById_result(getUserById_result other) {
48 ashish 4375
      if (other.isSetSuccess()) {
553 chandransh 4376
        this.success = new User(other.success);
48 ashish 4377
      }
553 chandransh 4378
      if (other.isSetUcex()) {
4379
        this.ucex = new UserContextException(other.ucex);
48 ashish 4380
      }
4381
    }
4382
 
553 chandransh 4383
    public getUserById_result deepCopy() {
4384
      return new getUserById_result(this);
48 ashish 4385
    }
4386
 
4387
    @Deprecated
553 chandransh 4388
    public getUserById_result clone() {
4389
      return new getUserById_result(this);
48 ashish 4390
    }
4391
 
553 chandransh 4392
    public User getSuccess() {
48 ashish 4393
      return this.success;
4394
    }
4395
 
553 chandransh 4396
    public getUserById_result setSuccess(User success) {
48 ashish 4397
      this.success = success;
4398
      return this;
4399
    }
4400
 
4401
    public void unsetSuccess() {
4402
      this.success = null;
4403
    }
4404
 
4405
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4406
    public boolean isSetSuccess() {
4407
      return this.success != null;
4408
    }
4409
 
4410
    public void setSuccessIsSet(boolean value) {
4411
      if (!value) {
4412
        this.success = null;
4413
      }
4414
    }
4415
 
553 chandransh 4416
    public UserContextException getUcex() {
4417
      return this.ucex;
48 ashish 4418
    }
4419
 
553 chandransh 4420
    public getUserById_result setUcex(UserContextException ucex) {
4421
      this.ucex = ucex;
48 ashish 4422
      return this;
4423
    }
4424
 
553 chandransh 4425
    public void unsetUcex() {
4426
      this.ucex = null;
48 ashish 4427
    }
4428
 
553 chandransh 4429
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4430
    public boolean isSetUcex() {
4431
      return this.ucex != null;
48 ashish 4432
    }
4433
 
553 chandransh 4434
    public void setUcexIsSet(boolean value) {
48 ashish 4435
      if (!value) {
553 chandransh 4436
        this.ucex = null;
48 ashish 4437
      }
4438
    }
4439
 
4440
    public void setFieldValue(_Fields field, Object value) {
4441
      switch (field) {
4442
      case SUCCESS:
4443
        if (value == null) {
4444
          unsetSuccess();
4445
        } else {
553 chandransh 4446
          setSuccess((User)value);
48 ashish 4447
        }
4448
        break;
4449
 
553 chandransh 4450
      case UCEX:
48 ashish 4451
        if (value == null) {
553 chandransh 4452
          unsetUcex();
48 ashish 4453
        } else {
553 chandransh 4454
          setUcex((UserContextException)value);
48 ashish 4455
        }
4456
        break;
4457
 
4458
      }
4459
    }
4460
 
4461
    public void setFieldValue(int fieldID, Object value) {
4462
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4463
    }
4464
 
4465
    public Object getFieldValue(_Fields field) {
4466
      switch (field) {
4467
      case SUCCESS:
4468
        return getSuccess();
4469
 
553 chandransh 4470
      case UCEX:
4471
        return getUcex();
48 ashish 4472
 
4473
      }
4474
      throw new IllegalStateException();
4475
    }
4476
 
4477
    public Object getFieldValue(int fieldId) {
4478
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4479
    }
4480
 
4481
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4482
    public boolean isSet(_Fields field) {
4483
      switch (field) {
4484
      case SUCCESS:
4485
        return isSetSuccess();
553 chandransh 4486
      case UCEX:
4487
        return isSetUcex();
48 ashish 4488
      }
4489
      throw new IllegalStateException();
4490
    }
4491
 
4492
    public boolean isSet(int fieldID) {
4493
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4494
    }
4495
 
4496
    @Override
4497
    public boolean equals(Object that) {
4498
      if (that == null)
4499
        return false;
553 chandransh 4500
      if (that instanceof getUserById_result)
4501
        return this.equals((getUserById_result)that);
48 ashish 4502
      return false;
4503
    }
4504
 
553 chandransh 4505
    public boolean equals(getUserById_result that) {
48 ashish 4506
      if (that == null)
4507
        return false;
4508
 
4509
      boolean this_present_success = true && this.isSetSuccess();
4510
      boolean that_present_success = true && that.isSetSuccess();
4511
      if (this_present_success || that_present_success) {
4512
        if (!(this_present_success && that_present_success))
4513
          return false;
4514
        if (!this.success.equals(that.success))
4515
          return false;
4516
      }
4517
 
553 chandransh 4518
      boolean this_present_ucex = true && this.isSetUcex();
4519
      boolean that_present_ucex = true && that.isSetUcex();
4520
      if (this_present_ucex || that_present_ucex) {
4521
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4522
          return false;
553 chandransh 4523
        if (!this.ucex.equals(that.ucex))
48 ashish 4524
          return false;
4525
      }
4526
 
4527
      return true;
4528
    }
4529
 
4530
    @Override
4531
    public int hashCode() {
4532
      return 0;
4533
    }
4534
 
571 rajveer 4535
    public int compareTo(getUserById_result other) {
4536
      if (!getClass().equals(other.getClass())) {
4537
        return getClass().getName().compareTo(other.getClass().getName());
4538
      }
4539
 
4540
      int lastComparison = 0;
4541
      getUserById_result typedOther = (getUserById_result)other;
4542
 
4543
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4544
      if (lastComparison != 0) {
4545
        return lastComparison;
4546
      }
4547
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4548
      if (lastComparison != 0) {
4549
        return lastComparison;
4550
      }
4551
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4552
      if (lastComparison != 0) {
4553
        return lastComparison;
4554
      }
4555
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4556
      if (lastComparison != 0) {
4557
        return lastComparison;
4558
      }
4559
      return 0;
4560
    }
4561
 
48 ashish 4562
    public void read(TProtocol iprot) throws TException {
4563
      TField field;
4564
      iprot.readStructBegin();
4565
      while (true)
4566
      {
4567
        field = iprot.readFieldBegin();
4568
        if (field.type == TType.STOP) { 
4569
          break;
4570
        }
4571
        _Fields fieldId = _Fields.findByThriftId(field.id);
4572
        if (fieldId == null) {
4573
          TProtocolUtil.skip(iprot, field.type);
4574
        } else {
4575
          switch (fieldId) {
4576
            case SUCCESS:
4577
              if (field.type == TType.STRUCT) {
553 chandransh 4578
                this.success = new User();
48 ashish 4579
                this.success.read(iprot);
4580
              } else { 
4581
                TProtocolUtil.skip(iprot, field.type);
4582
              }
4583
              break;
553 chandransh 4584
            case UCEX:
48 ashish 4585
              if (field.type == TType.STRUCT) {
553 chandransh 4586
                this.ucex = new UserContextException();
4587
                this.ucex.read(iprot);
48 ashish 4588
              } else { 
4589
                TProtocolUtil.skip(iprot, field.type);
4590
              }
4591
              break;
4592
          }
4593
          iprot.readFieldEnd();
4594
        }
4595
      }
4596
      iprot.readStructEnd();
4597
      validate();
4598
    }
4599
 
4600
    public void write(TProtocol oprot) throws TException {
4601
      oprot.writeStructBegin(STRUCT_DESC);
4602
 
4603
      if (this.isSetSuccess()) {
4604
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4605
        this.success.write(oprot);
4606
        oprot.writeFieldEnd();
553 chandransh 4607
      } else if (this.isSetUcex()) {
4608
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4609
        this.ucex.write(oprot);
48 ashish 4610
        oprot.writeFieldEnd();
4611
      }
4612
      oprot.writeFieldStop();
4613
      oprot.writeStructEnd();
4614
    }
4615
 
4616
    @Override
4617
    public String toString() {
553 chandransh 4618
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4619
      boolean first = true;
4620
 
4621
      sb.append("success:");
4622
      if (this.success == null) {
4623
        sb.append("null");
4624
      } else {
4625
        sb.append(this.success);
4626
      }
4627
      first = false;
4628
      if (!first) sb.append(", ");
553 chandransh 4629
      sb.append("ucex:");
4630
      if (this.ucex == null) {
48 ashish 4631
        sb.append("null");
4632
      } else {
553 chandransh 4633
        sb.append(this.ucex);
48 ashish 4634
      }
4635
      first = false;
4636
      sb.append(")");
4637
      return sb.toString();
4638
    }
4639
 
4640
    public void validate() throws TException {
4641
      // check for required fields
4642
    }
4643
 
4644
  }
4645
 
571 rajveer 4646
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4647
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4648
 
553 chandransh 4649
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4650
 
553 chandransh 4651
    private User user;
48 ashish 4652
 
4653
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4654
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4655
      USER((short)1, "user");
48 ashish 4656
 
4657
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4658
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4659
 
4660
      static {
4661
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4662
          byId.put((int)field._thriftId, field);
4663
          byName.put(field.getFieldName(), field);
4664
        }
4665
      }
4666
 
4667
      /**
4668
       * Find the _Fields constant that matches fieldId, or null if its not found.
4669
       */
4670
      public static _Fields findByThriftId(int fieldId) {
4671
        return byId.get(fieldId);
4672
      }
4673
 
4674
      /**
4675
       * Find the _Fields constant that matches fieldId, throwing an exception
4676
       * if it is not found.
4677
       */
4678
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4679
        _Fields fields = findByThriftId(fieldId);
4680
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4681
        return fields;
4682
      }
4683
 
4684
      /**
4685
       * Find the _Fields constant that matches name, or null if its not found.
4686
       */
4687
      public static _Fields findByName(String name) {
4688
        return byName.get(name);
4689
      }
4690
 
4691
      private final short _thriftId;
4692
      private final String _fieldName;
4693
 
4694
      _Fields(short thriftId, String fieldName) {
4695
        _thriftId = thriftId;
4696
        _fieldName = fieldName;
4697
      }
4698
 
4699
      public short getThriftFieldId() {
4700
        return _thriftId;
4701
      }
4702
 
4703
      public String getFieldName() {
4704
        return _fieldName;
4705
      }
4706
    }
4707
 
4708
    // isset id assignments
4709
 
4710
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4711
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4712
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4713
    }});
4714
 
4715
    static {
553 chandransh 4716
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4717
    }
4718
 
553 chandransh 4719
    public createUser_args() {
48 ashish 4720
    }
4721
 
553 chandransh 4722
    public createUser_args(
4723
      User user)
48 ashish 4724
    {
4725
      this();
553 chandransh 4726
      this.user = user;
48 ashish 4727
    }
4728
 
4729
    /**
4730
     * Performs a deep copy on <i>other</i>.
4731
     */
553 chandransh 4732
    public createUser_args(createUser_args other) {
4733
      if (other.isSetUser()) {
4734
        this.user = new User(other.user);
48 ashish 4735
      }
4736
    }
4737
 
553 chandransh 4738
    public createUser_args deepCopy() {
4739
      return new createUser_args(this);
48 ashish 4740
    }
4741
 
4742
    @Deprecated
553 chandransh 4743
    public createUser_args clone() {
4744
      return new createUser_args(this);
48 ashish 4745
    }
4746
 
553 chandransh 4747
    public User getUser() {
4748
      return this.user;
48 ashish 4749
    }
4750
 
553 chandransh 4751
    public createUser_args setUser(User user) {
4752
      this.user = user;
48 ashish 4753
      return this;
4754
    }
4755
 
553 chandransh 4756
    public void unsetUser() {
4757
      this.user = null;
48 ashish 4758
    }
4759
 
553 chandransh 4760
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4761
    public boolean isSetUser() {
4762
      return this.user != null;
48 ashish 4763
    }
4764
 
553 chandransh 4765
    public void setUserIsSet(boolean value) {
48 ashish 4766
      if (!value) {
553 chandransh 4767
        this.user = null;
48 ashish 4768
      }
4769
    }
4770
 
4771
    public void setFieldValue(_Fields field, Object value) {
4772
      switch (field) {
553 chandransh 4773
      case USER:
48 ashish 4774
        if (value == null) {
553 chandransh 4775
          unsetUser();
48 ashish 4776
        } else {
553 chandransh 4777
          setUser((User)value);
48 ashish 4778
        }
4779
        break;
4780
 
4781
      }
4782
    }
4783
 
4784
    public void setFieldValue(int fieldID, Object value) {
4785
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4786
    }
4787
 
4788
    public Object getFieldValue(_Fields field) {
4789
      switch (field) {
553 chandransh 4790
      case USER:
4791
        return getUser();
48 ashish 4792
 
4793
      }
4794
      throw new IllegalStateException();
4795
    }
4796
 
4797
    public Object getFieldValue(int fieldId) {
4798
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4799
    }
4800
 
4801
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4802
    public boolean isSet(_Fields field) {
4803
      switch (field) {
553 chandransh 4804
      case USER:
4805
        return isSetUser();
48 ashish 4806
      }
4807
      throw new IllegalStateException();
4808
    }
4809
 
4810
    public boolean isSet(int fieldID) {
4811
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4812
    }
4813
 
4814
    @Override
4815
    public boolean equals(Object that) {
4816
      if (that == null)
4817
        return false;
553 chandransh 4818
      if (that instanceof createUser_args)
4819
        return this.equals((createUser_args)that);
48 ashish 4820
      return false;
4821
    }
4822
 
553 chandransh 4823
    public boolean equals(createUser_args that) {
48 ashish 4824
      if (that == null)
4825
        return false;
4826
 
553 chandransh 4827
      boolean this_present_user = true && this.isSetUser();
4828
      boolean that_present_user = true && that.isSetUser();
4829
      if (this_present_user || that_present_user) {
4830
        if (!(this_present_user && that_present_user))
48 ashish 4831
          return false;
553 chandransh 4832
        if (!this.user.equals(that.user))
48 ashish 4833
          return false;
4834
      }
4835
 
4836
      return true;
4837
    }
4838
 
4839
    @Override
4840
    public int hashCode() {
4841
      return 0;
4842
    }
4843
 
571 rajveer 4844
    public int compareTo(createUser_args other) {
4845
      if (!getClass().equals(other.getClass())) {
4846
        return getClass().getName().compareTo(other.getClass().getName());
4847
      }
4848
 
4849
      int lastComparison = 0;
4850
      createUser_args typedOther = (createUser_args)other;
4851
 
4852
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4853
      if (lastComparison != 0) {
4854
        return lastComparison;
4855
      }
4856
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4857
      if (lastComparison != 0) {
4858
        return lastComparison;
4859
      }
4860
      return 0;
4861
    }
4862
 
48 ashish 4863
    public void read(TProtocol iprot) throws TException {
4864
      TField field;
4865
      iprot.readStructBegin();
4866
      while (true)
4867
      {
4868
        field = iprot.readFieldBegin();
4869
        if (field.type == TType.STOP) { 
4870
          break;
4871
        }
4872
        _Fields fieldId = _Fields.findByThriftId(field.id);
4873
        if (fieldId == null) {
4874
          TProtocolUtil.skip(iprot, field.type);
4875
        } else {
4876
          switch (fieldId) {
553 chandransh 4877
            case USER:
4878
              if (field.type == TType.STRUCT) {
4879
                this.user = new User();
4880
                this.user.read(iprot);
48 ashish 4881
              } else { 
4882
                TProtocolUtil.skip(iprot, field.type);
4883
              }
4884
              break;
4885
          }
4886
          iprot.readFieldEnd();
4887
        }
4888
      }
4889
      iprot.readStructEnd();
4890
      validate();
4891
    }
4892
 
4893
    public void write(TProtocol oprot) throws TException {
4894
      validate();
4895
 
4896
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4897
      if (this.user != null) {
4898
        oprot.writeFieldBegin(USER_FIELD_DESC);
4899
        this.user.write(oprot);
48 ashish 4900
        oprot.writeFieldEnd();
4901
      }
4902
      oprot.writeFieldStop();
4903
      oprot.writeStructEnd();
4904
    }
4905
 
4906
    @Override
4907
    public String toString() {
553 chandransh 4908
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4909
      boolean first = true;
4910
 
553 chandransh 4911
      sb.append("user:");
4912
      if (this.user == null) {
48 ashish 4913
        sb.append("null");
4914
      } else {
553 chandransh 4915
        sb.append(this.user);
48 ashish 4916
      }
4917
      first = false;
4918
      sb.append(")");
4919
      return sb.toString();
4920
    }
4921
 
4922
    public void validate() throws TException {
4923
      // check for required fields
4924
    }
4925
 
4926
  }
4927
 
571 rajveer 4928
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 4929
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4930
 
4931
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4932
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4933
 
553 chandransh 4934
    private User success;
4935
    private UserContextException ucex;
48 ashish 4936
 
4937
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4938
    public enum _Fields implements TFieldIdEnum {
4939
      SUCCESS((short)0, "success"),
553 chandransh 4940
      UCEX((short)1, "ucex");
48 ashish 4941
 
4942
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4943
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4944
 
4945
      static {
4946
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4947
          byId.put((int)field._thriftId, field);
4948
          byName.put(field.getFieldName(), field);
4949
        }
4950
      }
4951
 
4952
      /**
4953
       * Find the _Fields constant that matches fieldId, or null if its not found.
4954
       */
4955
      public static _Fields findByThriftId(int fieldId) {
4956
        return byId.get(fieldId);
4957
      }
4958
 
4959
      /**
4960
       * Find the _Fields constant that matches fieldId, throwing an exception
4961
       * if it is not found.
4962
       */
4963
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4964
        _Fields fields = findByThriftId(fieldId);
4965
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4966
        return fields;
4967
      }
4968
 
4969
      /**
4970
       * Find the _Fields constant that matches name, or null if its not found.
4971
       */
4972
      public static _Fields findByName(String name) {
4973
        return byName.get(name);
4974
      }
4975
 
4976
      private final short _thriftId;
4977
      private final String _fieldName;
4978
 
4979
      _Fields(short thriftId, String fieldName) {
4980
        _thriftId = thriftId;
4981
        _fieldName = fieldName;
4982
      }
4983
 
4984
      public short getThriftFieldId() {
4985
        return _thriftId;
4986
      }
4987
 
4988
      public String getFieldName() {
4989
        return _fieldName;
4990
      }
4991
    }
4992
 
4993
    // isset id assignments
4994
 
4995
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4996
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4997
          new StructMetaData(TType.STRUCT, User.class)));
4998
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4999
          new FieldValueMetaData(TType.STRUCT)));
5000
    }});
5001
 
5002
    static {
553 chandransh 5003
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 5004
    }
5005
 
553 chandransh 5006
    public createUser_result() {
48 ashish 5007
    }
5008
 
553 chandransh 5009
    public createUser_result(
5010
      User success,
5011
      UserContextException ucex)
48 ashish 5012
    {
5013
      this();
5014
      this.success = success;
553 chandransh 5015
      this.ucex = ucex;
48 ashish 5016
    }
5017
 
5018
    /**
5019
     * Performs a deep copy on <i>other</i>.
5020
     */
553 chandransh 5021
    public createUser_result(createUser_result other) {
48 ashish 5022
      if (other.isSetSuccess()) {
553 chandransh 5023
        this.success = new User(other.success);
48 ashish 5024
      }
553 chandransh 5025
      if (other.isSetUcex()) {
5026
        this.ucex = new UserContextException(other.ucex);
48 ashish 5027
      }
5028
    }
5029
 
553 chandransh 5030
    public createUser_result deepCopy() {
5031
      return new createUser_result(this);
48 ashish 5032
    }
5033
 
5034
    @Deprecated
553 chandransh 5035
    public createUser_result clone() {
5036
      return new createUser_result(this);
48 ashish 5037
    }
5038
 
553 chandransh 5039
    public User getSuccess() {
48 ashish 5040
      return this.success;
5041
    }
5042
 
553 chandransh 5043
    public createUser_result setSuccess(User success) {
48 ashish 5044
      this.success = success;
5045
      return this;
5046
    }
5047
 
5048
    public void unsetSuccess() {
5049
      this.success = null;
5050
    }
5051
 
5052
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5053
    public boolean isSetSuccess() {
5054
      return this.success != null;
5055
    }
5056
 
5057
    public void setSuccessIsSet(boolean value) {
5058
      if (!value) {
5059
        this.success = null;
5060
      }
5061
    }
5062
 
553 chandransh 5063
    public UserContextException getUcex() {
5064
      return this.ucex;
48 ashish 5065
    }
5066
 
553 chandransh 5067
    public createUser_result setUcex(UserContextException ucex) {
5068
      this.ucex = ucex;
48 ashish 5069
      return this;
5070
    }
5071
 
553 chandransh 5072
    public void unsetUcex() {
5073
      this.ucex = null;
48 ashish 5074
    }
5075
 
553 chandransh 5076
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5077
    public boolean isSetUcex() {
5078
      return this.ucex != null;
48 ashish 5079
    }
5080
 
553 chandransh 5081
    public void setUcexIsSet(boolean value) {
48 ashish 5082
      if (!value) {
553 chandransh 5083
        this.ucex = null;
48 ashish 5084
      }
5085
    }
5086
 
5087
    public void setFieldValue(_Fields field, Object value) {
5088
      switch (field) {
5089
      case SUCCESS:
5090
        if (value == null) {
5091
          unsetSuccess();
5092
        } else {
553 chandransh 5093
          setSuccess((User)value);
48 ashish 5094
        }
5095
        break;
5096
 
553 chandransh 5097
      case UCEX:
48 ashish 5098
        if (value == null) {
553 chandransh 5099
          unsetUcex();
48 ashish 5100
        } else {
553 chandransh 5101
          setUcex((UserContextException)value);
48 ashish 5102
        }
5103
        break;
5104
 
5105
      }
5106
    }
5107
 
5108
    public void setFieldValue(int fieldID, Object value) {
5109
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5110
    }
5111
 
5112
    public Object getFieldValue(_Fields field) {
5113
      switch (field) {
5114
      case SUCCESS:
5115
        return getSuccess();
5116
 
553 chandransh 5117
      case UCEX:
5118
        return getUcex();
48 ashish 5119
 
5120
      }
5121
      throw new IllegalStateException();
5122
    }
5123
 
5124
    public Object getFieldValue(int fieldId) {
5125
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5126
    }
5127
 
5128
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5129
    public boolean isSet(_Fields field) {
5130
      switch (field) {
5131
      case SUCCESS:
5132
        return isSetSuccess();
553 chandransh 5133
      case UCEX:
5134
        return isSetUcex();
48 ashish 5135
      }
5136
      throw new IllegalStateException();
5137
    }
5138
 
5139
    public boolean isSet(int fieldID) {
5140
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5141
    }
5142
 
5143
    @Override
5144
    public boolean equals(Object that) {
5145
      if (that == null)
5146
        return false;
553 chandransh 5147
      if (that instanceof createUser_result)
5148
        return this.equals((createUser_result)that);
48 ashish 5149
      return false;
5150
    }
5151
 
553 chandransh 5152
    public boolean equals(createUser_result that) {
48 ashish 5153
      if (that == null)
5154
        return false;
5155
 
5156
      boolean this_present_success = true && this.isSetSuccess();
5157
      boolean that_present_success = true && that.isSetSuccess();
5158
      if (this_present_success || that_present_success) {
5159
        if (!(this_present_success && that_present_success))
5160
          return false;
5161
        if (!this.success.equals(that.success))
5162
          return false;
5163
      }
5164
 
553 chandransh 5165
      boolean this_present_ucex = true && this.isSetUcex();
5166
      boolean that_present_ucex = true && that.isSetUcex();
5167
      if (this_present_ucex || that_present_ucex) {
5168
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5169
          return false;
553 chandransh 5170
        if (!this.ucex.equals(that.ucex))
48 ashish 5171
          return false;
5172
      }
5173
 
5174
      return true;
5175
    }
5176
 
5177
    @Override
5178
    public int hashCode() {
5179
      return 0;
5180
    }
5181
 
571 rajveer 5182
    public int compareTo(createUser_result other) {
5183
      if (!getClass().equals(other.getClass())) {
5184
        return getClass().getName().compareTo(other.getClass().getName());
5185
      }
5186
 
5187
      int lastComparison = 0;
5188
      createUser_result typedOther = (createUser_result)other;
5189
 
5190
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5191
      if (lastComparison != 0) {
5192
        return lastComparison;
5193
      }
5194
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5195
      if (lastComparison != 0) {
5196
        return lastComparison;
5197
      }
5198
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5199
      if (lastComparison != 0) {
5200
        return lastComparison;
5201
      }
5202
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5203
      if (lastComparison != 0) {
5204
        return lastComparison;
5205
      }
5206
      return 0;
5207
    }
5208
 
48 ashish 5209
    public void read(TProtocol iprot) throws TException {
5210
      TField field;
5211
      iprot.readStructBegin();
5212
      while (true)
5213
      {
5214
        field = iprot.readFieldBegin();
5215
        if (field.type == TType.STOP) { 
5216
          break;
5217
        }
5218
        _Fields fieldId = _Fields.findByThriftId(field.id);
5219
        if (fieldId == null) {
5220
          TProtocolUtil.skip(iprot, field.type);
5221
        } else {
5222
          switch (fieldId) {
5223
            case SUCCESS:
5224
              if (field.type == TType.STRUCT) {
553 chandransh 5225
                this.success = new User();
48 ashish 5226
                this.success.read(iprot);
5227
              } else { 
5228
                TProtocolUtil.skip(iprot, field.type);
5229
              }
5230
              break;
553 chandransh 5231
            case UCEX:
48 ashish 5232
              if (field.type == TType.STRUCT) {
553 chandransh 5233
                this.ucex = new UserContextException();
5234
                this.ucex.read(iprot);
48 ashish 5235
              } else { 
5236
                TProtocolUtil.skip(iprot, field.type);
5237
              }
5238
              break;
5239
          }
5240
          iprot.readFieldEnd();
5241
        }
5242
      }
5243
      iprot.readStructEnd();
5244
      validate();
5245
    }
5246
 
5247
    public void write(TProtocol oprot) throws TException {
5248
      oprot.writeStructBegin(STRUCT_DESC);
5249
 
5250
      if (this.isSetSuccess()) {
5251
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5252
        this.success.write(oprot);
5253
        oprot.writeFieldEnd();
553 chandransh 5254
      } else if (this.isSetUcex()) {
5255
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5256
        this.ucex.write(oprot);
48 ashish 5257
        oprot.writeFieldEnd();
5258
      }
5259
      oprot.writeFieldStop();
5260
      oprot.writeStructEnd();
5261
    }
5262
 
5263
    @Override
5264
    public String toString() {
553 chandransh 5265
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 5266
      boolean first = true;
5267
 
5268
      sb.append("success:");
5269
      if (this.success == null) {
5270
        sb.append("null");
5271
      } else {
5272
        sb.append(this.success);
5273
      }
5274
      first = false;
5275
      if (!first) sb.append(", ");
553 chandransh 5276
      sb.append("ucex:");
5277
      if (this.ucex == null) {
48 ashish 5278
        sb.append("null");
5279
      } else {
553 chandransh 5280
        sb.append(this.ucex);
48 ashish 5281
      }
5282
      first = false;
5283
      sb.append(")");
5284
      return sb.toString();
5285
    }
5286
 
5287
    public void validate() throws TException {
5288
      // check for required fields
5289
    }
5290
 
5291
  }
5292
 
571 rajveer 5293
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 5294
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 5295
 
553 chandransh 5296
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5297
 
553 chandransh 5298
    private User user;
48 ashish 5299
 
5300
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5301
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5302
      USER((short)1, "user");
48 ashish 5303
 
5304
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5305
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5306
 
5307
      static {
5308
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5309
          byId.put((int)field._thriftId, field);
5310
          byName.put(field.getFieldName(), field);
5311
        }
5312
      }
5313
 
5314
      /**
5315
       * Find the _Fields constant that matches fieldId, or null if its not found.
5316
       */
5317
      public static _Fields findByThriftId(int fieldId) {
5318
        return byId.get(fieldId);
5319
      }
5320
 
5321
      /**
5322
       * Find the _Fields constant that matches fieldId, throwing an exception
5323
       * if it is not found.
5324
       */
5325
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5326
        _Fields fields = findByThriftId(fieldId);
5327
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5328
        return fields;
5329
      }
5330
 
5331
      /**
5332
       * Find the _Fields constant that matches name, or null if its not found.
5333
       */
5334
      public static _Fields findByName(String name) {
5335
        return byName.get(name);
5336
      }
5337
 
5338
      private final short _thriftId;
5339
      private final String _fieldName;
5340
 
5341
      _Fields(short thriftId, String fieldName) {
5342
        _thriftId = thriftId;
5343
        _fieldName = fieldName;
5344
      }
5345
 
5346
      public short getThriftFieldId() {
5347
        return _thriftId;
5348
      }
5349
 
5350
      public String getFieldName() {
5351
        return _fieldName;
5352
      }
5353
    }
5354
 
5355
    // isset id assignments
5356
 
5357
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5358
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5359
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5360
    }});
5361
 
5362
    static {
553 chandransh 5363
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 5364
    }
5365
 
553 chandransh 5366
    public updateUser_args() {
48 ashish 5367
    }
5368
 
553 chandransh 5369
    public updateUser_args(
5370
      User user)
48 ashish 5371
    {
5372
      this();
553 chandransh 5373
      this.user = user;
48 ashish 5374
    }
5375
 
5376
    /**
5377
     * Performs a deep copy on <i>other</i>.
5378
     */
553 chandransh 5379
    public updateUser_args(updateUser_args other) {
5380
      if (other.isSetUser()) {
5381
        this.user = new User(other.user);
5382
      }
48 ashish 5383
    }
5384
 
553 chandransh 5385
    public updateUser_args deepCopy() {
5386
      return new updateUser_args(this);
48 ashish 5387
    }
5388
 
5389
    @Deprecated
553 chandransh 5390
    public updateUser_args clone() {
5391
      return new updateUser_args(this);
48 ashish 5392
    }
5393
 
553 chandransh 5394
    public User getUser() {
5395
      return this.user;
48 ashish 5396
    }
5397
 
553 chandransh 5398
    public updateUser_args setUser(User user) {
5399
      this.user = user;
48 ashish 5400
      return this;
5401
    }
5402
 
553 chandransh 5403
    public void unsetUser() {
5404
      this.user = null;
48 ashish 5405
    }
5406
 
553 chandransh 5407
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5408
    public boolean isSetUser() {
5409
      return this.user != null;
48 ashish 5410
    }
5411
 
553 chandransh 5412
    public void setUserIsSet(boolean value) {
5413
      if (!value) {
5414
        this.user = null;
5415
      }
48 ashish 5416
    }
5417
 
5418
    public void setFieldValue(_Fields field, Object value) {
5419
      switch (field) {
553 chandransh 5420
      case USER:
48 ashish 5421
        if (value == null) {
553 chandransh 5422
          unsetUser();
48 ashish 5423
        } else {
553 chandransh 5424
          setUser((User)value);
48 ashish 5425
        }
5426
        break;
5427
 
5428
      }
5429
    }
5430
 
5431
    public void setFieldValue(int fieldID, Object value) {
5432
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5433
    }
5434
 
5435
    public Object getFieldValue(_Fields field) {
5436
      switch (field) {
553 chandransh 5437
      case USER:
5438
        return getUser();
48 ashish 5439
 
5440
      }
5441
      throw new IllegalStateException();
5442
    }
5443
 
5444
    public Object getFieldValue(int fieldId) {
5445
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5446
    }
5447
 
5448
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5449
    public boolean isSet(_Fields field) {
5450
      switch (field) {
553 chandransh 5451
      case USER:
5452
        return isSetUser();
48 ashish 5453
      }
5454
      throw new IllegalStateException();
5455
    }
5456
 
5457
    public boolean isSet(int fieldID) {
5458
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5459
    }
5460
 
5461
    @Override
5462
    public boolean equals(Object that) {
5463
      if (that == null)
5464
        return false;
553 chandransh 5465
      if (that instanceof updateUser_args)
5466
        return this.equals((updateUser_args)that);
48 ashish 5467
      return false;
5468
    }
5469
 
553 chandransh 5470
    public boolean equals(updateUser_args that) {
48 ashish 5471
      if (that == null)
5472
        return false;
5473
 
553 chandransh 5474
      boolean this_present_user = true && this.isSetUser();
5475
      boolean that_present_user = true && that.isSetUser();
5476
      if (this_present_user || that_present_user) {
5477
        if (!(this_present_user && that_present_user))
48 ashish 5478
          return false;
553 chandransh 5479
        if (!this.user.equals(that.user))
48 ashish 5480
          return false;
5481
      }
5482
 
5483
      return true;
5484
    }
5485
 
5486
    @Override
5487
    public int hashCode() {
5488
      return 0;
5489
    }
5490
 
571 rajveer 5491
    public int compareTo(updateUser_args other) {
5492
      if (!getClass().equals(other.getClass())) {
5493
        return getClass().getName().compareTo(other.getClass().getName());
5494
      }
5495
 
5496
      int lastComparison = 0;
5497
      updateUser_args typedOther = (updateUser_args)other;
5498
 
5499
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5500
      if (lastComparison != 0) {
5501
        return lastComparison;
5502
      }
5503
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5504
      if (lastComparison != 0) {
5505
        return lastComparison;
5506
      }
5507
      return 0;
5508
    }
5509
 
48 ashish 5510
    public void read(TProtocol iprot) throws TException {
5511
      TField field;
5512
      iprot.readStructBegin();
5513
      while (true)
5514
      {
5515
        field = iprot.readFieldBegin();
5516
        if (field.type == TType.STOP) { 
5517
          break;
5518
        }
5519
        _Fields fieldId = _Fields.findByThriftId(field.id);
5520
        if (fieldId == null) {
5521
          TProtocolUtil.skip(iprot, field.type);
5522
        } else {
5523
          switch (fieldId) {
553 chandransh 5524
            case USER:
5525
              if (field.type == TType.STRUCT) {
5526
                this.user = new User();
5527
                this.user.read(iprot);
48 ashish 5528
              } else { 
5529
                TProtocolUtil.skip(iprot, field.type);
5530
              }
5531
              break;
5532
          }
5533
          iprot.readFieldEnd();
5534
        }
5535
      }
5536
      iprot.readStructEnd();
5537
      validate();
5538
    }
5539
 
5540
    public void write(TProtocol oprot) throws TException {
5541
      validate();
5542
 
5543
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5544
      if (this.user != null) {
5545
        oprot.writeFieldBegin(USER_FIELD_DESC);
5546
        this.user.write(oprot);
5547
        oprot.writeFieldEnd();
5548
      }
48 ashish 5549
      oprot.writeFieldStop();
5550
      oprot.writeStructEnd();
5551
    }
5552
 
5553
    @Override
5554
    public String toString() {
553 chandransh 5555
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5556
      boolean first = true;
5557
 
553 chandransh 5558
      sb.append("user:");
5559
      if (this.user == null) {
5560
        sb.append("null");
5561
      } else {
5562
        sb.append(this.user);
5563
      }
48 ashish 5564
      first = false;
5565
      sb.append(")");
5566
      return sb.toString();
5567
    }
5568
 
5569
    public void validate() throws TException {
5570
      // check for required fields
5571
    }
5572
 
5573
  }
5574
 
571 rajveer 5575
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5576
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5577
 
5578
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5579
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5580
 
553 chandransh 5581
    private User success;
5582
    private UserContextException ucex;
48 ashish 5583
 
5584
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5585
    public enum _Fields implements TFieldIdEnum {
5586
      SUCCESS((short)0, "success"),
553 chandransh 5587
      UCEX((short)1, "ucex");
48 ashish 5588
 
5589
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5590
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5591
 
5592
      static {
5593
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5594
          byId.put((int)field._thriftId, field);
5595
          byName.put(field.getFieldName(), field);
5596
        }
5597
      }
5598
 
5599
      /**
5600
       * Find the _Fields constant that matches fieldId, or null if its not found.
5601
       */
5602
      public static _Fields findByThriftId(int fieldId) {
5603
        return byId.get(fieldId);
5604
      }
5605
 
5606
      /**
5607
       * Find the _Fields constant that matches fieldId, throwing an exception
5608
       * if it is not found.
5609
       */
5610
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5611
        _Fields fields = findByThriftId(fieldId);
5612
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5613
        return fields;
5614
      }
5615
 
5616
      /**
5617
       * Find the _Fields constant that matches name, or null if its not found.
5618
       */
5619
      public static _Fields findByName(String name) {
5620
        return byName.get(name);
5621
      }
5622
 
5623
      private final short _thriftId;
5624
      private final String _fieldName;
5625
 
5626
      _Fields(short thriftId, String fieldName) {
5627
        _thriftId = thriftId;
5628
        _fieldName = fieldName;
5629
      }
5630
 
5631
      public short getThriftFieldId() {
5632
        return _thriftId;
5633
      }
5634
 
5635
      public String getFieldName() {
5636
        return _fieldName;
5637
      }
5638
    }
5639
 
5640
    // isset id assignments
5641
 
5642
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5643
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5644
          new StructMetaData(TType.STRUCT, User.class)));
5645
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5646
          new FieldValueMetaData(TType.STRUCT)));
5647
    }});
5648
 
5649
    static {
553 chandransh 5650
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5651
    }
5652
 
553 chandransh 5653
    public updateUser_result() {
48 ashish 5654
    }
5655
 
553 chandransh 5656
    public updateUser_result(
5657
      User success,
5658
      UserContextException ucex)
48 ashish 5659
    {
5660
      this();
5661
      this.success = success;
553 chandransh 5662
      this.ucex = ucex;
48 ashish 5663
    }
5664
 
5665
    /**
5666
     * Performs a deep copy on <i>other</i>.
5667
     */
553 chandransh 5668
    public updateUser_result(updateUser_result other) {
48 ashish 5669
      if (other.isSetSuccess()) {
553 chandransh 5670
        this.success = new User(other.success);
48 ashish 5671
      }
553 chandransh 5672
      if (other.isSetUcex()) {
5673
        this.ucex = new UserContextException(other.ucex);
48 ashish 5674
      }
5675
    }
5676
 
553 chandransh 5677
    public updateUser_result deepCopy() {
5678
      return new updateUser_result(this);
48 ashish 5679
    }
5680
 
5681
    @Deprecated
553 chandransh 5682
    public updateUser_result clone() {
5683
      return new updateUser_result(this);
48 ashish 5684
    }
5685
 
553 chandransh 5686
    public User getSuccess() {
48 ashish 5687
      return this.success;
5688
    }
5689
 
553 chandransh 5690
    public updateUser_result setSuccess(User success) {
48 ashish 5691
      this.success = success;
5692
      return this;
5693
    }
5694
 
5695
    public void unsetSuccess() {
5696
      this.success = null;
5697
    }
5698
 
5699
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5700
    public boolean isSetSuccess() {
5701
      return this.success != null;
5702
    }
5703
 
5704
    public void setSuccessIsSet(boolean value) {
5705
      if (!value) {
5706
        this.success = null;
5707
      }
5708
    }
5709
 
553 chandransh 5710
    public UserContextException getUcex() {
5711
      return this.ucex;
48 ashish 5712
    }
5713
 
553 chandransh 5714
    public updateUser_result setUcex(UserContextException ucex) {
5715
      this.ucex = ucex;
48 ashish 5716
      return this;
5717
    }
5718
 
553 chandransh 5719
    public void unsetUcex() {
5720
      this.ucex = null;
48 ashish 5721
    }
5722
 
553 chandransh 5723
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5724
    public boolean isSetUcex() {
5725
      return this.ucex != null;
48 ashish 5726
    }
5727
 
553 chandransh 5728
    public void setUcexIsSet(boolean value) {
48 ashish 5729
      if (!value) {
553 chandransh 5730
        this.ucex = null;
48 ashish 5731
      }
5732
    }
5733
 
5734
    public void setFieldValue(_Fields field, Object value) {
5735
      switch (field) {
5736
      case SUCCESS:
5737
        if (value == null) {
5738
          unsetSuccess();
5739
        } else {
553 chandransh 5740
          setSuccess((User)value);
48 ashish 5741
        }
5742
        break;
5743
 
553 chandransh 5744
      case UCEX:
48 ashish 5745
        if (value == null) {
553 chandransh 5746
          unsetUcex();
48 ashish 5747
        } else {
553 chandransh 5748
          setUcex((UserContextException)value);
48 ashish 5749
        }
5750
        break;
5751
 
5752
      }
5753
    }
5754
 
5755
    public void setFieldValue(int fieldID, Object value) {
5756
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5757
    }
5758
 
5759
    public Object getFieldValue(_Fields field) {
5760
      switch (field) {
5761
      case SUCCESS:
5762
        return getSuccess();
5763
 
553 chandransh 5764
      case UCEX:
5765
        return getUcex();
48 ashish 5766
 
5767
      }
5768
      throw new IllegalStateException();
5769
    }
5770
 
5771
    public Object getFieldValue(int fieldId) {
5772
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5773
    }
5774
 
5775
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5776
    public boolean isSet(_Fields field) {
5777
      switch (field) {
5778
      case SUCCESS:
5779
        return isSetSuccess();
553 chandransh 5780
      case UCEX:
5781
        return isSetUcex();
48 ashish 5782
      }
5783
      throw new IllegalStateException();
5784
    }
5785
 
5786
    public boolean isSet(int fieldID) {
5787
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5788
    }
5789
 
5790
    @Override
5791
    public boolean equals(Object that) {
5792
      if (that == null)
5793
        return false;
553 chandransh 5794
      if (that instanceof updateUser_result)
5795
        return this.equals((updateUser_result)that);
48 ashish 5796
      return false;
5797
    }
5798
 
553 chandransh 5799
    public boolean equals(updateUser_result that) {
48 ashish 5800
      if (that == null)
5801
        return false;
5802
 
5803
      boolean this_present_success = true && this.isSetSuccess();
5804
      boolean that_present_success = true && that.isSetSuccess();
5805
      if (this_present_success || that_present_success) {
5806
        if (!(this_present_success && that_present_success))
5807
          return false;
5808
        if (!this.success.equals(that.success))
5809
          return false;
5810
      }
5811
 
553 chandransh 5812
      boolean this_present_ucex = true && this.isSetUcex();
5813
      boolean that_present_ucex = true && that.isSetUcex();
5814
      if (this_present_ucex || that_present_ucex) {
5815
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5816
          return false;
553 chandransh 5817
        if (!this.ucex.equals(that.ucex))
48 ashish 5818
          return false;
5819
      }
5820
 
5821
      return true;
5822
    }
5823
 
5824
    @Override
5825
    public int hashCode() {
5826
      return 0;
5827
    }
5828
 
571 rajveer 5829
    public int compareTo(updateUser_result other) {
5830
      if (!getClass().equals(other.getClass())) {
5831
        return getClass().getName().compareTo(other.getClass().getName());
5832
      }
5833
 
5834
      int lastComparison = 0;
5835
      updateUser_result typedOther = (updateUser_result)other;
5836
 
5837
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5838
      if (lastComparison != 0) {
5839
        return lastComparison;
5840
      }
5841
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5842
      if (lastComparison != 0) {
5843
        return lastComparison;
5844
      }
5845
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5846
      if (lastComparison != 0) {
5847
        return lastComparison;
5848
      }
5849
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5850
      if (lastComparison != 0) {
5851
        return lastComparison;
5852
      }
5853
      return 0;
5854
    }
5855
 
48 ashish 5856
    public void read(TProtocol iprot) throws TException {
5857
      TField field;
5858
      iprot.readStructBegin();
5859
      while (true)
5860
      {
5861
        field = iprot.readFieldBegin();
5862
        if (field.type == TType.STOP) { 
5863
          break;
5864
        }
5865
        _Fields fieldId = _Fields.findByThriftId(field.id);
5866
        if (fieldId == null) {
5867
          TProtocolUtil.skip(iprot, field.type);
5868
        } else {
5869
          switch (fieldId) {
5870
            case SUCCESS:
5871
              if (field.type == TType.STRUCT) {
553 chandransh 5872
                this.success = new User();
48 ashish 5873
                this.success.read(iprot);
5874
              } else { 
5875
                TProtocolUtil.skip(iprot, field.type);
5876
              }
5877
              break;
553 chandransh 5878
            case UCEX:
48 ashish 5879
              if (field.type == TType.STRUCT) {
553 chandransh 5880
                this.ucex = new UserContextException();
5881
                this.ucex.read(iprot);
48 ashish 5882
              } else { 
5883
                TProtocolUtil.skip(iprot, field.type);
5884
              }
5885
              break;
5886
          }
5887
          iprot.readFieldEnd();
5888
        }
5889
      }
5890
      iprot.readStructEnd();
5891
      validate();
5892
    }
5893
 
5894
    public void write(TProtocol oprot) throws TException {
5895
      oprot.writeStructBegin(STRUCT_DESC);
5896
 
5897
      if (this.isSetSuccess()) {
5898
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5899
        this.success.write(oprot);
5900
        oprot.writeFieldEnd();
553 chandransh 5901
      } else if (this.isSetUcex()) {
5902
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5903
        this.ucex.write(oprot);
48 ashish 5904
        oprot.writeFieldEnd();
5905
      }
5906
      oprot.writeFieldStop();
5907
      oprot.writeStructEnd();
5908
    }
5909
 
5910
    @Override
5911
    public String toString() {
553 chandransh 5912
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5913
      boolean first = true;
5914
 
5915
      sb.append("success:");
5916
      if (this.success == null) {
5917
        sb.append("null");
5918
      } else {
5919
        sb.append(this.success);
5920
      }
5921
      first = false;
5922
      if (!first) sb.append(", ");
553 chandransh 5923
      sb.append("ucex:");
5924
      if (this.ucex == null) {
48 ashish 5925
        sb.append("null");
5926
      } else {
553 chandransh 5927
        sb.append(this.ucex);
48 ashish 5928
      }
5929
      first = false;
5930
      sb.append(")");
5931
      return sb.toString();
5932
    }
5933
 
5934
    public void validate() throws TException {
5935
      // check for required fields
5936
    }
5937
 
5938
  }
5939
 
553 chandransh 5940
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5941
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5942
 
5943
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5944
 
5945
    private long userId;
5946
 
5947
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5948
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5949
      USER_ID((short)1, "userId");
48 ashish 5950
 
5951
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5952
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5953
 
5954
      static {
5955
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5956
          byId.put((int)field._thriftId, field);
5957
          byName.put(field.getFieldName(), field);
5958
        }
5959
      }
5960
 
5961
      /**
5962
       * Find the _Fields constant that matches fieldId, or null if its not found.
5963
       */
5964
      public static _Fields findByThriftId(int fieldId) {
5965
        return byId.get(fieldId);
5966
      }
5967
 
5968
      /**
5969
       * Find the _Fields constant that matches fieldId, throwing an exception
5970
       * if it is not found.
5971
       */
5972
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5973
        _Fields fields = findByThriftId(fieldId);
5974
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5975
        return fields;
5976
      }
5977
 
5978
      /**
5979
       * Find the _Fields constant that matches name, or null if its not found.
5980
       */
5981
      public static _Fields findByName(String name) {
5982
        return byName.get(name);
5983
      }
5984
 
5985
      private final short _thriftId;
5986
      private final String _fieldName;
5987
 
5988
      _Fields(short thriftId, String fieldName) {
5989
        _thriftId = thriftId;
5990
        _fieldName = fieldName;
5991
      }
5992
 
5993
      public short getThriftFieldId() {
5994
        return _thriftId;
5995
      }
5996
 
5997
      public String getFieldName() {
5998
        return _fieldName;
5999
      }
6000
    }
6001
 
6002
    // isset id assignments
6003
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6004
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6005
 
6006
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6007
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6008
          new FieldValueMetaData(TType.I64)));
6009
    }});
6010
 
6011
    static {
553 chandransh 6012
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 6013
    }
6014
 
553 chandransh 6015
    public deleteUser_args() {
48 ashish 6016
    }
6017
 
553 chandransh 6018
    public deleteUser_args(
6019
      long userId)
48 ashish 6020
    {
6021
      this();
6022
      this.userId = userId;
6023
      setUserIdIsSet(true);
6024
    }
6025
 
6026
    /**
6027
     * Performs a deep copy on <i>other</i>.
6028
     */
553 chandransh 6029
    public deleteUser_args(deleteUser_args other) {
48 ashish 6030
      __isset_bit_vector.clear();
6031
      __isset_bit_vector.or(other.__isset_bit_vector);
6032
      this.userId = other.userId;
6033
    }
6034
 
553 chandransh 6035
    public deleteUser_args deepCopy() {
6036
      return new deleteUser_args(this);
48 ashish 6037
    }
6038
 
6039
    @Deprecated
553 chandransh 6040
    public deleteUser_args clone() {
6041
      return new deleteUser_args(this);
48 ashish 6042
    }
6043
 
6044
    public long getUserId() {
6045
      return this.userId;
6046
    }
6047
 
553 chandransh 6048
    public deleteUser_args setUserId(long userId) {
48 ashish 6049
      this.userId = userId;
6050
      setUserIdIsSet(true);
6051
      return this;
6052
    }
6053
 
6054
    public void unsetUserId() {
6055
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6056
    }
6057
 
6058
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6059
    public boolean isSetUserId() {
6060
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6061
    }
6062
 
6063
    public void setUserIdIsSet(boolean value) {
6064
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6065
    }
6066
 
6067
    public void setFieldValue(_Fields field, Object value) {
6068
      switch (field) {
6069
      case USER_ID:
6070
        if (value == null) {
6071
          unsetUserId();
6072
        } else {
6073
          setUserId((Long)value);
6074
        }
6075
        break;
6076
 
6077
      }
6078
    }
6079
 
6080
    public void setFieldValue(int fieldID, Object value) {
6081
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6082
    }
6083
 
6084
    public Object getFieldValue(_Fields field) {
6085
      switch (field) {
6086
      case USER_ID:
6087
        return new Long(getUserId());
6088
 
6089
      }
6090
      throw new IllegalStateException();
6091
    }
6092
 
6093
    public Object getFieldValue(int fieldId) {
6094
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6095
    }
6096
 
6097
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6098
    public boolean isSet(_Fields field) {
6099
      switch (field) {
6100
      case USER_ID:
6101
        return isSetUserId();
6102
      }
6103
      throw new IllegalStateException();
6104
    }
6105
 
6106
    public boolean isSet(int fieldID) {
6107
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6108
    }
6109
 
6110
    @Override
6111
    public boolean equals(Object that) {
6112
      if (that == null)
6113
        return false;
553 chandransh 6114
      if (that instanceof deleteUser_args)
6115
        return this.equals((deleteUser_args)that);
48 ashish 6116
      return false;
6117
    }
6118
 
553 chandransh 6119
    public boolean equals(deleteUser_args that) {
48 ashish 6120
      if (that == null)
6121
        return false;
6122
 
6123
      boolean this_present_userId = true;
6124
      boolean that_present_userId = true;
6125
      if (this_present_userId || that_present_userId) {
6126
        if (!(this_present_userId && that_present_userId))
6127
          return false;
6128
        if (this.userId != that.userId)
6129
          return false;
6130
      }
6131
 
6132
      return true;
6133
    }
6134
 
6135
    @Override
6136
    public int hashCode() {
6137
      return 0;
6138
    }
6139
 
553 chandransh 6140
    public int compareTo(deleteUser_args other) {
48 ashish 6141
      if (!getClass().equals(other.getClass())) {
6142
        return getClass().getName().compareTo(other.getClass().getName());
6143
      }
6144
 
6145
      int lastComparison = 0;
553 chandransh 6146
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 6147
 
6148
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6149
      if (lastComparison != 0) {
6150
        return lastComparison;
6151
      }
6152
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6153
      if (lastComparison != 0) {
6154
        return lastComparison;
6155
      }
6156
      return 0;
6157
    }
6158
 
6159
    public void read(TProtocol iprot) throws TException {
6160
      TField field;
6161
      iprot.readStructBegin();
6162
      while (true)
6163
      {
6164
        field = iprot.readFieldBegin();
6165
        if (field.type == TType.STOP) { 
6166
          break;
6167
        }
6168
        _Fields fieldId = _Fields.findByThriftId(field.id);
6169
        if (fieldId == null) {
6170
          TProtocolUtil.skip(iprot, field.type);
6171
        } else {
6172
          switch (fieldId) {
6173
            case USER_ID:
6174
              if (field.type == TType.I64) {
6175
                this.userId = iprot.readI64();
6176
                setUserIdIsSet(true);
6177
              } else { 
6178
                TProtocolUtil.skip(iprot, field.type);
6179
              }
6180
              break;
6181
          }
6182
          iprot.readFieldEnd();
6183
        }
6184
      }
6185
      iprot.readStructEnd();
6186
      validate();
6187
    }
6188
 
6189
    public void write(TProtocol oprot) throws TException {
6190
      validate();
6191
 
6192
      oprot.writeStructBegin(STRUCT_DESC);
6193
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6194
      oprot.writeI64(this.userId);
6195
      oprot.writeFieldEnd();
6196
      oprot.writeFieldStop();
6197
      oprot.writeStructEnd();
6198
    }
6199
 
6200
    @Override
6201
    public String toString() {
553 chandransh 6202
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 6203
      boolean first = true;
6204
 
6205
      sb.append("userId:");
6206
      sb.append(this.userId);
6207
      first = false;
6208
      sb.append(")");
6209
      return sb.toString();
6210
    }
6211
 
6212
    public void validate() throws TException {
6213
      // check for required fields
6214
    }
6215
 
6216
  }
6217
 
553 chandransh 6218
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
6219
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 6220
 
553 chandransh 6221
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6222
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6223
 
553 chandransh 6224
    private boolean success;
6225
    private UserContextException ucex;
48 ashish 6226
 
6227
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6228
    public enum _Fields implements TFieldIdEnum {
6229
      SUCCESS((short)0, "success"),
553 chandransh 6230
      UCEX((short)1, "ucex");
48 ashish 6231
 
6232
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6233
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6234
 
6235
      static {
6236
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6237
          byId.put((int)field._thriftId, field);
6238
          byName.put(field.getFieldName(), field);
6239
        }
6240
      }
6241
 
6242
      /**
6243
       * Find the _Fields constant that matches fieldId, or null if its not found.
6244
       */
6245
      public static _Fields findByThriftId(int fieldId) {
6246
        return byId.get(fieldId);
6247
      }
6248
 
6249
      /**
6250
       * Find the _Fields constant that matches fieldId, throwing an exception
6251
       * if it is not found.
6252
       */
6253
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6254
        _Fields fields = findByThriftId(fieldId);
6255
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6256
        return fields;
6257
      }
6258
 
6259
      /**
6260
       * Find the _Fields constant that matches name, or null if its not found.
6261
       */
6262
      public static _Fields findByName(String name) {
6263
        return byName.get(name);
6264
      }
6265
 
6266
      private final short _thriftId;
6267
      private final String _fieldName;
6268
 
6269
      _Fields(short thriftId, String fieldName) {
6270
        _thriftId = thriftId;
6271
        _fieldName = fieldName;
6272
      }
6273
 
6274
      public short getThriftFieldId() {
6275
        return _thriftId;
6276
      }
6277
 
6278
      public String getFieldName() {
6279
        return _fieldName;
6280
      }
6281
    }
6282
 
6283
    // isset id assignments
553 chandransh 6284
    private static final int __SUCCESS_ISSET_ID = 0;
6285
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6286
 
6287
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6288
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6289
          new FieldValueMetaData(TType.BOOL)));
6290
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6291
          new FieldValueMetaData(TType.STRUCT)));
6292
    }});
6293
 
6294
    static {
553 chandransh 6295
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 6296
    }
6297
 
553 chandransh 6298
    public deleteUser_result() {
48 ashish 6299
    }
6300
 
553 chandransh 6301
    public deleteUser_result(
6302
      boolean success,
6303
      UserContextException ucex)
48 ashish 6304
    {
6305
      this();
6306
      this.success = success;
553 chandransh 6307
      setSuccessIsSet(true);
6308
      this.ucex = ucex;
48 ashish 6309
    }
6310
 
6311
    /**
6312
     * Performs a deep copy on <i>other</i>.
6313
     */
553 chandransh 6314
    public deleteUser_result(deleteUser_result other) {
6315
      __isset_bit_vector.clear();
6316
      __isset_bit_vector.or(other.__isset_bit_vector);
6317
      this.success = other.success;
6318
      if (other.isSetUcex()) {
6319
        this.ucex = new UserContextException(other.ucex);
48 ashish 6320
      }
6321
    }
6322
 
553 chandransh 6323
    public deleteUser_result deepCopy() {
6324
      return new deleteUser_result(this);
48 ashish 6325
    }
6326
 
6327
    @Deprecated
553 chandransh 6328
    public deleteUser_result clone() {
6329
      return new deleteUser_result(this);
48 ashish 6330
    }
6331
 
553 chandransh 6332
    public boolean isSuccess() {
48 ashish 6333
      return this.success;
6334
    }
6335
 
553 chandransh 6336
    public deleteUser_result setSuccess(boolean success) {
48 ashish 6337
      this.success = success;
553 chandransh 6338
      setSuccessIsSet(true);
48 ashish 6339
      return this;
6340
    }
6341
 
6342
    public void unsetSuccess() {
553 chandransh 6343
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 6344
    }
6345
 
6346
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6347
    public boolean isSetSuccess() {
553 chandransh 6348
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 6349
    }
6350
 
6351
    public void setSuccessIsSet(boolean value) {
553 chandransh 6352
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 6353
    }
6354
 
553 chandransh 6355
    public UserContextException getUcex() {
6356
      return this.ucex;
48 ashish 6357
    }
6358
 
553 chandransh 6359
    public deleteUser_result setUcex(UserContextException ucex) {
6360
      this.ucex = ucex;
48 ashish 6361
      return this;
6362
    }
6363
 
553 chandransh 6364
    public void unsetUcex() {
6365
      this.ucex = null;
48 ashish 6366
    }
6367
 
553 chandransh 6368
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6369
    public boolean isSetUcex() {
6370
      return this.ucex != null;
48 ashish 6371
    }
6372
 
553 chandransh 6373
    public void setUcexIsSet(boolean value) {
48 ashish 6374
      if (!value) {
553 chandransh 6375
        this.ucex = null;
48 ashish 6376
      }
6377
    }
6378
 
6379
    public void setFieldValue(_Fields field, Object value) {
6380
      switch (field) {
6381
      case SUCCESS:
6382
        if (value == null) {
6383
          unsetSuccess();
6384
        } else {
553 chandransh 6385
          setSuccess((Boolean)value);
48 ashish 6386
        }
6387
        break;
6388
 
553 chandransh 6389
      case UCEX:
48 ashish 6390
        if (value == null) {
553 chandransh 6391
          unsetUcex();
48 ashish 6392
        } else {
553 chandransh 6393
          setUcex((UserContextException)value);
48 ashish 6394
        }
6395
        break;
6396
 
6397
      }
6398
    }
6399
 
6400
    public void setFieldValue(int fieldID, Object value) {
6401
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6402
    }
6403
 
6404
    public Object getFieldValue(_Fields field) {
6405
      switch (field) {
6406
      case SUCCESS:
553 chandransh 6407
        return new Boolean(isSuccess());
48 ashish 6408
 
553 chandransh 6409
      case UCEX:
6410
        return getUcex();
48 ashish 6411
 
6412
      }
6413
      throw new IllegalStateException();
6414
    }
6415
 
6416
    public Object getFieldValue(int fieldId) {
6417
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6418
    }
6419
 
6420
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6421
    public boolean isSet(_Fields field) {
6422
      switch (field) {
6423
      case SUCCESS:
6424
        return isSetSuccess();
553 chandransh 6425
      case UCEX:
6426
        return isSetUcex();
48 ashish 6427
      }
6428
      throw new IllegalStateException();
6429
    }
6430
 
6431
    public boolean isSet(int fieldID) {
6432
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6433
    }
6434
 
6435
    @Override
6436
    public boolean equals(Object that) {
6437
      if (that == null)
6438
        return false;
553 chandransh 6439
      if (that instanceof deleteUser_result)
6440
        return this.equals((deleteUser_result)that);
48 ashish 6441
      return false;
6442
    }
6443
 
553 chandransh 6444
    public boolean equals(deleteUser_result that) {
48 ashish 6445
      if (that == null)
6446
        return false;
6447
 
553 chandransh 6448
      boolean this_present_success = true;
6449
      boolean that_present_success = true;
48 ashish 6450
      if (this_present_success || that_present_success) {
6451
        if (!(this_present_success && that_present_success))
6452
          return false;
553 chandransh 6453
        if (this.success != that.success)
48 ashish 6454
          return false;
6455
      }
6456
 
553 chandransh 6457
      boolean this_present_ucex = true && this.isSetUcex();
6458
      boolean that_present_ucex = true && that.isSetUcex();
6459
      if (this_present_ucex || that_present_ucex) {
6460
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6461
          return false;
553 chandransh 6462
        if (!this.ucex.equals(that.ucex))
48 ashish 6463
          return false;
6464
      }
6465
 
6466
      return true;
6467
    }
6468
 
6469
    @Override
6470
    public int hashCode() {
6471
      return 0;
6472
    }
6473
 
553 chandransh 6474
    public int compareTo(deleteUser_result other) {
6475
      if (!getClass().equals(other.getClass())) {
6476
        return getClass().getName().compareTo(other.getClass().getName());
6477
      }
6478
 
6479
      int lastComparison = 0;
6480
      deleteUser_result typedOther = (deleteUser_result)other;
6481
 
6482
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6483
      if (lastComparison != 0) {
6484
        return lastComparison;
6485
      }
6486
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6487
      if (lastComparison != 0) {
6488
        return lastComparison;
6489
      }
6490
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6491
      if (lastComparison != 0) {
6492
        return lastComparison;
6493
      }
6494
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6495
      if (lastComparison != 0) {
6496
        return lastComparison;
6497
      }
6498
      return 0;
6499
    }
6500
 
48 ashish 6501
    public void read(TProtocol iprot) throws TException {
6502
      TField field;
6503
      iprot.readStructBegin();
6504
      while (true)
6505
      {
6506
        field = iprot.readFieldBegin();
6507
        if (field.type == TType.STOP) { 
6508
          break;
6509
        }
6510
        _Fields fieldId = _Fields.findByThriftId(field.id);
6511
        if (fieldId == null) {
6512
          TProtocolUtil.skip(iprot, field.type);
6513
        } else {
6514
          switch (fieldId) {
6515
            case SUCCESS:
553 chandransh 6516
              if (field.type == TType.BOOL) {
6517
                this.success = iprot.readBool();
6518
                setSuccessIsSet(true);
48 ashish 6519
              } else { 
6520
                TProtocolUtil.skip(iprot, field.type);
6521
              }
6522
              break;
553 chandransh 6523
            case UCEX:
48 ashish 6524
              if (field.type == TType.STRUCT) {
553 chandransh 6525
                this.ucex = new UserContextException();
6526
                this.ucex.read(iprot);
48 ashish 6527
              } else { 
6528
                TProtocolUtil.skip(iprot, field.type);
6529
              }
6530
              break;
6531
          }
6532
          iprot.readFieldEnd();
6533
        }
6534
      }
6535
      iprot.readStructEnd();
6536
      validate();
6537
    }
6538
 
6539
    public void write(TProtocol oprot) throws TException {
6540
      oprot.writeStructBegin(STRUCT_DESC);
6541
 
6542
      if (this.isSetSuccess()) {
6543
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6544
        oprot.writeBool(this.success);
48 ashish 6545
        oprot.writeFieldEnd();
553 chandransh 6546
      } else if (this.isSetUcex()) {
6547
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6548
        this.ucex.write(oprot);
48 ashish 6549
        oprot.writeFieldEnd();
6550
      }
6551
      oprot.writeFieldStop();
6552
      oprot.writeStructEnd();
6553
    }
6554
 
6555
    @Override
6556
    public String toString() {
553 chandransh 6557
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6558
      boolean first = true;
6559
 
6560
      sb.append("success:");
553 chandransh 6561
      sb.append(this.success);
48 ashish 6562
      first = false;
6563
      if (!first) sb.append(", ");
553 chandransh 6564
      sb.append("ucex:");
6565
      if (this.ucex == null) {
48 ashish 6566
        sb.append("null");
6567
      } else {
553 chandransh 6568
        sb.append(this.ucex);
48 ashish 6569
      }
6570
      first = false;
6571
      sb.append(")");
6572
      return sb.toString();
6573
    }
6574
 
6575
    public void validate() throws TException {
6576
      // check for required fields
6577
    }
6578
 
6579
  }
6580
 
553 chandransh 6581
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6582
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6583
 
6584
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6585
 
6586
    private long userId;
6587
 
6588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6589
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6590
      USER_ID((short)1, "userId");
48 ashish 6591
 
6592
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6593
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6594
 
6595
      static {
6596
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6597
          byId.put((int)field._thriftId, field);
6598
          byName.put(field.getFieldName(), field);
6599
        }
6600
      }
6601
 
6602
      /**
6603
       * Find the _Fields constant that matches fieldId, or null if its not found.
6604
       */
6605
      public static _Fields findByThriftId(int fieldId) {
6606
        return byId.get(fieldId);
6607
      }
6608
 
6609
      /**
6610
       * Find the _Fields constant that matches fieldId, throwing an exception
6611
       * if it is not found.
6612
       */
6613
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6614
        _Fields fields = findByThriftId(fieldId);
6615
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6616
        return fields;
6617
      }
6618
 
6619
      /**
6620
       * Find the _Fields constant that matches name, or null if its not found.
6621
       */
6622
      public static _Fields findByName(String name) {
6623
        return byName.get(name);
6624
      }
6625
 
6626
      private final short _thriftId;
6627
      private final String _fieldName;
6628
 
6629
      _Fields(short thriftId, String fieldName) {
6630
        _thriftId = thriftId;
6631
        _fieldName = fieldName;
6632
      }
6633
 
6634
      public short getThriftFieldId() {
6635
        return _thriftId;
6636
      }
6637
 
6638
      public String getFieldName() {
6639
        return _fieldName;
6640
      }
6641
    }
6642
 
6643
    // isset id assignments
6644
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6645
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6646
 
6647
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6648
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6649
          new FieldValueMetaData(TType.I64)));
6650
    }});
6651
 
6652
    static {
553 chandransh 6653
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6654
    }
6655
 
553 chandransh 6656
    public getUserState_args() {
48 ashish 6657
    }
6658
 
553 chandransh 6659
    public getUserState_args(
6660
      long userId)
48 ashish 6661
    {
6662
      this();
6663
      this.userId = userId;
6664
      setUserIdIsSet(true);
6665
    }
6666
 
6667
    /**
6668
     * Performs a deep copy on <i>other</i>.
6669
     */
553 chandransh 6670
    public getUserState_args(getUserState_args other) {
48 ashish 6671
      __isset_bit_vector.clear();
6672
      __isset_bit_vector.or(other.__isset_bit_vector);
6673
      this.userId = other.userId;
6674
    }
6675
 
553 chandransh 6676
    public getUserState_args deepCopy() {
6677
      return new getUserState_args(this);
48 ashish 6678
    }
6679
 
6680
    @Deprecated
553 chandransh 6681
    public getUserState_args clone() {
6682
      return new getUserState_args(this);
48 ashish 6683
    }
6684
 
6685
    public long getUserId() {
6686
      return this.userId;
6687
    }
6688
 
553 chandransh 6689
    public getUserState_args setUserId(long userId) {
48 ashish 6690
      this.userId = userId;
6691
      setUserIdIsSet(true);
6692
      return this;
6693
    }
6694
 
6695
    public void unsetUserId() {
6696
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6697
    }
6698
 
6699
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6700
    public boolean isSetUserId() {
6701
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6702
    }
6703
 
6704
    public void setUserIdIsSet(boolean value) {
6705
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6706
    }
6707
 
6708
    public void setFieldValue(_Fields field, Object value) {
6709
      switch (field) {
6710
      case USER_ID:
6711
        if (value == null) {
6712
          unsetUserId();
6713
        } else {
6714
          setUserId((Long)value);
6715
        }
6716
        break;
6717
 
6718
      }
6719
    }
6720
 
6721
    public void setFieldValue(int fieldID, Object value) {
6722
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6723
    }
6724
 
6725
    public Object getFieldValue(_Fields field) {
6726
      switch (field) {
6727
      case USER_ID:
6728
        return new Long(getUserId());
6729
 
6730
      }
6731
      throw new IllegalStateException();
6732
    }
6733
 
6734
    public Object getFieldValue(int fieldId) {
6735
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6736
    }
6737
 
6738
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6739
    public boolean isSet(_Fields field) {
6740
      switch (field) {
6741
      case USER_ID:
6742
        return isSetUserId();
6743
      }
6744
      throw new IllegalStateException();
6745
    }
6746
 
6747
    public boolean isSet(int fieldID) {
6748
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6749
    }
6750
 
6751
    @Override
6752
    public boolean equals(Object that) {
6753
      if (that == null)
6754
        return false;
553 chandransh 6755
      if (that instanceof getUserState_args)
6756
        return this.equals((getUserState_args)that);
48 ashish 6757
      return false;
6758
    }
6759
 
553 chandransh 6760
    public boolean equals(getUserState_args that) {
48 ashish 6761
      if (that == null)
6762
        return false;
6763
 
6764
      boolean this_present_userId = true;
6765
      boolean that_present_userId = true;
6766
      if (this_present_userId || that_present_userId) {
6767
        if (!(this_present_userId && that_present_userId))
6768
          return false;
6769
        if (this.userId != that.userId)
6770
          return false;
6771
      }
6772
 
6773
      return true;
6774
    }
6775
 
6776
    @Override
6777
    public int hashCode() {
6778
      return 0;
6779
    }
6780
 
553 chandransh 6781
    public int compareTo(getUserState_args other) {
48 ashish 6782
      if (!getClass().equals(other.getClass())) {
6783
        return getClass().getName().compareTo(other.getClass().getName());
6784
      }
6785
 
6786
      int lastComparison = 0;
553 chandransh 6787
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6788
 
6789
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6790
      if (lastComparison != 0) {
6791
        return lastComparison;
6792
      }
6793
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6794
      if (lastComparison != 0) {
6795
        return lastComparison;
6796
      }
6797
      return 0;
6798
    }
6799
 
6800
    public void read(TProtocol iprot) throws TException {
6801
      TField field;
6802
      iprot.readStructBegin();
6803
      while (true)
6804
      {
6805
        field = iprot.readFieldBegin();
6806
        if (field.type == TType.STOP) { 
6807
          break;
6808
        }
6809
        _Fields fieldId = _Fields.findByThriftId(field.id);
6810
        if (fieldId == null) {
6811
          TProtocolUtil.skip(iprot, field.type);
6812
        } else {
6813
          switch (fieldId) {
6814
            case USER_ID:
6815
              if (field.type == TType.I64) {
6816
                this.userId = iprot.readI64();
6817
                setUserIdIsSet(true);
6818
              } else { 
6819
                TProtocolUtil.skip(iprot, field.type);
6820
              }
6821
              break;
6822
          }
6823
          iprot.readFieldEnd();
6824
        }
6825
      }
6826
      iprot.readStructEnd();
6827
      validate();
6828
    }
6829
 
6830
    public void write(TProtocol oprot) throws TException {
6831
      validate();
6832
 
6833
      oprot.writeStructBegin(STRUCT_DESC);
6834
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6835
      oprot.writeI64(this.userId);
6836
      oprot.writeFieldEnd();
6837
      oprot.writeFieldStop();
6838
      oprot.writeStructEnd();
6839
    }
6840
 
6841
    @Override
6842
    public String toString() {
553 chandransh 6843
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6844
      boolean first = true;
6845
 
6846
      sb.append("userId:");
6847
      sb.append(this.userId);
6848
      first = false;
6849
      sb.append(")");
6850
      return sb.toString();
6851
    }
6852
 
6853
    public void validate() throws TException {
6854
      // check for required fields
6855
    }
6856
 
6857
  }
6858
 
553 chandransh 6859
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6860
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6861
 
6862
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6863
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6864
 
553 chandransh 6865
    private UserState success;
6866
    private UserContextException ucex;
48 ashish 6867
 
6868
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6869
    public enum _Fields implements TFieldIdEnum {
6870
      SUCCESS((short)0, "success"),
553 chandransh 6871
      UCEX((short)1, "ucex");
48 ashish 6872
 
6873
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6874
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6875
 
6876
      static {
6877
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6878
          byId.put((int)field._thriftId, field);
6879
          byName.put(field.getFieldName(), field);
6880
        }
6881
      }
6882
 
6883
      /**
6884
       * Find the _Fields constant that matches fieldId, or null if its not found.
6885
       */
6886
      public static _Fields findByThriftId(int fieldId) {
6887
        return byId.get(fieldId);
6888
      }
6889
 
6890
      /**
6891
       * Find the _Fields constant that matches fieldId, throwing an exception
6892
       * if it is not found.
6893
       */
6894
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6895
        _Fields fields = findByThriftId(fieldId);
6896
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6897
        return fields;
6898
      }
6899
 
6900
      /**
6901
       * Find the _Fields constant that matches name, or null if its not found.
6902
       */
6903
      public static _Fields findByName(String name) {
6904
        return byName.get(name);
6905
      }
6906
 
6907
      private final short _thriftId;
6908
      private final String _fieldName;
6909
 
6910
      _Fields(short thriftId, String fieldName) {
6911
        _thriftId = thriftId;
6912
        _fieldName = fieldName;
6913
      }
6914
 
6915
      public short getThriftFieldId() {
6916
        return _thriftId;
6917
      }
6918
 
6919
      public String getFieldName() {
6920
        return _fieldName;
6921
      }
6922
    }
6923
 
6924
    // isset id assignments
6925
 
6926
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6927
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6928
          new StructMetaData(TType.STRUCT, UserState.class)));
6929
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6930
          new FieldValueMetaData(TType.STRUCT)));
6931
    }});
6932
 
6933
    static {
553 chandransh 6934
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6935
    }
6936
 
553 chandransh 6937
    public getUserState_result() {
48 ashish 6938
    }
6939
 
553 chandransh 6940
    public getUserState_result(
6941
      UserState success,
6942
      UserContextException ucex)
48 ashish 6943
    {
6944
      this();
6945
      this.success = success;
553 chandransh 6946
      this.ucex = ucex;
48 ashish 6947
    }
6948
 
6949
    /**
6950
     * Performs a deep copy on <i>other</i>.
6951
     */
553 chandransh 6952
    public getUserState_result(getUserState_result other) {
48 ashish 6953
      if (other.isSetSuccess()) {
553 chandransh 6954
        this.success = new UserState(other.success);
48 ashish 6955
      }
553 chandransh 6956
      if (other.isSetUcex()) {
6957
        this.ucex = new UserContextException(other.ucex);
48 ashish 6958
      }
6959
    }
6960
 
553 chandransh 6961
    public getUserState_result deepCopy() {
6962
      return new getUserState_result(this);
48 ashish 6963
    }
6964
 
6965
    @Deprecated
553 chandransh 6966
    public getUserState_result clone() {
6967
      return new getUserState_result(this);
48 ashish 6968
    }
6969
 
553 chandransh 6970
    public UserState getSuccess() {
48 ashish 6971
      return this.success;
6972
    }
6973
 
553 chandransh 6974
    public getUserState_result setSuccess(UserState success) {
48 ashish 6975
      this.success = success;
6976
      return this;
6977
    }
6978
 
6979
    public void unsetSuccess() {
6980
      this.success = null;
6981
    }
6982
 
6983
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6984
    public boolean isSetSuccess() {
6985
      return this.success != null;
6986
    }
6987
 
6988
    public void setSuccessIsSet(boolean value) {
6989
      if (!value) {
6990
        this.success = null;
6991
      }
6992
    }
6993
 
553 chandransh 6994
    public UserContextException getUcex() {
6995
      return this.ucex;
48 ashish 6996
    }
6997
 
553 chandransh 6998
    public getUserState_result setUcex(UserContextException ucex) {
6999
      this.ucex = ucex;
48 ashish 7000
      return this;
7001
    }
7002
 
553 chandransh 7003
    public void unsetUcex() {
7004
      this.ucex = null;
48 ashish 7005
    }
7006
 
553 chandransh 7007
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
7008
    public boolean isSetUcex() {
7009
      return this.ucex != null;
48 ashish 7010
    }
7011
 
553 chandransh 7012
    public void setUcexIsSet(boolean value) {
48 ashish 7013
      if (!value) {
553 chandransh 7014
        this.ucex = null;
48 ashish 7015
      }
7016
    }
7017
 
7018
    public void setFieldValue(_Fields field, Object value) {
7019
      switch (field) {
7020
      case SUCCESS:
7021
        if (value == null) {
7022
          unsetSuccess();
7023
        } else {
553 chandransh 7024
          setSuccess((UserState)value);
48 ashish 7025
        }
7026
        break;
7027
 
553 chandransh 7028
      case UCEX:
48 ashish 7029
        if (value == null) {
553 chandransh 7030
          unsetUcex();
48 ashish 7031
        } else {
553 chandransh 7032
          setUcex((UserContextException)value);
48 ashish 7033
        }
7034
        break;
7035
 
7036
      }
7037
    }
7038
 
7039
    public void setFieldValue(int fieldID, Object value) {
7040
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7041
    }
7042
 
7043
    public Object getFieldValue(_Fields field) {
7044
      switch (field) {
7045
      case SUCCESS:
7046
        return getSuccess();
7047
 
553 chandransh 7048
      case UCEX:
7049
        return getUcex();
48 ashish 7050
 
7051
      }
7052
      throw new IllegalStateException();
7053
    }
7054
 
7055
    public Object getFieldValue(int fieldId) {
7056
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7057
    }
7058
 
7059
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7060
    public boolean isSet(_Fields field) {
7061
      switch (field) {
7062
      case SUCCESS:
7063
        return isSetSuccess();
553 chandransh 7064
      case UCEX:
7065
        return isSetUcex();
48 ashish 7066
      }
7067
      throw new IllegalStateException();
7068
    }
7069
 
7070
    public boolean isSet(int fieldID) {
7071
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7072
    }
7073
 
7074
    @Override
7075
    public boolean equals(Object that) {
7076
      if (that == null)
7077
        return false;
553 chandransh 7078
      if (that instanceof getUserState_result)
7079
        return this.equals((getUserState_result)that);
48 ashish 7080
      return false;
7081
    }
7082
 
553 chandransh 7083
    public boolean equals(getUserState_result that) {
48 ashish 7084
      if (that == null)
7085
        return false;
7086
 
7087
      boolean this_present_success = true && this.isSetSuccess();
7088
      boolean that_present_success = true && that.isSetSuccess();
7089
      if (this_present_success || that_present_success) {
7090
        if (!(this_present_success && that_present_success))
7091
          return false;
7092
        if (!this.success.equals(that.success))
7093
          return false;
7094
      }
7095
 
553 chandransh 7096
      boolean this_present_ucex = true && this.isSetUcex();
7097
      boolean that_present_ucex = true && that.isSetUcex();
7098
      if (this_present_ucex || that_present_ucex) {
7099
        if (!(this_present_ucex && that_present_ucex))
48 ashish 7100
          return false;
553 chandransh 7101
        if (!this.ucex.equals(that.ucex))
48 ashish 7102
          return false;
7103
      }
7104
 
7105
      return true;
7106
    }
7107
 
7108
    @Override
7109
    public int hashCode() {
7110
      return 0;
7111
    }
7112
 
553 chandransh 7113
    public int compareTo(getUserState_result other) {
48 ashish 7114
      if (!getClass().equals(other.getClass())) {
7115
        return getClass().getName().compareTo(other.getClass().getName());
7116
      }
7117
 
7118
      int lastComparison = 0;
553 chandransh 7119
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 7120
 
7121
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7122
      if (lastComparison != 0) {
7123
        return lastComparison;
7124
      }
7125
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7126
      if (lastComparison != 0) {
7127
        return lastComparison;
7128
      }
553 chandransh 7129
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 7130
      if (lastComparison != 0) {
7131
        return lastComparison;
7132
      }
553 chandransh 7133
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 7134
      if (lastComparison != 0) {
7135
        return lastComparison;
7136
      }
7137
      return 0;
7138
    }
7139
 
7140
    public void read(TProtocol iprot) throws TException {
7141
      TField field;
7142
      iprot.readStructBegin();
7143
      while (true)
7144
      {
7145
        field = iprot.readFieldBegin();
7146
        if (field.type == TType.STOP) { 
7147
          break;
7148
        }
7149
        _Fields fieldId = _Fields.findByThriftId(field.id);
7150
        if (fieldId == null) {
7151
          TProtocolUtil.skip(iprot, field.type);
7152
        } else {
7153
          switch (fieldId) {
7154
            case SUCCESS:
7155
              if (field.type == TType.STRUCT) {
553 chandransh 7156
                this.success = new UserState();
48 ashish 7157
                this.success.read(iprot);
7158
              } else { 
7159
                TProtocolUtil.skip(iprot, field.type);
7160
              }
7161
              break;
553 chandransh 7162
            case UCEX:
48 ashish 7163
              if (field.type == TType.STRUCT) {
553 chandransh 7164
                this.ucex = new UserContextException();
7165
                this.ucex.read(iprot);
48 ashish 7166
              } else { 
7167
                TProtocolUtil.skip(iprot, field.type);
7168
              }
7169
              break;
7170
          }
7171
          iprot.readFieldEnd();
7172
        }
7173
      }
7174
      iprot.readStructEnd();
7175
      validate();
7176
    }
7177
 
7178
    public void write(TProtocol oprot) throws TException {
7179
      oprot.writeStructBegin(STRUCT_DESC);
7180
 
7181
      if (this.isSetSuccess()) {
7182
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7183
        this.success.write(oprot);
7184
        oprot.writeFieldEnd();
553 chandransh 7185
      } else if (this.isSetUcex()) {
7186
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7187
        this.ucex.write(oprot);
48 ashish 7188
        oprot.writeFieldEnd();
7189
      }
7190
      oprot.writeFieldStop();
7191
      oprot.writeStructEnd();
7192
    }
7193
 
7194
    @Override
7195
    public String toString() {
553 chandransh 7196
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 7197
      boolean first = true;
7198
 
7199
      sb.append("success:");
7200
      if (this.success == null) {
7201
        sb.append("null");
7202
      } else {
7203
        sb.append(this.success);
7204
      }
7205
      first = false;
7206
      if (!first) sb.append(", ");
553 chandransh 7207
      sb.append("ucex:");
7208
      if (this.ucex == null) {
48 ashish 7209
        sb.append("null");
7210
      } else {
553 chandransh 7211
        sb.append(this.ucex);
48 ashish 7212
      }
7213
      first = false;
7214
      sb.append(")");
7215
      return sb.toString();
7216
    }
7217
 
7218
    public void validate() throws TException {
7219
      // check for required fields
7220
    }
7221
 
7222
  }
7223
 
553 chandransh 7224
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
7225
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 7226
 
7227
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7228
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7229
 
7230
    private String email;
7231
    private String password;
7232
 
7233
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7234
    public enum _Fields implements TFieldIdEnum {
7235
      EMAIL((short)1, "email"),
7236
      PASSWORD((short)2, "password");
7237
 
7238
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7239
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7240
 
7241
      static {
7242
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7243
          byId.put((int)field._thriftId, field);
7244
          byName.put(field.getFieldName(), field);
7245
        }
7246
      }
7247
 
7248
      /**
7249
       * Find the _Fields constant that matches fieldId, or null if its not found.
7250
       */
7251
      public static _Fields findByThriftId(int fieldId) {
7252
        return byId.get(fieldId);
7253
      }
7254
 
7255
      /**
7256
       * Find the _Fields constant that matches fieldId, throwing an exception
7257
       * if it is not found.
7258
       */
7259
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7260
        _Fields fields = findByThriftId(fieldId);
7261
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7262
        return fields;
7263
      }
7264
 
7265
      /**
7266
       * Find the _Fields constant that matches name, or null if its not found.
7267
       */
7268
      public static _Fields findByName(String name) {
7269
        return byName.get(name);
7270
      }
7271
 
7272
      private final short _thriftId;
7273
      private final String _fieldName;
7274
 
7275
      _Fields(short thriftId, String fieldName) {
7276
        _thriftId = thriftId;
7277
        _fieldName = fieldName;
7278
      }
7279
 
7280
      public short getThriftFieldId() {
7281
        return _thriftId;
7282
      }
7283
 
7284
      public String getFieldName() {
7285
        return _fieldName;
7286
      }
7287
    }
7288
 
7289
    // isset id assignments
7290
 
7291
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7292
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7293
          new FieldValueMetaData(TType.STRING)));
7294
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
7295
          new FieldValueMetaData(TType.STRING)));
7296
    }});
7297
 
7298
    static {
553 chandransh 7299
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 7300
    }
7301
 
553 chandransh 7302
    public authenticateUser_args() {
48 ashish 7303
    }
7304
 
553 chandransh 7305
    public authenticateUser_args(
48 ashish 7306
      String email,
7307
      String password)
7308
    {
7309
      this();
7310
      this.email = email;
7311
      this.password = password;
7312
    }
7313
 
7314
    /**
7315
     * Performs a deep copy on <i>other</i>.
7316
     */
553 chandransh 7317
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 7318
      if (other.isSetEmail()) {
7319
        this.email = other.email;
7320
      }
7321
      if (other.isSetPassword()) {
7322
        this.password = other.password;
7323
      }
7324
    }
7325
 
553 chandransh 7326
    public authenticateUser_args deepCopy() {
7327
      return new authenticateUser_args(this);
48 ashish 7328
    }
7329
 
7330
    @Deprecated
553 chandransh 7331
    public authenticateUser_args clone() {
7332
      return new authenticateUser_args(this);
48 ashish 7333
    }
7334
 
7335
    public String getEmail() {
7336
      return this.email;
7337
    }
7338
 
553 chandransh 7339
    public authenticateUser_args setEmail(String email) {
48 ashish 7340
      this.email = email;
7341
      return this;
7342
    }
7343
 
7344
    public void unsetEmail() {
7345
      this.email = null;
7346
    }
7347
 
7348
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7349
    public boolean isSetEmail() {
7350
      return this.email != null;
7351
    }
7352
 
7353
    public void setEmailIsSet(boolean value) {
7354
      if (!value) {
7355
        this.email = null;
7356
      }
7357
    }
7358
 
7359
    public String getPassword() {
7360
      return this.password;
7361
    }
7362
 
553 chandransh 7363
    public authenticateUser_args setPassword(String password) {
48 ashish 7364
      this.password = password;
7365
      return this;
7366
    }
7367
 
7368
    public void unsetPassword() {
7369
      this.password = null;
7370
    }
7371
 
7372
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7373
    public boolean isSetPassword() {
7374
      return this.password != null;
7375
    }
7376
 
7377
    public void setPasswordIsSet(boolean value) {
7378
      if (!value) {
7379
        this.password = null;
7380
      }
7381
    }
7382
 
7383
    public void setFieldValue(_Fields field, Object value) {
7384
      switch (field) {
7385
      case EMAIL:
7386
        if (value == null) {
7387
          unsetEmail();
7388
        } else {
7389
          setEmail((String)value);
7390
        }
7391
        break;
7392
 
7393
      case PASSWORD:
7394
        if (value == null) {
7395
          unsetPassword();
7396
        } else {
7397
          setPassword((String)value);
7398
        }
7399
        break;
7400
 
7401
      }
7402
    }
7403
 
7404
    public void setFieldValue(int fieldID, Object value) {
7405
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7406
    }
7407
 
7408
    public Object getFieldValue(_Fields field) {
7409
      switch (field) {
7410
      case EMAIL:
7411
        return getEmail();
7412
 
7413
      case PASSWORD:
7414
        return getPassword();
7415
 
7416
      }
7417
      throw new IllegalStateException();
7418
    }
7419
 
7420
    public Object getFieldValue(int fieldId) {
7421
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7422
    }
7423
 
7424
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7425
    public boolean isSet(_Fields field) {
7426
      switch (field) {
7427
      case EMAIL:
7428
        return isSetEmail();
7429
      case PASSWORD:
7430
        return isSetPassword();
7431
      }
7432
      throw new IllegalStateException();
7433
    }
7434
 
7435
    public boolean isSet(int fieldID) {
7436
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7437
    }
7438
 
7439
    @Override
7440
    public boolean equals(Object that) {
7441
      if (that == null)
7442
        return false;
553 chandransh 7443
      if (that instanceof authenticateUser_args)
7444
        return this.equals((authenticateUser_args)that);
48 ashish 7445
      return false;
7446
    }
7447
 
553 chandransh 7448
    public boolean equals(authenticateUser_args that) {
48 ashish 7449
      if (that == null)
7450
        return false;
7451
 
7452
      boolean this_present_email = true && this.isSetEmail();
7453
      boolean that_present_email = true && that.isSetEmail();
7454
      if (this_present_email || that_present_email) {
7455
        if (!(this_present_email && that_present_email))
7456
          return false;
7457
        if (!this.email.equals(that.email))
7458
          return false;
7459
      }
7460
 
7461
      boolean this_present_password = true && this.isSetPassword();
7462
      boolean that_present_password = true && that.isSetPassword();
7463
      if (this_present_password || that_present_password) {
7464
        if (!(this_present_password && that_present_password))
7465
          return false;
7466
        if (!this.password.equals(that.password))
7467
          return false;
7468
      }
7469
 
7470
      return true;
7471
    }
7472
 
7473
    @Override
7474
    public int hashCode() {
7475
      return 0;
7476
    }
7477
 
553 chandransh 7478
    public int compareTo(authenticateUser_args other) {
48 ashish 7479
      if (!getClass().equals(other.getClass())) {
7480
        return getClass().getName().compareTo(other.getClass().getName());
7481
      }
7482
 
7483
      int lastComparison = 0;
553 chandransh 7484
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 7485
 
7486
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7487
      if (lastComparison != 0) {
7488
        return lastComparison;
7489
      }
7490
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7491
      if (lastComparison != 0) {
7492
        return lastComparison;
7493
      }
7494
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7495
      if (lastComparison != 0) {
7496
        return lastComparison;
7497
      }
7498
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7499
      if (lastComparison != 0) {
7500
        return lastComparison;
7501
      }
7502
      return 0;
7503
    }
7504
 
7505
    public void read(TProtocol iprot) throws TException {
7506
      TField field;
7507
      iprot.readStructBegin();
7508
      while (true)
7509
      {
7510
        field = iprot.readFieldBegin();
7511
        if (field.type == TType.STOP) { 
7512
          break;
7513
        }
7514
        _Fields fieldId = _Fields.findByThriftId(field.id);
7515
        if (fieldId == null) {
7516
          TProtocolUtil.skip(iprot, field.type);
7517
        } else {
7518
          switch (fieldId) {
7519
            case EMAIL:
7520
              if (field.type == TType.STRING) {
7521
                this.email = iprot.readString();
7522
              } else { 
7523
                TProtocolUtil.skip(iprot, field.type);
7524
              }
7525
              break;
7526
            case PASSWORD:
7527
              if (field.type == TType.STRING) {
7528
                this.password = iprot.readString();
7529
              } else { 
7530
                TProtocolUtil.skip(iprot, field.type);
7531
              }
7532
              break;
7533
          }
7534
          iprot.readFieldEnd();
7535
        }
7536
      }
7537
      iprot.readStructEnd();
7538
      validate();
7539
    }
7540
 
7541
    public void write(TProtocol oprot) throws TException {
7542
      validate();
7543
 
7544
      oprot.writeStructBegin(STRUCT_DESC);
7545
      if (this.email != null) {
7546
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7547
        oprot.writeString(this.email);
7548
        oprot.writeFieldEnd();
7549
      }
7550
      if (this.password != null) {
7551
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7552
        oprot.writeString(this.password);
7553
        oprot.writeFieldEnd();
7554
      }
7555
      oprot.writeFieldStop();
7556
      oprot.writeStructEnd();
7557
    }
7558
 
7559
    @Override
7560
    public String toString() {
553 chandransh 7561
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7562
      boolean first = true;
7563
 
7564
      sb.append("email:");
7565
      if (this.email == null) {
7566
        sb.append("null");
7567
      } else {
7568
        sb.append(this.email);
7569
      }
7570
      first = false;
7571
      if (!first) sb.append(", ");
7572
      sb.append("password:");
7573
      if (this.password == null) {
7574
        sb.append("null");
7575
      } else {
7576
        sb.append(this.password);
7577
      }
7578
      first = false;
7579
      sb.append(")");
7580
      return sb.toString();
7581
    }
7582
 
7583
    public void validate() throws TException {
7584
      // check for required fields
7585
    }
7586
 
7587
  }
7588
 
571 rajveer 7589
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7590
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7591
 
7592
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7593
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7594
 
553 chandransh 7595
    private User success;
7596
    private AuthenticationException auex;
48 ashish 7597
 
7598
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7599
    public enum _Fields implements TFieldIdEnum {
7600
      SUCCESS((short)0, "success"),
553 chandransh 7601
      AUEX((short)1, "auex");
48 ashish 7602
 
7603
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7604
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7605
 
7606
      static {
7607
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7608
          byId.put((int)field._thriftId, field);
7609
          byName.put(field.getFieldName(), field);
7610
        }
7611
      }
7612
 
7613
      /**
7614
       * Find the _Fields constant that matches fieldId, or null if its not found.
7615
       */
7616
      public static _Fields findByThriftId(int fieldId) {
7617
        return byId.get(fieldId);
7618
      }
7619
 
7620
      /**
7621
       * Find the _Fields constant that matches fieldId, throwing an exception
7622
       * if it is not found.
7623
       */
7624
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7625
        _Fields fields = findByThriftId(fieldId);
7626
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7627
        return fields;
7628
      }
7629
 
7630
      /**
7631
       * Find the _Fields constant that matches name, or null if its not found.
7632
       */
7633
      public static _Fields findByName(String name) {
7634
        return byName.get(name);
7635
      }
7636
 
7637
      private final short _thriftId;
7638
      private final String _fieldName;
7639
 
7640
      _Fields(short thriftId, String fieldName) {
7641
        _thriftId = thriftId;
7642
        _fieldName = fieldName;
7643
      }
7644
 
7645
      public short getThriftFieldId() {
7646
        return _thriftId;
7647
      }
7648
 
7649
      public String getFieldName() {
7650
        return _fieldName;
7651
      }
7652
    }
7653
 
7654
    // isset id assignments
7655
 
7656
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7657
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7658
          new StructMetaData(TType.STRUCT, User.class)));
7659
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7660
          new FieldValueMetaData(TType.STRUCT)));
7661
    }});
7662
 
7663
    static {
553 chandransh 7664
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7665
    }
7666
 
553 chandransh 7667
    public authenticateUser_result() {
48 ashish 7668
    }
7669
 
553 chandransh 7670
    public authenticateUser_result(
7671
      User success,
7672
      AuthenticationException auex)
48 ashish 7673
    {
7674
      this();
7675
      this.success = success;
553 chandransh 7676
      this.auex = auex;
48 ashish 7677
    }
7678
 
7679
    /**
7680
     * Performs a deep copy on <i>other</i>.
7681
     */
553 chandransh 7682
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7683
      if (other.isSetSuccess()) {
553 chandransh 7684
        this.success = new User(other.success);
48 ashish 7685
      }
553 chandransh 7686
      if (other.isSetAuex()) {
7687
        this.auex = new AuthenticationException(other.auex);
48 ashish 7688
      }
7689
    }
7690
 
553 chandransh 7691
    public authenticateUser_result deepCopy() {
7692
      return new authenticateUser_result(this);
48 ashish 7693
    }
7694
 
7695
    @Deprecated
553 chandransh 7696
    public authenticateUser_result clone() {
7697
      return new authenticateUser_result(this);
48 ashish 7698
    }
7699
 
553 chandransh 7700
    public User getSuccess() {
48 ashish 7701
      return this.success;
7702
    }
7703
 
553 chandransh 7704
    public authenticateUser_result setSuccess(User success) {
48 ashish 7705
      this.success = success;
7706
      return this;
7707
    }
7708
 
7709
    public void unsetSuccess() {
7710
      this.success = null;
7711
    }
7712
 
7713
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7714
    public boolean isSetSuccess() {
7715
      return this.success != null;
7716
    }
7717
 
7718
    public void setSuccessIsSet(boolean value) {
7719
      if (!value) {
7720
        this.success = null;
7721
      }
7722
    }
7723
 
553 chandransh 7724
    public AuthenticationException getAuex() {
7725
      return this.auex;
48 ashish 7726
    }
7727
 
553 chandransh 7728
    public authenticateUser_result setAuex(AuthenticationException auex) {
7729
      this.auex = auex;
48 ashish 7730
      return this;
7731
    }
7732
 
553 chandransh 7733
    public void unsetAuex() {
7734
      this.auex = null;
48 ashish 7735
    }
7736
 
553 chandransh 7737
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7738
    public boolean isSetAuex() {
7739
      return this.auex != null;
48 ashish 7740
    }
7741
 
553 chandransh 7742
    public void setAuexIsSet(boolean value) {
48 ashish 7743
      if (!value) {
553 chandransh 7744
        this.auex = null;
48 ashish 7745
      }
7746
    }
7747
 
7748
    public void setFieldValue(_Fields field, Object value) {
7749
      switch (field) {
7750
      case SUCCESS:
7751
        if (value == null) {
7752
          unsetSuccess();
7753
        } else {
553 chandransh 7754
          setSuccess((User)value);
48 ashish 7755
        }
7756
        break;
7757
 
553 chandransh 7758
      case AUEX:
48 ashish 7759
        if (value == null) {
553 chandransh 7760
          unsetAuex();
48 ashish 7761
        } else {
553 chandransh 7762
          setAuex((AuthenticationException)value);
48 ashish 7763
        }
7764
        break;
7765
 
7766
      }
7767
    }
7768
 
7769
    public void setFieldValue(int fieldID, Object value) {
7770
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7771
    }
7772
 
7773
    public Object getFieldValue(_Fields field) {
7774
      switch (field) {
7775
      case SUCCESS:
7776
        return getSuccess();
7777
 
553 chandransh 7778
      case AUEX:
7779
        return getAuex();
48 ashish 7780
 
7781
      }
7782
      throw new IllegalStateException();
7783
    }
7784
 
7785
    public Object getFieldValue(int fieldId) {
7786
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7787
    }
7788
 
7789
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7790
    public boolean isSet(_Fields field) {
7791
      switch (field) {
7792
      case SUCCESS:
7793
        return isSetSuccess();
553 chandransh 7794
      case AUEX:
7795
        return isSetAuex();
48 ashish 7796
      }
7797
      throw new IllegalStateException();
7798
    }
7799
 
7800
    public boolean isSet(int fieldID) {
7801
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7802
    }
7803
 
7804
    @Override
7805
    public boolean equals(Object that) {
7806
      if (that == null)
7807
        return false;
553 chandransh 7808
      if (that instanceof authenticateUser_result)
7809
        return this.equals((authenticateUser_result)that);
48 ashish 7810
      return false;
7811
    }
7812
 
553 chandransh 7813
    public boolean equals(authenticateUser_result that) {
48 ashish 7814
      if (that == null)
7815
        return false;
7816
 
7817
      boolean this_present_success = true && this.isSetSuccess();
7818
      boolean that_present_success = true && that.isSetSuccess();
7819
      if (this_present_success || that_present_success) {
7820
        if (!(this_present_success && that_present_success))
7821
          return false;
7822
        if (!this.success.equals(that.success))
7823
          return false;
7824
      }
7825
 
553 chandransh 7826
      boolean this_present_auex = true && this.isSetAuex();
7827
      boolean that_present_auex = true && that.isSetAuex();
7828
      if (this_present_auex || that_present_auex) {
7829
        if (!(this_present_auex && that_present_auex))
48 ashish 7830
          return false;
553 chandransh 7831
        if (!this.auex.equals(that.auex))
48 ashish 7832
          return false;
7833
      }
7834
 
7835
      return true;
7836
    }
7837
 
7838
    @Override
7839
    public int hashCode() {
7840
      return 0;
7841
    }
7842
 
571 rajveer 7843
    public int compareTo(authenticateUser_result other) {
7844
      if (!getClass().equals(other.getClass())) {
7845
        return getClass().getName().compareTo(other.getClass().getName());
7846
      }
7847
 
7848
      int lastComparison = 0;
7849
      authenticateUser_result typedOther = (authenticateUser_result)other;
7850
 
7851
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7852
      if (lastComparison != 0) {
7853
        return lastComparison;
7854
      }
7855
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7856
      if (lastComparison != 0) {
7857
        return lastComparison;
7858
      }
7859
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
7860
      if (lastComparison != 0) {
7861
        return lastComparison;
7862
      }
7863
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
7864
      if (lastComparison != 0) {
7865
        return lastComparison;
7866
      }
7867
      return 0;
7868
    }
7869
 
48 ashish 7870
    public void read(TProtocol iprot) throws TException {
7871
      TField field;
7872
      iprot.readStructBegin();
7873
      while (true)
7874
      {
7875
        field = iprot.readFieldBegin();
7876
        if (field.type == TType.STOP) { 
7877
          break;
7878
        }
7879
        _Fields fieldId = _Fields.findByThriftId(field.id);
7880
        if (fieldId == null) {
7881
          TProtocolUtil.skip(iprot, field.type);
7882
        } else {
7883
          switch (fieldId) {
7884
            case SUCCESS:
7885
              if (field.type == TType.STRUCT) {
553 chandransh 7886
                this.success = new User();
48 ashish 7887
                this.success.read(iprot);
7888
              } else { 
7889
                TProtocolUtil.skip(iprot, field.type);
7890
              }
7891
              break;
553 chandransh 7892
            case AUEX:
48 ashish 7893
              if (field.type == TType.STRUCT) {
553 chandransh 7894
                this.auex = new AuthenticationException();
7895
                this.auex.read(iprot);
48 ashish 7896
              } else { 
7897
                TProtocolUtil.skip(iprot, field.type);
7898
              }
7899
              break;
7900
          }
7901
          iprot.readFieldEnd();
7902
        }
7903
      }
7904
      iprot.readStructEnd();
7905
      validate();
7906
    }
7907
 
7908
    public void write(TProtocol oprot) throws TException {
7909
      oprot.writeStructBegin(STRUCT_DESC);
7910
 
7911
      if (this.isSetSuccess()) {
7912
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7913
        this.success.write(oprot);
7914
        oprot.writeFieldEnd();
553 chandransh 7915
      } else if (this.isSetAuex()) {
7916
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7917
        this.auex.write(oprot);
48 ashish 7918
        oprot.writeFieldEnd();
7919
      }
7920
      oprot.writeFieldStop();
7921
      oprot.writeStructEnd();
7922
    }
7923
 
7924
    @Override
7925
    public String toString() {
553 chandransh 7926
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7927
      boolean first = true;
7928
 
7929
      sb.append("success:");
7930
      if (this.success == null) {
7931
        sb.append("null");
7932
      } else {
7933
        sb.append(this.success);
7934
      }
7935
      first = false;
7936
      if (!first) sb.append(", ");
553 chandransh 7937
      sb.append("auex:");
7938
      if (this.auex == null) {
48 ashish 7939
        sb.append("null");
7940
      } else {
553 chandransh 7941
        sb.append(this.auex);
48 ashish 7942
      }
7943
      first = false;
7944
      sb.append(")");
7945
      return sb.toString();
7946
    }
7947
 
7948
    public void validate() throws TException {
7949
      // check for required fields
7950
    }
7951
 
7952
  }
7953
 
553 chandransh 7954
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7955
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7956
 
553 chandransh 7957
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7958
 
553 chandransh 7959
    private String email;
123 ashish 7960
 
7961
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7962
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7963
      EMAIL((short)1, "email");
123 ashish 7964
 
7965
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7966
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7967
 
7968
      static {
7969
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7970
          byId.put((int)field._thriftId, field);
7971
          byName.put(field.getFieldName(), field);
7972
        }
7973
      }
7974
 
7975
      /**
7976
       * Find the _Fields constant that matches fieldId, or null if its not found.
7977
       */
7978
      public static _Fields findByThriftId(int fieldId) {
7979
        return byId.get(fieldId);
7980
      }
7981
 
7982
      /**
7983
       * Find the _Fields constant that matches fieldId, throwing an exception
7984
       * if it is not found.
7985
       */
7986
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7987
        _Fields fields = findByThriftId(fieldId);
7988
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7989
        return fields;
7990
      }
7991
 
7992
      /**
7993
       * Find the _Fields constant that matches name, or null if its not found.
7994
       */
7995
      public static _Fields findByName(String name) {
7996
        return byName.get(name);
7997
      }
7998
 
7999
      private final short _thriftId;
8000
      private final String _fieldName;
8001
 
8002
      _Fields(short thriftId, String fieldName) {
8003
        _thriftId = thriftId;
8004
        _fieldName = fieldName;
8005
      }
8006
 
8007
      public short getThriftFieldId() {
8008
        return _thriftId;
8009
      }
8010
 
8011
      public String getFieldName() {
8012
        return _fieldName;
8013
      }
8014
    }
8015
 
8016
    // isset id assignments
553 chandransh 8017
 
8018
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8019
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
8020
          new FieldValueMetaData(TType.STRING)));
8021
    }});
8022
 
8023
    static {
8024
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
8025
    }
8026
 
8027
    public userExists_args() {
8028
    }
8029
 
8030
    public userExists_args(
8031
      String email)
8032
    {
8033
      this();
8034
      this.email = email;
8035
    }
8036
 
8037
    /**
8038
     * Performs a deep copy on <i>other</i>.
8039
     */
8040
    public userExists_args(userExists_args other) {
8041
      if (other.isSetEmail()) {
8042
        this.email = other.email;
8043
      }
8044
    }
8045
 
8046
    public userExists_args deepCopy() {
8047
      return new userExists_args(this);
8048
    }
8049
 
8050
    @Deprecated
8051
    public userExists_args clone() {
8052
      return new userExists_args(this);
8053
    }
8054
 
8055
    public String getEmail() {
8056
      return this.email;
8057
    }
8058
 
8059
    public userExists_args setEmail(String email) {
8060
      this.email = email;
8061
      return this;
8062
    }
8063
 
8064
    public void unsetEmail() {
8065
      this.email = null;
8066
    }
8067
 
8068
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
8069
    public boolean isSetEmail() {
8070
      return this.email != null;
8071
    }
8072
 
8073
    public void setEmailIsSet(boolean value) {
8074
      if (!value) {
8075
        this.email = null;
8076
      }
8077
    }
8078
 
8079
    public void setFieldValue(_Fields field, Object value) {
8080
      switch (field) {
8081
      case EMAIL:
8082
        if (value == null) {
8083
          unsetEmail();
8084
        } else {
8085
          setEmail((String)value);
8086
        }
8087
        break;
8088
 
8089
      }
8090
    }
8091
 
8092
    public void setFieldValue(int fieldID, Object value) {
8093
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8094
    }
8095
 
8096
    public Object getFieldValue(_Fields field) {
8097
      switch (field) {
8098
      case EMAIL:
8099
        return getEmail();
8100
 
8101
      }
8102
      throw new IllegalStateException();
8103
    }
8104
 
8105
    public Object getFieldValue(int fieldId) {
8106
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8107
    }
8108
 
8109
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8110
    public boolean isSet(_Fields field) {
8111
      switch (field) {
8112
      case EMAIL:
8113
        return isSetEmail();
8114
      }
8115
      throw new IllegalStateException();
8116
    }
8117
 
8118
    public boolean isSet(int fieldID) {
8119
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8120
    }
8121
 
8122
    @Override
8123
    public boolean equals(Object that) {
8124
      if (that == null)
8125
        return false;
8126
      if (that instanceof userExists_args)
8127
        return this.equals((userExists_args)that);
8128
      return false;
8129
    }
8130
 
8131
    public boolean equals(userExists_args that) {
8132
      if (that == null)
8133
        return false;
8134
 
8135
      boolean this_present_email = true && this.isSetEmail();
8136
      boolean that_present_email = true && that.isSetEmail();
8137
      if (this_present_email || that_present_email) {
8138
        if (!(this_present_email && that_present_email))
8139
          return false;
8140
        if (!this.email.equals(that.email))
8141
          return false;
8142
      }
8143
 
8144
      return true;
8145
    }
8146
 
8147
    @Override
8148
    public int hashCode() {
8149
      return 0;
8150
    }
8151
 
8152
    public int compareTo(userExists_args other) {
8153
      if (!getClass().equals(other.getClass())) {
8154
        return getClass().getName().compareTo(other.getClass().getName());
8155
      }
8156
 
8157
      int lastComparison = 0;
8158
      userExists_args typedOther = (userExists_args)other;
8159
 
8160
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8161
      if (lastComparison != 0) {
8162
        return lastComparison;
8163
      }
8164
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8165
      if (lastComparison != 0) {
8166
        return lastComparison;
8167
      }
8168
      return 0;
8169
    }
8170
 
8171
    public void read(TProtocol iprot) throws TException {
8172
      TField field;
8173
      iprot.readStructBegin();
8174
      while (true)
8175
      {
8176
        field = iprot.readFieldBegin();
8177
        if (field.type == TType.STOP) { 
8178
          break;
8179
        }
8180
        _Fields fieldId = _Fields.findByThriftId(field.id);
8181
        if (fieldId == null) {
8182
          TProtocolUtil.skip(iprot, field.type);
8183
        } else {
8184
          switch (fieldId) {
8185
            case EMAIL:
8186
              if (field.type == TType.STRING) {
8187
                this.email = iprot.readString();
8188
              } else { 
8189
                TProtocolUtil.skip(iprot, field.type);
8190
              }
8191
              break;
8192
          }
8193
          iprot.readFieldEnd();
8194
        }
8195
      }
8196
      iprot.readStructEnd();
8197
      validate();
8198
    }
8199
 
8200
    public void write(TProtocol oprot) throws TException {
8201
      validate();
8202
 
8203
      oprot.writeStructBegin(STRUCT_DESC);
8204
      if (this.email != null) {
8205
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8206
        oprot.writeString(this.email);
8207
        oprot.writeFieldEnd();
8208
      }
8209
      oprot.writeFieldStop();
8210
      oprot.writeStructEnd();
8211
    }
8212
 
8213
    @Override
8214
    public String toString() {
8215
      StringBuilder sb = new StringBuilder("userExists_args(");
8216
      boolean first = true;
8217
 
8218
      sb.append("email:");
8219
      if (this.email == null) {
8220
        sb.append("null");
8221
      } else {
8222
        sb.append(this.email);
8223
      }
8224
      first = false;
8225
      sb.append(")");
8226
      return sb.toString();
8227
    }
8228
 
8229
    public void validate() throws TException {
8230
      // check for required fields
8231
    }
8232
 
8233
  }
8234
 
8235
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
8236
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
8237
 
8238
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8239
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8240
 
8241
    private boolean success;
8242
    private UserContextException ucx;
8243
 
8244
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8245
    public enum _Fields implements TFieldIdEnum {
8246
      SUCCESS((short)0, "success"),
8247
      UCX((short)1, "ucx");
8248
 
8249
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8250
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8251
 
8252
      static {
8253
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8254
          byId.put((int)field._thriftId, field);
8255
          byName.put(field.getFieldName(), field);
8256
        }
8257
      }
8258
 
8259
      /**
8260
       * Find the _Fields constant that matches fieldId, or null if its not found.
8261
       */
8262
      public static _Fields findByThriftId(int fieldId) {
8263
        return byId.get(fieldId);
8264
      }
8265
 
8266
      /**
8267
       * Find the _Fields constant that matches fieldId, throwing an exception
8268
       * if it is not found.
8269
       */
8270
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8271
        _Fields fields = findByThriftId(fieldId);
8272
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8273
        return fields;
8274
      }
8275
 
8276
      /**
8277
       * Find the _Fields constant that matches name, or null if its not found.
8278
       */
8279
      public static _Fields findByName(String name) {
8280
        return byName.get(name);
8281
      }
8282
 
8283
      private final short _thriftId;
8284
      private final String _fieldName;
8285
 
8286
      _Fields(short thriftId, String fieldName) {
8287
        _thriftId = thriftId;
8288
        _fieldName = fieldName;
8289
      }
8290
 
8291
      public short getThriftFieldId() {
8292
        return _thriftId;
8293
      }
8294
 
8295
      public String getFieldName() {
8296
        return _fieldName;
8297
      }
8298
    }
8299
 
8300
    // isset id assignments
8301
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 8302
    private BitSet __isset_bit_vector = new BitSet(1);
8303
 
8304
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8305
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 8306
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 8307
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8308
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 8309
    }});
8310
 
8311
    static {
553 chandransh 8312
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 8313
    }
8314
 
553 chandransh 8315
    public userExists_result() {
123 ashish 8316
    }
8317
 
553 chandransh 8318
    public userExists_result(
8319
      boolean success,
8320
      UserContextException ucx)
123 ashish 8321
    {
8322
      this();
553 chandransh 8323
      this.success = success;
8324
      setSuccessIsSet(true);
8325
      this.ucx = ucx;
123 ashish 8326
    }
8327
 
8328
    /**
8329
     * Performs a deep copy on <i>other</i>.
8330
     */
553 chandransh 8331
    public userExists_result(userExists_result other) {
123 ashish 8332
      __isset_bit_vector.clear();
8333
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 8334
      this.success = other.success;
8335
      if (other.isSetUcx()) {
8336
        this.ucx = new UserContextException(other.ucx);
123 ashish 8337
      }
8338
    }
8339
 
553 chandransh 8340
    public userExists_result deepCopy() {
8341
      return new userExists_result(this);
123 ashish 8342
    }
8343
 
8344
    @Deprecated
553 chandransh 8345
    public userExists_result clone() {
8346
      return new userExists_result(this);
123 ashish 8347
    }
8348
 
553 chandransh 8349
    public boolean isSuccess() {
8350
      return this.success;
123 ashish 8351
    }
8352
 
553 chandransh 8353
    public userExists_result setSuccess(boolean success) {
8354
      this.success = success;
8355
      setSuccessIsSet(true);
123 ashish 8356
      return this;
8357
    }
8358
 
553 chandransh 8359
    public void unsetSuccess() {
8360
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 8361
    }
8362
 
553 chandransh 8363
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8364
    public boolean isSetSuccess() {
8365
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 8366
    }
8367
 
553 chandransh 8368
    public void setSuccessIsSet(boolean value) {
8369
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8370
    }
8371
 
8372
    public UserContextException getUcx() {
8373
      return this.ucx;
8374
    }
8375
 
8376
    public userExists_result setUcx(UserContextException ucx) {
8377
      this.ucx = ucx;
8378
      return this;
8379
    }
8380
 
8381
    public void unsetUcx() {
8382
      this.ucx = null;
8383
    }
8384
 
8385
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8386
    public boolean isSetUcx() {
8387
      return this.ucx != null;
8388
    }
8389
 
8390
    public void setUcxIsSet(boolean value) {
123 ashish 8391
      if (!value) {
553 chandransh 8392
        this.ucx = null;
123 ashish 8393
      }
8394
    }
8395
 
553 chandransh 8396
    public void setFieldValue(_Fields field, Object value) {
8397
      switch (field) {
8398
      case SUCCESS:
8399
        if (value == null) {
8400
          unsetSuccess();
8401
        } else {
8402
          setSuccess((Boolean)value);
8403
        }
8404
        break;
8405
 
8406
      case UCX:
8407
        if (value == null) {
8408
          unsetUcx();
8409
        } else {
8410
          setUcx((UserContextException)value);
8411
        }
8412
        break;
8413
 
8414
      }
123 ashish 8415
    }
8416
 
553 chandransh 8417
    public void setFieldValue(int fieldID, Object value) {
8418
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8419
    }
8420
 
8421
    public Object getFieldValue(_Fields field) {
8422
      switch (field) {
8423
      case SUCCESS:
8424
        return new Boolean(isSuccess());
8425
 
8426
      case UCX:
8427
        return getUcx();
8428
 
8429
      }
8430
      throw new IllegalStateException();
8431
    }
8432
 
8433
    public Object getFieldValue(int fieldId) {
8434
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8435
    }
8436
 
8437
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8438
    public boolean isSet(_Fields field) {
8439
      switch (field) {
8440
      case SUCCESS:
8441
        return isSetSuccess();
8442
      case UCX:
8443
        return isSetUcx();
8444
      }
8445
      throw new IllegalStateException();
8446
    }
8447
 
8448
    public boolean isSet(int fieldID) {
8449
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8450
    }
8451
 
8452
    @Override
8453
    public boolean equals(Object that) {
8454
      if (that == null)
8455
        return false;
8456
      if (that instanceof userExists_result)
8457
        return this.equals((userExists_result)that);
8458
      return false;
8459
    }
8460
 
8461
    public boolean equals(userExists_result that) {
8462
      if (that == null)
8463
        return false;
8464
 
8465
      boolean this_present_success = true;
8466
      boolean that_present_success = true;
8467
      if (this_present_success || that_present_success) {
8468
        if (!(this_present_success && that_present_success))
8469
          return false;
8470
        if (this.success != that.success)
8471
          return false;
8472
      }
8473
 
8474
      boolean this_present_ucx = true && this.isSetUcx();
8475
      boolean that_present_ucx = true && that.isSetUcx();
8476
      if (this_present_ucx || that_present_ucx) {
8477
        if (!(this_present_ucx && that_present_ucx))
8478
          return false;
8479
        if (!this.ucx.equals(that.ucx))
8480
          return false;
8481
      }
8482
 
8483
      return true;
8484
    }
8485
 
8486
    @Override
8487
    public int hashCode() {
8488
      return 0;
8489
    }
8490
 
8491
    public int compareTo(userExists_result other) {
8492
      if (!getClass().equals(other.getClass())) {
8493
        return getClass().getName().compareTo(other.getClass().getName());
8494
      }
8495
 
8496
      int lastComparison = 0;
8497
      userExists_result typedOther = (userExists_result)other;
8498
 
8499
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8500
      if (lastComparison != 0) {
8501
        return lastComparison;
8502
      }
8503
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8504
      if (lastComparison != 0) {
8505
        return lastComparison;
8506
      }
8507
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8508
      if (lastComparison != 0) {
8509
        return lastComparison;
8510
      }
8511
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8512
      if (lastComparison != 0) {
8513
        return lastComparison;
8514
      }
8515
      return 0;
8516
    }
8517
 
8518
    public void read(TProtocol iprot) throws TException {
8519
      TField field;
8520
      iprot.readStructBegin();
8521
      while (true)
8522
      {
8523
        field = iprot.readFieldBegin();
8524
        if (field.type == TType.STOP) { 
8525
          break;
8526
        }
8527
        _Fields fieldId = _Fields.findByThriftId(field.id);
8528
        if (fieldId == null) {
8529
          TProtocolUtil.skip(iprot, field.type);
8530
        } else {
8531
          switch (fieldId) {
8532
            case SUCCESS:
8533
              if (field.type == TType.BOOL) {
8534
                this.success = iprot.readBool();
8535
                setSuccessIsSet(true);
8536
              } else { 
8537
                TProtocolUtil.skip(iprot, field.type);
8538
              }
8539
              break;
8540
            case UCX:
8541
              if (field.type == TType.STRUCT) {
8542
                this.ucx = new UserContextException();
8543
                this.ucx.read(iprot);
8544
              } else { 
8545
                TProtocolUtil.skip(iprot, field.type);
8546
              }
8547
              break;
8548
          }
8549
          iprot.readFieldEnd();
8550
        }
8551
      }
8552
      iprot.readStructEnd();
8553
      validate();
8554
    }
8555
 
8556
    public void write(TProtocol oprot) throws TException {
8557
      oprot.writeStructBegin(STRUCT_DESC);
8558
 
8559
      if (this.isSetSuccess()) {
8560
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8561
        oprot.writeBool(this.success);
8562
        oprot.writeFieldEnd();
8563
      } else if (this.isSetUcx()) {
8564
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8565
        this.ucx.write(oprot);
8566
        oprot.writeFieldEnd();
8567
      }
8568
      oprot.writeFieldStop();
8569
      oprot.writeStructEnd();
8570
    }
8571
 
8572
    @Override
8573
    public String toString() {
8574
      StringBuilder sb = new StringBuilder("userExists_result(");
8575
      boolean first = true;
8576
 
8577
      sb.append("success:");
8578
      sb.append(this.success);
8579
      first = false;
8580
      if (!first) sb.append(", ");
8581
      sb.append("ucx:");
8582
      if (this.ucx == null) {
8583
        sb.append("null");
8584
      } else {
8585
        sb.append(this.ucx);
8586
      }
8587
      first = false;
8588
      sb.append(")");
8589
      return sb.toString();
8590
    }
8591
 
8592
    public void validate() throws TException {
8593
      // check for required fields
8594
    }
8595
 
8596
  }
8597
 
8598
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8599
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8600
 
8601
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8602
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8603
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8604
 
8605
    private long userId;
8606
    private Address address;
8607
    private boolean setDefault;
8608
 
8609
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8610
    public enum _Fields implements TFieldIdEnum {
8611
      USER_ID((short)1, "userId"),
8612
      ADDRESS((short)2, "address"),
571 rajveer 8613
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8614
 
8615
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8616
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8617
 
8618
      static {
8619
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8620
          byId.put((int)field._thriftId, field);
8621
          byName.put(field.getFieldName(), field);
8622
        }
8623
      }
8624
 
8625
      /**
8626
       * Find the _Fields constant that matches fieldId, or null if its not found.
8627
       */
8628
      public static _Fields findByThriftId(int fieldId) {
8629
        return byId.get(fieldId);
8630
      }
8631
 
8632
      /**
8633
       * Find the _Fields constant that matches fieldId, throwing an exception
8634
       * if it is not found.
8635
       */
8636
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8637
        _Fields fields = findByThriftId(fieldId);
8638
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8639
        return fields;
8640
      }
8641
 
8642
      /**
8643
       * Find the _Fields constant that matches name, or null if its not found.
8644
       */
8645
      public static _Fields findByName(String name) {
8646
        return byName.get(name);
8647
      }
8648
 
8649
      private final short _thriftId;
8650
      private final String _fieldName;
8651
 
8652
      _Fields(short thriftId, String fieldName) {
8653
        _thriftId = thriftId;
8654
        _fieldName = fieldName;
8655
      }
8656
 
8657
      public short getThriftFieldId() {
8658
        return _thriftId;
8659
      }
8660
 
8661
      public String getFieldName() {
8662
        return _fieldName;
8663
      }
8664
    }
8665
 
8666
    // isset id assignments
8667
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8668
    private static final int __SETDEFAULT_ISSET_ID = 1;
8669
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8670
 
8671
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8672
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8673
          new FieldValueMetaData(TType.I64)));
8674
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8675
          new StructMetaData(TType.STRUCT, Address.class)));
8676
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8677
          new FieldValueMetaData(TType.BOOL)));
8678
    }});
8679
 
8680
    static {
8681
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8682
    }
8683
 
8684
    public addAddressForUser_args() {
8685
    }
8686
 
8687
    public addAddressForUser_args(
8688
      long userId,
8689
      Address address,
8690
      boolean setDefault)
8691
    {
8692
      this();
8693
      this.userId = userId;
8694
      setUserIdIsSet(true);
8695
      this.address = address;
8696
      this.setDefault = setDefault;
8697
      setSetDefaultIsSet(true);
8698
    }
8699
 
8700
    /**
8701
     * Performs a deep copy on <i>other</i>.
8702
     */
8703
    public addAddressForUser_args(addAddressForUser_args other) {
8704
      __isset_bit_vector.clear();
8705
      __isset_bit_vector.or(other.__isset_bit_vector);
8706
      this.userId = other.userId;
8707
      if (other.isSetAddress()) {
8708
        this.address = new Address(other.address);
8709
      }
8710
      this.setDefault = other.setDefault;
8711
    }
8712
 
8713
    public addAddressForUser_args deepCopy() {
8714
      return new addAddressForUser_args(this);
8715
    }
8716
 
8717
    @Deprecated
8718
    public addAddressForUser_args clone() {
8719
      return new addAddressForUser_args(this);
8720
    }
8721
 
8722
    public long getUserId() {
8723
      return this.userId;
8724
    }
8725
 
8726
    public addAddressForUser_args setUserId(long userId) {
8727
      this.userId = userId;
8728
      setUserIdIsSet(true);
123 ashish 8729
      return this;
8730
    }
8731
 
553 chandransh 8732
    public void unsetUserId() {
8733
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8734
    }
8735
 
553 chandransh 8736
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8737
    public boolean isSetUserId() {
8738
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8739
    }
8740
 
553 chandransh 8741
    public void setUserIdIsSet(boolean value) {
8742
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8743
    }
8744
 
8745
    public Address getAddress() {
8746
      return this.address;
8747
    }
8748
 
8749
    public addAddressForUser_args setAddress(Address address) {
8750
      this.address = address;
8751
      return this;
8752
    }
8753
 
8754
    public void unsetAddress() {
8755
      this.address = null;
8756
    }
8757
 
8758
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8759
    public boolean isSetAddress() {
8760
      return this.address != null;
8761
    }
8762
 
8763
    public void setAddressIsSet(boolean value) {
123 ashish 8764
      if (!value) {
553 chandransh 8765
        this.address = null;
123 ashish 8766
      }
8767
    }
8768
 
553 chandransh 8769
    public boolean isSetDefault() {
8770
      return this.setDefault;
8771
    }
8772
 
8773
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8774
      this.setDefault = setDefault;
8775
      setSetDefaultIsSet(true);
8776
      return this;
8777
    }
8778
 
8779
    public void unsetSetDefault() {
8780
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8781
    }
8782
 
8783
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8784
    public boolean isSetSetDefault() {
8785
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8786
    }
8787
 
8788
    public void setSetDefaultIsSet(boolean value) {
8789
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8790
    }
8791
 
123 ashish 8792
    public void setFieldValue(_Fields field, Object value) {
8793
      switch (field) {
553 chandransh 8794
      case USER_ID:
123 ashish 8795
        if (value == null) {
553 chandransh 8796
          unsetUserId();
123 ashish 8797
        } else {
553 chandransh 8798
          setUserId((Long)value);
123 ashish 8799
        }
8800
        break;
8801
 
553 chandransh 8802
      case ADDRESS:
123 ashish 8803
        if (value == null) {
553 chandransh 8804
          unsetAddress();
123 ashish 8805
        } else {
553 chandransh 8806
          setAddress((Address)value);
123 ashish 8807
        }
8808
        break;
8809
 
553 chandransh 8810
      case SET_DEFAULT:
8811
        if (value == null) {
8812
          unsetSetDefault();
8813
        } else {
8814
          setSetDefault((Boolean)value);
8815
        }
8816
        break;
8817
 
123 ashish 8818
      }
8819
    }
8820
 
8821
    public void setFieldValue(int fieldID, Object value) {
8822
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8823
    }
8824
 
8825
    public Object getFieldValue(_Fields field) {
8826
      switch (field) {
553 chandransh 8827
      case USER_ID:
8828
        return new Long(getUserId());
123 ashish 8829
 
553 chandransh 8830
      case ADDRESS:
8831
        return getAddress();
123 ashish 8832
 
553 chandransh 8833
      case SET_DEFAULT:
8834
        return new Boolean(isSetDefault());
8835
 
123 ashish 8836
      }
8837
      throw new IllegalStateException();
8838
    }
8839
 
8840
    public Object getFieldValue(int fieldId) {
8841
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8842
    }
8843
 
8844
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8845
    public boolean isSet(_Fields field) {
8846
      switch (field) {
553 chandransh 8847
      case USER_ID:
8848
        return isSetUserId();
8849
      case ADDRESS:
8850
        return isSetAddress();
8851
      case SET_DEFAULT:
8852
        return isSetSetDefault();
123 ashish 8853
      }
8854
      throw new IllegalStateException();
8855
    }
8856
 
8857
    public boolean isSet(int fieldID) {
8858
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8859
    }
8860
 
8861
    @Override
8862
    public boolean equals(Object that) {
8863
      if (that == null)
8864
        return false;
553 chandransh 8865
      if (that instanceof addAddressForUser_args)
8866
        return this.equals((addAddressForUser_args)that);
123 ashish 8867
      return false;
8868
    }
8869
 
553 chandransh 8870
    public boolean equals(addAddressForUser_args that) {
123 ashish 8871
      if (that == null)
8872
        return false;
8873
 
553 chandransh 8874
      boolean this_present_userId = true;
8875
      boolean that_present_userId = true;
8876
      if (this_present_userId || that_present_userId) {
8877
        if (!(this_present_userId && that_present_userId))
123 ashish 8878
          return false;
553 chandransh 8879
        if (this.userId != that.userId)
123 ashish 8880
          return false;
8881
      }
8882
 
553 chandransh 8883
      boolean this_present_address = true && this.isSetAddress();
8884
      boolean that_present_address = true && that.isSetAddress();
8885
      if (this_present_address || that_present_address) {
8886
        if (!(this_present_address && that_present_address))
123 ashish 8887
          return false;
553 chandransh 8888
        if (!this.address.equals(that.address))
123 ashish 8889
          return false;
8890
      }
8891
 
553 chandransh 8892
      boolean this_present_setDefault = true;
8893
      boolean that_present_setDefault = true;
8894
      if (this_present_setDefault || that_present_setDefault) {
8895
        if (!(this_present_setDefault && that_present_setDefault))
8896
          return false;
8897
        if (this.setDefault != that.setDefault)
8898
          return false;
8899
      }
8900
 
123 ashish 8901
      return true;
8902
    }
8903
 
8904
    @Override
8905
    public int hashCode() {
8906
      return 0;
8907
    }
8908
 
553 chandransh 8909
    public int compareTo(addAddressForUser_args other) {
123 ashish 8910
      if (!getClass().equals(other.getClass())) {
8911
        return getClass().getName().compareTo(other.getClass().getName());
8912
      }
8913
 
8914
      int lastComparison = 0;
553 chandransh 8915
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8916
 
553 chandransh 8917
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8918
      if (lastComparison != 0) {
8919
        return lastComparison;
8920
      }
553 chandransh 8921
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8922
      if (lastComparison != 0) {
8923
        return lastComparison;
8924
      }
553 chandransh 8925
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8926
      if (lastComparison != 0) {
8927
        return lastComparison;
8928
      }
553 chandransh 8929
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8930
      if (lastComparison != 0) {
8931
        return lastComparison;
8932
      }
553 chandransh 8933
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8934
      if (lastComparison != 0) {
8935
        return lastComparison;
8936
      }
8937
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8938
      if (lastComparison != 0) {
8939
        return lastComparison;
8940
      }
123 ashish 8941
      return 0;
8942
    }
8943
 
8944
    public void read(TProtocol iprot) throws TException {
8945
      TField field;
8946
      iprot.readStructBegin();
8947
      while (true)
8948
      {
8949
        field = iprot.readFieldBegin();
8950
        if (field.type == TType.STOP) { 
8951
          break;
8952
        }
8953
        _Fields fieldId = _Fields.findByThriftId(field.id);
8954
        if (fieldId == null) {
8955
          TProtocolUtil.skip(iprot, field.type);
8956
        } else {
8957
          switch (fieldId) {
553 chandransh 8958
            case USER_ID:
8959
              if (field.type == TType.I64) {
8960
                this.userId = iprot.readI64();
8961
                setUserIdIsSet(true);
123 ashish 8962
              } else { 
8963
                TProtocolUtil.skip(iprot, field.type);
8964
              }
8965
              break;
553 chandransh 8966
            case ADDRESS:
8967
              if (field.type == TType.STRUCT) {
8968
                this.address = new Address();
8969
                this.address.read(iprot);
123 ashish 8970
              } else { 
8971
                TProtocolUtil.skip(iprot, field.type);
8972
              }
8973
              break;
553 chandransh 8974
            case SET_DEFAULT:
123 ashish 8975
              if (field.type == TType.BOOL) {
553 chandransh 8976
                this.setDefault = iprot.readBool();
8977
                setSetDefaultIsSet(true);
123 ashish 8978
              } else { 
8979
                TProtocolUtil.skip(iprot, field.type);
8980
              }
8981
              break;
8982
          }
8983
          iprot.readFieldEnd();
8984
        }
8985
      }
8986
      iprot.readStructEnd();
8987
      validate();
8988
    }
8989
 
8990
    public void write(TProtocol oprot) throws TException {
8991
      validate();
8992
 
8993
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8994
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8995
      oprot.writeI64(this.userId);
8996
      oprot.writeFieldEnd();
8997
      if (this.address != null) {
8998
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8999
        this.address.write(oprot);
123 ashish 9000
        oprot.writeFieldEnd();
9001
      }
553 chandransh 9002
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
9003
      oprot.writeBool(this.setDefault);
9004
      oprot.writeFieldEnd();
123 ashish 9005
      oprot.writeFieldStop();
9006
      oprot.writeStructEnd();
9007
    }
9008
 
9009
    @Override
9010
    public String toString() {
553 chandransh 9011
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 9012
      boolean first = true;
9013
 
553 chandransh 9014
      sb.append("userId:");
9015
      sb.append(this.userId);
123 ashish 9016
      first = false;
9017
      if (!first) sb.append(", ");
553 chandransh 9018
      sb.append("address:");
9019
      if (this.address == null) {
123 ashish 9020
        sb.append("null");
9021
      } else {
553 chandransh 9022
        sb.append(this.address);
123 ashish 9023
      }
9024
      first = false;
9025
      if (!first) sb.append(", ");
553 chandransh 9026
      sb.append("setDefault:");
9027
      sb.append(this.setDefault);
9028
      first = false;
123 ashish 9029
      sb.append(")");
9030
      return sb.toString();
9031
    }
9032
 
9033
    public void validate() throws TException {
9034
      // check for required fields
9035
    }
9036
 
9037
  }
9038
 
553 chandransh 9039
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
9040
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 9041
 
571 rajveer 9042
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 9043
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 9044
 
571 rajveer 9045
    private long success;
553 chandransh 9046
    private UserContextException ucx;
123 ashish 9047
 
9048
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9049
    public enum _Fields implements TFieldIdEnum {
9050
      SUCCESS((short)0, "success"),
553 chandransh 9051
      UCX((short)1, "ucx");
123 ashish 9052
 
9053
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9054
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9055
 
9056
      static {
9057
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9058
          byId.put((int)field._thriftId, field);
9059
          byName.put(field.getFieldName(), field);
9060
        }
9061
      }
9062
 
9063
      /**
9064
       * Find the _Fields constant that matches fieldId, or null if its not found.
9065
       */
9066
      public static _Fields findByThriftId(int fieldId) {
9067
        return byId.get(fieldId);
9068
      }
9069
 
9070
      /**
9071
       * Find the _Fields constant that matches fieldId, throwing an exception
9072
       * if it is not found.
9073
       */
9074
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9075
        _Fields fields = findByThriftId(fieldId);
9076
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9077
        return fields;
9078
      }
9079
 
9080
      /**
9081
       * Find the _Fields constant that matches name, or null if its not found.
9082
       */
9083
      public static _Fields findByName(String name) {
9084
        return byName.get(name);
9085
      }
9086
 
9087
      private final short _thriftId;
9088
      private final String _fieldName;
9089
 
9090
      _Fields(short thriftId, String fieldName) {
9091
        _thriftId = thriftId;
9092
        _fieldName = fieldName;
9093
      }
9094
 
9095
      public short getThriftFieldId() {
9096
        return _thriftId;
9097
      }
9098
 
9099
      public String getFieldName() {
9100
        return _fieldName;
9101
      }
9102
    }
9103
 
9104
    // isset id assignments
9105
    private static final int __SUCCESS_ISSET_ID = 0;
9106
    private BitSet __isset_bit_vector = new BitSet(1);
9107
 
9108
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9109
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 9110
          new FieldValueMetaData(TType.I64)));
553 chandransh 9111
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 9112
          new FieldValueMetaData(TType.STRUCT)));
9113
    }});
9114
 
9115
    static {
553 chandransh 9116
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 9117
    }
9118
 
553 chandransh 9119
    public addAddressForUser_result() {
123 ashish 9120
    }
9121
 
553 chandransh 9122
    public addAddressForUser_result(
571 rajveer 9123
      long success,
553 chandransh 9124
      UserContextException ucx)
123 ashish 9125
    {
9126
      this();
9127
      this.success = success;
9128
      setSuccessIsSet(true);
553 chandransh 9129
      this.ucx = ucx;
123 ashish 9130
    }
9131
 
9132
    /**
9133
     * Performs a deep copy on <i>other</i>.
9134
     */
553 chandransh 9135
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 9136
      __isset_bit_vector.clear();
9137
      __isset_bit_vector.or(other.__isset_bit_vector);
9138
      this.success = other.success;
553 chandransh 9139
      if (other.isSetUcx()) {
9140
        this.ucx = new UserContextException(other.ucx);
123 ashish 9141
      }
9142
    }
9143
 
553 chandransh 9144
    public addAddressForUser_result deepCopy() {
9145
      return new addAddressForUser_result(this);
123 ashish 9146
    }
9147
 
9148
    @Deprecated
553 chandransh 9149
    public addAddressForUser_result clone() {
9150
      return new addAddressForUser_result(this);
123 ashish 9151
    }
9152
 
571 rajveer 9153
    public long getSuccess() {
123 ashish 9154
      return this.success;
9155
    }
9156
 
571 rajveer 9157
    public addAddressForUser_result setSuccess(long success) {
123 ashish 9158
      this.success = success;
9159
      setSuccessIsSet(true);
9160
      return this;
9161
    }
9162
 
9163
    public void unsetSuccess() {
9164
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9165
    }
9166
 
9167
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9168
    public boolean isSetSuccess() {
9169
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9170
    }
9171
 
9172
    public void setSuccessIsSet(boolean value) {
9173
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9174
    }
9175
 
553 chandransh 9176
    public UserContextException getUcx() {
9177
      return this.ucx;
123 ashish 9178
    }
9179
 
553 chandransh 9180
    public addAddressForUser_result setUcx(UserContextException ucx) {
9181
      this.ucx = ucx;
123 ashish 9182
      return this;
9183
    }
9184
 
553 chandransh 9185
    public void unsetUcx() {
9186
      this.ucx = null;
123 ashish 9187
    }
9188
 
553 chandransh 9189
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9190
    public boolean isSetUcx() {
9191
      return this.ucx != null;
123 ashish 9192
    }
9193
 
553 chandransh 9194
    public void setUcxIsSet(boolean value) {
123 ashish 9195
      if (!value) {
553 chandransh 9196
        this.ucx = null;
123 ashish 9197
      }
9198
    }
9199
 
9200
    public void setFieldValue(_Fields field, Object value) {
9201
      switch (field) {
9202
      case SUCCESS:
9203
        if (value == null) {
9204
          unsetSuccess();
9205
        } else {
571 rajveer 9206
          setSuccess((Long)value);
123 ashish 9207
        }
9208
        break;
9209
 
553 chandransh 9210
      case UCX:
123 ashish 9211
        if (value == null) {
553 chandransh 9212
          unsetUcx();
123 ashish 9213
        } else {
553 chandransh 9214
          setUcx((UserContextException)value);
123 ashish 9215
        }
9216
        break;
9217
 
9218
      }
9219
    }
9220
 
9221
    public void setFieldValue(int fieldID, Object value) {
9222
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9223
    }
9224
 
9225
    public Object getFieldValue(_Fields field) {
9226
      switch (field) {
9227
      case SUCCESS:
571 rajveer 9228
        return new Long(getSuccess());
123 ashish 9229
 
553 chandransh 9230
      case UCX:
9231
        return getUcx();
123 ashish 9232
 
9233
      }
9234
      throw new IllegalStateException();
9235
    }
9236
 
9237
    public Object getFieldValue(int fieldId) {
9238
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9239
    }
9240
 
9241
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9242
    public boolean isSet(_Fields field) {
9243
      switch (field) {
9244
      case SUCCESS:
9245
        return isSetSuccess();
553 chandransh 9246
      case UCX:
9247
        return isSetUcx();
123 ashish 9248
      }
9249
      throw new IllegalStateException();
9250
    }
9251
 
9252
    public boolean isSet(int fieldID) {
9253
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9254
    }
9255
 
9256
    @Override
9257
    public boolean equals(Object that) {
9258
      if (that == null)
9259
        return false;
553 chandransh 9260
      if (that instanceof addAddressForUser_result)
9261
        return this.equals((addAddressForUser_result)that);
123 ashish 9262
      return false;
9263
    }
9264
 
553 chandransh 9265
    public boolean equals(addAddressForUser_result that) {
123 ashish 9266
      if (that == null)
9267
        return false;
9268
 
9269
      boolean this_present_success = true;
9270
      boolean that_present_success = true;
9271
      if (this_present_success || that_present_success) {
9272
        if (!(this_present_success && that_present_success))
9273
          return false;
9274
        if (this.success != that.success)
9275
          return false;
9276
      }
9277
 
553 chandransh 9278
      boolean this_present_ucx = true && this.isSetUcx();
9279
      boolean that_present_ucx = true && that.isSetUcx();
9280
      if (this_present_ucx || that_present_ucx) {
9281
        if (!(this_present_ucx && that_present_ucx))
123 ashish 9282
          return false;
553 chandransh 9283
        if (!this.ucx.equals(that.ucx))
123 ashish 9284
          return false;
9285
      }
9286
 
9287
      return true;
9288
    }
9289
 
9290
    @Override
9291
    public int hashCode() {
9292
      return 0;
9293
    }
9294
 
553 chandransh 9295
    public int compareTo(addAddressForUser_result other) {
123 ashish 9296
      if (!getClass().equals(other.getClass())) {
9297
        return getClass().getName().compareTo(other.getClass().getName());
9298
      }
9299
 
9300
      int lastComparison = 0;
553 chandransh 9301
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 9302
 
9303
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9304
      if (lastComparison != 0) {
9305
        return lastComparison;
9306
      }
9307
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9308
      if (lastComparison != 0) {
9309
        return lastComparison;
9310
      }
553 chandransh 9311
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 9312
      if (lastComparison != 0) {
9313
        return lastComparison;
9314
      }
553 chandransh 9315
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 9316
      if (lastComparison != 0) {
9317
        return lastComparison;
9318
      }
9319
      return 0;
9320
    }
9321
 
9322
    public void read(TProtocol iprot) throws TException {
9323
      TField field;
9324
      iprot.readStructBegin();
9325
      while (true)
9326
      {
9327
        field = iprot.readFieldBegin();
9328
        if (field.type == TType.STOP) { 
9329
          break;
9330
        }
9331
        _Fields fieldId = _Fields.findByThriftId(field.id);
9332
        if (fieldId == null) {
9333
          TProtocolUtil.skip(iprot, field.type);
9334
        } else {
9335
          switch (fieldId) {
9336
            case SUCCESS:
571 rajveer 9337
              if (field.type == TType.I64) {
9338
                this.success = iprot.readI64();
123 ashish 9339
                setSuccessIsSet(true);
9340
              } else { 
9341
                TProtocolUtil.skip(iprot, field.type);
9342
              }
9343
              break;
553 chandransh 9344
            case UCX:
123 ashish 9345
              if (field.type == TType.STRUCT) {
553 chandransh 9346
                this.ucx = new UserContextException();
9347
                this.ucx.read(iprot);
123 ashish 9348
              } else { 
9349
                TProtocolUtil.skip(iprot, field.type);
9350
              }
9351
              break;
9352
          }
9353
          iprot.readFieldEnd();
9354
        }
9355
      }
9356
      iprot.readStructEnd();
9357
      validate();
9358
    }
9359
 
9360
    public void write(TProtocol oprot) throws TException {
9361
      oprot.writeStructBegin(STRUCT_DESC);
9362
 
9363
      if (this.isSetSuccess()) {
9364
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 9365
        oprot.writeI64(this.success);
123 ashish 9366
        oprot.writeFieldEnd();
553 chandransh 9367
      } else if (this.isSetUcx()) {
9368
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9369
        this.ucx.write(oprot);
123 ashish 9370
        oprot.writeFieldEnd();
9371
      }
9372
      oprot.writeFieldStop();
9373
      oprot.writeStructEnd();
9374
    }
9375
 
9376
    @Override
9377
    public String toString() {
553 chandransh 9378
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 9379
      boolean first = true;
9380
 
9381
      sb.append("success:");
9382
      sb.append(this.success);
9383
      first = false;
9384
      if (!first) sb.append(", ");
553 chandransh 9385
      sb.append("ucx:");
9386
      if (this.ucx == null) {
123 ashish 9387
        sb.append("null");
9388
      } else {
553 chandransh 9389
        sb.append(this.ucx);
123 ashish 9390
      }
9391
      first = false;
9392
      sb.append(")");
9393
      return sb.toString();
9394
    }
9395
 
9396
    public void validate() throws TException {
9397
      // check for required fields
9398
    }
9399
 
9400
  }
9401
 
553 chandransh 9402
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9403
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 9404
 
553 chandransh 9405
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9406
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 9407
 
553 chandransh 9408
    private long userid;
9409
    private long addressId;
48 ashish 9410
 
9411
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9412
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9413
      USERID((short)1, "userid"),
9414
      ADDRESS_ID((short)2, "addressId");
48 ashish 9415
 
9416
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9417
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9418
 
9419
      static {
9420
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9421
          byId.put((int)field._thriftId, field);
9422
          byName.put(field.getFieldName(), field);
9423
        }
9424
      }
9425
 
9426
      /**
9427
       * Find the _Fields constant that matches fieldId, or null if its not found.
9428
       */
9429
      public static _Fields findByThriftId(int fieldId) {
9430
        return byId.get(fieldId);
9431
      }
9432
 
9433
      /**
9434
       * Find the _Fields constant that matches fieldId, throwing an exception
9435
       * if it is not found.
9436
       */
9437
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9438
        _Fields fields = findByThriftId(fieldId);
9439
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9440
        return fields;
9441
      }
9442
 
9443
      /**
9444
       * Find the _Fields constant that matches name, or null if its not found.
9445
       */
9446
      public static _Fields findByName(String name) {
9447
        return byName.get(name);
9448
      }
9449
 
9450
      private final short _thriftId;
9451
      private final String _fieldName;
9452
 
9453
      _Fields(short thriftId, String fieldName) {
9454
        _thriftId = thriftId;
9455
        _fieldName = fieldName;
9456
      }
9457
 
9458
      public short getThriftFieldId() {
9459
        return _thriftId;
9460
      }
9461
 
9462
      public String getFieldName() {
9463
        return _fieldName;
9464
      }
9465
    }
9466
 
9467
    // isset id assignments
553 chandransh 9468
    private static final int __USERID_ISSET_ID = 0;
9469
    private static final int __ADDRESSID_ISSET_ID = 1;
9470
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 9471
 
9472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9473
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9474
          new FieldValueMetaData(TType.I64)));
9475
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9476
          new FieldValueMetaData(TType.I64)));
48 ashish 9477
    }});
9478
 
9479
    static {
553 chandransh 9480
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 9481
    }
9482
 
553 chandransh 9483
    public removeAddressForUser_args() {
48 ashish 9484
    }
9485
 
553 chandransh 9486
    public removeAddressForUser_args(
9487
      long userid,
9488
      long addressId)
48 ashish 9489
    {
9490
      this();
553 chandransh 9491
      this.userid = userid;
9492
      setUseridIsSet(true);
9493
      this.addressId = addressId;
9494
      setAddressIdIsSet(true);
48 ashish 9495
    }
9496
 
9497
    /**
9498
     * Performs a deep copy on <i>other</i>.
9499
     */
553 chandransh 9500
    public removeAddressForUser_args(removeAddressForUser_args other) {
9501
      __isset_bit_vector.clear();
9502
      __isset_bit_vector.or(other.__isset_bit_vector);
9503
      this.userid = other.userid;
9504
      this.addressId = other.addressId;
48 ashish 9505
    }
9506
 
553 chandransh 9507
    public removeAddressForUser_args deepCopy() {
9508
      return new removeAddressForUser_args(this);
48 ashish 9509
    }
9510
 
9511
    @Deprecated
553 chandransh 9512
    public removeAddressForUser_args clone() {
9513
      return new removeAddressForUser_args(this);
48 ashish 9514
    }
9515
 
553 chandransh 9516
    public long getUserid() {
9517
      return this.userid;
48 ashish 9518
    }
9519
 
553 chandransh 9520
    public removeAddressForUser_args setUserid(long userid) {
9521
      this.userid = userid;
9522
      setUseridIsSet(true);
48 ashish 9523
      return this;
9524
    }
9525
 
553 chandransh 9526
    public void unsetUserid() {
9527
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9528
    }
9529
 
553 chandransh 9530
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9531
    public boolean isSetUserid() {
9532
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9533
    }
9534
 
553 chandransh 9535
    public void setUseridIsSet(boolean value) {
9536
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9537
    }
9538
 
553 chandransh 9539
    public long getAddressId() {
9540
      return this.addressId;
9541
    }
9542
 
9543
    public removeAddressForUser_args setAddressId(long addressId) {
9544
      this.addressId = addressId;
9545
      setAddressIdIsSet(true);
9546
      return this;
9547
    }
9548
 
9549
    public void unsetAddressId() {
9550
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9551
    }
9552
 
9553
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9554
    public boolean isSetAddressId() {
9555
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9556
    }
9557
 
9558
    public void setAddressIdIsSet(boolean value) {
9559
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9560
    }
9561
 
48 ashish 9562
    public void setFieldValue(_Fields field, Object value) {
9563
      switch (field) {
553 chandransh 9564
      case USERID:
48 ashish 9565
        if (value == null) {
553 chandransh 9566
          unsetUserid();
48 ashish 9567
        } else {
553 chandransh 9568
          setUserid((Long)value);
48 ashish 9569
        }
9570
        break;
9571
 
553 chandransh 9572
      case ADDRESS_ID:
9573
        if (value == null) {
9574
          unsetAddressId();
9575
        } else {
9576
          setAddressId((Long)value);
9577
        }
9578
        break;
9579
 
48 ashish 9580
      }
9581
    }
9582
 
9583
    public void setFieldValue(int fieldID, Object value) {
9584
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9585
    }
9586
 
9587
    public Object getFieldValue(_Fields field) {
9588
      switch (field) {
553 chandransh 9589
      case USERID:
9590
        return new Long(getUserid());
48 ashish 9591
 
553 chandransh 9592
      case ADDRESS_ID:
9593
        return new Long(getAddressId());
9594
 
48 ashish 9595
      }
9596
      throw new IllegalStateException();
9597
    }
9598
 
9599
    public Object getFieldValue(int fieldId) {
9600
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9601
    }
9602
 
9603
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9604
    public boolean isSet(_Fields field) {
9605
      switch (field) {
553 chandransh 9606
      case USERID:
9607
        return isSetUserid();
9608
      case ADDRESS_ID:
9609
        return isSetAddressId();
48 ashish 9610
      }
9611
      throw new IllegalStateException();
9612
    }
9613
 
9614
    public boolean isSet(int fieldID) {
9615
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9616
    }
9617
 
9618
    @Override
9619
    public boolean equals(Object that) {
9620
      if (that == null)
9621
        return false;
553 chandransh 9622
      if (that instanceof removeAddressForUser_args)
9623
        return this.equals((removeAddressForUser_args)that);
48 ashish 9624
      return false;
9625
    }
9626
 
553 chandransh 9627
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9628
      if (that == null)
9629
        return false;
9630
 
553 chandransh 9631
      boolean this_present_userid = true;
9632
      boolean that_present_userid = true;
9633
      if (this_present_userid || that_present_userid) {
9634
        if (!(this_present_userid && that_present_userid))
48 ashish 9635
          return false;
553 chandransh 9636
        if (this.userid != that.userid)
48 ashish 9637
          return false;
9638
      }
9639
 
553 chandransh 9640
      boolean this_present_addressId = true;
9641
      boolean that_present_addressId = true;
9642
      if (this_present_addressId || that_present_addressId) {
9643
        if (!(this_present_addressId && that_present_addressId))
9644
          return false;
9645
        if (this.addressId != that.addressId)
9646
          return false;
9647
      }
9648
 
48 ashish 9649
      return true;
9650
    }
9651
 
9652
    @Override
9653
    public int hashCode() {
9654
      return 0;
9655
    }
9656
 
553 chandransh 9657
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9658
      if (!getClass().equals(other.getClass())) {
9659
        return getClass().getName().compareTo(other.getClass().getName());
9660
      }
9661
 
9662
      int lastComparison = 0;
553 chandransh 9663
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9664
 
553 chandransh 9665
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9666
      if (lastComparison != 0) {
9667
        return lastComparison;
9668
      }
553 chandransh 9669
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9670
      if (lastComparison != 0) {
9671
        return lastComparison;
9672
      }
553 chandransh 9673
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9674
      if (lastComparison != 0) {
9675
        return lastComparison;
9676
      }
9677
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9678
      if (lastComparison != 0) {
9679
        return lastComparison;
9680
      }
48 ashish 9681
      return 0;
9682
    }
9683
 
9684
    public void read(TProtocol iprot) throws TException {
9685
      TField field;
9686
      iprot.readStructBegin();
9687
      while (true)
9688
      {
9689
        field = iprot.readFieldBegin();
9690
        if (field.type == TType.STOP) { 
9691
          break;
9692
        }
9693
        _Fields fieldId = _Fields.findByThriftId(field.id);
9694
        if (fieldId == null) {
9695
          TProtocolUtil.skip(iprot, field.type);
9696
        } else {
9697
          switch (fieldId) {
553 chandransh 9698
            case USERID:
9699
              if (field.type == TType.I64) {
9700
                this.userid = iprot.readI64();
9701
                setUseridIsSet(true);
48 ashish 9702
              } else { 
9703
                TProtocolUtil.skip(iprot, field.type);
9704
              }
9705
              break;
553 chandransh 9706
            case ADDRESS_ID:
9707
              if (field.type == TType.I64) {
9708
                this.addressId = iprot.readI64();
9709
                setAddressIdIsSet(true);
9710
              } else { 
9711
                TProtocolUtil.skip(iprot, field.type);
9712
              }
9713
              break;
48 ashish 9714
          }
9715
          iprot.readFieldEnd();
9716
        }
9717
      }
9718
      iprot.readStructEnd();
9719
      validate();
9720
    }
9721
 
9722
    public void write(TProtocol oprot) throws TException {
9723
      validate();
9724
 
9725
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9726
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9727
      oprot.writeI64(this.userid);
9728
      oprot.writeFieldEnd();
9729
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9730
      oprot.writeI64(this.addressId);
9731
      oprot.writeFieldEnd();
48 ashish 9732
      oprot.writeFieldStop();
9733
      oprot.writeStructEnd();
9734
    }
9735
 
9736
    @Override
9737
    public String toString() {
553 chandransh 9738
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9739
      boolean first = true;
9740
 
553 chandransh 9741
      sb.append("userid:");
9742
      sb.append(this.userid);
48 ashish 9743
      first = false;
553 chandransh 9744
      if (!first) sb.append(", ");
9745
      sb.append("addressId:");
9746
      sb.append(this.addressId);
9747
      first = false;
48 ashish 9748
      sb.append(")");
9749
      return sb.toString();
9750
    }
9751
 
9752
    public void validate() throws TException {
9753
      // check for required fields
9754
    }
9755
 
9756
  }
9757
 
553 chandransh 9758
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9759
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9760
 
9761
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9762
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9763
 
9764
    private boolean success;
9765
    private UserContextException ucx;
9766
 
9767
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9768
    public enum _Fields implements TFieldIdEnum {
9769
      SUCCESS((short)0, "success"),
9770
      UCX((short)1, "ucx");
9771
 
9772
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9773
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9774
 
9775
      static {
9776
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9777
          byId.put((int)field._thriftId, field);
9778
          byName.put(field.getFieldName(), field);
9779
        }
9780
      }
9781
 
9782
      /**
9783
       * Find the _Fields constant that matches fieldId, or null if its not found.
9784
       */
9785
      public static _Fields findByThriftId(int fieldId) {
9786
        return byId.get(fieldId);
9787
      }
9788
 
9789
      /**
9790
       * Find the _Fields constant that matches fieldId, throwing an exception
9791
       * if it is not found.
9792
       */
9793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9794
        _Fields fields = findByThriftId(fieldId);
9795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9796
        return fields;
9797
      }
9798
 
9799
      /**
9800
       * Find the _Fields constant that matches name, or null if its not found.
9801
       */
9802
      public static _Fields findByName(String name) {
9803
        return byName.get(name);
9804
      }
9805
 
9806
      private final short _thriftId;
9807
      private final String _fieldName;
9808
 
9809
      _Fields(short thriftId, String fieldName) {
9810
        _thriftId = thriftId;
9811
        _fieldName = fieldName;
9812
      }
9813
 
9814
      public short getThriftFieldId() {
9815
        return _thriftId;
9816
      }
9817
 
9818
      public String getFieldName() {
9819
        return _fieldName;
9820
      }
9821
    }
9822
 
9823
    // isset id assignments
9824
    private static final int __SUCCESS_ISSET_ID = 0;
9825
    private BitSet __isset_bit_vector = new BitSet(1);
9826
 
9827
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9828
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9829
          new FieldValueMetaData(TType.BOOL)));
9830
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9831
          new FieldValueMetaData(TType.STRUCT)));
9832
    }});
9833
 
9834
    static {
553 chandransh 9835
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9836
    }
9837
 
553 chandransh 9838
    public removeAddressForUser_result() {
48 ashish 9839
    }
9840
 
553 chandransh 9841
    public removeAddressForUser_result(
48 ashish 9842
      boolean success,
9843
      UserContextException ucx)
9844
    {
9845
      this();
9846
      this.success = success;
9847
      setSuccessIsSet(true);
9848
      this.ucx = ucx;
9849
    }
9850
 
9851
    /**
9852
     * Performs a deep copy on <i>other</i>.
9853
     */
553 chandransh 9854
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9855
      __isset_bit_vector.clear();
9856
      __isset_bit_vector.or(other.__isset_bit_vector);
9857
      this.success = other.success;
9858
      if (other.isSetUcx()) {
9859
        this.ucx = new UserContextException(other.ucx);
9860
      }
9861
    }
9862
 
553 chandransh 9863
    public removeAddressForUser_result deepCopy() {
9864
      return new removeAddressForUser_result(this);
48 ashish 9865
    }
9866
 
9867
    @Deprecated
553 chandransh 9868
    public removeAddressForUser_result clone() {
9869
      return new removeAddressForUser_result(this);
48 ashish 9870
    }
9871
 
9872
    public boolean isSuccess() {
9873
      return this.success;
9874
    }
9875
 
553 chandransh 9876
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9877
      this.success = success;
9878
      setSuccessIsSet(true);
9879
      return this;
9880
    }
9881
 
9882
    public void unsetSuccess() {
9883
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9884
    }
9885
 
9886
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9887
    public boolean isSetSuccess() {
9888
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9889
    }
9890
 
9891
    public void setSuccessIsSet(boolean value) {
9892
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9893
    }
9894
 
9895
    public UserContextException getUcx() {
9896
      return this.ucx;
9897
    }
9898
 
553 chandransh 9899
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9900
      this.ucx = ucx;
9901
      return this;
9902
    }
9903
 
9904
    public void unsetUcx() {
9905
      this.ucx = null;
9906
    }
9907
 
9908
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9909
    public boolean isSetUcx() {
9910
      return this.ucx != null;
9911
    }
9912
 
9913
    public void setUcxIsSet(boolean value) {
9914
      if (!value) {
9915
        this.ucx = null;
9916
      }
9917
    }
9918
 
9919
    public void setFieldValue(_Fields field, Object value) {
9920
      switch (field) {
9921
      case SUCCESS:
9922
        if (value == null) {
9923
          unsetSuccess();
9924
        } else {
9925
          setSuccess((Boolean)value);
9926
        }
9927
        break;
9928
 
9929
      case UCX:
9930
        if (value == null) {
9931
          unsetUcx();
9932
        } else {
9933
          setUcx((UserContextException)value);
9934
        }
9935
        break;
9936
 
9937
      }
9938
    }
9939
 
9940
    public void setFieldValue(int fieldID, Object value) {
9941
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9942
    }
9943
 
9944
    public Object getFieldValue(_Fields field) {
9945
      switch (field) {
9946
      case SUCCESS:
9947
        return new Boolean(isSuccess());
9948
 
9949
      case UCX:
9950
        return getUcx();
9951
 
9952
      }
9953
      throw new IllegalStateException();
9954
    }
9955
 
9956
    public Object getFieldValue(int fieldId) {
9957
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9958
    }
9959
 
9960
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9961
    public boolean isSet(_Fields field) {
9962
      switch (field) {
9963
      case SUCCESS:
9964
        return isSetSuccess();
9965
      case UCX:
9966
        return isSetUcx();
9967
      }
9968
      throw new IllegalStateException();
9969
    }
9970
 
9971
    public boolean isSet(int fieldID) {
9972
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9973
    }
9974
 
9975
    @Override
9976
    public boolean equals(Object that) {
9977
      if (that == null)
9978
        return false;
553 chandransh 9979
      if (that instanceof removeAddressForUser_result)
9980
        return this.equals((removeAddressForUser_result)that);
48 ashish 9981
      return false;
9982
    }
9983
 
553 chandransh 9984
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9985
      if (that == null)
9986
        return false;
9987
 
9988
      boolean this_present_success = true;
9989
      boolean that_present_success = true;
9990
      if (this_present_success || that_present_success) {
9991
        if (!(this_present_success && that_present_success))
9992
          return false;
9993
        if (this.success != that.success)
9994
          return false;
9995
      }
9996
 
9997
      boolean this_present_ucx = true && this.isSetUcx();
9998
      boolean that_present_ucx = true && that.isSetUcx();
9999
      if (this_present_ucx || that_present_ucx) {
10000
        if (!(this_present_ucx && that_present_ucx))
10001
          return false;
10002
        if (!this.ucx.equals(that.ucx))
10003
          return false;
10004
      }
10005
 
10006
      return true;
10007
    }
10008
 
10009
    @Override
10010
    public int hashCode() {
10011
      return 0;
10012
    }
10013
 
553 chandransh 10014
    public int compareTo(removeAddressForUser_result other) {
48 ashish 10015
      if (!getClass().equals(other.getClass())) {
10016
        return getClass().getName().compareTo(other.getClass().getName());
10017
      }
10018
 
10019
      int lastComparison = 0;
553 chandransh 10020
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 10021
 
10022
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10023
      if (lastComparison != 0) {
10024
        return lastComparison;
10025
      }
10026
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10027
      if (lastComparison != 0) {
10028
        return lastComparison;
10029
      }
10030
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10031
      if (lastComparison != 0) {
10032
        return lastComparison;
10033
      }
10034
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10035
      if (lastComparison != 0) {
10036
        return lastComparison;
10037
      }
10038
      return 0;
10039
    }
10040
 
10041
    public void read(TProtocol iprot) throws TException {
10042
      TField field;
10043
      iprot.readStructBegin();
10044
      while (true)
10045
      {
10046
        field = iprot.readFieldBegin();
10047
        if (field.type == TType.STOP) { 
10048
          break;
10049
        }
10050
        _Fields fieldId = _Fields.findByThriftId(field.id);
10051
        if (fieldId == null) {
10052
          TProtocolUtil.skip(iprot, field.type);
10053
        } else {
10054
          switch (fieldId) {
10055
            case SUCCESS:
10056
              if (field.type == TType.BOOL) {
10057
                this.success = iprot.readBool();
10058
                setSuccessIsSet(true);
10059
              } else { 
10060
                TProtocolUtil.skip(iprot, field.type);
10061
              }
10062
              break;
10063
            case UCX:
10064
              if (field.type == TType.STRUCT) {
10065
                this.ucx = new UserContextException();
10066
                this.ucx.read(iprot);
10067
              } else { 
10068
                TProtocolUtil.skip(iprot, field.type);
10069
              }
10070
              break;
10071
          }
10072
          iprot.readFieldEnd();
10073
        }
10074
      }
10075
      iprot.readStructEnd();
10076
      validate();
10077
    }
10078
 
10079
    public void write(TProtocol oprot) throws TException {
10080
      oprot.writeStructBegin(STRUCT_DESC);
10081
 
10082
      if (this.isSetSuccess()) {
10083
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10084
        oprot.writeBool(this.success);
10085
        oprot.writeFieldEnd();
10086
      } else if (this.isSetUcx()) {
10087
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10088
        this.ucx.write(oprot);
10089
        oprot.writeFieldEnd();
10090
      }
10091
      oprot.writeFieldStop();
10092
      oprot.writeStructEnd();
10093
    }
10094
 
10095
    @Override
10096
    public String toString() {
553 chandransh 10097
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 10098
      boolean first = true;
10099
 
10100
      sb.append("success:");
10101
      sb.append(this.success);
10102
      first = false;
10103
      if (!first) sb.append(", ");
10104
      sb.append("ucx:");
10105
      if (this.ucx == null) {
10106
        sb.append("null");
10107
      } else {
10108
        sb.append(this.ucx);
10109
      }
10110
      first = false;
10111
      sb.append(")");
10112
      return sb.toString();
10113
    }
10114
 
10115
    public void validate() throws TException {
10116
      // check for required fields
10117
    }
10118
 
10119
  }
10120
 
553 chandransh 10121
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10122
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 10123
 
553 chandransh 10124
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 10125
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10126
 
553 chandransh 10127
    private long userId;
48 ashish 10128
    private long timestamp;
10129
 
10130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10131
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10132
      USER_ID((short)1, "userId"),
10133
      TIMESTAMP((short)2, "timestamp");
48 ashish 10134
 
10135
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10136
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10137
 
10138
      static {
10139
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10140
          byId.put((int)field._thriftId, field);
10141
          byName.put(field.getFieldName(), field);
10142
        }
10143
      }
10144
 
10145
      /**
10146
       * Find the _Fields constant that matches fieldId, or null if its not found.
10147
       */
10148
      public static _Fields findByThriftId(int fieldId) {
10149
        return byId.get(fieldId);
10150
      }
10151
 
10152
      /**
10153
       * Find the _Fields constant that matches fieldId, throwing an exception
10154
       * if it is not found.
10155
       */
10156
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10157
        _Fields fields = findByThriftId(fieldId);
10158
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10159
        return fields;
10160
      }
10161
 
10162
      /**
10163
       * Find the _Fields constant that matches name, or null if its not found.
10164
       */
10165
      public static _Fields findByName(String name) {
10166
        return byName.get(name);
10167
      }
10168
 
10169
      private final short _thriftId;
10170
      private final String _fieldName;
10171
 
10172
      _Fields(short thriftId, String fieldName) {
10173
        _thriftId = thriftId;
10174
        _fieldName = fieldName;
10175
      }
10176
 
10177
      public short getThriftFieldId() {
10178
        return _thriftId;
10179
      }
10180
 
10181
      public String getFieldName() {
10182
        return _fieldName;
10183
      }
10184
    }
10185
 
10186
    // isset id assignments
553 chandransh 10187
    private static final int __USERID_ISSET_ID = 0;
10188
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 10189
    private BitSet __isset_bit_vector = new BitSet(2);
10190
 
10191
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10192
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10193
          new FieldValueMetaData(TType.I64)));
48 ashish 10194
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10195
          new FieldValueMetaData(TType.I64)));
10196
    }});
10197
 
10198
    static {
553 chandransh 10199
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 10200
    }
10201
 
553 chandransh 10202
    public setUserAsLoggedIn_args() {
48 ashish 10203
    }
10204
 
553 chandransh 10205
    public setUserAsLoggedIn_args(
10206
      long userId,
10207
      long timestamp)
48 ashish 10208
    {
10209
      this();
553 chandransh 10210
      this.userId = userId;
10211
      setUserIdIsSet(true);
48 ashish 10212
      this.timestamp = timestamp;
10213
      setTimestampIsSet(true);
10214
    }
10215
 
10216
    /**
10217
     * Performs a deep copy on <i>other</i>.
10218
     */
553 chandransh 10219
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 10220
      __isset_bit_vector.clear();
10221
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 10222
      this.userId = other.userId;
48 ashish 10223
      this.timestamp = other.timestamp;
10224
    }
10225
 
553 chandransh 10226
    public setUserAsLoggedIn_args deepCopy() {
10227
      return new setUserAsLoggedIn_args(this);
48 ashish 10228
    }
10229
 
10230
    @Deprecated
553 chandransh 10231
    public setUserAsLoggedIn_args clone() {
10232
      return new setUserAsLoggedIn_args(this);
48 ashish 10233
    }
10234
 
553 chandransh 10235
    public long getUserId() {
10236
      return this.userId;
48 ashish 10237
    }
10238
 
553 chandransh 10239
    public setUserAsLoggedIn_args setUserId(long userId) {
10240
      this.userId = userId;
10241
      setUserIdIsSet(true);
48 ashish 10242
      return this;
10243
    }
10244
 
553 chandransh 10245
    public void unsetUserId() {
10246
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10247
    }
10248
 
553 chandransh 10249
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10250
    public boolean isSetUserId() {
10251
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10252
    }
10253
 
553 chandransh 10254
    public void setUserIdIsSet(boolean value) {
10255
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10256
    }
10257
 
10258
    public long getTimestamp() {
10259
      return this.timestamp;
10260
    }
10261
 
553 chandransh 10262
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 10263
      this.timestamp = timestamp;
10264
      setTimestampIsSet(true);
10265
      return this;
10266
    }
10267
 
10268
    public void unsetTimestamp() {
10269
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10270
    }
10271
 
10272
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10273
    public boolean isSetTimestamp() {
10274
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10275
    }
10276
 
10277
    public void setTimestampIsSet(boolean value) {
10278
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10279
    }
10280
 
10281
    public void setFieldValue(_Fields field, Object value) {
10282
      switch (field) {
553 chandransh 10283
      case USER_ID:
48 ashish 10284
        if (value == null) {
553 chandransh 10285
          unsetUserId();
48 ashish 10286
        } else {
553 chandransh 10287
          setUserId((Long)value);
48 ashish 10288
        }
10289
        break;
10290
 
10291
      case TIMESTAMP:
10292
        if (value == null) {
10293
          unsetTimestamp();
10294
        } else {
10295
          setTimestamp((Long)value);
10296
        }
10297
        break;
10298
 
10299
      }
10300
    }
10301
 
10302
    public void setFieldValue(int fieldID, Object value) {
10303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10304
    }
10305
 
10306
    public Object getFieldValue(_Fields field) {
10307
      switch (field) {
553 chandransh 10308
      case USER_ID:
10309
        return new Long(getUserId());
48 ashish 10310
 
10311
      case TIMESTAMP:
10312
        return new Long(getTimestamp());
10313
 
10314
      }
10315
      throw new IllegalStateException();
10316
    }
10317
 
10318
    public Object getFieldValue(int fieldId) {
10319
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10320
    }
10321
 
10322
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10323
    public boolean isSet(_Fields field) {
10324
      switch (field) {
553 chandransh 10325
      case USER_ID:
10326
        return isSetUserId();
48 ashish 10327
      case TIMESTAMP:
10328
        return isSetTimestamp();
10329
      }
10330
      throw new IllegalStateException();
10331
    }
10332
 
10333
    public boolean isSet(int fieldID) {
10334
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10335
    }
10336
 
10337
    @Override
10338
    public boolean equals(Object that) {
10339
      if (that == null)
10340
        return false;
553 chandransh 10341
      if (that instanceof setUserAsLoggedIn_args)
10342
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 10343
      return false;
10344
    }
10345
 
553 chandransh 10346
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 10347
      if (that == null)
10348
        return false;
10349
 
553 chandransh 10350
      boolean this_present_userId = true;
10351
      boolean that_present_userId = true;
10352
      if (this_present_userId || that_present_userId) {
10353
        if (!(this_present_userId && that_present_userId))
48 ashish 10354
          return false;
553 chandransh 10355
        if (this.userId != that.userId)
48 ashish 10356
          return false;
10357
      }
10358
 
10359
      boolean this_present_timestamp = true;
10360
      boolean that_present_timestamp = true;
10361
      if (this_present_timestamp || that_present_timestamp) {
10362
        if (!(this_present_timestamp && that_present_timestamp))
10363
          return false;
10364
        if (this.timestamp != that.timestamp)
10365
          return false;
10366
      }
10367
 
10368
      return true;
10369
    }
10370
 
10371
    @Override
10372
    public int hashCode() {
10373
      return 0;
10374
    }
10375
 
553 chandransh 10376
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 10377
      if (!getClass().equals(other.getClass())) {
10378
        return getClass().getName().compareTo(other.getClass().getName());
10379
      }
10380
 
10381
      int lastComparison = 0;
553 chandransh 10382
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 10383
 
553 chandransh 10384
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 10385
      if (lastComparison != 0) {
10386
        return lastComparison;
10387
      }
553 chandransh 10388
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 10389
      if (lastComparison != 0) {
10390
        return lastComparison;
10391
      }
10392
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10393
      if (lastComparison != 0) {
10394
        return lastComparison;
10395
      }
10396
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10397
      if (lastComparison != 0) {
10398
        return lastComparison;
10399
      }
10400
      return 0;
10401
    }
10402
 
10403
    public void read(TProtocol iprot) throws TException {
10404
      TField field;
10405
      iprot.readStructBegin();
10406
      while (true)
10407
      {
10408
        field = iprot.readFieldBegin();
10409
        if (field.type == TType.STOP) { 
10410
          break;
10411
        }
10412
        _Fields fieldId = _Fields.findByThriftId(field.id);
10413
        if (fieldId == null) {
10414
          TProtocolUtil.skip(iprot, field.type);
10415
        } else {
10416
          switch (fieldId) {
553 chandransh 10417
            case USER_ID:
10418
              if (field.type == TType.I64) {
10419
                this.userId = iprot.readI64();
10420
                setUserIdIsSet(true);
48 ashish 10421
              } else { 
10422
                TProtocolUtil.skip(iprot, field.type);
10423
              }
10424
              break;
10425
            case TIMESTAMP:
10426
              if (field.type == TType.I64) {
10427
                this.timestamp = iprot.readI64();
10428
                setTimestampIsSet(true);
10429
              } else { 
10430
                TProtocolUtil.skip(iprot, field.type);
10431
              }
10432
              break;
10433
          }
10434
          iprot.readFieldEnd();
10435
        }
10436
      }
10437
      iprot.readStructEnd();
10438
      validate();
10439
    }
10440
 
10441
    public void write(TProtocol oprot) throws TException {
10442
      validate();
10443
 
10444
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10445
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10446
      oprot.writeI64(this.userId);
10447
      oprot.writeFieldEnd();
48 ashish 10448
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10449
      oprot.writeI64(this.timestamp);
10450
      oprot.writeFieldEnd();
10451
      oprot.writeFieldStop();
10452
      oprot.writeStructEnd();
10453
    }
10454
 
10455
    @Override
10456
    public String toString() {
553 chandransh 10457
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 10458
      boolean first = true;
10459
 
553 chandransh 10460
      sb.append("userId:");
10461
      sb.append(this.userId);
48 ashish 10462
      first = false;
10463
      if (!first) sb.append(", ");
10464
      sb.append("timestamp:");
10465
      sb.append(this.timestamp);
10466
      first = false;
10467
      sb.append(")");
10468
      return sb.toString();
10469
    }
10470
 
10471
    public void validate() throws TException {
10472
      // check for required fields
10473
    }
10474
 
10475
  }
10476
 
553 chandransh 10477
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10478
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 10479
 
10480
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10481
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10482
 
10483
    private boolean success;
10484
    private UserContextException ucx;
10485
 
10486
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10487
    public enum _Fields implements TFieldIdEnum {
10488
      SUCCESS((short)0, "success"),
10489
      UCX((short)1, "ucx");
10490
 
10491
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10492
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10493
 
10494
      static {
10495
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10496
          byId.put((int)field._thriftId, field);
10497
          byName.put(field.getFieldName(), field);
10498
        }
10499
      }
10500
 
10501
      /**
10502
       * Find the _Fields constant that matches fieldId, or null if its not found.
10503
       */
10504
      public static _Fields findByThriftId(int fieldId) {
10505
        return byId.get(fieldId);
10506
      }
10507
 
10508
      /**
10509
       * Find the _Fields constant that matches fieldId, throwing an exception
10510
       * if it is not found.
10511
       */
10512
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10513
        _Fields fields = findByThriftId(fieldId);
10514
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10515
        return fields;
10516
      }
10517
 
10518
      /**
10519
       * Find the _Fields constant that matches name, or null if its not found.
10520
       */
10521
      public static _Fields findByName(String name) {
10522
        return byName.get(name);
10523
      }
10524
 
10525
      private final short _thriftId;
10526
      private final String _fieldName;
10527
 
10528
      _Fields(short thriftId, String fieldName) {
10529
        _thriftId = thriftId;
10530
        _fieldName = fieldName;
10531
      }
10532
 
10533
      public short getThriftFieldId() {
10534
        return _thriftId;
10535
      }
10536
 
10537
      public String getFieldName() {
10538
        return _fieldName;
10539
      }
10540
    }
10541
 
10542
    // isset id assignments
10543
    private static final int __SUCCESS_ISSET_ID = 0;
10544
    private BitSet __isset_bit_vector = new BitSet(1);
10545
 
10546
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10547
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10548
          new FieldValueMetaData(TType.BOOL)));
10549
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10550
          new FieldValueMetaData(TType.STRUCT)));
10551
    }});
10552
 
10553
    static {
553 chandransh 10554
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10555
    }
10556
 
553 chandransh 10557
    public setUserAsLoggedIn_result() {
48 ashish 10558
    }
10559
 
553 chandransh 10560
    public setUserAsLoggedIn_result(
48 ashish 10561
      boolean success,
10562
      UserContextException ucx)
10563
    {
10564
      this();
10565
      this.success = success;
10566
      setSuccessIsSet(true);
10567
      this.ucx = ucx;
10568
    }
10569
 
10570
    /**
10571
     * Performs a deep copy on <i>other</i>.
10572
     */
553 chandransh 10573
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10574
      __isset_bit_vector.clear();
10575
      __isset_bit_vector.or(other.__isset_bit_vector);
10576
      this.success = other.success;
10577
      if (other.isSetUcx()) {
10578
        this.ucx = new UserContextException(other.ucx);
10579
      }
10580
    }
10581
 
553 chandransh 10582
    public setUserAsLoggedIn_result deepCopy() {
10583
      return new setUserAsLoggedIn_result(this);
48 ashish 10584
    }
10585
 
10586
    @Deprecated
553 chandransh 10587
    public setUserAsLoggedIn_result clone() {
10588
      return new setUserAsLoggedIn_result(this);
48 ashish 10589
    }
10590
 
10591
    public boolean isSuccess() {
10592
      return this.success;
10593
    }
10594
 
553 chandransh 10595
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10596
      this.success = success;
10597
      setSuccessIsSet(true);
10598
      return this;
10599
    }
10600
 
10601
    public void unsetSuccess() {
10602
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10603
    }
10604
 
10605
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10606
    public boolean isSetSuccess() {
10607
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10608
    }
10609
 
10610
    public void setSuccessIsSet(boolean value) {
10611
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10612
    }
10613
 
10614
    public UserContextException getUcx() {
10615
      return this.ucx;
10616
    }
10617
 
553 chandransh 10618
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10619
      this.ucx = ucx;
10620
      return this;
10621
    }
10622
 
10623
    public void unsetUcx() {
10624
      this.ucx = null;
10625
    }
10626
 
10627
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10628
    public boolean isSetUcx() {
10629
      return this.ucx != null;
10630
    }
10631
 
10632
    public void setUcxIsSet(boolean value) {
10633
      if (!value) {
10634
        this.ucx = null;
10635
      }
10636
    }
10637
 
10638
    public void setFieldValue(_Fields field, Object value) {
10639
      switch (field) {
10640
      case SUCCESS:
10641
        if (value == null) {
10642
          unsetSuccess();
10643
        } else {
10644
          setSuccess((Boolean)value);
10645
        }
10646
        break;
10647
 
10648
      case UCX:
10649
        if (value == null) {
10650
          unsetUcx();
10651
        } else {
10652
          setUcx((UserContextException)value);
10653
        }
10654
        break;
10655
 
10656
      }
10657
    }
10658
 
10659
    public void setFieldValue(int fieldID, Object value) {
10660
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10661
    }
10662
 
10663
    public Object getFieldValue(_Fields field) {
10664
      switch (field) {
10665
      case SUCCESS:
10666
        return new Boolean(isSuccess());
10667
 
10668
      case UCX:
10669
        return getUcx();
10670
 
10671
      }
10672
      throw new IllegalStateException();
10673
    }
10674
 
10675
    public Object getFieldValue(int fieldId) {
10676
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10677
    }
10678
 
10679
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10680
    public boolean isSet(_Fields field) {
10681
      switch (field) {
10682
      case SUCCESS:
10683
        return isSetSuccess();
10684
      case UCX:
10685
        return isSetUcx();
10686
      }
10687
      throw new IllegalStateException();
10688
    }
10689
 
10690
    public boolean isSet(int fieldID) {
10691
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10692
    }
10693
 
10694
    @Override
10695
    public boolean equals(Object that) {
10696
      if (that == null)
10697
        return false;
553 chandransh 10698
      if (that instanceof setUserAsLoggedIn_result)
10699
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10700
      return false;
10701
    }
10702
 
553 chandransh 10703
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10704
      if (that == null)
10705
        return false;
10706
 
10707
      boolean this_present_success = true;
10708
      boolean that_present_success = true;
10709
      if (this_present_success || that_present_success) {
10710
        if (!(this_present_success && that_present_success))
10711
          return false;
10712
        if (this.success != that.success)
10713
          return false;
10714
      }
10715
 
10716
      boolean this_present_ucx = true && this.isSetUcx();
10717
      boolean that_present_ucx = true && that.isSetUcx();
10718
      if (this_present_ucx || that_present_ucx) {
10719
        if (!(this_present_ucx && that_present_ucx))
10720
          return false;
10721
        if (!this.ucx.equals(that.ucx))
10722
          return false;
10723
      }
10724
 
10725
      return true;
10726
    }
10727
 
10728
    @Override
10729
    public int hashCode() {
10730
      return 0;
10731
    }
10732
 
553 chandransh 10733
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10734
      if (!getClass().equals(other.getClass())) {
10735
        return getClass().getName().compareTo(other.getClass().getName());
10736
      }
10737
 
10738
      int lastComparison = 0;
553 chandransh 10739
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10740
 
10741
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10742
      if (lastComparison != 0) {
10743
        return lastComparison;
10744
      }
10745
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10746
      if (lastComparison != 0) {
10747
        return lastComparison;
10748
      }
10749
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10750
      if (lastComparison != 0) {
10751
        return lastComparison;
10752
      }
10753
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10754
      if (lastComparison != 0) {
10755
        return lastComparison;
10756
      }
10757
      return 0;
10758
    }
10759
 
10760
    public void read(TProtocol iprot) throws TException {
10761
      TField field;
10762
      iprot.readStructBegin();
10763
      while (true)
10764
      {
10765
        field = iprot.readFieldBegin();
10766
        if (field.type == TType.STOP) { 
10767
          break;
10768
        }
10769
        _Fields fieldId = _Fields.findByThriftId(field.id);
10770
        if (fieldId == null) {
10771
          TProtocolUtil.skip(iprot, field.type);
10772
        } else {
10773
          switch (fieldId) {
10774
            case SUCCESS:
10775
              if (field.type == TType.BOOL) {
10776
                this.success = iprot.readBool();
10777
                setSuccessIsSet(true);
10778
              } else { 
10779
                TProtocolUtil.skip(iprot, field.type);
10780
              }
10781
              break;
10782
            case UCX:
10783
              if (field.type == TType.STRUCT) {
10784
                this.ucx = new UserContextException();
10785
                this.ucx.read(iprot);
10786
              } else { 
10787
                TProtocolUtil.skip(iprot, field.type);
10788
              }
10789
              break;
10790
          }
10791
          iprot.readFieldEnd();
10792
        }
10793
      }
10794
      iprot.readStructEnd();
10795
      validate();
10796
    }
10797
 
10798
    public void write(TProtocol oprot) throws TException {
10799
      oprot.writeStructBegin(STRUCT_DESC);
10800
 
10801
      if (this.isSetSuccess()) {
10802
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10803
        oprot.writeBool(this.success);
10804
        oprot.writeFieldEnd();
10805
      } else if (this.isSetUcx()) {
10806
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10807
        this.ucx.write(oprot);
10808
        oprot.writeFieldEnd();
10809
      }
10810
      oprot.writeFieldStop();
10811
      oprot.writeStructEnd();
10812
    }
10813
 
10814
    @Override
10815
    public String toString() {
553 chandransh 10816
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10817
      boolean first = true;
10818
 
10819
      sb.append("success:");
10820
      sb.append(this.success);
10821
      first = false;
10822
      if (!first) sb.append(", ");
10823
      sb.append("ucx:");
10824
      if (this.ucx == null) {
10825
        sb.append("null");
10826
      } else {
10827
        sb.append(this.ucx);
10828
      }
10829
      first = false;
10830
      sb.append(")");
10831
      return sb.toString();
10832
    }
10833
 
10834
    public void validate() throws TException {
10835
      // check for required fields
10836
    }
10837
 
10838
  }
10839
 
553 chandransh 10840
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10841
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10842
 
553 chandransh 10843
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10844
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10845
 
10846
    private long userid;
10847
    private long timestamp;
10848
 
10849
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10850
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10851
      USERID((short)1, "userid"),
10852
      TIMESTAMP((short)2, "timestamp");
48 ashish 10853
 
10854
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10855
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10856
 
10857
      static {
10858
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10859
          byId.put((int)field._thriftId, field);
10860
          byName.put(field.getFieldName(), field);
10861
        }
10862
      }
10863
 
10864
      /**
10865
       * Find the _Fields constant that matches fieldId, or null if its not found.
10866
       */
10867
      public static _Fields findByThriftId(int fieldId) {
10868
        return byId.get(fieldId);
10869
      }
10870
 
10871
      /**
10872
       * Find the _Fields constant that matches fieldId, throwing an exception
10873
       * if it is not found.
10874
       */
10875
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10876
        _Fields fields = findByThriftId(fieldId);
10877
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10878
        return fields;
10879
      }
10880
 
10881
      /**
10882
       * Find the _Fields constant that matches name, or null if its not found.
10883
       */
10884
      public static _Fields findByName(String name) {
10885
        return byName.get(name);
10886
      }
10887
 
10888
      private final short _thriftId;
10889
      private final String _fieldName;
10890
 
10891
      _Fields(short thriftId, String fieldName) {
10892
        _thriftId = thriftId;
10893
        _fieldName = fieldName;
10894
      }
10895
 
10896
      public short getThriftFieldId() {
10897
        return _thriftId;
10898
      }
10899
 
10900
      public String getFieldName() {
10901
        return _fieldName;
10902
      }
10903
    }
10904
 
10905
    // isset id assignments
10906
    private static final int __USERID_ISSET_ID = 0;
10907
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10908
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10909
 
10910
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10911
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10912
          new FieldValueMetaData(TType.I64)));
10913
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10914
          new FieldValueMetaData(TType.I64)));
10915
    }});
10916
 
10917
    static {
553 chandransh 10918
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10919
    }
10920
 
553 chandransh 10921
    public setUserAsLoggedOut_args() {
48 ashish 10922
    }
10923
 
553 chandransh 10924
    public setUserAsLoggedOut_args(
48 ashish 10925
      long userid,
553 chandransh 10926
      long timestamp)
48 ashish 10927
    {
10928
      this();
10929
      this.userid = userid;
10930
      setUseridIsSet(true);
10931
      this.timestamp = timestamp;
10932
      setTimestampIsSet(true);
10933
    }
10934
 
10935
    /**
10936
     * Performs a deep copy on <i>other</i>.
10937
     */
553 chandransh 10938
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10939
      __isset_bit_vector.clear();
10940
      __isset_bit_vector.or(other.__isset_bit_vector);
10941
      this.userid = other.userid;
10942
      this.timestamp = other.timestamp;
10943
    }
10944
 
553 chandransh 10945
    public setUserAsLoggedOut_args deepCopy() {
10946
      return new setUserAsLoggedOut_args(this);
48 ashish 10947
    }
10948
 
10949
    @Deprecated
553 chandransh 10950
    public setUserAsLoggedOut_args clone() {
10951
      return new setUserAsLoggedOut_args(this);
48 ashish 10952
    }
10953
 
10954
    public long getUserid() {
10955
      return this.userid;
10956
    }
10957
 
553 chandransh 10958
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10959
      this.userid = userid;
10960
      setUseridIsSet(true);
10961
      return this;
10962
    }
10963
 
10964
    public void unsetUserid() {
10965
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10966
    }
10967
 
10968
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10969
    public boolean isSetUserid() {
10970
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10971
    }
10972
 
10973
    public void setUseridIsSet(boolean value) {
10974
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10975
    }
10976
 
10977
    public long getTimestamp() {
10978
      return this.timestamp;
10979
    }
10980
 
553 chandransh 10981
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10982
      this.timestamp = timestamp;
10983
      setTimestampIsSet(true);
10984
      return this;
10985
    }
10986
 
10987
    public void unsetTimestamp() {
10988
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10989
    }
10990
 
10991
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10992
    public boolean isSetTimestamp() {
10993
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10994
    }
10995
 
10996
    public void setTimestampIsSet(boolean value) {
10997
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10998
    }
10999
 
11000
    public void setFieldValue(_Fields field, Object value) {
11001
      switch (field) {
11002
      case USERID:
11003
        if (value == null) {
11004
          unsetUserid();
11005
        } else {
11006
          setUserid((Long)value);
11007
        }
11008
        break;
11009
 
11010
      case TIMESTAMP:
11011
        if (value == null) {
11012
          unsetTimestamp();
11013
        } else {
11014
          setTimestamp((Long)value);
11015
        }
11016
        break;
11017
 
11018
      }
11019
    }
11020
 
11021
    public void setFieldValue(int fieldID, Object value) {
11022
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11023
    }
11024
 
11025
    public Object getFieldValue(_Fields field) {
11026
      switch (field) {
11027
      case USERID:
11028
        return new Long(getUserid());
11029
 
11030
      case TIMESTAMP:
11031
        return new Long(getTimestamp());
11032
 
11033
      }
11034
      throw new IllegalStateException();
11035
    }
11036
 
11037
    public Object getFieldValue(int fieldId) {
11038
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11039
    }
11040
 
11041
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11042
    public boolean isSet(_Fields field) {
11043
      switch (field) {
11044
      case USERID:
11045
        return isSetUserid();
11046
      case TIMESTAMP:
11047
        return isSetTimestamp();
11048
      }
11049
      throw new IllegalStateException();
11050
    }
11051
 
11052
    public boolean isSet(int fieldID) {
11053
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11054
    }
11055
 
11056
    @Override
11057
    public boolean equals(Object that) {
11058
      if (that == null)
11059
        return false;
553 chandransh 11060
      if (that instanceof setUserAsLoggedOut_args)
11061
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 11062
      return false;
11063
    }
11064
 
553 chandransh 11065
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 11066
      if (that == null)
11067
        return false;
11068
 
11069
      boolean this_present_userid = true;
11070
      boolean that_present_userid = true;
11071
      if (this_present_userid || that_present_userid) {
11072
        if (!(this_present_userid && that_present_userid))
11073
          return false;
11074
        if (this.userid != that.userid)
11075
          return false;
11076
      }
11077
 
11078
      boolean this_present_timestamp = true;
11079
      boolean that_present_timestamp = true;
11080
      if (this_present_timestamp || that_present_timestamp) {
11081
        if (!(this_present_timestamp && that_present_timestamp))
11082
          return false;
11083
        if (this.timestamp != that.timestamp)
11084
          return false;
11085
      }
11086
 
11087
      return true;
11088
    }
11089
 
11090
    @Override
11091
    public int hashCode() {
11092
      return 0;
11093
    }
11094
 
553 chandransh 11095
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 11096
      if (!getClass().equals(other.getClass())) {
11097
        return getClass().getName().compareTo(other.getClass().getName());
11098
      }
11099
 
11100
      int lastComparison = 0;
553 chandransh 11101
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 11102
 
11103
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11104
      if (lastComparison != 0) {
11105
        return lastComparison;
11106
      }
11107
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11108
      if (lastComparison != 0) {
11109
        return lastComparison;
11110
      }
11111
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11112
      if (lastComparison != 0) {
11113
        return lastComparison;
11114
      }
11115
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11116
      if (lastComparison != 0) {
11117
        return lastComparison;
11118
      }
11119
      return 0;
11120
    }
11121
 
11122
    public void read(TProtocol iprot) throws TException {
11123
      TField field;
11124
      iprot.readStructBegin();
11125
      while (true)
11126
      {
11127
        field = iprot.readFieldBegin();
11128
        if (field.type == TType.STOP) { 
11129
          break;
11130
        }
11131
        _Fields fieldId = _Fields.findByThriftId(field.id);
11132
        if (fieldId == null) {
11133
          TProtocolUtil.skip(iprot, field.type);
11134
        } else {
11135
          switch (fieldId) {
11136
            case USERID:
11137
              if (field.type == TType.I64) {
11138
                this.userid = iprot.readI64();
11139
                setUseridIsSet(true);
11140
              } else { 
11141
                TProtocolUtil.skip(iprot, field.type);
11142
              }
11143
              break;
11144
            case TIMESTAMP:
11145
              if (field.type == TType.I64) {
11146
                this.timestamp = iprot.readI64();
11147
                setTimestampIsSet(true);
11148
              } else { 
11149
                TProtocolUtil.skip(iprot, field.type);
11150
              }
11151
              break;
11152
          }
11153
          iprot.readFieldEnd();
11154
        }
11155
      }
11156
      iprot.readStructEnd();
11157
      validate();
11158
    }
11159
 
11160
    public void write(TProtocol oprot) throws TException {
11161
      validate();
11162
 
11163
      oprot.writeStructBegin(STRUCT_DESC);
11164
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11165
      oprot.writeI64(this.userid);
11166
      oprot.writeFieldEnd();
11167
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11168
      oprot.writeI64(this.timestamp);
11169
      oprot.writeFieldEnd();
11170
      oprot.writeFieldStop();
11171
      oprot.writeStructEnd();
11172
    }
11173
 
11174
    @Override
11175
    public String toString() {
553 chandransh 11176
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 11177
      boolean first = true;
11178
 
11179
      sb.append("userid:");
11180
      sb.append(this.userid);
11181
      first = false;
11182
      if (!first) sb.append(", ");
11183
      sb.append("timestamp:");
11184
      sb.append(this.timestamp);
11185
      first = false;
11186
      sb.append(")");
11187
      return sb.toString();
11188
    }
11189
 
11190
    public void validate() throws TException {
11191
      // check for required fields
11192
    }
11193
 
11194
  }
11195
 
553 chandransh 11196
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11197
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 11198
 
11199
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11200
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11201
 
11202
    private boolean success;
11203
    private UserContextException ucx;
11204
 
11205
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11206
    public enum _Fields implements TFieldIdEnum {
11207
      SUCCESS((short)0, "success"),
11208
      UCX((short)1, "ucx");
11209
 
11210
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11211
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11212
 
11213
      static {
11214
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11215
          byId.put((int)field._thriftId, field);
11216
          byName.put(field.getFieldName(), field);
11217
        }
11218
      }
11219
 
11220
      /**
11221
       * Find the _Fields constant that matches fieldId, or null if its not found.
11222
       */
11223
      public static _Fields findByThriftId(int fieldId) {
11224
        return byId.get(fieldId);
11225
      }
11226
 
11227
      /**
11228
       * Find the _Fields constant that matches fieldId, throwing an exception
11229
       * if it is not found.
11230
       */
11231
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11232
        _Fields fields = findByThriftId(fieldId);
11233
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11234
        return fields;
11235
      }
11236
 
11237
      /**
11238
       * Find the _Fields constant that matches name, or null if its not found.
11239
       */
11240
      public static _Fields findByName(String name) {
11241
        return byName.get(name);
11242
      }
11243
 
11244
      private final short _thriftId;
11245
      private final String _fieldName;
11246
 
11247
      _Fields(short thriftId, String fieldName) {
11248
        _thriftId = thriftId;
11249
        _fieldName = fieldName;
11250
      }
11251
 
11252
      public short getThriftFieldId() {
11253
        return _thriftId;
11254
      }
11255
 
11256
      public String getFieldName() {
11257
        return _fieldName;
11258
      }
11259
    }
11260
 
11261
    // isset id assignments
11262
    private static final int __SUCCESS_ISSET_ID = 0;
11263
    private BitSet __isset_bit_vector = new BitSet(1);
11264
 
11265
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11266
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11267
          new FieldValueMetaData(TType.BOOL)));
11268
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11269
          new FieldValueMetaData(TType.STRUCT)));
11270
    }});
11271
 
11272
    static {
553 chandransh 11273
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 11274
    }
11275
 
553 chandransh 11276
    public setUserAsLoggedOut_result() {
48 ashish 11277
    }
11278
 
553 chandransh 11279
    public setUserAsLoggedOut_result(
48 ashish 11280
      boolean success,
11281
      UserContextException ucx)
11282
    {
11283
      this();
11284
      this.success = success;
11285
      setSuccessIsSet(true);
11286
      this.ucx = ucx;
11287
    }
11288
 
11289
    /**
11290
     * Performs a deep copy on <i>other</i>.
11291
     */
553 chandransh 11292
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 11293
      __isset_bit_vector.clear();
11294
      __isset_bit_vector.or(other.__isset_bit_vector);
11295
      this.success = other.success;
11296
      if (other.isSetUcx()) {
11297
        this.ucx = new UserContextException(other.ucx);
11298
      }
11299
    }
11300
 
553 chandransh 11301
    public setUserAsLoggedOut_result deepCopy() {
11302
      return new setUserAsLoggedOut_result(this);
48 ashish 11303
    }
11304
 
11305
    @Deprecated
553 chandransh 11306
    public setUserAsLoggedOut_result clone() {
11307
      return new setUserAsLoggedOut_result(this);
48 ashish 11308
    }
11309
 
11310
    public boolean isSuccess() {
11311
      return this.success;
11312
    }
11313
 
553 chandransh 11314
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 11315
      this.success = success;
11316
      setSuccessIsSet(true);
11317
      return this;
11318
    }
11319
 
11320
    public void unsetSuccess() {
11321
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11322
    }
11323
 
11324
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11325
    public boolean isSetSuccess() {
11326
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11327
    }
11328
 
11329
    public void setSuccessIsSet(boolean value) {
11330
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11331
    }
11332
 
11333
    public UserContextException getUcx() {
11334
      return this.ucx;
11335
    }
11336
 
553 chandransh 11337
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 11338
      this.ucx = ucx;
11339
      return this;
11340
    }
11341
 
11342
    public void unsetUcx() {
11343
      this.ucx = null;
11344
    }
11345
 
11346
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11347
    public boolean isSetUcx() {
11348
      return this.ucx != null;
11349
    }
11350
 
11351
    public void setUcxIsSet(boolean value) {
11352
      if (!value) {
11353
        this.ucx = null;
11354
      }
11355
    }
11356
 
11357
    public void setFieldValue(_Fields field, Object value) {
11358
      switch (field) {
11359
      case SUCCESS:
11360
        if (value == null) {
11361
          unsetSuccess();
11362
        } else {
11363
          setSuccess((Boolean)value);
11364
        }
11365
        break;
11366
 
11367
      case UCX:
11368
        if (value == null) {
11369
          unsetUcx();
11370
        } else {
11371
          setUcx((UserContextException)value);
11372
        }
11373
        break;
11374
 
11375
      }
11376
    }
11377
 
11378
    public void setFieldValue(int fieldID, Object value) {
11379
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11380
    }
11381
 
11382
    public Object getFieldValue(_Fields field) {
11383
      switch (field) {
11384
      case SUCCESS:
11385
        return new Boolean(isSuccess());
11386
 
11387
      case UCX:
11388
        return getUcx();
11389
 
11390
      }
11391
      throw new IllegalStateException();
11392
    }
11393
 
11394
    public Object getFieldValue(int fieldId) {
11395
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11396
    }
11397
 
11398
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11399
    public boolean isSet(_Fields field) {
11400
      switch (field) {
11401
      case SUCCESS:
11402
        return isSetSuccess();
11403
      case UCX:
11404
        return isSetUcx();
11405
      }
11406
      throw new IllegalStateException();
11407
    }
11408
 
11409
    public boolean isSet(int fieldID) {
11410
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11411
    }
11412
 
11413
    @Override
11414
    public boolean equals(Object that) {
11415
      if (that == null)
11416
        return false;
553 chandransh 11417
      if (that instanceof setUserAsLoggedOut_result)
11418
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 11419
      return false;
11420
    }
11421
 
553 chandransh 11422
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 11423
      if (that == null)
11424
        return false;
11425
 
11426
      boolean this_present_success = true;
11427
      boolean that_present_success = true;
11428
      if (this_present_success || that_present_success) {
11429
        if (!(this_present_success && that_present_success))
11430
          return false;
11431
        if (this.success != that.success)
11432
          return false;
11433
      }
11434
 
11435
      boolean this_present_ucx = true && this.isSetUcx();
11436
      boolean that_present_ucx = true && that.isSetUcx();
11437
      if (this_present_ucx || that_present_ucx) {
11438
        if (!(this_present_ucx && that_present_ucx))
11439
          return false;
11440
        if (!this.ucx.equals(that.ucx))
11441
          return false;
11442
      }
11443
 
11444
      return true;
11445
    }
11446
 
11447
    @Override
11448
    public int hashCode() {
11449
      return 0;
11450
    }
11451
 
553 chandransh 11452
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 11453
      if (!getClass().equals(other.getClass())) {
11454
        return getClass().getName().compareTo(other.getClass().getName());
11455
      }
11456
 
11457
      int lastComparison = 0;
553 chandransh 11458
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 11459
 
11460
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11461
      if (lastComparison != 0) {
11462
        return lastComparison;
11463
      }
11464
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11465
      if (lastComparison != 0) {
11466
        return lastComparison;
11467
      }
11468
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11469
      if (lastComparison != 0) {
11470
        return lastComparison;
11471
      }
11472
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11473
      if (lastComparison != 0) {
11474
        return lastComparison;
11475
      }
11476
      return 0;
11477
    }
11478
 
11479
    public void read(TProtocol iprot) throws TException {
11480
      TField field;
11481
      iprot.readStructBegin();
11482
      while (true)
11483
      {
11484
        field = iprot.readFieldBegin();
11485
        if (field.type == TType.STOP) { 
11486
          break;
11487
        }
11488
        _Fields fieldId = _Fields.findByThriftId(field.id);
11489
        if (fieldId == null) {
11490
          TProtocolUtil.skip(iprot, field.type);
11491
        } else {
11492
          switch (fieldId) {
11493
            case SUCCESS:
11494
              if (field.type == TType.BOOL) {
11495
                this.success = iprot.readBool();
11496
                setSuccessIsSet(true);
11497
              } else { 
11498
                TProtocolUtil.skip(iprot, field.type);
11499
              }
11500
              break;
11501
            case UCX:
11502
              if (field.type == TType.STRUCT) {
11503
                this.ucx = new UserContextException();
11504
                this.ucx.read(iprot);
11505
              } else { 
11506
                TProtocolUtil.skip(iprot, field.type);
11507
              }
11508
              break;
11509
          }
11510
          iprot.readFieldEnd();
11511
        }
11512
      }
11513
      iprot.readStructEnd();
11514
      validate();
11515
    }
11516
 
11517
    public void write(TProtocol oprot) throws TException {
11518
      oprot.writeStructBegin(STRUCT_DESC);
11519
 
11520
      if (this.isSetSuccess()) {
11521
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11522
        oprot.writeBool(this.success);
11523
        oprot.writeFieldEnd();
11524
      } else if (this.isSetUcx()) {
11525
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11526
        this.ucx.write(oprot);
11527
        oprot.writeFieldEnd();
11528
      }
11529
      oprot.writeFieldStop();
11530
      oprot.writeStructEnd();
11531
    }
11532
 
11533
    @Override
11534
    public String toString() {
553 chandransh 11535
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11536
      boolean first = true;
11537
 
11538
      sb.append("success:");
11539
      sb.append(this.success);
11540
      first = false;
11541
      if (!first) sb.append(", ");
11542
      sb.append("ucx:");
11543
      if (this.ucx == null) {
11544
        sb.append("null");
11545
      } else {
11546
        sb.append(this.ucx);
11547
      }
11548
      first = false;
11549
      sb.append(")");
11550
      return sb.toString();
11551
    }
11552
 
11553
    public void validate() throws TException {
11554
      // check for required fields
11555
    }
11556
 
11557
  }
11558
 
553 chandransh 11559
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11560
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11561
 
11562
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11563
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11564
 
11565
    private long userid;
11566
    private long addressId;
11567
 
11568
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11569
    public enum _Fields implements TFieldIdEnum {
11570
      USERID((short)1, "userid"),
11571
      ADDRESS_ID((short)2, "addressId");
11572
 
11573
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11574
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11575
 
11576
      static {
11577
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11578
          byId.put((int)field._thriftId, field);
11579
          byName.put(field.getFieldName(), field);
11580
        }
11581
      }
11582
 
11583
      /**
11584
       * Find the _Fields constant that matches fieldId, or null if its not found.
11585
       */
11586
      public static _Fields findByThriftId(int fieldId) {
11587
        return byId.get(fieldId);
11588
      }
11589
 
11590
      /**
11591
       * Find the _Fields constant that matches fieldId, throwing an exception
11592
       * if it is not found.
11593
       */
11594
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11595
        _Fields fields = findByThriftId(fieldId);
11596
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11597
        return fields;
11598
      }
11599
 
11600
      /**
11601
       * Find the _Fields constant that matches name, or null if its not found.
11602
       */
11603
      public static _Fields findByName(String name) {
11604
        return byName.get(name);
11605
      }
11606
 
11607
      private final short _thriftId;
11608
      private final String _fieldName;
11609
 
11610
      _Fields(short thriftId, String fieldName) {
11611
        _thriftId = thriftId;
11612
        _fieldName = fieldName;
11613
      }
11614
 
11615
      public short getThriftFieldId() {
11616
        return _thriftId;
11617
      }
11618
 
11619
      public String getFieldName() {
11620
        return _fieldName;
11621
      }
11622
    }
11623
 
11624
    // isset id assignments
11625
    private static final int __USERID_ISSET_ID = 0;
11626
    private static final int __ADDRESSID_ISSET_ID = 1;
11627
    private BitSet __isset_bit_vector = new BitSet(2);
11628
 
11629
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11630
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11631
          new FieldValueMetaData(TType.I64)));
11632
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11633
          new FieldValueMetaData(TType.I64)));
11634
    }});
11635
 
11636
    static {
553 chandransh 11637
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11638
    }
11639
 
553 chandransh 11640
    public setDefaultAddress_args() {
48 ashish 11641
    }
11642
 
553 chandransh 11643
    public setDefaultAddress_args(
48 ashish 11644
      long userid,
11645
      long addressId)
11646
    {
11647
      this();
11648
      this.userid = userid;
11649
      setUseridIsSet(true);
11650
      this.addressId = addressId;
11651
      setAddressIdIsSet(true);
11652
    }
11653
 
11654
    /**
11655
     * Performs a deep copy on <i>other</i>.
11656
     */
553 chandransh 11657
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11658
      __isset_bit_vector.clear();
11659
      __isset_bit_vector.or(other.__isset_bit_vector);
11660
      this.userid = other.userid;
11661
      this.addressId = other.addressId;
11662
    }
11663
 
553 chandransh 11664
    public setDefaultAddress_args deepCopy() {
11665
      return new setDefaultAddress_args(this);
48 ashish 11666
    }
11667
 
11668
    @Deprecated
553 chandransh 11669
    public setDefaultAddress_args clone() {
11670
      return new setDefaultAddress_args(this);
48 ashish 11671
    }
11672
 
11673
    public long getUserid() {
11674
      return this.userid;
11675
    }
11676
 
553 chandransh 11677
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11678
      this.userid = userid;
11679
      setUseridIsSet(true);
11680
      return this;
11681
    }
11682
 
11683
    public void unsetUserid() {
11684
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11685
    }
11686
 
11687
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11688
    public boolean isSetUserid() {
11689
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11690
    }
11691
 
11692
    public void setUseridIsSet(boolean value) {
11693
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11694
    }
11695
 
11696
    public long getAddressId() {
11697
      return this.addressId;
11698
    }
11699
 
553 chandransh 11700
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11701
      this.addressId = addressId;
11702
      setAddressIdIsSet(true);
11703
      return this;
11704
    }
11705
 
11706
    public void unsetAddressId() {
11707
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11708
    }
11709
 
11710
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11711
    public boolean isSetAddressId() {
11712
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11713
    }
11714
 
11715
    public void setAddressIdIsSet(boolean value) {
11716
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11717
    }
11718
 
11719
    public void setFieldValue(_Fields field, Object value) {
11720
      switch (field) {
11721
      case USERID:
11722
        if (value == null) {
11723
          unsetUserid();
11724
        } else {
11725
          setUserid((Long)value);
11726
        }
11727
        break;
11728
 
11729
      case ADDRESS_ID:
11730
        if (value == null) {
11731
          unsetAddressId();
11732
        } else {
11733
          setAddressId((Long)value);
11734
        }
11735
        break;
11736
 
11737
      }
11738
    }
11739
 
11740
    public void setFieldValue(int fieldID, Object value) {
11741
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11742
    }
11743
 
11744
    public Object getFieldValue(_Fields field) {
11745
      switch (field) {
11746
      case USERID:
11747
        return new Long(getUserid());
11748
 
11749
      case ADDRESS_ID:
11750
        return new Long(getAddressId());
11751
 
11752
      }
11753
      throw new IllegalStateException();
11754
    }
11755
 
11756
    public Object getFieldValue(int fieldId) {
11757
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11758
    }
11759
 
11760
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11761
    public boolean isSet(_Fields field) {
11762
      switch (field) {
11763
      case USERID:
11764
        return isSetUserid();
11765
      case ADDRESS_ID:
11766
        return isSetAddressId();
11767
      }
11768
      throw new IllegalStateException();
11769
    }
11770
 
11771
    public boolean isSet(int fieldID) {
11772
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11773
    }
11774
 
11775
    @Override
11776
    public boolean equals(Object that) {
11777
      if (that == null)
11778
        return false;
553 chandransh 11779
      if (that instanceof setDefaultAddress_args)
11780
        return this.equals((setDefaultAddress_args)that);
48 ashish 11781
      return false;
11782
    }
11783
 
553 chandransh 11784
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11785
      if (that == null)
11786
        return false;
11787
 
11788
      boolean this_present_userid = true;
11789
      boolean that_present_userid = true;
11790
      if (this_present_userid || that_present_userid) {
11791
        if (!(this_present_userid && that_present_userid))
11792
          return false;
11793
        if (this.userid != that.userid)
11794
          return false;
11795
      }
11796
 
11797
      boolean this_present_addressId = true;
11798
      boolean that_present_addressId = true;
11799
      if (this_present_addressId || that_present_addressId) {
11800
        if (!(this_present_addressId && that_present_addressId))
11801
          return false;
11802
        if (this.addressId != that.addressId)
11803
          return false;
11804
      }
11805
 
11806
      return true;
11807
    }
11808
 
11809
    @Override
11810
    public int hashCode() {
11811
      return 0;
11812
    }
11813
 
553 chandransh 11814
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11815
      if (!getClass().equals(other.getClass())) {
11816
        return getClass().getName().compareTo(other.getClass().getName());
11817
      }
11818
 
11819
      int lastComparison = 0;
553 chandransh 11820
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11821
 
11822
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11823
      if (lastComparison != 0) {
11824
        return lastComparison;
11825
      }
11826
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11827
      if (lastComparison != 0) {
11828
        return lastComparison;
11829
      }
11830
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11831
      if (lastComparison != 0) {
11832
        return lastComparison;
11833
      }
11834
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11835
      if (lastComparison != 0) {
11836
        return lastComparison;
11837
      }
11838
      return 0;
11839
    }
11840
 
11841
    public void read(TProtocol iprot) throws TException {
11842
      TField field;
11843
      iprot.readStructBegin();
11844
      while (true)
11845
      {
11846
        field = iprot.readFieldBegin();
11847
        if (field.type == TType.STOP) { 
11848
          break;
11849
        }
11850
        _Fields fieldId = _Fields.findByThriftId(field.id);
11851
        if (fieldId == null) {
11852
          TProtocolUtil.skip(iprot, field.type);
11853
        } else {
11854
          switch (fieldId) {
11855
            case USERID:
11856
              if (field.type == TType.I64) {
11857
                this.userid = iprot.readI64();
11858
                setUseridIsSet(true);
11859
              } else { 
11860
                TProtocolUtil.skip(iprot, field.type);
11861
              }
11862
              break;
11863
            case ADDRESS_ID:
11864
              if (field.type == TType.I64) {
11865
                this.addressId = iprot.readI64();
11866
                setAddressIdIsSet(true);
11867
              } else { 
11868
                TProtocolUtil.skip(iprot, field.type);
11869
              }
11870
              break;
11871
          }
11872
          iprot.readFieldEnd();
11873
        }
11874
      }
11875
      iprot.readStructEnd();
11876
      validate();
11877
    }
11878
 
11879
    public void write(TProtocol oprot) throws TException {
11880
      validate();
11881
 
11882
      oprot.writeStructBegin(STRUCT_DESC);
11883
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11884
      oprot.writeI64(this.userid);
11885
      oprot.writeFieldEnd();
11886
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11887
      oprot.writeI64(this.addressId);
11888
      oprot.writeFieldEnd();
11889
      oprot.writeFieldStop();
11890
      oprot.writeStructEnd();
11891
    }
11892
 
11893
    @Override
11894
    public String toString() {
553 chandransh 11895
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11896
      boolean first = true;
11897
 
11898
      sb.append("userid:");
11899
      sb.append(this.userid);
11900
      first = false;
11901
      if (!first) sb.append(", ");
11902
      sb.append("addressId:");
11903
      sb.append(this.addressId);
11904
      first = false;
11905
      sb.append(")");
11906
      return sb.toString();
11907
    }
11908
 
11909
    public void validate() throws TException {
11910
      // check for required fields
11911
    }
11912
 
11913
  }
11914
 
553 chandransh 11915
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11916
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11917
 
11918
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11919
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11920
 
11921
    private boolean success;
11922
    private UserContextException ucx;
11923
 
11924
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11925
    public enum _Fields implements TFieldIdEnum {
11926
      SUCCESS((short)0, "success"),
11927
      UCX((short)1, "ucx");
11928
 
11929
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11930
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11931
 
11932
      static {
11933
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11934
          byId.put((int)field._thriftId, field);
11935
          byName.put(field.getFieldName(), field);
11936
        }
11937
      }
11938
 
11939
      /**
11940
       * Find the _Fields constant that matches fieldId, or null if its not found.
11941
       */
11942
      public static _Fields findByThriftId(int fieldId) {
11943
        return byId.get(fieldId);
11944
      }
11945
 
11946
      /**
11947
       * Find the _Fields constant that matches fieldId, throwing an exception
11948
       * if it is not found.
11949
       */
11950
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11951
        _Fields fields = findByThriftId(fieldId);
11952
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11953
        return fields;
11954
      }
11955
 
11956
      /**
11957
       * Find the _Fields constant that matches name, or null if its not found.
11958
       */
11959
      public static _Fields findByName(String name) {
11960
        return byName.get(name);
11961
      }
11962
 
11963
      private final short _thriftId;
11964
      private final String _fieldName;
11965
 
11966
      _Fields(short thriftId, String fieldName) {
11967
        _thriftId = thriftId;
11968
        _fieldName = fieldName;
11969
      }
11970
 
11971
      public short getThriftFieldId() {
11972
        return _thriftId;
11973
      }
11974
 
11975
      public String getFieldName() {
11976
        return _fieldName;
11977
      }
11978
    }
11979
 
11980
    // isset id assignments
11981
    private static final int __SUCCESS_ISSET_ID = 0;
11982
    private BitSet __isset_bit_vector = new BitSet(1);
11983
 
11984
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11985
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11986
          new FieldValueMetaData(TType.BOOL)));
11987
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11988
          new FieldValueMetaData(TType.STRUCT)));
11989
    }});
11990
 
11991
    static {
553 chandransh 11992
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11993
    }
11994
 
553 chandransh 11995
    public setDefaultAddress_result() {
48 ashish 11996
    }
11997
 
553 chandransh 11998
    public setDefaultAddress_result(
48 ashish 11999
      boolean success,
12000
      UserContextException ucx)
12001
    {
12002
      this();
12003
      this.success = success;
12004
      setSuccessIsSet(true);
12005
      this.ucx = ucx;
12006
    }
12007
 
12008
    /**
12009
     * Performs a deep copy on <i>other</i>.
12010
     */
553 chandransh 12011
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 12012
      __isset_bit_vector.clear();
12013
      __isset_bit_vector.or(other.__isset_bit_vector);
12014
      this.success = other.success;
12015
      if (other.isSetUcx()) {
12016
        this.ucx = new UserContextException(other.ucx);
12017
      }
12018
    }
12019
 
553 chandransh 12020
    public setDefaultAddress_result deepCopy() {
12021
      return new setDefaultAddress_result(this);
48 ashish 12022
    }
12023
 
12024
    @Deprecated
553 chandransh 12025
    public setDefaultAddress_result clone() {
12026
      return new setDefaultAddress_result(this);
48 ashish 12027
    }
12028
 
12029
    public boolean isSuccess() {
12030
      return this.success;
12031
    }
12032
 
553 chandransh 12033
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 12034
      this.success = success;
12035
      setSuccessIsSet(true);
12036
      return this;
12037
    }
12038
 
12039
    public void unsetSuccess() {
12040
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12041
    }
12042
 
12043
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12044
    public boolean isSetSuccess() {
12045
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12046
    }
12047
 
12048
    public void setSuccessIsSet(boolean value) {
12049
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12050
    }
12051
 
12052
    public UserContextException getUcx() {
12053
      return this.ucx;
12054
    }
12055
 
553 chandransh 12056
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 12057
      this.ucx = ucx;
12058
      return this;
12059
    }
12060
 
12061
    public void unsetUcx() {
12062
      this.ucx = null;
12063
    }
12064
 
12065
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12066
    public boolean isSetUcx() {
12067
      return this.ucx != null;
12068
    }
12069
 
12070
    public void setUcxIsSet(boolean value) {
12071
      if (!value) {
12072
        this.ucx = null;
12073
      }
12074
    }
12075
 
12076
    public void setFieldValue(_Fields field, Object value) {
12077
      switch (field) {
12078
      case SUCCESS:
12079
        if (value == null) {
12080
          unsetSuccess();
12081
        } else {
12082
          setSuccess((Boolean)value);
12083
        }
12084
        break;
12085
 
12086
      case UCX:
12087
        if (value == null) {
12088
          unsetUcx();
12089
        } else {
12090
          setUcx((UserContextException)value);
12091
        }
12092
        break;
12093
 
12094
      }
12095
    }
12096
 
12097
    public void setFieldValue(int fieldID, Object value) {
12098
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12099
    }
12100
 
12101
    public Object getFieldValue(_Fields field) {
12102
      switch (field) {
12103
      case SUCCESS:
12104
        return new Boolean(isSuccess());
12105
 
12106
      case UCX:
12107
        return getUcx();
12108
 
12109
      }
12110
      throw new IllegalStateException();
12111
    }
12112
 
12113
    public Object getFieldValue(int fieldId) {
12114
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12115
    }
12116
 
12117
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12118
    public boolean isSet(_Fields field) {
12119
      switch (field) {
12120
      case SUCCESS:
12121
        return isSetSuccess();
12122
      case UCX:
12123
        return isSetUcx();
12124
      }
12125
      throw new IllegalStateException();
12126
    }
12127
 
12128
    public boolean isSet(int fieldID) {
12129
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12130
    }
12131
 
12132
    @Override
12133
    public boolean equals(Object that) {
12134
      if (that == null)
12135
        return false;
553 chandransh 12136
      if (that instanceof setDefaultAddress_result)
12137
        return this.equals((setDefaultAddress_result)that);
48 ashish 12138
      return false;
12139
    }
12140
 
553 chandransh 12141
    public boolean equals(setDefaultAddress_result that) {
48 ashish 12142
      if (that == null)
12143
        return false;
12144
 
12145
      boolean this_present_success = true;
12146
      boolean that_present_success = true;
12147
      if (this_present_success || that_present_success) {
12148
        if (!(this_present_success && that_present_success))
12149
          return false;
12150
        if (this.success != that.success)
12151
          return false;
12152
      }
12153
 
12154
      boolean this_present_ucx = true && this.isSetUcx();
12155
      boolean that_present_ucx = true && that.isSetUcx();
12156
      if (this_present_ucx || that_present_ucx) {
12157
        if (!(this_present_ucx && that_present_ucx))
12158
          return false;
12159
        if (!this.ucx.equals(that.ucx))
12160
          return false;
12161
      }
12162
 
12163
      return true;
12164
    }
12165
 
12166
    @Override
12167
    public int hashCode() {
12168
      return 0;
12169
    }
12170
 
553 chandransh 12171
    public int compareTo(setDefaultAddress_result other) {
48 ashish 12172
      if (!getClass().equals(other.getClass())) {
12173
        return getClass().getName().compareTo(other.getClass().getName());
12174
      }
12175
 
12176
      int lastComparison = 0;
553 chandransh 12177
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 12178
 
12179
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12180
      if (lastComparison != 0) {
12181
        return lastComparison;
12182
      }
12183
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12184
      if (lastComparison != 0) {
12185
        return lastComparison;
12186
      }
12187
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12188
      if (lastComparison != 0) {
12189
        return lastComparison;
12190
      }
12191
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12192
      if (lastComparison != 0) {
12193
        return lastComparison;
12194
      }
12195
      return 0;
12196
    }
12197
 
12198
    public void read(TProtocol iprot) throws TException {
12199
      TField field;
12200
      iprot.readStructBegin();
12201
      while (true)
12202
      {
12203
        field = iprot.readFieldBegin();
12204
        if (field.type == TType.STOP) { 
12205
          break;
12206
        }
12207
        _Fields fieldId = _Fields.findByThriftId(field.id);
12208
        if (fieldId == null) {
12209
          TProtocolUtil.skip(iprot, field.type);
12210
        } else {
12211
          switch (fieldId) {
12212
            case SUCCESS:
12213
              if (field.type == TType.BOOL) {
12214
                this.success = iprot.readBool();
12215
                setSuccessIsSet(true);
12216
              } else { 
12217
                TProtocolUtil.skip(iprot, field.type);
12218
              }
12219
              break;
12220
            case UCX:
12221
              if (field.type == TType.STRUCT) {
12222
                this.ucx = new UserContextException();
12223
                this.ucx.read(iprot);
12224
              } else { 
12225
                TProtocolUtil.skip(iprot, field.type);
12226
              }
12227
              break;
12228
          }
12229
          iprot.readFieldEnd();
12230
        }
12231
      }
12232
      iprot.readStructEnd();
12233
      validate();
12234
    }
12235
 
12236
    public void write(TProtocol oprot) throws TException {
12237
      oprot.writeStructBegin(STRUCT_DESC);
12238
 
12239
      if (this.isSetSuccess()) {
12240
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12241
        oprot.writeBool(this.success);
12242
        oprot.writeFieldEnd();
12243
      } else if (this.isSetUcx()) {
12244
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12245
        this.ucx.write(oprot);
12246
        oprot.writeFieldEnd();
12247
      }
12248
      oprot.writeFieldStop();
12249
      oprot.writeStructEnd();
12250
    }
12251
 
12252
    @Override
12253
    public String toString() {
553 chandransh 12254
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 12255
      boolean first = true;
12256
 
12257
      sb.append("success:");
12258
      sb.append(this.success);
12259
      first = false;
12260
      if (!first) sb.append(", ");
12261
      sb.append("ucx:");
12262
      if (this.ucx == null) {
12263
        sb.append("null");
12264
      } else {
12265
        sb.append(this.ucx);
12266
      }
12267
      first = false;
12268
      sb.append(")");
12269
      return sb.toString();
12270
    }
12271
 
12272
    public void validate() throws TException {
12273
      // check for required fields
12274
    }
12275
 
12276
  }
12277
 
553 chandransh 12278
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12279
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 12280
 
553 chandransh 12281
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 12282
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
12283
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 12284
 
553 chandransh 12285
    private long userid;
593 rajveer 12286
    private String oldPassword;
12287
    private String newPassword;
48 ashish 12288
 
12289
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12290
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12291
      USERID((short)1, "userid"),
593 rajveer 12292
      OLD_PASSWORD((short)2, "oldPassword"),
12293
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 12294
 
12295
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12296
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12297
 
12298
      static {
12299
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12300
          byId.put((int)field._thriftId, field);
12301
          byName.put(field.getFieldName(), field);
12302
        }
12303
      }
12304
 
12305
      /**
12306
       * Find the _Fields constant that matches fieldId, or null if its not found.
12307
       */
12308
      public static _Fields findByThriftId(int fieldId) {
12309
        return byId.get(fieldId);
12310
      }
12311
 
12312
      /**
12313
       * Find the _Fields constant that matches fieldId, throwing an exception
12314
       * if it is not found.
12315
       */
12316
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12317
        _Fields fields = findByThriftId(fieldId);
12318
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12319
        return fields;
12320
      }
12321
 
12322
      /**
12323
       * Find the _Fields constant that matches name, or null if its not found.
12324
       */
12325
      public static _Fields findByName(String name) {
12326
        return byName.get(name);
12327
      }
12328
 
12329
      private final short _thriftId;
12330
      private final String _fieldName;
12331
 
12332
      _Fields(short thriftId, String fieldName) {
12333
        _thriftId = thriftId;
12334
        _fieldName = fieldName;
12335
      }
12336
 
12337
      public short getThriftFieldId() {
12338
        return _thriftId;
12339
      }
12340
 
12341
      public String getFieldName() {
12342
        return _fieldName;
12343
      }
12344
    }
12345
 
12346
    // isset id assignments
12347
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12348
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12349
 
12350
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12351
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 12352
          new FieldValueMetaData(TType.I64)));
593 rajveer 12353
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 12354
          new FieldValueMetaData(TType.STRING)));
593 rajveer 12355
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
12356
          new FieldValueMetaData(TType.STRING)));
48 ashish 12357
    }});
12358
 
12359
    static {
553 chandransh 12360
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 12361
    }
12362
 
553 chandransh 12363
    public updatePassword_args() {
48 ashish 12364
    }
12365
 
553 chandransh 12366
    public updatePassword_args(
12367
      long userid,
593 rajveer 12368
      String oldPassword,
12369
      String newPassword)
48 ashish 12370
    {
12371
      this();
553 chandransh 12372
      this.userid = userid;
12373
      setUseridIsSet(true);
593 rajveer 12374
      this.oldPassword = oldPassword;
12375
      this.newPassword = newPassword;
48 ashish 12376
    }
12377
 
12378
    /**
12379
     * Performs a deep copy on <i>other</i>.
12380
     */
553 chandransh 12381
    public updatePassword_args(updatePassword_args other) {
48 ashish 12382
      __isset_bit_vector.clear();
12383
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12384
      this.userid = other.userid;
593 rajveer 12385
      if (other.isSetOldPassword()) {
12386
        this.oldPassword = other.oldPassword;
553 chandransh 12387
      }
593 rajveer 12388
      if (other.isSetNewPassword()) {
12389
        this.newPassword = other.newPassword;
12390
      }
48 ashish 12391
    }
12392
 
553 chandransh 12393
    public updatePassword_args deepCopy() {
12394
      return new updatePassword_args(this);
48 ashish 12395
    }
12396
 
12397
    @Deprecated
553 chandransh 12398
    public updatePassword_args clone() {
12399
      return new updatePassword_args(this);
48 ashish 12400
    }
12401
 
553 chandransh 12402
    public long getUserid() {
12403
      return this.userid;
48 ashish 12404
    }
12405
 
553 chandransh 12406
    public updatePassword_args setUserid(long userid) {
12407
      this.userid = userid;
12408
      setUseridIsSet(true);
48 ashish 12409
      return this;
12410
    }
12411
 
553 chandransh 12412
    public void unsetUserid() {
48 ashish 12413
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12414
    }
12415
 
553 chandransh 12416
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12417
    public boolean isSetUserid() {
48 ashish 12418
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12419
    }
12420
 
553 chandransh 12421
    public void setUseridIsSet(boolean value) {
48 ashish 12422
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12423
    }
12424
 
593 rajveer 12425
    public String getOldPassword() {
12426
      return this.oldPassword;
48 ashish 12427
    }
12428
 
593 rajveer 12429
    public updatePassword_args setOldPassword(String oldPassword) {
12430
      this.oldPassword = oldPassword;
48 ashish 12431
      return this;
12432
    }
12433
 
593 rajveer 12434
    public void unsetOldPassword() {
12435
      this.oldPassword = null;
48 ashish 12436
    }
12437
 
593 rajveer 12438
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
12439
    public boolean isSetOldPassword() {
12440
      return this.oldPassword != null;
48 ashish 12441
    }
12442
 
593 rajveer 12443
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 12444
      if (!value) {
593 rajveer 12445
        this.oldPassword = null;
553 chandransh 12446
      }
48 ashish 12447
    }
12448
 
593 rajveer 12449
    public String getNewPassword() {
12450
      return this.newPassword;
12451
    }
12452
 
12453
    public updatePassword_args setNewPassword(String newPassword) {
12454
      this.newPassword = newPassword;
12455
      return this;
12456
    }
12457
 
12458
    public void unsetNewPassword() {
12459
      this.newPassword = null;
12460
    }
12461
 
12462
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
12463
    public boolean isSetNewPassword() {
12464
      return this.newPassword != null;
12465
    }
12466
 
12467
    public void setNewPasswordIsSet(boolean value) {
12468
      if (!value) {
12469
        this.newPassword = null;
12470
      }
12471
    }
12472
 
48 ashish 12473
    public void setFieldValue(_Fields field, Object value) {
12474
      switch (field) {
553 chandransh 12475
      case USERID:
48 ashish 12476
        if (value == null) {
553 chandransh 12477
          unsetUserid();
48 ashish 12478
        } else {
553 chandransh 12479
          setUserid((Long)value);
48 ashish 12480
        }
12481
        break;
12482
 
593 rajveer 12483
      case OLD_PASSWORD:
48 ashish 12484
        if (value == null) {
593 rajveer 12485
          unsetOldPassword();
48 ashish 12486
        } else {
593 rajveer 12487
          setOldPassword((String)value);
48 ashish 12488
        }
12489
        break;
12490
 
593 rajveer 12491
      case NEW_PASSWORD:
12492
        if (value == null) {
12493
          unsetNewPassword();
12494
        } else {
12495
          setNewPassword((String)value);
12496
        }
12497
        break;
12498
 
48 ashish 12499
      }
12500
    }
12501
 
12502
    public void setFieldValue(int fieldID, Object value) {
12503
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12504
    }
12505
 
12506
    public Object getFieldValue(_Fields field) {
12507
      switch (field) {
553 chandransh 12508
      case USERID:
12509
        return new Long(getUserid());
48 ashish 12510
 
593 rajveer 12511
      case OLD_PASSWORD:
12512
        return getOldPassword();
48 ashish 12513
 
593 rajveer 12514
      case NEW_PASSWORD:
12515
        return getNewPassword();
12516
 
48 ashish 12517
      }
12518
      throw new IllegalStateException();
12519
    }
12520
 
12521
    public Object getFieldValue(int fieldId) {
12522
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12523
    }
12524
 
12525
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12526
    public boolean isSet(_Fields field) {
12527
      switch (field) {
553 chandransh 12528
      case USERID:
12529
        return isSetUserid();
593 rajveer 12530
      case OLD_PASSWORD:
12531
        return isSetOldPassword();
12532
      case NEW_PASSWORD:
12533
        return isSetNewPassword();
48 ashish 12534
      }
12535
      throw new IllegalStateException();
12536
    }
12537
 
12538
    public boolean isSet(int fieldID) {
12539
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12540
    }
12541
 
12542
    @Override
12543
    public boolean equals(Object that) {
12544
      if (that == null)
12545
        return false;
553 chandransh 12546
      if (that instanceof updatePassword_args)
12547
        return this.equals((updatePassword_args)that);
48 ashish 12548
      return false;
12549
    }
12550
 
553 chandransh 12551
    public boolean equals(updatePassword_args that) {
48 ashish 12552
      if (that == null)
12553
        return false;
12554
 
553 chandransh 12555
      boolean this_present_userid = true;
12556
      boolean that_present_userid = true;
12557
      if (this_present_userid || that_present_userid) {
12558
        if (!(this_present_userid && that_present_userid))
48 ashish 12559
          return false;
553 chandransh 12560
        if (this.userid != that.userid)
48 ashish 12561
          return false;
12562
      }
12563
 
593 rajveer 12564
      boolean this_present_oldPassword = true && this.isSetOldPassword();
12565
      boolean that_present_oldPassword = true && that.isSetOldPassword();
12566
      if (this_present_oldPassword || that_present_oldPassword) {
12567
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 12568
          return false;
593 rajveer 12569
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 12570
          return false;
12571
      }
12572
 
593 rajveer 12573
      boolean this_present_newPassword = true && this.isSetNewPassword();
12574
      boolean that_present_newPassword = true && that.isSetNewPassword();
12575
      if (this_present_newPassword || that_present_newPassword) {
12576
        if (!(this_present_newPassword && that_present_newPassword))
12577
          return false;
12578
        if (!this.newPassword.equals(that.newPassword))
12579
          return false;
12580
      }
12581
 
48 ashish 12582
      return true;
12583
    }
12584
 
12585
    @Override
12586
    public int hashCode() {
12587
      return 0;
12588
    }
12589
 
553 chandransh 12590
    public int compareTo(updatePassword_args other) {
48 ashish 12591
      if (!getClass().equals(other.getClass())) {
12592
        return getClass().getName().compareTo(other.getClass().getName());
12593
      }
12594
 
12595
      int lastComparison = 0;
553 chandransh 12596
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12597
 
553 chandransh 12598
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12599
      if (lastComparison != 0) {
12600
        return lastComparison;
12601
      }
553 chandransh 12602
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12603
      if (lastComparison != 0) {
12604
        return lastComparison;
12605
      }
593 rajveer 12606
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 12607
      if (lastComparison != 0) {
12608
        return lastComparison;
12609
      }
593 rajveer 12610
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 12611
      if (lastComparison != 0) {
12612
        return lastComparison;
12613
      }
593 rajveer 12614
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
12615
      if (lastComparison != 0) {
12616
        return lastComparison;
12617
      }
12618
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
12619
      if (lastComparison != 0) {
12620
        return lastComparison;
12621
      }
48 ashish 12622
      return 0;
12623
    }
12624
 
12625
    public void read(TProtocol iprot) throws TException {
12626
      TField field;
12627
      iprot.readStructBegin();
12628
      while (true)
12629
      {
12630
        field = iprot.readFieldBegin();
12631
        if (field.type == TType.STOP) { 
12632
          break;
12633
        }
12634
        _Fields fieldId = _Fields.findByThriftId(field.id);
12635
        if (fieldId == null) {
12636
          TProtocolUtil.skip(iprot, field.type);
12637
        } else {
12638
          switch (fieldId) {
553 chandransh 12639
            case USERID:
48 ashish 12640
              if (field.type == TType.I64) {
553 chandransh 12641
                this.userid = iprot.readI64();
12642
                setUseridIsSet(true);
48 ashish 12643
              } else { 
12644
                TProtocolUtil.skip(iprot, field.type);
12645
              }
12646
              break;
593 rajveer 12647
            case OLD_PASSWORD:
553 chandransh 12648
              if (field.type == TType.STRING) {
593 rajveer 12649
                this.oldPassword = iprot.readString();
48 ashish 12650
              } else { 
12651
                TProtocolUtil.skip(iprot, field.type);
12652
              }
12653
              break;
593 rajveer 12654
            case NEW_PASSWORD:
12655
              if (field.type == TType.STRING) {
12656
                this.newPassword = iprot.readString();
12657
              } else { 
12658
                TProtocolUtil.skip(iprot, field.type);
12659
              }
12660
              break;
48 ashish 12661
          }
12662
          iprot.readFieldEnd();
12663
        }
12664
      }
12665
      iprot.readStructEnd();
12666
      validate();
12667
    }
12668
 
12669
    public void write(TProtocol oprot) throws TException {
12670
      validate();
12671
 
12672
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12673
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12674
      oprot.writeI64(this.userid);
48 ashish 12675
      oprot.writeFieldEnd();
593 rajveer 12676
      if (this.oldPassword != null) {
12677
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
12678
        oprot.writeString(this.oldPassword);
553 chandransh 12679
        oprot.writeFieldEnd();
12680
      }
593 rajveer 12681
      if (this.newPassword != null) {
12682
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
12683
        oprot.writeString(this.newPassword);
12684
        oprot.writeFieldEnd();
12685
      }
48 ashish 12686
      oprot.writeFieldStop();
12687
      oprot.writeStructEnd();
12688
    }
12689
 
12690
    @Override
12691
    public String toString() {
553 chandransh 12692
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12693
      boolean first = true;
12694
 
553 chandransh 12695
      sb.append("userid:");
12696
      sb.append(this.userid);
48 ashish 12697
      first = false;
12698
      if (!first) sb.append(", ");
593 rajveer 12699
      sb.append("oldPassword:");
12700
      if (this.oldPassword == null) {
553 chandransh 12701
        sb.append("null");
12702
      } else {
593 rajveer 12703
        sb.append(this.oldPassword);
553 chandransh 12704
      }
48 ashish 12705
      first = false;
593 rajveer 12706
      if (!first) sb.append(", ");
12707
      sb.append("newPassword:");
12708
      if (this.newPassword == null) {
12709
        sb.append("null");
12710
      } else {
12711
        sb.append(this.newPassword);
12712
      }
12713
      first = false;
48 ashish 12714
      sb.append(")");
12715
      return sb.toString();
12716
    }
12717
 
12718
    public void validate() throws TException {
12719
      // check for required fields
12720
    }
12721
 
12722
  }
12723
 
553 chandransh 12724
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12725
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12726
 
12727
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12728
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12729
 
12730
    private boolean success;
12731
    private UserContextException ucx;
12732
 
12733
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12734
    public enum _Fields implements TFieldIdEnum {
12735
      SUCCESS((short)0, "success"),
12736
      UCX((short)1, "ucx");
12737
 
12738
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12739
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12740
 
12741
      static {
12742
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12743
          byId.put((int)field._thriftId, field);
12744
          byName.put(field.getFieldName(), field);
12745
        }
12746
      }
12747
 
12748
      /**
12749
       * Find the _Fields constant that matches fieldId, or null if its not found.
12750
       */
12751
      public static _Fields findByThriftId(int fieldId) {
12752
        return byId.get(fieldId);
12753
      }
12754
 
12755
      /**
12756
       * Find the _Fields constant that matches fieldId, throwing an exception
12757
       * if it is not found.
12758
       */
12759
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12760
        _Fields fields = findByThriftId(fieldId);
12761
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12762
        return fields;
12763
      }
12764
 
12765
      /**
12766
       * Find the _Fields constant that matches name, or null if its not found.
12767
       */
12768
      public static _Fields findByName(String name) {
12769
        return byName.get(name);
12770
      }
12771
 
12772
      private final short _thriftId;
12773
      private final String _fieldName;
12774
 
12775
      _Fields(short thriftId, String fieldName) {
12776
        _thriftId = thriftId;
12777
        _fieldName = fieldName;
12778
      }
12779
 
12780
      public short getThriftFieldId() {
12781
        return _thriftId;
12782
      }
12783
 
12784
      public String getFieldName() {
12785
        return _fieldName;
12786
      }
12787
    }
12788
 
12789
    // isset id assignments
12790
    private static final int __SUCCESS_ISSET_ID = 0;
12791
    private BitSet __isset_bit_vector = new BitSet(1);
12792
 
12793
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12794
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12795
          new FieldValueMetaData(TType.BOOL)));
12796
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12797
          new FieldValueMetaData(TType.STRUCT)));
12798
    }});
12799
 
12800
    static {
553 chandransh 12801
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12802
    }
12803
 
553 chandransh 12804
    public updatePassword_result() {
48 ashish 12805
    }
12806
 
553 chandransh 12807
    public updatePassword_result(
48 ashish 12808
      boolean success,
12809
      UserContextException ucx)
12810
    {
12811
      this();
12812
      this.success = success;
12813
      setSuccessIsSet(true);
12814
      this.ucx = ucx;
12815
    }
12816
 
12817
    /**
12818
     * Performs a deep copy on <i>other</i>.
12819
     */
553 chandransh 12820
    public updatePassword_result(updatePassword_result other) {
48 ashish 12821
      __isset_bit_vector.clear();
12822
      __isset_bit_vector.or(other.__isset_bit_vector);
12823
      this.success = other.success;
12824
      if (other.isSetUcx()) {
12825
        this.ucx = new UserContextException(other.ucx);
12826
      }
12827
    }
12828
 
553 chandransh 12829
    public updatePassword_result deepCopy() {
12830
      return new updatePassword_result(this);
48 ashish 12831
    }
12832
 
12833
    @Deprecated
553 chandransh 12834
    public updatePassword_result clone() {
12835
      return new updatePassword_result(this);
48 ashish 12836
    }
12837
 
12838
    public boolean isSuccess() {
12839
      return this.success;
12840
    }
12841
 
553 chandransh 12842
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12843
      this.success = success;
12844
      setSuccessIsSet(true);
12845
      return this;
12846
    }
12847
 
12848
    public void unsetSuccess() {
12849
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12850
    }
12851
 
12852
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12853
    public boolean isSetSuccess() {
12854
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12855
    }
12856
 
12857
    public void setSuccessIsSet(boolean value) {
12858
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12859
    }
12860
 
12861
    public UserContextException getUcx() {
12862
      return this.ucx;
12863
    }
12864
 
553 chandransh 12865
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12866
      this.ucx = ucx;
12867
      return this;
12868
    }
12869
 
12870
    public void unsetUcx() {
12871
      this.ucx = null;
12872
    }
12873
 
12874
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12875
    public boolean isSetUcx() {
12876
      return this.ucx != null;
12877
    }
12878
 
12879
    public void setUcxIsSet(boolean value) {
12880
      if (!value) {
12881
        this.ucx = null;
12882
      }
12883
    }
12884
 
12885
    public void setFieldValue(_Fields field, Object value) {
12886
      switch (field) {
12887
      case SUCCESS:
12888
        if (value == null) {
12889
          unsetSuccess();
12890
        } else {
12891
          setSuccess((Boolean)value);
12892
        }
12893
        break;
12894
 
12895
      case UCX:
12896
        if (value == null) {
12897
          unsetUcx();
12898
        } else {
12899
          setUcx((UserContextException)value);
12900
        }
12901
        break;
12902
 
12903
      }
12904
    }
12905
 
12906
    public void setFieldValue(int fieldID, Object value) {
12907
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12908
    }
12909
 
12910
    public Object getFieldValue(_Fields field) {
12911
      switch (field) {
12912
      case SUCCESS:
12913
        return new Boolean(isSuccess());
12914
 
12915
      case UCX:
12916
        return getUcx();
12917
 
12918
      }
12919
      throw new IllegalStateException();
12920
    }
12921
 
12922
    public Object getFieldValue(int fieldId) {
12923
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12924
    }
12925
 
12926
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12927
    public boolean isSet(_Fields field) {
12928
      switch (field) {
12929
      case SUCCESS:
12930
        return isSetSuccess();
12931
      case UCX:
12932
        return isSetUcx();
12933
      }
12934
      throw new IllegalStateException();
12935
    }
12936
 
12937
    public boolean isSet(int fieldID) {
12938
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12939
    }
12940
 
12941
    @Override
12942
    public boolean equals(Object that) {
12943
      if (that == null)
12944
        return false;
553 chandransh 12945
      if (that instanceof updatePassword_result)
12946
        return this.equals((updatePassword_result)that);
48 ashish 12947
      return false;
12948
    }
12949
 
553 chandransh 12950
    public boolean equals(updatePassword_result that) {
48 ashish 12951
      if (that == null)
12952
        return false;
12953
 
12954
      boolean this_present_success = true;
12955
      boolean that_present_success = true;
12956
      if (this_present_success || that_present_success) {
12957
        if (!(this_present_success && that_present_success))
12958
          return false;
12959
        if (this.success != that.success)
12960
          return false;
12961
      }
12962
 
12963
      boolean this_present_ucx = true && this.isSetUcx();
12964
      boolean that_present_ucx = true && that.isSetUcx();
12965
      if (this_present_ucx || that_present_ucx) {
12966
        if (!(this_present_ucx && that_present_ucx))
12967
          return false;
12968
        if (!this.ucx.equals(that.ucx))
12969
          return false;
12970
      }
12971
 
12972
      return true;
12973
    }
12974
 
12975
    @Override
12976
    public int hashCode() {
12977
      return 0;
12978
    }
12979
 
553 chandransh 12980
    public int compareTo(updatePassword_result other) {
48 ashish 12981
      if (!getClass().equals(other.getClass())) {
12982
        return getClass().getName().compareTo(other.getClass().getName());
12983
      }
12984
 
12985
      int lastComparison = 0;
553 chandransh 12986
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12987
 
12988
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12989
      if (lastComparison != 0) {
12990
        return lastComparison;
12991
      }
12992
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12993
      if (lastComparison != 0) {
12994
        return lastComparison;
12995
      }
12996
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12997
      if (lastComparison != 0) {
12998
        return lastComparison;
12999
      }
13000
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13001
      if (lastComparison != 0) {
13002
        return lastComparison;
13003
      }
13004
      return 0;
13005
    }
13006
 
13007
    public void read(TProtocol iprot) throws TException {
13008
      TField field;
13009
      iprot.readStructBegin();
13010
      while (true)
13011
      {
13012
        field = iprot.readFieldBegin();
13013
        if (field.type == TType.STOP) { 
13014
          break;
13015
        }
13016
        _Fields fieldId = _Fields.findByThriftId(field.id);
13017
        if (fieldId == null) {
13018
          TProtocolUtil.skip(iprot, field.type);
13019
        } else {
13020
          switch (fieldId) {
13021
            case SUCCESS:
13022
              if (field.type == TType.BOOL) {
13023
                this.success = iprot.readBool();
13024
                setSuccessIsSet(true);
13025
              } else { 
13026
                TProtocolUtil.skip(iprot, field.type);
13027
              }
13028
              break;
13029
            case UCX:
13030
              if (field.type == TType.STRUCT) {
13031
                this.ucx = new UserContextException();
13032
                this.ucx.read(iprot);
13033
              } else { 
13034
                TProtocolUtil.skip(iprot, field.type);
13035
              }
13036
              break;
13037
          }
13038
          iprot.readFieldEnd();
13039
        }
13040
      }
13041
      iprot.readStructEnd();
13042
      validate();
13043
    }
13044
 
13045
    public void write(TProtocol oprot) throws TException {
13046
      oprot.writeStructBegin(STRUCT_DESC);
13047
 
13048
      if (this.isSetSuccess()) {
13049
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13050
        oprot.writeBool(this.success);
13051
        oprot.writeFieldEnd();
13052
      } else if (this.isSetUcx()) {
13053
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13054
        this.ucx.write(oprot);
13055
        oprot.writeFieldEnd();
13056
      }
13057
      oprot.writeFieldStop();
13058
      oprot.writeStructEnd();
13059
    }
13060
 
13061
    @Override
13062
    public String toString() {
553 chandransh 13063
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 13064
      boolean first = true;
13065
 
13066
      sb.append("success:");
13067
      sb.append(this.success);
13068
      first = false;
13069
      if (!first) sb.append(", ");
13070
      sb.append("ucx:");
13071
      if (this.ucx == null) {
13072
        sb.append("null");
13073
      } else {
13074
        sb.append(this.ucx);
13075
      }
13076
      first = false;
13077
      sb.append(")");
13078
      return sb.toString();
13079
    }
13080
 
13081
    public void validate() throws TException {
13082
      // check for required fields
13083
    }
13084
 
13085
  }
13086
 
582 rajveer 13087
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
13088
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
13089
 
13090
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
896 rajveer 13091
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)2);
582 rajveer 13092
 
13093
    private String email;
896 rajveer 13094
    private String newPassword;
582 rajveer 13095
 
13096
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13097
    public enum _Fields implements TFieldIdEnum {
896 rajveer 13098
      EMAIL((short)1, "email"),
13099
      NEW_PASSWORD((short)2, "newPassword");
582 rajveer 13100
 
13101
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13102
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13103
 
13104
      static {
13105
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13106
          byId.put((int)field._thriftId, field);
13107
          byName.put(field.getFieldName(), field);
13108
        }
13109
      }
13110
 
13111
      /**
13112
       * Find the _Fields constant that matches fieldId, or null if its not found.
13113
       */
13114
      public static _Fields findByThriftId(int fieldId) {
13115
        return byId.get(fieldId);
13116
      }
13117
 
13118
      /**
13119
       * Find the _Fields constant that matches fieldId, throwing an exception
13120
       * if it is not found.
13121
       */
13122
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13123
        _Fields fields = findByThriftId(fieldId);
13124
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13125
        return fields;
13126
      }
13127
 
13128
      /**
13129
       * Find the _Fields constant that matches name, or null if its not found.
13130
       */
13131
      public static _Fields findByName(String name) {
13132
        return byName.get(name);
13133
      }
13134
 
13135
      private final short _thriftId;
13136
      private final String _fieldName;
13137
 
13138
      _Fields(short thriftId, String fieldName) {
13139
        _thriftId = thriftId;
13140
        _fieldName = fieldName;
13141
      }
13142
 
13143
      public short getThriftFieldId() {
13144
        return _thriftId;
13145
      }
13146
 
13147
      public String getFieldName() {
13148
        return _fieldName;
13149
      }
13150
    }
13151
 
13152
    // isset id assignments
13153
 
13154
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13155
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
13156
          new FieldValueMetaData(TType.STRING)));
896 rajveer 13157
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
13158
          new FieldValueMetaData(TType.STRING)));
582 rajveer 13159
    }});
13160
 
13161
    static {
13162
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
13163
    }
13164
 
13165
    public forgotPassword_args() {
13166
    }
13167
 
13168
    public forgotPassword_args(
896 rajveer 13169
      String email,
13170
      String newPassword)
582 rajveer 13171
    {
13172
      this();
13173
      this.email = email;
896 rajveer 13174
      this.newPassword = newPassword;
582 rajveer 13175
    }
13176
 
13177
    /**
13178
     * Performs a deep copy on <i>other</i>.
13179
     */
13180
    public forgotPassword_args(forgotPassword_args other) {
13181
      if (other.isSetEmail()) {
13182
        this.email = other.email;
13183
      }
896 rajveer 13184
      if (other.isSetNewPassword()) {
13185
        this.newPassword = other.newPassword;
13186
      }
582 rajveer 13187
    }
13188
 
13189
    public forgotPassword_args deepCopy() {
13190
      return new forgotPassword_args(this);
13191
    }
13192
 
13193
    @Deprecated
13194
    public forgotPassword_args clone() {
13195
      return new forgotPassword_args(this);
13196
    }
13197
 
13198
    public String getEmail() {
13199
      return this.email;
13200
    }
13201
 
13202
    public forgotPassword_args setEmail(String email) {
13203
      this.email = email;
13204
      return this;
13205
    }
13206
 
13207
    public void unsetEmail() {
13208
      this.email = null;
13209
    }
13210
 
13211
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
13212
    public boolean isSetEmail() {
13213
      return this.email != null;
13214
    }
13215
 
13216
    public void setEmailIsSet(boolean value) {
13217
      if (!value) {
13218
        this.email = null;
13219
      }
13220
    }
13221
 
896 rajveer 13222
    public String getNewPassword() {
13223
      return this.newPassword;
13224
    }
13225
 
13226
    public forgotPassword_args setNewPassword(String newPassword) {
13227
      this.newPassword = newPassword;
13228
      return this;
13229
    }
13230
 
13231
    public void unsetNewPassword() {
13232
      this.newPassword = null;
13233
    }
13234
 
13235
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
13236
    public boolean isSetNewPassword() {
13237
      return this.newPassword != null;
13238
    }
13239
 
13240
    public void setNewPasswordIsSet(boolean value) {
13241
      if (!value) {
13242
        this.newPassword = null;
13243
      }
13244
    }
13245
 
582 rajveer 13246
    public void setFieldValue(_Fields field, Object value) {
13247
      switch (field) {
13248
      case EMAIL:
13249
        if (value == null) {
13250
          unsetEmail();
13251
        } else {
13252
          setEmail((String)value);
13253
        }
13254
        break;
13255
 
896 rajveer 13256
      case NEW_PASSWORD:
13257
        if (value == null) {
13258
          unsetNewPassword();
13259
        } else {
13260
          setNewPassword((String)value);
13261
        }
13262
        break;
13263
 
582 rajveer 13264
      }
13265
    }
13266
 
13267
    public void setFieldValue(int fieldID, Object value) {
13268
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13269
    }
13270
 
13271
    public Object getFieldValue(_Fields field) {
13272
      switch (field) {
13273
      case EMAIL:
13274
        return getEmail();
13275
 
896 rajveer 13276
      case NEW_PASSWORD:
13277
        return getNewPassword();
13278
 
582 rajveer 13279
      }
13280
      throw new IllegalStateException();
13281
    }
13282
 
13283
    public Object getFieldValue(int fieldId) {
13284
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13285
    }
13286
 
13287
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13288
    public boolean isSet(_Fields field) {
13289
      switch (field) {
13290
      case EMAIL:
13291
        return isSetEmail();
896 rajveer 13292
      case NEW_PASSWORD:
13293
        return isSetNewPassword();
582 rajveer 13294
      }
13295
      throw new IllegalStateException();
13296
    }
13297
 
13298
    public boolean isSet(int fieldID) {
13299
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13300
    }
13301
 
13302
    @Override
13303
    public boolean equals(Object that) {
13304
      if (that == null)
13305
        return false;
13306
      if (that instanceof forgotPassword_args)
13307
        return this.equals((forgotPassword_args)that);
13308
      return false;
13309
    }
13310
 
13311
    public boolean equals(forgotPassword_args that) {
13312
      if (that == null)
13313
        return false;
13314
 
13315
      boolean this_present_email = true && this.isSetEmail();
13316
      boolean that_present_email = true && that.isSetEmail();
13317
      if (this_present_email || that_present_email) {
13318
        if (!(this_present_email && that_present_email))
13319
          return false;
13320
        if (!this.email.equals(that.email))
13321
          return false;
13322
      }
13323
 
896 rajveer 13324
      boolean this_present_newPassword = true && this.isSetNewPassword();
13325
      boolean that_present_newPassword = true && that.isSetNewPassword();
13326
      if (this_present_newPassword || that_present_newPassword) {
13327
        if (!(this_present_newPassword && that_present_newPassword))
13328
          return false;
13329
        if (!this.newPassword.equals(that.newPassword))
13330
          return false;
13331
      }
13332
 
582 rajveer 13333
      return true;
13334
    }
13335
 
13336
    @Override
13337
    public int hashCode() {
13338
      return 0;
13339
    }
13340
 
13341
    public int compareTo(forgotPassword_args other) {
13342
      if (!getClass().equals(other.getClass())) {
13343
        return getClass().getName().compareTo(other.getClass().getName());
13344
      }
13345
 
13346
      int lastComparison = 0;
13347
      forgotPassword_args typedOther = (forgotPassword_args)other;
13348
 
13349
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
13350
      if (lastComparison != 0) {
13351
        return lastComparison;
13352
      }
13353
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
13354
      if (lastComparison != 0) {
13355
        return lastComparison;
13356
      }
896 rajveer 13357
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
13358
      if (lastComparison != 0) {
13359
        return lastComparison;
13360
      }
13361
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
13362
      if (lastComparison != 0) {
13363
        return lastComparison;
13364
      }
582 rajveer 13365
      return 0;
13366
    }
13367
 
13368
    public void read(TProtocol iprot) throws TException {
13369
      TField field;
13370
      iprot.readStructBegin();
13371
      while (true)
13372
      {
13373
        field = iprot.readFieldBegin();
13374
        if (field.type == TType.STOP) { 
13375
          break;
13376
        }
13377
        _Fields fieldId = _Fields.findByThriftId(field.id);
13378
        if (fieldId == null) {
13379
          TProtocolUtil.skip(iprot, field.type);
13380
        } else {
13381
          switch (fieldId) {
13382
            case EMAIL:
13383
              if (field.type == TType.STRING) {
13384
                this.email = iprot.readString();
13385
              } else { 
13386
                TProtocolUtil.skip(iprot, field.type);
13387
              }
13388
              break;
896 rajveer 13389
            case NEW_PASSWORD:
13390
              if (field.type == TType.STRING) {
13391
                this.newPassword = iprot.readString();
13392
              } else { 
13393
                TProtocolUtil.skip(iprot, field.type);
13394
              }
13395
              break;
582 rajveer 13396
          }
13397
          iprot.readFieldEnd();
13398
        }
13399
      }
13400
      iprot.readStructEnd();
13401
      validate();
13402
    }
13403
 
13404
    public void write(TProtocol oprot) throws TException {
13405
      validate();
13406
 
13407
      oprot.writeStructBegin(STRUCT_DESC);
13408
      if (this.email != null) {
13409
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
13410
        oprot.writeString(this.email);
13411
        oprot.writeFieldEnd();
13412
      }
896 rajveer 13413
      if (this.newPassword != null) {
13414
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
13415
        oprot.writeString(this.newPassword);
13416
        oprot.writeFieldEnd();
13417
      }
582 rajveer 13418
      oprot.writeFieldStop();
13419
      oprot.writeStructEnd();
13420
    }
13421
 
13422
    @Override
13423
    public String toString() {
13424
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
13425
      boolean first = true;
13426
 
13427
      sb.append("email:");
13428
      if (this.email == null) {
13429
        sb.append("null");
13430
      } else {
13431
        sb.append(this.email);
13432
      }
13433
      first = false;
896 rajveer 13434
      if (!first) sb.append(", ");
13435
      sb.append("newPassword:");
13436
      if (this.newPassword == null) {
13437
        sb.append("null");
13438
      } else {
13439
        sb.append(this.newPassword);
13440
      }
13441
      first = false;
582 rajveer 13442
      sb.append(")");
13443
      return sb.toString();
13444
    }
13445
 
13446
    public void validate() throws TException {
13447
      // check for required fields
13448
    }
13449
 
13450
  }
13451
 
13452
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
13453
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
13454
 
13455
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13456
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13457
 
13458
    private boolean success;
13459
    private UserContextException ucx;
13460
 
13461
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13462
    public enum _Fields implements TFieldIdEnum {
13463
      SUCCESS((short)0, "success"),
13464
      UCX((short)1, "ucx");
13465
 
13466
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13467
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13468
 
13469
      static {
13470
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13471
          byId.put((int)field._thriftId, field);
13472
          byName.put(field.getFieldName(), field);
13473
        }
13474
      }
13475
 
13476
      /**
13477
       * Find the _Fields constant that matches fieldId, or null if its not found.
13478
       */
13479
      public static _Fields findByThriftId(int fieldId) {
13480
        return byId.get(fieldId);
13481
      }
13482
 
13483
      /**
13484
       * Find the _Fields constant that matches fieldId, throwing an exception
13485
       * if it is not found.
13486
       */
13487
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13488
        _Fields fields = findByThriftId(fieldId);
13489
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13490
        return fields;
13491
      }
13492
 
13493
      /**
13494
       * Find the _Fields constant that matches name, or null if its not found.
13495
       */
13496
      public static _Fields findByName(String name) {
13497
        return byName.get(name);
13498
      }
13499
 
13500
      private final short _thriftId;
13501
      private final String _fieldName;
13502
 
13503
      _Fields(short thriftId, String fieldName) {
13504
        _thriftId = thriftId;
13505
        _fieldName = fieldName;
13506
      }
13507
 
13508
      public short getThriftFieldId() {
13509
        return _thriftId;
13510
      }
13511
 
13512
      public String getFieldName() {
13513
        return _fieldName;
13514
      }
13515
    }
13516
 
13517
    // isset id assignments
13518
    private static final int __SUCCESS_ISSET_ID = 0;
13519
    private BitSet __isset_bit_vector = new BitSet(1);
13520
 
13521
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13522
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13523
          new FieldValueMetaData(TType.BOOL)));
13524
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13525
          new FieldValueMetaData(TType.STRUCT)));
13526
    }});
13527
 
13528
    static {
13529
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
13530
    }
13531
 
13532
    public forgotPassword_result() {
13533
    }
13534
 
13535
    public forgotPassword_result(
13536
      boolean success,
13537
      UserContextException ucx)
13538
    {
13539
      this();
13540
      this.success = success;
13541
      setSuccessIsSet(true);
13542
      this.ucx = ucx;
13543
    }
13544
 
13545
    /**
13546
     * Performs a deep copy on <i>other</i>.
13547
     */
13548
    public forgotPassword_result(forgotPassword_result other) {
13549
      __isset_bit_vector.clear();
13550
      __isset_bit_vector.or(other.__isset_bit_vector);
13551
      this.success = other.success;
13552
      if (other.isSetUcx()) {
13553
        this.ucx = new UserContextException(other.ucx);
13554
      }
13555
    }
13556
 
13557
    public forgotPassword_result deepCopy() {
13558
      return new forgotPassword_result(this);
13559
    }
13560
 
13561
    @Deprecated
13562
    public forgotPassword_result clone() {
13563
      return new forgotPassword_result(this);
13564
    }
13565
 
13566
    public boolean isSuccess() {
13567
      return this.success;
13568
    }
13569
 
13570
    public forgotPassword_result setSuccess(boolean success) {
13571
      this.success = success;
13572
      setSuccessIsSet(true);
13573
      return this;
13574
    }
13575
 
13576
    public void unsetSuccess() {
13577
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13578
    }
13579
 
13580
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13581
    public boolean isSetSuccess() {
13582
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13583
    }
13584
 
13585
    public void setSuccessIsSet(boolean value) {
13586
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13587
    }
13588
 
13589
    public UserContextException getUcx() {
13590
      return this.ucx;
13591
    }
13592
 
13593
    public forgotPassword_result setUcx(UserContextException ucx) {
13594
      this.ucx = ucx;
13595
      return this;
13596
    }
13597
 
13598
    public void unsetUcx() {
13599
      this.ucx = null;
13600
    }
13601
 
13602
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13603
    public boolean isSetUcx() {
13604
      return this.ucx != null;
13605
    }
13606
 
13607
    public void setUcxIsSet(boolean value) {
13608
      if (!value) {
13609
        this.ucx = null;
13610
      }
13611
    }
13612
 
13613
    public void setFieldValue(_Fields field, Object value) {
13614
      switch (field) {
13615
      case SUCCESS:
13616
        if (value == null) {
13617
          unsetSuccess();
13618
        } else {
13619
          setSuccess((Boolean)value);
13620
        }
13621
        break;
13622
 
13623
      case UCX:
13624
        if (value == null) {
13625
          unsetUcx();
13626
        } else {
13627
          setUcx((UserContextException)value);
13628
        }
13629
        break;
13630
 
13631
      }
13632
    }
13633
 
13634
    public void setFieldValue(int fieldID, Object value) {
13635
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13636
    }
13637
 
13638
    public Object getFieldValue(_Fields field) {
13639
      switch (field) {
13640
      case SUCCESS:
13641
        return new Boolean(isSuccess());
13642
 
13643
      case UCX:
13644
        return getUcx();
13645
 
13646
      }
13647
      throw new IllegalStateException();
13648
    }
13649
 
13650
    public Object getFieldValue(int fieldId) {
13651
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13652
    }
13653
 
13654
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13655
    public boolean isSet(_Fields field) {
13656
      switch (field) {
13657
      case SUCCESS:
13658
        return isSetSuccess();
13659
      case UCX:
13660
        return isSetUcx();
13661
      }
13662
      throw new IllegalStateException();
13663
    }
13664
 
13665
    public boolean isSet(int fieldID) {
13666
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13667
    }
13668
 
13669
    @Override
13670
    public boolean equals(Object that) {
13671
      if (that == null)
13672
        return false;
13673
      if (that instanceof forgotPassword_result)
13674
        return this.equals((forgotPassword_result)that);
13675
      return false;
13676
    }
13677
 
13678
    public boolean equals(forgotPassword_result that) {
13679
      if (that == null)
13680
        return false;
13681
 
13682
      boolean this_present_success = true;
13683
      boolean that_present_success = true;
13684
      if (this_present_success || that_present_success) {
13685
        if (!(this_present_success && that_present_success))
13686
          return false;
13687
        if (this.success != that.success)
13688
          return false;
13689
      }
13690
 
13691
      boolean this_present_ucx = true && this.isSetUcx();
13692
      boolean that_present_ucx = true && that.isSetUcx();
13693
      if (this_present_ucx || that_present_ucx) {
13694
        if (!(this_present_ucx && that_present_ucx))
13695
          return false;
13696
        if (!this.ucx.equals(that.ucx))
13697
          return false;
13698
      }
13699
 
13700
      return true;
13701
    }
13702
 
13703
    @Override
13704
    public int hashCode() {
13705
      return 0;
13706
    }
13707
 
13708
    public int compareTo(forgotPassword_result other) {
13709
      if (!getClass().equals(other.getClass())) {
13710
        return getClass().getName().compareTo(other.getClass().getName());
13711
      }
13712
 
13713
      int lastComparison = 0;
13714
      forgotPassword_result typedOther = (forgotPassword_result)other;
13715
 
13716
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13717
      if (lastComparison != 0) {
13718
        return lastComparison;
13719
      }
13720
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13721
      if (lastComparison != 0) {
13722
        return lastComparison;
13723
      }
13724
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13725
      if (lastComparison != 0) {
13726
        return lastComparison;
13727
      }
13728
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13729
      if (lastComparison != 0) {
13730
        return lastComparison;
13731
      }
13732
      return 0;
13733
    }
13734
 
13735
    public void read(TProtocol iprot) throws TException {
13736
      TField field;
13737
      iprot.readStructBegin();
13738
      while (true)
13739
      {
13740
        field = iprot.readFieldBegin();
13741
        if (field.type == TType.STOP) { 
13742
          break;
13743
        }
13744
        _Fields fieldId = _Fields.findByThriftId(field.id);
13745
        if (fieldId == null) {
13746
          TProtocolUtil.skip(iprot, field.type);
13747
        } else {
13748
          switch (fieldId) {
13749
            case SUCCESS:
13750
              if (field.type == TType.BOOL) {
13751
                this.success = iprot.readBool();
13752
                setSuccessIsSet(true);
13753
              } else { 
13754
                TProtocolUtil.skip(iprot, field.type);
13755
              }
13756
              break;
13757
            case UCX:
13758
              if (field.type == TType.STRUCT) {
13759
                this.ucx = new UserContextException();
13760
                this.ucx.read(iprot);
13761
              } else { 
13762
                TProtocolUtil.skip(iprot, field.type);
13763
              }
13764
              break;
13765
          }
13766
          iprot.readFieldEnd();
13767
        }
13768
      }
13769
      iprot.readStructEnd();
13770
      validate();
13771
    }
13772
 
13773
    public void write(TProtocol oprot) throws TException {
13774
      oprot.writeStructBegin(STRUCT_DESC);
13775
 
13776
      if (this.isSetSuccess()) {
13777
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13778
        oprot.writeBool(this.success);
13779
        oprot.writeFieldEnd();
13780
      } else if (this.isSetUcx()) {
13781
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13782
        this.ucx.write(oprot);
13783
        oprot.writeFieldEnd();
13784
      }
13785
      oprot.writeFieldStop();
13786
      oprot.writeStructEnd();
13787
    }
13788
 
13789
    @Override
13790
    public String toString() {
13791
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
13792
      boolean first = true;
13793
 
13794
      sb.append("success:");
13795
      sb.append(this.success);
13796
      first = false;
13797
      if (!first) sb.append(", ");
13798
      sb.append("ucx:");
13799
      if (this.ucx == null) {
13800
        sb.append("null");
13801
      } else {
13802
        sb.append(this.ucx);
13803
      }
13804
      first = false;
13805
      sb.append(")");
13806
      return sb.toString();
13807
    }
13808
 
13809
    public void validate() throws TException {
13810
      // check for required fields
13811
    }
13812
 
13813
  }
13814
 
593 rajveer 13815
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
13816
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
13817
 
13818
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
13819
 
13820
    private long userId;
13821
 
13822
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13823
    public enum _Fields implements TFieldIdEnum {
13824
      USER_ID((short)1, "userId");
13825
 
13826
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13827
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13828
 
13829
      static {
13830
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13831
          byId.put((int)field._thriftId, field);
13832
          byName.put(field.getFieldName(), field);
13833
        }
13834
      }
13835
 
13836
      /**
13837
       * Find the _Fields constant that matches fieldId, or null if its not found.
13838
       */
13839
      public static _Fields findByThriftId(int fieldId) {
13840
        return byId.get(fieldId);
13841
      }
13842
 
13843
      /**
13844
       * Find the _Fields constant that matches fieldId, throwing an exception
13845
       * if it is not found.
13846
       */
13847
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13848
        _Fields fields = findByThriftId(fieldId);
13849
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13850
        return fields;
13851
      }
13852
 
13853
      /**
13854
       * Find the _Fields constant that matches name, or null if its not found.
13855
       */
13856
      public static _Fields findByName(String name) {
13857
        return byName.get(name);
13858
      }
13859
 
13860
      private final short _thriftId;
13861
      private final String _fieldName;
13862
 
13863
      _Fields(short thriftId, String fieldName) {
13864
        _thriftId = thriftId;
13865
        _fieldName = fieldName;
13866
      }
13867
 
13868
      public short getThriftFieldId() {
13869
        return _thriftId;
13870
      }
13871
 
13872
      public String getFieldName() {
13873
        return _fieldName;
13874
      }
13875
    }
13876
 
13877
    // isset id assignments
13878
    private static final int __USERID_ISSET_ID = 0;
13879
    private BitSet __isset_bit_vector = new BitSet(1);
13880
 
13881
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13882
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
13883
          new FieldValueMetaData(TType.I64)));
13884
    }});
13885
 
13886
    static {
13887
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
13888
    }
13889
 
13890
    public getAllAddressesForUser_args() {
13891
    }
13892
 
13893
    public getAllAddressesForUser_args(
13894
      long userId)
13895
    {
13896
      this();
13897
      this.userId = userId;
13898
      setUserIdIsSet(true);
13899
    }
13900
 
13901
    /**
13902
     * Performs a deep copy on <i>other</i>.
13903
     */
13904
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
13905
      __isset_bit_vector.clear();
13906
      __isset_bit_vector.or(other.__isset_bit_vector);
13907
      this.userId = other.userId;
13908
    }
13909
 
13910
    public getAllAddressesForUser_args deepCopy() {
13911
      return new getAllAddressesForUser_args(this);
13912
    }
13913
 
13914
    @Deprecated
13915
    public getAllAddressesForUser_args clone() {
13916
      return new getAllAddressesForUser_args(this);
13917
    }
13918
 
13919
    public long getUserId() {
13920
      return this.userId;
13921
    }
13922
 
13923
    public getAllAddressesForUser_args setUserId(long userId) {
13924
      this.userId = userId;
13925
      setUserIdIsSet(true);
13926
      return this;
13927
    }
13928
 
13929
    public void unsetUserId() {
13930
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13931
    }
13932
 
13933
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13934
    public boolean isSetUserId() {
13935
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13936
    }
13937
 
13938
    public void setUserIdIsSet(boolean value) {
13939
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13940
    }
13941
 
13942
    public void setFieldValue(_Fields field, Object value) {
13943
      switch (field) {
13944
      case USER_ID:
13945
        if (value == null) {
13946
          unsetUserId();
13947
        } else {
13948
          setUserId((Long)value);
13949
        }
13950
        break;
13951
 
13952
      }
13953
    }
13954
 
13955
    public void setFieldValue(int fieldID, Object value) {
13956
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13957
    }
13958
 
13959
    public Object getFieldValue(_Fields field) {
13960
      switch (field) {
13961
      case USER_ID:
13962
        return new Long(getUserId());
13963
 
13964
      }
13965
      throw new IllegalStateException();
13966
    }
13967
 
13968
    public Object getFieldValue(int fieldId) {
13969
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13970
    }
13971
 
13972
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13973
    public boolean isSet(_Fields field) {
13974
      switch (field) {
13975
      case USER_ID:
13976
        return isSetUserId();
13977
      }
13978
      throw new IllegalStateException();
13979
    }
13980
 
13981
    public boolean isSet(int fieldID) {
13982
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13983
    }
13984
 
13985
    @Override
13986
    public boolean equals(Object that) {
13987
      if (that == null)
13988
        return false;
13989
      if (that instanceof getAllAddressesForUser_args)
13990
        return this.equals((getAllAddressesForUser_args)that);
13991
      return false;
13992
    }
13993
 
13994
    public boolean equals(getAllAddressesForUser_args that) {
13995
      if (that == null)
13996
        return false;
13997
 
13998
      boolean this_present_userId = true;
13999
      boolean that_present_userId = true;
14000
      if (this_present_userId || that_present_userId) {
14001
        if (!(this_present_userId && that_present_userId))
14002
          return false;
14003
        if (this.userId != that.userId)
14004
          return false;
14005
      }
14006
 
14007
      return true;
14008
    }
14009
 
14010
    @Override
14011
    public int hashCode() {
14012
      return 0;
14013
    }
14014
 
14015
    public int compareTo(getAllAddressesForUser_args other) {
14016
      if (!getClass().equals(other.getClass())) {
14017
        return getClass().getName().compareTo(other.getClass().getName());
14018
      }
14019
 
14020
      int lastComparison = 0;
14021
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
14022
 
14023
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14024
      if (lastComparison != 0) {
14025
        return lastComparison;
14026
      }
14027
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14028
      if (lastComparison != 0) {
14029
        return lastComparison;
14030
      }
14031
      return 0;
14032
    }
14033
 
14034
    public void read(TProtocol iprot) throws TException {
14035
      TField field;
14036
      iprot.readStructBegin();
14037
      while (true)
14038
      {
14039
        field = iprot.readFieldBegin();
14040
        if (field.type == TType.STOP) { 
14041
          break;
14042
        }
14043
        _Fields fieldId = _Fields.findByThriftId(field.id);
14044
        if (fieldId == null) {
14045
          TProtocolUtil.skip(iprot, field.type);
14046
        } else {
14047
          switch (fieldId) {
14048
            case USER_ID:
14049
              if (field.type == TType.I64) {
14050
                this.userId = iprot.readI64();
14051
                setUserIdIsSet(true);
14052
              } else { 
14053
                TProtocolUtil.skip(iprot, field.type);
14054
              }
14055
              break;
14056
          }
14057
          iprot.readFieldEnd();
14058
        }
14059
      }
14060
      iprot.readStructEnd();
14061
      validate();
14062
    }
14063
 
14064
    public void write(TProtocol oprot) throws TException {
14065
      validate();
14066
 
14067
      oprot.writeStructBegin(STRUCT_DESC);
14068
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14069
      oprot.writeI64(this.userId);
14070
      oprot.writeFieldEnd();
14071
      oprot.writeFieldStop();
14072
      oprot.writeStructEnd();
14073
    }
14074
 
14075
    @Override
14076
    public String toString() {
14077
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
14078
      boolean first = true;
14079
 
14080
      sb.append("userId:");
14081
      sb.append(this.userId);
14082
      first = false;
14083
      sb.append(")");
14084
      return sb.toString();
14085
    }
14086
 
14087
    public void validate() throws TException {
14088
      // check for required fields
14089
    }
14090
 
14091
  }
14092
 
14093
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
14094
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
14095
 
14096
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
14097
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14098
 
14099
    private List<Address> success;
14100
    private UserContextException ucx;
14101
 
14102
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14103
    public enum _Fields implements TFieldIdEnum {
14104
      SUCCESS((short)0, "success"),
14105
      UCX((short)1, "ucx");
14106
 
14107
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14108
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14109
 
14110
      static {
14111
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14112
          byId.put((int)field._thriftId, field);
14113
          byName.put(field.getFieldName(), field);
14114
        }
14115
      }
14116
 
14117
      /**
14118
       * Find the _Fields constant that matches fieldId, or null if its not found.
14119
       */
14120
      public static _Fields findByThriftId(int fieldId) {
14121
        return byId.get(fieldId);
14122
      }
14123
 
14124
      /**
14125
       * Find the _Fields constant that matches fieldId, throwing an exception
14126
       * if it is not found.
14127
       */
14128
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14129
        _Fields fields = findByThriftId(fieldId);
14130
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14131
        return fields;
14132
      }
14133
 
14134
      /**
14135
       * Find the _Fields constant that matches name, or null if its not found.
14136
       */
14137
      public static _Fields findByName(String name) {
14138
        return byName.get(name);
14139
      }
14140
 
14141
      private final short _thriftId;
14142
      private final String _fieldName;
14143
 
14144
      _Fields(short thriftId, String fieldName) {
14145
        _thriftId = thriftId;
14146
        _fieldName = fieldName;
14147
      }
14148
 
14149
      public short getThriftFieldId() {
14150
        return _thriftId;
14151
      }
14152
 
14153
      public String getFieldName() {
14154
        return _fieldName;
14155
      }
14156
    }
14157
 
14158
    // isset id assignments
14159
 
14160
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14161
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14162
          new ListMetaData(TType.LIST, 
14163
              new StructMetaData(TType.STRUCT, Address.class))));
14164
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14165
          new FieldValueMetaData(TType.STRUCT)));
14166
    }});
14167
 
14168
    static {
14169
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
14170
    }
14171
 
14172
    public getAllAddressesForUser_result() {
14173
    }
14174
 
14175
    public getAllAddressesForUser_result(
14176
      List<Address> success,
14177
      UserContextException ucx)
14178
    {
14179
      this();
14180
      this.success = success;
14181
      this.ucx = ucx;
14182
    }
14183
 
14184
    /**
14185
     * Performs a deep copy on <i>other</i>.
14186
     */
14187
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
14188
      if (other.isSetSuccess()) {
14189
        List<Address> __this__success = new ArrayList<Address>();
14190
        for (Address other_element : other.success) {
14191
          __this__success.add(new Address(other_element));
14192
        }
14193
        this.success = __this__success;
14194
      }
14195
      if (other.isSetUcx()) {
14196
        this.ucx = new UserContextException(other.ucx);
14197
      }
14198
    }
14199
 
14200
    public getAllAddressesForUser_result deepCopy() {
14201
      return new getAllAddressesForUser_result(this);
14202
    }
14203
 
14204
    @Deprecated
14205
    public getAllAddressesForUser_result clone() {
14206
      return new getAllAddressesForUser_result(this);
14207
    }
14208
 
14209
    public int getSuccessSize() {
14210
      return (this.success == null) ? 0 : this.success.size();
14211
    }
14212
 
14213
    public java.util.Iterator<Address> getSuccessIterator() {
14214
      return (this.success == null) ? null : this.success.iterator();
14215
    }
14216
 
14217
    public void addToSuccess(Address elem) {
14218
      if (this.success == null) {
14219
        this.success = new ArrayList<Address>();
14220
      }
14221
      this.success.add(elem);
14222
    }
14223
 
14224
    public List<Address> getSuccess() {
14225
      return this.success;
14226
    }
14227
 
14228
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
14229
      this.success = success;
14230
      return this;
14231
    }
14232
 
14233
    public void unsetSuccess() {
14234
      this.success = null;
14235
    }
14236
 
14237
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14238
    public boolean isSetSuccess() {
14239
      return this.success != null;
14240
    }
14241
 
14242
    public void setSuccessIsSet(boolean value) {
14243
      if (!value) {
14244
        this.success = null;
14245
      }
14246
    }
14247
 
14248
    public UserContextException getUcx() {
14249
      return this.ucx;
14250
    }
14251
 
14252
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
14253
      this.ucx = ucx;
14254
      return this;
14255
    }
14256
 
14257
    public void unsetUcx() {
14258
      this.ucx = null;
14259
    }
14260
 
14261
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14262
    public boolean isSetUcx() {
14263
      return this.ucx != null;
14264
    }
14265
 
14266
    public void setUcxIsSet(boolean value) {
14267
      if (!value) {
14268
        this.ucx = null;
14269
      }
14270
    }
14271
 
14272
    public void setFieldValue(_Fields field, Object value) {
14273
      switch (field) {
14274
      case SUCCESS:
14275
        if (value == null) {
14276
          unsetSuccess();
14277
        } else {
14278
          setSuccess((List<Address>)value);
14279
        }
14280
        break;
14281
 
14282
      case UCX:
14283
        if (value == null) {
14284
          unsetUcx();
14285
        } else {
14286
          setUcx((UserContextException)value);
14287
        }
14288
        break;
14289
 
14290
      }
14291
    }
14292
 
14293
    public void setFieldValue(int fieldID, Object value) {
14294
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14295
    }
14296
 
14297
    public Object getFieldValue(_Fields field) {
14298
      switch (field) {
14299
      case SUCCESS:
14300
        return getSuccess();
14301
 
14302
      case UCX:
14303
        return getUcx();
14304
 
14305
      }
14306
      throw new IllegalStateException();
14307
    }
14308
 
14309
    public Object getFieldValue(int fieldId) {
14310
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14311
    }
14312
 
14313
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14314
    public boolean isSet(_Fields field) {
14315
      switch (field) {
14316
      case SUCCESS:
14317
        return isSetSuccess();
14318
      case UCX:
14319
        return isSetUcx();
14320
      }
14321
      throw new IllegalStateException();
14322
    }
14323
 
14324
    public boolean isSet(int fieldID) {
14325
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14326
    }
14327
 
14328
    @Override
14329
    public boolean equals(Object that) {
14330
      if (that == null)
14331
        return false;
14332
      if (that instanceof getAllAddressesForUser_result)
14333
        return this.equals((getAllAddressesForUser_result)that);
14334
      return false;
14335
    }
14336
 
14337
    public boolean equals(getAllAddressesForUser_result that) {
14338
      if (that == null)
14339
        return false;
14340
 
14341
      boolean this_present_success = true && this.isSetSuccess();
14342
      boolean that_present_success = true && that.isSetSuccess();
14343
      if (this_present_success || that_present_success) {
14344
        if (!(this_present_success && that_present_success))
14345
          return false;
14346
        if (!this.success.equals(that.success))
14347
          return false;
14348
      }
14349
 
14350
      boolean this_present_ucx = true && this.isSetUcx();
14351
      boolean that_present_ucx = true && that.isSetUcx();
14352
      if (this_present_ucx || that_present_ucx) {
14353
        if (!(this_present_ucx && that_present_ucx))
14354
          return false;
14355
        if (!this.ucx.equals(that.ucx))
14356
          return false;
14357
      }
14358
 
14359
      return true;
14360
    }
14361
 
14362
    @Override
14363
    public int hashCode() {
14364
      return 0;
14365
    }
14366
 
14367
    public int compareTo(getAllAddressesForUser_result other) {
14368
      if (!getClass().equals(other.getClass())) {
14369
        return getClass().getName().compareTo(other.getClass().getName());
14370
      }
14371
 
14372
      int lastComparison = 0;
14373
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
14374
 
14375
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14376
      if (lastComparison != 0) {
14377
        return lastComparison;
14378
      }
14379
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14380
      if (lastComparison != 0) {
14381
        return lastComparison;
14382
      }
14383
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14384
      if (lastComparison != 0) {
14385
        return lastComparison;
14386
      }
14387
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14388
      if (lastComparison != 0) {
14389
        return lastComparison;
14390
      }
14391
      return 0;
14392
    }
14393
 
14394
    public void read(TProtocol iprot) throws TException {
14395
      TField field;
14396
      iprot.readStructBegin();
14397
      while (true)
14398
      {
14399
        field = iprot.readFieldBegin();
14400
        if (field.type == TType.STOP) { 
14401
          break;
14402
        }
14403
        _Fields fieldId = _Fields.findByThriftId(field.id);
14404
        if (fieldId == null) {
14405
          TProtocolUtil.skip(iprot, field.type);
14406
        } else {
14407
          switch (fieldId) {
14408
            case SUCCESS:
14409
              if (field.type == TType.LIST) {
14410
                {
771 rajveer 14411
                  TList _list16 = iprot.readListBegin();
14412
                  this.success = new ArrayList<Address>(_list16.size);
14413
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
593 rajveer 14414
                  {
771 rajveer 14415
                    Address _elem18;
14416
                    _elem18 = new Address();
14417
                    _elem18.read(iprot);
14418
                    this.success.add(_elem18);
593 rajveer 14419
                  }
14420
                  iprot.readListEnd();
14421
                }
14422
              } else { 
14423
                TProtocolUtil.skip(iprot, field.type);
14424
              }
14425
              break;
14426
            case UCX:
14427
              if (field.type == TType.STRUCT) {
14428
                this.ucx = new UserContextException();
14429
                this.ucx.read(iprot);
14430
              } else { 
14431
                TProtocolUtil.skip(iprot, field.type);
14432
              }
14433
              break;
14434
          }
14435
          iprot.readFieldEnd();
14436
        }
14437
      }
14438
      iprot.readStructEnd();
14439
      validate();
14440
    }
14441
 
14442
    public void write(TProtocol oprot) throws TException {
14443
      oprot.writeStructBegin(STRUCT_DESC);
14444
 
14445
      if (this.isSetSuccess()) {
14446
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14447
        {
14448
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 14449
          for (Address _iter19 : this.success)
593 rajveer 14450
          {
771 rajveer 14451
            _iter19.write(oprot);
593 rajveer 14452
          }
14453
          oprot.writeListEnd();
14454
        }
14455
        oprot.writeFieldEnd();
14456
      } else if (this.isSetUcx()) {
14457
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14458
        this.ucx.write(oprot);
14459
        oprot.writeFieldEnd();
14460
      }
14461
      oprot.writeFieldStop();
14462
      oprot.writeStructEnd();
14463
    }
14464
 
14465
    @Override
14466
    public String toString() {
14467
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
14468
      boolean first = true;
14469
 
14470
      sb.append("success:");
14471
      if (this.success == null) {
14472
        sb.append("null");
14473
      } else {
14474
        sb.append(this.success);
14475
      }
14476
      first = false;
14477
      if (!first) sb.append(", ");
14478
      sb.append("ucx:");
14479
      if (this.ucx == null) {
14480
        sb.append("null");
14481
      } else {
14482
        sb.append(this.ucx);
14483
      }
14484
      first = false;
14485
      sb.append(")");
14486
      return sb.toString();
14487
    }
14488
 
14489
    public void validate() throws TException {
14490
      // check for required fields
14491
    }
14492
 
14493
  }
14494
 
14495
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
14496
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
14497
 
14498
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14499
 
14500
    private long userId;
14501
 
14502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14503
    public enum _Fields implements TFieldIdEnum {
14504
      USER_ID((short)1, "userId");
14505
 
14506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14508
 
14509
      static {
14510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14511
          byId.put((int)field._thriftId, field);
14512
          byName.put(field.getFieldName(), field);
14513
        }
14514
      }
14515
 
14516
      /**
14517
       * Find the _Fields constant that matches fieldId, or null if its not found.
14518
       */
14519
      public static _Fields findByThriftId(int fieldId) {
14520
        return byId.get(fieldId);
14521
      }
14522
 
14523
      /**
14524
       * Find the _Fields constant that matches fieldId, throwing an exception
14525
       * if it is not found.
14526
       */
14527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14528
        _Fields fields = findByThriftId(fieldId);
14529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14530
        return fields;
14531
      }
14532
 
14533
      /**
14534
       * Find the _Fields constant that matches name, or null if its not found.
14535
       */
14536
      public static _Fields findByName(String name) {
14537
        return byName.get(name);
14538
      }
14539
 
14540
      private final short _thriftId;
14541
      private final String _fieldName;
14542
 
14543
      _Fields(short thriftId, String fieldName) {
14544
        _thriftId = thriftId;
14545
        _fieldName = fieldName;
14546
      }
14547
 
14548
      public short getThriftFieldId() {
14549
        return _thriftId;
14550
      }
14551
 
14552
      public String getFieldName() {
14553
        return _fieldName;
14554
      }
14555
    }
14556
 
14557
    // isset id assignments
14558
    private static final int __USERID_ISSET_ID = 0;
14559
    private BitSet __isset_bit_vector = new BitSet(1);
14560
 
14561
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14562
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14563
          new FieldValueMetaData(TType.I64)));
14564
    }});
14565
 
14566
    static {
14567
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
14568
    }
14569
 
14570
    public getDefaultAddressId_args() {
14571
    }
14572
 
14573
    public getDefaultAddressId_args(
14574
      long userId)
14575
    {
14576
      this();
14577
      this.userId = userId;
14578
      setUserIdIsSet(true);
14579
    }
14580
 
14581
    /**
14582
     * Performs a deep copy on <i>other</i>.
14583
     */
14584
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
14585
      __isset_bit_vector.clear();
14586
      __isset_bit_vector.or(other.__isset_bit_vector);
14587
      this.userId = other.userId;
14588
    }
14589
 
14590
    public getDefaultAddressId_args deepCopy() {
14591
      return new getDefaultAddressId_args(this);
14592
    }
14593
 
14594
    @Deprecated
14595
    public getDefaultAddressId_args clone() {
14596
      return new getDefaultAddressId_args(this);
14597
    }
14598
 
14599
    public long getUserId() {
14600
      return this.userId;
14601
    }
14602
 
14603
    public getDefaultAddressId_args setUserId(long userId) {
14604
      this.userId = userId;
14605
      setUserIdIsSet(true);
14606
      return this;
14607
    }
14608
 
14609
    public void unsetUserId() {
14610
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14611
    }
14612
 
14613
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14614
    public boolean isSetUserId() {
14615
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14616
    }
14617
 
14618
    public void setUserIdIsSet(boolean value) {
14619
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14620
    }
14621
 
14622
    public void setFieldValue(_Fields field, Object value) {
14623
      switch (field) {
14624
      case USER_ID:
14625
        if (value == null) {
14626
          unsetUserId();
14627
        } else {
14628
          setUserId((Long)value);
14629
        }
14630
        break;
14631
 
14632
      }
14633
    }
14634
 
14635
    public void setFieldValue(int fieldID, Object value) {
14636
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14637
    }
14638
 
14639
    public Object getFieldValue(_Fields field) {
14640
      switch (field) {
14641
      case USER_ID:
14642
        return new Long(getUserId());
14643
 
14644
      }
14645
      throw new IllegalStateException();
14646
    }
14647
 
14648
    public Object getFieldValue(int fieldId) {
14649
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14650
    }
14651
 
14652
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14653
    public boolean isSet(_Fields field) {
14654
      switch (field) {
14655
      case USER_ID:
14656
        return isSetUserId();
14657
      }
14658
      throw new IllegalStateException();
14659
    }
14660
 
14661
    public boolean isSet(int fieldID) {
14662
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14663
    }
14664
 
14665
    @Override
14666
    public boolean equals(Object that) {
14667
      if (that == null)
14668
        return false;
14669
      if (that instanceof getDefaultAddressId_args)
14670
        return this.equals((getDefaultAddressId_args)that);
14671
      return false;
14672
    }
14673
 
14674
    public boolean equals(getDefaultAddressId_args that) {
14675
      if (that == null)
14676
        return false;
14677
 
14678
      boolean this_present_userId = true;
14679
      boolean that_present_userId = true;
14680
      if (this_present_userId || that_present_userId) {
14681
        if (!(this_present_userId && that_present_userId))
14682
          return false;
14683
        if (this.userId != that.userId)
14684
          return false;
14685
      }
14686
 
14687
      return true;
14688
    }
14689
 
14690
    @Override
14691
    public int hashCode() {
14692
      return 0;
14693
    }
14694
 
14695
    public int compareTo(getDefaultAddressId_args other) {
14696
      if (!getClass().equals(other.getClass())) {
14697
        return getClass().getName().compareTo(other.getClass().getName());
14698
      }
14699
 
14700
      int lastComparison = 0;
14701
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
14702
 
14703
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14704
      if (lastComparison != 0) {
14705
        return lastComparison;
14706
      }
14707
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14708
      if (lastComparison != 0) {
14709
        return lastComparison;
14710
      }
14711
      return 0;
14712
    }
14713
 
14714
    public void read(TProtocol iprot) throws TException {
14715
      TField field;
14716
      iprot.readStructBegin();
14717
      while (true)
14718
      {
14719
        field = iprot.readFieldBegin();
14720
        if (field.type == TType.STOP) { 
14721
          break;
14722
        }
14723
        _Fields fieldId = _Fields.findByThriftId(field.id);
14724
        if (fieldId == null) {
14725
          TProtocolUtil.skip(iprot, field.type);
14726
        } else {
14727
          switch (fieldId) {
14728
            case USER_ID:
14729
              if (field.type == TType.I64) {
14730
                this.userId = iprot.readI64();
14731
                setUserIdIsSet(true);
14732
              } else { 
14733
                TProtocolUtil.skip(iprot, field.type);
14734
              }
14735
              break;
14736
          }
14737
          iprot.readFieldEnd();
14738
        }
14739
      }
14740
      iprot.readStructEnd();
14741
      validate();
14742
    }
14743
 
14744
    public void write(TProtocol oprot) throws TException {
14745
      validate();
14746
 
14747
      oprot.writeStructBegin(STRUCT_DESC);
14748
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14749
      oprot.writeI64(this.userId);
14750
      oprot.writeFieldEnd();
14751
      oprot.writeFieldStop();
14752
      oprot.writeStructEnd();
14753
    }
14754
 
14755
    @Override
14756
    public String toString() {
14757
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
14758
      boolean first = true;
14759
 
14760
      sb.append("userId:");
14761
      sb.append(this.userId);
14762
      first = false;
14763
      sb.append(")");
14764
      return sb.toString();
14765
    }
14766
 
14767
    public void validate() throws TException {
14768
      // check for required fields
14769
    }
14770
 
14771
  }
14772
 
14773
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
14774
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
14775
 
14776
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
14777
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14778
 
14779
    private long success;
14780
    private UserContextException ucx;
14781
 
14782
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14783
    public enum _Fields implements TFieldIdEnum {
14784
      SUCCESS((short)0, "success"),
14785
      UCX((short)1, "ucx");
14786
 
14787
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14788
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14789
 
14790
      static {
14791
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14792
          byId.put((int)field._thriftId, field);
14793
          byName.put(field.getFieldName(), field);
14794
        }
14795
      }
14796
 
14797
      /**
14798
       * Find the _Fields constant that matches fieldId, or null if its not found.
14799
       */
14800
      public static _Fields findByThriftId(int fieldId) {
14801
        return byId.get(fieldId);
14802
      }
14803
 
14804
      /**
14805
       * Find the _Fields constant that matches fieldId, throwing an exception
14806
       * if it is not found.
14807
       */
14808
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14809
        _Fields fields = findByThriftId(fieldId);
14810
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14811
        return fields;
14812
      }
14813
 
14814
      /**
14815
       * Find the _Fields constant that matches name, or null if its not found.
14816
       */
14817
      public static _Fields findByName(String name) {
14818
        return byName.get(name);
14819
      }
14820
 
14821
      private final short _thriftId;
14822
      private final String _fieldName;
14823
 
14824
      _Fields(short thriftId, String fieldName) {
14825
        _thriftId = thriftId;
14826
        _fieldName = fieldName;
14827
      }
14828
 
14829
      public short getThriftFieldId() {
14830
        return _thriftId;
14831
      }
14832
 
14833
      public String getFieldName() {
14834
        return _fieldName;
14835
      }
14836
    }
14837
 
14838
    // isset id assignments
14839
    private static final int __SUCCESS_ISSET_ID = 0;
14840
    private BitSet __isset_bit_vector = new BitSet(1);
14841
 
14842
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14843
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14844
          new FieldValueMetaData(TType.I64)));
14845
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14846
          new FieldValueMetaData(TType.STRUCT)));
14847
    }});
14848
 
14849
    static {
14850
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
14851
    }
14852
 
14853
    public getDefaultAddressId_result() {
14854
    }
14855
 
14856
    public getDefaultAddressId_result(
14857
      long success,
14858
      UserContextException ucx)
14859
    {
14860
      this();
14861
      this.success = success;
14862
      setSuccessIsSet(true);
14863
      this.ucx = ucx;
14864
    }
14865
 
14866
    /**
14867
     * Performs a deep copy on <i>other</i>.
14868
     */
14869
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
14870
      __isset_bit_vector.clear();
14871
      __isset_bit_vector.or(other.__isset_bit_vector);
14872
      this.success = other.success;
14873
      if (other.isSetUcx()) {
14874
        this.ucx = new UserContextException(other.ucx);
14875
      }
14876
    }
14877
 
14878
    public getDefaultAddressId_result deepCopy() {
14879
      return new getDefaultAddressId_result(this);
14880
    }
14881
 
14882
    @Deprecated
14883
    public getDefaultAddressId_result clone() {
14884
      return new getDefaultAddressId_result(this);
14885
    }
14886
 
14887
    public long getSuccess() {
14888
      return this.success;
14889
    }
14890
 
14891
    public getDefaultAddressId_result setSuccess(long success) {
14892
      this.success = success;
14893
      setSuccessIsSet(true);
14894
      return this;
14895
    }
14896
 
14897
    public void unsetSuccess() {
14898
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14899
    }
14900
 
14901
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14902
    public boolean isSetSuccess() {
14903
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14904
    }
14905
 
14906
    public void setSuccessIsSet(boolean value) {
14907
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14908
    }
14909
 
14910
    public UserContextException getUcx() {
14911
      return this.ucx;
14912
    }
14913
 
14914
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
14915
      this.ucx = ucx;
14916
      return this;
14917
    }
14918
 
14919
    public void unsetUcx() {
14920
      this.ucx = null;
14921
    }
14922
 
14923
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14924
    public boolean isSetUcx() {
14925
      return this.ucx != null;
14926
    }
14927
 
14928
    public void setUcxIsSet(boolean value) {
14929
      if (!value) {
14930
        this.ucx = null;
14931
      }
14932
    }
14933
 
14934
    public void setFieldValue(_Fields field, Object value) {
14935
      switch (field) {
14936
      case SUCCESS:
14937
        if (value == null) {
14938
          unsetSuccess();
14939
        } else {
14940
          setSuccess((Long)value);
14941
        }
14942
        break;
14943
 
14944
      case UCX:
14945
        if (value == null) {
14946
          unsetUcx();
14947
        } else {
14948
          setUcx((UserContextException)value);
14949
        }
14950
        break;
14951
 
14952
      }
14953
    }
14954
 
14955
    public void setFieldValue(int fieldID, Object value) {
14956
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14957
    }
14958
 
14959
    public Object getFieldValue(_Fields field) {
14960
      switch (field) {
14961
      case SUCCESS:
14962
        return new Long(getSuccess());
14963
 
14964
      case UCX:
14965
        return getUcx();
14966
 
14967
      }
14968
      throw new IllegalStateException();
14969
    }
14970
 
14971
    public Object getFieldValue(int fieldId) {
14972
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14973
    }
14974
 
14975
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14976
    public boolean isSet(_Fields field) {
14977
      switch (field) {
14978
      case SUCCESS:
14979
        return isSetSuccess();
14980
      case UCX:
14981
        return isSetUcx();
14982
      }
14983
      throw new IllegalStateException();
14984
    }
14985
 
14986
    public boolean isSet(int fieldID) {
14987
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14988
    }
14989
 
14990
    @Override
14991
    public boolean equals(Object that) {
14992
      if (that == null)
14993
        return false;
14994
      if (that instanceof getDefaultAddressId_result)
14995
        return this.equals((getDefaultAddressId_result)that);
14996
      return false;
14997
    }
14998
 
14999
    public boolean equals(getDefaultAddressId_result that) {
15000
      if (that == null)
15001
        return false;
15002
 
15003
      boolean this_present_success = true;
15004
      boolean that_present_success = true;
15005
      if (this_present_success || that_present_success) {
15006
        if (!(this_present_success && that_present_success))
15007
          return false;
15008
        if (this.success != that.success)
15009
          return false;
15010
      }
15011
 
15012
      boolean this_present_ucx = true && this.isSetUcx();
15013
      boolean that_present_ucx = true && that.isSetUcx();
15014
      if (this_present_ucx || that_present_ucx) {
15015
        if (!(this_present_ucx && that_present_ucx))
15016
          return false;
15017
        if (!this.ucx.equals(that.ucx))
15018
          return false;
15019
      }
15020
 
15021
      return true;
15022
    }
15023
 
15024
    @Override
15025
    public int hashCode() {
15026
      return 0;
15027
    }
15028
 
15029
    public int compareTo(getDefaultAddressId_result other) {
15030
      if (!getClass().equals(other.getClass())) {
15031
        return getClass().getName().compareTo(other.getClass().getName());
15032
      }
15033
 
15034
      int lastComparison = 0;
15035
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
15036
 
15037
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15038
      if (lastComparison != 0) {
15039
        return lastComparison;
15040
      }
15041
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15042
      if (lastComparison != 0) {
15043
        return lastComparison;
15044
      }
15045
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15046
      if (lastComparison != 0) {
15047
        return lastComparison;
15048
      }
15049
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15050
      if (lastComparison != 0) {
15051
        return lastComparison;
15052
      }
15053
      return 0;
15054
    }
15055
 
15056
    public void read(TProtocol iprot) throws TException {
15057
      TField field;
15058
      iprot.readStructBegin();
15059
      while (true)
15060
      {
15061
        field = iprot.readFieldBegin();
15062
        if (field.type == TType.STOP) { 
15063
          break;
15064
        }
15065
        _Fields fieldId = _Fields.findByThriftId(field.id);
15066
        if (fieldId == null) {
15067
          TProtocolUtil.skip(iprot, field.type);
15068
        } else {
15069
          switch (fieldId) {
15070
            case SUCCESS:
15071
              if (field.type == TType.I64) {
15072
                this.success = iprot.readI64();
15073
                setSuccessIsSet(true);
15074
              } else { 
15075
                TProtocolUtil.skip(iprot, field.type);
15076
              }
15077
              break;
15078
            case UCX:
15079
              if (field.type == TType.STRUCT) {
15080
                this.ucx = new UserContextException();
15081
                this.ucx.read(iprot);
15082
              } else { 
15083
                TProtocolUtil.skip(iprot, field.type);
15084
              }
15085
              break;
15086
          }
15087
          iprot.readFieldEnd();
15088
        }
15089
      }
15090
      iprot.readStructEnd();
15091
      validate();
15092
    }
15093
 
15094
    public void write(TProtocol oprot) throws TException {
15095
      oprot.writeStructBegin(STRUCT_DESC);
15096
 
15097
      if (this.isSetSuccess()) {
15098
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15099
        oprot.writeI64(this.success);
15100
        oprot.writeFieldEnd();
15101
      } else if (this.isSetUcx()) {
15102
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15103
        this.ucx.write(oprot);
15104
        oprot.writeFieldEnd();
15105
      }
15106
      oprot.writeFieldStop();
15107
      oprot.writeStructEnd();
15108
    }
15109
 
15110
    @Override
15111
    public String toString() {
15112
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
15113
      boolean first = true;
15114
 
15115
      sb.append("success:");
15116
      sb.append(this.success);
15117
      first = false;
15118
      if (!first) sb.append(", ");
15119
      sb.append("ucx:");
15120
      if (this.ucx == null) {
15121
        sb.append("null");
15122
      } else {
15123
        sb.append(this.ucx);
15124
      }
15125
      first = false;
15126
      sb.append(")");
15127
      return sb.toString();
15128
    }
15129
 
15130
    public void validate() throws TException {
15131
      // check for required fields
15132
    }
15133
 
15134
  }
15135
 
784 rajveer 15136
  public static class getDefaultPincode_args implements TBase<getDefaultPincode_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_args>   {
15137
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_args");
15138
 
15139
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15140
 
15141
    private long userId;
15142
 
15143
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15144
    public enum _Fields implements TFieldIdEnum {
15145
      USER_ID((short)1, "userId");
15146
 
15147
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15148
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15149
 
15150
      static {
15151
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15152
          byId.put((int)field._thriftId, field);
15153
          byName.put(field.getFieldName(), field);
15154
        }
15155
      }
15156
 
15157
      /**
15158
       * Find the _Fields constant that matches fieldId, or null if its not found.
15159
       */
15160
      public static _Fields findByThriftId(int fieldId) {
15161
        return byId.get(fieldId);
15162
      }
15163
 
15164
      /**
15165
       * Find the _Fields constant that matches fieldId, throwing an exception
15166
       * if it is not found.
15167
       */
15168
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15169
        _Fields fields = findByThriftId(fieldId);
15170
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15171
        return fields;
15172
      }
15173
 
15174
      /**
15175
       * Find the _Fields constant that matches name, or null if its not found.
15176
       */
15177
      public static _Fields findByName(String name) {
15178
        return byName.get(name);
15179
      }
15180
 
15181
      private final short _thriftId;
15182
      private final String _fieldName;
15183
 
15184
      _Fields(short thriftId, String fieldName) {
15185
        _thriftId = thriftId;
15186
        _fieldName = fieldName;
15187
      }
15188
 
15189
      public short getThriftFieldId() {
15190
        return _thriftId;
15191
      }
15192
 
15193
      public String getFieldName() {
15194
        return _fieldName;
15195
      }
15196
    }
15197
 
15198
    // isset id assignments
15199
    private static final int __USERID_ISSET_ID = 0;
15200
    private BitSet __isset_bit_vector = new BitSet(1);
15201
 
15202
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15203
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15204
          new FieldValueMetaData(TType.I64)));
15205
    }});
15206
 
15207
    static {
15208
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_args.class, metaDataMap);
15209
    }
15210
 
15211
    public getDefaultPincode_args() {
15212
    }
15213
 
15214
    public getDefaultPincode_args(
15215
      long userId)
15216
    {
15217
      this();
15218
      this.userId = userId;
15219
      setUserIdIsSet(true);
15220
    }
15221
 
15222
    /**
15223
     * Performs a deep copy on <i>other</i>.
15224
     */
15225
    public getDefaultPincode_args(getDefaultPincode_args other) {
15226
      __isset_bit_vector.clear();
15227
      __isset_bit_vector.or(other.__isset_bit_vector);
15228
      this.userId = other.userId;
15229
    }
15230
 
15231
    public getDefaultPincode_args deepCopy() {
15232
      return new getDefaultPincode_args(this);
15233
    }
15234
 
15235
    @Deprecated
15236
    public getDefaultPincode_args clone() {
15237
      return new getDefaultPincode_args(this);
15238
    }
15239
 
15240
    public long getUserId() {
15241
      return this.userId;
15242
    }
15243
 
15244
    public getDefaultPincode_args setUserId(long userId) {
15245
      this.userId = userId;
15246
      setUserIdIsSet(true);
15247
      return this;
15248
    }
15249
 
15250
    public void unsetUserId() {
15251
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15252
    }
15253
 
15254
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15255
    public boolean isSetUserId() {
15256
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15257
    }
15258
 
15259
    public void setUserIdIsSet(boolean value) {
15260
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15261
    }
15262
 
15263
    public void setFieldValue(_Fields field, Object value) {
15264
      switch (field) {
15265
      case USER_ID:
15266
        if (value == null) {
15267
          unsetUserId();
15268
        } else {
15269
          setUserId((Long)value);
15270
        }
15271
        break;
15272
 
15273
      }
15274
    }
15275
 
15276
    public void setFieldValue(int fieldID, Object value) {
15277
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15278
    }
15279
 
15280
    public Object getFieldValue(_Fields field) {
15281
      switch (field) {
15282
      case USER_ID:
15283
        return new Long(getUserId());
15284
 
15285
      }
15286
      throw new IllegalStateException();
15287
    }
15288
 
15289
    public Object getFieldValue(int fieldId) {
15290
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15291
    }
15292
 
15293
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15294
    public boolean isSet(_Fields field) {
15295
      switch (field) {
15296
      case USER_ID:
15297
        return isSetUserId();
15298
      }
15299
      throw new IllegalStateException();
15300
    }
15301
 
15302
    public boolean isSet(int fieldID) {
15303
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15304
    }
15305
 
15306
    @Override
15307
    public boolean equals(Object that) {
15308
      if (that == null)
15309
        return false;
15310
      if (that instanceof getDefaultPincode_args)
15311
        return this.equals((getDefaultPincode_args)that);
15312
      return false;
15313
    }
15314
 
15315
    public boolean equals(getDefaultPincode_args that) {
15316
      if (that == null)
15317
        return false;
15318
 
15319
      boolean this_present_userId = true;
15320
      boolean that_present_userId = true;
15321
      if (this_present_userId || that_present_userId) {
15322
        if (!(this_present_userId && that_present_userId))
15323
          return false;
15324
        if (this.userId != that.userId)
15325
          return false;
15326
      }
15327
 
15328
      return true;
15329
    }
15330
 
15331
    @Override
15332
    public int hashCode() {
15333
      return 0;
15334
    }
15335
 
15336
    public int compareTo(getDefaultPincode_args other) {
15337
      if (!getClass().equals(other.getClass())) {
15338
        return getClass().getName().compareTo(other.getClass().getName());
15339
      }
15340
 
15341
      int lastComparison = 0;
15342
      getDefaultPincode_args typedOther = (getDefaultPincode_args)other;
15343
 
15344
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15345
      if (lastComparison != 0) {
15346
        return lastComparison;
15347
      }
15348
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15349
      if (lastComparison != 0) {
15350
        return lastComparison;
15351
      }
15352
      return 0;
15353
    }
15354
 
15355
    public void read(TProtocol iprot) throws TException {
15356
      TField field;
15357
      iprot.readStructBegin();
15358
      while (true)
15359
      {
15360
        field = iprot.readFieldBegin();
15361
        if (field.type == TType.STOP) { 
15362
          break;
15363
        }
15364
        _Fields fieldId = _Fields.findByThriftId(field.id);
15365
        if (fieldId == null) {
15366
          TProtocolUtil.skip(iprot, field.type);
15367
        } else {
15368
          switch (fieldId) {
15369
            case USER_ID:
15370
              if (field.type == TType.I64) {
15371
                this.userId = iprot.readI64();
15372
                setUserIdIsSet(true);
15373
              } else { 
15374
                TProtocolUtil.skip(iprot, field.type);
15375
              }
15376
              break;
15377
          }
15378
          iprot.readFieldEnd();
15379
        }
15380
      }
15381
      iprot.readStructEnd();
15382
      validate();
15383
    }
15384
 
15385
    public void write(TProtocol oprot) throws TException {
15386
      validate();
15387
 
15388
      oprot.writeStructBegin(STRUCT_DESC);
15389
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15390
      oprot.writeI64(this.userId);
15391
      oprot.writeFieldEnd();
15392
      oprot.writeFieldStop();
15393
      oprot.writeStructEnd();
15394
    }
15395
 
15396
    @Override
15397
    public String toString() {
15398
      StringBuilder sb = new StringBuilder("getDefaultPincode_args(");
15399
      boolean first = true;
15400
 
15401
      sb.append("userId:");
15402
      sb.append(this.userId);
15403
      first = false;
15404
      sb.append(")");
15405
      return sb.toString();
15406
    }
15407
 
15408
    public void validate() throws TException {
15409
      // check for required fields
15410
    }
15411
 
15412
  }
15413
 
15414
  public static class getDefaultPincode_result implements TBase<getDefaultPincode_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_result>   {
15415
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_result");
15416
 
15417
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
15418
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15419
 
15420
    private String success;
15421
    private UserContextException ucx;
15422
 
15423
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15424
    public enum _Fields implements TFieldIdEnum {
15425
      SUCCESS((short)0, "success"),
15426
      UCX((short)1, "ucx");
15427
 
15428
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15429
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15430
 
15431
      static {
15432
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15433
          byId.put((int)field._thriftId, field);
15434
          byName.put(field.getFieldName(), field);
15435
        }
15436
      }
15437
 
15438
      /**
15439
       * Find the _Fields constant that matches fieldId, or null if its not found.
15440
       */
15441
      public static _Fields findByThriftId(int fieldId) {
15442
        return byId.get(fieldId);
15443
      }
15444
 
15445
      /**
15446
       * Find the _Fields constant that matches fieldId, throwing an exception
15447
       * if it is not found.
15448
       */
15449
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15450
        _Fields fields = findByThriftId(fieldId);
15451
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15452
        return fields;
15453
      }
15454
 
15455
      /**
15456
       * Find the _Fields constant that matches name, or null if its not found.
15457
       */
15458
      public static _Fields findByName(String name) {
15459
        return byName.get(name);
15460
      }
15461
 
15462
      private final short _thriftId;
15463
      private final String _fieldName;
15464
 
15465
      _Fields(short thriftId, String fieldName) {
15466
        _thriftId = thriftId;
15467
        _fieldName = fieldName;
15468
      }
15469
 
15470
      public short getThriftFieldId() {
15471
        return _thriftId;
15472
      }
15473
 
15474
      public String getFieldName() {
15475
        return _fieldName;
15476
      }
15477
    }
15478
 
15479
    // isset id assignments
15480
 
15481
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15482
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15483
          new FieldValueMetaData(TType.STRING)));
15484
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15485
          new FieldValueMetaData(TType.STRUCT)));
15486
    }});
15487
 
15488
    static {
15489
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_result.class, metaDataMap);
15490
    }
15491
 
15492
    public getDefaultPincode_result() {
15493
    }
15494
 
15495
    public getDefaultPincode_result(
15496
      String success,
15497
      UserContextException ucx)
15498
    {
15499
      this();
15500
      this.success = success;
15501
      this.ucx = ucx;
15502
    }
15503
 
15504
    /**
15505
     * Performs a deep copy on <i>other</i>.
15506
     */
15507
    public getDefaultPincode_result(getDefaultPincode_result other) {
15508
      if (other.isSetSuccess()) {
15509
        this.success = other.success;
15510
      }
15511
      if (other.isSetUcx()) {
15512
        this.ucx = new UserContextException(other.ucx);
15513
      }
15514
    }
15515
 
15516
    public getDefaultPincode_result deepCopy() {
15517
      return new getDefaultPincode_result(this);
15518
    }
15519
 
15520
    @Deprecated
15521
    public getDefaultPincode_result clone() {
15522
      return new getDefaultPincode_result(this);
15523
    }
15524
 
15525
    public String getSuccess() {
15526
      return this.success;
15527
    }
15528
 
15529
    public getDefaultPincode_result setSuccess(String success) {
15530
      this.success = success;
15531
      return this;
15532
    }
15533
 
15534
    public void unsetSuccess() {
15535
      this.success = null;
15536
    }
15537
 
15538
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15539
    public boolean isSetSuccess() {
15540
      return this.success != null;
15541
    }
15542
 
15543
    public void setSuccessIsSet(boolean value) {
15544
      if (!value) {
15545
        this.success = null;
15546
      }
15547
    }
15548
 
15549
    public UserContextException getUcx() {
15550
      return this.ucx;
15551
    }
15552
 
15553
    public getDefaultPincode_result setUcx(UserContextException ucx) {
15554
      this.ucx = ucx;
15555
      return this;
15556
    }
15557
 
15558
    public void unsetUcx() {
15559
      this.ucx = null;
15560
    }
15561
 
15562
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15563
    public boolean isSetUcx() {
15564
      return this.ucx != null;
15565
    }
15566
 
15567
    public void setUcxIsSet(boolean value) {
15568
      if (!value) {
15569
        this.ucx = null;
15570
      }
15571
    }
15572
 
15573
    public void setFieldValue(_Fields field, Object value) {
15574
      switch (field) {
15575
      case SUCCESS:
15576
        if (value == null) {
15577
          unsetSuccess();
15578
        } else {
15579
          setSuccess((String)value);
15580
        }
15581
        break;
15582
 
15583
      case UCX:
15584
        if (value == null) {
15585
          unsetUcx();
15586
        } else {
15587
          setUcx((UserContextException)value);
15588
        }
15589
        break;
15590
 
15591
      }
15592
    }
15593
 
15594
    public void setFieldValue(int fieldID, Object value) {
15595
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15596
    }
15597
 
15598
    public Object getFieldValue(_Fields field) {
15599
      switch (field) {
15600
      case SUCCESS:
15601
        return getSuccess();
15602
 
15603
      case UCX:
15604
        return getUcx();
15605
 
15606
      }
15607
      throw new IllegalStateException();
15608
    }
15609
 
15610
    public Object getFieldValue(int fieldId) {
15611
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15612
    }
15613
 
15614
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15615
    public boolean isSet(_Fields field) {
15616
      switch (field) {
15617
      case SUCCESS:
15618
        return isSetSuccess();
15619
      case UCX:
15620
        return isSetUcx();
15621
      }
15622
      throw new IllegalStateException();
15623
    }
15624
 
15625
    public boolean isSet(int fieldID) {
15626
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15627
    }
15628
 
15629
    @Override
15630
    public boolean equals(Object that) {
15631
      if (that == null)
15632
        return false;
15633
      if (that instanceof getDefaultPincode_result)
15634
        return this.equals((getDefaultPincode_result)that);
15635
      return false;
15636
    }
15637
 
15638
    public boolean equals(getDefaultPincode_result that) {
15639
      if (that == null)
15640
        return false;
15641
 
15642
      boolean this_present_success = true && this.isSetSuccess();
15643
      boolean that_present_success = true && that.isSetSuccess();
15644
      if (this_present_success || that_present_success) {
15645
        if (!(this_present_success && that_present_success))
15646
          return false;
15647
        if (!this.success.equals(that.success))
15648
          return false;
15649
      }
15650
 
15651
      boolean this_present_ucx = true && this.isSetUcx();
15652
      boolean that_present_ucx = true && that.isSetUcx();
15653
      if (this_present_ucx || that_present_ucx) {
15654
        if (!(this_present_ucx && that_present_ucx))
15655
          return false;
15656
        if (!this.ucx.equals(that.ucx))
15657
          return false;
15658
      }
15659
 
15660
      return true;
15661
    }
15662
 
15663
    @Override
15664
    public int hashCode() {
15665
      return 0;
15666
    }
15667
 
15668
    public int compareTo(getDefaultPincode_result other) {
15669
      if (!getClass().equals(other.getClass())) {
15670
        return getClass().getName().compareTo(other.getClass().getName());
15671
      }
15672
 
15673
      int lastComparison = 0;
15674
      getDefaultPincode_result typedOther = (getDefaultPincode_result)other;
15675
 
15676
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15677
      if (lastComparison != 0) {
15678
        return lastComparison;
15679
      }
15680
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15681
      if (lastComparison != 0) {
15682
        return lastComparison;
15683
      }
15684
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15685
      if (lastComparison != 0) {
15686
        return lastComparison;
15687
      }
15688
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15689
      if (lastComparison != 0) {
15690
        return lastComparison;
15691
      }
15692
      return 0;
15693
    }
15694
 
15695
    public void read(TProtocol iprot) throws TException {
15696
      TField field;
15697
      iprot.readStructBegin();
15698
      while (true)
15699
      {
15700
        field = iprot.readFieldBegin();
15701
        if (field.type == TType.STOP) { 
15702
          break;
15703
        }
15704
        _Fields fieldId = _Fields.findByThriftId(field.id);
15705
        if (fieldId == null) {
15706
          TProtocolUtil.skip(iprot, field.type);
15707
        } else {
15708
          switch (fieldId) {
15709
            case SUCCESS:
15710
              if (field.type == TType.STRING) {
15711
                this.success = iprot.readString();
15712
              } else { 
15713
                TProtocolUtil.skip(iprot, field.type);
15714
              }
15715
              break;
15716
            case UCX:
15717
              if (field.type == TType.STRUCT) {
15718
                this.ucx = new UserContextException();
15719
                this.ucx.read(iprot);
15720
              } else { 
15721
                TProtocolUtil.skip(iprot, field.type);
15722
              }
15723
              break;
15724
          }
15725
          iprot.readFieldEnd();
15726
        }
15727
      }
15728
      iprot.readStructEnd();
15729
      validate();
15730
    }
15731
 
15732
    public void write(TProtocol oprot) throws TException {
15733
      oprot.writeStructBegin(STRUCT_DESC);
15734
 
15735
      if (this.isSetSuccess()) {
15736
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15737
        oprot.writeString(this.success);
15738
        oprot.writeFieldEnd();
15739
      } else if (this.isSetUcx()) {
15740
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15741
        this.ucx.write(oprot);
15742
        oprot.writeFieldEnd();
15743
      }
15744
      oprot.writeFieldStop();
15745
      oprot.writeStructEnd();
15746
    }
15747
 
15748
    @Override
15749
    public String toString() {
15750
      StringBuilder sb = new StringBuilder("getDefaultPincode_result(");
15751
      boolean first = true;
15752
 
15753
      sb.append("success:");
15754
      if (this.success == null) {
15755
        sb.append("null");
15756
      } else {
15757
        sb.append(this.success);
15758
      }
15759
      first = false;
15760
      if (!first) sb.append(", ");
15761
      sb.append("ucx:");
15762
      if (this.ucx == null) {
15763
        sb.append("null");
15764
      } else {
15765
        sb.append(this.ucx);
15766
      }
15767
      first = false;
15768
      sb.append(")");
15769
      return sb.toString();
15770
    }
15771
 
15772
    public void validate() throws TException {
15773
      // check for required fields
15774
    }
15775
 
15776
  }
15777
 
1177 varun.gupt 15778
  public static class saveUserCommunication_args implements TBase<saveUserCommunication_args._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_args>   {
15779
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_args");
15780
 
15781
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15782
    private static final TField REPLY_TO_FIELD_DESC = new TField("replyTo", TType.STRING, (short)2);
15783
    private static final TField COMMUNICATION_TYPE_FIELD_DESC = new TField("communicationType", TType.I64, (short)3);
15784
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)4);
15785
    private static final TField AIRWAYBILL_NO_FIELD_DESC = new TField("airwaybillNo", TType.STRING, (short)5);
15786
    private static final TField PRODUCT_NAME_FIELD_DESC = new TField("productName", TType.STRING, (short)6);
15787
    private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)7);
15788
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)8);
15789
 
15790
    private long userId;
15791
    private String replyTo;
15792
    private long communicationType;
15793
    private long orderId;
15794
    private String airwaybillNo;
15795
    private String productName;
15796
    private String subject;
15797
    private String message;
15798
 
15799
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15800
    public enum _Fields implements TFieldIdEnum {
15801
      USER_ID((short)1, "userId"),
15802
      REPLY_TO((short)2, "replyTo"),
15803
      COMMUNICATION_TYPE((short)3, "communicationType"),
15804
      ORDER_ID((short)4, "orderId"),
15805
      AIRWAYBILL_NO((short)5, "airwaybillNo"),
15806
      PRODUCT_NAME((short)6, "productName"),
15807
      SUBJECT((short)7, "subject"),
15808
      MESSAGE((short)8, "message");
15809
 
15810
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15811
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15812
 
15813
      static {
15814
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15815
          byId.put((int)field._thriftId, field);
15816
          byName.put(field.getFieldName(), field);
15817
        }
15818
      }
15819
 
15820
      /**
15821
       * Find the _Fields constant that matches fieldId, or null if its not found.
15822
       */
15823
      public static _Fields findByThriftId(int fieldId) {
15824
        return byId.get(fieldId);
15825
      }
15826
 
15827
      /**
15828
       * Find the _Fields constant that matches fieldId, throwing an exception
15829
       * if it is not found.
15830
       */
15831
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15832
        _Fields fields = findByThriftId(fieldId);
15833
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15834
        return fields;
15835
      }
15836
 
15837
      /**
15838
       * Find the _Fields constant that matches name, or null if its not found.
15839
       */
15840
      public static _Fields findByName(String name) {
15841
        return byName.get(name);
15842
      }
15843
 
15844
      private final short _thriftId;
15845
      private final String _fieldName;
15846
 
15847
      _Fields(short thriftId, String fieldName) {
15848
        _thriftId = thriftId;
15849
        _fieldName = fieldName;
15850
      }
15851
 
15852
      public short getThriftFieldId() {
15853
        return _thriftId;
15854
      }
15855
 
15856
      public String getFieldName() {
15857
        return _fieldName;
15858
      }
15859
    }
15860
 
15861
    // isset id assignments
15862
    private static final int __USERID_ISSET_ID = 0;
15863
    private static final int __COMMUNICATIONTYPE_ISSET_ID = 1;
15864
    private static final int __ORDERID_ISSET_ID = 2;
15865
    private BitSet __isset_bit_vector = new BitSet(3);
15866
 
15867
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15868
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15869
          new FieldValueMetaData(TType.I64)));
15870
      put(_Fields.REPLY_TO, new FieldMetaData("replyTo", TFieldRequirementType.DEFAULT, 
15871
          new FieldValueMetaData(TType.STRING)));
15872
      put(_Fields.COMMUNICATION_TYPE, new FieldMetaData("communicationType", TFieldRequirementType.DEFAULT, 
15873
          new FieldValueMetaData(TType.I64)));
15874
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
15875
          new FieldValueMetaData(TType.I64)));
15876
      put(_Fields.AIRWAYBILL_NO, new FieldMetaData("airwaybillNo", TFieldRequirementType.DEFAULT, 
15877
          new FieldValueMetaData(TType.STRING)));
15878
      put(_Fields.PRODUCT_NAME, new FieldMetaData("productName", TFieldRequirementType.DEFAULT, 
15879
          new FieldValueMetaData(TType.STRING)));
15880
      put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
15881
          new FieldValueMetaData(TType.STRING)));
15882
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
15883
          new FieldValueMetaData(TType.STRING)));
15884
    }});
15885
 
15886
    static {
15887
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_args.class, metaDataMap);
15888
    }
15889
 
15890
    public saveUserCommunication_args() {
15891
    }
15892
 
15893
    public saveUserCommunication_args(
15894
      long userId,
15895
      String replyTo,
15896
      long communicationType,
15897
      long orderId,
15898
      String airwaybillNo,
15899
      String productName,
15900
      String subject,
15901
      String message)
15902
    {
15903
      this();
15904
      this.userId = userId;
15905
      setUserIdIsSet(true);
15906
      this.replyTo = replyTo;
15907
      this.communicationType = communicationType;
15908
      setCommunicationTypeIsSet(true);
15909
      this.orderId = orderId;
15910
      setOrderIdIsSet(true);
15911
      this.airwaybillNo = airwaybillNo;
15912
      this.productName = productName;
15913
      this.subject = subject;
15914
      this.message = message;
15915
    }
15916
 
15917
    /**
15918
     * Performs a deep copy on <i>other</i>.
15919
     */
15920
    public saveUserCommunication_args(saveUserCommunication_args other) {
15921
      __isset_bit_vector.clear();
15922
      __isset_bit_vector.or(other.__isset_bit_vector);
15923
      this.userId = other.userId;
15924
      if (other.isSetReplyTo()) {
15925
        this.replyTo = other.replyTo;
15926
      }
15927
      this.communicationType = other.communicationType;
15928
      this.orderId = other.orderId;
15929
      if (other.isSetAirwaybillNo()) {
15930
        this.airwaybillNo = other.airwaybillNo;
15931
      }
15932
      if (other.isSetProductName()) {
15933
        this.productName = other.productName;
15934
      }
15935
      if (other.isSetSubject()) {
15936
        this.subject = other.subject;
15937
      }
15938
      if (other.isSetMessage()) {
15939
        this.message = other.message;
15940
      }
15941
    }
15942
 
15943
    public saveUserCommunication_args deepCopy() {
15944
      return new saveUserCommunication_args(this);
15945
    }
15946
 
15947
    @Deprecated
15948
    public saveUserCommunication_args clone() {
15949
      return new saveUserCommunication_args(this);
15950
    }
15951
 
15952
    public long getUserId() {
15953
      return this.userId;
15954
    }
15955
 
15956
    public saveUserCommunication_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 String getReplyTo() {
15976
      return this.replyTo;
15977
    }
15978
 
15979
    public saveUserCommunication_args setReplyTo(String replyTo) {
15980
      this.replyTo = replyTo;
15981
      return this;
15982
    }
15983
 
15984
    public void unsetReplyTo() {
15985
      this.replyTo = null;
15986
    }
15987
 
15988
    /** Returns true if field replyTo is set (has been asigned a value) and false otherwise */
15989
    public boolean isSetReplyTo() {
15990
      return this.replyTo != null;
15991
    }
15992
 
15993
    public void setReplyToIsSet(boolean value) {
15994
      if (!value) {
15995
        this.replyTo = null;
15996
      }
15997
    }
15998
 
15999
    public long getCommunicationType() {
16000
      return this.communicationType;
16001
    }
16002
 
16003
    public saveUserCommunication_args setCommunicationType(long communicationType) {
16004
      this.communicationType = communicationType;
16005
      setCommunicationTypeIsSet(true);
16006
      return this;
16007
    }
16008
 
16009
    public void unsetCommunicationType() {
16010
      __isset_bit_vector.clear(__COMMUNICATIONTYPE_ISSET_ID);
16011
    }
16012
 
16013
    /** Returns true if field communicationType is set (has been asigned a value) and false otherwise */
16014
    public boolean isSetCommunicationType() {
16015
      return __isset_bit_vector.get(__COMMUNICATIONTYPE_ISSET_ID);
16016
    }
16017
 
16018
    public void setCommunicationTypeIsSet(boolean value) {
16019
      __isset_bit_vector.set(__COMMUNICATIONTYPE_ISSET_ID, value);
16020
    }
16021
 
16022
    public long getOrderId() {
16023
      return this.orderId;
16024
    }
16025
 
16026
    public saveUserCommunication_args setOrderId(long orderId) {
16027
      this.orderId = orderId;
16028
      setOrderIdIsSet(true);
16029
      return this;
16030
    }
16031
 
16032
    public void unsetOrderId() {
16033
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
16034
    }
16035
 
16036
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
16037
    public boolean isSetOrderId() {
16038
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
16039
    }
16040
 
16041
    public void setOrderIdIsSet(boolean value) {
16042
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
16043
    }
16044
 
16045
    public String getAirwaybillNo() {
16046
      return this.airwaybillNo;
16047
    }
16048
 
16049
    public saveUserCommunication_args setAirwaybillNo(String airwaybillNo) {
16050
      this.airwaybillNo = airwaybillNo;
16051
      return this;
16052
    }
16053
 
16054
    public void unsetAirwaybillNo() {
16055
      this.airwaybillNo = null;
16056
    }
16057
 
16058
    /** Returns true if field airwaybillNo is set (has been asigned a value) and false otherwise */
16059
    public boolean isSetAirwaybillNo() {
16060
      return this.airwaybillNo != null;
16061
    }
16062
 
16063
    public void setAirwaybillNoIsSet(boolean value) {
16064
      if (!value) {
16065
        this.airwaybillNo = null;
16066
      }
16067
    }
16068
 
16069
    public String getProductName() {
16070
      return this.productName;
16071
    }
16072
 
16073
    public saveUserCommunication_args setProductName(String productName) {
16074
      this.productName = productName;
16075
      return this;
16076
    }
16077
 
16078
    public void unsetProductName() {
16079
      this.productName = null;
16080
    }
16081
 
16082
    /** Returns true if field productName is set (has been asigned a value) and false otherwise */
16083
    public boolean isSetProductName() {
16084
      return this.productName != null;
16085
    }
16086
 
16087
    public void setProductNameIsSet(boolean value) {
16088
      if (!value) {
16089
        this.productName = null;
16090
      }
16091
    }
16092
 
16093
    public String getSubject() {
16094
      return this.subject;
16095
    }
16096
 
16097
    public saveUserCommunication_args setSubject(String subject) {
16098
      this.subject = subject;
16099
      return this;
16100
    }
16101
 
16102
    public void unsetSubject() {
16103
      this.subject = null;
16104
    }
16105
 
16106
    /** Returns true if field subject is set (has been asigned a value) and false otherwise */
16107
    public boolean isSetSubject() {
16108
      return this.subject != null;
16109
    }
16110
 
16111
    public void setSubjectIsSet(boolean value) {
16112
      if (!value) {
16113
        this.subject = null;
16114
      }
16115
    }
16116
 
16117
    public String getMessage() {
16118
      return this.message;
16119
    }
16120
 
16121
    public saveUserCommunication_args setMessage(String message) {
16122
      this.message = message;
16123
      return this;
16124
    }
16125
 
16126
    public void unsetMessage() {
16127
      this.message = null;
16128
    }
16129
 
16130
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
16131
    public boolean isSetMessage() {
16132
      return this.message != null;
16133
    }
16134
 
16135
    public void setMessageIsSet(boolean value) {
16136
      if (!value) {
16137
        this.message = null;
16138
      }
16139
    }
16140
 
16141
    public void setFieldValue(_Fields field, Object value) {
16142
      switch (field) {
16143
      case USER_ID:
16144
        if (value == null) {
16145
          unsetUserId();
16146
        } else {
16147
          setUserId((Long)value);
16148
        }
16149
        break;
16150
 
16151
      case REPLY_TO:
16152
        if (value == null) {
16153
          unsetReplyTo();
16154
        } else {
16155
          setReplyTo((String)value);
16156
        }
16157
        break;
16158
 
16159
      case COMMUNICATION_TYPE:
16160
        if (value == null) {
16161
          unsetCommunicationType();
16162
        } else {
16163
          setCommunicationType((Long)value);
16164
        }
16165
        break;
16166
 
16167
      case ORDER_ID:
16168
        if (value == null) {
16169
          unsetOrderId();
16170
        } else {
16171
          setOrderId((Long)value);
16172
        }
16173
        break;
16174
 
16175
      case AIRWAYBILL_NO:
16176
        if (value == null) {
16177
          unsetAirwaybillNo();
16178
        } else {
16179
          setAirwaybillNo((String)value);
16180
        }
16181
        break;
16182
 
16183
      case PRODUCT_NAME:
16184
        if (value == null) {
16185
          unsetProductName();
16186
        } else {
16187
          setProductName((String)value);
16188
        }
16189
        break;
16190
 
16191
      case SUBJECT:
16192
        if (value == null) {
16193
          unsetSubject();
16194
        } else {
16195
          setSubject((String)value);
16196
        }
16197
        break;
16198
 
16199
      case MESSAGE:
16200
        if (value == null) {
16201
          unsetMessage();
16202
        } else {
16203
          setMessage((String)value);
16204
        }
16205
        break;
16206
 
16207
      }
16208
    }
16209
 
16210
    public void setFieldValue(int fieldID, Object value) {
16211
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16212
    }
16213
 
16214
    public Object getFieldValue(_Fields field) {
16215
      switch (field) {
16216
      case USER_ID:
16217
        return new Long(getUserId());
16218
 
16219
      case REPLY_TO:
16220
        return getReplyTo();
16221
 
16222
      case COMMUNICATION_TYPE:
16223
        return new Long(getCommunicationType());
16224
 
16225
      case ORDER_ID:
16226
        return new Long(getOrderId());
16227
 
16228
      case AIRWAYBILL_NO:
16229
        return getAirwaybillNo();
16230
 
16231
      case PRODUCT_NAME:
16232
        return getProductName();
16233
 
16234
      case SUBJECT:
16235
        return getSubject();
16236
 
16237
      case MESSAGE:
16238
        return getMessage();
16239
 
16240
      }
16241
      throw new IllegalStateException();
16242
    }
16243
 
16244
    public Object getFieldValue(int fieldId) {
16245
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16246
    }
16247
 
16248
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16249
    public boolean isSet(_Fields field) {
16250
      switch (field) {
16251
      case USER_ID:
16252
        return isSetUserId();
16253
      case REPLY_TO:
16254
        return isSetReplyTo();
16255
      case COMMUNICATION_TYPE:
16256
        return isSetCommunicationType();
16257
      case ORDER_ID:
16258
        return isSetOrderId();
16259
      case AIRWAYBILL_NO:
16260
        return isSetAirwaybillNo();
16261
      case PRODUCT_NAME:
16262
        return isSetProductName();
16263
      case SUBJECT:
16264
        return isSetSubject();
16265
      case MESSAGE:
16266
        return isSetMessage();
16267
      }
16268
      throw new IllegalStateException();
16269
    }
16270
 
16271
    public boolean isSet(int fieldID) {
16272
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16273
    }
16274
 
16275
    @Override
16276
    public boolean equals(Object that) {
16277
      if (that == null)
16278
        return false;
16279
      if (that instanceof saveUserCommunication_args)
16280
        return this.equals((saveUserCommunication_args)that);
16281
      return false;
16282
    }
16283
 
16284
    public boolean equals(saveUserCommunication_args that) {
16285
      if (that == null)
16286
        return false;
16287
 
16288
      boolean this_present_userId = true;
16289
      boolean that_present_userId = true;
16290
      if (this_present_userId || that_present_userId) {
16291
        if (!(this_present_userId && that_present_userId))
16292
          return false;
16293
        if (this.userId != that.userId)
16294
          return false;
16295
      }
16296
 
16297
      boolean this_present_replyTo = true && this.isSetReplyTo();
16298
      boolean that_present_replyTo = true && that.isSetReplyTo();
16299
      if (this_present_replyTo || that_present_replyTo) {
16300
        if (!(this_present_replyTo && that_present_replyTo))
16301
          return false;
16302
        if (!this.replyTo.equals(that.replyTo))
16303
          return false;
16304
      }
16305
 
16306
      boolean this_present_communicationType = true;
16307
      boolean that_present_communicationType = true;
16308
      if (this_present_communicationType || that_present_communicationType) {
16309
        if (!(this_present_communicationType && that_present_communicationType))
16310
          return false;
16311
        if (this.communicationType != that.communicationType)
16312
          return false;
16313
      }
16314
 
16315
      boolean this_present_orderId = true;
16316
      boolean that_present_orderId = true;
16317
      if (this_present_orderId || that_present_orderId) {
16318
        if (!(this_present_orderId && that_present_orderId))
16319
          return false;
16320
        if (this.orderId != that.orderId)
16321
          return false;
16322
      }
16323
 
16324
      boolean this_present_airwaybillNo = true && this.isSetAirwaybillNo();
16325
      boolean that_present_airwaybillNo = true && that.isSetAirwaybillNo();
16326
      if (this_present_airwaybillNo || that_present_airwaybillNo) {
16327
        if (!(this_present_airwaybillNo && that_present_airwaybillNo))
16328
          return false;
16329
        if (!this.airwaybillNo.equals(that.airwaybillNo))
16330
          return false;
16331
      }
16332
 
16333
      boolean this_present_productName = true && this.isSetProductName();
16334
      boolean that_present_productName = true && that.isSetProductName();
16335
      if (this_present_productName || that_present_productName) {
16336
        if (!(this_present_productName && that_present_productName))
16337
          return false;
16338
        if (!this.productName.equals(that.productName))
16339
          return false;
16340
      }
16341
 
16342
      boolean this_present_subject = true && this.isSetSubject();
16343
      boolean that_present_subject = true && that.isSetSubject();
16344
      if (this_present_subject || that_present_subject) {
16345
        if (!(this_present_subject && that_present_subject))
16346
          return false;
16347
        if (!this.subject.equals(that.subject))
16348
          return false;
16349
      }
16350
 
16351
      boolean this_present_message = true && this.isSetMessage();
16352
      boolean that_present_message = true && that.isSetMessage();
16353
      if (this_present_message || that_present_message) {
16354
        if (!(this_present_message && that_present_message))
16355
          return false;
16356
        if (!this.message.equals(that.message))
16357
          return false;
16358
      }
16359
 
16360
      return true;
16361
    }
16362
 
16363
    @Override
16364
    public int hashCode() {
16365
      return 0;
16366
    }
16367
 
16368
    public int compareTo(saveUserCommunication_args other) {
16369
      if (!getClass().equals(other.getClass())) {
16370
        return getClass().getName().compareTo(other.getClass().getName());
16371
      }
16372
 
16373
      int lastComparison = 0;
16374
      saveUserCommunication_args typedOther = (saveUserCommunication_args)other;
16375
 
16376
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
16377
      if (lastComparison != 0) {
16378
        return lastComparison;
16379
      }
16380
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
16381
      if (lastComparison != 0) {
16382
        return lastComparison;
16383
      }
16384
      lastComparison = Boolean.valueOf(isSetReplyTo()).compareTo(isSetReplyTo());
16385
      if (lastComparison != 0) {
16386
        return lastComparison;
16387
      }
16388
      lastComparison = TBaseHelper.compareTo(replyTo, typedOther.replyTo);
16389
      if (lastComparison != 0) {
16390
        return lastComparison;
16391
      }
16392
      lastComparison = Boolean.valueOf(isSetCommunicationType()).compareTo(isSetCommunicationType());
16393
      if (lastComparison != 0) {
16394
        return lastComparison;
16395
      }
16396
      lastComparison = TBaseHelper.compareTo(communicationType, typedOther.communicationType);
16397
      if (lastComparison != 0) {
16398
        return lastComparison;
16399
      }
16400
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
16401
      if (lastComparison != 0) {
16402
        return lastComparison;
16403
      }
16404
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
16405
      if (lastComparison != 0) {
16406
        return lastComparison;
16407
      }
16408
      lastComparison = Boolean.valueOf(isSetAirwaybillNo()).compareTo(isSetAirwaybillNo());
16409
      if (lastComparison != 0) {
16410
        return lastComparison;
16411
      }
16412
      lastComparison = TBaseHelper.compareTo(airwaybillNo, typedOther.airwaybillNo);
16413
      if (lastComparison != 0) {
16414
        return lastComparison;
16415
      }
16416
      lastComparison = Boolean.valueOf(isSetProductName()).compareTo(isSetProductName());
16417
      if (lastComparison != 0) {
16418
        return lastComparison;
16419
      }
16420
      lastComparison = TBaseHelper.compareTo(productName, typedOther.productName);
16421
      if (lastComparison != 0) {
16422
        return lastComparison;
16423
      }
16424
      lastComparison = Boolean.valueOf(isSetSubject()).compareTo(isSetSubject());
16425
      if (lastComparison != 0) {
16426
        return lastComparison;
16427
      }
16428
      lastComparison = TBaseHelper.compareTo(subject, typedOther.subject);
16429
      if (lastComparison != 0) {
16430
        return lastComparison;
16431
      }
16432
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
16433
      if (lastComparison != 0) {
16434
        return lastComparison;
16435
      }
16436
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
16437
      if (lastComparison != 0) {
16438
        return lastComparison;
16439
      }
16440
      return 0;
16441
    }
16442
 
16443
    public void read(TProtocol iprot) throws TException {
16444
      TField field;
16445
      iprot.readStructBegin();
16446
      while (true)
16447
      {
16448
        field = iprot.readFieldBegin();
16449
        if (field.type == TType.STOP) { 
16450
          break;
16451
        }
16452
        _Fields fieldId = _Fields.findByThriftId(field.id);
16453
        if (fieldId == null) {
16454
          TProtocolUtil.skip(iprot, field.type);
16455
        } else {
16456
          switch (fieldId) {
16457
            case USER_ID:
16458
              if (field.type == TType.I64) {
16459
                this.userId = iprot.readI64();
16460
                setUserIdIsSet(true);
16461
              } else { 
16462
                TProtocolUtil.skip(iprot, field.type);
16463
              }
16464
              break;
16465
            case REPLY_TO:
16466
              if (field.type == TType.STRING) {
16467
                this.replyTo = iprot.readString();
16468
              } else { 
16469
                TProtocolUtil.skip(iprot, field.type);
16470
              }
16471
              break;
16472
            case COMMUNICATION_TYPE:
16473
              if (field.type == TType.I64) {
16474
                this.communicationType = iprot.readI64();
16475
                setCommunicationTypeIsSet(true);
16476
              } else { 
16477
                TProtocolUtil.skip(iprot, field.type);
16478
              }
16479
              break;
16480
            case ORDER_ID:
16481
              if (field.type == TType.I64) {
16482
                this.orderId = iprot.readI64();
16483
                setOrderIdIsSet(true);
16484
              } else { 
16485
                TProtocolUtil.skip(iprot, field.type);
16486
              }
16487
              break;
16488
            case AIRWAYBILL_NO:
16489
              if (field.type == TType.STRING) {
16490
                this.airwaybillNo = iprot.readString();
16491
              } else { 
16492
                TProtocolUtil.skip(iprot, field.type);
16493
              }
16494
              break;
16495
            case PRODUCT_NAME:
16496
              if (field.type == TType.STRING) {
16497
                this.productName = iprot.readString();
16498
              } else { 
16499
                TProtocolUtil.skip(iprot, field.type);
16500
              }
16501
              break;
16502
            case SUBJECT:
16503
              if (field.type == TType.STRING) {
16504
                this.subject = iprot.readString();
16505
              } else { 
16506
                TProtocolUtil.skip(iprot, field.type);
16507
              }
16508
              break;
16509
            case MESSAGE:
16510
              if (field.type == TType.STRING) {
16511
                this.message = iprot.readString();
16512
              } else { 
16513
                TProtocolUtil.skip(iprot, field.type);
16514
              }
16515
              break;
16516
          }
16517
          iprot.readFieldEnd();
16518
        }
16519
      }
16520
      iprot.readStructEnd();
16521
      validate();
16522
    }
16523
 
16524
    public void write(TProtocol oprot) throws TException {
16525
      validate();
16526
 
16527
      oprot.writeStructBegin(STRUCT_DESC);
16528
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
16529
      oprot.writeI64(this.userId);
16530
      oprot.writeFieldEnd();
16531
      if (this.replyTo != null) {
16532
        oprot.writeFieldBegin(REPLY_TO_FIELD_DESC);
16533
        oprot.writeString(this.replyTo);
16534
        oprot.writeFieldEnd();
16535
      }
16536
      oprot.writeFieldBegin(COMMUNICATION_TYPE_FIELD_DESC);
16537
      oprot.writeI64(this.communicationType);
16538
      oprot.writeFieldEnd();
16539
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
16540
      oprot.writeI64(this.orderId);
16541
      oprot.writeFieldEnd();
16542
      if (this.airwaybillNo != null) {
16543
        oprot.writeFieldBegin(AIRWAYBILL_NO_FIELD_DESC);
16544
        oprot.writeString(this.airwaybillNo);
16545
        oprot.writeFieldEnd();
16546
      }
16547
      if (this.productName != null) {
16548
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
16549
        oprot.writeString(this.productName);
16550
        oprot.writeFieldEnd();
16551
      }
16552
      if (this.subject != null) {
16553
        oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
16554
        oprot.writeString(this.subject);
16555
        oprot.writeFieldEnd();
16556
      }
16557
      if (this.message != null) {
16558
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
16559
        oprot.writeString(this.message);
16560
        oprot.writeFieldEnd();
16561
      }
16562
      oprot.writeFieldStop();
16563
      oprot.writeStructEnd();
16564
    }
16565
 
16566
    @Override
16567
    public String toString() {
16568
      StringBuilder sb = new StringBuilder("saveUserCommunication_args(");
16569
      boolean first = true;
16570
 
16571
      sb.append("userId:");
16572
      sb.append(this.userId);
16573
      first = false;
16574
      if (!first) sb.append(", ");
16575
      sb.append("replyTo:");
16576
      if (this.replyTo == null) {
16577
        sb.append("null");
16578
      } else {
16579
        sb.append(this.replyTo);
16580
      }
16581
      first = false;
16582
      if (!first) sb.append(", ");
16583
      sb.append("communicationType:");
16584
      sb.append(this.communicationType);
16585
      first = false;
16586
      if (!first) sb.append(", ");
16587
      sb.append("orderId:");
16588
      sb.append(this.orderId);
16589
      first = false;
16590
      if (!first) sb.append(", ");
16591
      sb.append("airwaybillNo:");
16592
      if (this.airwaybillNo == null) {
16593
        sb.append("null");
16594
      } else {
16595
        sb.append(this.airwaybillNo);
16596
      }
16597
      first = false;
16598
      if (!first) sb.append(", ");
16599
      sb.append("productName:");
16600
      if (this.productName == null) {
16601
        sb.append("null");
16602
      } else {
16603
        sb.append(this.productName);
16604
      }
16605
      first = false;
16606
      if (!first) sb.append(", ");
16607
      sb.append("subject:");
16608
      if (this.subject == null) {
16609
        sb.append("null");
16610
      } else {
16611
        sb.append(this.subject);
16612
      }
16613
      first = false;
16614
      if (!first) sb.append(", ");
16615
      sb.append("message:");
16616
      if (this.message == null) {
16617
        sb.append("null");
16618
      } else {
16619
        sb.append(this.message);
16620
      }
16621
      first = false;
16622
      sb.append(")");
16623
      return sb.toString();
16624
    }
16625
 
16626
    public void validate() throws TException {
16627
      // check for required fields
16628
    }
16629
 
16630
  }
16631
 
16632
  public static class saveUserCommunication_result implements TBase<saveUserCommunication_result._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_result>   {
16633
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_result");
16634
 
16635
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16636
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16637
 
16638
    private boolean success;
16639
    private UserCommunicationException ucx;
16640
 
16641
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16642
    public enum _Fields implements TFieldIdEnum {
16643
      SUCCESS((short)0, "success"),
16644
      UCX((short)1, "ucx");
16645
 
16646
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16647
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16648
 
16649
      static {
16650
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16651
          byId.put((int)field._thriftId, field);
16652
          byName.put(field.getFieldName(), field);
16653
        }
16654
      }
16655
 
16656
      /**
16657
       * Find the _Fields constant that matches fieldId, or null if its not found.
16658
       */
16659
      public static _Fields findByThriftId(int fieldId) {
16660
        return byId.get(fieldId);
16661
      }
16662
 
16663
      /**
16664
       * Find the _Fields constant that matches fieldId, throwing an exception
16665
       * if it is not found.
16666
       */
16667
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16668
        _Fields fields = findByThriftId(fieldId);
16669
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16670
        return fields;
16671
      }
16672
 
16673
      /**
16674
       * Find the _Fields constant that matches name, or null if its not found.
16675
       */
16676
      public static _Fields findByName(String name) {
16677
        return byName.get(name);
16678
      }
16679
 
16680
      private final short _thriftId;
16681
      private final String _fieldName;
16682
 
16683
      _Fields(short thriftId, String fieldName) {
16684
        _thriftId = thriftId;
16685
        _fieldName = fieldName;
16686
      }
16687
 
16688
      public short getThriftFieldId() {
16689
        return _thriftId;
16690
      }
16691
 
16692
      public String getFieldName() {
16693
        return _fieldName;
16694
      }
16695
    }
16696
 
16697
    // isset id assignments
16698
    private static final int __SUCCESS_ISSET_ID = 0;
16699
    private BitSet __isset_bit_vector = new BitSet(1);
16700
 
16701
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16702
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16703
          new FieldValueMetaData(TType.BOOL)));
16704
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16705
          new FieldValueMetaData(TType.STRUCT)));
16706
    }});
16707
 
16708
    static {
16709
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_result.class, metaDataMap);
16710
    }
16711
 
16712
    public saveUserCommunication_result() {
16713
    }
16714
 
16715
    public saveUserCommunication_result(
16716
      boolean success,
16717
      UserCommunicationException ucx)
16718
    {
16719
      this();
16720
      this.success = success;
16721
      setSuccessIsSet(true);
16722
      this.ucx = ucx;
16723
    }
16724
 
16725
    /**
16726
     * Performs a deep copy on <i>other</i>.
16727
     */
16728
    public saveUserCommunication_result(saveUserCommunication_result other) {
16729
      __isset_bit_vector.clear();
16730
      __isset_bit_vector.or(other.__isset_bit_vector);
16731
      this.success = other.success;
16732
      if (other.isSetUcx()) {
16733
        this.ucx = new UserCommunicationException(other.ucx);
16734
      }
16735
    }
16736
 
16737
    public saveUserCommunication_result deepCopy() {
16738
      return new saveUserCommunication_result(this);
16739
    }
16740
 
16741
    @Deprecated
16742
    public saveUserCommunication_result clone() {
16743
      return new saveUserCommunication_result(this);
16744
    }
16745
 
16746
    public boolean isSuccess() {
16747
      return this.success;
16748
    }
16749
 
16750
    public saveUserCommunication_result setSuccess(boolean success) {
16751
      this.success = success;
16752
      setSuccessIsSet(true);
16753
      return this;
16754
    }
16755
 
16756
    public void unsetSuccess() {
16757
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16758
    }
16759
 
16760
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16761
    public boolean isSetSuccess() {
16762
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16763
    }
16764
 
16765
    public void setSuccessIsSet(boolean value) {
16766
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16767
    }
16768
 
16769
    public UserCommunicationException getUcx() {
16770
      return this.ucx;
16771
    }
16772
 
16773
    public saveUserCommunication_result setUcx(UserCommunicationException ucx) {
16774
      this.ucx = ucx;
16775
      return this;
16776
    }
16777
 
16778
    public void unsetUcx() {
16779
      this.ucx = null;
16780
    }
16781
 
16782
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
16783
    public boolean isSetUcx() {
16784
      return this.ucx != null;
16785
    }
16786
 
16787
    public void setUcxIsSet(boolean value) {
16788
      if (!value) {
16789
        this.ucx = null;
16790
      }
16791
    }
16792
 
16793
    public void setFieldValue(_Fields field, Object value) {
16794
      switch (field) {
16795
      case SUCCESS:
16796
        if (value == null) {
16797
          unsetSuccess();
16798
        } else {
16799
          setSuccess((Boolean)value);
16800
        }
16801
        break;
16802
 
16803
      case UCX:
16804
        if (value == null) {
16805
          unsetUcx();
16806
        } else {
16807
          setUcx((UserCommunicationException)value);
16808
        }
16809
        break;
16810
 
16811
      }
16812
    }
16813
 
16814
    public void setFieldValue(int fieldID, Object value) {
16815
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16816
    }
16817
 
16818
    public Object getFieldValue(_Fields field) {
16819
      switch (field) {
16820
      case SUCCESS:
16821
        return new Boolean(isSuccess());
16822
 
16823
      case UCX:
16824
        return getUcx();
16825
 
16826
      }
16827
      throw new IllegalStateException();
16828
    }
16829
 
16830
    public Object getFieldValue(int fieldId) {
16831
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16832
    }
16833
 
16834
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16835
    public boolean isSet(_Fields field) {
16836
      switch (field) {
16837
      case SUCCESS:
16838
        return isSetSuccess();
16839
      case UCX:
16840
        return isSetUcx();
16841
      }
16842
      throw new IllegalStateException();
16843
    }
16844
 
16845
    public boolean isSet(int fieldID) {
16846
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16847
    }
16848
 
16849
    @Override
16850
    public boolean equals(Object that) {
16851
      if (that == null)
16852
        return false;
16853
      if (that instanceof saveUserCommunication_result)
16854
        return this.equals((saveUserCommunication_result)that);
16855
      return false;
16856
    }
16857
 
16858
    public boolean equals(saveUserCommunication_result that) {
16859
      if (that == null)
16860
        return false;
16861
 
16862
      boolean this_present_success = true;
16863
      boolean that_present_success = true;
16864
      if (this_present_success || that_present_success) {
16865
        if (!(this_present_success && that_present_success))
16866
          return false;
16867
        if (this.success != that.success)
16868
          return false;
16869
      }
16870
 
16871
      boolean this_present_ucx = true && this.isSetUcx();
16872
      boolean that_present_ucx = true && that.isSetUcx();
16873
      if (this_present_ucx || that_present_ucx) {
16874
        if (!(this_present_ucx && that_present_ucx))
16875
          return false;
16876
        if (!this.ucx.equals(that.ucx))
16877
          return false;
16878
      }
16879
 
16880
      return true;
16881
    }
16882
 
16883
    @Override
16884
    public int hashCode() {
16885
      return 0;
16886
    }
16887
 
16888
    public int compareTo(saveUserCommunication_result other) {
16889
      if (!getClass().equals(other.getClass())) {
16890
        return getClass().getName().compareTo(other.getClass().getName());
16891
      }
16892
 
16893
      int lastComparison = 0;
16894
      saveUserCommunication_result typedOther = (saveUserCommunication_result)other;
16895
 
16896
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16897
      if (lastComparison != 0) {
16898
        return lastComparison;
16899
      }
16900
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16901
      if (lastComparison != 0) {
16902
        return lastComparison;
16903
      }
16904
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16905
      if (lastComparison != 0) {
16906
        return lastComparison;
16907
      }
16908
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16909
      if (lastComparison != 0) {
16910
        return lastComparison;
16911
      }
16912
      return 0;
16913
    }
16914
 
16915
    public void read(TProtocol iprot) throws TException {
16916
      TField field;
16917
      iprot.readStructBegin();
16918
      while (true)
16919
      {
16920
        field = iprot.readFieldBegin();
16921
        if (field.type == TType.STOP) { 
16922
          break;
16923
        }
16924
        _Fields fieldId = _Fields.findByThriftId(field.id);
16925
        if (fieldId == null) {
16926
          TProtocolUtil.skip(iprot, field.type);
16927
        } else {
16928
          switch (fieldId) {
16929
            case SUCCESS:
16930
              if (field.type == TType.BOOL) {
16931
                this.success = iprot.readBool();
16932
                setSuccessIsSet(true);
16933
              } else { 
16934
                TProtocolUtil.skip(iprot, field.type);
16935
              }
16936
              break;
16937
            case UCX:
16938
              if (field.type == TType.STRUCT) {
16939
                this.ucx = new UserCommunicationException();
16940
                this.ucx.read(iprot);
16941
              } else { 
16942
                TProtocolUtil.skip(iprot, field.type);
16943
              }
16944
              break;
16945
          }
16946
          iprot.readFieldEnd();
16947
        }
16948
      }
16949
      iprot.readStructEnd();
16950
      validate();
16951
    }
16952
 
16953
    public void write(TProtocol oprot) throws TException {
16954
      oprot.writeStructBegin(STRUCT_DESC);
16955
 
16956
      if (this.isSetSuccess()) {
16957
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16958
        oprot.writeBool(this.success);
16959
        oprot.writeFieldEnd();
16960
      } else if (this.isSetUcx()) {
16961
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16962
        this.ucx.write(oprot);
16963
        oprot.writeFieldEnd();
16964
      }
16965
      oprot.writeFieldStop();
16966
      oprot.writeStructEnd();
16967
    }
16968
 
16969
    @Override
16970
    public String toString() {
16971
      StringBuilder sb = new StringBuilder("saveUserCommunication_result(");
16972
      boolean first = true;
16973
 
16974
      sb.append("success:");
16975
      sb.append(this.success);
16976
      first = false;
16977
      if (!first) sb.append(", ");
16978
      sb.append("ucx:");
16979
      if (this.ucx == null) {
16980
        sb.append("null");
16981
      } else {
16982
        sb.append(this.ucx);
16983
      }
16984
      first = false;
16985
      sb.append(")");
16986
      return sb.toString();
16987
    }
16988
 
16989
    public void validate() throws TException {
16990
      // check for required fields
16991
    }
16992
 
16993
  }
16994
 
553 chandransh 16995
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
16996
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 16997
 
553 chandransh 16998
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 16999
 
553 chandransh 17000
    private long userId;
48 ashish 17001
 
17002
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17003
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17004
      USER_ID((short)1, "userId");
48 ashish 17005
 
17006
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17007
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17008
 
17009
      static {
17010
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17011
          byId.put((int)field._thriftId, field);
17012
          byName.put(field.getFieldName(), field);
17013
        }
17014
      }
17015
 
17016
      /**
17017
       * Find the _Fields constant that matches fieldId, or null if its not found.
17018
       */
17019
      public static _Fields findByThriftId(int fieldId) {
17020
        return byId.get(fieldId);
17021
      }
17022
 
17023
      /**
17024
       * Find the _Fields constant that matches fieldId, throwing an exception
17025
       * if it is not found.
17026
       */
17027
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17028
        _Fields fields = findByThriftId(fieldId);
17029
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17030
        return fields;
17031
      }
17032
 
17033
      /**
17034
       * Find the _Fields constant that matches name, or null if its not found.
17035
       */
17036
      public static _Fields findByName(String name) {
17037
        return byName.get(name);
17038
      }
17039
 
17040
      private final short _thriftId;
17041
      private final String _fieldName;
17042
 
17043
      _Fields(short thriftId, String fieldName) {
17044
        _thriftId = thriftId;
17045
        _fieldName = fieldName;
17046
      }
17047
 
17048
      public short getThriftFieldId() {
17049
        return _thriftId;
17050
      }
17051
 
17052
      public String getFieldName() {
17053
        return _fieldName;
17054
      }
17055
    }
17056
 
17057
    // isset id assignments
17058
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 17059
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 17060
 
17061
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17062
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 17063
          new FieldValueMetaData(TType.I64)));
17064
    }});
17065
 
17066
    static {
553 chandransh 17067
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 17068
    }
17069
 
553 chandransh 17070
    public createCart_args() {
48 ashish 17071
    }
17072
 
553 chandransh 17073
    public createCart_args(
17074
      long userId)
48 ashish 17075
    {
17076
      this();
553 chandransh 17077
      this.userId = userId;
17078
      setUserIdIsSet(true);
48 ashish 17079
    }
17080
 
17081
    /**
17082
     * Performs a deep copy on <i>other</i>.
17083
     */
553 chandransh 17084
    public createCart_args(createCart_args other) {
48 ashish 17085
      __isset_bit_vector.clear();
17086
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17087
      this.userId = other.userId;
48 ashish 17088
    }
17089
 
553 chandransh 17090
    public createCart_args deepCopy() {
17091
      return new createCart_args(this);
48 ashish 17092
    }
17093
 
17094
    @Deprecated
553 chandransh 17095
    public createCart_args clone() {
17096
      return new createCart_args(this);
48 ashish 17097
    }
17098
 
553 chandransh 17099
    public long getUserId() {
17100
      return this.userId;
48 ashish 17101
    }
17102
 
553 chandransh 17103
    public createCart_args setUserId(long userId) {
17104
      this.userId = userId;
17105
      setUserIdIsSet(true);
48 ashish 17106
      return this;
17107
    }
17108
 
553 chandransh 17109
    public void unsetUserId() {
48 ashish 17110
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17111
    }
17112
 
553 chandransh 17113
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
17114
    public boolean isSetUserId() {
48 ashish 17115
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17116
    }
17117
 
553 chandransh 17118
    public void setUserIdIsSet(boolean value) {
48 ashish 17119
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17120
    }
17121
 
17122
    public void setFieldValue(_Fields field, Object value) {
17123
      switch (field) {
553 chandransh 17124
      case USER_ID:
48 ashish 17125
        if (value == null) {
553 chandransh 17126
          unsetUserId();
48 ashish 17127
        } else {
553 chandransh 17128
          setUserId((Long)value);
48 ashish 17129
        }
17130
        break;
17131
 
17132
      }
17133
    }
17134
 
17135
    public void setFieldValue(int fieldID, Object value) {
17136
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17137
    }
17138
 
17139
    public Object getFieldValue(_Fields field) {
17140
      switch (field) {
553 chandransh 17141
      case USER_ID:
17142
        return new Long(getUserId());
48 ashish 17143
 
17144
      }
17145
      throw new IllegalStateException();
17146
    }
17147
 
17148
    public Object getFieldValue(int fieldId) {
17149
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17150
    }
17151
 
17152
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17153
    public boolean isSet(_Fields field) {
17154
      switch (field) {
553 chandransh 17155
      case USER_ID:
17156
        return isSetUserId();
48 ashish 17157
      }
17158
      throw new IllegalStateException();
17159
    }
17160
 
17161
    public boolean isSet(int fieldID) {
17162
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17163
    }
17164
 
17165
    @Override
17166
    public boolean equals(Object that) {
17167
      if (that == null)
17168
        return false;
553 chandransh 17169
      if (that instanceof createCart_args)
17170
        return this.equals((createCart_args)that);
48 ashish 17171
      return false;
17172
    }
17173
 
553 chandransh 17174
    public boolean equals(createCart_args that) {
48 ashish 17175
      if (that == null)
17176
        return false;
17177
 
553 chandransh 17178
      boolean this_present_userId = true;
17179
      boolean that_present_userId = true;
17180
      if (this_present_userId || that_present_userId) {
17181
        if (!(this_present_userId && that_present_userId))
48 ashish 17182
          return false;
553 chandransh 17183
        if (this.userId != that.userId)
48 ashish 17184
          return false;
17185
      }
17186
 
17187
      return true;
17188
    }
17189
 
17190
    @Override
17191
    public int hashCode() {
17192
      return 0;
17193
    }
17194
 
553 chandransh 17195
    public int compareTo(createCart_args other) {
48 ashish 17196
      if (!getClass().equals(other.getClass())) {
17197
        return getClass().getName().compareTo(other.getClass().getName());
17198
      }
17199
 
17200
      int lastComparison = 0;
553 chandransh 17201
      createCart_args typedOther = (createCart_args)other;
48 ashish 17202
 
553 chandransh 17203
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 17204
      if (lastComparison != 0) {
17205
        return lastComparison;
17206
      }
553 chandransh 17207
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 17208
      if (lastComparison != 0) {
17209
        return lastComparison;
17210
      }
17211
      return 0;
17212
    }
17213
 
17214
    public void read(TProtocol iprot) throws TException {
17215
      TField field;
17216
      iprot.readStructBegin();
17217
      while (true)
17218
      {
17219
        field = iprot.readFieldBegin();
17220
        if (field.type == TType.STOP) { 
17221
          break;
17222
        }
17223
        _Fields fieldId = _Fields.findByThriftId(field.id);
17224
        if (fieldId == null) {
17225
          TProtocolUtil.skip(iprot, field.type);
17226
        } else {
17227
          switch (fieldId) {
553 chandransh 17228
            case USER_ID:
48 ashish 17229
              if (field.type == TType.I64) {
553 chandransh 17230
                this.userId = iprot.readI64();
17231
                setUserIdIsSet(true);
48 ashish 17232
              } else { 
17233
                TProtocolUtil.skip(iprot, field.type);
17234
              }
17235
              break;
17236
          }
17237
          iprot.readFieldEnd();
17238
        }
17239
      }
17240
      iprot.readStructEnd();
17241
      validate();
17242
    }
17243
 
17244
    public void write(TProtocol oprot) throws TException {
17245
      validate();
17246
 
17247
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17248
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17249
      oprot.writeI64(this.userId);
48 ashish 17250
      oprot.writeFieldEnd();
17251
      oprot.writeFieldStop();
17252
      oprot.writeStructEnd();
17253
    }
17254
 
17255
    @Override
17256
    public String toString() {
553 chandransh 17257
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 17258
      boolean first = true;
17259
 
553 chandransh 17260
      sb.append("userId:");
17261
      sb.append(this.userId);
48 ashish 17262
      first = false;
17263
      sb.append(")");
17264
      return sb.toString();
17265
    }
17266
 
17267
    public void validate() throws TException {
17268
      // check for required fields
17269
    }
17270
 
17271
  }
17272
 
553 chandransh 17273
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
17274
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 17275
 
553 chandransh 17276
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
17277
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17278
 
553 chandransh 17279
    private long success;
17280
    private ShoppingCartException scx;
48 ashish 17281
 
17282
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17283
    public enum _Fields implements TFieldIdEnum {
17284
      SUCCESS((short)0, "success"),
553 chandransh 17285
      SCX((short)1, "scx");
48 ashish 17286
 
17287
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17288
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17289
 
17290
      static {
17291
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17292
          byId.put((int)field._thriftId, field);
17293
          byName.put(field.getFieldName(), field);
17294
        }
17295
      }
17296
 
17297
      /**
17298
       * Find the _Fields constant that matches fieldId, or null if its not found.
17299
       */
17300
      public static _Fields findByThriftId(int fieldId) {
17301
        return byId.get(fieldId);
17302
      }
17303
 
17304
      /**
17305
       * Find the _Fields constant that matches fieldId, throwing an exception
17306
       * if it is not found.
17307
       */
17308
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17309
        _Fields fields = findByThriftId(fieldId);
17310
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17311
        return fields;
17312
      }
17313
 
17314
      /**
17315
       * Find the _Fields constant that matches name, or null if its not found.
17316
       */
17317
      public static _Fields findByName(String name) {
17318
        return byName.get(name);
17319
      }
17320
 
17321
      private final short _thriftId;
17322
      private final String _fieldName;
17323
 
17324
      _Fields(short thriftId, String fieldName) {
17325
        _thriftId = thriftId;
17326
        _fieldName = fieldName;
17327
      }
17328
 
17329
      public short getThriftFieldId() {
17330
        return _thriftId;
17331
      }
17332
 
17333
      public String getFieldName() {
17334
        return _fieldName;
17335
      }
17336
    }
17337
 
17338
    // isset id assignments
17339
    private static final int __SUCCESS_ISSET_ID = 0;
17340
    private BitSet __isset_bit_vector = new BitSet(1);
17341
 
17342
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17343
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17344
          new FieldValueMetaData(TType.I64)));
17345
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17346
          new FieldValueMetaData(TType.STRUCT)));
17347
    }});
17348
 
17349
    static {
553 chandransh 17350
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 17351
    }
17352
 
553 chandransh 17353
    public createCart_result() {
48 ashish 17354
    }
17355
 
553 chandransh 17356
    public createCart_result(
17357
      long success,
17358
      ShoppingCartException scx)
48 ashish 17359
    {
17360
      this();
17361
      this.success = success;
17362
      setSuccessIsSet(true);
553 chandransh 17363
      this.scx = scx;
48 ashish 17364
    }
17365
 
17366
    /**
17367
     * Performs a deep copy on <i>other</i>.
17368
     */
553 chandransh 17369
    public createCart_result(createCart_result other) {
48 ashish 17370
      __isset_bit_vector.clear();
17371
      __isset_bit_vector.or(other.__isset_bit_vector);
17372
      this.success = other.success;
553 chandransh 17373
      if (other.isSetScx()) {
17374
        this.scx = new ShoppingCartException(other.scx);
48 ashish 17375
      }
17376
    }
17377
 
553 chandransh 17378
    public createCart_result deepCopy() {
17379
      return new createCart_result(this);
48 ashish 17380
    }
17381
 
17382
    @Deprecated
553 chandransh 17383
    public createCart_result clone() {
17384
      return new createCart_result(this);
48 ashish 17385
    }
17386
 
553 chandransh 17387
    public long getSuccess() {
48 ashish 17388
      return this.success;
17389
    }
17390
 
553 chandransh 17391
    public createCart_result setSuccess(long success) {
48 ashish 17392
      this.success = success;
17393
      setSuccessIsSet(true);
17394
      return this;
17395
    }
17396
 
17397
    public void unsetSuccess() {
17398
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17399
    }
17400
 
17401
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17402
    public boolean isSetSuccess() {
17403
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17404
    }
17405
 
17406
    public void setSuccessIsSet(boolean value) {
17407
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17408
    }
17409
 
553 chandransh 17410
    public ShoppingCartException getScx() {
17411
      return this.scx;
48 ashish 17412
    }
17413
 
553 chandransh 17414
    public createCart_result setScx(ShoppingCartException scx) {
17415
      this.scx = scx;
48 ashish 17416
      return this;
17417
    }
17418
 
553 chandransh 17419
    public void unsetScx() {
17420
      this.scx = null;
48 ashish 17421
    }
17422
 
553 chandransh 17423
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17424
    public boolean isSetScx() {
17425
      return this.scx != null;
48 ashish 17426
    }
17427
 
553 chandransh 17428
    public void setScxIsSet(boolean value) {
48 ashish 17429
      if (!value) {
553 chandransh 17430
        this.scx = null;
48 ashish 17431
      }
17432
    }
17433
 
17434
    public void setFieldValue(_Fields field, Object value) {
17435
      switch (field) {
17436
      case SUCCESS:
17437
        if (value == null) {
17438
          unsetSuccess();
17439
        } else {
553 chandransh 17440
          setSuccess((Long)value);
48 ashish 17441
        }
17442
        break;
17443
 
553 chandransh 17444
      case SCX:
48 ashish 17445
        if (value == null) {
553 chandransh 17446
          unsetScx();
48 ashish 17447
        } else {
553 chandransh 17448
          setScx((ShoppingCartException)value);
48 ashish 17449
        }
17450
        break;
17451
 
17452
      }
17453
    }
17454
 
17455
    public void setFieldValue(int fieldID, Object value) {
17456
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17457
    }
17458
 
17459
    public Object getFieldValue(_Fields field) {
17460
      switch (field) {
17461
      case SUCCESS:
553 chandransh 17462
        return new Long(getSuccess());
48 ashish 17463
 
553 chandransh 17464
      case SCX:
17465
        return getScx();
48 ashish 17466
 
17467
      }
17468
      throw new IllegalStateException();
17469
    }
17470
 
17471
    public Object getFieldValue(int fieldId) {
17472
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17473
    }
17474
 
17475
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17476
    public boolean isSet(_Fields field) {
17477
      switch (field) {
17478
      case SUCCESS:
17479
        return isSetSuccess();
553 chandransh 17480
      case SCX:
17481
        return isSetScx();
48 ashish 17482
      }
17483
      throw new IllegalStateException();
17484
    }
17485
 
17486
    public boolean isSet(int fieldID) {
17487
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17488
    }
17489
 
17490
    @Override
17491
    public boolean equals(Object that) {
17492
      if (that == null)
17493
        return false;
553 chandransh 17494
      if (that instanceof createCart_result)
17495
        return this.equals((createCart_result)that);
48 ashish 17496
      return false;
17497
    }
17498
 
553 chandransh 17499
    public boolean equals(createCart_result that) {
48 ashish 17500
      if (that == null)
17501
        return false;
17502
 
17503
      boolean this_present_success = true;
17504
      boolean that_present_success = true;
17505
      if (this_present_success || that_present_success) {
17506
        if (!(this_present_success && that_present_success))
17507
          return false;
17508
        if (this.success != that.success)
17509
          return false;
17510
      }
17511
 
553 chandransh 17512
      boolean this_present_scx = true && this.isSetScx();
17513
      boolean that_present_scx = true && that.isSetScx();
17514
      if (this_present_scx || that_present_scx) {
17515
        if (!(this_present_scx && that_present_scx))
48 ashish 17516
          return false;
553 chandransh 17517
        if (!this.scx.equals(that.scx))
48 ashish 17518
          return false;
17519
      }
17520
 
17521
      return true;
17522
    }
17523
 
17524
    @Override
17525
    public int hashCode() {
17526
      return 0;
17527
    }
17528
 
553 chandransh 17529
    public int compareTo(createCart_result other) {
48 ashish 17530
      if (!getClass().equals(other.getClass())) {
17531
        return getClass().getName().compareTo(other.getClass().getName());
17532
      }
17533
 
17534
      int lastComparison = 0;
553 chandransh 17535
      createCart_result typedOther = (createCart_result)other;
48 ashish 17536
 
17537
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17538
      if (lastComparison != 0) {
17539
        return lastComparison;
17540
      }
17541
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17542
      if (lastComparison != 0) {
17543
        return lastComparison;
17544
      }
553 chandransh 17545
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 17546
      if (lastComparison != 0) {
17547
        return lastComparison;
17548
      }
553 chandransh 17549
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 17550
      if (lastComparison != 0) {
17551
        return lastComparison;
17552
      }
17553
      return 0;
17554
    }
17555
 
17556
    public void read(TProtocol iprot) throws TException {
17557
      TField field;
17558
      iprot.readStructBegin();
17559
      while (true)
17560
      {
17561
        field = iprot.readFieldBegin();
17562
        if (field.type == TType.STOP) { 
17563
          break;
17564
        }
17565
        _Fields fieldId = _Fields.findByThriftId(field.id);
17566
        if (fieldId == null) {
17567
          TProtocolUtil.skip(iprot, field.type);
17568
        } else {
17569
          switch (fieldId) {
17570
            case SUCCESS:
553 chandransh 17571
              if (field.type == TType.I64) {
17572
                this.success = iprot.readI64();
48 ashish 17573
                setSuccessIsSet(true);
17574
              } else { 
17575
                TProtocolUtil.skip(iprot, field.type);
17576
              }
17577
              break;
553 chandransh 17578
            case SCX:
48 ashish 17579
              if (field.type == TType.STRUCT) {
553 chandransh 17580
                this.scx = new ShoppingCartException();
17581
                this.scx.read(iprot);
48 ashish 17582
              } else { 
17583
                TProtocolUtil.skip(iprot, field.type);
17584
              }
17585
              break;
17586
          }
17587
          iprot.readFieldEnd();
17588
        }
17589
      }
17590
      iprot.readStructEnd();
17591
      validate();
17592
    }
17593
 
17594
    public void write(TProtocol oprot) throws TException {
17595
      oprot.writeStructBegin(STRUCT_DESC);
17596
 
17597
      if (this.isSetSuccess()) {
17598
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 17599
        oprot.writeI64(this.success);
48 ashish 17600
        oprot.writeFieldEnd();
553 chandransh 17601
      } else if (this.isSetScx()) {
17602
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17603
        this.scx.write(oprot);
48 ashish 17604
        oprot.writeFieldEnd();
17605
      }
17606
      oprot.writeFieldStop();
17607
      oprot.writeStructEnd();
17608
    }
17609
 
17610
    @Override
17611
    public String toString() {
553 chandransh 17612
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 17613
      boolean first = true;
17614
 
17615
      sb.append("success:");
17616
      sb.append(this.success);
17617
      first = false;
17618
      if (!first) sb.append(", ");
553 chandransh 17619
      sb.append("scx:");
17620
      if (this.scx == null) {
48 ashish 17621
        sb.append("null");
17622
      } else {
553 chandransh 17623
        sb.append(this.scx);
48 ashish 17624
      }
17625
      first = false;
17626
      sb.append(")");
17627
      return sb.toString();
17628
    }
17629
 
17630
    public void validate() throws TException {
17631
      // check for required fields
17632
    }
17633
 
17634
  }
17635
 
553 chandransh 17636
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
17637
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 17638
 
553 chandransh 17639
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 17640
 
553 chandransh 17641
    private long userId;
506 rajveer 17642
 
17643
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17644
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17645
      USER_ID((short)1, "userId");
506 rajveer 17646
 
17647
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17648
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17649
 
17650
      static {
17651
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17652
          byId.put((int)field._thriftId, field);
17653
          byName.put(field.getFieldName(), field);
17654
        }
17655
      }
17656
 
17657
      /**
17658
       * Find the _Fields constant that matches fieldId, or null if its not found.
17659
       */
17660
      public static _Fields findByThriftId(int fieldId) {
17661
        return byId.get(fieldId);
17662
      }
17663
 
17664
      /**
17665
       * Find the _Fields constant that matches fieldId, throwing an exception
17666
       * if it is not found.
17667
       */
17668
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17669
        _Fields fields = findByThriftId(fieldId);
17670
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17671
        return fields;
17672
      }
17673
 
17674
      /**
17675
       * Find the _Fields constant that matches name, or null if its not found.
17676
       */
17677
      public static _Fields findByName(String name) {
17678
        return byName.get(name);
17679
      }
17680
 
17681
      private final short _thriftId;
17682
      private final String _fieldName;
17683
 
17684
      _Fields(short thriftId, String fieldName) {
17685
        _thriftId = thriftId;
17686
        _fieldName = fieldName;
17687
      }
17688
 
17689
      public short getThriftFieldId() {
17690
        return _thriftId;
17691
      }
17692
 
17693
      public String getFieldName() {
17694
        return _fieldName;
17695
      }
17696
    }
17697
 
17698
    // isset id assignments
17699
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 17700
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 17701
 
17702
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17703
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 17704
          new FieldValueMetaData(TType.I64)));
17705
    }});
17706
 
17707
    static {
553 chandransh 17708
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 17709
    }
17710
 
553 chandransh 17711
    public getCurrentCart_args() {
506 rajveer 17712
    }
17713
 
553 chandransh 17714
    public getCurrentCart_args(
17715
      long userId)
506 rajveer 17716
    {
17717
      this();
553 chandransh 17718
      this.userId = userId;
17719
      setUserIdIsSet(true);
506 rajveer 17720
    }
17721
 
17722
    /**
17723
     * Performs a deep copy on <i>other</i>.
17724
     */
553 chandransh 17725
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 17726
      __isset_bit_vector.clear();
17727
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17728
      this.userId = other.userId;
506 rajveer 17729
    }
17730
 
553 chandransh 17731
    public getCurrentCart_args deepCopy() {
17732
      return new getCurrentCart_args(this);
506 rajveer 17733
    }
17734
 
17735
    @Deprecated
553 chandransh 17736
    public getCurrentCart_args clone() {
17737
      return new getCurrentCart_args(this);
506 rajveer 17738
    }
17739
 
553 chandransh 17740
    public long getUserId() {
17741
      return this.userId;
506 rajveer 17742
    }
17743
 
553 chandransh 17744
    public getCurrentCart_args setUserId(long userId) {
17745
      this.userId = userId;
17746
      setUserIdIsSet(true);
506 rajveer 17747
      return this;
17748
    }
17749
 
553 chandransh 17750
    public void unsetUserId() {
506 rajveer 17751
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17752
    }
17753
 
553 chandransh 17754
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
17755
    public boolean isSetUserId() {
506 rajveer 17756
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17757
    }
17758
 
553 chandransh 17759
    public void setUserIdIsSet(boolean value) {
506 rajveer 17760
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17761
    }
17762
 
553 chandransh 17763
    public void setFieldValue(_Fields field, Object value) {
17764
      switch (field) {
17765
      case USER_ID:
17766
        if (value == null) {
17767
          unsetUserId();
17768
        } else {
17769
          setUserId((Long)value);
17770
        }
17771
        break;
17772
 
17773
      }
506 rajveer 17774
    }
17775
 
553 chandransh 17776
    public void setFieldValue(int fieldID, Object value) {
17777
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17778
    }
17779
 
17780
    public Object getFieldValue(_Fields field) {
17781
      switch (field) {
17782
      case USER_ID:
17783
        return new Long(getUserId());
17784
 
17785
      }
17786
      throw new IllegalStateException();
17787
    }
17788
 
17789
    public Object getFieldValue(int fieldId) {
17790
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17791
    }
17792
 
17793
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17794
    public boolean isSet(_Fields field) {
17795
      switch (field) {
17796
      case USER_ID:
17797
        return isSetUserId();
17798
      }
17799
      throw new IllegalStateException();
17800
    }
17801
 
17802
    public boolean isSet(int fieldID) {
17803
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17804
    }
17805
 
17806
    @Override
17807
    public boolean equals(Object that) {
17808
      if (that == null)
17809
        return false;
17810
      if (that instanceof getCurrentCart_args)
17811
        return this.equals((getCurrentCart_args)that);
17812
      return false;
17813
    }
17814
 
17815
    public boolean equals(getCurrentCart_args that) {
17816
      if (that == null)
17817
        return false;
17818
 
17819
      boolean this_present_userId = true;
17820
      boolean that_present_userId = true;
17821
      if (this_present_userId || that_present_userId) {
17822
        if (!(this_present_userId && that_present_userId))
17823
          return false;
17824
        if (this.userId != that.userId)
17825
          return false;
17826
      }
17827
 
17828
      return true;
17829
    }
17830
 
17831
    @Override
17832
    public int hashCode() {
17833
      return 0;
17834
    }
17835
 
17836
    public int compareTo(getCurrentCart_args other) {
17837
      if (!getClass().equals(other.getClass())) {
17838
        return getClass().getName().compareTo(other.getClass().getName());
17839
      }
17840
 
17841
      int lastComparison = 0;
17842
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
17843
 
17844
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
17845
      if (lastComparison != 0) {
17846
        return lastComparison;
17847
      }
17848
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
17849
      if (lastComparison != 0) {
17850
        return lastComparison;
17851
      }
17852
      return 0;
17853
    }
17854
 
17855
    public void read(TProtocol iprot) throws TException {
17856
      TField field;
17857
      iprot.readStructBegin();
17858
      while (true)
17859
      {
17860
        field = iprot.readFieldBegin();
17861
        if (field.type == TType.STOP) { 
17862
          break;
17863
        }
17864
        _Fields fieldId = _Fields.findByThriftId(field.id);
17865
        if (fieldId == null) {
17866
          TProtocolUtil.skip(iprot, field.type);
17867
        } else {
17868
          switch (fieldId) {
17869
            case USER_ID:
17870
              if (field.type == TType.I64) {
17871
                this.userId = iprot.readI64();
17872
                setUserIdIsSet(true);
17873
              } else { 
17874
                TProtocolUtil.skip(iprot, field.type);
17875
              }
17876
              break;
17877
          }
17878
          iprot.readFieldEnd();
17879
        }
17880
      }
17881
      iprot.readStructEnd();
17882
      validate();
17883
    }
17884
 
17885
    public void write(TProtocol oprot) throws TException {
17886
      validate();
17887
 
17888
      oprot.writeStructBegin(STRUCT_DESC);
17889
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17890
      oprot.writeI64(this.userId);
17891
      oprot.writeFieldEnd();
17892
      oprot.writeFieldStop();
17893
      oprot.writeStructEnd();
17894
    }
17895
 
17896
    @Override
17897
    public String toString() {
17898
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
17899
      boolean first = true;
17900
 
17901
      sb.append("userId:");
17902
      sb.append(this.userId);
17903
      first = false;
17904
      sb.append(")");
17905
      return sb.toString();
17906
    }
17907
 
17908
    public void validate() throws TException {
17909
      // check for required fields
17910
    }
17911
 
17912
  }
17913
 
17914
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
17915
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
17916
 
17917
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
17918
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
17919
 
17920
    private Cart success;
17921
    private ShoppingCartException scx;
17922
 
17923
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17924
    public enum _Fields implements TFieldIdEnum {
17925
      SUCCESS((short)0, "success"),
17926
      SCX((short)1, "scx");
17927
 
17928
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17929
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17930
 
17931
      static {
17932
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17933
          byId.put((int)field._thriftId, field);
17934
          byName.put(field.getFieldName(), field);
17935
        }
17936
      }
17937
 
17938
      /**
17939
       * Find the _Fields constant that matches fieldId, or null if its not found.
17940
       */
17941
      public static _Fields findByThriftId(int fieldId) {
17942
        return byId.get(fieldId);
17943
      }
17944
 
17945
      /**
17946
       * Find the _Fields constant that matches fieldId, throwing an exception
17947
       * if it is not found.
17948
       */
17949
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17950
        _Fields fields = findByThriftId(fieldId);
17951
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17952
        return fields;
17953
      }
17954
 
17955
      /**
17956
       * Find the _Fields constant that matches name, or null if its not found.
17957
       */
17958
      public static _Fields findByName(String name) {
17959
        return byName.get(name);
17960
      }
17961
 
17962
      private final short _thriftId;
17963
      private final String _fieldName;
17964
 
17965
      _Fields(short thriftId, String fieldName) {
17966
        _thriftId = thriftId;
17967
        _fieldName = fieldName;
17968
      }
17969
 
17970
      public short getThriftFieldId() {
17971
        return _thriftId;
17972
      }
17973
 
17974
      public String getFieldName() {
17975
        return _fieldName;
17976
      }
17977
    }
17978
 
17979
    // isset id assignments
17980
 
17981
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17982
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17983
          new StructMetaData(TType.STRUCT, Cart.class)));
17984
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
17985
          new FieldValueMetaData(TType.STRUCT)));
17986
    }});
17987
 
17988
    static {
17989
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
17990
    }
17991
 
17992
    public getCurrentCart_result() {
17993
    }
17994
 
17995
    public getCurrentCart_result(
17996
      Cart success,
17997
      ShoppingCartException scx)
17998
    {
17999
      this();
18000
      this.success = success;
18001
      this.scx = scx;
18002
    }
18003
 
18004
    /**
18005
     * Performs a deep copy on <i>other</i>.
18006
     */
18007
    public getCurrentCart_result(getCurrentCart_result other) {
18008
      if (other.isSetSuccess()) {
18009
        this.success = new Cart(other.success);
18010
      }
18011
      if (other.isSetScx()) {
18012
        this.scx = new ShoppingCartException(other.scx);
18013
      }
18014
    }
18015
 
18016
    public getCurrentCart_result deepCopy() {
18017
      return new getCurrentCart_result(this);
18018
    }
18019
 
18020
    @Deprecated
18021
    public getCurrentCart_result clone() {
18022
      return new getCurrentCart_result(this);
18023
    }
18024
 
18025
    public Cart getSuccess() {
18026
      return this.success;
18027
    }
18028
 
18029
    public getCurrentCart_result setSuccess(Cart success) {
18030
      this.success = success;
506 rajveer 18031
      return this;
18032
    }
18033
 
553 chandransh 18034
    public void unsetSuccess() {
18035
      this.success = null;
506 rajveer 18036
    }
18037
 
553 chandransh 18038
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18039
    public boolean isSetSuccess() {
18040
      return this.success != null;
506 rajveer 18041
    }
18042
 
553 chandransh 18043
    public void setSuccessIsSet(boolean value) {
18044
      if (!value) {
18045
        this.success = null;
18046
      }
506 rajveer 18047
    }
18048
 
553 chandransh 18049
    public ShoppingCartException getScx() {
18050
      return this.scx;
18051
    }
18052
 
18053
    public getCurrentCart_result setScx(ShoppingCartException scx) {
18054
      this.scx = scx;
18055
      return this;
18056
    }
18057
 
18058
    public void unsetScx() {
18059
      this.scx = null;
18060
    }
18061
 
18062
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18063
    public boolean isSetScx() {
18064
      return this.scx != null;
18065
    }
18066
 
18067
    public void setScxIsSet(boolean value) {
18068
      if (!value) {
18069
        this.scx = null;
18070
      }
18071
    }
18072
 
506 rajveer 18073
    public void setFieldValue(_Fields field, Object value) {
18074
      switch (field) {
553 chandransh 18075
      case SUCCESS:
506 rajveer 18076
        if (value == null) {
553 chandransh 18077
          unsetSuccess();
506 rajveer 18078
        } else {
553 chandransh 18079
          setSuccess((Cart)value);
506 rajveer 18080
        }
18081
        break;
18082
 
553 chandransh 18083
      case SCX:
506 rajveer 18084
        if (value == null) {
553 chandransh 18085
          unsetScx();
506 rajveer 18086
        } else {
553 chandransh 18087
          setScx((ShoppingCartException)value);
506 rajveer 18088
        }
18089
        break;
18090
 
18091
      }
18092
    }
18093
 
18094
    public void setFieldValue(int fieldID, Object value) {
18095
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18096
    }
18097
 
18098
    public Object getFieldValue(_Fields field) {
18099
      switch (field) {
553 chandransh 18100
      case SUCCESS:
18101
        return getSuccess();
506 rajveer 18102
 
553 chandransh 18103
      case SCX:
18104
        return getScx();
506 rajveer 18105
 
18106
      }
18107
      throw new IllegalStateException();
18108
    }
18109
 
18110
    public Object getFieldValue(int fieldId) {
18111
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18112
    }
18113
 
18114
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18115
    public boolean isSet(_Fields field) {
18116
      switch (field) {
553 chandransh 18117
      case SUCCESS:
18118
        return isSetSuccess();
18119
      case SCX:
18120
        return isSetScx();
506 rajveer 18121
      }
18122
      throw new IllegalStateException();
18123
    }
18124
 
18125
    public boolean isSet(int fieldID) {
18126
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18127
    }
18128
 
18129
    @Override
18130
    public boolean equals(Object that) {
18131
      if (that == null)
18132
        return false;
553 chandransh 18133
      if (that instanceof getCurrentCart_result)
18134
        return this.equals((getCurrentCart_result)that);
506 rajveer 18135
      return false;
18136
    }
18137
 
553 chandransh 18138
    public boolean equals(getCurrentCart_result that) {
506 rajveer 18139
      if (that == null)
18140
        return false;
18141
 
553 chandransh 18142
      boolean this_present_success = true && this.isSetSuccess();
18143
      boolean that_present_success = true && that.isSetSuccess();
18144
      if (this_present_success || that_present_success) {
18145
        if (!(this_present_success && that_present_success))
506 rajveer 18146
          return false;
553 chandransh 18147
        if (!this.success.equals(that.success))
506 rajveer 18148
          return false;
18149
      }
18150
 
553 chandransh 18151
      boolean this_present_scx = true && this.isSetScx();
18152
      boolean that_present_scx = true && that.isSetScx();
18153
      if (this_present_scx || that_present_scx) {
18154
        if (!(this_present_scx && that_present_scx))
506 rajveer 18155
          return false;
553 chandransh 18156
        if (!this.scx.equals(that.scx))
506 rajveer 18157
          return false;
18158
      }
18159
 
18160
      return true;
18161
    }
18162
 
18163
    @Override
18164
    public int hashCode() {
18165
      return 0;
18166
    }
18167
 
553 chandransh 18168
    public int compareTo(getCurrentCart_result other) {
506 rajveer 18169
      if (!getClass().equals(other.getClass())) {
18170
        return getClass().getName().compareTo(other.getClass().getName());
18171
      }
18172
 
18173
      int lastComparison = 0;
553 chandransh 18174
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 18175
 
553 chandransh 18176
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 18177
      if (lastComparison != 0) {
18178
        return lastComparison;
18179
      }
553 chandransh 18180
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 18181
      if (lastComparison != 0) {
18182
        return lastComparison;
18183
      }
553 chandransh 18184
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 18185
      if (lastComparison != 0) {
18186
        return lastComparison;
18187
      }
553 chandransh 18188
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 18189
      if (lastComparison != 0) {
18190
        return lastComparison;
18191
      }
18192
      return 0;
18193
    }
18194
 
18195
    public void read(TProtocol iprot) throws TException {
18196
      TField field;
18197
      iprot.readStructBegin();
18198
      while (true)
18199
      {
18200
        field = iprot.readFieldBegin();
18201
        if (field.type == TType.STOP) { 
18202
          break;
18203
        }
18204
        _Fields fieldId = _Fields.findByThriftId(field.id);
18205
        if (fieldId == null) {
18206
          TProtocolUtil.skip(iprot, field.type);
18207
        } else {
18208
          switch (fieldId) {
553 chandransh 18209
            case SUCCESS:
18210
              if (field.type == TType.STRUCT) {
18211
                this.success = new Cart();
18212
                this.success.read(iprot);
506 rajveer 18213
              } else { 
18214
                TProtocolUtil.skip(iprot, field.type);
18215
              }
18216
              break;
553 chandransh 18217
            case SCX:
18218
              if (field.type == TType.STRUCT) {
18219
                this.scx = new ShoppingCartException();
18220
                this.scx.read(iprot);
18221
              } else { 
18222
                TProtocolUtil.skip(iprot, field.type);
18223
              }
18224
              break;
18225
          }
18226
          iprot.readFieldEnd();
18227
        }
18228
      }
18229
      iprot.readStructEnd();
18230
      validate();
18231
    }
18232
 
18233
    public void write(TProtocol oprot) throws TException {
18234
      oprot.writeStructBegin(STRUCT_DESC);
18235
 
18236
      if (this.isSetSuccess()) {
18237
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18238
        this.success.write(oprot);
18239
        oprot.writeFieldEnd();
18240
      } else if (this.isSetScx()) {
18241
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18242
        this.scx.write(oprot);
18243
        oprot.writeFieldEnd();
18244
      }
18245
      oprot.writeFieldStop();
18246
      oprot.writeStructEnd();
18247
    }
18248
 
18249
    @Override
18250
    public String toString() {
18251
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
18252
      boolean first = true;
18253
 
18254
      sb.append("success:");
18255
      if (this.success == null) {
18256
        sb.append("null");
18257
      } else {
18258
        sb.append(this.success);
18259
      }
18260
      first = false;
18261
      if (!first) sb.append(", ");
18262
      sb.append("scx:");
18263
      if (this.scx == null) {
18264
        sb.append("null");
18265
      } else {
18266
        sb.append(this.scx);
18267
      }
18268
      first = false;
18269
      sb.append(")");
18270
      return sb.toString();
18271
    }
18272
 
18273
    public void validate() throws TException {
18274
      // check for required fields
18275
    }
18276
 
18277
  }
18278
 
18279
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
18280
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
18281
 
18282
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
18283
 
18284
    private long cartId;
18285
 
18286
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18287
    public enum _Fields implements TFieldIdEnum {
18288
      CART_ID((short)1, "cartId");
18289
 
18290
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18291
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18292
 
18293
      static {
18294
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18295
          byId.put((int)field._thriftId, field);
18296
          byName.put(field.getFieldName(), field);
18297
        }
18298
      }
18299
 
18300
      /**
18301
       * Find the _Fields constant that matches fieldId, or null if its not found.
18302
       */
18303
      public static _Fields findByThriftId(int fieldId) {
18304
        return byId.get(fieldId);
18305
      }
18306
 
18307
      /**
18308
       * Find the _Fields constant that matches fieldId, throwing an exception
18309
       * if it is not found.
18310
       */
18311
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18312
        _Fields fields = findByThriftId(fieldId);
18313
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18314
        return fields;
18315
      }
18316
 
18317
      /**
18318
       * Find the _Fields constant that matches name, or null if its not found.
18319
       */
18320
      public static _Fields findByName(String name) {
18321
        return byName.get(name);
18322
      }
18323
 
18324
      private final short _thriftId;
18325
      private final String _fieldName;
18326
 
18327
      _Fields(short thriftId, String fieldName) {
18328
        _thriftId = thriftId;
18329
        _fieldName = fieldName;
18330
      }
18331
 
18332
      public short getThriftFieldId() {
18333
        return _thriftId;
18334
      }
18335
 
18336
      public String getFieldName() {
18337
        return _fieldName;
18338
      }
18339
    }
18340
 
18341
    // isset id assignments
18342
    private static final int __CARTID_ISSET_ID = 0;
18343
    private BitSet __isset_bit_vector = new BitSet(1);
18344
 
18345
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18346
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
18347
          new FieldValueMetaData(TType.I64)));
18348
    }});
18349
 
18350
    static {
18351
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
18352
    }
18353
 
18354
    public getCart_args() {
18355
    }
18356
 
18357
    public getCart_args(
18358
      long cartId)
18359
    {
18360
      this();
18361
      this.cartId = cartId;
18362
      setCartIdIsSet(true);
18363
    }
18364
 
18365
    /**
18366
     * Performs a deep copy on <i>other</i>.
18367
     */
18368
    public getCart_args(getCart_args other) {
18369
      __isset_bit_vector.clear();
18370
      __isset_bit_vector.or(other.__isset_bit_vector);
18371
      this.cartId = other.cartId;
18372
    }
18373
 
18374
    public getCart_args deepCopy() {
18375
      return new getCart_args(this);
18376
    }
18377
 
18378
    @Deprecated
18379
    public getCart_args clone() {
18380
      return new getCart_args(this);
18381
    }
18382
 
18383
    public long getCartId() {
18384
      return this.cartId;
18385
    }
18386
 
18387
    public getCart_args setCartId(long cartId) {
18388
      this.cartId = cartId;
18389
      setCartIdIsSet(true);
18390
      return this;
18391
    }
18392
 
18393
    public void unsetCartId() {
18394
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
18395
    }
18396
 
18397
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
18398
    public boolean isSetCartId() {
18399
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
18400
    }
18401
 
18402
    public void setCartIdIsSet(boolean value) {
18403
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
18404
    }
18405
 
18406
    public void setFieldValue(_Fields field, Object value) {
18407
      switch (field) {
18408
      case CART_ID:
18409
        if (value == null) {
18410
          unsetCartId();
18411
        } else {
18412
          setCartId((Long)value);
18413
        }
18414
        break;
18415
 
18416
      }
18417
    }
18418
 
18419
    public void setFieldValue(int fieldID, Object value) {
18420
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18421
    }
18422
 
18423
    public Object getFieldValue(_Fields field) {
18424
      switch (field) {
18425
      case CART_ID:
18426
        return new Long(getCartId());
18427
 
18428
      }
18429
      throw new IllegalStateException();
18430
    }
18431
 
18432
    public Object getFieldValue(int fieldId) {
18433
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18434
    }
18435
 
18436
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18437
    public boolean isSet(_Fields field) {
18438
      switch (field) {
18439
      case CART_ID:
18440
        return isSetCartId();
18441
      }
18442
      throw new IllegalStateException();
18443
    }
18444
 
18445
    public boolean isSet(int fieldID) {
18446
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18447
    }
18448
 
18449
    @Override
18450
    public boolean equals(Object that) {
18451
      if (that == null)
18452
        return false;
18453
      if (that instanceof getCart_args)
18454
        return this.equals((getCart_args)that);
18455
      return false;
18456
    }
18457
 
18458
    public boolean equals(getCart_args that) {
18459
      if (that == null)
18460
        return false;
18461
 
18462
      boolean this_present_cartId = true;
18463
      boolean that_present_cartId = true;
18464
      if (this_present_cartId || that_present_cartId) {
18465
        if (!(this_present_cartId && that_present_cartId))
18466
          return false;
18467
        if (this.cartId != that.cartId)
18468
          return false;
18469
      }
18470
 
18471
      return true;
18472
    }
18473
 
18474
    @Override
18475
    public int hashCode() {
18476
      return 0;
18477
    }
18478
 
18479
    public int compareTo(getCart_args other) {
18480
      if (!getClass().equals(other.getClass())) {
18481
        return getClass().getName().compareTo(other.getClass().getName());
18482
      }
18483
 
18484
      int lastComparison = 0;
18485
      getCart_args typedOther = (getCart_args)other;
18486
 
18487
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
18488
      if (lastComparison != 0) {
18489
        return lastComparison;
18490
      }
18491
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
18492
      if (lastComparison != 0) {
18493
        return lastComparison;
18494
      }
18495
      return 0;
18496
    }
18497
 
18498
    public void read(TProtocol iprot) throws TException {
18499
      TField field;
18500
      iprot.readStructBegin();
18501
      while (true)
18502
      {
18503
        field = iprot.readFieldBegin();
18504
        if (field.type == TType.STOP) { 
18505
          break;
18506
        }
18507
        _Fields fieldId = _Fields.findByThriftId(field.id);
18508
        if (fieldId == null) {
18509
          TProtocolUtil.skip(iprot, field.type);
18510
        } else {
18511
          switch (fieldId) {
18512
            case CART_ID:
506 rajveer 18513
              if (field.type == TType.I64) {
553 chandransh 18514
                this.cartId = iprot.readI64();
18515
                setCartIdIsSet(true);
506 rajveer 18516
              } else { 
18517
                TProtocolUtil.skip(iprot, field.type);
18518
              }
18519
              break;
18520
          }
18521
          iprot.readFieldEnd();
18522
        }
18523
      }
18524
      iprot.readStructEnd();
18525
      validate();
18526
    }
18527
 
18528
    public void write(TProtocol oprot) throws TException {
18529
      validate();
18530
 
18531
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 18532
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
18533
      oprot.writeI64(this.cartId);
506 rajveer 18534
      oprot.writeFieldEnd();
18535
      oprot.writeFieldStop();
18536
      oprot.writeStructEnd();
18537
    }
18538
 
18539
    @Override
18540
    public String toString() {
553 chandransh 18541
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 18542
      boolean first = true;
18543
 
553 chandransh 18544
      sb.append("cartId:");
18545
      sb.append(this.cartId);
506 rajveer 18546
      first = false;
18547
      sb.append(")");
18548
      return sb.toString();
18549
    }
18550
 
18551
    public void validate() throws TException {
18552
      // check for required fields
18553
    }
18554
 
18555
  }
18556
 
553 chandransh 18557
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
18558
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 18559
 
553 chandransh 18560
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
18561
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 18562
 
553 chandransh 18563
    private Cart success;
18564
    private ShoppingCartException scx;
506 rajveer 18565
 
18566
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18567
    public enum _Fields implements TFieldIdEnum {
18568
      SUCCESS((short)0, "success"),
553 chandransh 18569
      SCX((short)1, "scx");
506 rajveer 18570
 
18571
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18572
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18573
 
18574
      static {
18575
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18576
          byId.put((int)field._thriftId, field);
18577
          byName.put(field.getFieldName(), field);
18578
        }
18579
      }
18580
 
18581
      /**
18582
       * Find the _Fields constant that matches fieldId, or null if its not found.
18583
       */
18584
      public static _Fields findByThriftId(int fieldId) {
18585
        return byId.get(fieldId);
18586
      }
18587
 
18588
      /**
18589
       * Find the _Fields constant that matches fieldId, throwing an exception
18590
       * if it is not found.
18591
       */
18592
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18593
        _Fields fields = findByThriftId(fieldId);
18594
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18595
        return fields;
18596
      }
18597
 
18598
      /**
18599
       * Find the _Fields constant that matches name, or null if its not found.
18600
       */
18601
      public static _Fields findByName(String name) {
18602
        return byName.get(name);
18603
      }
18604
 
18605
      private final short _thriftId;
18606
      private final String _fieldName;
18607
 
18608
      _Fields(short thriftId, String fieldName) {
18609
        _thriftId = thriftId;
18610
        _fieldName = fieldName;
18611
      }
18612
 
18613
      public short getThriftFieldId() {
18614
        return _thriftId;
18615
      }
18616
 
18617
      public String getFieldName() {
18618
        return _fieldName;
18619
      }
18620
    }
18621
 
18622
    // isset id assignments
18623
 
18624
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18625
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 18626
          new StructMetaData(TType.STRUCT, Cart.class)));
18627
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 18628
          new FieldValueMetaData(TType.STRUCT)));
18629
    }});
18630
 
18631
    static {
553 chandransh 18632
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 18633
    }
18634
 
553 chandransh 18635
    public getCart_result() {
506 rajveer 18636
    }
18637
 
553 chandransh 18638
    public getCart_result(
18639
      Cart success,
18640
      ShoppingCartException scx)
506 rajveer 18641
    {
18642
      this();
18643
      this.success = success;
553 chandransh 18644
      this.scx = scx;
506 rajveer 18645
    }
18646
 
18647
    /**
18648
     * Performs a deep copy on <i>other</i>.
18649
     */
553 chandransh 18650
    public getCart_result(getCart_result other) {
18651
      if (other.isSetSuccess()) {
18652
        this.success = new Cart(other.success);
506 rajveer 18653
      }
553 chandransh 18654
      if (other.isSetScx()) {
18655
        this.scx = new ShoppingCartException(other.scx);
18656
      }
506 rajveer 18657
    }
18658
 
553 chandransh 18659
    public getCart_result deepCopy() {
18660
      return new getCart_result(this);
506 rajveer 18661
    }
18662
 
18663
    @Deprecated
553 chandransh 18664
    public getCart_result clone() {
18665
      return new getCart_result(this);
506 rajveer 18666
    }
18667
 
553 chandransh 18668
    public Cart getSuccess() {
506 rajveer 18669
      return this.success;
18670
    }
18671
 
553 chandransh 18672
    public getCart_result setSuccess(Cart success) {
506 rajveer 18673
      this.success = success;
18674
      return this;
18675
    }
18676
 
18677
    public void unsetSuccess() {
553 chandransh 18678
      this.success = null;
506 rajveer 18679
    }
18680
 
18681
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18682
    public boolean isSetSuccess() {
553 chandransh 18683
      return this.success != null;
506 rajveer 18684
    }
18685
 
18686
    public void setSuccessIsSet(boolean value) {
553 chandransh 18687
      if (!value) {
18688
        this.success = null;
18689
      }
506 rajveer 18690
    }
18691
 
553 chandransh 18692
    public ShoppingCartException getScx() {
18693
      return this.scx;
506 rajveer 18694
    }
18695
 
553 chandransh 18696
    public getCart_result setScx(ShoppingCartException scx) {
18697
      this.scx = scx;
506 rajveer 18698
      return this;
18699
    }
18700
 
553 chandransh 18701
    public void unsetScx() {
18702
      this.scx = null;
506 rajveer 18703
    }
18704
 
553 chandransh 18705
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18706
    public boolean isSetScx() {
18707
      return this.scx != null;
506 rajveer 18708
    }
18709
 
553 chandransh 18710
    public void setScxIsSet(boolean value) {
506 rajveer 18711
      if (!value) {
553 chandransh 18712
        this.scx = null;
506 rajveer 18713
      }
18714
    }
18715
 
18716
    public void setFieldValue(_Fields field, Object value) {
18717
      switch (field) {
18718
      case SUCCESS:
18719
        if (value == null) {
18720
          unsetSuccess();
18721
        } else {
553 chandransh 18722
          setSuccess((Cart)value);
506 rajveer 18723
        }
18724
        break;
18725
 
553 chandransh 18726
      case SCX:
506 rajveer 18727
        if (value == null) {
553 chandransh 18728
          unsetScx();
506 rajveer 18729
        } else {
553 chandransh 18730
          setScx((ShoppingCartException)value);
506 rajveer 18731
        }
18732
        break;
18733
 
18734
      }
18735
    }
18736
 
18737
    public void setFieldValue(int fieldID, Object value) {
18738
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18739
    }
18740
 
18741
    public Object getFieldValue(_Fields field) {
18742
      switch (field) {
18743
      case SUCCESS:
553 chandransh 18744
        return getSuccess();
506 rajveer 18745
 
553 chandransh 18746
      case SCX:
18747
        return getScx();
506 rajveer 18748
 
18749
      }
18750
      throw new IllegalStateException();
18751
    }
18752
 
18753
    public Object getFieldValue(int fieldId) {
18754
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18755
    }
18756
 
18757
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18758
    public boolean isSet(_Fields field) {
18759
      switch (field) {
18760
      case SUCCESS:
18761
        return isSetSuccess();
553 chandransh 18762
      case SCX:
18763
        return isSetScx();
506 rajveer 18764
      }
18765
      throw new IllegalStateException();
18766
    }
18767
 
18768
    public boolean isSet(int fieldID) {
18769
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18770
    }
18771
 
18772
    @Override
18773
    public boolean equals(Object that) {
18774
      if (that == null)
18775
        return false;
553 chandransh 18776
      if (that instanceof getCart_result)
18777
        return this.equals((getCart_result)that);
506 rajveer 18778
      return false;
18779
    }
18780
 
553 chandransh 18781
    public boolean equals(getCart_result that) {
506 rajveer 18782
      if (that == null)
18783
        return false;
18784
 
553 chandransh 18785
      boolean this_present_success = true && this.isSetSuccess();
18786
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 18787
      if (this_present_success || that_present_success) {
18788
        if (!(this_present_success && that_present_success))
18789
          return false;
553 chandransh 18790
        if (!this.success.equals(that.success))
506 rajveer 18791
          return false;
18792
      }
18793
 
553 chandransh 18794
      boolean this_present_scx = true && this.isSetScx();
18795
      boolean that_present_scx = true && that.isSetScx();
18796
      if (this_present_scx || that_present_scx) {
18797
        if (!(this_present_scx && that_present_scx))
506 rajveer 18798
          return false;
553 chandransh 18799
        if (!this.scx.equals(that.scx))
506 rajveer 18800
          return false;
18801
      }
18802
 
18803
      return true;
18804
    }
18805
 
18806
    @Override
18807
    public int hashCode() {
18808
      return 0;
18809
    }
18810
 
553 chandransh 18811
    public int compareTo(getCart_result other) {
506 rajveer 18812
      if (!getClass().equals(other.getClass())) {
18813
        return getClass().getName().compareTo(other.getClass().getName());
18814
      }
18815
 
18816
      int lastComparison = 0;
553 chandransh 18817
      getCart_result typedOther = (getCart_result)other;
506 rajveer 18818
 
18819
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18820
      if (lastComparison != 0) {
18821
        return lastComparison;
18822
      }
18823
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18824
      if (lastComparison != 0) {
18825
        return lastComparison;
18826
      }
553 chandransh 18827
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 18828
      if (lastComparison != 0) {
18829
        return lastComparison;
18830
      }
553 chandransh 18831
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 18832
      if (lastComparison != 0) {
18833
        return lastComparison;
18834
      }
18835
      return 0;
18836
    }
18837
 
18838
    public void read(TProtocol iprot) throws TException {
18839
      TField field;
18840
      iprot.readStructBegin();
18841
      while (true)
18842
      {
18843
        field = iprot.readFieldBegin();
18844
        if (field.type == TType.STOP) { 
18845
          break;
18846
        }
18847
        _Fields fieldId = _Fields.findByThriftId(field.id);
18848
        if (fieldId == null) {
18849
          TProtocolUtil.skip(iprot, field.type);
18850
        } else {
18851
          switch (fieldId) {
18852
            case SUCCESS:
553 chandransh 18853
              if (field.type == TType.STRUCT) {
18854
                this.success = new Cart();
18855
                this.success.read(iprot);
506 rajveer 18856
              } else { 
18857
                TProtocolUtil.skip(iprot, field.type);
18858
              }
18859
              break;
553 chandransh 18860
            case SCX:
506 rajveer 18861
              if (field.type == TType.STRUCT) {
553 chandransh 18862
                this.scx = new ShoppingCartException();
18863
                this.scx.read(iprot);
506 rajveer 18864
              } else { 
18865
                TProtocolUtil.skip(iprot, field.type);
18866
              }
18867
              break;
18868
          }
18869
          iprot.readFieldEnd();
18870
        }
18871
      }
18872
      iprot.readStructEnd();
18873
      validate();
18874
    }
18875
 
18876
    public void write(TProtocol oprot) throws TException {
18877
      oprot.writeStructBegin(STRUCT_DESC);
18878
 
18879
      if (this.isSetSuccess()) {
18880
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 18881
        this.success.write(oprot);
506 rajveer 18882
        oprot.writeFieldEnd();
553 chandransh 18883
      } else if (this.isSetScx()) {
18884
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18885
        this.scx.write(oprot);
506 rajveer 18886
        oprot.writeFieldEnd();
18887
      }
18888
      oprot.writeFieldStop();
18889
      oprot.writeStructEnd();
18890
    }
18891
 
18892
    @Override
18893
    public String toString() {
553 chandransh 18894
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 18895
      boolean first = true;
18896
 
18897
      sb.append("success:");
553 chandransh 18898
      if (this.success == null) {
18899
        sb.append("null");
18900
      } else {
18901
        sb.append(this.success);
18902
      }
506 rajveer 18903
      first = false;
18904
      if (!first) sb.append(", ");
553 chandransh 18905
      sb.append("scx:");
18906
      if (this.scx == null) {
506 rajveer 18907
        sb.append("null");
18908
      } else {
553 chandransh 18909
        sb.append(this.scx);
506 rajveer 18910
      }
18911
      first = false;
18912
      sb.append(")");
18913
      return sb.toString();
18914
    }
18915
 
18916
    public void validate() throws TException {
18917
      // check for required fields
18918
    }
18919
 
18920
  }
18921
 
553 chandransh 18922
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
18923
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 18924
 
553 chandransh 18925
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
18926
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 18927
 
553 chandransh 18928
    private long userId;
18929
    private CartStatus status;
48 ashish 18930
 
18931
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18932
    public enum _Fields implements TFieldIdEnum {
553 chandransh 18933
      USER_ID((short)1, "userId"),
18934
      /**
18935
       * 
18936
       * @see CartStatus
18937
       */
18938
      STATUS((short)2, "status");
48 ashish 18939
 
18940
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18942
 
18943
      static {
18944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18945
          byId.put((int)field._thriftId, field);
18946
          byName.put(field.getFieldName(), field);
18947
        }
18948
      }
18949
 
18950
      /**
18951
       * Find the _Fields constant that matches fieldId, or null if its not found.
18952
       */
18953
      public static _Fields findByThriftId(int fieldId) {
18954
        return byId.get(fieldId);
18955
      }
18956
 
18957
      /**
18958
       * Find the _Fields constant that matches fieldId, throwing an exception
18959
       * if it is not found.
18960
       */
18961
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18962
        _Fields fields = findByThriftId(fieldId);
18963
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18964
        return fields;
18965
      }
18966
 
18967
      /**
18968
       * Find the _Fields constant that matches name, or null if its not found.
18969
       */
18970
      public static _Fields findByName(String name) {
18971
        return byName.get(name);
18972
      }
18973
 
18974
      private final short _thriftId;
18975
      private final String _fieldName;
18976
 
18977
      _Fields(short thriftId, String fieldName) {
18978
        _thriftId = thriftId;
18979
        _fieldName = fieldName;
18980
      }
18981
 
18982
      public short getThriftFieldId() {
18983
        return _thriftId;
18984
      }
18985
 
18986
      public String getFieldName() {
18987
        return _fieldName;
18988
      }
18989
    }
18990
 
18991
    // isset id assignments
18992
    private static final int __USERID_ISSET_ID = 0;
18993
    private BitSet __isset_bit_vector = new BitSet(1);
18994
 
18995
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18996
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 18997
          new FieldValueMetaData(TType.I64)));
553 chandransh 18998
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
18999
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 19000
    }});
19001
 
19002
    static {
553 chandransh 19003
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 19004
    }
19005
 
553 chandransh 19006
    public getCartsForUser_args() {
48 ashish 19007
    }
19008
 
553 chandransh 19009
    public getCartsForUser_args(
19010
      long userId,
19011
      CartStatus status)
48 ashish 19012
    {
19013
      this();
553 chandransh 19014
      this.userId = userId;
19015
      setUserIdIsSet(true);
19016
      this.status = status;
48 ashish 19017
    }
19018
 
19019
    /**
19020
     * Performs a deep copy on <i>other</i>.
19021
     */
553 chandransh 19022
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 19023
      __isset_bit_vector.clear();
19024
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19025
      this.userId = other.userId;
19026
      if (other.isSetStatus()) {
19027
        this.status = other.status;
48 ashish 19028
      }
19029
    }
19030
 
553 chandransh 19031
    public getCartsForUser_args deepCopy() {
19032
      return new getCartsForUser_args(this);
48 ashish 19033
    }
19034
 
19035
    @Deprecated
553 chandransh 19036
    public getCartsForUser_args clone() {
19037
      return new getCartsForUser_args(this);
48 ashish 19038
    }
19039
 
553 chandransh 19040
    public long getUserId() {
19041
      return this.userId;
48 ashish 19042
    }
19043
 
553 chandransh 19044
    public getCartsForUser_args setUserId(long userId) {
19045
      this.userId = userId;
19046
      setUserIdIsSet(true);
48 ashish 19047
      return this;
19048
    }
19049
 
553 chandransh 19050
    public void unsetUserId() {
48 ashish 19051
      __isset_bit_vector.clear(__USERID_ISSET_ID);
19052
    }
19053
 
553 chandransh 19054
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
19055
    public boolean isSetUserId() {
48 ashish 19056
      return __isset_bit_vector.get(__USERID_ISSET_ID);
19057
    }
19058
 
553 chandransh 19059
    public void setUserIdIsSet(boolean value) {
48 ashish 19060
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
19061
    }
19062
 
553 chandransh 19063
    /**
19064
     * 
19065
     * @see CartStatus
19066
     */
19067
    public CartStatus getStatus() {
19068
      return this.status;
48 ashish 19069
    }
19070
 
553 chandransh 19071
    /**
19072
     * 
19073
     * @see CartStatus
19074
     */
19075
    public getCartsForUser_args setStatus(CartStatus status) {
19076
      this.status = status;
48 ashish 19077
      return this;
19078
    }
19079
 
553 chandransh 19080
    public void unsetStatus() {
19081
      this.status = null;
48 ashish 19082
    }
19083
 
553 chandransh 19084
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19085
    public boolean isSetStatus() {
19086
      return this.status != null;
48 ashish 19087
    }
19088
 
553 chandransh 19089
    public void setStatusIsSet(boolean value) {
48 ashish 19090
      if (!value) {
553 chandransh 19091
        this.status = null;
48 ashish 19092
      }
19093
    }
19094
 
19095
    public void setFieldValue(_Fields field, Object value) {
19096
      switch (field) {
553 chandransh 19097
      case USER_ID:
48 ashish 19098
        if (value == null) {
553 chandransh 19099
          unsetUserId();
48 ashish 19100
        } else {
553 chandransh 19101
          setUserId((Long)value);
48 ashish 19102
        }
19103
        break;
19104
 
553 chandransh 19105
      case STATUS:
48 ashish 19106
        if (value == null) {
553 chandransh 19107
          unsetStatus();
48 ashish 19108
        } else {
553 chandransh 19109
          setStatus((CartStatus)value);
48 ashish 19110
        }
19111
        break;
19112
 
19113
      }
19114
    }
19115
 
19116
    public void setFieldValue(int fieldID, Object value) {
19117
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19118
    }
19119
 
19120
    public Object getFieldValue(_Fields field) {
19121
      switch (field) {
553 chandransh 19122
      case USER_ID:
19123
        return new Long(getUserId());
48 ashish 19124
 
553 chandransh 19125
      case STATUS:
19126
        return getStatus();
48 ashish 19127
 
19128
      }
19129
      throw new IllegalStateException();
19130
    }
19131
 
19132
    public Object getFieldValue(int fieldId) {
19133
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19134
    }
19135
 
19136
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19137
    public boolean isSet(_Fields field) {
19138
      switch (field) {
553 chandransh 19139
      case USER_ID:
19140
        return isSetUserId();
19141
      case STATUS:
19142
        return isSetStatus();
48 ashish 19143
      }
19144
      throw new IllegalStateException();
19145
    }
19146
 
19147
    public boolean isSet(int fieldID) {
19148
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19149
    }
19150
 
19151
    @Override
19152
    public boolean equals(Object that) {
19153
      if (that == null)
19154
        return false;
553 chandransh 19155
      if (that instanceof getCartsForUser_args)
19156
        return this.equals((getCartsForUser_args)that);
48 ashish 19157
      return false;
19158
    }
19159
 
553 chandransh 19160
    public boolean equals(getCartsForUser_args that) {
48 ashish 19161
      if (that == null)
19162
        return false;
19163
 
553 chandransh 19164
      boolean this_present_userId = true;
19165
      boolean that_present_userId = true;
19166
      if (this_present_userId || that_present_userId) {
19167
        if (!(this_present_userId && that_present_userId))
48 ashish 19168
          return false;
553 chandransh 19169
        if (this.userId != that.userId)
48 ashish 19170
          return false;
19171
      }
19172
 
553 chandransh 19173
      boolean this_present_status = true && this.isSetStatus();
19174
      boolean that_present_status = true && that.isSetStatus();
19175
      if (this_present_status || that_present_status) {
19176
        if (!(this_present_status && that_present_status))
48 ashish 19177
          return false;
553 chandransh 19178
        if (!this.status.equals(that.status))
48 ashish 19179
          return false;
19180
      }
19181
 
19182
      return true;
19183
    }
19184
 
19185
    @Override
19186
    public int hashCode() {
19187
      return 0;
19188
    }
19189
 
553 chandransh 19190
    public int compareTo(getCartsForUser_args other) {
48 ashish 19191
      if (!getClass().equals(other.getClass())) {
19192
        return getClass().getName().compareTo(other.getClass().getName());
19193
      }
19194
 
19195
      int lastComparison = 0;
553 chandransh 19196
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 19197
 
553 chandransh 19198
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 19199
      if (lastComparison != 0) {
19200
        return lastComparison;
19201
      }
553 chandransh 19202
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 19203
      if (lastComparison != 0) {
19204
        return lastComparison;
19205
      }
553 chandransh 19206
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 19207
      if (lastComparison != 0) {
19208
        return lastComparison;
19209
      }
553 chandransh 19210
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 19211
      if (lastComparison != 0) {
19212
        return lastComparison;
19213
      }
19214
      return 0;
19215
    }
19216
 
19217
    public void read(TProtocol iprot) throws TException {
19218
      TField field;
19219
      iprot.readStructBegin();
19220
      while (true)
19221
      {
19222
        field = iprot.readFieldBegin();
19223
        if (field.type == TType.STOP) { 
19224
          break;
19225
        }
19226
        _Fields fieldId = _Fields.findByThriftId(field.id);
19227
        if (fieldId == null) {
19228
          TProtocolUtil.skip(iprot, field.type);
19229
        } else {
19230
          switch (fieldId) {
553 chandransh 19231
            case USER_ID:
48 ashish 19232
              if (field.type == TType.I64) {
553 chandransh 19233
                this.userId = iprot.readI64();
19234
                setUserIdIsSet(true);
48 ashish 19235
              } else { 
19236
                TProtocolUtil.skip(iprot, field.type);
19237
              }
19238
              break;
553 chandransh 19239
            case STATUS:
19240
              if (field.type == TType.I32) {
19241
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 19242
              } else { 
19243
                TProtocolUtil.skip(iprot, field.type);
19244
              }
19245
              break;
19246
          }
19247
          iprot.readFieldEnd();
19248
        }
19249
      }
19250
      iprot.readStructEnd();
19251
      validate();
19252
    }
19253
 
19254
    public void write(TProtocol oprot) throws TException {
19255
      validate();
19256
 
19257
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19258
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
19259
      oprot.writeI64(this.userId);
48 ashish 19260
      oprot.writeFieldEnd();
553 chandransh 19261
      if (this.status != null) {
19262
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19263
        oprot.writeI32(this.status.getValue());
48 ashish 19264
        oprot.writeFieldEnd();
19265
      }
19266
      oprot.writeFieldStop();
19267
      oprot.writeStructEnd();
19268
    }
19269
 
19270
    @Override
19271
    public String toString() {
553 chandransh 19272
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 19273
      boolean first = true;
19274
 
553 chandransh 19275
      sb.append("userId:");
19276
      sb.append(this.userId);
48 ashish 19277
      first = false;
19278
      if (!first) sb.append(", ");
553 chandransh 19279
      sb.append("status:");
19280
      if (this.status == null) {
48 ashish 19281
        sb.append("null");
19282
      } else {
553 chandransh 19283
        String status_name = status.name();
19284
        if (status_name != null) {
19285
          sb.append(status_name);
19286
          sb.append(" (");
19287
        }
19288
        sb.append(this.status);
19289
        if (status_name != null) {
19290
          sb.append(")");
19291
        }
48 ashish 19292
      }
19293
      first = false;
19294
      sb.append(")");
19295
      return sb.toString();
19296
    }
19297
 
19298
    public void validate() throws TException {
19299
      // check for required fields
19300
    }
19301
 
19302
  }
19303
 
553 chandransh 19304
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
19305
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 19306
 
553 chandransh 19307
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19308
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19309
 
553 chandransh 19310
    private List<Cart> success;
19311
    private ShoppingCartException scx;
48 ashish 19312
 
19313
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19314
    public enum _Fields implements TFieldIdEnum {
19315
      SUCCESS((short)0, "success"),
553 chandransh 19316
      SCX((short)1, "scx");
48 ashish 19317
 
19318
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19319
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19320
 
19321
      static {
19322
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19323
          byId.put((int)field._thriftId, field);
19324
          byName.put(field.getFieldName(), field);
19325
        }
19326
      }
19327
 
19328
      /**
19329
       * Find the _Fields constant that matches fieldId, or null if its not found.
19330
       */
19331
      public static _Fields findByThriftId(int fieldId) {
19332
        return byId.get(fieldId);
19333
      }
19334
 
19335
      /**
19336
       * Find the _Fields constant that matches fieldId, throwing an exception
19337
       * if it is not found.
19338
       */
19339
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19340
        _Fields fields = findByThriftId(fieldId);
19341
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19342
        return fields;
19343
      }
19344
 
19345
      /**
19346
       * Find the _Fields constant that matches name, or null if its not found.
19347
       */
19348
      public static _Fields findByName(String name) {
19349
        return byName.get(name);
19350
      }
19351
 
19352
      private final short _thriftId;
19353
      private final String _fieldName;
19354
 
19355
      _Fields(short thriftId, String fieldName) {
19356
        _thriftId = thriftId;
19357
        _fieldName = fieldName;
19358
      }
19359
 
19360
      public short getThriftFieldId() {
19361
        return _thriftId;
19362
      }
19363
 
19364
      public String getFieldName() {
19365
        return _fieldName;
19366
      }
19367
    }
19368
 
19369
    // isset id assignments
19370
 
19371
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19372
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 19373
          new ListMetaData(TType.LIST, 
19374
              new StructMetaData(TType.STRUCT, Cart.class))));
19375
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19376
          new FieldValueMetaData(TType.STRUCT)));
19377
    }});
19378
 
19379
    static {
553 chandransh 19380
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 19381
    }
19382
 
553 chandransh 19383
    public getCartsForUser_result() {
48 ashish 19384
    }
19385
 
553 chandransh 19386
    public getCartsForUser_result(
19387
      List<Cart> success,
19388
      ShoppingCartException scx)
48 ashish 19389
    {
19390
      this();
19391
      this.success = success;
553 chandransh 19392
      this.scx = scx;
48 ashish 19393
    }
19394
 
19395
    /**
19396
     * Performs a deep copy on <i>other</i>.
19397
     */
553 chandransh 19398
    public getCartsForUser_result(getCartsForUser_result other) {
19399
      if (other.isSetSuccess()) {
19400
        List<Cart> __this__success = new ArrayList<Cart>();
19401
        for (Cart other_element : other.success) {
19402
          __this__success.add(new Cart(other_element));
19403
        }
19404
        this.success = __this__success;
48 ashish 19405
      }
553 chandransh 19406
      if (other.isSetScx()) {
19407
        this.scx = new ShoppingCartException(other.scx);
19408
      }
48 ashish 19409
    }
19410
 
553 chandransh 19411
    public getCartsForUser_result deepCopy() {
19412
      return new getCartsForUser_result(this);
48 ashish 19413
    }
19414
 
19415
    @Deprecated
553 chandransh 19416
    public getCartsForUser_result clone() {
19417
      return new getCartsForUser_result(this);
48 ashish 19418
    }
19419
 
553 chandransh 19420
    public int getSuccessSize() {
19421
      return (this.success == null) ? 0 : this.success.size();
19422
    }
19423
 
19424
    public java.util.Iterator<Cart> getSuccessIterator() {
19425
      return (this.success == null) ? null : this.success.iterator();
19426
    }
19427
 
19428
    public void addToSuccess(Cart elem) {
19429
      if (this.success == null) {
19430
        this.success = new ArrayList<Cart>();
19431
      }
19432
      this.success.add(elem);
19433
    }
19434
 
19435
    public List<Cart> getSuccess() {
48 ashish 19436
      return this.success;
19437
    }
19438
 
553 chandransh 19439
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 19440
      this.success = success;
19441
      return this;
19442
    }
19443
 
19444
    public void unsetSuccess() {
553 chandransh 19445
      this.success = null;
48 ashish 19446
    }
19447
 
19448
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19449
    public boolean isSetSuccess() {
553 chandransh 19450
      return this.success != null;
48 ashish 19451
    }
19452
 
19453
    public void setSuccessIsSet(boolean value) {
553 chandransh 19454
      if (!value) {
19455
        this.success = null;
19456
      }
48 ashish 19457
    }
19458
 
553 chandransh 19459
    public ShoppingCartException getScx() {
19460
      return this.scx;
48 ashish 19461
    }
19462
 
553 chandransh 19463
    public getCartsForUser_result setScx(ShoppingCartException scx) {
19464
      this.scx = scx;
48 ashish 19465
      return this;
19466
    }
19467
 
553 chandransh 19468
    public void unsetScx() {
19469
      this.scx = null;
48 ashish 19470
    }
19471
 
553 chandransh 19472
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19473
    public boolean isSetScx() {
19474
      return this.scx != null;
48 ashish 19475
    }
19476
 
553 chandransh 19477
    public void setScxIsSet(boolean value) {
48 ashish 19478
      if (!value) {
553 chandransh 19479
        this.scx = null;
48 ashish 19480
      }
19481
    }
19482
 
19483
    public void setFieldValue(_Fields field, Object value) {
19484
      switch (field) {
19485
      case SUCCESS:
19486
        if (value == null) {
19487
          unsetSuccess();
19488
        } else {
553 chandransh 19489
          setSuccess((List<Cart>)value);
48 ashish 19490
        }
19491
        break;
19492
 
553 chandransh 19493
      case SCX:
48 ashish 19494
        if (value == null) {
553 chandransh 19495
          unsetScx();
48 ashish 19496
        } else {
553 chandransh 19497
          setScx((ShoppingCartException)value);
48 ashish 19498
        }
19499
        break;
19500
 
19501
      }
19502
    }
19503
 
19504
    public void setFieldValue(int fieldID, Object value) {
19505
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19506
    }
19507
 
19508
    public Object getFieldValue(_Fields field) {
19509
      switch (field) {
19510
      case SUCCESS:
553 chandransh 19511
        return getSuccess();
48 ashish 19512
 
553 chandransh 19513
      case SCX:
19514
        return getScx();
48 ashish 19515
 
19516
      }
19517
      throw new IllegalStateException();
19518
    }
19519
 
19520
    public Object getFieldValue(int fieldId) {
19521
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19522
    }
19523
 
19524
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19525
    public boolean isSet(_Fields field) {
19526
      switch (field) {
19527
      case SUCCESS:
19528
        return isSetSuccess();
553 chandransh 19529
      case SCX:
19530
        return isSetScx();
48 ashish 19531
      }
19532
      throw new IllegalStateException();
19533
    }
19534
 
19535
    public boolean isSet(int fieldID) {
19536
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19537
    }
19538
 
19539
    @Override
19540
    public boolean equals(Object that) {
19541
      if (that == null)
19542
        return false;
553 chandransh 19543
      if (that instanceof getCartsForUser_result)
19544
        return this.equals((getCartsForUser_result)that);
48 ashish 19545
      return false;
19546
    }
19547
 
553 chandransh 19548
    public boolean equals(getCartsForUser_result that) {
48 ashish 19549
      if (that == null)
19550
        return false;
19551
 
553 chandransh 19552
      boolean this_present_success = true && this.isSetSuccess();
19553
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 19554
      if (this_present_success || that_present_success) {
19555
        if (!(this_present_success && that_present_success))
19556
          return false;
553 chandransh 19557
        if (!this.success.equals(that.success))
48 ashish 19558
          return false;
19559
      }
19560
 
553 chandransh 19561
      boolean this_present_scx = true && this.isSetScx();
19562
      boolean that_present_scx = true && that.isSetScx();
19563
      if (this_present_scx || that_present_scx) {
19564
        if (!(this_present_scx && that_present_scx))
48 ashish 19565
          return false;
553 chandransh 19566
        if (!this.scx.equals(that.scx))
48 ashish 19567
          return false;
19568
      }
19569
 
19570
      return true;
19571
    }
19572
 
19573
    @Override
19574
    public int hashCode() {
19575
      return 0;
19576
    }
19577
 
553 chandransh 19578
    public int compareTo(getCartsForUser_result other) {
48 ashish 19579
      if (!getClass().equals(other.getClass())) {
19580
        return getClass().getName().compareTo(other.getClass().getName());
19581
      }
19582
 
19583
      int lastComparison = 0;
553 chandransh 19584
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 19585
 
19586
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19587
      if (lastComparison != 0) {
19588
        return lastComparison;
19589
      }
19590
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19591
      if (lastComparison != 0) {
19592
        return lastComparison;
19593
      }
553 chandransh 19594
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 19595
      if (lastComparison != 0) {
19596
        return lastComparison;
19597
      }
553 chandransh 19598
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 19599
      if (lastComparison != 0) {
19600
        return lastComparison;
19601
      }
19602
      return 0;
19603
    }
19604
 
19605
    public void read(TProtocol iprot) throws TException {
19606
      TField field;
19607
      iprot.readStructBegin();
19608
      while (true)
19609
      {
19610
        field = iprot.readFieldBegin();
19611
        if (field.type == TType.STOP) { 
19612
          break;
19613
        }
19614
        _Fields fieldId = _Fields.findByThriftId(field.id);
19615
        if (fieldId == null) {
19616
          TProtocolUtil.skip(iprot, field.type);
19617
        } else {
19618
          switch (fieldId) {
19619
            case SUCCESS:
553 chandransh 19620
              if (field.type == TType.LIST) {
19621
                {
771 rajveer 19622
                  TList _list20 = iprot.readListBegin();
19623
                  this.success = new ArrayList<Cart>(_list20.size);
19624
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
553 chandransh 19625
                  {
771 rajveer 19626
                    Cart _elem22;
19627
                    _elem22 = new Cart();
19628
                    _elem22.read(iprot);
19629
                    this.success.add(_elem22);
553 chandransh 19630
                  }
19631
                  iprot.readListEnd();
19632
                }
48 ashish 19633
              } else { 
19634
                TProtocolUtil.skip(iprot, field.type);
19635
              }
19636
              break;
553 chandransh 19637
            case SCX:
48 ashish 19638
              if (field.type == TType.STRUCT) {
553 chandransh 19639
                this.scx = new ShoppingCartException();
19640
                this.scx.read(iprot);
48 ashish 19641
              } else { 
19642
                TProtocolUtil.skip(iprot, field.type);
19643
              }
19644
              break;
19645
          }
19646
          iprot.readFieldEnd();
19647
        }
19648
      }
19649
      iprot.readStructEnd();
19650
      validate();
19651
    }
19652
 
19653
    public void write(TProtocol oprot) throws TException {
19654
      oprot.writeStructBegin(STRUCT_DESC);
19655
 
19656
      if (this.isSetSuccess()) {
19657
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 19658
        {
19659
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 19660
          for (Cart _iter23 : this.success)
553 chandransh 19661
          {
771 rajveer 19662
            _iter23.write(oprot);
553 chandransh 19663
          }
19664
          oprot.writeListEnd();
19665
        }
48 ashish 19666
        oprot.writeFieldEnd();
553 chandransh 19667
      } else if (this.isSetScx()) {
19668
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19669
        this.scx.write(oprot);
48 ashish 19670
        oprot.writeFieldEnd();
19671
      }
19672
      oprot.writeFieldStop();
19673
      oprot.writeStructEnd();
19674
    }
19675
 
19676
    @Override
19677
    public String toString() {
553 chandransh 19678
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 19679
      boolean first = true;
19680
 
19681
      sb.append("success:");
553 chandransh 19682
      if (this.success == null) {
19683
        sb.append("null");
19684
      } else {
19685
        sb.append(this.success);
19686
      }
48 ashish 19687
      first = false;
19688
      if (!first) sb.append(", ");
553 chandransh 19689
      sb.append("scx:");
19690
      if (this.scx == null) {
48 ashish 19691
        sb.append("null");
19692
      } else {
553 chandransh 19693
        sb.append(this.scx);
48 ashish 19694
      }
19695
      first = false;
19696
      sb.append(")");
19697
      return sb.toString();
19698
    }
19699
 
19700
    public void validate() throws TException {
19701
      // check for required fields
19702
    }
19703
 
19704
  }
19705
 
553 chandransh 19706
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
19707
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 19708
 
553 chandransh 19709
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 19710
 
553 chandransh 19711
    private CartStatus status;
48 ashish 19712
 
19713
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19714
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19715
      /**
19716
       * 
19717
       * @see CartStatus
19718
       */
19719
      STATUS((short)1, "status");
48 ashish 19720
 
19721
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19722
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19723
 
19724
      static {
19725
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19726
          byId.put((int)field._thriftId, field);
19727
          byName.put(field.getFieldName(), field);
19728
        }
19729
      }
19730
 
19731
      /**
19732
       * Find the _Fields constant that matches fieldId, or null if its not found.
19733
       */
19734
      public static _Fields findByThriftId(int fieldId) {
19735
        return byId.get(fieldId);
19736
      }
19737
 
19738
      /**
19739
       * Find the _Fields constant that matches fieldId, throwing an exception
19740
       * if it is not found.
19741
       */
19742
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19743
        _Fields fields = findByThriftId(fieldId);
19744
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19745
        return fields;
19746
      }
19747
 
19748
      /**
19749
       * Find the _Fields constant that matches name, or null if its not found.
19750
       */
19751
      public static _Fields findByName(String name) {
19752
        return byName.get(name);
19753
      }
19754
 
19755
      private final short _thriftId;
19756
      private final String _fieldName;
19757
 
19758
      _Fields(short thriftId, String fieldName) {
19759
        _thriftId = thriftId;
19760
        _fieldName = fieldName;
19761
      }
19762
 
19763
      public short getThriftFieldId() {
19764
        return _thriftId;
19765
      }
19766
 
19767
      public String getFieldName() {
19768
        return _fieldName;
19769
      }
19770
    }
19771
 
19772
    // isset id assignments
553 chandransh 19773
 
19774
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19775
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19776
          new EnumMetaData(TType.ENUM, CartStatus.class)));
19777
    }});
19778
 
19779
    static {
19780
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
19781
    }
19782
 
19783
    public getCartsByStatus_args() {
19784
    }
19785
 
19786
    public getCartsByStatus_args(
19787
      CartStatus status)
19788
    {
19789
      this();
19790
      this.status = status;
19791
    }
19792
 
19793
    /**
19794
     * Performs a deep copy on <i>other</i>.
19795
     */
19796
    public getCartsByStatus_args(getCartsByStatus_args other) {
19797
      if (other.isSetStatus()) {
19798
        this.status = other.status;
19799
      }
19800
    }
19801
 
19802
    public getCartsByStatus_args deepCopy() {
19803
      return new getCartsByStatus_args(this);
19804
    }
19805
 
19806
    @Deprecated
19807
    public getCartsByStatus_args clone() {
19808
      return new getCartsByStatus_args(this);
19809
    }
19810
 
19811
    /**
19812
     * 
19813
     * @see CartStatus
19814
     */
19815
    public CartStatus getStatus() {
19816
      return this.status;
19817
    }
19818
 
19819
    /**
19820
     * 
19821
     * @see CartStatus
19822
     */
19823
    public getCartsByStatus_args setStatus(CartStatus status) {
19824
      this.status = status;
19825
      return this;
19826
    }
19827
 
19828
    public void unsetStatus() {
19829
      this.status = null;
19830
    }
19831
 
19832
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19833
    public boolean isSetStatus() {
19834
      return this.status != null;
19835
    }
19836
 
19837
    public void setStatusIsSet(boolean value) {
19838
      if (!value) {
19839
        this.status = null;
19840
      }
19841
    }
19842
 
19843
    public void setFieldValue(_Fields field, Object value) {
19844
      switch (field) {
19845
      case STATUS:
19846
        if (value == null) {
19847
          unsetStatus();
19848
        } else {
19849
          setStatus((CartStatus)value);
19850
        }
19851
        break;
19852
 
19853
      }
19854
    }
19855
 
19856
    public void setFieldValue(int fieldID, Object value) {
19857
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19858
    }
19859
 
19860
    public Object getFieldValue(_Fields field) {
19861
      switch (field) {
19862
      case STATUS:
19863
        return getStatus();
19864
 
19865
      }
19866
      throw new IllegalStateException();
19867
    }
19868
 
19869
    public Object getFieldValue(int fieldId) {
19870
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19871
    }
19872
 
19873
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19874
    public boolean isSet(_Fields field) {
19875
      switch (field) {
19876
      case STATUS:
19877
        return isSetStatus();
19878
      }
19879
      throw new IllegalStateException();
19880
    }
19881
 
19882
    public boolean isSet(int fieldID) {
19883
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19884
    }
19885
 
19886
    @Override
19887
    public boolean equals(Object that) {
19888
      if (that == null)
19889
        return false;
19890
      if (that instanceof getCartsByStatus_args)
19891
        return this.equals((getCartsByStatus_args)that);
19892
      return false;
19893
    }
19894
 
19895
    public boolean equals(getCartsByStatus_args that) {
19896
      if (that == null)
19897
        return false;
19898
 
19899
      boolean this_present_status = true && this.isSetStatus();
19900
      boolean that_present_status = true && that.isSetStatus();
19901
      if (this_present_status || that_present_status) {
19902
        if (!(this_present_status && that_present_status))
19903
          return false;
19904
        if (!this.status.equals(that.status))
19905
          return false;
19906
      }
19907
 
19908
      return true;
19909
    }
19910
 
19911
    @Override
19912
    public int hashCode() {
19913
      return 0;
19914
    }
19915
 
19916
    public int compareTo(getCartsByStatus_args other) {
19917
      if (!getClass().equals(other.getClass())) {
19918
        return getClass().getName().compareTo(other.getClass().getName());
19919
      }
19920
 
19921
      int lastComparison = 0;
19922
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
19923
 
19924
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19925
      if (lastComparison != 0) {
19926
        return lastComparison;
19927
      }
19928
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19929
      if (lastComparison != 0) {
19930
        return lastComparison;
19931
      }
19932
      return 0;
19933
    }
19934
 
19935
    public void read(TProtocol iprot) throws TException {
19936
      TField field;
19937
      iprot.readStructBegin();
19938
      while (true)
19939
      {
19940
        field = iprot.readFieldBegin();
19941
        if (field.type == TType.STOP) { 
19942
          break;
19943
        }
19944
        _Fields fieldId = _Fields.findByThriftId(field.id);
19945
        if (fieldId == null) {
19946
          TProtocolUtil.skip(iprot, field.type);
19947
        } else {
19948
          switch (fieldId) {
19949
            case STATUS:
19950
              if (field.type == TType.I32) {
19951
                this.status = CartStatus.findByValue(iprot.readI32());
19952
              } else { 
19953
                TProtocolUtil.skip(iprot, field.type);
19954
              }
19955
              break;
19956
          }
19957
          iprot.readFieldEnd();
19958
        }
19959
      }
19960
      iprot.readStructEnd();
19961
      validate();
19962
    }
19963
 
19964
    public void write(TProtocol oprot) throws TException {
19965
      validate();
19966
 
19967
      oprot.writeStructBegin(STRUCT_DESC);
19968
      if (this.status != null) {
19969
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19970
        oprot.writeI32(this.status.getValue());
19971
        oprot.writeFieldEnd();
19972
      }
19973
      oprot.writeFieldStop();
19974
      oprot.writeStructEnd();
19975
    }
19976
 
19977
    @Override
19978
    public String toString() {
19979
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
19980
      boolean first = true;
19981
 
19982
      sb.append("status:");
19983
      if (this.status == null) {
19984
        sb.append("null");
19985
      } else {
19986
        String status_name = status.name();
19987
        if (status_name != null) {
19988
          sb.append(status_name);
19989
          sb.append(" (");
19990
        }
19991
        sb.append(this.status);
19992
        if (status_name != null) {
19993
          sb.append(")");
19994
        }
19995
      }
19996
      first = false;
19997
      sb.append(")");
19998
      return sb.toString();
19999
    }
20000
 
20001
    public void validate() throws TException {
20002
      // check for required fields
20003
    }
20004
 
20005
  }
20006
 
20007
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
20008
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
20009
 
20010
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20011
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20012
 
20013
    private List<Cart> success;
20014
    private ShoppingCartException scx;
20015
 
20016
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20017
    public enum _Fields implements TFieldIdEnum {
20018
      SUCCESS((short)0, "success"),
20019
      SCX((short)1, "scx");
20020
 
20021
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20022
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20023
 
20024
      static {
20025
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20026
          byId.put((int)field._thriftId, field);
20027
          byName.put(field.getFieldName(), field);
20028
        }
20029
      }
20030
 
20031
      /**
20032
       * Find the _Fields constant that matches fieldId, or null if its not found.
20033
       */
20034
      public static _Fields findByThriftId(int fieldId) {
20035
        return byId.get(fieldId);
20036
      }
20037
 
20038
      /**
20039
       * Find the _Fields constant that matches fieldId, throwing an exception
20040
       * if it is not found.
20041
       */
20042
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20043
        _Fields fields = findByThriftId(fieldId);
20044
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20045
        return fields;
20046
      }
20047
 
20048
      /**
20049
       * Find the _Fields constant that matches name, or null if its not found.
20050
       */
20051
      public static _Fields findByName(String name) {
20052
        return byName.get(name);
20053
      }
20054
 
20055
      private final short _thriftId;
20056
      private final String _fieldName;
20057
 
20058
      _Fields(short thriftId, String fieldName) {
20059
        _thriftId = thriftId;
20060
        _fieldName = fieldName;
20061
      }
20062
 
20063
      public short getThriftFieldId() {
20064
        return _thriftId;
20065
      }
20066
 
20067
      public String getFieldName() {
20068
        return _fieldName;
20069
      }
20070
    }
20071
 
20072
    // isset id assignments
20073
 
20074
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20075
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20076
          new ListMetaData(TType.LIST, 
20077
              new StructMetaData(TType.STRUCT, Cart.class))));
20078
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20079
          new FieldValueMetaData(TType.STRUCT)));
20080
    }});
20081
 
20082
    static {
20083
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
20084
    }
20085
 
20086
    public getCartsByStatus_result() {
20087
    }
20088
 
20089
    public getCartsByStatus_result(
20090
      List<Cart> success,
20091
      ShoppingCartException scx)
20092
    {
20093
      this();
20094
      this.success = success;
20095
      this.scx = scx;
20096
    }
20097
 
20098
    /**
20099
     * Performs a deep copy on <i>other</i>.
20100
     */
20101
    public getCartsByStatus_result(getCartsByStatus_result other) {
20102
      if (other.isSetSuccess()) {
20103
        List<Cart> __this__success = new ArrayList<Cart>();
20104
        for (Cart other_element : other.success) {
20105
          __this__success.add(new Cart(other_element));
20106
        }
20107
        this.success = __this__success;
20108
      }
20109
      if (other.isSetScx()) {
20110
        this.scx = new ShoppingCartException(other.scx);
20111
      }
20112
    }
20113
 
20114
    public getCartsByStatus_result deepCopy() {
20115
      return new getCartsByStatus_result(this);
20116
    }
20117
 
20118
    @Deprecated
20119
    public getCartsByStatus_result clone() {
20120
      return new getCartsByStatus_result(this);
20121
    }
20122
 
20123
    public int getSuccessSize() {
20124
      return (this.success == null) ? 0 : this.success.size();
20125
    }
20126
 
20127
    public java.util.Iterator<Cart> getSuccessIterator() {
20128
      return (this.success == null) ? null : this.success.iterator();
20129
    }
20130
 
20131
    public void addToSuccess(Cart elem) {
20132
      if (this.success == null) {
20133
        this.success = new ArrayList<Cart>();
20134
      }
20135
      this.success.add(elem);
20136
    }
20137
 
20138
    public List<Cart> getSuccess() {
20139
      return this.success;
20140
    }
20141
 
20142
    public getCartsByStatus_result setSuccess(List<Cart> success) {
20143
      this.success = success;
20144
      return this;
20145
    }
20146
 
20147
    public void unsetSuccess() {
20148
      this.success = null;
20149
    }
20150
 
20151
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20152
    public boolean isSetSuccess() {
20153
      return this.success != null;
20154
    }
20155
 
20156
    public void setSuccessIsSet(boolean value) {
20157
      if (!value) {
20158
        this.success = null;
20159
      }
20160
    }
20161
 
20162
    public ShoppingCartException getScx() {
20163
      return this.scx;
20164
    }
20165
 
20166
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
20167
      this.scx = scx;
20168
      return this;
20169
    }
20170
 
20171
    public void unsetScx() {
20172
      this.scx = null;
20173
    }
20174
 
20175
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20176
    public boolean isSetScx() {
20177
      return this.scx != null;
20178
    }
20179
 
20180
    public void setScxIsSet(boolean value) {
20181
      if (!value) {
20182
        this.scx = null;
20183
      }
20184
    }
20185
 
20186
    public void setFieldValue(_Fields field, Object value) {
20187
      switch (field) {
20188
      case SUCCESS:
20189
        if (value == null) {
20190
          unsetSuccess();
20191
        } else {
20192
          setSuccess((List<Cart>)value);
20193
        }
20194
        break;
20195
 
20196
      case SCX:
20197
        if (value == null) {
20198
          unsetScx();
20199
        } else {
20200
          setScx((ShoppingCartException)value);
20201
        }
20202
        break;
20203
 
20204
      }
20205
    }
20206
 
20207
    public void setFieldValue(int fieldID, Object value) {
20208
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20209
    }
20210
 
20211
    public Object getFieldValue(_Fields field) {
20212
      switch (field) {
20213
      case SUCCESS:
20214
        return getSuccess();
20215
 
20216
      case SCX:
20217
        return getScx();
20218
 
20219
      }
20220
      throw new IllegalStateException();
20221
    }
20222
 
20223
    public Object getFieldValue(int fieldId) {
20224
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20225
    }
20226
 
20227
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20228
    public boolean isSet(_Fields field) {
20229
      switch (field) {
20230
      case SUCCESS:
20231
        return isSetSuccess();
20232
      case SCX:
20233
        return isSetScx();
20234
      }
20235
      throw new IllegalStateException();
20236
    }
20237
 
20238
    public boolean isSet(int fieldID) {
20239
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20240
    }
20241
 
20242
    @Override
20243
    public boolean equals(Object that) {
20244
      if (that == null)
20245
        return false;
20246
      if (that instanceof getCartsByStatus_result)
20247
        return this.equals((getCartsByStatus_result)that);
20248
      return false;
20249
    }
20250
 
20251
    public boolean equals(getCartsByStatus_result that) {
20252
      if (that == null)
20253
        return false;
20254
 
20255
      boolean this_present_success = true && this.isSetSuccess();
20256
      boolean that_present_success = true && that.isSetSuccess();
20257
      if (this_present_success || that_present_success) {
20258
        if (!(this_present_success && that_present_success))
20259
          return false;
20260
        if (!this.success.equals(that.success))
20261
          return false;
20262
      }
20263
 
20264
      boolean this_present_scx = true && this.isSetScx();
20265
      boolean that_present_scx = true && that.isSetScx();
20266
      if (this_present_scx || that_present_scx) {
20267
        if (!(this_present_scx && that_present_scx))
20268
          return false;
20269
        if (!this.scx.equals(that.scx))
20270
          return false;
20271
      }
20272
 
20273
      return true;
20274
    }
20275
 
20276
    @Override
20277
    public int hashCode() {
20278
      return 0;
20279
    }
20280
 
20281
    public int compareTo(getCartsByStatus_result other) {
20282
      if (!getClass().equals(other.getClass())) {
20283
        return getClass().getName().compareTo(other.getClass().getName());
20284
      }
20285
 
20286
      int lastComparison = 0;
20287
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
20288
 
20289
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20290
      if (lastComparison != 0) {
20291
        return lastComparison;
20292
      }
20293
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20294
      if (lastComparison != 0) {
20295
        return lastComparison;
20296
      }
20297
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20298
      if (lastComparison != 0) {
20299
        return lastComparison;
20300
      }
20301
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20302
      if (lastComparison != 0) {
20303
        return lastComparison;
20304
      }
20305
      return 0;
20306
    }
20307
 
20308
    public void read(TProtocol iprot) throws TException {
20309
      TField field;
20310
      iprot.readStructBegin();
20311
      while (true)
20312
      {
20313
        field = iprot.readFieldBegin();
20314
        if (field.type == TType.STOP) { 
20315
          break;
20316
        }
20317
        _Fields fieldId = _Fields.findByThriftId(field.id);
20318
        if (fieldId == null) {
20319
          TProtocolUtil.skip(iprot, field.type);
20320
        } else {
20321
          switch (fieldId) {
20322
            case SUCCESS:
20323
              if (field.type == TType.LIST) {
20324
                {
771 rajveer 20325
                  TList _list24 = iprot.readListBegin();
20326
                  this.success = new ArrayList<Cart>(_list24.size);
20327
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
553 chandransh 20328
                  {
771 rajveer 20329
                    Cart _elem26;
20330
                    _elem26 = new Cart();
20331
                    _elem26.read(iprot);
20332
                    this.success.add(_elem26);
553 chandransh 20333
                  }
20334
                  iprot.readListEnd();
20335
                }
20336
              } else { 
20337
                TProtocolUtil.skip(iprot, field.type);
20338
              }
20339
              break;
20340
            case SCX:
20341
              if (field.type == TType.STRUCT) {
20342
                this.scx = new ShoppingCartException();
20343
                this.scx.read(iprot);
20344
              } else { 
20345
                TProtocolUtil.skip(iprot, field.type);
20346
              }
20347
              break;
20348
          }
20349
          iprot.readFieldEnd();
20350
        }
20351
      }
20352
      iprot.readStructEnd();
20353
      validate();
20354
    }
20355
 
20356
    public void write(TProtocol oprot) throws TException {
20357
      oprot.writeStructBegin(STRUCT_DESC);
20358
 
20359
      if (this.isSetSuccess()) {
20360
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20361
        {
20362
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 20363
          for (Cart _iter27 : this.success)
553 chandransh 20364
          {
771 rajveer 20365
            _iter27.write(oprot);
553 chandransh 20366
          }
20367
          oprot.writeListEnd();
20368
        }
20369
        oprot.writeFieldEnd();
20370
      } else if (this.isSetScx()) {
20371
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20372
        this.scx.write(oprot);
20373
        oprot.writeFieldEnd();
20374
      }
20375
      oprot.writeFieldStop();
20376
      oprot.writeStructEnd();
20377
    }
20378
 
20379
    @Override
20380
    public String toString() {
20381
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
20382
      boolean first = true;
20383
 
20384
      sb.append("success:");
20385
      if (this.success == null) {
20386
        sb.append("null");
20387
      } else {
20388
        sb.append(this.success);
20389
      }
20390
      first = false;
20391
      if (!first) sb.append(", ");
20392
      sb.append("scx:");
20393
      if (this.scx == null) {
20394
        sb.append("null");
20395
      } else {
20396
        sb.append(this.scx);
20397
      }
20398
      first = false;
20399
      sb.append(")");
20400
      return sb.toString();
20401
    }
20402
 
20403
    public void validate() throws TException {
20404
      // check for required fields
20405
    }
20406
 
20407
  }
20408
 
20409
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
20410
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
20411
 
20412
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
20413
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
20414
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
20415
 
20416
    private long from_time;
20417
    private long to_time;
20418
    private CartStatus status;
20419
 
20420
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20421
    public enum _Fields implements TFieldIdEnum {
20422
      FROM_TIME((short)1, "from_time"),
20423
      TO_TIME((short)2, "to_time"),
20424
      /**
20425
       * 
20426
       * @see CartStatus
20427
       */
20428
      STATUS((short)3, "status");
20429
 
20430
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20431
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20432
 
20433
      static {
20434
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20435
          byId.put((int)field._thriftId, field);
20436
          byName.put(field.getFieldName(), field);
20437
        }
20438
      }
20439
 
20440
      /**
20441
       * Find the _Fields constant that matches fieldId, or null if its not found.
20442
       */
20443
      public static _Fields findByThriftId(int fieldId) {
20444
        return byId.get(fieldId);
20445
      }
20446
 
20447
      /**
20448
       * Find the _Fields constant that matches fieldId, throwing an exception
20449
       * if it is not found.
20450
       */
20451
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20452
        _Fields fields = findByThriftId(fieldId);
20453
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20454
        return fields;
20455
      }
20456
 
20457
      /**
20458
       * Find the _Fields constant that matches name, or null if its not found.
20459
       */
20460
      public static _Fields findByName(String name) {
20461
        return byName.get(name);
20462
      }
20463
 
20464
      private final short _thriftId;
20465
      private final String _fieldName;
20466
 
20467
      _Fields(short thriftId, String fieldName) {
20468
        _thriftId = thriftId;
20469
        _fieldName = fieldName;
20470
      }
20471
 
20472
      public short getThriftFieldId() {
20473
        return _thriftId;
20474
      }
20475
 
20476
      public String getFieldName() {
20477
        return _fieldName;
20478
      }
20479
    }
20480
 
20481
    // isset id assignments
20482
    private static final int __FROM_TIME_ISSET_ID = 0;
20483
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 20484
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 20485
 
20486
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20487
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 20488
          new FieldValueMetaData(TType.I64)));
553 chandransh 20489
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
20490
          new FieldValueMetaData(TType.I64)));
20491
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
20492
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 20493
    }});
20494
 
20495
    static {
553 chandransh 20496
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 20497
    }
20498
 
553 chandransh 20499
    public getCartsByTime_args() {
48 ashish 20500
    }
20501
 
553 chandransh 20502
    public getCartsByTime_args(
20503
      long from_time,
20504
      long to_time,
20505
      CartStatus status)
48 ashish 20506
    {
20507
      this();
553 chandransh 20508
      this.from_time = from_time;
20509
      setFrom_timeIsSet(true);
20510
      this.to_time = to_time;
20511
      setTo_timeIsSet(true);
20512
      this.status = status;
48 ashish 20513
    }
20514
 
20515
    /**
20516
     * Performs a deep copy on <i>other</i>.
20517
     */
553 chandransh 20518
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 20519
      __isset_bit_vector.clear();
20520
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20521
      this.from_time = other.from_time;
20522
      this.to_time = other.to_time;
20523
      if (other.isSetStatus()) {
20524
        this.status = other.status;
20525
      }
48 ashish 20526
    }
20527
 
553 chandransh 20528
    public getCartsByTime_args deepCopy() {
20529
      return new getCartsByTime_args(this);
48 ashish 20530
    }
20531
 
20532
    @Deprecated
553 chandransh 20533
    public getCartsByTime_args clone() {
20534
      return new getCartsByTime_args(this);
48 ashish 20535
    }
20536
 
553 chandransh 20537
    public long getFrom_time() {
20538
      return this.from_time;
48 ashish 20539
    }
20540
 
553 chandransh 20541
    public getCartsByTime_args setFrom_time(long from_time) {
20542
      this.from_time = from_time;
20543
      setFrom_timeIsSet(true);
48 ashish 20544
      return this;
20545
    }
20546
 
553 chandransh 20547
    public void unsetFrom_time() {
20548
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 20549
    }
20550
 
553 chandransh 20551
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
20552
    public boolean isSetFrom_time() {
20553
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 20554
    }
20555
 
553 chandransh 20556
    public void setFrom_timeIsSet(boolean value) {
20557
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 20558
    }
20559
 
553 chandransh 20560
    public long getTo_time() {
20561
      return this.to_time;
123 ashish 20562
    }
20563
 
553 chandransh 20564
    public getCartsByTime_args setTo_time(long to_time) {
20565
      this.to_time = to_time;
20566
      setTo_timeIsSet(true);
123 ashish 20567
      return this;
20568
    }
20569
 
553 chandransh 20570
    public void unsetTo_time() {
20571
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 20572
    }
20573
 
553 chandransh 20574
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
20575
    public boolean isSetTo_time() {
20576
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 20577
    }
20578
 
553 chandransh 20579
    public void setTo_timeIsSet(boolean value) {
20580
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 20581
    }
20582
 
553 chandransh 20583
    /**
20584
     * 
20585
     * @see CartStatus
20586
     */
20587
    public CartStatus getStatus() {
20588
      return this.status;
20589
    }
20590
 
20591
    /**
20592
     * 
20593
     * @see CartStatus
20594
     */
20595
    public getCartsByTime_args setStatus(CartStatus status) {
20596
      this.status = status;
20597
      return this;
20598
    }
20599
 
20600
    public void unsetStatus() {
20601
      this.status = null;
20602
    }
20603
 
20604
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
20605
    public boolean isSetStatus() {
20606
      return this.status != null;
20607
    }
20608
 
20609
    public void setStatusIsSet(boolean value) {
20610
      if (!value) {
20611
        this.status = null;
20612
      }
20613
    }
20614
 
48 ashish 20615
    public void setFieldValue(_Fields field, Object value) {
20616
      switch (field) {
553 chandransh 20617
      case FROM_TIME:
48 ashish 20618
        if (value == null) {
553 chandransh 20619
          unsetFrom_time();
48 ashish 20620
        } else {
553 chandransh 20621
          setFrom_time((Long)value);
48 ashish 20622
        }
20623
        break;
20624
 
553 chandransh 20625
      case TO_TIME:
123 ashish 20626
        if (value == null) {
553 chandransh 20627
          unsetTo_time();
123 ashish 20628
        } else {
553 chandransh 20629
          setTo_time((Long)value);
123 ashish 20630
        }
20631
        break;
20632
 
553 chandransh 20633
      case STATUS:
20634
        if (value == null) {
20635
          unsetStatus();
20636
        } else {
20637
          setStatus((CartStatus)value);
20638
        }
20639
        break;
20640
 
48 ashish 20641
      }
20642
    }
20643
 
20644
    public void setFieldValue(int fieldID, Object value) {
20645
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20646
    }
20647
 
20648
    public Object getFieldValue(_Fields field) {
20649
      switch (field) {
553 chandransh 20650
      case FROM_TIME:
20651
        return new Long(getFrom_time());
48 ashish 20652
 
553 chandransh 20653
      case TO_TIME:
20654
        return new Long(getTo_time());
123 ashish 20655
 
553 chandransh 20656
      case STATUS:
20657
        return getStatus();
20658
 
48 ashish 20659
      }
20660
      throw new IllegalStateException();
20661
    }
20662
 
20663
    public Object getFieldValue(int fieldId) {
20664
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20665
    }
20666
 
20667
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20668
    public boolean isSet(_Fields field) {
20669
      switch (field) {
553 chandransh 20670
      case FROM_TIME:
20671
        return isSetFrom_time();
20672
      case TO_TIME:
20673
        return isSetTo_time();
20674
      case STATUS:
20675
        return isSetStatus();
48 ashish 20676
      }
20677
      throw new IllegalStateException();
20678
    }
20679
 
20680
    public boolean isSet(int fieldID) {
20681
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20682
    }
20683
 
20684
    @Override
20685
    public boolean equals(Object that) {
20686
      if (that == null)
20687
        return false;
553 chandransh 20688
      if (that instanceof getCartsByTime_args)
20689
        return this.equals((getCartsByTime_args)that);
48 ashish 20690
      return false;
20691
    }
20692
 
553 chandransh 20693
    public boolean equals(getCartsByTime_args that) {
48 ashish 20694
      if (that == null)
20695
        return false;
20696
 
553 chandransh 20697
      boolean this_present_from_time = true;
20698
      boolean that_present_from_time = true;
20699
      if (this_present_from_time || that_present_from_time) {
20700
        if (!(this_present_from_time && that_present_from_time))
48 ashish 20701
          return false;
553 chandransh 20702
        if (this.from_time != that.from_time)
48 ashish 20703
          return false;
20704
      }
20705
 
553 chandransh 20706
      boolean this_present_to_time = true;
20707
      boolean that_present_to_time = true;
20708
      if (this_present_to_time || that_present_to_time) {
20709
        if (!(this_present_to_time && that_present_to_time))
123 ashish 20710
          return false;
553 chandransh 20711
        if (this.to_time != that.to_time)
123 ashish 20712
          return false;
20713
      }
20714
 
553 chandransh 20715
      boolean this_present_status = true && this.isSetStatus();
20716
      boolean that_present_status = true && that.isSetStatus();
20717
      if (this_present_status || that_present_status) {
20718
        if (!(this_present_status && that_present_status))
20719
          return false;
20720
        if (!this.status.equals(that.status))
20721
          return false;
20722
      }
20723
 
48 ashish 20724
      return true;
20725
    }
20726
 
20727
    @Override
20728
    public int hashCode() {
20729
      return 0;
20730
    }
20731
 
553 chandransh 20732
    public int compareTo(getCartsByTime_args other) {
48 ashish 20733
      if (!getClass().equals(other.getClass())) {
20734
        return getClass().getName().compareTo(other.getClass().getName());
20735
      }
20736
 
20737
      int lastComparison = 0;
553 chandransh 20738
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 20739
 
553 chandransh 20740
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 20741
      if (lastComparison != 0) {
20742
        return lastComparison;
20743
      }
553 chandransh 20744
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 20745
      if (lastComparison != 0) {
20746
        return lastComparison;
20747
      }
553 chandransh 20748
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 20749
      if (lastComparison != 0) {
20750
        return lastComparison;
20751
      }
553 chandransh 20752
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 20753
      if (lastComparison != 0) {
20754
        return lastComparison;
20755
      }
553 chandransh 20756
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
20757
      if (lastComparison != 0) {
20758
        return lastComparison;
20759
      }
20760
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
20761
      if (lastComparison != 0) {
20762
        return lastComparison;
20763
      }
48 ashish 20764
      return 0;
20765
    }
20766
 
20767
    public void read(TProtocol iprot) throws TException {
20768
      TField field;
20769
      iprot.readStructBegin();
20770
      while (true)
20771
      {
20772
        field = iprot.readFieldBegin();
20773
        if (field.type == TType.STOP) { 
20774
          break;
20775
        }
20776
        _Fields fieldId = _Fields.findByThriftId(field.id);
20777
        if (fieldId == null) {
20778
          TProtocolUtil.skip(iprot, field.type);
20779
        } else {
20780
          switch (fieldId) {
553 chandransh 20781
            case FROM_TIME:
48 ashish 20782
              if (field.type == TType.I64) {
553 chandransh 20783
                this.from_time = iprot.readI64();
20784
                setFrom_timeIsSet(true);
48 ashish 20785
              } else { 
20786
                TProtocolUtil.skip(iprot, field.type);
20787
              }
20788
              break;
553 chandransh 20789
            case TO_TIME:
20790
              if (field.type == TType.I64) {
20791
                this.to_time = iprot.readI64();
20792
                setTo_timeIsSet(true);
123 ashish 20793
              } else { 
20794
                TProtocolUtil.skip(iprot, field.type);
20795
              }
20796
              break;
553 chandransh 20797
            case STATUS:
20798
              if (field.type == TType.I32) {
20799
                this.status = CartStatus.findByValue(iprot.readI32());
20800
              } else { 
20801
                TProtocolUtil.skip(iprot, field.type);
20802
              }
20803
              break;
48 ashish 20804
          }
20805
          iprot.readFieldEnd();
20806
        }
20807
      }
20808
      iprot.readStructEnd();
20809
      validate();
20810
    }
20811
 
20812
    public void write(TProtocol oprot) throws TException {
20813
      validate();
20814
 
20815
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 20816
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
20817
      oprot.writeI64(this.from_time);
48 ashish 20818
      oprot.writeFieldEnd();
553 chandransh 20819
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
20820
      oprot.writeI64(this.to_time);
123 ashish 20821
      oprot.writeFieldEnd();
553 chandransh 20822
      if (this.status != null) {
20823
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
20824
        oprot.writeI32(this.status.getValue());
20825
        oprot.writeFieldEnd();
20826
      }
48 ashish 20827
      oprot.writeFieldStop();
20828
      oprot.writeStructEnd();
20829
    }
20830
 
20831
    @Override
20832
    public String toString() {
553 chandransh 20833
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 20834
      boolean first = true;
20835
 
553 chandransh 20836
      sb.append("from_time:");
20837
      sb.append(this.from_time);
48 ashish 20838
      first = false;
123 ashish 20839
      if (!first) sb.append(", ");
553 chandransh 20840
      sb.append("to_time:");
20841
      sb.append(this.to_time);
123 ashish 20842
      first = false;
553 chandransh 20843
      if (!first) sb.append(", ");
20844
      sb.append("status:");
20845
      if (this.status == null) {
20846
        sb.append("null");
20847
      } else {
20848
        String status_name = status.name();
20849
        if (status_name != null) {
20850
          sb.append(status_name);
20851
          sb.append(" (");
20852
        }
20853
        sb.append(this.status);
20854
        if (status_name != null) {
20855
          sb.append(")");
20856
        }
20857
      }
20858
      first = false;
48 ashish 20859
      sb.append(")");
20860
      return sb.toString();
20861
    }
20862
 
20863
    public void validate() throws TException {
20864
      // check for required fields
20865
    }
20866
 
20867
  }
20868
 
553 chandransh 20869
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
20870
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 20871
 
553 chandransh 20872
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20873
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20874
 
553 chandransh 20875
    private List<Cart> success;
20876
    private ShoppingCartException scx;
48 ashish 20877
 
20878
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20879
    public enum _Fields implements TFieldIdEnum {
20880
      SUCCESS((short)0, "success"),
553 chandransh 20881
      SCX((short)1, "scx");
48 ashish 20882
 
20883
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20884
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20885
 
20886
      static {
20887
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20888
          byId.put((int)field._thriftId, field);
20889
          byName.put(field.getFieldName(), field);
20890
        }
20891
      }
20892
 
20893
      /**
20894
       * Find the _Fields constant that matches fieldId, or null if its not found.
20895
       */
20896
      public static _Fields findByThriftId(int fieldId) {
20897
        return byId.get(fieldId);
20898
      }
20899
 
20900
      /**
20901
       * Find the _Fields constant that matches fieldId, throwing an exception
20902
       * if it is not found.
20903
       */
20904
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20905
        _Fields fields = findByThriftId(fieldId);
20906
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20907
        return fields;
20908
      }
20909
 
20910
      /**
20911
       * Find the _Fields constant that matches name, or null if its not found.
20912
       */
20913
      public static _Fields findByName(String name) {
20914
        return byName.get(name);
20915
      }
20916
 
20917
      private final short _thriftId;
20918
      private final String _fieldName;
20919
 
20920
      _Fields(short thriftId, String fieldName) {
20921
        _thriftId = thriftId;
20922
        _fieldName = fieldName;
20923
      }
20924
 
20925
      public short getThriftFieldId() {
20926
        return _thriftId;
20927
      }
20928
 
20929
      public String getFieldName() {
20930
        return _fieldName;
20931
      }
20932
    }
20933
 
20934
    // isset id assignments
20935
 
20936
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20937
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 20938
          new ListMetaData(TType.LIST, 
20939
              new StructMetaData(TType.STRUCT, Cart.class))));
20940
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 20941
          new FieldValueMetaData(TType.STRUCT)));
20942
    }});
20943
 
20944
    static {
553 chandransh 20945
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 20946
    }
20947
 
553 chandransh 20948
    public getCartsByTime_result() {
48 ashish 20949
    }
20950
 
553 chandransh 20951
    public getCartsByTime_result(
20952
      List<Cart> success,
20953
      ShoppingCartException scx)
48 ashish 20954
    {
20955
      this();
20956
      this.success = success;
553 chandransh 20957
      this.scx = scx;
48 ashish 20958
    }
20959
 
20960
    /**
20961
     * Performs a deep copy on <i>other</i>.
20962
     */
553 chandransh 20963
    public getCartsByTime_result(getCartsByTime_result other) {
20964
      if (other.isSetSuccess()) {
20965
        List<Cart> __this__success = new ArrayList<Cart>();
20966
        for (Cart other_element : other.success) {
20967
          __this__success.add(new Cart(other_element));
20968
        }
20969
        this.success = __this__success;
48 ashish 20970
      }
553 chandransh 20971
      if (other.isSetScx()) {
20972
        this.scx = new ShoppingCartException(other.scx);
20973
      }
48 ashish 20974
    }
20975
 
553 chandransh 20976
    public getCartsByTime_result deepCopy() {
20977
      return new getCartsByTime_result(this);
48 ashish 20978
    }
20979
 
20980
    @Deprecated
553 chandransh 20981
    public getCartsByTime_result clone() {
20982
      return new getCartsByTime_result(this);
48 ashish 20983
    }
20984
 
553 chandransh 20985
    public int getSuccessSize() {
20986
      return (this.success == null) ? 0 : this.success.size();
20987
    }
20988
 
20989
    public java.util.Iterator<Cart> getSuccessIterator() {
20990
      return (this.success == null) ? null : this.success.iterator();
20991
    }
20992
 
20993
    public void addToSuccess(Cart elem) {
20994
      if (this.success == null) {
20995
        this.success = new ArrayList<Cart>();
20996
      }
20997
      this.success.add(elem);
20998
    }
20999
 
21000
    public List<Cart> getSuccess() {
48 ashish 21001
      return this.success;
21002
    }
21003
 
553 chandransh 21004
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 21005
      this.success = success;
21006
      return this;
21007
    }
21008
 
21009
    public void unsetSuccess() {
553 chandransh 21010
      this.success = null;
48 ashish 21011
    }
21012
 
21013
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21014
    public boolean isSetSuccess() {
553 chandransh 21015
      return this.success != null;
48 ashish 21016
    }
21017
 
21018
    public void setSuccessIsSet(boolean value) {
553 chandransh 21019
      if (!value) {
21020
        this.success = null;
21021
      }
48 ashish 21022
    }
21023
 
553 chandransh 21024
    public ShoppingCartException getScx() {
21025
      return this.scx;
48 ashish 21026
    }
21027
 
553 chandransh 21028
    public getCartsByTime_result setScx(ShoppingCartException scx) {
21029
      this.scx = scx;
48 ashish 21030
      return this;
21031
    }
21032
 
553 chandransh 21033
    public void unsetScx() {
21034
      this.scx = null;
48 ashish 21035
    }
21036
 
553 chandransh 21037
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21038
    public boolean isSetScx() {
21039
      return this.scx != null;
48 ashish 21040
    }
21041
 
553 chandransh 21042
    public void setScxIsSet(boolean value) {
48 ashish 21043
      if (!value) {
553 chandransh 21044
        this.scx = null;
48 ashish 21045
      }
21046
    }
21047
 
21048
    public void setFieldValue(_Fields field, Object value) {
21049
      switch (field) {
21050
      case SUCCESS:
21051
        if (value == null) {
21052
          unsetSuccess();
21053
        } else {
553 chandransh 21054
          setSuccess((List<Cart>)value);
48 ashish 21055
        }
21056
        break;
21057
 
553 chandransh 21058
      case SCX:
48 ashish 21059
        if (value == null) {
553 chandransh 21060
          unsetScx();
48 ashish 21061
        } else {
553 chandransh 21062
          setScx((ShoppingCartException)value);
48 ashish 21063
        }
21064
        break;
21065
 
21066
      }
21067
    }
21068
 
21069
    public void setFieldValue(int fieldID, Object value) {
21070
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21071
    }
21072
 
21073
    public Object getFieldValue(_Fields field) {
21074
      switch (field) {
21075
      case SUCCESS:
553 chandransh 21076
        return getSuccess();
48 ashish 21077
 
553 chandransh 21078
      case SCX:
21079
        return getScx();
48 ashish 21080
 
21081
      }
21082
      throw new IllegalStateException();
21083
    }
21084
 
21085
    public Object getFieldValue(int fieldId) {
21086
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21087
    }
21088
 
21089
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21090
    public boolean isSet(_Fields field) {
21091
      switch (field) {
21092
      case SUCCESS:
21093
        return isSetSuccess();
553 chandransh 21094
      case SCX:
21095
        return isSetScx();
48 ashish 21096
      }
21097
      throw new IllegalStateException();
21098
    }
21099
 
21100
    public boolean isSet(int fieldID) {
21101
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21102
    }
21103
 
21104
    @Override
21105
    public boolean equals(Object that) {
21106
      if (that == null)
21107
        return false;
553 chandransh 21108
      if (that instanceof getCartsByTime_result)
21109
        return this.equals((getCartsByTime_result)that);
48 ashish 21110
      return false;
21111
    }
21112
 
553 chandransh 21113
    public boolean equals(getCartsByTime_result that) {
48 ashish 21114
      if (that == null)
21115
        return false;
21116
 
553 chandransh 21117
      boolean this_present_success = true && this.isSetSuccess();
21118
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 21119
      if (this_present_success || that_present_success) {
21120
        if (!(this_present_success && that_present_success))
21121
          return false;
553 chandransh 21122
        if (!this.success.equals(that.success))
48 ashish 21123
          return false;
21124
      }
21125
 
553 chandransh 21126
      boolean this_present_scx = true && this.isSetScx();
21127
      boolean that_present_scx = true && that.isSetScx();
21128
      if (this_present_scx || that_present_scx) {
21129
        if (!(this_present_scx && that_present_scx))
48 ashish 21130
          return false;
553 chandransh 21131
        if (!this.scx.equals(that.scx))
48 ashish 21132
          return false;
21133
      }
21134
 
21135
      return true;
21136
    }
21137
 
21138
    @Override
21139
    public int hashCode() {
21140
      return 0;
21141
    }
21142
 
553 chandransh 21143
    public int compareTo(getCartsByTime_result other) {
48 ashish 21144
      if (!getClass().equals(other.getClass())) {
21145
        return getClass().getName().compareTo(other.getClass().getName());
21146
      }
21147
 
21148
      int lastComparison = 0;
553 chandransh 21149
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 21150
 
21151
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21152
      if (lastComparison != 0) {
21153
        return lastComparison;
21154
      }
21155
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21156
      if (lastComparison != 0) {
21157
        return lastComparison;
21158
      }
553 chandransh 21159
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 21160
      if (lastComparison != 0) {
21161
        return lastComparison;
21162
      }
553 chandransh 21163
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 21164
      if (lastComparison != 0) {
21165
        return lastComparison;
21166
      }
21167
      return 0;
21168
    }
21169
 
21170
    public void read(TProtocol iprot) throws TException {
21171
      TField field;
21172
      iprot.readStructBegin();
21173
      while (true)
21174
      {
21175
        field = iprot.readFieldBegin();
21176
        if (field.type == TType.STOP) { 
21177
          break;
21178
        }
21179
        _Fields fieldId = _Fields.findByThriftId(field.id);
21180
        if (fieldId == null) {
21181
          TProtocolUtil.skip(iprot, field.type);
21182
        } else {
21183
          switch (fieldId) {
21184
            case SUCCESS:
553 chandransh 21185
              if (field.type == TType.LIST) {
21186
                {
771 rajveer 21187
                  TList _list28 = iprot.readListBegin();
21188
                  this.success = new ArrayList<Cart>(_list28.size);
21189
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
553 chandransh 21190
                  {
771 rajveer 21191
                    Cart _elem30;
21192
                    _elem30 = new Cart();
21193
                    _elem30.read(iprot);
21194
                    this.success.add(_elem30);
553 chandransh 21195
                  }
21196
                  iprot.readListEnd();
21197
                }
48 ashish 21198
              } else { 
21199
                TProtocolUtil.skip(iprot, field.type);
21200
              }
21201
              break;
553 chandransh 21202
            case SCX:
48 ashish 21203
              if (field.type == TType.STRUCT) {
553 chandransh 21204
                this.scx = new ShoppingCartException();
21205
                this.scx.read(iprot);
48 ashish 21206
              } else { 
21207
                TProtocolUtil.skip(iprot, field.type);
21208
              }
21209
              break;
21210
          }
21211
          iprot.readFieldEnd();
21212
        }
21213
      }
21214
      iprot.readStructEnd();
21215
      validate();
21216
    }
21217
 
21218
    public void write(TProtocol oprot) throws TException {
21219
      oprot.writeStructBegin(STRUCT_DESC);
21220
 
21221
      if (this.isSetSuccess()) {
21222
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 21223
        {
21224
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 21225
          for (Cart _iter31 : this.success)
553 chandransh 21226
          {
771 rajveer 21227
            _iter31.write(oprot);
553 chandransh 21228
          }
21229
          oprot.writeListEnd();
21230
        }
48 ashish 21231
        oprot.writeFieldEnd();
553 chandransh 21232
      } else if (this.isSetScx()) {
21233
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21234
        this.scx.write(oprot);
48 ashish 21235
        oprot.writeFieldEnd();
21236
      }
21237
      oprot.writeFieldStop();
21238
      oprot.writeStructEnd();
21239
    }
21240
 
21241
    @Override
21242
    public String toString() {
553 chandransh 21243
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 21244
      boolean first = true;
21245
 
21246
      sb.append("success:");
553 chandransh 21247
      if (this.success == null) {
21248
        sb.append("null");
21249
      } else {
21250
        sb.append(this.success);
21251
      }
48 ashish 21252
      first = false;
21253
      if (!first) sb.append(", ");
553 chandransh 21254
      sb.append("scx:");
21255
      if (this.scx == null) {
48 ashish 21256
        sb.append("null");
21257
      } else {
553 chandransh 21258
        sb.append(this.scx);
48 ashish 21259
      }
21260
      first = false;
21261
      sb.append(")");
21262
      return sb.toString();
21263
    }
21264
 
21265
    public void validate() throws TException {
21266
      // check for required fields
21267
    }
21268
 
21269
  }
21270
 
553 chandransh 21271
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
21272
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 21273
 
553 chandransh 21274
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21275
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 21276
 
553 chandransh 21277
    private long cartId;
21278
    private CartStatus status;
48 ashish 21279
 
21280
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21281
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21282
      CART_ID((short)1, "cartId"),
21283
      /**
21284
       * 
21285
       * @see CartStatus
21286
       */
21287
      STATUS((short)2, "status");
48 ashish 21288
 
21289
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21290
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21291
 
21292
      static {
21293
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21294
          byId.put((int)field._thriftId, field);
21295
          byName.put(field.getFieldName(), field);
21296
        }
21297
      }
21298
 
21299
      /**
21300
       * Find the _Fields constant that matches fieldId, or null if its not found.
21301
       */
21302
      public static _Fields findByThriftId(int fieldId) {
21303
        return byId.get(fieldId);
21304
      }
21305
 
21306
      /**
21307
       * Find the _Fields constant that matches fieldId, throwing an exception
21308
       * if it is not found.
21309
       */
21310
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21311
        _Fields fields = findByThriftId(fieldId);
21312
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21313
        return fields;
21314
      }
21315
 
21316
      /**
21317
       * Find the _Fields constant that matches name, or null if its not found.
21318
       */
21319
      public static _Fields findByName(String name) {
21320
        return byName.get(name);
21321
      }
21322
 
21323
      private final short _thriftId;
21324
      private final String _fieldName;
21325
 
21326
      _Fields(short thriftId, String fieldName) {
21327
        _thriftId = thriftId;
21328
        _fieldName = fieldName;
21329
      }
21330
 
21331
      public short getThriftFieldId() {
21332
        return _thriftId;
21333
      }
21334
 
21335
      public String getFieldName() {
21336
        return _fieldName;
21337
      }
21338
    }
21339
 
21340
    // isset id assignments
553 chandransh 21341
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 21342
    private BitSet __isset_bit_vector = new BitSet(1);
21343
 
21344
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21345
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21346
          new FieldValueMetaData(TType.I64)));
553 chandransh 21347
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
21348
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 21349
    }});
21350
 
21351
    static {
553 chandransh 21352
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 21353
    }
21354
 
553 chandransh 21355
    public changeCartStatus_args() {
48 ashish 21356
    }
21357
 
553 chandransh 21358
    public changeCartStatus_args(
21359
      long cartId,
21360
      CartStatus status)
48 ashish 21361
    {
21362
      this();
553 chandransh 21363
      this.cartId = cartId;
21364
      setCartIdIsSet(true);
21365
      this.status = status;
48 ashish 21366
    }
21367
 
21368
    /**
21369
     * Performs a deep copy on <i>other</i>.
21370
     */
553 chandransh 21371
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 21372
      __isset_bit_vector.clear();
21373
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21374
      this.cartId = other.cartId;
21375
      if (other.isSetStatus()) {
21376
        this.status = other.status;
21377
      }
48 ashish 21378
    }
21379
 
553 chandransh 21380
    public changeCartStatus_args deepCopy() {
21381
      return new changeCartStatus_args(this);
48 ashish 21382
    }
21383
 
21384
    @Deprecated
553 chandransh 21385
    public changeCartStatus_args clone() {
21386
      return new changeCartStatus_args(this);
48 ashish 21387
    }
21388
 
553 chandransh 21389
    public long getCartId() {
21390
      return this.cartId;
48 ashish 21391
    }
21392
 
553 chandransh 21393
    public changeCartStatus_args setCartId(long cartId) {
21394
      this.cartId = cartId;
21395
      setCartIdIsSet(true);
48 ashish 21396
      return this;
21397
    }
21398
 
553 chandransh 21399
    public void unsetCartId() {
21400
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21401
    }
21402
 
553 chandransh 21403
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21404
    public boolean isSetCartId() {
21405
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21406
    }
21407
 
553 chandransh 21408
    public void setCartIdIsSet(boolean value) {
21409
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21410
    }
21411
 
553 chandransh 21412
    /**
21413
     * 
21414
     * @see CartStatus
21415
     */
21416
    public CartStatus getStatus() {
21417
      return this.status;
21418
    }
21419
 
21420
    /**
21421
     * 
21422
     * @see CartStatus
21423
     */
21424
    public changeCartStatus_args setStatus(CartStatus status) {
21425
      this.status = status;
21426
      return this;
21427
    }
21428
 
21429
    public void unsetStatus() {
21430
      this.status = null;
21431
    }
21432
 
21433
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
21434
    public boolean isSetStatus() {
21435
      return this.status != null;
21436
    }
21437
 
21438
    public void setStatusIsSet(boolean value) {
21439
      if (!value) {
21440
        this.status = null;
21441
      }
21442
    }
21443
 
48 ashish 21444
    public void setFieldValue(_Fields field, Object value) {
21445
      switch (field) {
553 chandransh 21446
      case CART_ID:
48 ashish 21447
        if (value == null) {
553 chandransh 21448
          unsetCartId();
48 ashish 21449
        } else {
553 chandransh 21450
          setCartId((Long)value);
48 ashish 21451
        }
21452
        break;
21453
 
553 chandransh 21454
      case STATUS:
21455
        if (value == null) {
21456
          unsetStatus();
21457
        } else {
21458
          setStatus((CartStatus)value);
21459
        }
21460
        break;
21461
 
48 ashish 21462
      }
21463
    }
21464
 
21465
    public void setFieldValue(int fieldID, Object value) {
21466
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21467
    }
21468
 
21469
    public Object getFieldValue(_Fields field) {
21470
      switch (field) {
553 chandransh 21471
      case CART_ID:
21472
        return new Long(getCartId());
48 ashish 21473
 
553 chandransh 21474
      case STATUS:
21475
        return getStatus();
21476
 
48 ashish 21477
      }
21478
      throw new IllegalStateException();
21479
    }
21480
 
21481
    public Object getFieldValue(int fieldId) {
21482
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21483
    }
21484
 
21485
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21486
    public boolean isSet(_Fields field) {
21487
      switch (field) {
553 chandransh 21488
      case CART_ID:
21489
        return isSetCartId();
21490
      case STATUS:
21491
        return isSetStatus();
48 ashish 21492
      }
21493
      throw new IllegalStateException();
21494
    }
21495
 
21496
    public boolean isSet(int fieldID) {
21497
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21498
    }
21499
 
21500
    @Override
21501
    public boolean equals(Object that) {
21502
      if (that == null)
21503
        return false;
553 chandransh 21504
      if (that instanceof changeCartStatus_args)
21505
        return this.equals((changeCartStatus_args)that);
48 ashish 21506
      return false;
21507
    }
21508
 
553 chandransh 21509
    public boolean equals(changeCartStatus_args that) {
48 ashish 21510
      if (that == null)
21511
        return false;
21512
 
553 chandransh 21513
      boolean this_present_cartId = true;
21514
      boolean that_present_cartId = true;
21515
      if (this_present_cartId || that_present_cartId) {
21516
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21517
          return false;
553 chandransh 21518
        if (this.cartId != that.cartId)
48 ashish 21519
          return false;
21520
      }
21521
 
553 chandransh 21522
      boolean this_present_status = true && this.isSetStatus();
21523
      boolean that_present_status = true && that.isSetStatus();
21524
      if (this_present_status || that_present_status) {
21525
        if (!(this_present_status && that_present_status))
21526
          return false;
21527
        if (!this.status.equals(that.status))
21528
          return false;
21529
      }
21530
 
48 ashish 21531
      return true;
21532
    }
21533
 
21534
    @Override
21535
    public int hashCode() {
21536
      return 0;
21537
    }
21538
 
553 chandransh 21539
    public int compareTo(changeCartStatus_args other) {
48 ashish 21540
      if (!getClass().equals(other.getClass())) {
21541
        return getClass().getName().compareTo(other.getClass().getName());
21542
      }
21543
 
21544
      int lastComparison = 0;
553 chandransh 21545
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 21546
 
553 chandransh 21547
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21548
      if (lastComparison != 0) {
21549
        return lastComparison;
21550
      }
553 chandransh 21551
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21552
      if (lastComparison != 0) {
21553
        return lastComparison;
21554
      }
553 chandransh 21555
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
21556
      if (lastComparison != 0) {
21557
        return lastComparison;
21558
      }
21559
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
21560
      if (lastComparison != 0) {
21561
        return lastComparison;
21562
      }
48 ashish 21563
      return 0;
21564
    }
21565
 
21566
    public void read(TProtocol iprot) throws TException {
21567
      TField field;
21568
      iprot.readStructBegin();
21569
      while (true)
21570
      {
21571
        field = iprot.readFieldBegin();
21572
        if (field.type == TType.STOP) { 
21573
          break;
21574
        }
21575
        _Fields fieldId = _Fields.findByThriftId(field.id);
21576
        if (fieldId == null) {
21577
          TProtocolUtil.skip(iprot, field.type);
21578
        } else {
21579
          switch (fieldId) {
553 chandransh 21580
            case CART_ID:
48 ashish 21581
              if (field.type == TType.I64) {
553 chandransh 21582
                this.cartId = iprot.readI64();
21583
                setCartIdIsSet(true);
48 ashish 21584
              } else { 
21585
                TProtocolUtil.skip(iprot, field.type);
21586
              }
21587
              break;
553 chandransh 21588
            case STATUS:
21589
              if (field.type == TType.I32) {
21590
                this.status = CartStatus.findByValue(iprot.readI32());
21591
              } else { 
21592
                TProtocolUtil.skip(iprot, field.type);
21593
              }
21594
              break;
48 ashish 21595
          }
21596
          iprot.readFieldEnd();
21597
        }
21598
      }
21599
      iprot.readStructEnd();
21600
      validate();
21601
    }
21602
 
21603
    public void write(TProtocol oprot) throws TException {
21604
      validate();
21605
 
21606
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21607
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21608
      oprot.writeI64(this.cartId);
48 ashish 21609
      oprot.writeFieldEnd();
553 chandransh 21610
      if (this.status != null) {
21611
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
21612
        oprot.writeI32(this.status.getValue());
21613
        oprot.writeFieldEnd();
21614
      }
48 ashish 21615
      oprot.writeFieldStop();
21616
      oprot.writeStructEnd();
21617
    }
21618
 
21619
    @Override
21620
    public String toString() {
553 chandransh 21621
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 21622
      boolean first = true;
21623
 
553 chandransh 21624
      sb.append("cartId:");
21625
      sb.append(this.cartId);
48 ashish 21626
      first = false;
553 chandransh 21627
      if (!first) sb.append(", ");
21628
      sb.append("status:");
21629
      if (this.status == null) {
21630
        sb.append("null");
21631
      } else {
21632
        String status_name = status.name();
21633
        if (status_name != null) {
21634
          sb.append(status_name);
21635
          sb.append(" (");
21636
        }
21637
        sb.append(this.status);
21638
        if (status_name != null) {
21639
          sb.append(")");
21640
        }
21641
      }
21642
      first = false;
48 ashish 21643
      sb.append(")");
21644
      return sb.toString();
21645
    }
21646
 
21647
    public void validate() throws TException {
21648
      // check for required fields
21649
    }
21650
 
21651
  }
21652
 
553 chandransh 21653
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
21654
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 21655
 
553 chandransh 21656
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 21657
 
553 chandransh 21658
    private ShoppingCartException scx;
48 ashish 21659
 
21660
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21661
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21662
      SCX((short)1, "scx");
48 ashish 21663
 
21664
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21665
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21666
 
21667
      static {
21668
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21669
          byId.put((int)field._thriftId, field);
21670
          byName.put(field.getFieldName(), field);
21671
        }
21672
      }
21673
 
21674
      /**
21675
       * Find the _Fields constant that matches fieldId, or null if its not found.
21676
       */
21677
      public static _Fields findByThriftId(int fieldId) {
21678
        return byId.get(fieldId);
21679
      }
21680
 
21681
      /**
21682
       * Find the _Fields constant that matches fieldId, throwing an exception
21683
       * if it is not found.
21684
       */
21685
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21686
        _Fields fields = findByThriftId(fieldId);
21687
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21688
        return fields;
21689
      }
21690
 
21691
      /**
21692
       * Find the _Fields constant that matches name, or null if its not found.
21693
       */
21694
      public static _Fields findByName(String name) {
21695
        return byName.get(name);
21696
      }
21697
 
21698
      private final short _thriftId;
21699
      private final String _fieldName;
21700
 
21701
      _Fields(short thriftId, String fieldName) {
21702
        _thriftId = thriftId;
21703
        _fieldName = fieldName;
21704
      }
21705
 
21706
      public short getThriftFieldId() {
21707
        return _thriftId;
21708
      }
21709
 
21710
      public String getFieldName() {
21711
        return _fieldName;
21712
      }
21713
    }
21714
 
21715
    // isset id assignments
21716
 
21717
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21718
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 21719
          new FieldValueMetaData(TType.STRUCT)));
21720
    }});
21721
 
21722
    static {
553 chandransh 21723
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 21724
    }
21725
 
553 chandransh 21726
    public changeCartStatus_result() {
48 ashish 21727
    }
21728
 
553 chandransh 21729
    public changeCartStatus_result(
21730
      ShoppingCartException scx)
48 ashish 21731
    {
21732
      this();
553 chandransh 21733
      this.scx = scx;
48 ashish 21734
    }
21735
 
21736
    /**
21737
     * Performs a deep copy on <i>other</i>.
21738
     */
553 chandransh 21739
    public changeCartStatus_result(changeCartStatus_result other) {
21740
      if (other.isSetScx()) {
21741
        this.scx = new ShoppingCartException(other.scx);
21742
      }
21743
    }
21744
 
21745
    public changeCartStatus_result deepCopy() {
21746
      return new changeCartStatus_result(this);
21747
    }
21748
 
21749
    @Deprecated
21750
    public changeCartStatus_result clone() {
21751
      return new changeCartStatus_result(this);
21752
    }
21753
 
21754
    public ShoppingCartException getScx() {
21755
      return this.scx;
21756
    }
21757
 
21758
    public changeCartStatus_result setScx(ShoppingCartException scx) {
21759
      this.scx = scx;
21760
      return this;
21761
    }
21762
 
21763
    public void unsetScx() {
21764
      this.scx = null;
21765
    }
21766
 
21767
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21768
    public boolean isSetScx() {
21769
      return this.scx != null;
21770
    }
21771
 
21772
    public void setScxIsSet(boolean value) {
21773
      if (!value) {
21774
        this.scx = null;
21775
      }
21776
    }
21777
 
21778
    public void setFieldValue(_Fields field, Object value) {
21779
      switch (field) {
21780
      case SCX:
21781
        if (value == null) {
21782
          unsetScx();
21783
        } else {
21784
          setScx((ShoppingCartException)value);
21785
        }
21786
        break;
21787
 
21788
      }
21789
    }
21790
 
21791
    public void setFieldValue(int fieldID, Object value) {
21792
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21793
    }
21794
 
21795
    public Object getFieldValue(_Fields field) {
21796
      switch (field) {
21797
      case SCX:
21798
        return getScx();
21799
 
21800
      }
21801
      throw new IllegalStateException();
21802
    }
21803
 
21804
    public Object getFieldValue(int fieldId) {
21805
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21806
    }
21807
 
21808
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21809
    public boolean isSet(_Fields field) {
21810
      switch (field) {
21811
      case SCX:
21812
        return isSetScx();
21813
      }
21814
      throw new IllegalStateException();
21815
    }
21816
 
21817
    public boolean isSet(int fieldID) {
21818
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21819
    }
21820
 
21821
    @Override
21822
    public boolean equals(Object that) {
21823
      if (that == null)
21824
        return false;
21825
      if (that instanceof changeCartStatus_result)
21826
        return this.equals((changeCartStatus_result)that);
21827
      return false;
21828
    }
21829
 
21830
    public boolean equals(changeCartStatus_result that) {
21831
      if (that == null)
21832
        return false;
21833
 
21834
      boolean this_present_scx = true && this.isSetScx();
21835
      boolean that_present_scx = true && that.isSetScx();
21836
      if (this_present_scx || that_present_scx) {
21837
        if (!(this_present_scx && that_present_scx))
21838
          return false;
21839
        if (!this.scx.equals(that.scx))
21840
          return false;
21841
      }
21842
 
21843
      return true;
21844
    }
21845
 
21846
    @Override
21847
    public int hashCode() {
21848
      return 0;
21849
    }
21850
 
21851
    public int compareTo(changeCartStatus_result other) {
21852
      if (!getClass().equals(other.getClass())) {
21853
        return getClass().getName().compareTo(other.getClass().getName());
21854
      }
21855
 
21856
      int lastComparison = 0;
21857
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
21858
 
21859
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21860
      if (lastComparison != 0) {
21861
        return lastComparison;
21862
      }
21863
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21864
      if (lastComparison != 0) {
21865
        return lastComparison;
21866
      }
21867
      return 0;
21868
    }
21869
 
21870
    public void read(TProtocol iprot) throws TException {
21871
      TField field;
21872
      iprot.readStructBegin();
21873
      while (true)
21874
      {
21875
        field = iprot.readFieldBegin();
21876
        if (field.type == TType.STOP) { 
21877
          break;
21878
        }
21879
        _Fields fieldId = _Fields.findByThriftId(field.id);
21880
        if (fieldId == null) {
21881
          TProtocolUtil.skip(iprot, field.type);
21882
        } else {
21883
          switch (fieldId) {
21884
            case SCX:
21885
              if (field.type == TType.STRUCT) {
21886
                this.scx = new ShoppingCartException();
21887
                this.scx.read(iprot);
21888
              } else { 
21889
                TProtocolUtil.skip(iprot, field.type);
21890
              }
21891
              break;
21892
          }
21893
          iprot.readFieldEnd();
21894
        }
21895
      }
21896
      iprot.readStructEnd();
21897
      validate();
21898
    }
21899
 
21900
    public void write(TProtocol oprot) throws TException {
21901
      oprot.writeStructBegin(STRUCT_DESC);
21902
 
21903
      if (this.isSetScx()) {
21904
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21905
        this.scx.write(oprot);
21906
        oprot.writeFieldEnd();
21907
      }
21908
      oprot.writeFieldStop();
21909
      oprot.writeStructEnd();
21910
    }
21911
 
21912
    @Override
21913
    public String toString() {
21914
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
21915
      boolean first = true;
21916
 
21917
      sb.append("scx:");
21918
      if (this.scx == null) {
21919
        sb.append("null");
21920
      } else {
21921
        sb.append(this.scx);
21922
      }
21923
      first = false;
21924
      sb.append(")");
21925
      return sb.toString();
21926
    }
21927
 
21928
    public void validate() throws TException {
21929
      // check for required fields
21930
    }
21931
 
21932
  }
21933
 
21934
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
21935
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
21936
 
21937
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21938
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21939
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
21940
 
21941
    private long cartId;
21942
    private long itemId;
21943
    private long quantity;
21944
 
21945
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21946
    public enum _Fields implements TFieldIdEnum {
21947
      CART_ID((short)1, "cartId"),
21948
      ITEM_ID((short)2, "itemId"),
21949
      QUANTITY((short)3, "quantity");
21950
 
21951
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21952
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21953
 
21954
      static {
21955
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21956
          byId.put((int)field._thriftId, field);
21957
          byName.put(field.getFieldName(), field);
21958
        }
21959
      }
21960
 
21961
      /**
21962
       * Find the _Fields constant that matches fieldId, or null if its not found.
21963
       */
21964
      public static _Fields findByThriftId(int fieldId) {
21965
        return byId.get(fieldId);
21966
      }
21967
 
21968
      /**
21969
       * Find the _Fields constant that matches fieldId, throwing an exception
21970
       * if it is not found.
21971
       */
21972
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21973
        _Fields fields = findByThriftId(fieldId);
21974
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21975
        return fields;
21976
      }
21977
 
21978
      /**
21979
       * Find the _Fields constant that matches name, or null if its not found.
21980
       */
21981
      public static _Fields findByName(String name) {
21982
        return byName.get(name);
21983
      }
21984
 
21985
      private final short _thriftId;
21986
      private final String _fieldName;
21987
 
21988
      _Fields(short thriftId, String fieldName) {
21989
        _thriftId = thriftId;
21990
        _fieldName = fieldName;
21991
      }
21992
 
21993
      public short getThriftFieldId() {
21994
        return _thriftId;
21995
      }
21996
 
21997
      public String getFieldName() {
21998
        return _fieldName;
21999
      }
22000
    }
22001
 
22002
    // isset id assignments
22003
    private static final int __CARTID_ISSET_ID = 0;
22004
    private static final int __ITEMID_ISSET_ID = 1;
22005
    private static final int __QUANTITY_ISSET_ID = 2;
22006
    private BitSet __isset_bit_vector = new BitSet(3);
22007
 
22008
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22009
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22010
          new FieldValueMetaData(TType.I64)));
22011
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22012
          new FieldValueMetaData(TType.I64)));
22013
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
22014
          new FieldValueMetaData(TType.I64)));
22015
    }});
22016
 
22017
    static {
22018
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
22019
    }
22020
 
22021
    public addItemToCart_args() {
22022
    }
22023
 
22024
    public addItemToCart_args(
22025
      long cartId,
22026
      long itemId,
22027
      long quantity)
22028
    {
22029
      this();
22030
      this.cartId = cartId;
22031
      setCartIdIsSet(true);
22032
      this.itemId = itemId;
22033
      setItemIdIsSet(true);
22034
      this.quantity = quantity;
22035
      setQuantityIsSet(true);
22036
    }
22037
 
22038
    /**
22039
     * Performs a deep copy on <i>other</i>.
22040
     */
22041
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 22042
      __isset_bit_vector.clear();
22043
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22044
      this.cartId = other.cartId;
22045
      this.itemId = other.itemId;
22046
      this.quantity = other.quantity;
48 ashish 22047
    }
22048
 
553 chandransh 22049
    public addItemToCart_args deepCopy() {
22050
      return new addItemToCart_args(this);
48 ashish 22051
    }
22052
 
22053
    @Deprecated
553 chandransh 22054
    public addItemToCart_args clone() {
22055
      return new addItemToCart_args(this);
48 ashish 22056
    }
22057
 
553 chandransh 22058
    public long getCartId() {
22059
      return this.cartId;
48 ashish 22060
    }
22061
 
553 chandransh 22062
    public addItemToCart_args setCartId(long cartId) {
22063
      this.cartId = cartId;
22064
      setCartIdIsSet(true);
48 ashish 22065
      return this;
22066
    }
22067
 
553 chandransh 22068
    public void unsetCartId() {
22069
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22070
    }
22071
 
553 chandransh 22072
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22073
    public boolean isSetCartId() {
22074
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22075
    }
22076
 
553 chandransh 22077
    public void setCartIdIsSet(boolean value) {
22078
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22079
    }
22080
 
553 chandransh 22081
    public long getItemId() {
22082
      return this.itemId;
48 ashish 22083
    }
22084
 
553 chandransh 22085
    public addItemToCart_args setItemId(long itemId) {
22086
      this.itemId = itemId;
22087
      setItemIdIsSet(true);
48 ashish 22088
      return this;
22089
    }
22090
 
553 chandransh 22091
    public void unsetItemId() {
22092
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 22093
    }
22094
 
553 chandransh 22095
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22096
    public boolean isSetItemId() {
22097
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 22098
    }
22099
 
553 chandransh 22100
    public void setItemIdIsSet(boolean value) {
22101
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22102
    }
22103
 
22104
    public long getQuantity() {
22105
      return this.quantity;
22106
    }
22107
 
22108
    public addItemToCart_args setQuantity(long quantity) {
22109
      this.quantity = quantity;
22110
      setQuantityIsSet(true);
22111
      return this;
22112
    }
22113
 
22114
    public void unsetQuantity() {
22115
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
22116
    }
22117
 
22118
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
22119
    public boolean isSetQuantity() {
22120
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
22121
    }
22122
 
22123
    public void setQuantityIsSet(boolean value) {
22124
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
22125
    }
22126
 
22127
    public void setFieldValue(_Fields field, Object value) {
22128
      switch (field) {
22129
      case CART_ID:
22130
        if (value == null) {
22131
          unsetCartId();
22132
        } else {
22133
          setCartId((Long)value);
22134
        }
22135
        break;
22136
 
22137
      case ITEM_ID:
22138
        if (value == null) {
22139
          unsetItemId();
22140
        } else {
22141
          setItemId((Long)value);
22142
        }
22143
        break;
22144
 
22145
      case QUANTITY:
22146
        if (value == null) {
22147
          unsetQuantity();
22148
        } else {
22149
          setQuantity((Long)value);
22150
        }
22151
        break;
22152
 
22153
      }
22154
    }
22155
 
22156
    public void setFieldValue(int fieldID, Object value) {
22157
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22158
    }
22159
 
22160
    public Object getFieldValue(_Fields field) {
22161
      switch (field) {
22162
      case CART_ID:
22163
        return new Long(getCartId());
22164
 
22165
      case ITEM_ID:
22166
        return new Long(getItemId());
22167
 
22168
      case QUANTITY:
22169
        return new Long(getQuantity());
22170
 
22171
      }
22172
      throw new IllegalStateException();
22173
    }
22174
 
22175
    public Object getFieldValue(int fieldId) {
22176
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22177
    }
22178
 
22179
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22180
    public boolean isSet(_Fields field) {
22181
      switch (field) {
22182
      case CART_ID:
22183
        return isSetCartId();
22184
      case ITEM_ID:
22185
        return isSetItemId();
22186
      case QUANTITY:
22187
        return isSetQuantity();
22188
      }
22189
      throw new IllegalStateException();
22190
    }
22191
 
22192
    public boolean isSet(int fieldID) {
22193
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22194
    }
22195
 
22196
    @Override
22197
    public boolean equals(Object that) {
22198
      if (that == null)
22199
        return false;
22200
      if (that instanceof addItemToCart_args)
22201
        return this.equals((addItemToCart_args)that);
22202
      return false;
22203
    }
22204
 
22205
    public boolean equals(addItemToCart_args that) {
22206
      if (that == null)
22207
        return false;
22208
 
22209
      boolean this_present_cartId = true;
22210
      boolean that_present_cartId = true;
22211
      if (this_present_cartId || that_present_cartId) {
22212
        if (!(this_present_cartId && that_present_cartId))
22213
          return false;
22214
        if (this.cartId != that.cartId)
22215
          return false;
22216
      }
22217
 
22218
      boolean this_present_itemId = true;
22219
      boolean that_present_itemId = true;
22220
      if (this_present_itemId || that_present_itemId) {
22221
        if (!(this_present_itemId && that_present_itemId))
22222
          return false;
22223
        if (this.itemId != that.itemId)
22224
          return false;
22225
      }
22226
 
22227
      boolean this_present_quantity = true;
22228
      boolean that_present_quantity = true;
22229
      if (this_present_quantity || that_present_quantity) {
22230
        if (!(this_present_quantity && that_present_quantity))
22231
          return false;
22232
        if (this.quantity != that.quantity)
22233
          return false;
22234
      }
22235
 
22236
      return true;
22237
    }
22238
 
22239
    @Override
22240
    public int hashCode() {
22241
      return 0;
22242
    }
22243
 
22244
    public int compareTo(addItemToCart_args other) {
22245
      if (!getClass().equals(other.getClass())) {
22246
        return getClass().getName().compareTo(other.getClass().getName());
22247
      }
22248
 
22249
      int lastComparison = 0;
22250
      addItemToCart_args typedOther = (addItemToCart_args)other;
22251
 
22252
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
22253
      if (lastComparison != 0) {
22254
        return lastComparison;
22255
      }
22256
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
22257
      if (lastComparison != 0) {
22258
        return lastComparison;
22259
      }
22260
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
22261
      if (lastComparison != 0) {
22262
        return lastComparison;
22263
      }
22264
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
22265
      if (lastComparison != 0) {
22266
        return lastComparison;
22267
      }
22268
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
22269
      if (lastComparison != 0) {
22270
        return lastComparison;
22271
      }
22272
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
22273
      if (lastComparison != 0) {
22274
        return lastComparison;
22275
      }
22276
      return 0;
22277
    }
22278
 
22279
    public void read(TProtocol iprot) throws TException {
22280
      TField field;
22281
      iprot.readStructBegin();
22282
      while (true)
22283
      {
22284
        field = iprot.readFieldBegin();
22285
        if (field.type == TType.STOP) { 
22286
          break;
22287
        }
22288
        _Fields fieldId = _Fields.findByThriftId(field.id);
22289
        if (fieldId == null) {
22290
          TProtocolUtil.skip(iprot, field.type);
22291
        } else {
22292
          switch (fieldId) {
22293
            case CART_ID:
22294
              if (field.type == TType.I64) {
22295
                this.cartId = iprot.readI64();
22296
                setCartIdIsSet(true);
22297
              } else { 
22298
                TProtocolUtil.skip(iprot, field.type);
22299
              }
22300
              break;
22301
            case ITEM_ID:
22302
              if (field.type == TType.I64) {
22303
                this.itemId = iprot.readI64();
22304
                setItemIdIsSet(true);
22305
              } else { 
22306
                TProtocolUtil.skip(iprot, field.type);
22307
              }
22308
              break;
22309
            case QUANTITY:
22310
              if (field.type == TType.I64) {
22311
                this.quantity = iprot.readI64();
22312
                setQuantityIsSet(true);
22313
              } else { 
22314
                TProtocolUtil.skip(iprot, field.type);
22315
              }
22316
              break;
22317
          }
22318
          iprot.readFieldEnd();
22319
        }
22320
      }
22321
      iprot.readStructEnd();
22322
      validate();
22323
    }
22324
 
22325
    public void write(TProtocol oprot) throws TException {
22326
      validate();
22327
 
22328
      oprot.writeStructBegin(STRUCT_DESC);
22329
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22330
      oprot.writeI64(this.cartId);
22331
      oprot.writeFieldEnd();
22332
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22333
      oprot.writeI64(this.itemId);
22334
      oprot.writeFieldEnd();
22335
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
22336
      oprot.writeI64(this.quantity);
22337
      oprot.writeFieldEnd();
22338
      oprot.writeFieldStop();
22339
      oprot.writeStructEnd();
22340
    }
22341
 
22342
    @Override
22343
    public String toString() {
22344
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
22345
      boolean first = true;
22346
 
22347
      sb.append("cartId:");
22348
      sb.append(this.cartId);
22349
      first = false;
22350
      if (!first) sb.append(", ");
22351
      sb.append("itemId:");
22352
      sb.append(this.itemId);
22353
      first = false;
22354
      if (!first) sb.append(", ");
22355
      sb.append("quantity:");
22356
      sb.append(this.quantity);
22357
      first = false;
22358
      sb.append(")");
22359
      return sb.toString();
22360
    }
22361
 
22362
    public void validate() throws TException {
22363
      // check for required fields
22364
    }
22365
 
22366
  }
22367
 
22368
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
22369
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
22370
 
22371
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
22372
 
22373
    private ShoppingCartException scx;
22374
 
22375
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22376
    public enum _Fields implements TFieldIdEnum {
22377
      SCX((short)1, "scx");
22378
 
22379
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22380
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22381
 
22382
      static {
22383
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22384
          byId.put((int)field._thriftId, field);
22385
          byName.put(field.getFieldName(), field);
22386
        }
22387
      }
22388
 
22389
      /**
22390
       * Find the _Fields constant that matches fieldId, or null if its not found.
22391
       */
22392
      public static _Fields findByThriftId(int fieldId) {
22393
        return byId.get(fieldId);
22394
      }
22395
 
22396
      /**
22397
       * Find the _Fields constant that matches fieldId, throwing an exception
22398
       * if it is not found.
22399
       */
22400
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22401
        _Fields fields = findByThriftId(fieldId);
22402
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22403
        return fields;
22404
      }
22405
 
22406
      /**
22407
       * Find the _Fields constant that matches name, or null if its not found.
22408
       */
22409
      public static _Fields findByName(String name) {
22410
        return byName.get(name);
22411
      }
22412
 
22413
      private final short _thriftId;
22414
      private final String _fieldName;
22415
 
22416
      _Fields(short thriftId, String fieldName) {
22417
        _thriftId = thriftId;
22418
        _fieldName = fieldName;
22419
      }
22420
 
22421
      public short getThriftFieldId() {
22422
        return _thriftId;
22423
      }
22424
 
22425
      public String getFieldName() {
22426
        return _fieldName;
22427
      }
22428
    }
22429
 
22430
    // isset id assignments
22431
 
22432
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22433
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22434
          new FieldValueMetaData(TType.STRUCT)));
22435
    }});
22436
 
22437
    static {
22438
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
22439
    }
22440
 
22441
    public addItemToCart_result() {
22442
    }
22443
 
22444
    public addItemToCart_result(
22445
      ShoppingCartException scx)
22446
    {
22447
      this();
22448
      this.scx = scx;
22449
    }
22450
 
22451
    /**
22452
     * Performs a deep copy on <i>other</i>.
22453
     */
22454
    public addItemToCart_result(addItemToCart_result other) {
22455
      if (other.isSetScx()) {
22456
        this.scx = new ShoppingCartException(other.scx);
22457
      }
22458
    }
22459
 
22460
    public addItemToCart_result deepCopy() {
22461
      return new addItemToCart_result(this);
22462
    }
22463
 
22464
    @Deprecated
22465
    public addItemToCart_result clone() {
22466
      return new addItemToCart_result(this);
22467
    }
22468
 
22469
    public ShoppingCartException getScx() {
22470
      return this.scx;
22471
    }
22472
 
22473
    public addItemToCart_result setScx(ShoppingCartException scx) {
22474
      this.scx = scx;
22475
      return this;
22476
    }
22477
 
22478
    public void unsetScx() {
22479
      this.scx = null;
22480
    }
22481
 
22482
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22483
    public boolean isSetScx() {
22484
      return this.scx != null;
22485
    }
22486
 
22487
    public void setScxIsSet(boolean value) {
48 ashish 22488
      if (!value) {
553 chandransh 22489
        this.scx = null;
48 ashish 22490
      }
22491
    }
22492
 
22493
    public void setFieldValue(_Fields field, Object value) {
22494
      switch (field) {
553 chandransh 22495
      case SCX:
48 ashish 22496
        if (value == null) {
553 chandransh 22497
          unsetScx();
48 ashish 22498
        } else {
553 chandransh 22499
          setScx((ShoppingCartException)value);
48 ashish 22500
        }
22501
        break;
22502
 
553 chandransh 22503
      }
22504
    }
22505
 
22506
    public void setFieldValue(int fieldID, Object value) {
22507
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22508
    }
22509
 
22510
    public Object getFieldValue(_Fields field) {
22511
      switch (field) {
22512
      case SCX:
22513
        return getScx();
22514
 
22515
      }
22516
      throw new IllegalStateException();
22517
    }
22518
 
22519
    public Object getFieldValue(int fieldId) {
22520
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22521
    }
22522
 
22523
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22524
    public boolean isSet(_Fields field) {
22525
      switch (field) {
22526
      case SCX:
22527
        return isSetScx();
22528
      }
22529
      throw new IllegalStateException();
22530
    }
22531
 
22532
    public boolean isSet(int fieldID) {
22533
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22534
    }
22535
 
22536
    @Override
22537
    public boolean equals(Object that) {
22538
      if (that == null)
22539
        return false;
22540
      if (that instanceof addItemToCart_result)
22541
        return this.equals((addItemToCart_result)that);
22542
      return false;
22543
    }
22544
 
22545
    public boolean equals(addItemToCart_result that) {
22546
      if (that == null)
22547
        return false;
22548
 
22549
      boolean this_present_scx = true && this.isSetScx();
22550
      boolean that_present_scx = true && that.isSetScx();
22551
      if (this_present_scx || that_present_scx) {
22552
        if (!(this_present_scx && that_present_scx))
22553
          return false;
22554
        if (!this.scx.equals(that.scx))
22555
          return false;
22556
      }
22557
 
22558
      return true;
22559
    }
22560
 
22561
    @Override
22562
    public int hashCode() {
22563
      return 0;
22564
    }
22565
 
22566
    public int compareTo(addItemToCart_result other) {
22567
      if (!getClass().equals(other.getClass())) {
22568
        return getClass().getName().compareTo(other.getClass().getName());
22569
      }
22570
 
22571
      int lastComparison = 0;
22572
      addItemToCart_result typedOther = (addItemToCart_result)other;
22573
 
22574
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22575
      if (lastComparison != 0) {
22576
        return lastComparison;
22577
      }
22578
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22579
      if (lastComparison != 0) {
22580
        return lastComparison;
22581
      }
22582
      return 0;
22583
    }
22584
 
22585
    public void read(TProtocol iprot) throws TException {
22586
      TField field;
22587
      iprot.readStructBegin();
22588
      while (true)
22589
      {
22590
        field = iprot.readFieldBegin();
22591
        if (field.type == TType.STOP) { 
22592
          break;
22593
        }
22594
        _Fields fieldId = _Fields.findByThriftId(field.id);
22595
        if (fieldId == null) {
22596
          TProtocolUtil.skip(iprot, field.type);
22597
        } else {
22598
          switch (fieldId) {
22599
            case SCX:
22600
              if (field.type == TType.STRUCT) {
22601
                this.scx = new ShoppingCartException();
22602
                this.scx.read(iprot);
22603
              } else { 
22604
                TProtocolUtil.skip(iprot, field.type);
22605
              }
22606
              break;
22607
          }
22608
          iprot.readFieldEnd();
22609
        }
22610
      }
22611
      iprot.readStructEnd();
22612
      validate();
22613
    }
22614
 
22615
    public void write(TProtocol oprot) throws TException {
22616
      oprot.writeStructBegin(STRUCT_DESC);
22617
 
22618
      if (this.isSetScx()) {
22619
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22620
        this.scx.write(oprot);
22621
        oprot.writeFieldEnd();
22622
      }
22623
      oprot.writeFieldStop();
22624
      oprot.writeStructEnd();
22625
    }
22626
 
22627
    @Override
22628
    public String toString() {
22629
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
22630
      boolean first = true;
22631
 
22632
      sb.append("scx:");
22633
      if (this.scx == null) {
22634
        sb.append("null");
22635
      } else {
22636
        sb.append(this.scx);
22637
      }
22638
      first = false;
22639
      sb.append(")");
22640
      return sb.toString();
22641
    }
22642
 
22643
    public void validate() throws TException {
22644
      // check for required fields
22645
    }
22646
 
22647
  }
22648
 
22649
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
22650
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
22651
 
22652
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22653
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
22654
 
22655
    private long cartId;
22656
    private long itemId;
22657
 
22658
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22659
    public enum _Fields implements TFieldIdEnum {
22660
      CART_ID((short)1, "cartId"),
22661
      ITEM_ID((short)2, "itemId");
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 BitSet __isset_bit_vector = new BitSet(2);
22718
 
22719
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22720
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22721
          new FieldValueMetaData(TType.I64)));
22722
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22723
          new FieldValueMetaData(TType.I64)));
22724
    }});
22725
 
22726
    static {
22727
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
22728
    }
22729
 
22730
    public deleteItemFromCart_args() {
22731
    }
22732
 
22733
    public deleteItemFromCart_args(
22734
      long cartId,
22735
      long itemId)
22736
    {
22737
      this();
22738
      this.cartId = cartId;
22739
      setCartIdIsSet(true);
22740
      this.itemId = itemId;
22741
      setItemIdIsSet(true);
22742
    }
22743
 
22744
    /**
22745
     * Performs a deep copy on <i>other</i>.
22746
     */
22747
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
22748
      __isset_bit_vector.clear();
22749
      __isset_bit_vector.or(other.__isset_bit_vector);
22750
      this.cartId = other.cartId;
22751
      this.itemId = other.itemId;
22752
    }
22753
 
22754
    public deleteItemFromCart_args deepCopy() {
22755
      return new deleteItemFromCart_args(this);
22756
    }
22757
 
22758
    @Deprecated
22759
    public deleteItemFromCart_args clone() {
22760
      return new deleteItemFromCart_args(this);
22761
    }
22762
 
22763
    public long getCartId() {
22764
      return this.cartId;
22765
    }
22766
 
22767
    public deleteItemFromCart_args setCartId(long cartId) {
22768
      this.cartId = cartId;
22769
      setCartIdIsSet(true);
22770
      return this;
22771
    }
22772
 
22773
    public void unsetCartId() {
22774
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
22775
    }
22776
 
22777
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22778
    public boolean isSetCartId() {
22779
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
22780
    }
22781
 
22782
    public void setCartIdIsSet(boolean value) {
22783
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
22784
    }
22785
 
22786
    public long getItemId() {
22787
      return this.itemId;
22788
    }
22789
 
22790
    public deleteItemFromCart_args setItemId(long itemId) {
22791
      this.itemId = itemId;
22792
      setItemIdIsSet(true);
22793
      return this;
22794
    }
22795
 
22796
    public void unsetItemId() {
22797
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
22798
    }
22799
 
22800
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22801
    public boolean isSetItemId() {
22802
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
22803
    }
22804
 
22805
    public void setItemIdIsSet(boolean value) {
22806
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22807
    }
22808
 
22809
    public void setFieldValue(_Fields field, Object value) {
22810
      switch (field) {
22811
      case CART_ID:
48 ashish 22812
        if (value == null) {
553 chandransh 22813
          unsetCartId();
48 ashish 22814
        } else {
553 chandransh 22815
          setCartId((Long)value);
48 ashish 22816
        }
22817
        break;
22818
 
553 chandransh 22819
      case ITEM_ID:
22820
        if (value == null) {
22821
          unsetItemId();
22822
        } else {
22823
          setItemId((Long)value);
22824
        }
22825
        break;
22826
 
48 ashish 22827
      }
22828
    }
22829
 
22830
    public void setFieldValue(int fieldID, Object value) {
22831
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22832
    }
22833
 
22834
    public Object getFieldValue(_Fields field) {
22835
      switch (field) {
553 chandransh 22836
      case CART_ID:
22837
        return new Long(getCartId());
48 ashish 22838
 
553 chandransh 22839
      case ITEM_ID:
22840
        return new Long(getItemId());
48 ashish 22841
 
22842
      }
22843
      throw new IllegalStateException();
22844
    }
22845
 
22846
    public Object getFieldValue(int fieldId) {
22847
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22848
    }
22849
 
22850
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22851
    public boolean isSet(_Fields field) {
22852
      switch (field) {
553 chandransh 22853
      case CART_ID:
22854
        return isSetCartId();
22855
      case ITEM_ID:
22856
        return isSetItemId();
48 ashish 22857
      }
22858
      throw new IllegalStateException();
22859
    }
22860
 
22861
    public boolean isSet(int fieldID) {
22862
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22863
    }
22864
 
22865
    @Override
22866
    public boolean equals(Object that) {
22867
      if (that == null)
22868
        return false;
553 chandransh 22869
      if (that instanceof deleteItemFromCart_args)
22870
        return this.equals((deleteItemFromCart_args)that);
48 ashish 22871
      return false;
22872
    }
22873
 
553 chandransh 22874
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 22875
      if (that == null)
22876
        return false;
22877
 
553 chandransh 22878
      boolean this_present_cartId = true;
22879
      boolean that_present_cartId = true;
22880
      if (this_present_cartId || that_present_cartId) {
22881
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22882
          return false;
553 chandransh 22883
        if (this.cartId != that.cartId)
48 ashish 22884
          return false;
22885
      }
22886
 
553 chandransh 22887
      boolean this_present_itemId = true;
22888
      boolean that_present_itemId = true;
22889
      if (this_present_itemId || that_present_itemId) {
22890
        if (!(this_present_itemId && that_present_itemId))
48 ashish 22891
          return false;
553 chandransh 22892
        if (this.itemId != that.itemId)
48 ashish 22893
          return false;
22894
      }
22895
 
22896
      return true;
22897
    }
22898
 
22899
    @Override
22900
    public int hashCode() {
22901
      return 0;
22902
    }
22903
 
553 chandransh 22904
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 22905
      if (!getClass().equals(other.getClass())) {
22906
        return getClass().getName().compareTo(other.getClass().getName());
22907
      }
22908
 
22909
      int lastComparison = 0;
553 chandransh 22910
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 22911
 
553 chandransh 22912
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22913
      if (lastComparison != 0) {
22914
        return lastComparison;
22915
      }
553 chandransh 22916
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22917
      if (lastComparison != 0) {
22918
        return lastComparison;
22919
      }
553 chandransh 22920
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 22921
      if (lastComparison != 0) {
22922
        return lastComparison;
22923
      }
553 chandransh 22924
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 22925
      if (lastComparison != 0) {
22926
        return lastComparison;
22927
      }
22928
      return 0;
22929
    }
22930
 
22931
    public void read(TProtocol iprot) throws TException {
22932
      TField field;
22933
      iprot.readStructBegin();
22934
      while (true)
22935
      {
22936
        field = iprot.readFieldBegin();
22937
        if (field.type == TType.STOP) { 
22938
          break;
22939
        }
22940
        _Fields fieldId = _Fields.findByThriftId(field.id);
22941
        if (fieldId == null) {
22942
          TProtocolUtil.skip(iprot, field.type);
22943
        } else {
22944
          switch (fieldId) {
553 chandransh 22945
            case CART_ID:
22946
              if (field.type == TType.I64) {
22947
                this.cartId = iprot.readI64();
22948
                setCartIdIsSet(true);
48 ashish 22949
              } else { 
22950
                TProtocolUtil.skip(iprot, field.type);
22951
              }
22952
              break;
553 chandransh 22953
            case ITEM_ID:
22954
              if (field.type == TType.I64) {
22955
                this.itemId = iprot.readI64();
22956
                setItemIdIsSet(true);
22957
              } else { 
22958
                TProtocolUtil.skip(iprot, field.type);
22959
              }
22960
              break;
22961
          }
22962
          iprot.readFieldEnd();
22963
        }
22964
      }
22965
      iprot.readStructEnd();
22966
      validate();
22967
    }
22968
 
22969
    public void write(TProtocol oprot) throws TException {
22970
      validate();
22971
 
22972
      oprot.writeStructBegin(STRUCT_DESC);
22973
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22974
      oprot.writeI64(this.cartId);
22975
      oprot.writeFieldEnd();
22976
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22977
      oprot.writeI64(this.itemId);
22978
      oprot.writeFieldEnd();
22979
      oprot.writeFieldStop();
22980
      oprot.writeStructEnd();
22981
    }
22982
 
22983
    @Override
22984
    public String toString() {
22985
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
22986
      boolean first = true;
22987
 
22988
      sb.append("cartId:");
22989
      sb.append(this.cartId);
22990
      first = false;
22991
      if (!first) sb.append(", ");
22992
      sb.append("itemId:");
22993
      sb.append(this.itemId);
22994
      first = false;
22995
      sb.append(")");
22996
      return sb.toString();
22997
    }
22998
 
22999
    public void validate() throws TException {
23000
      // check for required fields
23001
    }
23002
 
23003
  }
23004
 
23005
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
23006
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
23007
 
23008
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
23009
 
23010
    private ShoppingCartException scx;
23011
 
23012
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23013
    public enum _Fields implements TFieldIdEnum {
23014
      SCX((short)1, "scx");
23015
 
23016
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23017
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23018
 
23019
      static {
23020
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23021
          byId.put((int)field._thriftId, field);
23022
          byName.put(field.getFieldName(), field);
23023
        }
23024
      }
23025
 
23026
      /**
23027
       * Find the _Fields constant that matches fieldId, or null if its not found.
23028
       */
23029
      public static _Fields findByThriftId(int fieldId) {
23030
        return byId.get(fieldId);
23031
      }
23032
 
23033
      /**
23034
       * Find the _Fields constant that matches fieldId, throwing an exception
23035
       * if it is not found.
23036
       */
23037
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23038
        _Fields fields = findByThriftId(fieldId);
23039
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23040
        return fields;
23041
      }
23042
 
23043
      /**
23044
       * Find the _Fields constant that matches name, or null if its not found.
23045
       */
23046
      public static _Fields findByName(String name) {
23047
        return byName.get(name);
23048
      }
23049
 
23050
      private final short _thriftId;
23051
      private final String _fieldName;
23052
 
23053
      _Fields(short thriftId, String fieldName) {
23054
        _thriftId = thriftId;
23055
        _fieldName = fieldName;
23056
      }
23057
 
23058
      public short getThriftFieldId() {
23059
        return _thriftId;
23060
      }
23061
 
23062
      public String getFieldName() {
23063
        return _fieldName;
23064
      }
23065
    }
23066
 
23067
    // isset id assignments
23068
 
23069
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23070
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23071
          new FieldValueMetaData(TType.STRUCT)));
23072
    }});
23073
 
23074
    static {
23075
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
23076
    }
23077
 
23078
    public deleteItemFromCart_result() {
23079
    }
23080
 
23081
    public deleteItemFromCart_result(
23082
      ShoppingCartException scx)
23083
    {
23084
      this();
23085
      this.scx = scx;
23086
    }
23087
 
23088
    /**
23089
     * Performs a deep copy on <i>other</i>.
23090
     */
23091
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
23092
      if (other.isSetScx()) {
23093
        this.scx = new ShoppingCartException(other.scx);
23094
      }
23095
    }
23096
 
23097
    public deleteItemFromCart_result deepCopy() {
23098
      return new deleteItemFromCart_result(this);
23099
    }
23100
 
23101
    @Deprecated
23102
    public deleteItemFromCart_result clone() {
23103
      return new deleteItemFromCart_result(this);
23104
    }
23105
 
23106
    public ShoppingCartException getScx() {
23107
      return this.scx;
23108
    }
23109
 
23110
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
23111
      this.scx = scx;
23112
      return this;
23113
    }
23114
 
23115
    public void unsetScx() {
23116
      this.scx = null;
23117
    }
23118
 
23119
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23120
    public boolean isSetScx() {
23121
      return this.scx != null;
23122
    }
23123
 
23124
    public void setScxIsSet(boolean value) {
23125
      if (!value) {
23126
        this.scx = null;
23127
      }
23128
    }
23129
 
23130
    public void setFieldValue(_Fields field, Object value) {
23131
      switch (field) {
23132
      case SCX:
23133
        if (value == null) {
23134
          unsetScx();
23135
        } else {
23136
          setScx((ShoppingCartException)value);
23137
        }
23138
        break;
23139
 
23140
      }
23141
    }
23142
 
23143
    public void setFieldValue(int fieldID, Object value) {
23144
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23145
    }
23146
 
23147
    public Object getFieldValue(_Fields field) {
23148
      switch (field) {
23149
      case SCX:
23150
        return getScx();
23151
 
23152
      }
23153
      throw new IllegalStateException();
23154
    }
23155
 
23156
    public Object getFieldValue(int fieldId) {
23157
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23158
    }
23159
 
23160
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23161
    public boolean isSet(_Fields field) {
23162
      switch (field) {
23163
      case SCX:
23164
        return isSetScx();
23165
      }
23166
      throw new IllegalStateException();
23167
    }
23168
 
23169
    public boolean isSet(int fieldID) {
23170
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23171
    }
23172
 
23173
    @Override
23174
    public boolean equals(Object that) {
23175
      if (that == null)
23176
        return false;
23177
      if (that instanceof deleteItemFromCart_result)
23178
        return this.equals((deleteItemFromCart_result)that);
23179
      return false;
23180
    }
23181
 
23182
    public boolean equals(deleteItemFromCart_result that) {
23183
      if (that == null)
23184
        return false;
23185
 
23186
      boolean this_present_scx = true && this.isSetScx();
23187
      boolean that_present_scx = true && that.isSetScx();
23188
      if (this_present_scx || that_present_scx) {
23189
        if (!(this_present_scx && that_present_scx))
23190
          return false;
23191
        if (!this.scx.equals(that.scx))
23192
          return false;
23193
      }
23194
 
23195
      return true;
23196
    }
23197
 
23198
    @Override
23199
    public int hashCode() {
23200
      return 0;
23201
    }
23202
 
23203
    public int compareTo(deleteItemFromCart_result other) {
23204
      if (!getClass().equals(other.getClass())) {
23205
        return getClass().getName().compareTo(other.getClass().getName());
23206
      }
23207
 
23208
      int lastComparison = 0;
23209
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
23210
 
23211
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23212
      if (lastComparison != 0) {
23213
        return lastComparison;
23214
      }
23215
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23216
      if (lastComparison != 0) {
23217
        return lastComparison;
23218
      }
23219
      return 0;
23220
    }
23221
 
23222
    public void read(TProtocol iprot) throws TException {
23223
      TField field;
23224
      iprot.readStructBegin();
23225
      while (true)
23226
      {
23227
        field = iprot.readFieldBegin();
23228
        if (field.type == TType.STOP) { 
23229
          break;
23230
        }
23231
        _Fields fieldId = _Fields.findByThriftId(field.id);
23232
        if (fieldId == null) {
23233
          TProtocolUtil.skip(iprot, field.type);
23234
        } else {
23235
          switch (fieldId) {
23236
            case SCX:
48 ashish 23237
              if (field.type == TType.STRUCT) {
553 chandransh 23238
                this.scx = new ShoppingCartException();
23239
                this.scx.read(iprot);
48 ashish 23240
              } else { 
23241
                TProtocolUtil.skip(iprot, field.type);
23242
              }
23243
              break;
23244
          }
23245
          iprot.readFieldEnd();
23246
        }
23247
      }
23248
      iprot.readStructEnd();
23249
      validate();
23250
    }
23251
 
23252
    public void write(TProtocol oprot) throws TException {
23253
      oprot.writeStructBegin(STRUCT_DESC);
23254
 
553 chandransh 23255
      if (this.isSetScx()) {
23256
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23257
        this.scx.write(oprot);
48 ashish 23258
        oprot.writeFieldEnd();
23259
      }
23260
      oprot.writeFieldStop();
23261
      oprot.writeStructEnd();
23262
    }
23263
 
23264
    @Override
23265
    public String toString() {
553 chandransh 23266
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 23267
      boolean first = true;
23268
 
553 chandransh 23269
      sb.append("scx:");
23270
      if (this.scx == null) {
48 ashish 23271
        sb.append("null");
23272
      } else {
553 chandransh 23273
        sb.append(this.scx);
48 ashish 23274
      }
23275
      first = false;
23276
      sb.append(")");
23277
      return sb.toString();
23278
    }
23279
 
23280
    public void validate() throws TException {
23281
      // check for required fields
23282
    }
23283
 
23284
  }
23285
 
553 chandransh 23286
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
23287
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 23288
 
553 chandransh 23289
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23290
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
23291
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 23292
 
553 chandransh 23293
    private long cartId;
23294
    private long itemId;
23295
    private long quantity;
48 ashish 23296
 
23297
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23298
    public enum _Fields implements TFieldIdEnum {
553 chandransh 23299
      CART_ID((short)1, "cartId"),
23300
      ITEM_ID((short)2, "itemId"),
23301
      QUANTITY((short)3, "quantity");
48 ashish 23302
 
23303
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23304
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23305
 
23306
      static {
23307
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23308
          byId.put((int)field._thriftId, field);
23309
          byName.put(field.getFieldName(), field);
23310
        }
23311
      }
23312
 
23313
      /**
23314
       * Find the _Fields constant that matches fieldId, or null if its not found.
23315
       */
23316
      public static _Fields findByThriftId(int fieldId) {
23317
        return byId.get(fieldId);
23318
      }
23319
 
23320
      /**
23321
       * Find the _Fields constant that matches fieldId, throwing an exception
23322
       * if it is not found.
23323
       */
23324
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23325
        _Fields fields = findByThriftId(fieldId);
23326
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23327
        return fields;
23328
      }
23329
 
23330
      /**
23331
       * Find the _Fields constant that matches name, or null if its not found.
23332
       */
23333
      public static _Fields findByName(String name) {
23334
        return byName.get(name);
23335
      }
23336
 
23337
      private final short _thriftId;
23338
      private final String _fieldName;
23339
 
23340
      _Fields(short thriftId, String fieldName) {
23341
        _thriftId = thriftId;
23342
        _fieldName = fieldName;
23343
      }
23344
 
23345
      public short getThriftFieldId() {
23346
        return _thriftId;
23347
      }
23348
 
23349
      public String getFieldName() {
23350
        return _fieldName;
23351
      }
23352
    }
23353
 
23354
    // isset id assignments
553 chandransh 23355
    private static final int __CARTID_ISSET_ID = 0;
23356
    private static final int __ITEMID_ISSET_ID = 1;
23357
    private static final int __QUANTITY_ISSET_ID = 2;
23358
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 23359
 
23360
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23361
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 23362
          new FieldValueMetaData(TType.I64)));
553 chandransh 23363
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
23364
          new FieldValueMetaData(TType.I64)));
23365
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
23366
          new FieldValueMetaData(TType.I64)));
48 ashish 23367
    }});
23368
 
23369
    static {
553 chandransh 23370
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 23371
    }
23372
 
553 chandransh 23373
    public changeQuantity_args() {
48 ashish 23374
    }
23375
 
553 chandransh 23376
    public changeQuantity_args(
23377
      long cartId,
23378
      long itemId,
23379
      long quantity)
48 ashish 23380
    {
23381
      this();
553 chandransh 23382
      this.cartId = cartId;
23383
      setCartIdIsSet(true);
23384
      this.itemId = itemId;
23385
      setItemIdIsSet(true);
23386
      this.quantity = quantity;
23387
      setQuantityIsSet(true);
48 ashish 23388
    }
23389
 
23390
    /**
23391
     * Performs a deep copy on <i>other</i>.
23392
     */
553 chandransh 23393
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 23394
      __isset_bit_vector.clear();
23395
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 23396
      this.cartId = other.cartId;
23397
      this.itemId = other.itemId;
23398
      this.quantity = other.quantity;
48 ashish 23399
    }
23400
 
553 chandransh 23401
    public changeQuantity_args deepCopy() {
23402
      return new changeQuantity_args(this);
48 ashish 23403
    }
23404
 
23405
    @Deprecated
553 chandransh 23406
    public changeQuantity_args clone() {
23407
      return new changeQuantity_args(this);
48 ashish 23408
    }
23409
 
553 chandransh 23410
    public long getCartId() {
23411
      return this.cartId;
48 ashish 23412
    }
23413
 
553 chandransh 23414
    public changeQuantity_args setCartId(long cartId) {
23415
      this.cartId = cartId;
23416
      setCartIdIsSet(true);
48 ashish 23417
      return this;
23418
    }
23419
 
553 chandransh 23420
    public void unsetCartId() {
23421
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 23422
    }
23423
 
553 chandransh 23424
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23425
    public boolean isSetCartId() {
23426
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 23427
    }
23428
 
553 chandransh 23429
    public void setCartIdIsSet(boolean value) {
23430
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 23431
    }
23432
 
553 chandransh 23433
    public long getItemId() {
23434
      return this.itemId;
23435
    }
23436
 
23437
    public changeQuantity_args setItemId(long itemId) {
23438
      this.itemId = itemId;
23439
      setItemIdIsSet(true);
23440
      return this;
23441
    }
23442
 
23443
    public void unsetItemId() {
23444
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
23445
    }
23446
 
23447
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
23448
    public boolean isSetItemId() {
23449
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
23450
    }
23451
 
23452
    public void setItemIdIsSet(boolean value) {
23453
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
23454
    }
23455
 
23456
    public long getQuantity() {
23457
      return this.quantity;
23458
    }
23459
 
23460
    public changeQuantity_args setQuantity(long quantity) {
23461
      this.quantity = quantity;
23462
      setQuantityIsSet(true);
23463
      return this;
23464
    }
23465
 
23466
    public void unsetQuantity() {
23467
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
23468
    }
23469
 
23470
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
23471
    public boolean isSetQuantity() {
23472
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
23473
    }
23474
 
23475
    public void setQuantityIsSet(boolean value) {
23476
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
23477
    }
23478
 
48 ashish 23479
    public void setFieldValue(_Fields field, Object value) {
23480
      switch (field) {
553 chandransh 23481
      case CART_ID:
48 ashish 23482
        if (value == null) {
553 chandransh 23483
          unsetCartId();
48 ashish 23484
        } else {
553 chandransh 23485
          setCartId((Long)value);
48 ashish 23486
        }
23487
        break;
23488
 
553 chandransh 23489
      case ITEM_ID:
23490
        if (value == null) {
23491
          unsetItemId();
23492
        } else {
23493
          setItemId((Long)value);
23494
        }
23495
        break;
23496
 
23497
      case QUANTITY:
23498
        if (value == null) {
23499
          unsetQuantity();
23500
        } else {
23501
          setQuantity((Long)value);
23502
        }
23503
        break;
23504
 
48 ashish 23505
      }
23506
    }
23507
 
23508
    public void setFieldValue(int fieldID, Object value) {
23509
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23510
    }
23511
 
23512
    public Object getFieldValue(_Fields field) {
23513
      switch (field) {
553 chandransh 23514
      case CART_ID:
23515
        return new Long(getCartId());
48 ashish 23516
 
553 chandransh 23517
      case ITEM_ID:
23518
        return new Long(getItemId());
23519
 
23520
      case QUANTITY:
23521
        return new Long(getQuantity());
23522
 
48 ashish 23523
      }
23524
      throw new IllegalStateException();
23525
    }
23526
 
23527
    public Object getFieldValue(int fieldId) {
23528
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23529
    }
23530
 
23531
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23532
    public boolean isSet(_Fields field) {
23533
      switch (field) {
553 chandransh 23534
      case CART_ID:
23535
        return isSetCartId();
23536
      case ITEM_ID:
23537
        return isSetItemId();
23538
      case QUANTITY:
23539
        return isSetQuantity();
48 ashish 23540
      }
23541
      throw new IllegalStateException();
23542
    }
23543
 
23544
    public boolean isSet(int fieldID) {
23545
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23546
    }
23547
 
23548
    @Override
23549
    public boolean equals(Object that) {
23550
      if (that == null)
23551
        return false;
553 chandransh 23552
      if (that instanceof changeQuantity_args)
23553
        return this.equals((changeQuantity_args)that);
48 ashish 23554
      return false;
23555
    }
23556
 
553 chandransh 23557
    public boolean equals(changeQuantity_args that) {
48 ashish 23558
      if (that == null)
23559
        return false;
23560
 
553 chandransh 23561
      boolean this_present_cartId = true;
23562
      boolean that_present_cartId = true;
23563
      if (this_present_cartId || that_present_cartId) {
23564
        if (!(this_present_cartId && that_present_cartId))
48 ashish 23565
          return false;
553 chandransh 23566
        if (this.cartId != that.cartId)
48 ashish 23567
          return false;
23568
      }
23569
 
553 chandransh 23570
      boolean this_present_itemId = true;
23571
      boolean that_present_itemId = true;
23572
      if (this_present_itemId || that_present_itemId) {
23573
        if (!(this_present_itemId && that_present_itemId))
23574
          return false;
23575
        if (this.itemId != that.itemId)
23576
          return false;
23577
      }
23578
 
23579
      boolean this_present_quantity = true;
23580
      boolean that_present_quantity = true;
23581
      if (this_present_quantity || that_present_quantity) {
23582
        if (!(this_present_quantity && that_present_quantity))
23583
          return false;
23584
        if (this.quantity != that.quantity)
23585
          return false;
23586
      }
23587
 
48 ashish 23588
      return true;
23589
    }
23590
 
23591
    @Override
23592
    public int hashCode() {
23593
      return 0;
23594
    }
23595
 
553 chandransh 23596
    public int compareTo(changeQuantity_args other) {
48 ashish 23597
      if (!getClass().equals(other.getClass())) {
23598
        return getClass().getName().compareTo(other.getClass().getName());
23599
      }
23600
 
23601
      int lastComparison = 0;
553 chandransh 23602
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 23603
 
553 chandransh 23604
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 23605
      if (lastComparison != 0) {
23606
        return lastComparison;
23607
      }
553 chandransh 23608
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 23609
      if (lastComparison != 0) {
23610
        return lastComparison;
23611
      }
553 chandransh 23612
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
23613
      if (lastComparison != 0) {
23614
        return lastComparison;
23615
      }
23616
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
23617
      if (lastComparison != 0) {
23618
        return lastComparison;
23619
      }
23620
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
23621
      if (lastComparison != 0) {
23622
        return lastComparison;
23623
      }
23624
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
23625
      if (lastComparison != 0) {
23626
        return lastComparison;
23627
      }
48 ashish 23628
      return 0;
23629
    }
23630
 
23631
    public void read(TProtocol iprot) throws TException {
23632
      TField field;
23633
      iprot.readStructBegin();
23634
      while (true)
23635
      {
23636
        field = iprot.readFieldBegin();
23637
        if (field.type == TType.STOP) { 
23638
          break;
23639
        }
23640
        _Fields fieldId = _Fields.findByThriftId(field.id);
23641
        if (fieldId == null) {
23642
          TProtocolUtil.skip(iprot, field.type);
23643
        } else {
23644
          switch (fieldId) {
553 chandransh 23645
            case CART_ID:
48 ashish 23646
              if (field.type == TType.I64) {
553 chandransh 23647
                this.cartId = iprot.readI64();
23648
                setCartIdIsSet(true);
48 ashish 23649
              } else { 
23650
                TProtocolUtil.skip(iprot, field.type);
23651
              }
23652
              break;
553 chandransh 23653
            case ITEM_ID:
23654
              if (field.type == TType.I64) {
23655
                this.itemId = iprot.readI64();
23656
                setItemIdIsSet(true);
23657
              } else { 
23658
                TProtocolUtil.skip(iprot, field.type);
23659
              }
23660
              break;
23661
            case QUANTITY:
23662
              if (field.type == TType.I64) {
23663
                this.quantity = iprot.readI64();
23664
                setQuantityIsSet(true);
23665
              } else { 
23666
                TProtocolUtil.skip(iprot, field.type);
23667
              }
23668
              break;
48 ashish 23669
          }
23670
          iprot.readFieldEnd();
23671
        }
23672
      }
23673
      iprot.readStructEnd();
23674
      validate();
23675
    }
23676
 
23677
    public void write(TProtocol oprot) throws TException {
23678
      validate();
23679
 
23680
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 23681
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23682
      oprot.writeI64(this.cartId);
48 ashish 23683
      oprot.writeFieldEnd();
553 chandransh 23684
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
23685
      oprot.writeI64(this.itemId);
23686
      oprot.writeFieldEnd();
23687
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
23688
      oprot.writeI64(this.quantity);
23689
      oprot.writeFieldEnd();
48 ashish 23690
      oprot.writeFieldStop();
23691
      oprot.writeStructEnd();
23692
    }
23693
 
23694
    @Override
23695
    public String toString() {
553 chandransh 23696
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 23697
      boolean first = true;
23698
 
553 chandransh 23699
      sb.append("cartId:");
23700
      sb.append(this.cartId);
48 ashish 23701
      first = false;
553 chandransh 23702
      if (!first) sb.append(", ");
23703
      sb.append("itemId:");
23704
      sb.append(this.itemId);
23705
      first = false;
23706
      if (!first) sb.append(", ");
23707
      sb.append("quantity:");
23708
      sb.append(this.quantity);
23709
      first = false;
48 ashish 23710
      sb.append(")");
23711
      return sb.toString();
23712
    }
23713
 
23714
    public void validate() throws TException {
23715
      // check for required fields
23716
    }
23717
 
23718
  }
23719
 
553 chandransh 23720
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
23721
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 23722
 
553 chandransh 23723
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 23724
 
553 chandransh 23725
    private ShoppingCartException scx;
48 ashish 23726
 
23727
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23728
    public enum _Fields implements TFieldIdEnum {
553 chandransh 23729
      SCX((short)1, "scx");
48 ashish 23730
 
23731
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23732
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23733
 
23734
      static {
23735
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23736
          byId.put((int)field._thriftId, field);
23737
          byName.put(field.getFieldName(), field);
23738
        }
23739
      }
23740
 
23741
      /**
23742
       * Find the _Fields constant that matches fieldId, or null if its not found.
23743
       */
23744
      public static _Fields findByThriftId(int fieldId) {
23745
        return byId.get(fieldId);
23746
      }
23747
 
23748
      /**
23749
       * Find the _Fields constant that matches fieldId, throwing an exception
23750
       * if it is not found.
23751
       */
23752
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23753
        _Fields fields = findByThriftId(fieldId);
23754
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23755
        return fields;
23756
      }
23757
 
23758
      /**
23759
       * Find the _Fields constant that matches name, or null if its not found.
23760
       */
23761
      public static _Fields findByName(String name) {
23762
        return byName.get(name);
23763
      }
23764
 
23765
      private final short _thriftId;
23766
      private final String _fieldName;
23767
 
23768
      _Fields(short thriftId, String fieldName) {
23769
        _thriftId = thriftId;
23770
        _fieldName = fieldName;
23771
      }
23772
 
23773
      public short getThriftFieldId() {
23774
        return _thriftId;
23775
      }
23776
 
23777
      public String getFieldName() {
23778
        return _fieldName;
23779
      }
23780
    }
23781
 
23782
    // isset id assignments
23783
 
23784
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23785
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 23786
          new FieldValueMetaData(TType.STRUCT)));
23787
    }});
23788
 
23789
    static {
553 chandransh 23790
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 23791
    }
23792
 
553 chandransh 23793
    public changeQuantity_result() {
48 ashish 23794
    }
23795
 
553 chandransh 23796
    public changeQuantity_result(
23797
      ShoppingCartException scx)
48 ashish 23798
    {
23799
      this();
553 chandransh 23800
      this.scx = scx;
48 ashish 23801
    }
23802
 
23803
    /**
23804
     * Performs a deep copy on <i>other</i>.
23805
     */
553 chandransh 23806
    public changeQuantity_result(changeQuantity_result other) {
23807
      if (other.isSetScx()) {
23808
        this.scx = new ShoppingCartException(other.scx);
23809
      }
23810
    }
23811
 
23812
    public changeQuantity_result deepCopy() {
23813
      return new changeQuantity_result(this);
23814
    }
23815
 
23816
    @Deprecated
23817
    public changeQuantity_result clone() {
23818
      return new changeQuantity_result(this);
23819
    }
23820
 
23821
    public ShoppingCartException getScx() {
23822
      return this.scx;
23823
    }
23824
 
23825
    public changeQuantity_result setScx(ShoppingCartException scx) {
23826
      this.scx = scx;
23827
      return this;
23828
    }
23829
 
23830
    public void unsetScx() {
23831
      this.scx = null;
23832
    }
23833
 
23834
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23835
    public boolean isSetScx() {
23836
      return this.scx != null;
23837
    }
23838
 
23839
    public void setScxIsSet(boolean value) {
23840
      if (!value) {
23841
        this.scx = null;
23842
      }
23843
    }
23844
 
23845
    public void setFieldValue(_Fields field, Object value) {
23846
      switch (field) {
23847
      case SCX:
23848
        if (value == null) {
23849
          unsetScx();
23850
        } else {
23851
          setScx((ShoppingCartException)value);
23852
        }
23853
        break;
23854
 
23855
      }
23856
    }
23857
 
23858
    public void setFieldValue(int fieldID, Object value) {
23859
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23860
    }
23861
 
23862
    public Object getFieldValue(_Fields field) {
23863
      switch (field) {
23864
      case SCX:
23865
        return getScx();
23866
 
23867
      }
23868
      throw new IllegalStateException();
23869
    }
23870
 
23871
    public Object getFieldValue(int fieldId) {
23872
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23873
    }
23874
 
23875
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23876
    public boolean isSet(_Fields field) {
23877
      switch (field) {
23878
      case SCX:
23879
        return isSetScx();
23880
      }
23881
      throw new IllegalStateException();
23882
    }
23883
 
23884
    public boolean isSet(int fieldID) {
23885
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23886
    }
23887
 
23888
    @Override
23889
    public boolean equals(Object that) {
23890
      if (that == null)
23891
        return false;
23892
      if (that instanceof changeQuantity_result)
23893
        return this.equals((changeQuantity_result)that);
23894
      return false;
23895
    }
23896
 
23897
    public boolean equals(changeQuantity_result that) {
23898
      if (that == null)
23899
        return false;
23900
 
23901
      boolean this_present_scx = true && this.isSetScx();
23902
      boolean that_present_scx = true && that.isSetScx();
23903
      if (this_present_scx || that_present_scx) {
23904
        if (!(this_present_scx && that_present_scx))
23905
          return false;
23906
        if (!this.scx.equals(that.scx))
23907
          return false;
23908
      }
23909
 
23910
      return true;
23911
    }
23912
 
23913
    @Override
23914
    public int hashCode() {
23915
      return 0;
23916
    }
23917
 
23918
    public int compareTo(changeQuantity_result other) {
23919
      if (!getClass().equals(other.getClass())) {
23920
        return getClass().getName().compareTo(other.getClass().getName());
23921
      }
23922
 
23923
      int lastComparison = 0;
23924
      changeQuantity_result typedOther = (changeQuantity_result)other;
23925
 
23926
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23927
      if (lastComparison != 0) {
23928
        return lastComparison;
23929
      }
23930
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23931
      if (lastComparison != 0) {
23932
        return lastComparison;
23933
      }
23934
      return 0;
23935
    }
23936
 
23937
    public void read(TProtocol iprot) throws TException {
23938
      TField field;
23939
      iprot.readStructBegin();
23940
      while (true)
23941
      {
23942
        field = iprot.readFieldBegin();
23943
        if (field.type == TType.STOP) { 
23944
          break;
23945
        }
23946
        _Fields fieldId = _Fields.findByThriftId(field.id);
23947
        if (fieldId == null) {
23948
          TProtocolUtil.skip(iprot, field.type);
23949
        } else {
23950
          switch (fieldId) {
23951
            case SCX:
23952
              if (field.type == TType.STRUCT) {
23953
                this.scx = new ShoppingCartException();
23954
                this.scx.read(iprot);
23955
              } else { 
23956
                TProtocolUtil.skip(iprot, field.type);
23957
              }
23958
              break;
23959
          }
23960
          iprot.readFieldEnd();
23961
        }
23962
      }
23963
      iprot.readStructEnd();
23964
      validate();
23965
    }
23966
 
23967
    public void write(TProtocol oprot) throws TException {
23968
      oprot.writeStructBegin(STRUCT_DESC);
23969
 
23970
      if (this.isSetScx()) {
23971
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23972
        this.scx.write(oprot);
23973
        oprot.writeFieldEnd();
23974
      }
23975
      oprot.writeFieldStop();
23976
      oprot.writeStructEnd();
23977
    }
23978
 
23979
    @Override
23980
    public String toString() {
23981
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
23982
      boolean first = true;
23983
 
23984
      sb.append("scx:");
23985
      if (this.scx == null) {
23986
        sb.append("null");
23987
      } else {
23988
        sb.append(this.scx);
23989
      }
23990
      first = false;
23991
      sb.append(")");
23992
      return sb.toString();
23993
    }
23994
 
23995
    public void validate() throws TException {
23996
      // check for required fields
23997
    }
23998
 
23999
  }
24000
 
24001
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
24002
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
24003
 
24004
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24005
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
24006
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
24007
 
24008
    private long cartId;
24009
    private long itemId;
24010
    private LineStatus status;
24011
 
24012
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24013
    public enum _Fields implements TFieldIdEnum {
24014
      CART_ID((short)1, "cartId"),
24015
      ITEM_ID((short)2, "itemId"),
24016
      /**
24017
       * 
24018
       * @see LineStatus
24019
       */
24020
      STATUS((short)3, "status");
24021
 
24022
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24023
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24024
 
24025
      static {
24026
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24027
          byId.put((int)field._thriftId, field);
24028
          byName.put(field.getFieldName(), field);
24029
        }
24030
      }
24031
 
24032
      /**
24033
       * Find the _Fields constant that matches fieldId, or null if its not found.
24034
       */
24035
      public static _Fields findByThriftId(int fieldId) {
24036
        return byId.get(fieldId);
24037
      }
24038
 
24039
      /**
24040
       * Find the _Fields constant that matches fieldId, throwing an exception
24041
       * if it is not found.
24042
       */
24043
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24044
        _Fields fields = findByThriftId(fieldId);
24045
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24046
        return fields;
24047
      }
24048
 
24049
      /**
24050
       * Find the _Fields constant that matches name, or null if its not found.
24051
       */
24052
      public static _Fields findByName(String name) {
24053
        return byName.get(name);
24054
      }
24055
 
24056
      private final short _thriftId;
24057
      private final String _fieldName;
24058
 
24059
      _Fields(short thriftId, String fieldName) {
24060
        _thriftId = thriftId;
24061
        _fieldName = fieldName;
24062
      }
24063
 
24064
      public short getThriftFieldId() {
24065
        return _thriftId;
24066
      }
24067
 
24068
      public String getFieldName() {
24069
        return _fieldName;
24070
      }
24071
    }
24072
 
24073
    // isset id assignments
24074
    private static final int __CARTID_ISSET_ID = 0;
24075
    private static final int __ITEMID_ISSET_ID = 1;
24076
    private BitSet __isset_bit_vector = new BitSet(2);
24077
 
24078
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24079
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
24080
          new FieldValueMetaData(TType.I64)));
24081
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
24082
          new FieldValueMetaData(TType.I64)));
24083
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
24084
          new EnumMetaData(TType.ENUM, LineStatus.class)));
24085
    }});
24086
 
24087
    static {
24088
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
24089
    }
24090
 
24091
    public changeItemStatus_args() {
24092
    }
24093
 
24094
    public changeItemStatus_args(
24095
      long cartId,
24096
      long itemId,
24097
      LineStatus status)
24098
    {
24099
      this();
24100
      this.cartId = cartId;
24101
      setCartIdIsSet(true);
24102
      this.itemId = itemId;
24103
      setItemIdIsSet(true);
24104
      this.status = status;
24105
    }
24106
 
24107
    /**
24108
     * Performs a deep copy on <i>other</i>.
24109
     */
24110
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 24111
      __isset_bit_vector.clear();
24112
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24113
      this.cartId = other.cartId;
24114
      this.itemId = other.itemId;
24115
      if (other.isSetStatus()) {
24116
        this.status = other.status;
48 ashish 24117
      }
24118
    }
24119
 
553 chandransh 24120
    public changeItemStatus_args deepCopy() {
24121
      return new changeItemStatus_args(this);
48 ashish 24122
    }
24123
 
24124
    @Deprecated
553 chandransh 24125
    public changeItemStatus_args clone() {
24126
      return new changeItemStatus_args(this);
48 ashish 24127
    }
24128
 
553 chandransh 24129
    public long getCartId() {
24130
      return this.cartId;
48 ashish 24131
    }
24132
 
553 chandransh 24133
    public changeItemStatus_args setCartId(long cartId) {
24134
      this.cartId = cartId;
24135
      setCartIdIsSet(true);
48 ashish 24136
      return this;
24137
    }
24138
 
553 chandransh 24139
    public void unsetCartId() {
24140
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24141
    }
24142
 
553 chandransh 24143
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24144
    public boolean isSetCartId() {
24145
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24146
    }
24147
 
553 chandransh 24148
    public void setCartIdIsSet(boolean value) {
24149
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24150
    }
24151
 
553 chandransh 24152
    public long getItemId() {
24153
      return this.itemId;
48 ashish 24154
    }
24155
 
553 chandransh 24156
    public changeItemStatus_args setItemId(long itemId) {
24157
      this.itemId = itemId;
24158
      setItemIdIsSet(true);
48 ashish 24159
      return this;
24160
    }
24161
 
553 chandransh 24162
    public void unsetItemId() {
24163
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 24164
    }
24165
 
553 chandransh 24166
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
24167
    public boolean isSetItemId() {
24168
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 24169
    }
24170
 
553 chandransh 24171
    public void setItemIdIsSet(boolean value) {
24172
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
24173
    }
24174
 
24175
    /**
24176
     * 
24177
     * @see LineStatus
24178
     */
24179
    public LineStatus getStatus() {
24180
      return this.status;
24181
    }
24182
 
24183
    /**
24184
     * 
24185
     * @see LineStatus
24186
     */
24187
    public changeItemStatus_args setStatus(LineStatus status) {
24188
      this.status = status;
24189
      return this;
24190
    }
24191
 
24192
    public void unsetStatus() {
24193
      this.status = null;
24194
    }
24195
 
24196
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
24197
    public boolean isSetStatus() {
24198
      return this.status != null;
24199
    }
24200
 
24201
    public void setStatusIsSet(boolean value) {
48 ashish 24202
      if (!value) {
553 chandransh 24203
        this.status = null;
48 ashish 24204
      }
24205
    }
24206
 
24207
    public void setFieldValue(_Fields field, Object value) {
24208
      switch (field) {
553 chandransh 24209
      case CART_ID:
48 ashish 24210
        if (value == null) {
553 chandransh 24211
          unsetCartId();
48 ashish 24212
        } else {
553 chandransh 24213
          setCartId((Long)value);
48 ashish 24214
        }
24215
        break;
24216
 
553 chandransh 24217
      case ITEM_ID:
48 ashish 24218
        if (value == null) {
553 chandransh 24219
          unsetItemId();
48 ashish 24220
        } else {
553 chandransh 24221
          setItemId((Long)value);
48 ashish 24222
        }
24223
        break;
24224
 
553 chandransh 24225
      case STATUS:
24226
        if (value == null) {
24227
          unsetStatus();
24228
        } else {
24229
          setStatus((LineStatus)value);
24230
        }
24231
        break;
24232
 
48 ashish 24233
      }
24234
    }
24235
 
24236
    public void setFieldValue(int fieldID, Object value) {
24237
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24238
    }
24239
 
24240
    public Object getFieldValue(_Fields field) {
24241
      switch (field) {
553 chandransh 24242
      case CART_ID:
24243
        return new Long(getCartId());
48 ashish 24244
 
553 chandransh 24245
      case ITEM_ID:
24246
        return new Long(getItemId());
48 ashish 24247
 
553 chandransh 24248
      case STATUS:
24249
        return getStatus();
24250
 
48 ashish 24251
      }
24252
      throw new IllegalStateException();
24253
    }
24254
 
24255
    public Object getFieldValue(int fieldId) {
24256
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24257
    }
24258
 
24259
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24260
    public boolean isSet(_Fields field) {
24261
      switch (field) {
553 chandransh 24262
      case CART_ID:
24263
        return isSetCartId();
24264
      case ITEM_ID:
24265
        return isSetItemId();
24266
      case STATUS:
24267
        return isSetStatus();
48 ashish 24268
      }
24269
      throw new IllegalStateException();
24270
    }
24271
 
24272
    public boolean isSet(int fieldID) {
24273
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24274
    }
24275
 
24276
    @Override
24277
    public boolean equals(Object that) {
24278
      if (that == null)
24279
        return false;
553 chandransh 24280
      if (that instanceof changeItemStatus_args)
24281
        return this.equals((changeItemStatus_args)that);
48 ashish 24282
      return false;
24283
    }
24284
 
553 chandransh 24285
    public boolean equals(changeItemStatus_args that) {
48 ashish 24286
      if (that == null)
24287
        return false;
24288
 
553 chandransh 24289
      boolean this_present_cartId = true;
24290
      boolean that_present_cartId = true;
24291
      if (this_present_cartId || that_present_cartId) {
24292
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24293
          return false;
553 chandransh 24294
        if (this.cartId != that.cartId)
48 ashish 24295
          return false;
24296
      }
24297
 
553 chandransh 24298
      boolean this_present_itemId = true;
24299
      boolean that_present_itemId = true;
24300
      if (this_present_itemId || that_present_itemId) {
24301
        if (!(this_present_itemId && that_present_itemId))
48 ashish 24302
          return false;
553 chandransh 24303
        if (this.itemId != that.itemId)
48 ashish 24304
          return false;
24305
      }
24306
 
553 chandransh 24307
      boolean this_present_status = true && this.isSetStatus();
24308
      boolean that_present_status = true && that.isSetStatus();
24309
      if (this_present_status || that_present_status) {
24310
        if (!(this_present_status && that_present_status))
24311
          return false;
24312
        if (!this.status.equals(that.status))
24313
          return false;
24314
      }
24315
 
48 ashish 24316
      return true;
24317
    }
24318
 
24319
    @Override
24320
    public int hashCode() {
24321
      return 0;
24322
    }
24323
 
553 chandransh 24324
    public int compareTo(changeItemStatus_args other) {
48 ashish 24325
      if (!getClass().equals(other.getClass())) {
24326
        return getClass().getName().compareTo(other.getClass().getName());
24327
      }
24328
 
24329
      int lastComparison = 0;
553 chandransh 24330
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 24331
 
553 chandransh 24332
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24333
      if (lastComparison != 0) {
24334
        return lastComparison;
24335
      }
553 chandransh 24336
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24337
      if (lastComparison != 0) {
24338
        return lastComparison;
24339
      }
553 chandransh 24340
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 24341
      if (lastComparison != 0) {
24342
        return lastComparison;
24343
      }
553 chandransh 24344
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 24345
      if (lastComparison != 0) {
24346
        return lastComparison;
24347
      }
553 chandransh 24348
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
24349
      if (lastComparison != 0) {
24350
        return lastComparison;
24351
      }
24352
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
24353
      if (lastComparison != 0) {
24354
        return lastComparison;
24355
      }
48 ashish 24356
      return 0;
24357
    }
24358
 
24359
    public void read(TProtocol iprot) throws TException {
24360
      TField field;
24361
      iprot.readStructBegin();
24362
      while (true)
24363
      {
24364
        field = iprot.readFieldBegin();
24365
        if (field.type == TType.STOP) { 
24366
          break;
24367
        }
24368
        _Fields fieldId = _Fields.findByThriftId(field.id);
24369
        if (fieldId == null) {
24370
          TProtocolUtil.skip(iprot, field.type);
24371
        } else {
24372
          switch (fieldId) {
553 chandransh 24373
            case CART_ID:
24374
              if (field.type == TType.I64) {
24375
                this.cartId = iprot.readI64();
24376
                setCartIdIsSet(true);
48 ashish 24377
              } else { 
24378
                TProtocolUtil.skip(iprot, field.type);
24379
              }
24380
              break;
553 chandransh 24381
            case ITEM_ID:
24382
              if (field.type == TType.I64) {
24383
                this.itemId = iprot.readI64();
24384
                setItemIdIsSet(true);
48 ashish 24385
              } else { 
24386
                TProtocolUtil.skip(iprot, field.type);
24387
              }
24388
              break;
553 chandransh 24389
            case STATUS:
24390
              if (field.type == TType.I32) {
24391
                this.status = LineStatus.findByValue(iprot.readI32());
24392
              } else { 
24393
                TProtocolUtil.skip(iprot, field.type);
24394
              }
24395
              break;
48 ashish 24396
          }
24397
          iprot.readFieldEnd();
24398
        }
24399
      }
24400
      iprot.readStructEnd();
24401
      validate();
24402
    }
24403
 
24404
    public void write(TProtocol oprot) throws TException {
553 chandransh 24405
      validate();
24406
 
48 ashish 24407
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24408
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24409
      oprot.writeI64(this.cartId);
24410
      oprot.writeFieldEnd();
24411
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
24412
      oprot.writeI64(this.itemId);
24413
      oprot.writeFieldEnd();
24414
      if (this.status != null) {
24415
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
24416
        oprot.writeI32(this.status.getValue());
48 ashish 24417
        oprot.writeFieldEnd();
24418
      }
24419
      oprot.writeFieldStop();
24420
      oprot.writeStructEnd();
24421
    }
24422
 
24423
    @Override
24424
    public String toString() {
553 chandransh 24425
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 24426
      boolean first = true;
24427
 
553 chandransh 24428
      sb.append("cartId:");
24429
      sb.append(this.cartId);
48 ashish 24430
      first = false;
24431
      if (!first) sb.append(", ");
553 chandransh 24432
      sb.append("itemId:");
24433
      sb.append(this.itemId);
24434
      first = false;
24435
      if (!first) sb.append(", ");
24436
      sb.append("status:");
24437
      if (this.status == null) {
48 ashish 24438
        sb.append("null");
24439
      } else {
553 chandransh 24440
        String status_name = status.name();
24441
        if (status_name != null) {
24442
          sb.append(status_name);
24443
          sb.append(" (");
24444
        }
24445
        sb.append(this.status);
24446
        if (status_name != null) {
24447
          sb.append(")");
24448
        }
48 ashish 24449
      }
24450
      first = false;
24451
      sb.append(")");
24452
      return sb.toString();
24453
    }
24454
 
24455
    public void validate() throws TException {
24456
      // check for required fields
24457
    }
24458
 
24459
  }
24460
 
553 chandransh 24461
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
24462
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 24463
 
553 chandransh 24464
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 24465
 
553 chandransh 24466
    private ShoppingCartException scx;
48 ashish 24467
 
24468
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24469
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24470
      SCX((short)1, "scx");
48 ashish 24471
 
24472
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24473
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24474
 
24475
      static {
24476
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24477
          byId.put((int)field._thriftId, field);
24478
          byName.put(field.getFieldName(), field);
24479
        }
24480
      }
24481
 
24482
      /**
24483
       * Find the _Fields constant that matches fieldId, or null if its not found.
24484
       */
24485
      public static _Fields findByThriftId(int fieldId) {
24486
        return byId.get(fieldId);
24487
      }
24488
 
24489
      /**
24490
       * Find the _Fields constant that matches fieldId, throwing an exception
24491
       * if it is not found.
24492
       */
24493
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24494
        _Fields fields = findByThriftId(fieldId);
24495
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24496
        return fields;
24497
      }
24498
 
24499
      /**
24500
       * Find the _Fields constant that matches name, or null if its not found.
24501
       */
24502
      public static _Fields findByName(String name) {
24503
        return byName.get(name);
24504
      }
24505
 
24506
      private final short _thriftId;
24507
      private final String _fieldName;
24508
 
24509
      _Fields(short thriftId, String fieldName) {
24510
        _thriftId = thriftId;
24511
        _fieldName = fieldName;
24512
      }
24513
 
24514
      public short getThriftFieldId() {
24515
        return _thriftId;
24516
      }
24517
 
24518
      public String getFieldName() {
24519
        return _fieldName;
24520
      }
24521
    }
24522
 
24523
    // isset id assignments
553 chandransh 24524
 
24525
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24526
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
24527
          new FieldValueMetaData(TType.STRUCT)));
24528
    }});
24529
 
24530
    static {
24531
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
24532
    }
24533
 
24534
    public changeItemStatus_result() {
24535
    }
24536
 
24537
    public changeItemStatus_result(
24538
      ShoppingCartException scx)
24539
    {
24540
      this();
24541
      this.scx = scx;
24542
    }
24543
 
24544
    /**
24545
     * Performs a deep copy on <i>other</i>.
24546
     */
24547
    public changeItemStatus_result(changeItemStatus_result other) {
24548
      if (other.isSetScx()) {
24549
        this.scx = new ShoppingCartException(other.scx);
24550
      }
24551
    }
24552
 
24553
    public changeItemStatus_result deepCopy() {
24554
      return new changeItemStatus_result(this);
24555
    }
24556
 
24557
    @Deprecated
24558
    public changeItemStatus_result clone() {
24559
      return new changeItemStatus_result(this);
24560
    }
24561
 
24562
    public ShoppingCartException getScx() {
24563
      return this.scx;
24564
    }
24565
 
24566
    public changeItemStatus_result setScx(ShoppingCartException scx) {
24567
      this.scx = scx;
24568
      return this;
24569
    }
24570
 
24571
    public void unsetScx() {
24572
      this.scx = null;
24573
    }
24574
 
24575
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24576
    public boolean isSetScx() {
24577
      return this.scx != null;
24578
    }
24579
 
24580
    public void setScxIsSet(boolean value) {
24581
      if (!value) {
24582
        this.scx = null;
24583
      }
24584
    }
24585
 
24586
    public void setFieldValue(_Fields field, Object value) {
24587
      switch (field) {
24588
      case SCX:
24589
        if (value == null) {
24590
          unsetScx();
24591
        } else {
24592
          setScx((ShoppingCartException)value);
24593
        }
24594
        break;
24595
 
24596
      }
24597
    }
24598
 
24599
    public void setFieldValue(int fieldID, Object value) {
24600
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24601
    }
24602
 
24603
    public Object getFieldValue(_Fields field) {
24604
      switch (field) {
24605
      case SCX:
24606
        return getScx();
24607
 
24608
      }
24609
      throw new IllegalStateException();
24610
    }
24611
 
24612
    public Object getFieldValue(int fieldId) {
24613
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24614
    }
24615
 
24616
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24617
    public boolean isSet(_Fields field) {
24618
      switch (field) {
24619
      case SCX:
24620
        return isSetScx();
24621
      }
24622
      throw new IllegalStateException();
24623
    }
24624
 
24625
    public boolean isSet(int fieldID) {
24626
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24627
    }
24628
 
24629
    @Override
24630
    public boolean equals(Object that) {
24631
      if (that == null)
24632
        return false;
24633
      if (that instanceof changeItemStatus_result)
24634
        return this.equals((changeItemStatus_result)that);
24635
      return false;
24636
    }
24637
 
24638
    public boolean equals(changeItemStatus_result that) {
24639
      if (that == null)
24640
        return false;
24641
 
24642
      boolean this_present_scx = true && this.isSetScx();
24643
      boolean that_present_scx = true && that.isSetScx();
24644
      if (this_present_scx || that_present_scx) {
24645
        if (!(this_present_scx && that_present_scx))
24646
          return false;
24647
        if (!this.scx.equals(that.scx))
24648
          return false;
24649
      }
24650
 
24651
      return true;
24652
    }
24653
 
24654
    @Override
24655
    public int hashCode() {
24656
      return 0;
24657
    }
24658
 
24659
    public int compareTo(changeItemStatus_result other) {
24660
      if (!getClass().equals(other.getClass())) {
24661
        return getClass().getName().compareTo(other.getClass().getName());
24662
      }
24663
 
24664
      int lastComparison = 0;
24665
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
24666
 
24667
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24668
      if (lastComparison != 0) {
24669
        return lastComparison;
24670
      }
24671
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24672
      if (lastComparison != 0) {
24673
        return lastComparison;
24674
      }
24675
      return 0;
24676
    }
24677
 
24678
    public void read(TProtocol iprot) throws TException {
24679
      TField field;
24680
      iprot.readStructBegin();
24681
      while (true)
24682
      {
24683
        field = iprot.readFieldBegin();
24684
        if (field.type == TType.STOP) { 
24685
          break;
24686
        }
24687
        _Fields fieldId = _Fields.findByThriftId(field.id);
24688
        if (fieldId == null) {
24689
          TProtocolUtil.skip(iprot, field.type);
24690
        } else {
24691
          switch (fieldId) {
24692
            case SCX:
24693
              if (field.type == TType.STRUCT) {
24694
                this.scx = new ShoppingCartException();
24695
                this.scx.read(iprot);
24696
              } else { 
24697
                TProtocolUtil.skip(iprot, field.type);
24698
              }
24699
              break;
24700
          }
24701
          iprot.readFieldEnd();
24702
        }
24703
      }
24704
      iprot.readStructEnd();
24705
      validate();
24706
    }
24707
 
24708
    public void write(TProtocol oprot) throws TException {
24709
      oprot.writeStructBegin(STRUCT_DESC);
24710
 
24711
      if (this.isSetScx()) {
24712
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24713
        this.scx.write(oprot);
24714
        oprot.writeFieldEnd();
24715
      }
24716
      oprot.writeFieldStop();
24717
      oprot.writeStructEnd();
24718
    }
24719
 
24720
    @Override
24721
    public String toString() {
24722
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
24723
      boolean first = true;
24724
 
24725
      sb.append("scx:");
24726
      if (this.scx == null) {
24727
        sb.append("null");
24728
      } else {
24729
        sb.append(this.scx);
24730
      }
24731
      first = false;
24732
      sb.append(")");
24733
      return sb.toString();
24734
    }
24735
 
24736
    public void validate() throws TException {
24737
      // check for required fields
24738
    }
24739
 
24740
  }
24741
 
24742
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
24743
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
24744
 
24745
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24746
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
24747
 
24748
    private long cartId;
24749
    private long addressId;
24750
 
24751
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24752
    public enum _Fields implements TFieldIdEnum {
24753
      CART_ID((short)1, "cartId"),
24754
      ADDRESS_ID((short)2, "addressId");
24755
 
24756
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24757
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24758
 
24759
      static {
24760
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24761
          byId.put((int)field._thriftId, field);
24762
          byName.put(field.getFieldName(), field);
24763
        }
24764
      }
24765
 
24766
      /**
24767
       * Find the _Fields constant that matches fieldId, or null if its not found.
24768
       */
24769
      public static _Fields findByThriftId(int fieldId) {
24770
        return byId.get(fieldId);
24771
      }
24772
 
24773
      /**
24774
       * Find the _Fields constant that matches fieldId, throwing an exception
24775
       * if it is not found.
24776
       */
24777
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24778
        _Fields fields = findByThriftId(fieldId);
24779
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24780
        return fields;
24781
      }
24782
 
24783
      /**
24784
       * Find the _Fields constant that matches name, or null if its not found.
24785
       */
24786
      public static _Fields findByName(String name) {
24787
        return byName.get(name);
24788
      }
24789
 
24790
      private final short _thriftId;
24791
      private final String _fieldName;
24792
 
24793
      _Fields(short thriftId, String fieldName) {
24794
        _thriftId = thriftId;
24795
        _fieldName = fieldName;
24796
      }
24797
 
24798
      public short getThriftFieldId() {
24799
        return _thriftId;
24800
      }
24801
 
24802
      public String getFieldName() {
24803
        return _fieldName;
24804
      }
24805
    }
24806
 
24807
    // isset id assignments
24808
    private static final int __CARTID_ISSET_ID = 0;
24809
    private static final int __ADDRESSID_ISSET_ID = 1;
24810
    private BitSet __isset_bit_vector = new BitSet(2);
24811
 
24812
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24813
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
24814
          new FieldValueMetaData(TType.I64)));
24815
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
24816
          new FieldValueMetaData(TType.I64)));
24817
    }});
24818
 
24819
    static {
24820
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
24821
    }
24822
 
24823
    public addAddressToCart_args() {
24824
    }
24825
 
24826
    public addAddressToCart_args(
24827
      long cartId,
24828
      long addressId)
24829
    {
24830
      this();
24831
      this.cartId = cartId;
24832
      setCartIdIsSet(true);
24833
      this.addressId = addressId;
24834
      setAddressIdIsSet(true);
24835
    }
24836
 
24837
    /**
24838
     * Performs a deep copy on <i>other</i>.
24839
     */
24840
    public addAddressToCart_args(addAddressToCart_args other) {
24841
      __isset_bit_vector.clear();
24842
      __isset_bit_vector.or(other.__isset_bit_vector);
24843
      this.cartId = other.cartId;
24844
      this.addressId = other.addressId;
24845
    }
24846
 
24847
    public addAddressToCart_args deepCopy() {
24848
      return new addAddressToCart_args(this);
24849
    }
24850
 
24851
    @Deprecated
24852
    public addAddressToCart_args clone() {
24853
      return new addAddressToCart_args(this);
24854
    }
24855
 
24856
    public long getCartId() {
24857
      return this.cartId;
24858
    }
24859
 
24860
    public addAddressToCart_args setCartId(long cartId) {
24861
      this.cartId = cartId;
24862
      setCartIdIsSet(true);
24863
      return this;
24864
    }
24865
 
24866
    public void unsetCartId() {
24867
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
24868
    }
24869
 
24870
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24871
    public boolean isSetCartId() {
24872
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
24873
    }
24874
 
24875
    public void setCartIdIsSet(boolean value) {
24876
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
24877
    }
24878
 
24879
    public long getAddressId() {
24880
      return this.addressId;
24881
    }
24882
 
24883
    public addAddressToCart_args setAddressId(long addressId) {
24884
      this.addressId = addressId;
24885
      setAddressIdIsSet(true);
24886
      return this;
24887
    }
24888
 
24889
    public void unsetAddressId() {
24890
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
24891
    }
24892
 
24893
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
24894
    public boolean isSetAddressId() {
24895
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
24896
    }
24897
 
24898
    public void setAddressIdIsSet(boolean value) {
24899
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
24900
    }
24901
 
24902
    public void setFieldValue(_Fields field, Object value) {
24903
      switch (field) {
24904
      case CART_ID:
24905
        if (value == null) {
24906
          unsetCartId();
24907
        } else {
24908
          setCartId((Long)value);
24909
        }
24910
        break;
24911
 
24912
      case ADDRESS_ID:
24913
        if (value == null) {
24914
          unsetAddressId();
24915
        } else {
24916
          setAddressId((Long)value);
24917
        }
24918
        break;
24919
 
24920
      }
24921
    }
24922
 
24923
    public void setFieldValue(int fieldID, Object value) {
24924
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24925
    }
24926
 
24927
    public Object getFieldValue(_Fields field) {
24928
      switch (field) {
24929
      case CART_ID:
24930
        return new Long(getCartId());
24931
 
24932
      case ADDRESS_ID:
24933
        return new Long(getAddressId());
24934
 
24935
      }
24936
      throw new IllegalStateException();
24937
    }
24938
 
24939
    public Object getFieldValue(int fieldId) {
24940
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24941
    }
24942
 
24943
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24944
    public boolean isSet(_Fields field) {
24945
      switch (field) {
24946
      case CART_ID:
24947
        return isSetCartId();
24948
      case ADDRESS_ID:
24949
        return isSetAddressId();
24950
      }
24951
      throw new IllegalStateException();
24952
    }
24953
 
24954
    public boolean isSet(int fieldID) {
24955
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24956
    }
24957
 
24958
    @Override
24959
    public boolean equals(Object that) {
24960
      if (that == null)
24961
        return false;
24962
      if (that instanceof addAddressToCart_args)
24963
        return this.equals((addAddressToCart_args)that);
24964
      return false;
24965
    }
24966
 
24967
    public boolean equals(addAddressToCart_args that) {
24968
      if (that == null)
24969
        return false;
24970
 
24971
      boolean this_present_cartId = true;
24972
      boolean that_present_cartId = true;
24973
      if (this_present_cartId || that_present_cartId) {
24974
        if (!(this_present_cartId && that_present_cartId))
24975
          return false;
24976
        if (this.cartId != that.cartId)
24977
          return false;
24978
      }
24979
 
24980
      boolean this_present_addressId = true;
24981
      boolean that_present_addressId = true;
24982
      if (this_present_addressId || that_present_addressId) {
24983
        if (!(this_present_addressId && that_present_addressId))
24984
          return false;
24985
        if (this.addressId != that.addressId)
24986
          return false;
24987
      }
24988
 
24989
      return true;
24990
    }
24991
 
24992
    @Override
24993
    public int hashCode() {
24994
      return 0;
24995
    }
24996
 
24997
    public int compareTo(addAddressToCart_args other) {
24998
      if (!getClass().equals(other.getClass())) {
24999
        return getClass().getName().compareTo(other.getClass().getName());
25000
      }
25001
 
25002
      int lastComparison = 0;
25003
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
25004
 
25005
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
25006
      if (lastComparison != 0) {
25007
        return lastComparison;
25008
      }
25009
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
25010
      if (lastComparison != 0) {
25011
        return lastComparison;
25012
      }
25013
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
25014
      if (lastComparison != 0) {
25015
        return lastComparison;
25016
      }
25017
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
25018
      if (lastComparison != 0) {
25019
        return lastComparison;
25020
      }
25021
      return 0;
25022
    }
25023
 
25024
    public void read(TProtocol iprot) throws TException {
25025
      TField field;
25026
      iprot.readStructBegin();
25027
      while (true)
25028
      {
25029
        field = iprot.readFieldBegin();
25030
        if (field.type == TType.STOP) { 
25031
          break;
25032
        }
25033
        _Fields fieldId = _Fields.findByThriftId(field.id);
25034
        if (fieldId == null) {
25035
          TProtocolUtil.skip(iprot, field.type);
25036
        } else {
25037
          switch (fieldId) {
25038
            case CART_ID:
25039
              if (field.type == TType.I64) {
25040
                this.cartId = iprot.readI64();
25041
                setCartIdIsSet(true);
25042
              } else { 
25043
                TProtocolUtil.skip(iprot, field.type);
25044
              }
25045
              break;
25046
            case ADDRESS_ID:
25047
              if (field.type == TType.I64) {
25048
                this.addressId = iprot.readI64();
25049
                setAddressIdIsSet(true);
25050
              } else { 
25051
                TProtocolUtil.skip(iprot, field.type);
25052
              }
25053
              break;
25054
          }
25055
          iprot.readFieldEnd();
25056
        }
25057
      }
25058
      iprot.readStructEnd();
25059
      validate();
25060
    }
25061
 
25062
    public void write(TProtocol oprot) throws TException {
25063
      validate();
25064
 
25065
      oprot.writeStructBegin(STRUCT_DESC);
25066
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25067
      oprot.writeI64(this.cartId);
25068
      oprot.writeFieldEnd();
25069
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
25070
      oprot.writeI64(this.addressId);
25071
      oprot.writeFieldEnd();
25072
      oprot.writeFieldStop();
25073
      oprot.writeStructEnd();
25074
    }
25075
 
25076
    @Override
25077
    public String toString() {
25078
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
25079
      boolean first = true;
25080
 
25081
      sb.append("cartId:");
25082
      sb.append(this.cartId);
25083
      first = false;
25084
      if (!first) sb.append(", ");
25085
      sb.append("addressId:");
25086
      sb.append(this.addressId);
25087
      first = false;
25088
      sb.append(")");
25089
      return sb.toString();
25090
    }
25091
 
25092
    public void validate() throws TException {
25093
      // check for required fields
25094
    }
25095
 
25096
  }
25097
 
25098
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
25099
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
25100
 
578 chandransh 25101
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 25102
 
578 chandransh 25103
    private ShoppingCartException scx;
553 chandransh 25104
 
25105
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25106
    public enum _Fields implements TFieldIdEnum {
578 chandransh 25107
      SCX((short)1, "scx");
553 chandransh 25108
 
25109
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25110
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25111
 
25112
      static {
25113
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25114
          byId.put((int)field._thriftId, field);
25115
          byName.put(field.getFieldName(), field);
25116
        }
25117
      }
25118
 
25119
      /**
25120
       * Find the _Fields constant that matches fieldId, or null if its not found.
25121
       */
25122
      public static _Fields findByThriftId(int fieldId) {
25123
        return byId.get(fieldId);
25124
      }
25125
 
25126
      /**
25127
       * Find the _Fields constant that matches fieldId, throwing an exception
25128
       * if it is not found.
25129
       */
25130
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25131
        _Fields fields = findByThriftId(fieldId);
25132
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25133
        return fields;
25134
      }
25135
 
25136
      /**
25137
       * Find the _Fields constant that matches name, or null if its not found.
25138
       */
25139
      public static _Fields findByName(String name) {
25140
        return byName.get(name);
25141
      }
25142
 
25143
      private final short _thriftId;
25144
      private final String _fieldName;
25145
 
25146
      _Fields(short thriftId, String fieldName) {
25147
        _thriftId = thriftId;
25148
        _fieldName = fieldName;
25149
      }
25150
 
25151
      public short getThriftFieldId() {
25152
        return _thriftId;
25153
      }
25154
 
25155
      public String getFieldName() {
25156
        return _fieldName;
25157
      }
25158
    }
578 chandransh 25159
 
25160
    // isset id assignments
25161
 
553 chandransh 25162
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 25163
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25164
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 25165
    }});
25166
 
25167
    static {
25168
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
25169
    }
25170
 
25171
    public addAddressToCart_result() {
25172
    }
25173
 
578 chandransh 25174
    public addAddressToCart_result(
25175
      ShoppingCartException scx)
25176
    {
25177
      this();
25178
      this.scx = scx;
25179
    }
25180
 
553 chandransh 25181
    /**
25182
     * Performs a deep copy on <i>other</i>.
25183
     */
25184
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 25185
      if (other.isSetScx()) {
25186
        this.scx = new ShoppingCartException(other.scx);
25187
      }
553 chandransh 25188
    }
25189
 
25190
    public addAddressToCart_result deepCopy() {
25191
      return new addAddressToCart_result(this);
25192
    }
25193
 
25194
    @Deprecated
25195
    public addAddressToCart_result clone() {
25196
      return new addAddressToCart_result(this);
25197
    }
25198
 
578 chandransh 25199
    public ShoppingCartException getScx() {
25200
      return this.scx;
25201
    }
25202
 
25203
    public addAddressToCart_result setScx(ShoppingCartException scx) {
25204
      this.scx = scx;
25205
      return this;
25206
    }
25207
 
25208
    public void unsetScx() {
25209
      this.scx = null;
25210
    }
25211
 
25212
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25213
    public boolean isSetScx() {
25214
      return this.scx != null;
25215
    }
25216
 
25217
    public void setScxIsSet(boolean value) {
25218
      if (!value) {
25219
        this.scx = null;
25220
      }
25221
    }
25222
 
553 chandransh 25223
    public void setFieldValue(_Fields field, Object value) {
25224
      switch (field) {
578 chandransh 25225
      case SCX:
25226
        if (value == null) {
25227
          unsetScx();
25228
        } else {
25229
          setScx((ShoppingCartException)value);
25230
        }
25231
        break;
25232
 
553 chandransh 25233
      }
25234
    }
25235
 
25236
    public void setFieldValue(int fieldID, Object value) {
25237
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25238
    }
25239
 
25240
    public Object getFieldValue(_Fields field) {
25241
      switch (field) {
578 chandransh 25242
      case SCX:
25243
        return getScx();
25244
 
553 chandransh 25245
      }
25246
      throw new IllegalStateException();
25247
    }
25248
 
25249
    public Object getFieldValue(int fieldId) {
25250
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25251
    }
25252
 
25253
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25254
    public boolean isSet(_Fields field) {
25255
      switch (field) {
578 chandransh 25256
      case SCX:
25257
        return isSetScx();
553 chandransh 25258
      }
25259
      throw new IllegalStateException();
25260
    }
25261
 
25262
    public boolean isSet(int fieldID) {
25263
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25264
    }
25265
 
25266
    @Override
25267
    public boolean equals(Object that) {
25268
      if (that == null)
25269
        return false;
25270
      if (that instanceof addAddressToCart_result)
25271
        return this.equals((addAddressToCart_result)that);
25272
      return false;
25273
    }
25274
 
25275
    public boolean equals(addAddressToCart_result that) {
25276
      if (that == null)
25277
        return false;
25278
 
578 chandransh 25279
      boolean this_present_scx = true && this.isSetScx();
25280
      boolean that_present_scx = true && that.isSetScx();
25281
      if (this_present_scx || that_present_scx) {
25282
        if (!(this_present_scx && that_present_scx))
25283
          return false;
25284
        if (!this.scx.equals(that.scx))
25285
          return false;
25286
      }
25287
 
553 chandransh 25288
      return true;
25289
    }
25290
 
25291
    @Override
25292
    public int hashCode() {
25293
      return 0;
25294
    }
25295
 
25296
    public int compareTo(addAddressToCart_result other) {
25297
      if (!getClass().equals(other.getClass())) {
25298
        return getClass().getName().compareTo(other.getClass().getName());
25299
      }
25300
 
25301
      int lastComparison = 0;
25302
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
25303
 
578 chandransh 25304
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
25305
      if (lastComparison != 0) {
25306
        return lastComparison;
25307
      }
25308
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
25309
      if (lastComparison != 0) {
25310
        return lastComparison;
25311
      }
553 chandransh 25312
      return 0;
25313
    }
25314
 
25315
    public void read(TProtocol iprot) throws TException {
25316
      TField field;
25317
      iprot.readStructBegin();
25318
      while (true)
25319
      {
25320
        field = iprot.readFieldBegin();
25321
        if (field.type == TType.STOP) { 
25322
          break;
25323
        }
25324
        _Fields fieldId = _Fields.findByThriftId(field.id);
25325
        if (fieldId == null) {
25326
          TProtocolUtil.skip(iprot, field.type);
25327
        } else {
25328
          switch (fieldId) {
578 chandransh 25329
            case SCX:
25330
              if (field.type == TType.STRUCT) {
25331
                this.scx = new ShoppingCartException();
25332
                this.scx.read(iprot);
25333
              } else { 
25334
                TProtocolUtil.skip(iprot, field.type);
25335
              }
25336
              break;
553 chandransh 25337
          }
25338
          iprot.readFieldEnd();
25339
        }
25340
      }
25341
      iprot.readStructEnd();
25342
      validate();
25343
    }
25344
 
25345
    public void write(TProtocol oprot) throws TException {
25346
      oprot.writeStructBegin(STRUCT_DESC);
25347
 
578 chandransh 25348
      if (this.isSetScx()) {
25349
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25350
        this.scx.write(oprot);
25351
        oprot.writeFieldEnd();
25352
      }
553 chandransh 25353
      oprot.writeFieldStop();
25354
      oprot.writeStructEnd();
25355
    }
25356
 
25357
    @Override
25358
    public String toString() {
25359
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
25360
      boolean first = true;
25361
 
578 chandransh 25362
      sb.append("scx:");
25363
      if (this.scx == null) {
25364
        sb.append("null");
25365
      } else {
25366
        sb.append(this.scx);
25367
      }
25368
      first = false;
553 chandransh 25369
      sb.append(")");
25370
      return sb.toString();
25371
    }
25372
 
25373
    public void validate() throws TException {
25374
      // check for required fields
25375
    }
25376
 
25377
  }
25378
 
688 chandransh 25379
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
25380
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 25381
 
25382
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25383
 
25384
    private long cartId;
25385
 
25386
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25387
    public enum _Fields implements TFieldIdEnum {
25388
      CART_ID((short)1, "cartId");
25389
 
25390
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25391
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25392
 
25393
      static {
25394
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25395
          byId.put((int)field._thriftId, field);
25396
          byName.put(field.getFieldName(), field);
25397
        }
25398
      }
25399
 
25400
      /**
25401
       * Find the _Fields constant that matches fieldId, or null if its not found.
25402
       */
25403
      public static _Fields findByThriftId(int fieldId) {
25404
        return byId.get(fieldId);
25405
      }
25406
 
25407
      /**
25408
       * Find the _Fields constant that matches fieldId, throwing an exception
25409
       * if it is not found.
25410
       */
25411
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25412
        _Fields fields = findByThriftId(fieldId);
25413
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25414
        return fields;
25415
      }
25416
 
25417
      /**
25418
       * Find the _Fields constant that matches name, or null if its not found.
25419
       */
25420
      public static _Fields findByName(String name) {
25421
        return byName.get(name);
25422
      }
25423
 
25424
      private final short _thriftId;
25425
      private final String _fieldName;
25426
 
25427
      _Fields(short thriftId, String fieldName) {
25428
        _thriftId = thriftId;
25429
        _fieldName = fieldName;
25430
      }
25431
 
25432
      public short getThriftFieldId() {
25433
        return _thriftId;
25434
      }
25435
 
25436
      public String getFieldName() {
25437
        return _fieldName;
25438
      }
25439
    }
25440
 
25441
    // isset id assignments
25442
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 25443
    private BitSet __isset_bit_vector = new BitSet(1);
25444
 
25445
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 25446
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 25447
          new FieldValueMetaData(TType.I64)));
25448
    }});
25449
 
25450
    static {
688 chandransh 25451
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 25452
    }
25453
 
688 chandransh 25454
    public createOrders_args() {
48 ashish 25455
    }
25456
 
688 chandransh 25457
    public createOrders_args(
553 chandransh 25458
      long cartId)
48 ashish 25459
    {
25460
      this();
553 chandransh 25461
      this.cartId = cartId;
25462
      setCartIdIsSet(true);
48 ashish 25463
    }
25464
 
25465
    /**
25466
     * Performs a deep copy on <i>other</i>.
25467
     */
688 chandransh 25468
    public createOrders_args(createOrders_args other) {
48 ashish 25469
      __isset_bit_vector.clear();
25470
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 25471
      this.cartId = other.cartId;
48 ashish 25472
    }
25473
 
688 chandransh 25474
    public createOrders_args deepCopy() {
25475
      return new createOrders_args(this);
48 ashish 25476
    }
25477
 
25478
    @Deprecated
688 chandransh 25479
    public createOrders_args clone() {
25480
      return new createOrders_args(this);
48 ashish 25481
    }
25482
 
553 chandransh 25483
    public long getCartId() {
25484
      return this.cartId;
48 ashish 25485
    }
25486
 
688 chandransh 25487
    public createOrders_args setCartId(long cartId) {
553 chandransh 25488
      this.cartId = cartId;
25489
      setCartIdIsSet(true);
48 ashish 25490
      return this;
25491
    }
25492
 
553 chandransh 25493
    public void unsetCartId() {
25494
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 25495
    }
25496
 
553 chandransh 25497
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25498
    public boolean isSetCartId() {
25499
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 25500
    }
25501
 
553 chandransh 25502
    public void setCartIdIsSet(boolean value) {
25503
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 25504
    }
25505
 
25506
    public void setFieldValue(_Fields field, Object value) {
25507
      switch (field) {
553 chandransh 25508
      case CART_ID:
48 ashish 25509
        if (value == null) {
553 chandransh 25510
          unsetCartId();
48 ashish 25511
        } else {
553 chandransh 25512
          setCartId((Long)value);
48 ashish 25513
        }
25514
        break;
25515
 
25516
      }
25517
    }
25518
 
25519
    public void setFieldValue(int fieldID, Object value) {
25520
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25521
    }
25522
 
25523
    public Object getFieldValue(_Fields field) {
25524
      switch (field) {
553 chandransh 25525
      case CART_ID:
25526
        return new Long(getCartId());
48 ashish 25527
 
25528
      }
25529
      throw new IllegalStateException();
25530
    }
25531
 
25532
    public Object getFieldValue(int fieldId) {
25533
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25534
    }
25535
 
25536
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25537
    public boolean isSet(_Fields field) {
25538
      switch (field) {
553 chandransh 25539
      case CART_ID:
25540
        return isSetCartId();
48 ashish 25541
      }
25542
      throw new IllegalStateException();
25543
    }
25544
 
25545
    public boolean isSet(int fieldID) {
25546
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25547
    }
25548
 
25549
    @Override
25550
    public boolean equals(Object that) {
25551
      if (that == null)
25552
        return false;
688 chandransh 25553
      if (that instanceof createOrders_args)
25554
        return this.equals((createOrders_args)that);
48 ashish 25555
      return false;
25556
    }
25557
 
688 chandransh 25558
    public boolean equals(createOrders_args that) {
48 ashish 25559
      if (that == null)
25560
        return false;
25561
 
553 chandransh 25562
      boolean this_present_cartId = true;
25563
      boolean that_present_cartId = true;
25564
      if (this_present_cartId || that_present_cartId) {
25565
        if (!(this_present_cartId && that_present_cartId))
48 ashish 25566
          return false;
553 chandransh 25567
        if (this.cartId != that.cartId)
48 ashish 25568
          return false;
25569
      }
25570
 
25571
      return true;
25572
    }
25573
 
25574
    @Override
25575
    public int hashCode() {
25576
      return 0;
25577
    }
25578
 
688 chandransh 25579
    public int compareTo(createOrders_args other) {
48 ashish 25580
      if (!getClass().equals(other.getClass())) {
25581
        return getClass().getName().compareTo(other.getClass().getName());
25582
      }
25583
 
25584
      int lastComparison = 0;
688 chandransh 25585
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 25586
 
553 chandransh 25587
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 25588
      if (lastComparison != 0) {
25589
        return lastComparison;
25590
      }
553 chandransh 25591
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 25592
      if (lastComparison != 0) {
25593
        return lastComparison;
25594
      }
25595
      return 0;
25596
    }
25597
 
25598
    public void read(TProtocol iprot) throws TException {
25599
      TField field;
25600
      iprot.readStructBegin();
25601
      while (true)
25602
      {
25603
        field = iprot.readFieldBegin();
25604
        if (field.type == TType.STOP) { 
25605
          break;
25606
        }
25607
        _Fields fieldId = _Fields.findByThriftId(field.id);
25608
        if (fieldId == null) {
25609
          TProtocolUtil.skip(iprot, field.type);
25610
        } else {
25611
          switch (fieldId) {
553 chandransh 25612
            case CART_ID:
48 ashish 25613
              if (field.type == TType.I64) {
553 chandransh 25614
                this.cartId = iprot.readI64();
25615
                setCartIdIsSet(true);
48 ashish 25616
              } else { 
25617
                TProtocolUtil.skip(iprot, field.type);
25618
              }
25619
              break;
25620
          }
25621
          iprot.readFieldEnd();
25622
        }
25623
      }
25624
      iprot.readStructEnd();
25625
      validate();
25626
    }
25627
 
25628
    public void write(TProtocol oprot) throws TException {
25629
      validate();
25630
 
25631
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 25632
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25633
      oprot.writeI64(this.cartId);
48 ashish 25634
      oprot.writeFieldEnd();
25635
      oprot.writeFieldStop();
25636
      oprot.writeStructEnd();
25637
    }
25638
 
25639
    @Override
25640
    public String toString() {
688 chandransh 25641
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 25642
      boolean first = true;
25643
 
553 chandransh 25644
      sb.append("cartId:");
25645
      sb.append(this.cartId);
48 ashish 25646
      first = false;
25647
      sb.append(")");
25648
      return sb.toString();
25649
    }
25650
 
25651
    public void validate() throws TException {
25652
      // check for required fields
25653
    }
25654
 
25655
  }
25656
 
688 chandransh 25657
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
25658
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 25659
 
578 chandransh 25660
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 25661
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 25662
 
578 chandransh 25663
    private long success;
553 chandransh 25664
    private ShoppingCartException scx;
48 ashish 25665
 
25666
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25667
    public enum _Fields implements TFieldIdEnum {
25668
      SUCCESS((short)0, "success"),
553 chandransh 25669
      SCX((short)1, "scx");
48 ashish 25670
 
25671
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25672
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25673
 
25674
      static {
25675
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25676
          byId.put((int)field._thriftId, field);
25677
          byName.put(field.getFieldName(), field);
25678
        }
25679
      }
25680
 
25681
      /**
25682
       * Find the _Fields constant that matches fieldId, or null if its not found.
25683
       */
25684
      public static _Fields findByThriftId(int fieldId) {
25685
        return byId.get(fieldId);
25686
      }
25687
 
25688
      /**
25689
       * Find the _Fields constant that matches fieldId, throwing an exception
25690
       * if it is not found.
25691
       */
25692
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25693
        _Fields fields = findByThriftId(fieldId);
25694
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25695
        return fields;
25696
      }
25697
 
25698
      /**
25699
       * Find the _Fields constant that matches name, or null if its not found.
25700
       */
25701
      public static _Fields findByName(String name) {
25702
        return byName.get(name);
25703
      }
25704
 
25705
      private final short _thriftId;
25706
      private final String _fieldName;
25707
 
25708
      _Fields(short thriftId, String fieldName) {
25709
        _thriftId = thriftId;
25710
        _fieldName = fieldName;
25711
      }
25712
 
25713
      public short getThriftFieldId() {
25714
        return _thriftId;
25715
      }
25716
 
25717
      public String getFieldName() {
25718
        return _fieldName;
25719
      }
25720
    }
25721
 
25722
    // isset id assignments
25723
    private static final int __SUCCESS_ISSET_ID = 0;
25724
    private BitSet __isset_bit_vector = new BitSet(1);
25725
 
25726
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25727
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 25728
          new FieldValueMetaData(TType.I64)));
553 chandransh 25729
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 25730
          new FieldValueMetaData(TType.STRUCT)));
25731
    }});
25732
 
25733
    static {
688 chandransh 25734
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 25735
    }
25736
 
688 chandransh 25737
    public createOrders_result() {
48 ashish 25738
    }
25739
 
688 chandransh 25740
    public createOrders_result(
578 chandransh 25741
      long success,
553 chandransh 25742
      ShoppingCartException scx)
48 ashish 25743
    {
25744
      this();
25745
      this.success = success;
25746
      setSuccessIsSet(true);
553 chandransh 25747
      this.scx = scx;
48 ashish 25748
    }
25749
 
25750
    /**
25751
     * Performs a deep copy on <i>other</i>.
25752
     */
688 chandransh 25753
    public createOrders_result(createOrders_result other) {
48 ashish 25754
      __isset_bit_vector.clear();
25755
      __isset_bit_vector.or(other.__isset_bit_vector);
25756
      this.success = other.success;
553 chandransh 25757
      if (other.isSetScx()) {
25758
        this.scx = new ShoppingCartException(other.scx);
48 ashish 25759
      }
25760
    }
25761
 
688 chandransh 25762
    public createOrders_result deepCopy() {
25763
      return new createOrders_result(this);
48 ashish 25764
    }
25765
 
25766
    @Deprecated
688 chandransh 25767
    public createOrders_result clone() {
25768
      return new createOrders_result(this);
48 ashish 25769
    }
25770
 
578 chandransh 25771
    public long getSuccess() {
48 ashish 25772
      return this.success;
25773
    }
25774
 
688 chandransh 25775
    public createOrders_result setSuccess(long success) {
48 ashish 25776
      this.success = success;
25777
      setSuccessIsSet(true);
25778
      return this;
25779
    }
25780
 
25781
    public void unsetSuccess() {
25782
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
25783
    }
25784
 
25785
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25786
    public boolean isSetSuccess() {
25787
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
25788
    }
25789
 
25790
    public void setSuccessIsSet(boolean value) {
25791
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
25792
    }
25793
 
553 chandransh 25794
    public ShoppingCartException getScx() {
25795
      return this.scx;
48 ashish 25796
    }
25797
 
688 chandransh 25798
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 25799
      this.scx = scx;
48 ashish 25800
      return this;
25801
    }
25802
 
553 chandransh 25803
    public void unsetScx() {
25804
      this.scx = null;
48 ashish 25805
    }
25806
 
553 chandransh 25807
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25808
    public boolean isSetScx() {
25809
      return this.scx != null;
48 ashish 25810
    }
25811
 
553 chandransh 25812
    public void setScxIsSet(boolean value) {
48 ashish 25813
      if (!value) {
553 chandransh 25814
        this.scx = null;
48 ashish 25815
      }
25816
    }
25817
 
25818
    public void setFieldValue(_Fields field, Object value) {
25819
      switch (field) {
25820
      case SUCCESS:
25821
        if (value == null) {
25822
          unsetSuccess();
25823
        } else {
578 chandransh 25824
          setSuccess((Long)value);
48 ashish 25825
        }
25826
        break;
25827
 
553 chandransh 25828
      case SCX:
48 ashish 25829
        if (value == null) {
553 chandransh 25830
          unsetScx();
48 ashish 25831
        } else {
553 chandransh 25832
          setScx((ShoppingCartException)value);
48 ashish 25833
        }
25834
        break;
25835
 
25836
      }
25837
    }
25838
 
25839
    public void setFieldValue(int fieldID, Object value) {
25840
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25841
    }
25842
 
25843
    public Object getFieldValue(_Fields field) {
25844
      switch (field) {
25845
      case SUCCESS:
578 chandransh 25846
        return new Long(getSuccess());
48 ashish 25847
 
553 chandransh 25848
      case SCX:
25849
        return getScx();
48 ashish 25850
 
25851
      }
25852
      throw new IllegalStateException();
25853
    }
25854
 
25855
    public Object getFieldValue(int fieldId) {
25856
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25857
    }
25858
 
25859
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25860
    public boolean isSet(_Fields field) {
25861
      switch (field) {
25862
      case SUCCESS:
25863
        return isSetSuccess();
553 chandransh 25864
      case SCX:
25865
        return isSetScx();
48 ashish 25866
      }
25867
      throw new IllegalStateException();
25868
    }
25869
 
25870
    public boolean isSet(int fieldID) {
25871
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25872
    }
25873
 
25874
    @Override
25875
    public boolean equals(Object that) {
25876
      if (that == null)
25877
        return false;
688 chandransh 25878
      if (that instanceof createOrders_result)
25879
        return this.equals((createOrders_result)that);
48 ashish 25880
      return false;
25881
    }
25882
 
688 chandransh 25883
    public boolean equals(createOrders_result that) {
48 ashish 25884
      if (that == null)
25885
        return false;
25886
 
25887
      boolean this_present_success = true;
25888
      boolean that_present_success = true;
25889
      if (this_present_success || that_present_success) {
25890
        if (!(this_present_success && that_present_success))
25891
          return false;
25892
        if (this.success != that.success)
25893
          return false;
25894
      }
25895
 
553 chandransh 25896
      boolean this_present_scx = true && this.isSetScx();
25897
      boolean that_present_scx = true && that.isSetScx();
25898
      if (this_present_scx || that_present_scx) {
25899
        if (!(this_present_scx && that_present_scx))
48 ashish 25900
          return false;
553 chandransh 25901
        if (!this.scx.equals(that.scx))
48 ashish 25902
          return false;
25903
      }
25904
 
25905
      return true;
25906
    }
25907
 
25908
    @Override
25909
    public int hashCode() {
25910
      return 0;
25911
    }
25912
 
688 chandransh 25913
    public int compareTo(createOrders_result other) {
48 ashish 25914
      if (!getClass().equals(other.getClass())) {
25915
        return getClass().getName().compareTo(other.getClass().getName());
25916
      }
25917
 
25918
      int lastComparison = 0;
688 chandransh 25919
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 25920
 
25921
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25922
      if (lastComparison != 0) {
25923
        return lastComparison;
25924
      }
25925
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25926
      if (lastComparison != 0) {
25927
        return lastComparison;
25928
      }
553 chandransh 25929
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 25930
      if (lastComparison != 0) {
25931
        return lastComparison;
25932
      }
553 chandransh 25933
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 25934
      if (lastComparison != 0) {
25935
        return lastComparison;
25936
      }
25937
      return 0;
25938
    }
25939
 
25940
    public void read(TProtocol iprot) throws TException {
25941
      TField field;
25942
      iprot.readStructBegin();
25943
      while (true)
25944
      {
25945
        field = iprot.readFieldBegin();
25946
        if (field.type == TType.STOP) { 
25947
          break;
25948
        }
25949
        _Fields fieldId = _Fields.findByThriftId(field.id);
25950
        if (fieldId == null) {
25951
          TProtocolUtil.skip(iprot, field.type);
25952
        } else {
25953
          switch (fieldId) {
25954
            case SUCCESS:
578 chandransh 25955
              if (field.type == TType.I64) {
25956
                this.success = iprot.readI64();
48 ashish 25957
                setSuccessIsSet(true);
25958
              } else { 
25959
                TProtocolUtil.skip(iprot, field.type);
25960
              }
25961
              break;
553 chandransh 25962
            case SCX:
48 ashish 25963
              if (field.type == TType.STRUCT) {
553 chandransh 25964
                this.scx = new ShoppingCartException();
25965
                this.scx.read(iprot);
48 ashish 25966
              } else { 
25967
                TProtocolUtil.skip(iprot, field.type);
25968
              }
25969
              break;
25970
          }
25971
          iprot.readFieldEnd();
25972
        }
25973
      }
25974
      iprot.readStructEnd();
25975
      validate();
25976
    }
25977
 
25978
    public void write(TProtocol oprot) throws TException {
25979
      oprot.writeStructBegin(STRUCT_DESC);
25980
 
25981
      if (this.isSetSuccess()) {
25982
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 25983
        oprot.writeI64(this.success);
48 ashish 25984
        oprot.writeFieldEnd();
553 chandransh 25985
      } else if (this.isSetScx()) {
25986
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25987
        this.scx.write(oprot);
48 ashish 25988
        oprot.writeFieldEnd();
25989
      }
25990
      oprot.writeFieldStop();
25991
      oprot.writeStructEnd();
25992
    }
25993
 
25994
    @Override
25995
    public String toString() {
688 chandransh 25996
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 25997
      boolean first = true;
25998
 
25999
      sb.append("success:");
26000
      sb.append(this.success);
26001
      first = false;
26002
      if (!first) sb.append(", ");
553 chandransh 26003
      sb.append("scx:");
26004
      if (this.scx == null) {
48 ashish 26005
        sb.append("null");
26006
      } else {
553 chandransh 26007
        sb.append(this.scx);
48 ashish 26008
      }
26009
      first = false;
26010
      sb.append(")");
26011
      return sb.toString();
26012
    }
26013
 
26014
    public void validate() throws TException {
26015
      // check for required fields
26016
    }
26017
 
26018
  }
26019
 
553 chandransh 26020
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
26021
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 26022
 
553 chandransh 26023
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 26024
 
553 chandransh 26025
    private long cartId;
48 ashish 26026
 
26027
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26028
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26029
      CART_ID((short)1, "cartId");
48 ashish 26030
 
26031
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26032
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26033
 
26034
      static {
26035
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26036
          byId.put((int)field._thriftId, field);
26037
          byName.put(field.getFieldName(), field);
26038
        }
26039
      }
26040
 
26041
      /**
26042
       * Find the _Fields constant that matches fieldId, or null if its not found.
26043
       */
26044
      public static _Fields findByThriftId(int fieldId) {
26045
        return byId.get(fieldId);
26046
      }
26047
 
26048
      /**
26049
       * Find the _Fields constant that matches fieldId, throwing an exception
26050
       * if it is not found.
26051
       */
26052
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26053
        _Fields fields = findByThriftId(fieldId);
26054
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26055
        return fields;
26056
      }
26057
 
26058
      /**
26059
       * Find the _Fields constant that matches name, or null if its not found.
26060
       */
26061
      public static _Fields findByName(String name) {
26062
        return byName.get(name);
26063
      }
26064
 
26065
      private final short _thriftId;
26066
      private final String _fieldName;
26067
 
26068
      _Fields(short thriftId, String fieldName) {
26069
        _thriftId = thriftId;
26070
        _fieldName = fieldName;
26071
      }
26072
 
26073
      public short getThriftFieldId() {
26074
        return _thriftId;
26075
      }
26076
 
26077
      public String getFieldName() {
26078
        return _fieldName;
26079
      }
26080
    }
26081
 
26082
    // isset id assignments
553 chandransh 26083
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 26084
    private BitSet __isset_bit_vector = new BitSet(1);
26085
 
26086
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26087
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 26088
          new FieldValueMetaData(TType.I64)));
26089
    }});
26090
 
26091
    static {
553 chandransh 26092
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 26093
    }
26094
 
553 chandransh 26095
    public validateCart_args() {
48 ashish 26096
    }
26097
 
553 chandransh 26098
    public validateCart_args(
26099
      long cartId)
48 ashish 26100
    {
26101
      this();
553 chandransh 26102
      this.cartId = cartId;
26103
      setCartIdIsSet(true);
48 ashish 26104
    }
26105
 
26106
    /**
26107
     * Performs a deep copy on <i>other</i>.
26108
     */
553 chandransh 26109
    public validateCart_args(validateCart_args other) {
48 ashish 26110
      __isset_bit_vector.clear();
26111
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 26112
      this.cartId = other.cartId;
48 ashish 26113
    }
26114
 
553 chandransh 26115
    public validateCart_args deepCopy() {
26116
      return new validateCart_args(this);
48 ashish 26117
    }
26118
 
26119
    @Deprecated
553 chandransh 26120
    public validateCart_args clone() {
26121
      return new validateCart_args(this);
48 ashish 26122
    }
26123
 
553 chandransh 26124
    public long getCartId() {
26125
      return this.cartId;
48 ashish 26126
    }
26127
 
553 chandransh 26128
    public validateCart_args setCartId(long cartId) {
26129
      this.cartId = cartId;
26130
      setCartIdIsSet(true);
48 ashish 26131
      return this;
26132
    }
26133
 
553 chandransh 26134
    public void unsetCartId() {
26135
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26136
    }
26137
 
553 chandransh 26138
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26139
    public boolean isSetCartId() {
26140
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26141
    }
26142
 
553 chandransh 26143
    public void setCartIdIsSet(boolean value) {
26144
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 26145
    }
26146
 
26147
    public void setFieldValue(_Fields field, Object value) {
26148
      switch (field) {
553 chandransh 26149
      case CART_ID:
48 ashish 26150
        if (value == null) {
553 chandransh 26151
          unsetCartId();
48 ashish 26152
        } else {
553 chandransh 26153
          setCartId((Long)value);
48 ashish 26154
        }
26155
        break;
26156
 
26157
      }
26158
    }
26159
 
26160
    public void setFieldValue(int fieldID, Object value) {
26161
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26162
    }
26163
 
26164
    public Object getFieldValue(_Fields field) {
26165
      switch (field) {
553 chandransh 26166
      case CART_ID:
26167
        return new Long(getCartId());
48 ashish 26168
 
26169
      }
26170
      throw new IllegalStateException();
26171
    }
26172
 
26173
    public Object getFieldValue(int fieldId) {
26174
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26175
    }
26176
 
26177
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26178
    public boolean isSet(_Fields field) {
26179
      switch (field) {
553 chandransh 26180
      case CART_ID:
26181
        return isSetCartId();
48 ashish 26182
      }
26183
      throw new IllegalStateException();
26184
    }
26185
 
26186
    public boolean isSet(int fieldID) {
26187
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26188
    }
26189
 
26190
    @Override
26191
    public boolean equals(Object that) {
26192
      if (that == null)
26193
        return false;
553 chandransh 26194
      if (that instanceof validateCart_args)
26195
        return this.equals((validateCart_args)that);
48 ashish 26196
      return false;
26197
    }
26198
 
553 chandransh 26199
    public boolean equals(validateCart_args that) {
48 ashish 26200
      if (that == null)
26201
        return false;
26202
 
553 chandransh 26203
      boolean this_present_cartId = true;
26204
      boolean that_present_cartId = true;
26205
      if (this_present_cartId || that_present_cartId) {
26206
        if (!(this_present_cartId && that_present_cartId))
48 ashish 26207
          return false;
553 chandransh 26208
        if (this.cartId != that.cartId)
48 ashish 26209
          return false;
26210
      }
26211
 
26212
      return true;
26213
    }
26214
 
26215
    @Override
26216
    public int hashCode() {
26217
      return 0;
26218
    }
26219
 
553 chandransh 26220
    public int compareTo(validateCart_args other) {
48 ashish 26221
      if (!getClass().equals(other.getClass())) {
26222
        return getClass().getName().compareTo(other.getClass().getName());
26223
      }
26224
 
26225
      int lastComparison = 0;
553 chandransh 26226
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 26227
 
553 chandransh 26228
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 26229
      if (lastComparison != 0) {
26230
        return lastComparison;
26231
      }
553 chandransh 26232
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 26233
      if (lastComparison != 0) {
26234
        return lastComparison;
26235
      }
26236
      return 0;
26237
    }
26238
 
26239
    public void read(TProtocol iprot) throws TException {
26240
      TField field;
26241
      iprot.readStructBegin();
26242
      while (true)
26243
      {
26244
        field = iprot.readFieldBegin();
26245
        if (field.type == TType.STOP) { 
26246
          break;
26247
        }
26248
        _Fields fieldId = _Fields.findByThriftId(field.id);
26249
        if (fieldId == null) {
26250
          TProtocolUtil.skip(iprot, field.type);
26251
        } else {
26252
          switch (fieldId) {
553 chandransh 26253
            case CART_ID:
48 ashish 26254
              if (field.type == TType.I64) {
553 chandransh 26255
                this.cartId = iprot.readI64();
26256
                setCartIdIsSet(true);
48 ashish 26257
              } else { 
26258
                TProtocolUtil.skip(iprot, field.type);
26259
              }
26260
              break;
26261
          }
26262
          iprot.readFieldEnd();
26263
        }
26264
      }
26265
      iprot.readStructEnd();
26266
      validate();
26267
    }
26268
 
26269
    public void write(TProtocol oprot) throws TException {
26270
      validate();
26271
 
26272
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 26273
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26274
      oprot.writeI64(this.cartId);
48 ashish 26275
      oprot.writeFieldEnd();
26276
      oprot.writeFieldStop();
26277
      oprot.writeStructEnd();
26278
    }
26279
 
26280
    @Override
26281
    public String toString() {
553 chandransh 26282
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 26283
      boolean first = true;
26284
 
553 chandransh 26285
      sb.append("cartId:");
26286
      sb.append(this.cartId);
48 ashish 26287
      first = false;
26288
      sb.append(")");
26289
      return sb.toString();
26290
    }
26291
 
26292
    public void validate() throws TException {
26293
      // check for required fields
26294
    }
26295
 
26296
  }
26297
 
553 chandransh 26298
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
26299
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 26300
 
26301
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
578 chandransh 26302
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 26303
 
26304
    private boolean success;
578 chandransh 26305
    private ShoppingCartException scex;
48 ashish 26306
 
26307
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26308
    public enum _Fields implements TFieldIdEnum {
578 chandransh 26309
      SUCCESS((short)0, "success"),
26310
      SCEX((short)1, "scex");
48 ashish 26311
 
26312
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26313
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26314
 
26315
      static {
26316
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26317
          byId.put((int)field._thriftId, field);
26318
          byName.put(field.getFieldName(), field);
26319
        }
26320
      }
26321
 
26322
      /**
26323
       * Find the _Fields constant that matches fieldId, or null if its not found.
26324
       */
26325
      public static _Fields findByThriftId(int fieldId) {
26326
        return byId.get(fieldId);
26327
      }
26328
 
26329
      /**
26330
       * Find the _Fields constant that matches fieldId, throwing an exception
26331
       * if it is not found.
26332
       */
26333
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26334
        _Fields fields = findByThriftId(fieldId);
26335
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26336
        return fields;
26337
      }
26338
 
26339
      /**
26340
       * Find the _Fields constant that matches name, or null if its not found.
26341
       */
26342
      public static _Fields findByName(String name) {
26343
        return byName.get(name);
26344
      }
26345
 
26346
      private final short _thriftId;
26347
      private final String _fieldName;
26348
 
26349
      _Fields(short thriftId, String fieldName) {
26350
        _thriftId = thriftId;
26351
        _fieldName = fieldName;
26352
      }
26353
 
26354
      public short getThriftFieldId() {
26355
        return _thriftId;
26356
      }
26357
 
26358
      public String getFieldName() {
26359
        return _fieldName;
26360
      }
26361
    }
26362
 
26363
    // isset id assignments
26364
    private static final int __SUCCESS_ISSET_ID = 0;
26365
    private BitSet __isset_bit_vector = new BitSet(1);
26366
 
26367
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26368
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26369
          new FieldValueMetaData(TType.BOOL)));
578 chandransh 26370
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
26371
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 26372
    }});
26373
 
26374
    static {
553 chandransh 26375
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 26376
    }
26377
 
553 chandransh 26378
    public validateCart_result() {
48 ashish 26379
    }
26380
 
553 chandransh 26381
    public validateCart_result(
578 chandransh 26382
      boolean success,
26383
      ShoppingCartException scex)
48 ashish 26384
    {
26385
      this();
26386
      this.success = success;
26387
      setSuccessIsSet(true);
578 chandransh 26388
      this.scex = scex;
48 ashish 26389
    }
26390
 
26391
    /**
26392
     * Performs a deep copy on <i>other</i>.
26393
     */
553 chandransh 26394
    public validateCart_result(validateCart_result other) {
48 ashish 26395
      __isset_bit_vector.clear();
26396
      __isset_bit_vector.or(other.__isset_bit_vector);
26397
      this.success = other.success;
578 chandransh 26398
      if (other.isSetScex()) {
26399
        this.scex = new ShoppingCartException(other.scex);
26400
      }
48 ashish 26401
    }
26402
 
553 chandransh 26403
    public validateCart_result deepCopy() {
26404
      return new validateCart_result(this);
48 ashish 26405
    }
26406
 
26407
    @Deprecated
553 chandransh 26408
    public validateCart_result clone() {
26409
      return new validateCart_result(this);
48 ashish 26410
    }
26411
 
26412
    public boolean isSuccess() {
26413
      return this.success;
26414
    }
26415
 
553 chandransh 26416
    public validateCart_result setSuccess(boolean success) {
48 ashish 26417
      this.success = success;
26418
      setSuccessIsSet(true);
26419
      return this;
26420
    }
26421
 
26422
    public void unsetSuccess() {
26423
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26424
    }
26425
 
26426
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26427
    public boolean isSetSuccess() {
26428
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26429
    }
26430
 
26431
    public void setSuccessIsSet(boolean value) {
26432
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26433
    }
26434
 
578 chandransh 26435
    public ShoppingCartException getScex() {
26436
      return this.scex;
26437
    }
26438
 
26439
    public validateCart_result setScex(ShoppingCartException scex) {
26440
      this.scex = scex;
26441
      return this;
26442
    }
26443
 
26444
    public void unsetScex() {
26445
      this.scex = null;
26446
    }
26447
 
26448
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
26449
    public boolean isSetScex() {
26450
      return this.scex != null;
26451
    }
26452
 
26453
    public void setScexIsSet(boolean value) {
26454
      if (!value) {
26455
        this.scex = null;
26456
      }
26457
    }
26458
 
553 chandransh 26459
    public void setFieldValue(_Fields field, Object value) {
26460
      switch (field) {
26461
      case SUCCESS:
26462
        if (value == null) {
26463
          unsetSuccess();
26464
        } else {
26465
          setSuccess((Boolean)value);
26466
        }
26467
        break;
26468
 
578 chandransh 26469
      case SCEX:
26470
        if (value == null) {
26471
          unsetScex();
26472
        } else {
26473
          setScex((ShoppingCartException)value);
26474
        }
26475
        break;
26476
 
553 chandransh 26477
      }
48 ashish 26478
    }
26479
 
553 chandransh 26480
    public void setFieldValue(int fieldID, Object value) {
26481
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26482
    }
26483
 
26484
    public Object getFieldValue(_Fields field) {
26485
      switch (field) {
26486
      case SUCCESS:
26487
        return new Boolean(isSuccess());
26488
 
578 chandransh 26489
      case SCEX:
26490
        return getScex();
26491
 
553 chandransh 26492
      }
26493
      throw new IllegalStateException();
26494
    }
26495
 
26496
    public Object getFieldValue(int fieldId) {
26497
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26498
    }
26499
 
26500
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26501
    public boolean isSet(_Fields field) {
26502
      switch (field) {
26503
      case SUCCESS:
26504
        return isSetSuccess();
578 chandransh 26505
      case SCEX:
26506
        return isSetScex();
553 chandransh 26507
      }
26508
      throw new IllegalStateException();
26509
    }
26510
 
26511
    public boolean isSet(int fieldID) {
26512
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26513
    }
26514
 
26515
    @Override
26516
    public boolean equals(Object that) {
26517
      if (that == null)
26518
        return false;
26519
      if (that instanceof validateCart_result)
26520
        return this.equals((validateCart_result)that);
26521
      return false;
26522
    }
26523
 
26524
    public boolean equals(validateCart_result that) {
26525
      if (that == null)
26526
        return false;
26527
 
26528
      boolean this_present_success = true;
26529
      boolean that_present_success = true;
26530
      if (this_present_success || that_present_success) {
26531
        if (!(this_present_success && that_present_success))
26532
          return false;
26533
        if (this.success != that.success)
26534
          return false;
26535
      }
26536
 
578 chandransh 26537
      boolean this_present_scex = true && this.isSetScex();
26538
      boolean that_present_scex = true && that.isSetScex();
26539
      if (this_present_scex || that_present_scex) {
26540
        if (!(this_present_scex && that_present_scex))
26541
          return false;
26542
        if (!this.scex.equals(that.scex))
26543
          return false;
26544
      }
26545
 
553 chandransh 26546
      return true;
26547
    }
26548
 
26549
    @Override
26550
    public int hashCode() {
26551
      return 0;
26552
    }
26553
 
26554
    public int compareTo(validateCart_result other) {
26555
      if (!getClass().equals(other.getClass())) {
26556
        return getClass().getName().compareTo(other.getClass().getName());
26557
      }
26558
 
26559
      int lastComparison = 0;
26560
      validateCart_result typedOther = (validateCart_result)other;
26561
 
26562
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26563
      if (lastComparison != 0) {
26564
        return lastComparison;
26565
      }
26566
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26567
      if (lastComparison != 0) {
26568
        return lastComparison;
26569
      }
578 chandransh 26570
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
26571
      if (lastComparison != 0) {
26572
        return lastComparison;
26573
      }
26574
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
26575
      if (lastComparison != 0) {
26576
        return lastComparison;
26577
      }
553 chandransh 26578
      return 0;
26579
    }
26580
 
26581
    public void read(TProtocol iprot) throws TException {
26582
      TField field;
26583
      iprot.readStructBegin();
26584
      while (true)
26585
      {
26586
        field = iprot.readFieldBegin();
26587
        if (field.type == TType.STOP) { 
26588
          break;
26589
        }
26590
        _Fields fieldId = _Fields.findByThriftId(field.id);
26591
        if (fieldId == null) {
26592
          TProtocolUtil.skip(iprot, field.type);
26593
        } else {
26594
          switch (fieldId) {
26595
            case SUCCESS:
26596
              if (field.type == TType.BOOL) {
26597
                this.success = iprot.readBool();
26598
                setSuccessIsSet(true);
26599
              } else { 
26600
                TProtocolUtil.skip(iprot, field.type);
26601
              }
26602
              break;
578 chandransh 26603
            case SCEX:
26604
              if (field.type == TType.STRUCT) {
26605
                this.scex = new ShoppingCartException();
26606
                this.scex.read(iprot);
26607
              } else { 
26608
                TProtocolUtil.skip(iprot, field.type);
26609
              }
26610
              break;
553 chandransh 26611
          }
26612
          iprot.readFieldEnd();
26613
        }
26614
      }
26615
      iprot.readStructEnd();
26616
      validate();
26617
    }
26618
 
26619
    public void write(TProtocol oprot) throws TException {
26620
      oprot.writeStructBegin(STRUCT_DESC);
26621
 
26622
      if (this.isSetSuccess()) {
26623
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26624
        oprot.writeBool(this.success);
26625
        oprot.writeFieldEnd();
578 chandransh 26626
      } else if (this.isSetScex()) {
26627
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
26628
        this.scex.write(oprot);
26629
        oprot.writeFieldEnd();
553 chandransh 26630
      }
26631
      oprot.writeFieldStop();
26632
      oprot.writeStructEnd();
26633
    }
26634
 
26635
    @Override
26636
    public String toString() {
26637
      StringBuilder sb = new StringBuilder("validateCart_result(");
26638
      boolean first = true;
26639
 
26640
      sb.append("success:");
26641
      sb.append(this.success);
26642
      first = false;
578 chandransh 26643
      if (!first) sb.append(", ");
26644
      sb.append("scex:");
26645
      if (this.scex == null) {
26646
        sb.append("null");
26647
      } else {
26648
        sb.append(this.scex);
26649
      }
26650
      first = false;
553 chandransh 26651
      sb.append(")");
26652
      return sb.toString();
26653
    }
26654
 
26655
    public void validate() throws TException {
26656
      // check for required fields
26657
    }
26658
 
26659
  }
26660
 
688 chandransh 26661
  public static class mergeCart_args implements TBase<mergeCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_args>   {
26662
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_args");
578 chandransh 26663
 
688 chandransh 26664
    private static final TField FROM_CART_ID_FIELD_DESC = new TField("fromCartId", TType.I64, (short)1);
26665
    private static final TField TO_CART_ID_FIELD_DESC = new TField("toCartId", TType.I64, (short)2);
26666
 
26667
    private long fromCartId;
26668
    private long toCartId;
26669
 
26670
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26671
    public enum _Fields implements TFieldIdEnum {
26672
      FROM_CART_ID((short)1, "fromCartId"),
26673
      TO_CART_ID((short)2, "toCartId");
26674
 
26675
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26676
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26677
 
26678
      static {
26679
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26680
          byId.put((int)field._thriftId, field);
26681
          byName.put(field.getFieldName(), field);
26682
        }
26683
      }
26684
 
26685
      /**
26686
       * Find the _Fields constant that matches fieldId, or null if its not found.
26687
       */
26688
      public static _Fields findByThriftId(int fieldId) {
26689
        return byId.get(fieldId);
26690
      }
26691
 
26692
      /**
26693
       * Find the _Fields constant that matches fieldId, throwing an exception
26694
       * if it is not found.
26695
       */
26696
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26697
        _Fields fields = findByThriftId(fieldId);
26698
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26699
        return fields;
26700
      }
26701
 
26702
      /**
26703
       * Find the _Fields constant that matches name, or null if its not found.
26704
       */
26705
      public static _Fields findByName(String name) {
26706
        return byName.get(name);
26707
      }
26708
 
26709
      private final short _thriftId;
26710
      private final String _fieldName;
26711
 
26712
      _Fields(short thriftId, String fieldName) {
26713
        _thriftId = thriftId;
26714
        _fieldName = fieldName;
26715
      }
26716
 
26717
      public short getThriftFieldId() {
26718
        return _thriftId;
26719
      }
26720
 
26721
      public String getFieldName() {
26722
        return _fieldName;
26723
      }
26724
    }
26725
 
26726
    // isset id assignments
26727
    private static final int __FROMCARTID_ISSET_ID = 0;
26728
    private static final int __TOCARTID_ISSET_ID = 1;
26729
    private BitSet __isset_bit_vector = new BitSet(2);
26730
 
26731
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26732
      put(_Fields.FROM_CART_ID, new FieldMetaData("fromCartId", TFieldRequirementType.DEFAULT, 
26733
          new FieldValueMetaData(TType.I64)));
26734
      put(_Fields.TO_CART_ID, new FieldMetaData("toCartId", TFieldRequirementType.DEFAULT, 
26735
          new FieldValueMetaData(TType.I64)));
26736
    }});
26737
 
26738
    static {
26739
      FieldMetaData.addStructMetaDataMap(mergeCart_args.class, metaDataMap);
26740
    }
26741
 
26742
    public mergeCart_args() {
26743
    }
26744
 
26745
    public mergeCart_args(
26746
      long fromCartId,
26747
      long toCartId)
26748
    {
26749
      this();
26750
      this.fromCartId = fromCartId;
26751
      setFromCartIdIsSet(true);
26752
      this.toCartId = toCartId;
26753
      setToCartIdIsSet(true);
26754
    }
26755
 
26756
    /**
26757
     * Performs a deep copy on <i>other</i>.
26758
     */
26759
    public mergeCart_args(mergeCart_args other) {
26760
      __isset_bit_vector.clear();
26761
      __isset_bit_vector.or(other.__isset_bit_vector);
26762
      this.fromCartId = other.fromCartId;
26763
      this.toCartId = other.toCartId;
26764
    }
26765
 
26766
    public mergeCart_args deepCopy() {
26767
      return new mergeCart_args(this);
26768
    }
26769
 
26770
    @Deprecated
26771
    public mergeCart_args clone() {
26772
      return new mergeCart_args(this);
26773
    }
26774
 
26775
    public long getFromCartId() {
26776
      return this.fromCartId;
26777
    }
26778
 
26779
    public mergeCart_args setFromCartId(long fromCartId) {
26780
      this.fromCartId = fromCartId;
26781
      setFromCartIdIsSet(true);
26782
      return this;
26783
    }
26784
 
26785
    public void unsetFromCartId() {
26786
      __isset_bit_vector.clear(__FROMCARTID_ISSET_ID);
26787
    }
26788
 
26789
    /** Returns true if field fromCartId is set (has been asigned a value) and false otherwise */
26790
    public boolean isSetFromCartId() {
26791
      return __isset_bit_vector.get(__FROMCARTID_ISSET_ID);
26792
    }
26793
 
26794
    public void setFromCartIdIsSet(boolean value) {
26795
      __isset_bit_vector.set(__FROMCARTID_ISSET_ID, value);
26796
    }
26797
 
26798
    public long getToCartId() {
26799
      return this.toCartId;
26800
    }
26801
 
26802
    public mergeCart_args setToCartId(long toCartId) {
26803
      this.toCartId = toCartId;
26804
      setToCartIdIsSet(true);
26805
      return this;
26806
    }
26807
 
26808
    public void unsetToCartId() {
26809
      __isset_bit_vector.clear(__TOCARTID_ISSET_ID);
26810
    }
26811
 
26812
    /** Returns true if field toCartId is set (has been asigned a value) and false otherwise */
26813
    public boolean isSetToCartId() {
26814
      return __isset_bit_vector.get(__TOCARTID_ISSET_ID);
26815
    }
26816
 
26817
    public void setToCartIdIsSet(boolean value) {
26818
      __isset_bit_vector.set(__TOCARTID_ISSET_ID, value);
26819
    }
26820
 
26821
    public void setFieldValue(_Fields field, Object value) {
26822
      switch (field) {
26823
      case FROM_CART_ID:
26824
        if (value == null) {
26825
          unsetFromCartId();
26826
        } else {
26827
          setFromCartId((Long)value);
26828
        }
26829
        break;
26830
 
26831
      case TO_CART_ID:
26832
        if (value == null) {
26833
          unsetToCartId();
26834
        } else {
26835
          setToCartId((Long)value);
26836
        }
26837
        break;
26838
 
26839
      }
26840
    }
26841
 
26842
    public void setFieldValue(int fieldID, Object value) {
26843
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26844
    }
26845
 
26846
    public Object getFieldValue(_Fields field) {
26847
      switch (field) {
26848
      case FROM_CART_ID:
26849
        return new Long(getFromCartId());
26850
 
26851
      case TO_CART_ID:
26852
        return new Long(getToCartId());
26853
 
26854
      }
26855
      throw new IllegalStateException();
26856
    }
26857
 
26858
    public Object getFieldValue(int fieldId) {
26859
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26860
    }
26861
 
26862
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26863
    public boolean isSet(_Fields field) {
26864
      switch (field) {
26865
      case FROM_CART_ID:
26866
        return isSetFromCartId();
26867
      case TO_CART_ID:
26868
        return isSetToCartId();
26869
      }
26870
      throw new IllegalStateException();
26871
    }
26872
 
26873
    public boolean isSet(int fieldID) {
26874
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26875
    }
26876
 
26877
    @Override
26878
    public boolean equals(Object that) {
26879
      if (that == null)
26880
        return false;
26881
      if (that instanceof mergeCart_args)
26882
        return this.equals((mergeCart_args)that);
26883
      return false;
26884
    }
26885
 
26886
    public boolean equals(mergeCart_args that) {
26887
      if (that == null)
26888
        return false;
26889
 
26890
      boolean this_present_fromCartId = true;
26891
      boolean that_present_fromCartId = true;
26892
      if (this_present_fromCartId || that_present_fromCartId) {
26893
        if (!(this_present_fromCartId && that_present_fromCartId))
26894
          return false;
26895
        if (this.fromCartId != that.fromCartId)
26896
          return false;
26897
      }
26898
 
26899
      boolean this_present_toCartId = true;
26900
      boolean that_present_toCartId = true;
26901
      if (this_present_toCartId || that_present_toCartId) {
26902
        if (!(this_present_toCartId && that_present_toCartId))
26903
          return false;
26904
        if (this.toCartId != that.toCartId)
26905
          return false;
26906
      }
26907
 
26908
      return true;
26909
    }
26910
 
26911
    @Override
26912
    public int hashCode() {
26913
      return 0;
26914
    }
26915
 
26916
    public int compareTo(mergeCart_args other) {
26917
      if (!getClass().equals(other.getClass())) {
26918
        return getClass().getName().compareTo(other.getClass().getName());
26919
      }
26920
 
26921
      int lastComparison = 0;
26922
      mergeCart_args typedOther = (mergeCart_args)other;
26923
 
26924
      lastComparison = Boolean.valueOf(isSetFromCartId()).compareTo(isSetFromCartId());
26925
      if (lastComparison != 0) {
26926
        return lastComparison;
26927
      }
26928
      lastComparison = TBaseHelper.compareTo(fromCartId, typedOther.fromCartId);
26929
      if (lastComparison != 0) {
26930
        return lastComparison;
26931
      }
26932
      lastComparison = Boolean.valueOf(isSetToCartId()).compareTo(isSetToCartId());
26933
      if (lastComparison != 0) {
26934
        return lastComparison;
26935
      }
26936
      lastComparison = TBaseHelper.compareTo(toCartId, typedOther.toCartId);
26937
      if (lastComparison != 0) {
26938
        return lastComparison;
26939
      }
26940
      return 0;
26941
    }
26942
 
26943
    public void read(TProtocol iprot) throws TException {
26944
      TField field;
26945
      iprot.readStructBegin();
26946
      while (true)
26947
      {
26948
        field = iprot.readFieldBegin();
26949
        if (field.type == TType.STOP) { 
26950
          break;
26951
        }
26952
        _Fields fieldId = _Fields.findByThriftId(field.id);
26953
        if (fieldId == null) {
26954
          TProtocolUtil.skip(iprot, field.type);
26955
        } else {
26956
          switch (fieldId) {
26957
            case FROM_CART_ID:
26958
              if (field.type == TType.I64) {
26959
                this.fromCartId = iprot.readI64();
26960
                setFromCartIdIsSet(true);
26961
              } else { 
26962
                TProtocolUtil.skip(iprot, field.type);
26963
              }
26964
              break;
26965
            case TO_CART_ID:
26966
              if (field.type == TType.I64) {
26967
                this.toCartId = iprot.readI64();
26968
                setToCartIdIsSet(true);
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);
26985
      oprot.writeFieldBegin(FROM_CART_ID_FIELD_DESC);
26986
      oprot.writeI64(this.fromCartId);
26987
      oprot.writeFieldEnd();
26988
      oprot.writeFieldBegin(TO_CART_ID_FIELD_DESC);
26989
      oprot.writeI64(this.toCartId);
26990
      oprot.writeFieldEnd();
26991
      oprot.writeFieldStop();
26992
      oprot.writeStructEnd();
26993
    }
26994
 
26995
    @Override
26996
    public String toString() {
26997
      StringBuilder sb = new StringBuilder("mergeCart_args(");
26998
      boolean first = true;
26999
 
27000
      sb.append("fromCartId:");
27001
      sb.append(this.fromCartId);
27002
      first = false;
27003
      if (!first) sb.append(", ");
27004
      sb.append("toCartId:");
27005
      sb.append(this.toCartId);
27006
      first = false;
27007
      sb.append(")");
27008
      return sb.toString();
27009
    }
27010
 
27011
    public void validate() throws TException {
27012
      // check for required fields
27013
    }
27014
 
27015
  }
27016
 
27017
  public static class mergeCart_result implements TBase<mergeCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeCart_result>   {
27018
    private static final TStruct STRUCT_DESC = new TStruct("mergeCart_result");
27019
 
27020
 
27021
 
27022
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27023
    public enum _Fields implements TFieldIdEnum {
27024
;
27025
 
27026
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27027
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27028
 
27029
      static {
27030
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27031
          byId.put((int)field._thriftId, field);
27032
          byName.put(field.getFieldName(), field);
27033
        }
27034
      }
27035
 
27036
      /**
27037
       * Find the _Fields constant that matches fieldId, or null if its not found.
27038
       */
27039
      public static _Fields findByThriftId(int fieldId) {
27040
        return byId.get(fieldId);
27041
      }
27042
 
27043
      /**
27044
       * Find the _Fields constant that matches fieldId, throwing an exception
27045
       * if it is not found.
27046
       */
27047
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27048
        _Fields fields = findByThriftId(fieldId);
27049
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27050
        return fields;
27051
      }
27052
 
27053
      /**
27054
       * Find the _Fields constant that matches name, or null if its not found.
27055
       */
27056
      public static _Fields findByName(String name) {
27057
        return byName.get(name);
27058
      }
27059
 
27060
      private final short _thriftId;
27061
      private final String _fieldName;
27062
 
27063
      _Fields(short thriftId, String fieldName) {
27064
        _thriftId = thriftId;
27065
        _fieldName = fieldName;
27066
      }
27067
 
27068
      public short getThriftFieldId() {
27069
        return _thriftId;
27070
      }
27071
 
27072
      public String getFieldName() {
27073
        return _fieldName;
27074
      }
27075
    }
27076
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27077
    }});
27078
 
27079
    static {
27080
      FieldMetaData.addStructMetaDataMap(mergeCart_result.class, metaDataMap);
27081
    }
27082
 
27083
    public mergeCart_result() {
27084
    }
27085
 
27086
    /**
27087
     * Performs a deep copy on <i>other</i>.
27088
     */
27089
    public mergeCart_result(mergeCart_result other) {
27090
    }
27091
 
27092
    public mergeCart_result deepCopy() {
27093
      return new mergeCart_result(this);
27094
    }
27095
 
27096
    @Deprecated
27097
    public mergeCart_result clone() {
27098
      return new mergeCart_result(this);
27099
    }
27100
 
27101
    public void setFieldValue(_Fields field, Object value) {
27102
      switch (field) {
27103
      }
27104
    }
27105
 
27106
    public void setFieldValue(int fieldID, Object value) {
27107
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27108
    }
27109
 
27110
    public Object getFieldValue(_Fields field) {
27111
      switch (field) {
27112
      }
27113
      throw new IllegalStateException();
27114
    }
27115
 
27116
    public Object getFieldValue(int fieldId) {
27117
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27118
    }
27119
 
27120
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27121
    public boolean isSet(_Fields field) {
27122
      switch (field) {
27123
      }
27124
      throw new IllegalStateException();
27125
    }
27126
 
27127
    public boolean isSet(int fieldID) {
27128
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27129
    }
27130
 
27131
    @Override
27132
    public boolean equals(Object that) {
27133
      if (that == null)
27134
        return false;
27135
      if (that instanceof mergeCart_result)
27136
        return this.equals((mergeCart_result)that);
27137
      return false;
27138
    }
27139
 
27140
    public boolean equals(mergeCart_result that) {
27141
      if (that == null)
27142
        return false;
27143
 
27144
      return true;
27145
    }
27146
 
27147
    @Override
27148
    public int hashCode() {
27149
      return 0;
27150
    }
27151
 
27152
    public int compareTo(mergeCart_result other) {
27153
      if (!getClass().equals(other.getClass())) {
27154
        return getClass().getName().compareTo(other.getClass().getName());
27155
      }
27156
 
27157
      int lastComparison = 0;
27158
      mergeCart_result typedOther = (mergeCart_result)other;
27159
 
27160
      return 0;
27161
    }
27162
 
27163
    public void read(TProtocol iprot) throws TException {
27164
      TField field;
27165
      iprot.readStructBegin();
27166
      while (true)
27167
      {
27168
        field = iprot.readFieldBegin();
27169
        if (field.type == TType.STOP) { 
27170
          break;
27171
        }
27172
        _Fields fieldId = _Fields.findByThriftId(field.id);
27173
        if (fieldId == null) {
27174
          TProtocolUtil.skip(iprot, field.type);
27175
        } else {
27176
          switch (fieldId) {
27177
          }
27178
          iprot.readFieldEnd();
27179
        }
27180
      }
27181
      iprot.readStructEnd();
27182
      validate();
27183
    }
27184
 
27185
    public void write(TProtocol oprot) throws TException {
27186
      oprot.writeStructBegin(STRUCT_DESC);
27187
 
27188
      oprot.writeFieldStop();
27189
      oprot.writeStructEnd();
27190
    }
27191
 
27192
    @Override
27193
    public String toString() {
27194
      StringBuilder sb = new StringBuilder("mergeCart_result(");
27195
      boolean first = true;
27196
 
27197
      sb.append(")");
27198
      return sb.toString();
27199
    }
27200
 
27201
    public void validate() throws TException {
27202
      // check for required fields
27203
    }
27204
 
27205
  }
27206
 
27207
  public static class checkOut_args implements TBase<checkOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_args>   {
27208
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_args");
27209
 
578 chandransh 27210
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
27211
 
27212
    private long cartId;
27213
 
27214
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27215
    public enum _Fields implements TFieldIdEnum {
27216
      CART_ID((short)1, "cartId");
27217
 
27218
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27219
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27220
 
27221
      static {
27222
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27223
          byId.put((int)field._thriftId, field);
27224
          byName.put(field.getFieldName(), field);
27225
        }
27226
      }
27227
 
27228
      /**
27229
       * Find the _Fields constant that matches fieldId, or null if its not found.
27230
       */
27231
      public static _Fields findByThriftId(int fieldId) {
27232
        return byId.get(fieldId);
27233
      }
27234
 
27235
      /**
27236
       * Find the _Fields constant that matches fieldId, throwing an exception
27237
       * if it is not found.
27238
       */
27239
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27240
        _Fields fields = findByThriftId(fieldId);
27241
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27242
        return fields;
27243
      }
27244
 
27245
      /**
27246
       * Find the _Fields constant that matches name, or null if its not found.
27247
       */
27248
      public static _Fields findByName(String name) {
27249
        return byName.get(name);
27250
      }
27251
 
27252
      private final short _thriftId;
27253
      private final String _fieldName;
27254
 
27255
      _Fields(short thriftId, String fieldName) {
27256
        _thriftId = thriftId;
27257
        _fieldName = fieldName;
27258
      }
27259
 
27260
      public short getThriftFieldId() {
27261
        return _thriftId;
27262
      }
27263
 
27264
      public String getFieldName() {
27265
        return _fieldName;
27266
      }
27267
    }
27268
 
27269
    // isset id assignments
27270
    private static final int __CARTID_ISSET_ID = 0;
27271
    private BitSet __isset_bit_vector = new BitSet(1);
27272
 
27273
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27274
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
27275
          new FieldValueMetaData(TType.I64)));
27276
    }});
27277
 
27278
    static {
688 chandransh 27279
      FieldMetaData.addStructMetaDataMap(checkOut_args.class, metaDataMap);
578 chandransh 27280
    }
27281
 
688 chandransh 27282
    public checkOut_args() {
578 chandransh 27283
    }
27284
 
688 chandransh 27285
    public checkOut_args(
578 chandransh 27286
      long cartId)
27287
    {
27288
      this();
27289
      this.cartId = cartId;
27290
      setCartIdIsSet(true);
27291
    }
27292
 
27293
    /**
27294
     * Performs a deep copy on <i>other</i>.
27295
     */
688 chandransh 27296
    public checkOut_args(checkOut_args other) {
578 chandransh 27297
      __isset_bit_vector.clear();
27298
      __isset_bit_vector.or(other.__isset_bit_vector);
27299
      this.cartId = other.cartId;
27300
    }
27301
 
688 chandransh 27302
    public checkOut_args deepCopy() {
27303
      return new checkOut_args(this);
578 chandransh 27304
    }
27305
 
27306
    @Deprecated
688 chandransh 27307
    public checkOut_args clone() {
27308
      return new checkOut_args(this);
578 chandransh 27309
    }
27310
 
27311
    public long getCartId() {
27312
      return this.cartId;
27313
    }
27314
 
688 chandransh 27315
    public checkOut_args setCartId(long cartId) {
578 chandransh 27316
      this.cartId = cartId;
27317
      setCartIdIsSet(true);
27318
      return this;
27319
    }
27320
 
27321
    public void unsetCartId() {
27322
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
27323
    }
27324
 
27325
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
27326
    public boolean isSetCartId() {
27327
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
27328
    }
27329
 
27330
    public void setCartIdIsSet(boolean value) {
27331
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
27332
    }
27333
 
27334
    public void setFieldValue(_Fields field, Object value) {
27335
      switch (field) {
27336
      case CART_ID:
27337
        if (value == null) {
27338
          unsetCartId();
27339
        } else {
27340
          setCartId((Long)value);
27341
        }
27342
        break;
27343
 
27344
      }
27345
    }
27346
 
27347
    public void setFieldValue(int fieldID, Object value) {
27348
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27349
    }
27350
 
27351
    public Object getFieldValue(_Fields field) {
27352
      switch (field) {
27353
      case CART_ID:
27354
        return new Long(getCartId());
27355
 
27356
      }
27357
      throw new IllegalStateException();
27358
    }
27359
 
27360
    public Object getFieldValue(int fieldId) {
27361
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27362
    }
27363
 
27364
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27365
    public boolean isSet(_Fields field) {
27366
      switch (field) {
27367
      case CART_ID:
27368
        return isSetCartId();
27369
      }
27370
      throw new IllegalStateException();
27371
    }
27372
 
27373
    public boolean isSet(int fieldID) {
27374
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27375
    }
27376
 
27377
    @Override
27378
    public boolean equals(Object that) {
27379
      if (that == null)
27380
        return false;
688 chandransh 27381
      if (that instanceof checkOut_args)
27382
        return this.equals((checkOut_args)that);
578 chandransh 27383
      return false;
27384
    }
27385
 
688 chandransh 27386
    public boolean equals(checkOut_args that) {
578 chandransh 27387
      if (that == null)
27388
        return false;
27389
 
27390
      boolean this_present_cartId = true;
27391
      boolean that_present_cartId = true;
27392
      if (this_present_cartId || that_present_cartId) {
27393
        if (!(this_present_cartId && that_present_cartId))
27394
          return false;
27395
        if (this.cartId != that.cartId)
27396
          return false;
27397
      }
27398
 
27399
      return true;
27400
    }
27401
 
27402
    @Override
27403
    public int hashCode() {
27404
      return 0;
27405
    }
27406
 
688 chandransh 27407
    public int compareTo(checkOut_args other) {
578 chandransh 27408
      if (!getClass().equals(other.getClass())) {
27409
        return getClass().getName().compareTo(other.getClass().getName());
27410
      }
27411
 
27412
      int lastComparison = 0;
688 chandransh 27413
      checkOut_args typedOther = (checkOut_args)other;
578 chandransh 27414
 
27415
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
27416
      if (lastComparison != 0) {
27417
        return lastComparison;
27418
      }
27419
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
27420
      if (lastComparison != 0) {
27421
        return lastComparison;
27422
      }
27423
      return 0;
27424
    }
27425
 
27426
    public void read(TProtocol iprot) throws TException {
27427
      TField field;
27428
      iprot.readStructBegin();
27429
      while (true)
27430
      {
27431
        field = iprot.readFieldBegin();
27432
        if (field.type == TType.STOP) { 
27433
          break;
27434
        }
27435
        _Fields fieldId = _Fields.findByThriftId(field.id);
27436
        if (fieldId == null) {
27437
          TProtocolUtil.skip(iprot, field.type);
27438
        } else {
27439
          switch (fieldId) {
27440
            case CART_ID:
27441
              if (field.type == TType.I64) {
27442
                this.cartId = iprot.readI64();
27443
                setCartIdIsSet(true);
27444
              } else { 
27445
                TProtocolUtil.skip(iprot, field.type);
27446
              }
27447
              break;
27448
          }
27449
          iprot.readFieldEnd();
27450
        }
27451
      }
27452
      iprot.readStructEnd();
27453
      validate();
27454
    }
27455
 
27456
    public void write(TProtocol oprot) throws TException {
27457
      validate();
27458
 
27459
      oprot.writeStructBegin(STRUCT_DESC);
27460
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
27461
      oprot.writeI64(this.cartId);
27462
      oprot.writeFieldEnd();
27463
      oprot.writeFieldStop();
27464
      oprot.writeStructEnd();
27465
    }
27466
 
27467
    @Override
27468
    public String toString() {
688 chandransh 27469
      StringBuilder sb = new StringBuilder("checkOut_args(");
578 chandransh 27470
      boolean first = true;
27471
 
27472
      sb.append("cartId:");
27473
      sb.append(this.cartId);
27474
      first = false;
27475
      sb.append(")");
27476
      return sb.toString();
27477
    }
27478
 
27479
    public void validate() throws TException {
27480
      // check for required fields
27481
    }
27482
 
27483
  }
27484
 
688 chandransh 27485
  public static class checkOut_result implements TBase<checkOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<checkOut_result>   {
27486
    private static final TStruct STRUCT_DESC = new TStruct("checkOut_result");
578 chandransh 27487
 
27488
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
27489
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
27490
 
27491
    private boolean success;
27492
    private ShoppingCartException scex;
27493
 
27494
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27495
    public enum _Fields implements TFieldIdEnum {
27496
      SUCCESS((short)0, "success"),
27497
      SCEX((short)1, "scex");
27498
 
27499
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27500
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27501
 
27502
      static {
27503
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27504
          byId.put((int)field._thriftId, field);
27505
          byName.put(field.getFieldName(), field);
27506
        }
27507
      }
27508
 
27509
      /**
27510
       * Find the _Fields constant that matches fieldId, or null if its not found.
27511
       */
27512
      public static _Fields findByThriftId(int fieldId) {
27513
        return byId.get(fieldId);
27514
      }
27515
 
27516
      /**
27517
       * Find the _Fields constant that matches fieldId, throwing an exception
27518
       * if it is not found.
27519
       */
27520
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27521
        _Fields fields = findByThriftId(fieldId);
27522
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27523
        return fields;
27524
      }
27525
 
27526
      /**
27527
       * Find the _Fields constant that matches name, or null if its not found.
27528
       */
27529
      public static _Fields findByName(String name) {
27530
        return byName.get(name);
27531
      }
27532
 
27533
      private final short _thriftId;
27534
      private final String _fieldName;
27535
 
27536
      _Fields(short thriftId, String fieldName) {
27537
        _thriftId = thriftId;
27538
        _fieldName = fieldName;
27539
      }
27540
 
27541
      public short getThriftFieldId() {
27542
        return _thriftId;
27543
      }
27544
 
27545
      public String getFieldName() {
27546
        return _fieldName;
27547
      }
27548
    }
27549
 
27550
    // isset id assignments
27551
    private static final int __SUCCESS_ISSET_ID = 0;
27552
    private BitSet __isset_bit_vector = new BitSet(1);
27553
 
27554
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27555
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27556
          new FieldValueMetaData(TType.BOOL)));
27557
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
27558
          new FieldValueMetaData(TType.STRUCT)));
27559
    }});
27560
 
27561
    static {
688 chandransh 27562
      FieldMetaData.addStructMetaDataMap(checkOut_result.class, metaDataMap);
578 chandransh 27563
    }
27564
 
688 chandransh 27565
    public checkOut_result() {
578 chandransh 27566
    }
27567
 
688 chandransh 27568
    public checkOut_result(
578 chandransh 27569
      boolean success,
27570
      ShoppingCartException scex)
27571
    {
27572
      this();
27573
      this.success = success;
27574
      setSuccessIsSet(true);
27575
      this.scex = scex;
27576
    }
27577
 
27578
    /**
27579
     * Performs a deep copy on <i>other</i>.
27580
     */
688 chandransh 27581
    public checkOut_result(checkOut_result other) {
578 chandransh 27582
      __isset_bit_vector.clear();
27583
      __isset_bit_vector.or(other.__isset_bit_vector);
27584
      this.success = other.success;
27585
      if (other.isSetScex()) {
27586
        this.scex = new ShoppingCartException(other.scex);
27587
      }
27588
    }
27589
 
688 chandransh 27590
    public checkOut_result deepCopy() {
27591
      return new checkOut_result(this);
578 chandransh 27592
    }
27593
 
27594
    @Deprecated
688 chandransh 27595
    public checkOut_result clone() {
27596
      return new checkOut_result(this);
578 chandransh 27597
    }
27598
 
27599
    public boolean isSuccess() {
27600
      return this.success;
27601
    }
27602
 
688 chandransh 27603
    public checkOut_result setSuccess(boolean success) {
578 chandransh 27604
      this.success = success;
27605
      setSuccessIsSet(true);
27606
      return this;
27607
    }
27608
 
27609
    public void unsetSuccess() {
27610
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27611
    }
27612
 
27613
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27614
    public boolean isSetSuccess() {
27615
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27616
    }
27617
 
27618
    public void setSuccessIsSet(boolean value) {
27619
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27620
    }
27621
 
27622
    public ShoppingCartException getScex() {
27623
      return this.scex;
27624
    }
27625
 
688 chandransh 27626
    public checkOut_result setScex(ShoppingCartException scex) {
578 chandransh 27627
      this.scex = scex;
27628
      return this;
27629
    }
27630
 
27631
    public void unsetScex() {
27632
      this.scex = null;
27633
    }
27634
 
27635
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
27636
    public boolean isSetScex() {
27637
      return this.scex != null;
27638
    }
27639
 
27640
    public void setScexIsSet(boolean value) {
27641
      if (!value) {
27642
        this.scex = null;
27643
      }
27644
    }
27645
 
27646
    public void setFieldValue(_Fields field, Object value) {
27647
      switch (field) {
27648
      case SUCCESS:
27649
        if (value == null) {
27650
          unsetSuccess();
27651
        } else {
27652
          setSuccess((Boolean)value);
27653
        }
27654
        break;
27655
 
27656
      case SCEX:
27657
        if (value == null) {
27658
          unsetScex();
27659
        } else {
27660
          setScex((ShoppingCartException)value);
27661
        }
27662
        break;
27663
 
27664
      }
27665
    }
27666
 
27667
    public void setFieldValue(int fieldID, Object value) {
27668
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27669
    }
27670
 
27671
    public Object getFieldValue(_Fields field) {
27672
      switch (field) {
27673
      case SUCCESS:
27674
        return new Boolean(isSuccess());
27675
 
27676
      case SCEX:
27677
        return getScex();
27678
 
27679
      }
27680
      throw new IllegalStateException();
27681
    }
27682
 
27683
    public Object getFieldValue(int fieldId) {
27684
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27685
    }
27686
 
27687
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27688
    public boolean isSet(_Fields field) {
27689
      switch (field) {
27690
      case SUCCESS:
27691
        return isSetSuccess();
27692
      case SCEX:
27693
        return isSetScex();
27694
      }
27695
      throw new IllegalStateException();
27696
    }
27697
 
27698
    public boolean isSet(int fieldID) {
27699
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27700
    }
27701
 
27702
    @Override
27703
    public boolean equals(Object that) {
27704
      if (that == null)
27705
        return false;
688 chandransh 27706
      if (that instanceof checkOut_result)
27707
        return this.equals((checkOut_result)that);
578 chandransh 27708
      return false;
27709
    }
27710
 
688 chandransh 27711
    public boolean equals(checkOut_result that) {
578 chandransh 27712
      if (that == null)
27713
        return false;
27714
 
27715
      boolean this_present_success = true;
27716
      boolean that_present_success = true;
27717
      if (this_present_success || that_present_success) {
27718
        if (!(this_present_success && that_present_success))
27719
          return false;
27720
        if (this.success != that.success)
27721
          return false;
27722
      }
27723
 
27724
      boolean this_present_scex = true && this.isSetScex();
27725
      boolean that_present_scex = true && that.isSetScex();
27726
      if (this_present_scex || that_present_scex) {
27727
        if (!(this_present_scex && that_present_scex))
27728
          return false;
27729
        if (!this.scex.equals(that.scex))
27730
          return false;
27731
      }
27732
 
27733
      return true;
27734
    }
27735
 
27736
    @Override
27737
    public int hashCode() {
27738
      return 0;
27739
    }
27740
 
688 chandransh 27741
    public int compareTo(checkOut_result other) {
578 chandransh 27742
      if (!getClass().equals(other.getClass())) {
27743
        return getClass().getName().compareTo(other.getClass().getName());
27744
      }
27745
 
27746
      int lastComparison = 0;
688 chandransh 27747
      checkOut_result typedOther = (checkOut_result)other;
578 chandransh 27748
 
27749
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27750
      if (lastComparison != 0) {
27751
        return lastComparison;
27752
      }
27753
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27754
      if (lastComparison != 0) {
27755
        return lastComparison;
27756
      }
27757
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
27758
      if (lastComparison != 0) {
27759
        return lastComparison;
27760
      }
27761
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
27762
      if (lastComparison != 0) {
27763
        return lastComparison;
27764
      }
27765
      return 0;
27766
    }
27767
 
27768
    public void read(TProtocol iprot) throws TException {
27769
      TField field;
27770
      iprot.readStructBegin();
27771
      while (true)
27772
      {
27773
        field = iprot.readFieldBegin();
27774
        if (field.type == TType.STOP) { 
27775
          break;
27776
        }
27777
        _Fields fieldId = _Fields.findByThriftId(field.id);
27778
        if (fieldId == null) {
27779
          TProtocolUtil.skip(iprot, field.type);
27780
        } else {
27781
          switch (fieldId) {
27782
            case SUCCESS:
27783
              if (field.type == TType.BOOL) {
27784
                this.success = iprot.readBool();
27785
                setSuccessIsSet(true);
27786
              } else { 
27787
                TProtocolUtil.skip(iprot, field.type);
27788
              }
27789
              break;
27790
            case SCEX:
27791
              if (field.type == TType.STRUCT) {
27792
                this.scex = new ShoppingCartException();
27793
                this.scex.read(iprot);
27794
              } else { 
27795
                TProtocolUtil.skip(iprot, field.type);
27796
              }
27797
              break;
27798
          }
27799
          iprot.readFieldEnd();
27800
        }
27801
      }
27802
      iprot.readStructEnd();
27803
      validate();
27804
    }
27805
 
27806
    public void write(TProtocol oprot) throws TException {
27807
      oprot.writeStructBegin(STRUCT_DESC);
27808
 
27809
      if (this.isSetSuccess()) {
27810
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27811
        oprot.writeBool(this.success);
27812
        oprot.writeFieldEnd();
27813
      } else if (this.isSetScex()) {
27814
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
27815
        this.scex.write(oprot);
27816
        oprot.writeFieldEnd();
27817
      }
27818
      oprot.writeFieldStop();
27819
      oprot.writeStructEnd();
27820
    }
27821
 
27822
    @Override
27823
    public String toString() {
688 chandransh 27824
      StringBuilder sb = new StringBuilder("checkOut_result(");
578 chandransh 27825
      boolean first = true;
27826
 
27827
      sb.append("success:");
27828
      sb.append(this.success);
27829
      first = false;
27830
      if (!first) sb.append(", ");
27831
      sb.append("scex:");
27832
      if (this.scex == null) {
27833
        sb.append("null");
27834
      } else {
27835
        sb.append(this.scex);
27836
      }
27837
      first = false;
27838
      sb.append(")");
27839
      return sb.toString();
27840
    }
27841
 
27842
    public void validate() throws TException {
27843
      // check for required fields
27844
    }
27845
 
27846
  }
27847
 
688 chandransh 27848
  public static class resetCart_args implements TBase<resetCart_args._Fields>, java.io.Serializable, Cloneable   {
27849
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_args");
553 chandransh 27850
 
688 chandransh 27851
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
27852
    private static final TField ITEMS_FIELD_DESC = new TField("items", TType.MAP, (short)2);
553 chandransh 27853
 
688 chandransh 27854
    private long cartId;
708 rajveer 27855
    private Map<Long,Double> items;
553 chandransh 27856
 
27857
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27858
    public enum _Fields implements TFieldIdEnum {
688 chandransh 27859
      CART_ID((short)1, "cartId"),
27860
      ITEMS((short)2, "items");
553 chandransh 27861
 
27862
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27863
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27864
 
27865
      static {
27866
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27867
          byId.put((int)field._thriftId, field);
27868
          byName.put(field.getFieldName(), field);
27869
        }
27870
      }
27871
 
27872
      /**
27873
       * Find the _Fields constant that matches fieldId, or null if its not found.
27874
       */
27875
      public static _Fields findByThriftId(int fieldId) {
27876
        return byId.get(fieldId);
27877
      }
27878
 
27879
      /**
27880
       * Find the _Fields constant that matches fieldId, throwing an exception
27881
       * if it is not found.
27882
       */
27883
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27884
        _Fields fields = findByThriftId(fieldId);
27885
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27886
        return fields;
27887
      }
27888
 
27889
      /**
27890
       * Find the _Fields constant that matches name, or null if its not found.
27891
       */
27892
      public static _Fields findByName(String name) {
27893
        return byName.get(name);
27894
      }
27895
 
27896
      private final short _thriftId;
27897
      private final String _fieldName;
27898
 
27899
      _Fields(short thriftId, String fieldName) {
27900
        _thriftId = thriftId;
27901
        _fieldName = fieldName;
27902
      }
27903
 
27904
      public short getThriftFieldId() {
27905
        return _thriftId;
27906
      }
27907
 
27908
      public String getFieldName() {
27909
        return _fieldName;
27910
      }
27911
    }
27912
 
27913
    // isset id assignments
688 chandransh 27914
    private static final int __CARTID_ISSET_ID = 0;
27915
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 27916
 
27917
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 27918
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
553 chandransh 27919
          new FieldValueMetaData(TType.I64)));
688 chandransh 27920
      put(_Fields.ITEMS, new FieldMetaData("items", TFieldRequirementType.DEFAULT, 
27921
          new MapMetaData(TType.MAP, 
27922
              new FieldValueMetaData(TType.I64), 
708 rajveer 27923
              new FieldValueMetaData(TType.DOUBLE))));
553 chandransh 27924
    }});
27925
 
27926
    static {
688 chandransh 27927
      FieldMetaData.addStructMetaDataMap(resetCart_args.class, metaDataMap);
553 chandransh 27928
    }
27929
 
688 chandransh 27930
    public resetCart_args() {
553 chandransh 27931
    }
27932
 
688 chandransh 27933
    public resetCart_args(
27934
      long cartId,
708 rajveer 27935
      Map<Long,Double> items)
553 chandransh 27936
    {
27937
      this();
688 chandransh 27938
      this.cartId = cartId;
27939
      setCartIdIsSet(true);
27940
      this.items = items;
553 chandransh 27941
    }
27942
 
27943
    /**
27944
     * Performs a deep copy on <i>other</i>.
27945
     */
688 chandransh 27946
    public resetCart_args(resetCart_args other) {
553 chandransh 27947
      __isset_bit_vector.clear();
27948
      __isset_bit_vector.or(other.__isset_bit_vector);
688 chandransh 27949
      this.cartId = other.cartId;
27950
      if (other.isSetItems()) {
708 rajveer 27951
        Map<Long,Double> __this__items = new HashMap<Long,Double>();
27952
        for (Map.Entry<Long, Double> other_element : other.items.entrySet()) {
688 chandransh 27953
 
27954
          Long other_element_key = other_element.getKey();
708 rajveer 27955
          Double other_element_value = other_element.getValue();
688 chandransh 27956
 
27957
          Long __this__items_copy_key = other_element_key;
27958
 
708 rajveer 27959
          Double __this__items_copy_value = other_element_value;
688 chandransh 27960
 
27961
          __this__items.put(__this__items_copy_key, __this__items_copy_value);
27962
        }
27963
        this.items = __this__items;
27964
      }
553 chandransh 27965
    }
27966
 
688 chandransh 27967
    public resetCart_args deepCopy() {
27968
      return new resetCart_args(this);
553 chandransh 27969
    }
27970
 
27971
    @Deprecated
688 chandransh 27972
    public resetCart_args clone() {
27973
      return new resetCart_args(this);
553 chandransh 27974
    }
27975
 
688 chandransh 27976
    public long getCartId() {
27977
      return this.cartId;
553 chandransh 27978
    }
27979
 
688 chandransh 27980
    public resetCart_args setCartId(long cartId) {
27981
      this.cartId = cartId;
27982
      setCartIdIsSet(true);
48 ashish 27983
      return this;
27984
    }
27985
 
688 chandransh 27986
    public void unsetCartId() {
27987
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 27988
    }
27989
 
688 chandransh 27990
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
27991
    public boolean isSetCartId() {
27992
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 27993
    }
27994
 
688 chandransh 27995
    public void setCartIdIsSet(boolean value) {
27996
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
553 chandransh 27997
    }
27998
 
688 chandransh 27999
    public int getItemsSize() {
28000
      return (this.items == null) ? 0 : this.items.size();
553 chandransh 28001
    }
28002
 
708 rajveer 28003
    public void putToItems(long key, double val) {
688 chandransh 28004
      if (this.items == null) {
708 rajveer 28005
        this.items = new HashMap<Long,Double>();
688 chandransh 28006
      }
28007
      this.items.put(key, val);
28008
    }
28009
 
708 rajveer 28010
    public Map<Long,Double> getItems() {
688 chandransh 28011
      return this.items;
28012
    }
28013
 
708 rajveer 28014
    public resetCart_args setItems(Map<Long,Double> items) {
688 chandransh 28015
      this.items = items;
553 chandransh 28016
      return this;
28017
    }
28018
 
688 chandransh 28019
    public void unsetItems() {
28020
      this.items = null;
553 chandransh 28021
    }
28022
 
688 chandransh 28023
    /** Returns true if field items is set (has been asigned a value) and false otherwise */
28024
    public boolean isSetItems() {
28025
      return this.items != null;
553 chandransh 28026
    }
28027
 
688 chandransh 28028
    public void setItemsIsSet(boolean value) {
28029
      if (!value) {
28030
        this.items = null;
28031
      }
553 chandransh 28032
    }
28033
 
28034
    public void setFieldValue(_Fields field, Object value) {
28035
      switch (field) {
688 chandransh 28036
      case CART_ID:
553 chandransh 28037
        if (value == null) {
688 chandransh 28038
          unsetCartId();
553 chandransh 28039
        } else {
688 chandransh 28040
          setCartId((Long)value);
553 chandransh 28041
        }
28042
        break;
28043
 
688 chandransh 28044
      case ITEMS:
553 chandransh 28045
        if (value == null) {
688 chandransh 28046
          unsetItems();
553 chandransh 28047
        } else {
708 rajveer 28048
          setItems((Map<Long,Double>)value);
553 chandransh 28049
        }
28050
        break;
28051
 
28052
      }
28053
    }
28054
 
28055
    public void setFieldValue(int fieldID, Object value) {
28056
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28057
    }
28058
 
28059
    public Object getFieldValue(_Fields field) {
28060
      switch (field) {
688 chandransh 28061
      case CART_ID:
28062
        return new Long(getCartId());
553 chandransh 28063
 
688 chandransh 28064
      case ITEMS:
28065
        return getItems();
553 chandransh 28066
 
28067
      }
28068
      throw new IllegalStateException();
28069
    }
28070
 
28071
    public Object getFieldValue(int fieldId) {
28072
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28073
    }
28074
 
28075
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28076
    public boolean isSet(_Fields field) {
28077
      switch (field) {
688 chandransh 28078
      case CART_ID:
28079
        return isSetCartId();
28080
      case ITEMS:
28081
        return isSetItems();
553 chandransh 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 resetCart_args)
28095
        return this.equals((resetCart_args)that);
553 chandransh 28096
      return false;
28097
    }
28098
 
688 chandransh 28099
    public boolean equals(resetCart_args that) {
553 chandransh 28100
      if (that == null)
28101
        return false;
28102
 
688 chandransh 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))
553 chandransh 28107
          return false;
688 chandransh 28108
        if (this.cartId != that.cartId)
553 chandransh 28109
          return false;
28110
      }
28111
 
688 chandransh 28112
      boolean this_present_items = true && this.isSetItems();
28113
      boolean that_present_items = true && that.isSetItems();
28114
      if (this_present_items || that_present_items) {
28115
        if (!(this_present_items && that_present_items))
553 chandransh 28116
          return false;
688 chandransh 28117
        if (!this.items.equals(that.items))
553 chandransh 28118
          return false;
28119
      }
28120
 
28121
      return true;
28122
    }
28123
 
28124
    @Override
28125
    public int hashCode() {
28126
      return 0;
28127
    }
28128
 
28129
    public void read(TProtocol iprot) throws TException {
28130
      TField field;
28131
      iprot.readStructBegin();
28132
      while (true)
28133
      {
28134
        field = iprot.readFieldBegin();
28135
        if (field.type == TType.STOP) { 
28136
          break;
28137
        }
28138
        _Fields fieldId = _Fields.findByThriftId(field.id);
28139
        if (fieldId == null) {
28140
          TProtocolUtil.skip(iprot, field.type);
28141
        } else {
28142
          switch (fieldId) {
688 chandransh 28143
            case CART_ID:
553 chandransh 28144
              if (field.type == TType.I64) {
688 chandransh 28145
                this.cartId = iprot.readI64();
28146
                setCartIdIsSet(true);
553 chandransh 28147
              } else { 
28148
                TProtocolUtil.skip(iprot, field.type);
28149
              }
28150
              break;
688 chandransh 28151
            case ITEMS:
28152
              if (field.type == TType.MAP) {
28153
                {
771 rajveer 28154
                  TMap _map32 = iprot.readMapBegin();
28155
                  this.items = new HashMap<Long,Double>(2*_map32.size);
28156
                  for (int _i33 = 0; _i33 < _map32.size; ++_i33)
688 chandransh 28157
                  {
771 rajveer 28158
                    long _key34;
28159
                    double _val35;
28160
                    _key34 = iprot.readI64();
28161
                    _val35 = iprot.readDouble();
28162
                    this.items.put(_key34, _val35);
688 chandransh 28163
                  }
28164
                  iprot.readMapEnd();
28165
                }
553 chandransh 28166
              } else { 
28167
                TProtocolUtil.skip(iprot, field.type);
28168
              }
28169
              break;
28170
          }
28171
          iprot.readFieldEnd();
28172
        }
28173
      }
28174
      iprot.readStructEnd();
28175
      validate();
28176
    }
28177
 
28178
    public void write(TProtocol oprot) throws TException {
28179
      validate();
28180
 
28181
      oprot.writeStructBegin(STRUCT_DESC);
688 chandransh 28182
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
28183
      oprot.writeI64(this.cartId);
553 chandransh 28184
      oprot.writeFieldEnd();
688 chandransh 28185
      if (this.items != null) {
28186
        oprot.writeFieldBegin(ITEMS_FIELD_DESC);
28187
        {
708 rajveer 28188
          oprot.writeMapBegin(new TMap(TType.I64, TType.DOUBLE, this.items.size()));
771 rajveer 28189
          for (Map.Entry<Long, Double> _iter36 : this.items.entrySet())
688 chandransh 28190
          {
771 rajveer 28191
            oprot.writeI64(_iter36.getKey());
28192
            oprot.writeDouble(_iter36.getValue());
688 chandransh 28193
          }
28194
          oprot.writeMapEnd();
28195
        }
28196
        oprot.writeFieldEnd();
28197
      }
553 chandransh 28198
      oprot.writeFieldStop();
28199
      oprot.writeStructEnd();
28200
    }
28201
 
28202
    @Override
28203
    public String toString() {
688 chandransh 28204
      StringBuilder sb = new StringBuilder("resetCart_args(");
553 chandransh 28205
      boolean first = true;
28206
 
688 chandransh 28207
      sb.append("cartId:");
28208
      sb.append(this.cartId);
553 chandransh 28209
      first = false;
28210
      if (!first) sb.append(", ");
688 chandransh 28211
      sb.append("items:");
28212
      if (this.items == null) {
28213
        sb.append("null");
28214
      } else {
28215
        sb.append(this.items);
28216
      }
553 chandransh 28217
      first = false;
28218
      sb.append(")");
28219
      return sb.toString();
28220
    }
28221
 
28222
    public void validate() throws TException {
28223
      // check for required fields
28224
    }
28225
 
28226
  }
28227
 
688 chandransh 28228
  public static class resetCart_result implements TBase<resetCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<resetCart_result>   {
28229
    private static final TStruct STRUCT_DESC = new TStruct("resetCart_result");
553 chandransh 28230
 
688 chandransh 28231
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
28232
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
553 chandransh 28233
 
688 chandransh 28234
    private boolean success;
28235
    private ShoppingCartException scex;
553 chandransh 28236
 
28237
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28238
    public enum _Fields implements TFieldIdEnum {
688 chandransh 28239
      SUCCESS((short)0, "success"),
28240
      SCEX((short)1, "scex");
553 chandransh 28241
 
28242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28244
 
28245
      static {
28246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28247
          byId.put((int)field._thriftId, field);
28248
          byName.put(field.getFieldName(), field);
28249
        }
28250
      }
28251
 
28252
      /**
28253
       * Find the _Fields constant that matches fieldId, or null if its not found.
28254
       */
28255
      public static _Fields findByThriftId(int fieldId) {
28256
        return byId.get(fieldId);
28257
      }
28258
 
28259
      /**
28260
       * Find the _Fields constant that matches fieldId, throwing an exception
28261
       * if it is not found.
28262
       */
28263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28264
        _Fields fields = findByThriftId(fieldId);
28265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28266
        return fields;
28267
      }
28268
 
28269
      /**
28270
       * Find the _Fields constant that matches name, or null if its not found.
28271
       */
28272
      public static _Fields findByName(String name) {
28273
        return byName.get(name);
28274
      }
28275
 
28276
      private final short _thriftId;
28277
      private final String _fieldName;
28278
 
28279
      _Fields(short thriftId, String fieldName) {
28280
        _thriftId = thriftId;
28281
        _fieldName = fieldName;
28282
      }
28283
 
28284
      public short getThriftFieldId() {
28285
        return _thriftId;
28286
      }
28287
 
28288
      public String getFieldName() {
28289
        return _fieldName;
28290
      }
28291
    }
688 chandransh 28292
 
28293
    // isset id assignments
28294
    private static final int __SUCCESS_ISSET_ID = 0;
28295
    private BitSet __isset_bit_vector = new BitSet(1);
28296
 
553 chandransh 28297
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
688 chandransh 28298
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28299
          new FieldValueMetaData(TType.BOOL)));
28300
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
28301
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 28302
    }});
28303
 
28304
    static {
688 chandransh 28305
      FieldMetaData.addStructMetaDataMap(resetCart_result.class, metaDataMap);
553 chandransh 28306
    }
28307
 
688 chandransh 28308
    public resetCart_result() {
553 chandransh 28309
    }
28310
 
688 chandransh 28311
    public resetCart_result(
28312
      boolean success,
28313
      ShoppingCartException scex)
28314
    {
28315
      this();
28316
      this.success = success;
28317
      setSuccessIsSet(true);
28318
      this.scex = scex;
28319
    }
28320
 
553 chandransh 28321
    /**
28322
     * Performs a deep copy on <i>other</i>.
28323
     */
688 chandransh 28324
    public resetCart_result(resetCart_result other) {
28325
      __isset_bit_vector.clear();
28326
      __isset_bit_vector.or(other.__isset_bit_vector);
28327
      this.success = other.success;
28328
      if (other.isSetScex()) {
28329
        this.scex = new ShoppingCartException(other.scex);
28330
      }
553 chandransh 28331
    }
28332
 
688 chandransh 28333
    public resetCart_result deepCopy() {
28334
      return new resetCart_result(this);
553 chandransh 28335
    }
28336
 
28337
    @Deprecated
688 chandransh 28338
    public resetCart_result clone() {
28339
      return new resetCart_result(this);
553 chandransh 28340
    }
28341
 
688 chandransh 28342
    public boolean isSuccess() {
28343
      return this.success;
28344
    }
28345
 
28346
    public resetCart_result setSuccess(boolean success) {
28347
      this.success = success;
28348
      setSuccessIsSet(true);
28349
      return this;
28350
    }
28351
 
28352
    public void unsetSuccess() {
28353
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
28354
    }
28355
 
28356
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28357
    public boolean isSetSuccess() {
28358
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
28359
    }
28360
 
28361
    public void setSuccessIsSet(boolean value) {
28362
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
28363
    }
28364
 
28365
    public ShoppingCartException getScex() {
28366
      return this.scex;
28367
    }
28368
 
28369
    public resetCart_result setScex(ShoppingCartException scex) {
28370
      this.scex = scex;
28371
      return this;
28372
    }
28373
 
28374
    public void unsetScex() {
28375
      this.scex = null;
28376
    }
28377
 
28378
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
28379
    public boolean isSetScex() {
28380
      return this.scex != null;
28381
    }
28382
 
28383
    public void setScexIsSet(boolean value) {
28384
      if (!value) {
28385
        this.scex = null;
28386
      }
28387
    }
28388
 
553 chandransh 28389
    public void setFieldValue(_Fields field, Object value) {
28390
      switch (field) {
688 chandransh 28391
      case SUCCESS:
28392
        if (value == null) {
28393
          unsetSuccess();
28394
        } else {
28395
          setSuccess((Boolean)value);
28396
        }
28397
        break;
28398
 
28399
      case SCEX:
28400
        if (value == null) {
28401
          unsetScex();
28402
        } else {
28403
          setScex((ShoppingCartException)value);
28404
        }
28405
        break;
28406
 
553 chandransh 28407
      }
28408
    }
28409
 
28410
    public void setFieldValue(int fieldID, Object value) {
28411
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28412
    }
28413
 
28414
    public Object getFieldValue(_Fields field) {
28415
      switch (field) {
688 chandransh 28416
      case SUCCESS:
28417
        return new Boolean(isSuccess());
28418
 
28419
      case SCEX:
28420
        return getScex();
28421
 
553 chandransh 28422
      }
28423
      throw new IllegalStateException();
28424
    }
28425
 
28426
    public Object getFieldValue(int fieldId) {
28427
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28428
    }
28429
 
28430
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28431
    public boolean isSet(_Fields field) {
28432
      switch (field) {
688 chandransh 28433
      case SUCCESS:
28434
        return isSetSuccess();
28435
      case SCEX:
28436
        return isSetScex();
553 chandransh 28437
      }
28438
      throw new IllegalStateException();
28439
    }
28440
 
28441
    public boolean isSet(int fieldID) {
28442
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28443
    }
28444
 
28445
    @Override
28446
    public boolean equals(Object that) {
28447
      if (that == null)
28448
        return false;
688 chandransh 28449
      if (that instanceof resetCart_result)
28450
        return this.equals((resetCart_result)that);
553 chandransh 28451
      return false;
28452
    }
28453
 
688 chandransh 28454
    public boolean equals(resetCart_result that) {
553 chandransh 28455
      if (that == null)
28456
        return false;
28457
 
688 chandransh 28458
      boolean this_present_success = true;
28459
      boolean that_present_success = true;
28460
      if (this_present_success || that_present_success) {
28461
        if (!(this_present_success && that_present_success))
28462
          return false;
28463
        if (this.success != that.success)
28464
          return false;
28465
      }
28466
 
28467
      boolean this_present_scex = true && this.isSetScex();
28468
      boolean that_present_scex = true && that.isSetScex();
28469
      if (this_present_scex || that_present_scex) {
28470
        if (!(this_present_scex && that_present_scex))
28471
          return false;
28472
        if (!this.scex.equals(that.scex))
28473
          return false;
28474
      }
28475
 
553 chandransh 28476
      return true;
28477
    }
28478
 
28479
    @Override
28480
    public int hashCode() {
28481
      return 0;
28482
    }
28483
 
688 chandransh 28484
    public int compareTo(resetCart_result other) {
553 chandransh 28485
      if (!getClass().equals(other.getClass())) {
28486
        return getClass().getName().compareTo(other.getClass().getName());
28487
      }
28488
 
28489
      int lastComparison = 0;
688 chandransh 28490
      resetCart_result typedOther = (resetCart_result)other;
553 chandransh 28491
 
688 chandransh 28492
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28493
      if (lastComparison != 0) {
28494
        return lastComparison;
28495
      }
28496
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28497
      if (lastComparison != 0) {
28498
        return lastComparison;
28499
      }
28500
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
28501
      if (lastComparison != 0) {
28502
        return lastComparison;
28503
      }
28504
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
28505
      if (lastComparison != 0) {
28506
        return lastComparison;
28507
      }
553 chandransh 28508
      return 0;
28509
    }
28510
 
28511
    public void read(TProtocol iprot) throws TException {
28512
      TField field;
28513
      iprot.readStructBegin();
28514
      while (true)
28515
      {
28516
        field = iprot.readFieldBegin();
28517
        if (field.type == TType.STOP) { 
28518
          break;
28519
        }
28520
        _Fields fieldId = _Fields.findByThriftId(field.id);
28521
        if (fieldId == null) {
28522
          TProtocolUtil.skip(iprot, field.type);
28523
        } else {
28524
          switch (fieldId) {
688 chandransh 28525
            case SUCCESS:
28526
              if (field.type == TType.BOOL) {
28527
                this.success = iprot.readBool();
28528
                setSuccessIsSet(true);
28529
              } else { 
28530
                TProtocolUtil.skip(iprot, field.type);
28531
              }
28532
              break;
28533
            case SCEX:
28534
              if (field.type == TType.STRUCT) {
28535
                this.scex = new ShoppingCartException();
28536
                this.scex.read(iprot);
28537
              } else { 
28538
                TProtocolUtil.skip(iprot, field.type);
28539
              }
28540
              break;
553 chandransh 28541
          }
28542
          iprot.readFieldEnd();
28543
        }
28544
      }
28545
      iprot.readStructEnd();
28546
      validate();
28547
    }
28548
 
28549
    public void write(TProtocol oprot) throws TException {
28550
      oprot.writeStructBegin(STRUCT_DESC);
28551
 
688 chandransh 28552
      if (this.isSetSuccess()) {
28553
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28554
        oprot.writeBool(this.success);
28555
        oprot.writeFieldEnd();
28556
      } else if (this.isSetScex()) {
28557
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
28558
        this.scex.write(oprot);
28559
        oprot.writeFieldEnd();
28560
      }
553 chandransh 28561
      oprot.writeFieldStop();
28562
      oprot.writeStructEnd();
28563
    }
28564
 
28565
    @Override
28566
    public String toString() {
688 chandransh 28567
      StringBuilder sb = new StringBuilder("resetCart_result(");
553 chandransh 28568
      boolean first = true;
28569
 
688 chandransh 28570
      sb.append("success:");
28571
      sb.append(this.success);
28572
      first = false;
28573
      if (!first) sb.append(", ");
28574
      sb.append("scex:");
28575
      if (this.scex == null) {
28576
        sb.append("null");
28577
      } else {
28578
        sb.append(this.scex);
28579
      }
28580
      first = false;
553 chandransh 28581
      sb.append(")");
28582
      return sb.toString();
28583
    }
28584
 
28585
    public void validate() throws TException {
28586
      // check for required fields
28587
    }
28588
 
28589
  }
28590
 
771 rajveer 28591
  public static class getMyResearch_args implements TBase<getMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_args>   {
28592
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_args");
553 chandransh 28593
 
771 rajveer 28594
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 28595
 
28596
    private long userId;
28597
 
28598
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28599
    public enum _Fields implements TFieldIdEnum {
771 rajveer 28600
      USER_ID((short)1, "userId");
553 chandransh 28601
 
28602
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28603
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28604
 
28605
      static {
28606
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28607
          byId.put((int)field._thriftId, field);
28608
          byName.put(field.getFieldName(), field);
28609
        }
28610
      }
28611
 
28612
      /**
28613
       * Find the _Fields constant that matches fieldId, or null if its not found.
28614
       */
28615
      public static _Fields findByThriftId(int fieldId) {
28616
        return byId.get(fieldId);
28617
      }
28618
 
28619
      /**
28620
       * Find the _Fields constant that matches fieldId, throwing an exception
28621
       * if it is not found.
28622
       */
28623
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28624
        _Fields fields = findByThriftId(fieldId);
28625
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28626
        return fields;
28627
      }
28628
 
28629
      /**
28630
       * Find the _Fields constant that matches name, or null if its not found.
28631
       */
28632
      public static _Fields findByName(String name) {
28633
        return byName.get(name);
28634
      }
28635
 
28636
      private final short _thriftId;
28637
      private final String _fieldName;
28638
 
28639
      _Fields(short thriftId, String fieldName) {
28640
        _thriftId = thriftId;
28641
        _fieldName = fieldName;
28642
      }
28643
 
28644
      public short getThriftFieldId() {
28645
        return _thriftId;
28646
      }
28647
 
28648
      public String getFieldName() {
28649
        return _fieldName;
28650
      }
28651
    }
28652
 
28653
    // isset id assignments
28654
    private static final int __USERID_ISSET_ID = 0;
771 rajveer 28655
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 28656
 
28657
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28658
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
28659
          new FieldValueMetaData(TType.I64)));
28660
    }});
28661
 
28662
    static {
771 rajveer 28663
      FieldMetaData.addStructMetaDataMap(getMyResearch_args.class, metaDataMap);
553 chandransh 28664
    }
28665
 
771 rajveer 28666
    public getMyResearch_args() {
553 chandransh 28667
    }
28668
 
771 rajveer 28669
    public getMyResearch_args(
28670
      long userId)
553 chandransh 28671
    {
28672
      this();
28673
      this.userId = userId;
28674
      setUserIdIsSet(true);
28675
    }
28676
 
28677
    /**
28678
     * Performs a deep copy on <i>other</i>.
28679
     */
771 rajveer 28680
    public getMyResearch_args(getMyResearch_args other) {
553 chandransh 28681
      __isset_bit_vector.clear();
28682
      __isset_bit_vector.or(other.__isset_bit_vector);
28683
      this.userId = other.userId;
28684
    }
28685
 
771 rajveer 28686
    public getMyResearch_args deepCopy() {
28687
      return new getMyResearch_args(this);
553 chandransh 28688
    }
28689
 
28690
    @Deprecated
771 rajveer 28691
    public getMyResearch_args clone() {
28692
      return new getMyResearch_args(this);
553 chandransh 28693
    }
28694
 
28695
    public long getUserId() {
28696
      return this.userId;
28697
    }
28698
 
771 rajveer 28699
    public getMyResearch_args setUserId(long userId) {
553 chandransh 28700
      this.userId = userId;
28701
      setUserIdIsSet(true);
28702
      return this;
28703
    }
28704
 
28705
    public void unsetUserId() {
28706
      __isset_bit_vector.clear(__USERID_ISSET_ID);
28707
    }
28708
 
28709
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
28710
    public boolean isSetUserId() {
28711
      return __isset_bit_vector.get(__USERID_ISSET_ID);
28712
    }
28713
 
28714
    public void setUserIdIsSet(boolean value) {
28715
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
28716
    }
28717
 
48 ashish 28718
    public void setFieldValue(_Fields field, Object value) {
28719
      switch (field) {
553 chandransh 28720
      case USER_ID:
48 ashish 28721
        if (value == null) {
553 chandransh 28722
          unsetUserId();
48 ashish 28723
        } else {
553 chandransh 28724
          setUserId((Long)value);
48 ashish 28725
        }
28726
        break;
28727
 
28728
      }
28729
    }
28730
 
28731
    public void setFieldValue(int fieldID, Object value) {
28732
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28733
    }
28734
 
28735
    public Object getFieldValue(_Fields field) {
28736
      switch (field) {
553 chandransh 28737
      case USER_ID:
28738
        return new Long(getUserId());
48 ashish 28739
 
28740
      }
28741
      throw new IllegalStateException();
28742
    }
28743
 
28744
    public Object getFieldValue(int fieldId) {
28745
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28746
    }
28747
 
28748
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28749
    public boolean isSet(_Fields field) {
28750
      switch (field) {
553 chandransh 28751
      case USER_ID:
28752
        return isSetUserId();
48 ashish 28753
      }
28754
      throw new IllegalStateException();
28755
    }
28756
 
28757
    public boolean isSet(int fieldID) {
28758
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28759
    }
28760
 
28761
    @Override
28762
    public boolean equals(Object that) {
28763
      if (that == null)
28764
        return false;
771 rajveer 28765
      if (that instanceof getMyResearch_args)
28766
        return this.equals((getMyResearch_args)that);
48 ashish 28767
      return false;
28768
    }
28769
 
771 rajveer 28770
    public boolean equals(getMyResearch_args that) {
48 ashish 28771
      if (that == null)
28772
        return false;
28773
 
553 chandransh 28774
      boolean this_present_userId = true;
28775
      boolean that_present_userId = true;
28776
      if (this_present_userId || that_present_userId) {
28777
        if (!(this_present_userId && that_present_userId))
48 ashish 28778
          return false;
553 chandransh 28779
        if (this.userId != that.userId)
48 ashish 28780
          return false;
28781
      }
28782
 
28783
      return true;
28784
    }
28785
 
28786
    @Override
28787
    public int hashCode() {
28788
      return 0;
28789
    }
28790
 
771 rajveer 28791
    public int compareTo(getMyResearch_args other) {
48 ashish 28792
      if (!getClass().equals(other.getClass())) {
28793
        return getClass().getName().compareTo(other.getClass().getName());
28794
      }
28795
 
28796
      int lastComparison = 0;
771 rajveer 28797
      getMyResearch_args typedOther = (getMyResearch_args)other;
48 ashish 28798
 
553 chandransh 28799
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 28800
      if (lastComparison != 0) {
28801
        return lastComparison;
28802
      }
553 chandransh 28803
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 28804
      if (lastComparison != 0) {
28805
        return lastComparison;
28806
      }
28807
      return 0;
28808
    }
28809
 
28810
    public void read(TProtocol iprot) throws TException {
28811
      TField field;
28812
      iprot.readStructBegin();
28813
      while (true)
28814
      {
28815
        field = iprot.readFieldBegin();
28816
        if (field.type == TType.STOP) { 
28817
          break;
28818
        }
28819
        _Fields fieldId = _Fields.findByThriftId(field.id);
28820
        if (fieldId == null) {
28821
          TProtocolUtil.skip(iprot, field.type);
28822
        } else {
28823
          switch (fieldId) {
553 chandransh 28824
            case USER_ID:
28825
              if (field.type == TType.I64) {
28826
                this.userId = iprot.readI64();
28827
                setUserIdIsSet(true);
48 ashish 28828
              } else { 
28829
                TProtocolUtil.skip(iprot, field.type);
28830
              }
28831
              break;
28832
          }
28833
          iprot.readFieldEnd();
28834
        }
28835
      }
28836
      iprot.readStructEnd();
28837
      validate();
28838
    }
28839
 
28840
    public void write(TProtocol oprot) throws TException {
28841
      validate();
28842
 
28843
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 28844
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
28845
      oprot.writeI64(this.userId);
28846
      oprot.writeFieldEnd();
28847
      oprot.writeFieldStop();
28848
      oprot.writeStructEnd();
28849
    }
28850
 
28851
    @Override
28852
    public String toString() {
771 rajveer 28853
      StringBuilder sb = new StringBuilder("getMyResearch_args(");
553 chandransh 28854
      boolean first = true;
28855
 
28856
      sb.append("userId:");
28857
      sb.append(this.userId);
28858
      first = false;
28859
      sb.append(")");
28860
      return sb.toString();
28861
    }
28862
 
28863
    public void validate() throws TException {
28864
      // check for required fields
28865
    }
28866
 
28867
  }
28868
 
28869
  public static class getMyResearch_result implements TBase<getMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<getMyResearch_result>   {
28870
    private static final TStruct STRUCT_DESC = new TStruct("getMyResearch_result");
28871
 
28872
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
28873
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
28874
 
28875
    private Widget success;
28876
    private WidgetException scx;
28877
 
28878
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28879
    public enum _Fields implements TFieldIdEnum {
28880
      SUCCESS((short)0, "success"),
28881
      SCX((short)1, "scx");
28882
 
28883
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28884
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28885
 
28886
      static {
28887
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28888
          byId.put((int)field._thriftId, field);
28889
          byName.put(field.getFieldName(), field);
28890
        }
28891
      }
28892
 
28893
      /**
28894
       * Find the _Fields constant that matches fieldId, or null if its not found.
28895
       */
28896
      public static _Fields findByThriftId(int fieldId) {
28897
        return byId.get(fieldId);
28898
      }
28899
 
28900
      /**
28901
       * Find the _Fields constant that matches fieldId, throwing an exception
28902
       * if it is not found.
28903
       */
28904
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28905
        _Fields fields = findByThriftId(fieldId);
28906
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28907
        return fields;
28908
      }
28909
 
28910
      /**
28911
       * Find the _Fields constant that matches name, or null if its not found.
28912
       */
28913
      public static _Fields findByName(String name) {
28914
        return byName.get(name);
28915
      }
28916
 
28917
      private final short _thriftId;
28918
      private final String _fieldName;
28919
 
28920
      _Fields(short thriftId, String fieldName) {
28921
        _thriftId = thriftId;
28922
        _fieldName = fieldName;
28923
      }
28924
 
28925
      public short getThriftFieldId() {
28926
        return _thriftId;
28927
      }
28928
 
28929
      public String getFieldName() {
28930
        return _fieldName;
28931
      }
28932
    }
28933
 
28934
    // isset id assignments
28935
 
28936
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
48 ashish 28937
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 28938
          new StructMetaData(TType.STRUCT, Widget.class)));
28939
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 28940
          new FieldValueMetaData(TType.STRUCT)));
28941
    }});
28942
 
28943
    static {
553 chandransh 28944
      FieldMetaData.addStructMetaDataMap(getMyResearch_result.class, metaDataMap);
48 ashish 28945
    }
28946
 
553 chandransh 28947
    public getMyResearch_result() {
48 ashish 28948
    }
28949
 
553 chandransh 28950
    public getMyResearch_result(
28951
      Widget success,
28952
      WidgetException scx)
48 ashish 28953
    {
28954
      this();
28955
      this.success = success;
553 chandransh 28956
      this.scx = scx;
48 ashish 28957
    }
28958
 
28959
    /**
28960
     * Performs a deep copy on <i>other</i>.
28961
     */
553 chandransh 28962
    public getMyResearch_result(getMyResearch_result other) {
28963
      if (other.isSetSuccess()) {
28964
        this.success = new Widget(other.success);
48 ashish 28965
      }
553 chandransh 28966
      if (other.isSetScx()) {
28967
        this.scx = new WidgetException(other.scx);
28968
      }
48 ashish 28969
    }
28970
 
553 chandransh 28971
    public getMyResearch_result deepCopy() {
28972
      return new getMyResearch_result(this);
48 ashish 28973
    }
28974
 
28975
    @Deprecated
553 chandransh 28976
    public getMyResearch_result clone() {
28977
      return new getMyResearch_result(this);
48 ashish 28978
    }
28979
 
553 chandransh 28980
    public Widget getSuccess() {
48 ashish 28981
      return this.success;
28982
    }
28983
 
553 chandransh 28984
    public getMyResearch_result setSuccess(Widget success) {
48 ashish 28985
      this.success = success;
28986
      return this;
28987
    }
28988
 
28989
    public void unsetSuccess() {
553 chandransh 28990
      this.success = null;
48 ashish 28991
    }
28992
 
28993
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28994
    public boolean isSetSuccess() {
553 chandransh 28995
      return this.success != null;
48 ashish 28996
    }
28997
 
28998
    public void setSuccessIsSet(boolean value) {
553 chandransh 28999
      if (!value) {
29000
        this.success = null;
29001
      }
48 ashish 29002
    }
29003
 
553 chandransh 29004
    public WidgetException getScx() {
29005
      return this.scx;
48 ashish 29006
    }
29007
 
553 chandransh 29008
    public getMyResearch_result setScx(WidgetException scx) {
29009
      this.scx = scx;
48 ashish 29010
      return this;
29011
    }
29012
 
553 chandransh 29013
    public void unsetScx() {
29014
      this.scx = null;
48 ashish 29015
    }
29016
 
553 chandransh 29017
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29018
    public boolean isSetScx() {
29019
      return this.scx != null;
48 ashish 29020
    }
29021
 
553 chandransh 29022
    public void setScxIsSet(boolean value) {
48 ashish 29023
      if (!value) {
553 chandransh 29024
        this.scx = null;
48 ashish 29025
      }
29026
    }
29027
 
29028
    public void setFieldValue(_Fields field, Object value) {
29029
      switch (field) {
29030
      case SUCCESS:
29031
        if (value == null) {
29032
          unsetSuccess();
29033
        } else {
553 chandransh 29034
          setSuccess((Widget)value);
48 ashish 29035
        }
29036
        break;
29037
 
553 chandransh 29038
      case SCX:
48 ashish 29039
        if (value == null) {
553 chandransh 29040
          unsetScx();
48 ashish 29041
        } else {
553 chandransh 29042
          setScx((WidgetException)value);
48 ashish 29043
        }
29044
        break;
29045
 
29046
      }
29047
    }
29048
 
29049
    public void setFieldValue(int fieldID, Object value) {
29050
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29051
    }
29052
 
29053
    public Object getFieldValue(_Fields field) {
29054
      switch (field) {
29055
      case SUCCESS:
553 chandransh 29056
        return getSuccess();
48 ashish 29057
 
553 chandransh 29058
      case SCX:
29059
        return getScx();
48 ashish 29060
 
29061
      }
29062
      throw new IllegalStateException();
29063
    }
29064
 
29065
    public Object getFieldValue(int fieldId) {
29066
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29067
    }
29068
 
29069
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29070
    public boolean isSet(_Fields field) {
29071
      switch (field) {
29072
      case SUCCESS:
29073
        return isSetSuccess();
553 chandransh 29074
      case SCX:
29075
        return isSetScx();
48 ashish 29076
      }
29077
      throw new IllegalStateException();
29078
    }
29079
 
29080
    public boolean isSet(int fieldID) {
29081
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29082
    }
29083
 
29084
    @Override
29085
    public boolean equals(Object that) {
29086
      if (that == null)
29087
        return false;
553 chandransh 29088
      if (that instanceof getMyResearch_result)
29089
        return this.equals((getMyResearch_result)that);
48 ashish 29090
      return false;
29091
    }
29092
 
553 chandransh 29093
    public boolean equals(getMyResearch_result that) {
48 ashish 29094
      if (that == null)
29095
        return false;
29096
 
553 chandransh 29097
      boolean this_present_success = true && this.isSetSuccess();
29098
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 29099
      if (this_present_success || that_present_success) {
29100
        if (!(this_present_success && that_present_success))
29101
          return false;
553 chandransh 29102
        if (!this.success.equals(that.success))
48 ashish 29103
          return false;
29104
      }
29105
 
553 chandransh 29106
      boolean this_present_scx = true && this.isSetScx();
29107
      boolean that_present_scx = true && that.isSetScx();
29108
      if (this_present_scx || that_present_scx) {
29109
        if (!(this_present_scx && that_present_scx))
48 ashish 29110
          return false;
553 chandransh 29111
        if (!this.scx.equals(that.scx))
48 ashish 29112
          return false;
29113
      }
29114
 
29115
      return true;
29116
    }
29117
 
29118
    @Override
29119
    public int hashCode() {
29120
      return 0;
29121
    }
29122
 
553 chandransh 29123
    public int compareTo(getMyResearch_result other) {
48 ashish 29124
      if (!getClass().equals(other.getClass())) {
29125
        return getClass().getName().compareTo(other.getClass().getName());
29126
      }
29127
 
29128
      int lastComparison = 0;
553 chandransh 29129
      getMyResearch_result typedOther = (getMyResearch_result)other;
48 ashish 29130
 
29131
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29132
      if (lastComparison != 0) {
29133
        return lastComparison;
29134
      }
29135
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29136
      if (lastComparison != 0) {
29137
        return lastComparison;
29138
      }
553 chandransh 29139
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 29140
      if (lastComparison != 0) {
29141
        return lastComparison;
29142
      }
553 chandransh 29143
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 29144
      if (lastComparison != 0) {
29145
        return lastComparison;
29146
      }
29147
      return 0;
29148
    }
29149
 
29150
    public void read(TProtocol iprot) throws TException {
29151
      TField field;
29152
      iprot.readStructBegin();
29153
      while (true)
29154
      {
29155
        field = iprot.readFieldBegin();
29156
        if (field.type == TType.STOP) { 
29157
          break;
29158
        }
29159
        _Fields fieldId = _Fields.findByThriftId(field.id);
29160
        if (fieldId == null) {
29161
          TProtocolUtil.skip(iprot, field.type);
29162
        } else {
29163
          switch (fieldId) {
29164
            case SUCCESS:
553 chandransh 29165
              if (field.type == TType.STRUCT) {
29166
                this.success = new Widget();
29167
                this.success.read(iprot);
48 ashish 29168
              } else { 
29169
                TProtocolUtil.skip(iprot, field.type);
29170
              }
29171
              break;
553 chandransh 29172
            case SCX:
48 ashish 29173
              if (field.type == TType.STRUCT) {
553 chandransh 29174
                this.scx = new WidgetException();
29175
                this.scx.read(iprot);
48 ashish 29176
              } else { 
29177
                TProtocolUtil.skip(iprot, field.type);
29178
              }
29179
              break;
29180
          }
29181
          iprot.readFieldEnd();
29182
        }
29183
      }
29184
      iprot.readStructEnd();
29185
      validate();
29186
    }
29187
 
29188
    public void write(TProtocol oprot) throws TException {
29189
      oprot.writeStructBegin(STRUCT_DESC);
29190
 
29191
      if (this.isSetSuccess()) {
29192
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 29193
        this.success.write(oprot);
48 ashish 29194
        oprot.writeFieldEnd();
553 chandransh 29195
      } else if (this.isSetScx()) {
29196
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29197
        this.scx.write(oprot);
48 ashish 29198
        oprot.writeFieldEnd();
29199
      }
29200
      oprot.writeFieldStop();
29201
      oprot.writeStructEnd();
29202
    }
29203
 
29204
    @Override
29205
    public String toString() {
553 chandransh 29206
      StringBuilder sb = new StringBuilder("getMyResearch_result(");
48 ashish 29207
      boolean first = true;
29208
 
29209
      sb.append("success:");
553 chandransh 29210
      if (this.success == null) {
29211
        sb.append("null");
29212
      } else {
29213
        sb.append(this.success);
29214
      }
48 ashish 29215
      first = false;
29216
      if (!first) sb.append(", ");
553 chandransh 29217
      sb.append("scx:");
29218
      if (this.scx == null) {
48 ashish 29219
        sb.append("null");
29220
      } else {
553 chandransh 29221
        sb.append(this.scx);
48 ashish 29222
      }
29223
      first = false;
29224
      sb.append(")");
29225
      return sb.toString();
29226
    }
29227
 
29228
    public void validate() throws TException {
29229
      // check for required fields
29230
    }
29231
 
29232
  }
29233
 
553 chandransh 29234
  public static class updateMyResearch_args implements TBase<updateMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_args>   {
29235
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_args");
130 ashish 29236
 
771 rajveer 29237
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
29238
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 29239
 
771 rajveer 29240
    private long userId;
29241
    private long itemId;
130 ashish 29242
 
29243
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29244
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29245
      USER_ID((short)1, "userId"),
29246
      ITEM_ID((short)2, "itemId");
130 ashish 29247
 
29248
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29249
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29250
 
29251
      static {
29252
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29253
          byId.put((int)field._thriftId, field);
29254
          byName.put(field.getFieldName(), field);
29255
        }
29256
      }
29257
 
29258
      /**
29259
       * Find the _Fields constant that matches fieldId, or null if its not found.
29260
       */
29261
      public static _Fields findByThriftId(int fieldId) {
29262
        return byId.get(fieldId);
29263
      }
29264
 
29265
      /**
29266
       * Find the _Fields constant that matches fieldId, throwing an exception
29267
       * if it is not found.
29268
       */
29269
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29270
        _Fields fields = findByThriftId(fieldId);
29271
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29272
        return fields;
29273
      }
29274
 
29275
      /**
29276
       * Find the _Fields constant that matches name, or null if its not found.
29277
       */
29278
      public static _Fields findByName(String name) {
29279
        return byName.get(name);
29280
      }
29281
 
29282
      private final short _thriftId;
29283
      private final String _fieldName;
29284
 
29285
      _Fields(short thriftId, String fieldName) {
29286
        _thriftId = thriftId;
29287
        _fieldName = fieldName;
29288
      }
29289
 
29290
      public short getThriftFieldId() {
29291
        return _thriftId;
29292
      }
29293
 
29294
      public String getFieldName() {
29295
        return _fieldName;
29296
      }
29297
    }
29298
 
29299
    // isset id assignments
771 rajveer 29300
    private static final int __USERID_ISSET_ID = 0;
29301
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 29302
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 29303
 
29304
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 29305
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
130 ashish 29306
          new FieldValueMetaData(TType.I64)));
771 rajveer 29307
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 29308
          new FieldValueMetaData(TType.I64)));
130 ashish 29309
    }});
29310
 
29311
    static {
553 chandransh 29312
      FieldMetaData.addStructMetaDataMap(updateMyResearch_args.class, metaDataMap);
130 ashish 29313
    }
29314
 
553 chandransh 29315
    public updateMyResearch_args() {
130 ashish 29316
    }
29317
 
553 chandransh 29318
    public updateMyResearch_args(
771 rajveer 29319
      long userId,
29320
      long itemId)
130 ashish 29321
    {
29322
      this();
771 rajveer 29323
      this.userId = userId;
29324
      setUserIdIsSet(true);
29325
      this.itemId = itemId;
29326
      setItemIdIsSet(true);
130 ashish 29327
    }
29328
 
29329
    /**
29330
     * Performs a deep copy on <i>other</i>.
29331
     */
553 chandransh 29332
    public updateMyResearch_args(updateMyResearch_args other) {
130 ashish 29333
      __isset_bit_vector.clear();
29334
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 29335
      this.userId = other.userId;
29336
      this.itemId = other.itemId;
130 ashish 29337
    }
29338
 
553 chandransh 29339
    public updateMyResearch_args deepCopy() {
29340
      return new updateMyResearch_args(this);
130 ashish 29341
    }
29342
 
29343
    @Deprecated
553 chandransh 29344
    public updateMyResearch_args clone() {
29345
      return new updateMyResearch_args(this);
130 ashish 29346
    }
29347
 
771 rajveer 29348
    public long getUserId() {
29349
      return this.userId;
130 ashish 29350
    }
29351
 
771 rajveer 29352
    public updateMyResearch_args setUserId(long userId) {
29353
      this.userId = userId;
29354
      setUserIdIsSet(true);
130 ashish 29355
      return this;
29356
    }
29357
 
771 rajveer 29358
    public void unsetUserId() {
29359
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 29360
    }
29361
 
771 rajveer 29362
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
29363
    public boolean isSetUserId() {
29364
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 29365
    }
29366
 
771 rajveer 29367
    public void setUserIdIsSet(boolean value) {
29368
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 29369
    }
29370
 
771 rajveer 29371
    public long getItemId() {
29372
      return this.itemId;
553 chandransh 29373
    }
29374
 
771 rajveer 29375
    public updateMyResearch_args setItemId(long itemId) {
29376
      this.itemId = itemId;
29377
      setItemIdIsSet(true);
553 chandransh 29378
      return this;
29379
    }
29380
 
771 rajveer 29381
    public void unsetItemId() {
29382
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 29383
    }
29384
 
771 rajveer 29385
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
29386
    public boolean isSetItemId() {
29387
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 29388
    }
29389
 
771 rajveer 29390
    public void setItemIdIsSet(boolean value) {
29391
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 29392
    }
29393
 
130 ashish 29394
    public void setFieldValue(_Fields field, Object value) {
29395
      switch (field) {
553 chandransh 29396
      case USER_ID:
130 ashish 29397
        if (value == null) {
771 rajveer 29398
          unsetUserId();
130 ashish 29399
        } else {
771 rajveer 29400
          setUserId((Long)value);
130 ashish 29401
        }
29402
        break;
29403
 
553 chandransh 29404
      case ITEM_ID:
29405
        if (value == null) {
771 rajveer 29406
          unsetItemId();
553 chandransh 29407
        } else {
771 rajveer 29408
          setItemId((Long)value);
553 chandransh 29409
        }
29410
        break;
29411
 
130 ashish 29412
      }
29413
    }
29414
 
29415
    public void setFieldValue(int fieldID, Object value) {
29416
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29417
    }
29418
 
29419
    public Object getFieldValue(_Fields field) {
29420
      switch (field) {
553 chandransh 29421
      case USER_ID:
771 rajveer 29422
        return new Long(getUserId());
130 ashish 29423
 
553 chandransh 29424
      case ITEM_ID:
771 rajveer 29425
        return new Long(getItemId());
553 chandransh 29426
 
130 ashish 29427
      }
29428
      throw new IllegalStateException();
29429
    }
29430
 
29431
    public Object getFieldValue(int fieldId) {
29432
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29433
    }
29434
 
29435
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29436
    public boolean isSet(_Fields field) {
29437
      switch (field) {
553 chandransh 29438
      case USER_ID:
771 rajveer 29439
        return isSetUserId();
553 chandransh 29440
      case ITEM_ID:
771 rajveer 29441
        return isSetItemId();
130 ashish 29442
      }
29443
      throw new IllegalStateException();
29444
    }
29445
 
29446
    public boolean isSet(int fieldID) {
29447
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29448
    }
29449
 
29450
    @Override
29451
    public boolean equals(Object that) {
29452
      if (that == null)
29453
        return false;
553 chandransh 29454
      if (that instanceof updateMyResearch_args)
29455
        return this.equals((updateMyResearch_args)that);
130 ashish 29456
      return false;
29457
    }
29458
 
553 chandransh 29459
    public boolean equals(updateMyResearch_args that) {
130 ashish 29460
      if (that == null)
29461
        return false;
29462
 
771 rajveer 29463
      boolean this_present_userId = true;
29464
      boolean that_present_userId = true;
29465
      if (this_present_userId || that_present_userId) {
29466
        if (!(this_present_userId && that_present_userId))
130 ashish 29467
          return false;
771 rajveer 29468
        if (this.userId != that.userId)
130 ashish 29469
          return false;
29470
      }
29471
 
771 rajveer 29472
      boolean this_present_itemId = true;
29473
      boolean that_present_itemId = true;
29474
      if (this_present_itemId || that_present_itemId) {
29475
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 29476
          return false;
771 rajveer 29477
        if (this.itemId != that.itemId)
553 chandransh 29478
          return false;
29479
      }
29480
 
130 ashish 29481
      return true;
29482
    }
29483
 
29484
    @Override
29485
    public int hashCode() {
29486
      return 0;
29487
    }
29488
 
553 chandransh 29489
    public int compareTo(updateMyResearch_args other) {
130 ashish 29490
      if (!getClass().equals(other.getClass())) {
29491
        return getClass().getName().compareTo(other.getClass().getName());
29492
      }
29493
 
29494
      int lastComparison = 0;
553 chandransh 29495
      updateMyResearch_args typedOther = (updateMyResearch_args)other;
130 ashish 29496
 
771 rajveer 29497
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 29498
      if (lastComparison != 0) {
29499
        return lastComparison;
29500
      }
771 rajveer 29501
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 29502
      if (lastComparison != 0) {
29503
        return lastComparison;
29504
      }
771 rajveer 29505
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 29506
      if (lastComparison != 0) {
29507
        return lastComparison;
29508
      }
771 rajveer 29509
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 29510
      if (lastComparison != 0) {
29511
        return lastComparison;
29512
      }
130 ashish 29513
      return 0;
29514
    }
29515
 
29516
    public void read(TProtocol iprot) throws TException {
29517
      TField field;
29518
      iprot.readStructBegin();
29519
      while (true)
29520
      {
29521
        field = iprot.readFieldBegin();
29522
        if (field.type == TType.STOP) { 
29523
          break;
29524
        }
29525
        _Fields fieldId = _Fields.findByThriftId(field.id);
29526
        if (fieldId == null) {
29527
          TProtocolUtil.skip(iprot, field.type);
29528
        } else {
29529
          switch (fieldId) {
553 chandransh 29530
            case USER_ID:
130 ashish 29531
              if (field.type == TType.I64) {
771 rajveer 29532
                this.userId = iprot.readI64();
29533
                setUserIdIsSet(true);
130 ashish 29534
              } else { 
29535
                TProtocolUtil.skip(iprot, field.type);
29536
              }
29537
              break;
553 chandransh 29538
            case ITEM_ID:
29539
              if (field.type == TType.I64) {
771 rajveer 29540
                this.itemId = iprot.readI64();
29541
                setItemIdIsSet(true);
553 chandransh 29542
              } else { 
29543
                TProtocolUtil.skip(iprot, field.type);
29544
              }
29545
              break;
130 ashish 29546
          }
29547
          iprot.readFieldEnd();
29548
        }
29549
      }
29550
      iprot.readStructEnd();
29551
      validate();
29552
    }
29553
 
29554
    public void write(TProtocol oprot) throws TException {
29555
      validate();
29556
 
29557
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 29558
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 29559
      oprot.writeI64(this.userId);
130 ashish 29560
      oprot.writeFieldEnd();
553 chandransh 29561
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 29562
      oprot.writeI64(this.itemId);
553 chandransh 29563
      oprot.writeFieldEnd();
130 ashish 29564
      oprot.writeFieldStop();
29565
      oprot.writeStructEnd();
29566
    }
29567
 
29568
    @Override
29569
    public String toString() {
553 chandransh 29570
      StringBuilder sb = new StringBuilder("updateMyResearch_args(");
130 ashish 29571
      boolean first = true;
29572
 
771 rajveer 29573
      sb.append("userId:");
29574
      sb.append(this.userId);
130 ashish 29575
      first = false;
553 chandransh 29576
      if (!first) sb.append(", ");
771 rajveer 29577
      sb.append("itemId:");
29578
      sb.append(this.itemId);
553 chandransh 29579
      first = false;
130 ashish 29580
      sb.append(")");
29581
      return sb.toString();
29582
    }
29583
 
29584
    public void validate() throws TException {
29585
      // check for required fields
29586
    }
29587
 
29588
  }
29589
 
553 chandransh 29590
  public static class updateMyResearch_result implements TBase<updateMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateMyResearch_result>   {
29591
    private static final TStruct STRUCT_DESC = new TStruct("updateMyResearch_result");
130 ashish 29592
 
29593
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
553 chandransh 29594
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
130 ashish 29595
 
29596
    private boolean success;
553 chandransh 29597
    private WidgetException scx;
130 ashish 29598
 
29599
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29600
    public enum _Fields implements TFieldIdEnum {
29601
      SUCCESS((short)0, "success"),
553 chandransh 29602
      SCX((short)1, "scx");
130 ashish 29603
 
29604
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29605
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29606
 
29607
      static {
29608
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29609
          byId.put((int)field._thriftId, field);
29610
          byName.put(field.getFieldName(), field);
29611
        }
29612
      }
29613
 
29614
      /**
29615
       * Find the _Fields constant that matches fieldId, or null if its not found.
29616
       */
29617
      public static _Fields findByThriftId(int fieldId) {
29618
        return byId.get(fieldId);
29619
      }
29620
 
29621
      /**
29622
       * Find the _Fields constant that matches fieldId, throwing an exception
29623
       * if it is not found.
29624
       */
29625
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29626
        _Fields fields = findByThriftId(fieldId);
29627
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29628
        return fields;
29629
      }
29630
 
29631
      /**
29632
       * Find the _Fields constant that matches name, or null if its not found.
29633
       */
29634
      public static _Fields findByName(String name) {
29635
        return byName.get(name);
29636
      }
29637
 
29638
      private final short _thriftId;
29639
      private final String _fieldName;
29640
 
29641
      _Fields(short thriftId, String fieldName) {
29642
        _thriftId = thriftId;
29643
        _fieldName = fieldName;
29644
      }
29645
 
29646
      public short getThriftFieldId() {
29647
        return _thriftId;
29648
      }
29649
 
29650
      public String getFieldName() {
29651
        return _fieldName;
29652
      }
29653
    }
29654
 
29655
    // isset id assignments
29656
    private static final int __SUCCESS_ISSET_ID = 0;
29657
    private BitSet __isset_bit_vector = new BitSet(1);
29658
 
29659
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29660
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29661
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 29662
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 29663
          new FieldValueMetaData(TType.STRUCT)));
29664
    }});
29665
 
29666
    static {
553 chandransh 29667
      FieldMetaData.addStructMetaDataMap(updateMyResearch_result.class, metaDataMap);
130 ashish 29668
    }
29669
 
553 chandransh 29670
    public updateMyResearch_result() {
130 ashish 29671
    }
29672
 
553 chandransh 29673
    public updateMyResearch_result(
130 ashish 29674
      boolean success,
553 chandransh 29675
      WidgetException scx)
130 ashish 29676
    {
29677
      this();
29678
      this.success = success;
29679
      setSuccessIsSet(true);
553 chandransh 29680
      this.scx = scx;
130 ashish 29681
    }
29682
 
29683
    /**
29684
     * Performs a deep copy on <i>other</i>.
29685
     */
553 chandransh 29686
    public updateMyResearch_result(updateMyResearch_result other) {
130 ashish 29687
      __isset_bit_vector.clear();
29688
      __isset_bit_vector.or(other.__isset_bit_vector);
29689
      this.success = other.success;
553 chandransh 29690
      if (other.isSetScx()) {
29691
        this.scx = new WidgetException(other.scx);
130 ashish 29692
      }
29693
    }
29694
 
553 chandransh 29695
    public updateMyResearch_result deepCopy() {
29696
      return new updateMyResearch_result(this);
130 ashish 29697
    }
29698
 
29699
    @Deprecated
553 chandransh 29700
    public updateMyResearch_result clone() {
29701
      return new updateMyResearch_result(this);
130 ashish 29702
    }
29703
 
29704
    public boolean isSuccess() {
29705
      return this.success;
29706
    }
29707
 
553 chandransh 29708
    public updateMyResearch_result setSuccess(boolean success) {
130 ashish 29709
      this.success = success;
29710
      setSuccessIsSet(true);
29711
      return this;
29712
    }
29713
 
29714
    public void unsetSuccess() {
29715
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29716
    }
29717
 
29718
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29719
    public boolean isSetSuccess() {
29720
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29721
    }
29722
 
29723
    public void setSuccessIsSet(boolean value) {
29724
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29725
    }
29726
 
553 chandransh 29727
    public WidgetException getScx() {
29728
      return this.scx;
130 ashish 29729
    }
29730
 
553 chandransh 29731
    public updateMyResearch_result setScx(WidgetException scx) {
29732
      this.scx = scx;
130 ashish 29733
      return this;
29734
    }
29735
 
553 chandransh 29736
    public void unsetScx() {
29737
      this.scx = null;
130 ashish 29738
    }
29739
 
553 chandransh 29740
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
29741
    public boolean isSetScx() {
29742
      return this.scx != null;
130 ashish 29743
    }
29744
 
553 chandransh 29745
    public void setScxIsSet(boolean value) {
130 ashish 29746
      if (!value) {
553 chandransh 29747
        this.scx = null;
130 ashish 29748
      }
29749
    }
29750
 
29751
    public void setFieldValue(_Fields field, Object value) {
29752
      switch (field) {
29753
      case SUCCESS:
29754
        if (value == null) {
29755
          unsetSuccess();
29756
        } else {
29757
          setSuccess((Boolean)value);
29758
        }
29759
        break;
29760
 
553 chandransh 29761
      case SCX:
130 ashish 29762
        if (value == null) {
553 chandransh 29763
          unsetScx();
130 ashish 29764
        } else {
553 chandransh 29765
          setScx((WidgetException)value);
130 ashish 29766
        }
29767
        break;
29768
 
29769
      }
29770
    }
29771
 
29772
    public void setFieldValue(int fieldID, Object value) {
29773
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29774
    }
29775
 
29776
    public Object getFieldValue(_Fields field) {
29777
      switch (field) {
29778
      case SUCCESS:
29779
        return new Boolean(isSuccess());
29780
 
553 chandransh 29781
      case SCX:
29782
        return getScx();
130 ashish 29783
 
29784
      }
29785
      throw new IllegalStateException();
29786
    }
29787
 
29788
    public Object getFieldValue(int fieldId) {
29789
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29790
    }
29791
 
29792
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29793
    public boolean isSet(_Fields field) {
29794
      switch (field) {
29795
      case SUCCESS:
29796
        return isSetSuccess();
553 chandransh 29797
      case SCX:
29798
        return isSetScx();
130 ashish 29799
      }
29800
      throw new IllegalStateException();
29801
    }
29802
 
29803
    public boolean isSet(int fieldID) {
29804
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29805
    }
29806
 
29807
    @Override
29808
    public boolean equals(Object that) {
29809
      if (that == null)
29810
        return false;
553 chandransh 29811
      if (that instanceof updateMyResearch_result)
29812
        return this.equals((updateMyResearch_result)that);
130 ashish 29813
      return false;
29814
    }
29815
 
553 chandransh 29816
    public boolean equals(updateMyResearch_result that) {
130 ashish 29817
      if (that == null)
29818
        return false;
29819
 
29820
      boolean this_present_success = true;
29821
      boolean that_present_success = true;
29822
      if (this_present_success || that_present_success) {
29823
        if (!(this_present_success && that_present_success))
29824
          return false;
29825
        if (this.success != that.success)
29826
          return false;
29827
      }
29828
 
553 chandransh 29829
      boolean this_present_scx = true && this.isSetScx();
29830
      boolean that_present_scx = true && that.isSetScx();
29831
      if (this_present_scx || that_present_scx) {
29832
        if (!(this_present_scx && that_present_scx))
130 ashish 29833
          return false;
553 chandransh 29834
        if (!this.scx.equals(that.scx))
130 ashish 29835
          return false;
29836
      }
29837
 
29838
      return true;
29839
    }
29840
 
29841
    @Override
29842
    public int hashCode() {
29843
      return 0;
29844
    }
29845
 
553 chandransh 29846
    public int compareTo(updateMyResearch_result other) {
130 ashish 29847
      if (!getClass().equals(other.getClass())) {
29848
        return getClass().getName().compareTo(other.getClass().getName());
29849
      }
29850
 
29851
      int lastComparison = 0;
553 chandransh 29852
      updateMyResearch_result typedOther = (updateMyResearch_result)other;
130 ashish 29853
 
29854
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29855
      if (lastComparison != 0) {
29856
        return lastComparison;
29857
      }
29858
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29859
      if (lastComparison != 0) {
29860
        return lastComparison;
29861
      }
553 chandransh 29862
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
130 ashish 29863
      if (lastComparison != 0) {
29864
        return lastComparison;
29865
      }
553 chandransh 29866
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
130 ashish 29867
      if (lastComparison != 0) {
29868
        return lastComparison;
29869
      }
29870
      return 0;
29871
    }
29872
 
29873
    public void read(TProtocol iprot) throws TException {
29874
      TField field;
29875
      iprot.readStructBegin();
29876
      while (true)
29877
      {
29878
        field = iprot.readFieldBegin();
29879
        if (field.type == TType.STOP) { 
29880
          break;
29881
        }
29882
        _Fields fieldId = _Fields.findByThriftId(field.id);
29883
        if (fieldId == null) {
29884
          TProtocolUtil.skip(iprot, field.type);
29885
        } else {
29886
          switch (fieldId) {
29887
            case SUCCESS:
29888
              if (field.type == TType.BOOL) {
29889
                this.success = iprot.readBool();
29890
                setSuccessIsSet(true);
29891
              } else { 
29892
                TProtocolUtil.skip(iprot, field.type);
29893
              }
29894
              break;
553 chandransh 29895
            case SCX:
130 ashish 29896
              if (field.type == TType.STRUCT) {
553 chandransh 29897
                this.scx = new WidgetException();
29898
                this.scx.read(iprot);
130 ashish 29899
              } else { 
29900
                TProtocolUtil.skip(iprot, field.type);
29901
              }
29902
              break;
29903
          }
29904
          iprot.readFieldEnd();
29905
        }
29906
      }
29907
      iprot.readStructEnd();
29908
      validate();
29909
    }
29910
 
29911
    public void write(TProtocol oprot) throws TException {
29912
      oprot.writeStructBegin(STRUCT_DESC);
29913
 
29914
      if (this.isSetSuccess()) {
29915
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29916
        oprot.writeBool(this.success);
29917
        oprot.writeFieldEnd();
553 chandransh 29918
      } else if (this.isSetScx()) {
29919
        oprot.writeFieldBegin(SCX_FIELD_DESC);
29920
        this.scx.write(oprot);
130 ashish 29921
        oprot.writeFieldEnd();
29922
      }
29923
      oprot.writeFieldStop();
29924
      oprot.writeStructEnd();
29925
    }
29926
 
29927
    @Override
29928
    public String toString() {
553 chandransh 29929
      StringBuilder sb = new StringBuilder("updateMyResearch_result(");
130 ashish 29930
      boolean first = true;
29931
 
29932
      sb.append("success:");
29933
      sb.append(this.success);
29934
      first = false;
29935
      if (!first) sb.append(", ");
553 chandransh 29936
      sb.append("scx:");
29937
      if (this.scx == null) {
130 ashish 29938
        sb.append("null");
29939
      } else {
553 chandransh 29940
        sb.append(this.scx);
130 ashish 29941
      }
29942
      first = false;
29943
      sb.append(")");
29944
      return sb.toString();
29945
    }
29946
 
29947
    public void validate() throws TException {
29948
      // check for required fields
29949
    }
29950
 
29951
  }
29952
 
553 chandransh 29953
  public static class deleteItemFromMyResearch_args implements TBase<deleteItemFromMyResearch_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_args>   {
29954
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_args");
130 ashish 29955
 
771 rajveer 29956
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
29957
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
130 ashish 29958
 
771 rajveer 29959
    private long userId;
29960
    private long itemId;
130 ashish 29961
 
29962
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29963
    public enum _Fields implements TFieldIdEnum {
771 rajveer 29964
      USER_ID((short)1, "userId"),
29965
      ITEM_ID((short)2, "itemId");
130 ashish 29966
 
29967
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29968
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29969
 
29970
      static {
29971
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29972
          byId.put((int)field._thriftId, field);
29973
          byName.put(field.getFieldName(), field);
29974
        }
29975
      }
29976
 
29977
      /**
29978
       * Find the _Fields constant that matches fieldId, or null if its not found.
29979
       */
29980
      public static _Fields findByThriftId(int fieldId) {
29981
        return byId.get(fieldId);
29982
      }
29983
 
29984
      /**
29985
       * Find the _Fields constant that matches fieldId, throwing an exception
29986
       * if it is not found.
29987
       */
29988
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29989
        _Fields fields = findByThriftId(fieldId);
29990
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29991
        return fields;
29992
      }
29993
 
29994
      /**
29995
       * Find the _Fields constant that matches name, or null if its not found.
29996
       */
29997
      public static _Fields findByName(String name) {
29998
        return byName.get(name);
29999
      }
30000
 
30001
      private final short _thriftId;
30002
      private final String _fieldName;
30003
 
30004
      _Fields(short thriftId, String fieldName) {
30005
        _thriftId = thriftId;
30006
        _fieldName = fieldName;
30007
      }
30008
 
30009
      public short getThriftFieldId() {
30010
        return _thriftId;
30011
      }
30012
 
30013
      public String getFieldName() {
30014
        return _fieldName;
30015
      }
30016
    }
30017
 
30018
    // isset id assignments
771 rajveer 30019
    private static final int __USERID_ISSET_ID = 0;
30020
    private static final int __ITEMID_ISSET_ID = 1;
553 chandransh 30021
    private BitSet __isset_bit_vector = new BitSet(2);
130 ashish 30022
 
30023
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 30024
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 30025
          new FieldValueMetaData(TType.I64)));
771 rajveer 30026
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 30027
          new FieldValueMetaData(TType.I64)));
130 ashish 30028
    }});
30029
 
30030
    static {
553 chandransh 30031
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_args.class, metaDataMap);
130 ashish 30032
    }
30033
 
553 chandransh 30034
    public deleteItemFromMyResearch_args() {
130 ashish 30035
    }
30036
 
553 chandransh 30037
    public deleteItemFromMyResearch_args(
771 rajveer 30038
      long userId,
30039
      long itemId)
130 ashish 30040
    {
30041
      this();
771 rajveer 30042
      this.userId = userId;
30043
      setUserIdIsSet(true);
30044
      this.itemId = itemId;
30045
      setItemIdIsSet(true);
130 ashish 30046
    }
30047
 
30048
    /**
30049
     * Performs a deep copy on <i>other</i>.
30050
     */
553 chandransh 30051
    public deleteItemFromMyResearch_args(deleteItemFromMyResearch_args other) {
130 ashish 30052
      __isset_bit_vector.clear();
30053
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 30054
      this.userId = other.userId;
30055
      this.itemId = other.itemId;
553 chandransh 30056
    }
30057
 
30058
    public deleteItemFromMyResearch_args deepCopy() {
30059
      return new deleteItemFromMyResearch_args(this);
30060
    }
30061
 
30062
    @Deprecated
30063
    public deleteItemFromMyResearch_args clone() {
30064
      return new deleteItemFromMyResearch_args(this);
30065
    }
30066
 
771 rajveer 30067
    public long getUserId() {
30068
      return this.userId;
553 chandransh 30069
    }
30070
 
771 rajveer 30071
    public deleteItemFromMyResearch_args setUserId(long userId) {
30072
      this.userId = userId;
30073
      setUserIdIsSet(true);
553 chandransh 30074
      return this;
30075
    }
30076
 
771 rajveer 30077
    public void unsetUserId() {
30078
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 30079
    }
30080
 
771 rajveer 30081
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
30082
    public boolean isSetUserId() {
30083
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 30084
    }
30085
 
771 rajveer 30086
    public void setUserIdIsSet(boolean value) {
30087
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 30088
    }
30089
 
771 rajveer 30090
    public long getItemId() {
30091
      return this.itemId;
553 chandransh 30092
    }
30093
 
771 rajveer 30094
    public deleteItemFromMyResearch_args setItemId(long itemId) {
30095
      this.itemId = itemId;
30096
      setItemIdIsSet(true);
553 chandransh 30097
      return this;
30098
    }
30099
 
771 rajveer 30100
    public void unsetItemId() {
30101
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 30102
    }
30103
 
771 rajveer 30104
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
30105
    public boolean isSetItemId() {
30106
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 30107
    }
30108
 
771 rajveer 30109
    public void setItemIdIsSet(boolean value) {
30110
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 30111
    }
30112
 
30113
    public void setFieldValue(_Fields field, Object value) {
30114
      switch (field) {
30115
      case USER_ID:
30116
        if (value == null) {
771 rajveer 30117
          unsetUserId();
553 chandransh 30118
        } else {
771 rajveer 30119
          setUserId((Long)value);
553 chandransh 30120
        }
30121
        break;
30122
 
30123
      case ITEM_ID:
30124
        if (value == null) {
771 rajveer 30125
          unsetItemId();
553 chandransh 30126
        } else {
771 rajveer 30127
          setItemId((Long)value);
553 chandransh 30128
        }
30129
        break;
30130
 
130 ashish 30131
      }
30132
    }
30133
 
553 chandransh 30134
    public void setFieldValue(int fieldID, Object value) {
30135
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 30136
    }
30137
 
553 chandransh 30138
    public Object getFieldValue(_Fields field) {
30139
      switch (field) {
30140
      case USER_ID:
771 rajveer 30141
        return new Long(getUserId());
553 chandransh 30142
 
30143
      case ITEM_ID:
771 rajveer 30144
        return new Long(getItemId());
553 chandransh 30145
 
30146
      }
30147
      throw new IllegalStateException();
30148
    }
30149
 
30150
    public Object getFieldValue(int fieldId) {
30151
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30152
    }
30153
 
30154
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30155
    public boolean isSet(_Fields field) {
30156
      switch (field) {
30157
      case USER_ID:
771 rajveer 30158
        return isSetUserId();
553 chandransh 30159
      case ITEM_ID:
771 rajveer 30160
        return isSetItemId();
553 chandransh 30161
      }
30162
      throw new IllegalStateException();
30163
    }
30164
 
30165
    public boolean isSet(int fieldID) {
30166
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30167
    }
30168
 
30169
    @Override
30170
    public boolean equals(Object that) {
30171
      if (that == null)
30172
        return false;
30173
      if (that instanceof deleteItemFromMyResearch_args)
30174
        return this.equals((deleteItemFromMyResearch_args)that);
30175
      return false;
30176
    }
30177
 
30178
    public boolean equals(deleteItemFromMyResearch_args that) {
30179
      if (that == null)
30180
        return false;
30181
 
771 rajveer 30182
      boolean this_present_userId = true;
30183
      boolean that_present_userId = true;
30184
      if (this_present_userId || that_present_userId) {
30185
        if (!(this_present_userId && that_present_userId))
553 chandransh 30186
          return false;
771 rajveer 30187
        if (this.userId != that.userId)
553 chandransh 30188
          return false;
30189
      }
30190
 
771 rajveer 30191
      boolean this_present_itemId = true;
30192
      boolean that_present_itemId = true;
30193
      if (this_present_itemId || that_present_itemId) {
30194
        if (!(this_present_itemId && that_present_itemId))
553 chandransh 30195
          return false;
771 rajveer 30196
        if (this.itemId != that.itemId)
553 chandransh 30197
          return false;
30198
      }
30199
 
30200
      return true;
30201
    }
30202
 
30203
    @Override
30204
    public int hashCode() {
30205
      return 0;
30206
    }
30207
 
30208
    public int compareTo(deleteItemFromMyResearch_args other) {
30209
      if (!getClass().equals(other.getClass())) {
30210
        return getClass().getName().compareTo(other.getClass().getName());
30211
      }
30212
 
30213
      int lastComparison = 0;
30214
      deleteItemFromMyResearch_args typedOther = (deleteItemFromMyResearch_args)other;
30215
 
771 rajveer 30216
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 30217
      if (lastComparison != 0) {
30218
        return lastComparison;
30219
      }
771 rajveer 30220
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 30221
      if (lastComparison != 0) {
30222
        return lastComparison;
30223
      }
771 rajveer 30224
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
553 chandransh 30225
      if (lastComparison != 0) {
30226
        return lastComparison;
30227
      }
771 rajveer 30228
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
553 chandransh 30229
      if (lastComparison != 0) {
30230
        return lastComparison;
30231
      }
30232
      return 0;
30233
    }
30234
 
30235
    public void read(TProtocol iprot) throws TException {
30236
      TField field;
30237
      iprot.readStructBegin();
30238
      while (true)
30239
      {
30240
        field = iprot.readFieldBegin();
30241
        if (field.type == TType.STOP) { 
30242
          break;
30243
        }
30244
        _Fields fieldId = _Fields.findByThriftId(field.id);
30245
        if (fieldId == null) {
30246
          TProtocolUtil.skip(iprot, field.type);
30247
        } else {
30248
          switch (fieldId) {
30249
            case USER_ID:
30250
              if (field.type == TType.I64) {
771 rajveer 30251
                this.userId = iprot.readI64();
30252
                setUserIdIsSet(true);
553 chandransh 30253
              } else { 
30254
                TProtocolUtil.skip(iprot, field.type);
30255
              }
30256
              break;
30257
            case ITEM_ID:
30258
              if (field.type == TType.I64) {
771 rajveer 30259
                this.itemId = iprot.readI64();
30260
                setItemIdIsSet(true);
553 chandransh 30261
              } else { 
30262
                TProtocolUtil.skip(iprot, field.type);
30263
              }
30264
              break;
30265
          }
30266
          iprot.readFieldEnd();
30267
        }
30268
      }
30269
      iprot.readStructEnd();
30270
      validate();
30271
    }
30272
 
30273
    public void write(TProtocol oprot) throws TException {
30274
      validate();
30275
 
30276
      oprot.writeStructBegin(STRUCT_DESC);
30277
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 30278
      oprot.writeI64(this.userId);
553 chandransh 30279
      oprot.writeFieldEnd();
30280
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 30281
      oprot.writeI64(this.itemId);
553 chandransh 30282
      oprot.writeFieldEnd();
30283
      oprot.writeFieldStop();
30284
      oprot.writeStructEnd();
30285
    }
30286
 
30287
    @Override
30288
    public String toString() {
30289
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_args(");
30290
      boolean first = true;
30291
 
771 rajveer 30292
      sb.append("userId:");
30293
      sb.append(this.userId);
553 chandransh 30294
      first = false;
30295
      if (!first) sb.append(", ");
771 rajveer 30296
      sb.append("itemId:");
30297
      sb.append(this.itemId);
553 chandransh 30298
      first = false;
30299
      sb.append(")");
30300
      return sb.toString();
30301
    }
30302
 
30303
    public void validate() throws TException {
30304
      // check for required fields
30305
    }
30306
 
30307
  }
30308
 
30309
  public static class deleteItemFromMyResearch_result implements TBase<deleteItemFromMyResearch_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromMyResearch_result>   {
30310
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromMyResearch_result");
30311
 
30312
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
30313
 
30314
    private WidgetException scx;
30315
 
30316
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30317
    public enum _Fields implements TFieldIdEnum {
30318
      SCX((short)1, "scx");
30319
 
30320
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30321
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30322
 
30323
      static {
30324
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30325
          byId.put((int)field._thriftId, field);
30326
          byName.put(field.getFieldName(), field);
30327
        }
30328
      }
30329
 
30330
      /**
30331
       * Find the _Fields constant that matches fieldId, or null if its not found.
30332
       */
30333
      public static _Fields findByThriftId(int fieldId) {
30334
        return byId.get(fieldId);
30335
      }
30336
 
30337
      /**
30338
       * Find the _Fields constant that matches fieldId, throwing an exception
30339
       * if it is not found.
30340
       */
30341
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30342
        _Fields fields = findByThriftId(fieldId);
30343
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30344
        return fields;
30345
      }
30346
 
30347
      /**
30348
       * Find the _Fields constant that matches name, or null if its not found.
30349
       */
30350
      public static _Fields findByName(String name) {
30351
        return byName.get(name);
30352
      }
30353
 
30354
      private final short _thriftId;
30355
      private final String _fieldName;
30356
 
30357
      _Fields(short thriftId, String fieldName) {
30358
        _thriftId = thriftId;
30359
        _fieldName = fieldName;
30360
      }
30361
 
30362
      public short getThriftFieldId() {
30363
        return _thriftId;
30364
      }
30365
 
30366
      public String getFieldName() {
30367
        return _fieldName;
30368
      }
30369
    }
30370
 
30371
    // isset id assignments
30372
 
30373
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30374
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
30375
          new FieldValueMetaData(TType.STRUCT)));
30376
    }});
30377
 
30378
    static {
30379
      FieldMetaData.addStructMetaDataMap(deleteItemFromMyResearch_result.class, metaDataMap);
30380
    }
30381
 
30382
    public deleteItemFromMyResearch_result() {
30383
    }
30384
 
30385
    public deleteItemFromMyResearch_result(
30386
      WidgetException scx)
30387
    {
30388
      this();
30389
      this.scx = scx;
30390
    }
30391
 
30392
    /**
30393
     * Performs a deep copy on <i>other</i>.
30394
     */
30395
    public deleteItemFromMyResearch_result(deleteItemFromMyResearch_result other) {
30396
      if (other.isSetScx()) {
30397
        this.scx = new WidgetException(other.scx);
30398
      }
30399
    }
30400
 
30401
    public deleteItemFromMyResearch_result deepCopy() {
30402
      return new deleteItemFromMyResearch_result(this);
30403
    }
30404
 
130 ashish 30405
    @Deprecated
553 chandransh 30406
    public deleteItemFromMyResearch_result clone() {
30407
      return new deleteItemFromMyResearch_result(this);
130 ashish 30408
    }
30409
 
553 chandransh 30410
    public WidgetException getScx() {
30411
      return this.scx;
130 ashish 30412
    }
30413
 
553 chandransh 30414
    public deleteItemFromMyResearch_result setScx(WidgetException scx) {
30415
      this.scx = scx;
130 ashish 30416
      return this;
30417
    }
30418
 
553 chandransh 30419
    public void unsetScx() {
30420
      this.scx = null;
130 ashish 30421
    }
30422
 
553 chandransh 30423
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
30424
    public boolean isSetScx() {
30425
      return this.scx != null;
130 ashish 30426
    }
30427
 
553 chandransh 30428
    public void setScxIsSet(boolean value) {
130 ashish 30429
      if (!value) {
553 chandransh 30430
        this.scx = null;
130 ashish 30431
      }
30432
    }
30433
 
553 chandransh 30434
    public void setFieldValue(_Fields field, Object value) {
30435
      switch (field) {
30436
      case SCX:
30437
        if (value == null) {
30438
          unsetScx();
30439
        } else {
30440
          setScx((WidgetException)value);
30441
        }
30442
        break;
30443
 
30444
      }
130 ashish 30445
    }
30446
 
553 chandransh 30447
    public void setFieldValue(int fieldID, Object value) {
30448
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30449
    }
30450
 
30451
    public Object getFieldValue(_Fields field) {
30452
      switch (field) {
30453
      case SCX:
30454
        return getScx();
30455
 
30456
      }
30457
      throw new IllegalStateException();
30458
    }
30459
 
30460
    public Object getFieldValue(int fieldId) {
30461
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30462
    }
30463
 
30464
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30465
    public boolean isSet(_Fields field) {
30466
      switch (field) {
30467
      case SCX:
30468
        return isSetScx();
30469
      }
30470
      throw new IllegalStateException();
30471
    }
30472
 
30473
    public boolean isSet(int fieldID) {
30474
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30475
    }
30476
 
30477
    @Override
30478
    public boolean equals(Object that) {
30479
      if (that == null)
30480
        return false;
30481
      if (that instanceof deleteItemFromMyResearch_result)
30482
        return this.equals((deleteItemFromMyResearch_result)that);
30483
      return false;
30484
    }
30485
 
30486
    public boolean equals(deleteItemFromMyResearch_result that) {
30487
      if (that == null)
30488
        return false;
30489
 
30490
      boolean this_present_scx = true && this.isSetScx();
30491
      boolean that_present_scx = true && that.isSetScx();
30492
      if (this_present_scx || that_present_scx) {
30493
        if (!(this_present_scx && that_present_scx))
30494
          return false;
30495
        if (!this.scx.equals(that.scx))
30496
          return false;
30497
      }
30498
 
30499
      return true;
30500
    }
30501
 
30502
    @Override
30503
    public int hashCode() {
30504
      return 0;
30505
    }
30506
 
30507
    public int compareTo(deleteItemFromMyResearch_result other) {
30508
      if (!getClass().equals(other.getClass())) {
30509
        return getClass().getName().compareTo(other.getClass().getName());
30510
      }
30511
 
30512
      int lastComparison = 0;
30513
      deleteItemFromMyResearch_result typedOther = (deleteItemFromMyResearch_result)other;
30514
 
30515
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
30516
      if (lastComparison != 0) {
30517
        return lastComparison;
30518
      }
30519
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
30520
      if (lastComparison != 0) {
30521
        return lastComparison;
30522
      }
30523
      return 0;
30524
    }
30525
 
30526
    public void read(TProtocol iprot) throws TException {
30527
      TField field;
30528
      iprot.readStructBegin();
30529
      while (true)
30530
      {
30531
        field = iprot.readFieldBegin();
30532
        if (field.type == TType.STOP) { 
30533
          break;
30534
        }
30535
        _Fields fieldId = _Fields.findByThriftId(field.id);
30536
        if (fieldId == null) {
30537
          TProtocolUtil.skip(iprot, field.type);
30538
        } else {
30539
          switch (fieldId) {
30540
            case SCX:
30541
              if (field.type == TType.STRUCT) {
30542
                this.scx = new WidgetException();
30543
                this.scx.read(iprot);
30544
              } else { 
30545
                TProtocolUtil.skip(iprot, field.type);
30546
              }
30547
              break;
30548
          }
30549
          iprot.readFieldEnd();
30550
        }
30551
      }
30552
      iprot.readStructEnd();
30553
      validate();
30554
    }
30555
 
30556
    public void write(TProtocol oprot) throws TException {
30557
      oprot.writeStructBegin(STRUCT_DESC);
30558
 
30559
      if (this.isSetScx()) {
30560
        oprot.writeFieldBegin(SCX_FIELD_DESC);
30561
        this.scx.write(oprot);
30562
        oprot.writeFieldEnd();
30563
      }
30564
      oprot.writeFieldStop();
30565
      oprot.writeStructEnd();
30566
    }
30567
 
30568
    @Override
30569
    public String toString() {
30570
      StringBuilder sb = new StringBuilder("deleteItemFromMyResearch_result(");
30571
      boolean first = true;
30572
 
30573
      sb.append("scx:");
30574
      if (this.scx == null) {
30575
        sb.append("null");
30576
      } else {
30577
        sb.append(this.scx);
30578
      }
30579
      first = false;
30580
      sb.append(")");
30581
      return sb.toString();
30582
    }
30583
 
30584
    public void validate() throws TException {
30585
      // check for required fields
30586
    }
30587
 
30588
  }
30589
 
771 rajveer 30590
  public static class updateBrowseHistory_args implements TBase<updateBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_args>   {
30591
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_args");
553 chandransh 30592
 
771 rajveer 30593
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
30594
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
553 chandransh 30595
 
771 rajveer 30596
    private long userId;
30597
    private long itemId;
553 chandransh 30598
 
30599
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30600
    public enum _Fields implements TFieldIdEnum {
771 rajveer 30601
      USER_ID((short)1, "userId"),
30602
      ITEM_ID((short)2, "itemId");
553 chandransh 30603
 
30604
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30605
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30606
 
30607
      static {
30608
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30609
          byId.put((int)field._thriftId, field);
30610
          byName.put(field.getFieldName(), field);
30611
        }
30612
      }
30613
 
30614
      /**
30615
       * Find the _Fields constant that matches fieldId, or null if its not found.
30616
       */
30617
      public static _Fields findByThriftId(int fieldId) {
30618
        return byId.get(fieldId);
30619
      }
30620
 
30621
      /**
30622
       * Find the _Fields constant that matches fieldId, throwing an exception
30623
       * if it is not found.
30624
       */
30625
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30626
        _Fields fields = findByThriftId(fieldId);
30627
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30628
        return fields;
30629
      }
30630
 
30631
      /**
30632
       * Find the _Fields constant that matches name, or null if its not found.
30633
       */
30634
      public static _Fields findByName(String name) {
30635
        return byName.get(name);
30636
      }
30637
 
30638
      private final short _thriftId;
30639
      private final String _fieldName;
30640
 
30641
      _Fields(short thriftId, String fieldName) {
30642
        _thriftId = thriftId;
30643
        _fieldName = fieldName;
30644
      }
30645
 
30646
      public short getThriftFieldId() {
30647
        return _thriftId;
30648
      }
30649
 
30650
      public String getFieldName() {
30651
        return _fieldName;
30652
      }
30653
    }
30654
 
30655
    // isset id assignments
771 rajveer 30656
    private static final int __USERID_ISSET_ID = 0;
30657
    private static final int __ITEMID_ISSET_ID = 1;
30658
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 30659
 
30660
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 30661
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 30662
          new FieldValueMetaData(TType.I64)));
771 rajveer 30663
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
553 chandransh 30664
          new FieldValueMetaData(TType.I64)));
30665
    }});
30666
 
30667
    static {
771 rajveer 30668
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_args.class, metaDataMap);
553 chandransh 30669
    }
30670
 
771 rajveer 30671
    public updateBrowseHistory_args() {
553 chandransh 30672
    }
30673
 
771 rajveer 30674
    public updateBrowseHistory_args(
30675
      long userId,
30676
      long itemId)
553 chandransh 30677
    {
30678
      this();
771 rajveer 30679
      this.userId = userId;
30680
      setUserIdIsSet(true);
30681
      this.itemId = itemId;
30682
      setItemIdIsSet(true);
553 chandransh 30683
    }
30684
 
30685
    /**
30686
     * Performs a deep copy on <i>other</i>.
30687
     */
771 rajveer 30688
    public updateBrowseHistory_args(updateBrowseHistory_args other) {
553 chandransh 30689
      __isset_bit_vector.clear();
30690
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 30691
      this.userId = other.userId;
30692
      this.itemId = other.itemId;
553 chandransh 30693
    }
30694
 
771 rajveer 30695
    public updateBrowseHistory_args deepCopy() {
30696
      return new updateBrowseHistory_args(this);
553 chandransh 30697
    }
30698
 
30699
    @Deprecated
771 rajveer 30700
    public updateBrowseHistory_args clone() {
30701
      return new updateBrowseHistory_args(this);
553 chandransh 30702
    }
30703
 
771 rajveer 30704
    public long getUserId() {
30705
      return this.userId;
553 chandransh 30706
    }
30707
 
771 rajveer 30708
    public updateBrowseHistory_args setUserId(long userId) {
30709
      this.userId = userId;
30710
      setUserIdIsSet(true);
130 ashish 30711
      return this;
30712
    }
30713
 
771 rajveer 30714
    public void unsetUserId() {
30715
      __isset_bit_vector.clear(__USERID_ISSET_ID);
130 ashish 30716
    }
30717
 
771 rajveer 30718
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
30719
    public boolean isSetUserId() {
30720
      return __isset_bit_vector.get(__USERID_ISSET_ID);
130 ashish 30721
    }
30722
 
771 rajveer 30723
    public void setUserIdIsSet(boolean value) {
30724
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
130 ashish 30725
    }
30726
 
771 rajveer 30727
    public long getItemId() {
30728
      return this.itemId;
553 chandransh 30729
    }
30730
 
771 rajveer 30731
    public updateBrowseHistory_args setItemId(long itemId) {
30732
      this.itemId = itemId;
30733
      setItemIdIsSet(true);
553 chandransh 30734
      return this;
30735
    }
30736
 
771 rajveer 30737
    public void unsetItemId() {
30738
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
553 chandransh 30739
    }
30740
 
771 rajveer 30741
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
30742
    public boolean isSetItemId() {
30743
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
553 chandransh 30744
    }
30745
 
771 rajveer 30746
    public void setItemIdIsSet(boolean value) {
30747
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
553 chandransh 30748
    }
30749
 
130 ashish 30750
    public void setFieldValue(_Fields field, Object value) {
30751
      switch (field) {
771 rajveer 30752
      case USER_ID:
130 ashish 30753
        if (value == null) {
771 rajveer 30754
          unsetUserId();
130 ashish 30755
        } else {
771 rajveer 30756
          setUserId((Long)value);
130 ashish 30757
        }
30758
        break;
30759
 
771 rajveer 30760
      case ITEM_ID:
130 ashish 30761
        if (value == null) {
771 rajveer 30762
          unsetItemId();
130 ashish 30763
        } else {
771 rajveer 30764
          setItemId((Long)value);
130 ashish 30765
        }
30766
        break;
30767
 
30768
      }
30769
    }
30770
 
30771
    public void setFieldValue(int fieldID, Object value) {
30772
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30773
    }
30774
 
30775
    public Object getFieldValue(_Fields field) {
30776
      switch (field) {
771 rajveer 30777
      case USER_ID:
30778
        return new Long(getUserId());
30779
 
553 chandransh 30780
      case ITEM_ID:
771 rajveer 30781
        return new Long(getItemId());
130 ashish 30782
 
30783
      }
30784
      throw new IllegalStateException();
30785
    }
30786
 
30787
    public Object getFieldValue(int fieldId) {
30788
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30789
    }
30790
 
30791
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30792
    public boolean isSet(_Fields field) {
30793
      switch (field) {
771 rajveer 30794
      case USER_ID:
30795
        return isSetUserId();
553 chandransh 30796
      case ITEM_ID:
771 rajveer 30797
        return isSetItemId();
130 ashish 30798
      }
30799
      throw new IllegalStateException();
30800
    }
30801
 
30802
    public boolean isSet(int fieldID) {
30803
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30804
    }
30805
 
30806
    @Override
30807
    public boolean equals(Object that) {
30808
      if (that == null)
30809
        return false;
771 rajveer 30810
      if (that instanceof updateBrowseHistory_args)
30811
        return this.equals((updateBrowseHistory_args)that);
130 ashish 30812
      return false;
30813
    }
30814
 
771 rajveer 30815
    public boolean equals(updateBrowseHistory_args that) {
130 ashish 30816
      if (that == null)
30817
        return false;
30818
 
771 rajveer 30819
      boolean this_present_userId = true;
30820
      boolean that_present_userId = true;
30821
      if (this_present_userId || that_present_userId) {
30822
        if (!(this_present_userId && that_present_userId))
130 ashish 30823
          return false;
771 rajveer 30824
        if (this.userId != that.userId)
130 ashish 30825
          return false;
30826
      }
30827
 
771 rajveer 30828
      boolean this_present_itemId = true;
30829
      boolean that_present_itemId = true;
30830
      if (this_present_itemId || that_present_itemId) {
30831
        if (!(this_present_itemId && that_present_itemId))
130 ashish 30832
          return false;
771 rajveer 30833
        if (this.itemId != that.itemId)
130 ashish 30834
          return false;
30835
      }
30836
 
30837
      return true;
30838
    }
30839
 
30840
    @Override
30841
    public int hashCode() {
30842
      return 0;
30843
    }
30844
 
771 rajveer 30845
    public int compareTo(updateBrowseHistory_args other) {
130 ashish 30846
      if (!getClass().equals(other.getClass())) {
30847
        return getClass().getName().compareTo(other.getClass().getName());
30848
      }
30849
 
30850
      int lastComparison = 0;
771 rajveer 30851
      updateBrowseHistory_args typedOther = (updateBrowseHistory_args)other;
130 ashish 30852
 
771 rajveer 30853
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
130 ashish 30854
      if (lastComparison != 0) {
30855
        return lastComparison;
30856
      }
771 rajveer 30857
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
130 ashish 30858
      if (lastComparison != 0) {
30859
        return lastComparison;
30860
      }
771 rajveer 30861
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
130 ashish 30862
      if (lastComparison != 0) {
30863
        return lastComparison;
30864
      }
771 rajveer 30865
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
130 ashish 30866
      if (lastComparison != 0) {
30867
        return lastComparison;
30868
      }
30869
      return 0;
30870
    }
30871
 
30872
    public void read(TProtocol iprot) throws TException {
30873
      TField field;
30874
      iprot.readStructBegin();
30875
      while (true)
30876
      {
30877
        field = iprot.readFieldBegin();
30878
        if (field.type == TType.STOP) { 
30879
          break;
30880
        }
30881
        _Fields fieldId = _Fields.findByThriftId(field.id);
30882
        if (fieldId == null) {
30883
          TProtocolUtil.skip(iprot, field.type);
30884
        } else {
30885
          switch (fieldId) {
771 rajveer 30886
            case USER_ID:
553 chandransh 30887
              if (field.type == TType.I64) {
771 rajveer 30888
                this.userId = iprot.readI64();
30889
                setUserIdIsSet(true);
130 ashish 30890
              } else { 
30891
                TProtocolUtil.skip(iprot, field.type);
30892
              }
30893
              break;
771 rajveer 30894
            case ITEM_ID:
553 chandransh 30895
              if (field.type == TType.I64) {
771 rajveer 30896
                this.itemId = iprot.readI64();
30897
                setItemIdIsSet(true);
553 chandransh 30898
              } else { 
30899
                TProtocolUtil.skip(iprot, field.type);
30900
              }
30901
              break;
130 ashish 30902
          }
30903
          iprot.readFieldEnd();
30904
        }
30905
      }
30906
      iprot.readStructEnd();
30907
      validate();
30908
    }
30909
 
30910
    public void write(TProtocol oprot) throws TException {
30911
      validate();
30912
 
30913
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 30914
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
30915
      oprot.writeI64(this.userId);
30916
      oprot.writeFieldEnd();
553 chandransh 30917
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
771 rajveer 30918
      oprot.writeI64(this.itemId);
553 chandransh 30919
      oprot.writeFieldEnd();
130 ashish 30920
      oprot.writeFieldStop();
30921
      oprot.writeStructEnd();
30922
    }
30923
 
30924
    @Override
30925
    public String toString() {
771 rajveer 30926
      StringBuilder sb = new StringBuilder("updateBrowseHistory_args(");
130 ashish 30927
      boolean first = true;
30928
 
771 rajveer 30929
      sb.append("userId:");
30930
      sb.append(this.userId);
553 chandransh 30931
      first = false;
30932
      if (!first) sb.append(", ");
771 rajveer 30933
      sb.append("itemId:");
30934
      sb.append(this.itemId);
130 ashish 30935
      first = false;
30936
      sb.append(")");
30937
      return sb.toString();
30938
    }
30939
 
30940
    public void validate() throws TException {
30941
      // check for required fields
30942
    }
30943
 
30944
  }
30945
 
771 rajveer 30946
  public static class updateBrowseHistory_result implements TBase<updateBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateBrowseHistory_result>   {
30947
    private static final TStruct STRUCT_DESC = new TStruct("updateBrowseHistory_result");
130 ashish 30948
 
30949
 
30950
 
30951
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30952
    public enum _Fields implements TFieldIdEnum {
553 chandransh 30953
;
30954
 
30955
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30956
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30957
 
30958
      static {
30959
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30960
          byId.put((int)field._thriftId, field);
30961
          byName.put(field.getFieldName(), field);
30962
        }
30963
      }
30964
 
30965
      /**
30966
       * Find the _Fields constant that matches fieldId, or null if its not found.
30967
       */
30968
      public static _Fields findByThriftId(int fieldId) {
30969
        return byId.get(fieldId);
30970
      }
30971
 
30972
      /**
30973
       * Find the _Fields constant that matches fieldId, throwing an exception
30974
       * if it is not found.
30975
       */
30976
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30977
        _Fields fields = findByThriftId(fieldId);
30978
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30979
        return fields;
30980
      }
30981
 
30982
      /**
30983
       * Find the _Fields constant that matches name, or null if its not found.
30984
       */
30985
      public static _Fields findByName(String name) {
30986
        return byName.get(name);
30987
      }
30988
 
30989
      private final short _thriftId;
30990
      private final String _fieldName;
30991
 
30992
      _Fields(short thriftId, String fieldName) {
30993
        _thriftId = thriftId;
30994
        _fieldName = fieldName;
30995
      }
30996
 
30997
      public short getThriftFieldId() {
30998
        return _thriftId;
30999
      }
31000
 
31001
      public String getFieldName() {
31002
        return _fieldName;
31003
      }
31004
    }
31005
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31006
    }});
31007
 
31008
    static {
771 rajveer 31009
      FieldMetaData.addStructMetaDataMap(updateBrowseHistory_result.class, metaDataMap);
553 chandransh 31010
    }
31011
 
771 rajveer 31012
    public updateBrowseHistory_result() {
553 chandransh 31013
    }
31014
 
31015
    /**
31016
     * Performs a deep copy on <i>other</i>.
31017
     */
771 rajveer 31018
    public updateBrowseHistory_result(updateBrowseHistory_result other) {
553 chandransh 31019
    }
31020
 
771 rajveer 31021
    public updateBrowseHistory_result deepCopy() {
31022
      return new updateBrowseHistory_result(this);
553 chandransh 31023
    }
31024
 
31025
    @Deprecated
771 rajveer 31026
    public updateBrowseHistory_result clone() {
31027
      return new updateBrowseHistory_result(this);
553 chandransh 31028
    }
31029
 
31030
    public void setFieldValue(_Fields field, Object value) {
31031
      switch (field) {
31032
      }
31033
    }
31034
 
31035
    public void setFieldValue(int fieldID, Object value) {
31036
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31037
    }
31038
 
31039
    public Object getFieldValue(_Fields field) {
31040
      switch (field) {
31041
      }
31042
      throw new IllegalStateException();
31043
    }
31044
 
31045
    public Object getFieldValue(int fieldId) {
31046
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31047
    }
31048
 
31049
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31050
    public boolean isSet(_Fields field) {
31051
      switch (field) {
31052
      }
31053
      throw new IllegalStateException();
31054
    }
31055
 
31056
    public boolean isSet(int fieldID) {
31057
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31058
    }
31059
 
31060
    @Override
31061
    public boolean equals(Object that) {
31062
      if (that == null)
31063
        return false;
771 rajveer 31064
      if (that instanceof updateBrowseHistory_result)
31065
        return this.equals((updateBrowseHistory_result)that);
553 chandransh 31066
      return false;
31067
    }
31068
 
771 rajveer 31069
    public boolean equals(updateBrowseHistory_result that) {
553 chandransh 31070
      if (that == null)
31071
        return false;
31072
 
31073
      return true;
31074
    }
31075
 
31076
    @Override
31077
    public int hashCode() {
31078
      return 0;
31079
    }
31080
 
771 rajveer 31081
    public int compareTo(updateBrowseHistory_result other) {
553 chandransh 31082
      if (!getClass().equals(other.getClass())) {
31083
        return getClass().getName().compareTo(other.getClass().getName());
31084
      }
31085
 
31086
      int lastComparison = 0;
771 rajveer 31087
      updateBrowseHistory_result typedOther = (updateBrowseHistory_result)other;
553 chandransh 31088
 
31089
      return 0;
31090
    }
31091
 
31092
    public void read(TProtocol iprot) throws TException {
31093
      TField field;
31094
      iprot.readStructBegin();
31095
      while (true)
31096
      {
31097
        field = iprot.readFieldBegin();
31098
        if (field.type == TType.STOP) { 
31099
          break;
31100
        }
31101
        _Fields fieldId = _Fields.findByThriftId(field.id);
31102
        if (fieldId == null) {
31103
          TProtocolUtil.skip(iprot, field.type);
31104
        } else {
31105
          switch (fieldId) {
31106
          }
31107
          iprot.readFieldEnd();
31108
        }
31109
      }
31110
      iprot.readStructEnd();
31111
      validate();
31112
    }
31113
 
31114
    public void write(TProtocol oprot) throws TException {
31115
      oprot.writeStructBegin(STRUCT_DESC);
31116
 
31117
      oprot.writeFieldStop();
31118
      oprot.writeStructEnd();
31119
    }
31120
 
31121
    @Override
31122
    public String toString() {
771 rajveer 31123
      StringBuilder sb = new StringBuilder("updateBrowseHistory_result(");
553 chandransh 31124
      boolean first = true;
31125
 
31126
      sb.append(")");
31127
      return sb.toString();
31128
    }
31129
 
31130
    public void validate() throws TException {
31131
      // check for required fields
31132
    }
31133
 
31134
  }
31135
 
771 rajveer 31136
  public static class getBrowseHistory_args implements TBase<getBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_args>   {
31137
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_args");
553 chandransh 31138
 
771 rajveer 31139
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
553 chandransh 31140
 
771 rajveer 31141
    private long userId;
553 chandransh 31142
 
31143
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31144
    public enum _Fields implements TFieldIdEnum {
771 rajveer 31145
      USER_ID((short)1, "userId");
553 chandransh 31146
 
31147
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31148
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31149
 
31150
      static {
31151
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31152
          byId.put((int)field._thriftId, field);
31153
          byName.put(field.getFieldName(), field);
31154
        }
31155
      }
31156
 
31157
      /**
31158
       * Find the _Fields constant that matches fieldId, or null if its not found.
31159
       */
31160
      public static _Fields findByThriftId(int fieldId) {
31161
        return byId.get(fieldId);
31162
      }
31163
 
31164
      /**
31165
       * Find the _Fields constant that matches fieldId, throwing an exception
31166
       * if it is not found.
31167
       */
31168
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31169
        _Fields fields = findByThriftId(fieldId);
31170
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31171
        return fields;
31172
      }
31173
 
31174
      /**
31175
       * Find the _Fields constant that matches name, or null if its not found.
31176
       */
31177
      public static _Fields findByName(String name) {
31178
        return byName.get(name);
31179
      }
31180
 
31181
      private final short _thriftId;
31182
      private final String _fieldName;
31183
 
31184
      _Fields(short thriftId, String fieldName) {
31185
        _thriftId = thriftId;
31186
        _fieldName = fieldName;
31187
      }
31188
 
31189
      public short getThriftFieldId() {
31190
        return _thriftId;
31191
      }
31192
 
31193
      public String getFieldName() {
31194
        return _fieldName;
31195
      }
31196
    }
31197
 
31198
    // isset id assignments
771 rajveer 31199
    private static final int __USERID_ISSET_ID = 0;
31200
    private BitSet __isset_bit_vector = new BitSet(1);
553 chandransh 31201
 
31202
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 31203
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
553 chandransh 31204
          new FieldValueMetaData(TType.I64)));
31205
    }});
31206
 
31207
    static {
771 rajveer 31208
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_args.class, metaDataMap);
553 chandransh 31209
    }
31210
 
771 rajveer 31211
    public getBrowseHistory_args() {
553 chandransh 31212
    }
31213
 
771 rajveer 31214
    public getBrowseHistory_args(
31215
      long userId)
553 chandransh 31216
    {
31217
      this();
771 rajveer 31218
      this.userId = userId;
31219
      setUserIdIsSet(true);
553 chandransh 31220
    }
31221
 
31222
    /**
31223
     * Performs a deep copy on <i>other</i>.
31224
     */
771 rajveer 31225
    public getBrowseHistory_args(getBrowseHistory_args other) {
553 chandransh 31226
      __isset_bit_vector.clear();
31227
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 31228
      this.userId = other.userId;
553 chandransh 31229
    }
31230
 
771 rajveer 31231
    public getBrowseHistory_args deepCopy() {
31232
      return new getBrowseHistory_args(this);
553 chandransh 31233
    }
31234
 
31235
    @Deprecated
771 rajveer 31236
    public getBrowseHistory_args clone() {
31237
      return new getBrowseHistory_args(this);
553 chandransh 31238
    }
31239
 
771 rajveer 31240
    public long getUserId() {
31241
      return this.userId;
553 chandransh 31242
    }
31243
 
771 rajveer 31244
    public getBrowseHistory_args setUserId(long userId) {
31245
      this.userId = userId;
31246
      setUserIdIsSet(true);
553 chandransh 31247
      return this;
31248
    }
31249
 
771 rajveer 31250
    public void unsetUserId() {
31251
      __isset_bit_vector.clear(__USERID_ISSET_ID);
553 chandransh 31252
    }
31253
 
771 rajveer 31254
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
31255
    public boolean isSetUserId() {
31256
      return __isset_bit_vector.get(__USERID_ISSET_ID);
553 chandransh 31257
    }
31258
 
771 rajveer 31259
    public void setUserIdIsSet(boolean value) {
31260
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
553 chandransh 31261
    }
31262
 
31263
    public void setFieldValue(_Fields field, Object value) {
31264
      switch (field) {
31265
      case USER_ID:
31266
        if (value == null) {
771 rajveer 31267
          unsetUserId();
553 chandransh 31268
        } else {
771 rajveer 31269
          setUserId((Long)value);
553 chandransh 31270
        }
31271
        break;
31272
 
31273
      }
31274
    }
31275
 
31276
    public void setFieldValue(int fieldID, Object value) {
31277
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31278
    }
31279
 
31280
    public Object getFieldValue(_Fields field) {
31281
      switch (field) {
31282
      case USER_ID:
771 rajveer 31283
        return new Long(getUserId());
553 chandransh 31284
 
31285
      }
31286
      throw new IllegalStateException();
31287
    }
31288
 
31289
    public Object getFieldValue(int fieldId) {
31290
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31291
    }
31292
 
31293
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31294
    public boolean isSet(_Fields field) {
31295
      switch (field) {
31296
      case USER_ID:
771 rajveer 31297
        return isSetUserId();
553 chandransh 31298
      }
31299
      throw new IllegalStateException();
31300
    }
31301
 
31302
    public boolean isSet(int fieldID) {
31303
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31304
    }
31305
 
31306
    @Override
31307
    public boolean equals(Object that) {
31308
      if (that == null)
31309
        return false;
771 rajveer 31310
      if (that instanceof getBrowseHistory_args)
31311
        return this.equals((getBrowseHistory_args)that);
553 chandransh 31312
      return false;
31313
    }
31314
 
771 rajveer 31315
    public boolean equals(getBrowseHistory_args that) {
553 chandransh 31316
      if (that == null)
31317
        return false;
31318
 
771 rajveer 31319
      boolean this_present_userId = true;
31320
      boolean that_present_userId = true;
31321
      if (this_present_userId || that_present_userId) {
31322
        if (!(this_present_userId && that_present_userId))
553 chandransh 31323
          return false;
771 rajveer 31324
        if (this.userId != that.userId)
553 chandransh 31325
          return false;
31326
      }
31327
 
31328
      return true;
31329
    }
31330
 
31331
    @Override
31332
    public int hashCode() {
31333
      return 0;
31334
    }
31335
 
771 rajveer 31336
    public int compareTo(getBrowseHistory_args other) {
553 chandransh 31337
      if (!getClass().equals(other.getClass())) {
31338
        return getClass().getName().compareTo(other.getClass().getName());
31339
      }
31340
 
31341
      int lastComparison = 0;
771 rajveer 31342
      getBrowseHistory_args typedOther = (getBrowseHistory_args)other;
553 chandransh 31343
 
771 rajveer 31344
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
553 chandransh 31345
      if (lastComparison != 0) {
31346
        return lastComparison;
31347
      }
771 rajveer 31348
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
553 chandransh 31349
      if (lastComparison != 0) {
31350
        return lastComparison;
31351
      }
31352
      return 0;
31353
    }
31354
 
31355
    public void read(TProtocol iprot) throws TException {
31356
      TField field;
31357
      iprot.readStructBegin();
31358
      while (true)
31359
      {
31360
        field = iprot.readFieldBegin();
31361
        if (field.type == TType.STOP) { 
31362
          break;
31363
        }
31364
        _Fields fieldId = _Fields.findByThriftId(field.id);
31365
        if (fieldId == null) {
31366
          TProtocolUtil.skip(iprot, field.type);
31367
        } else {
31368
          switch (fieldId) {
31369
            case USER_ID:
31370
              if (field.type == TType.I64) {
771 rajveer 31371
                this.userId = iprot.readI64();
31372
                setUserIdIsSet(true);
553 chandransh 31373
              } else { 
31374
                TProtocolUtil.skip(iprot, field.type);
31375
              }
31376
              break;
31377
          }
31378
          iprot.readFieldEnd();
31379
        }
31380
      }
31381
      iprot.readStructEnd();
31382
      validate();
31383
    }
31384
 
31385
    public void write(TProtocol oprot) throws TException {
31386
      validate();
31387
 
31388
      oprot.writeStructBegin(STRUCT_DESC);
31389
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
771 rajveer 31390
      oprot.writeI64(this.userId);
553 chandransh 31391
      oprot.writeFieldEnd();
31392
      oprot.writeFieldStop();
31393
      oprot.writeStructEnd();
31394
    }
31395
 
31396
    @Override
31397
    public String toString() {
771 rajveer 31398
      StringBuilder sb = new StringBuilder("getBrowseHistory_args(");
553 chandransh 31399
      boolean first = true;
31400
 
771 rajveer 31401
      sb.append("userId:");
31402
      sb.append(this.userId);
553 chandransh 31403
      first = false;
31404
      sb.append(")");
31405
      return sb.toString();
31406
    }
31407
 
31408
    public void validate() throws TException {
31409
      // check for required fields
31410
    }
31411
 
31412
  }
31413
 
771 rajveer 31414
  public static class getBrowseHistory_result implements TBase<getBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<getBrowseHistory_result>   {
31415
    private static final TStruct STRUCT_DESC = new TStruct("getBrowseHistory_result");
553 chandransh 31416
 
31417
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
31418
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
31419
 
771 rajveer 31420
    private Widget success;
553 chandransh 31421
    private WidgetException scx;
31422
 
31423
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31424
    public enum _Fields implements TFieldIdEnum {
130 ashish 31425
      SUCCESS((short)0, "success"),
553 chandransh 31426
      SCX((short)1, "scx");
130 ashish 31427
 
31428
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31429
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31430
 
31431
      static {
31432
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31433
          byId.put((int)field._thriftId, field);
31434
          byName.put(field.getFieldName(), field);
31435
        }
31436
      }
31437
 
31438
      /**
31439
       * Find the _Fields constant that matches fieldId, or null if its not found.
31440
       */
31441
      public static _Fields findByThriftId(int fieldId) {
31442
        return byId.get(fieldId);
31443
      }
31444
 
31445
      /**
31446
       * Find the _Fields constant that matches fieldId, throwing an exception
31447
       * if it is not found.
31448
       */
31449
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31450
        _Fields fields = findByThriftId(fieldId);
31451
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31452
        return fields;
31453
      }
31454
 
31455
      /**
31456
       * Find the _Fields constant that matches name, or null if its not found.
31457
       */
31458
      public static _Fields findByName(String name) {
31459
        return byName.get(name);
31460
      }
31461
 
31462
      private final short _thriftId;
31463
      private final String _fieldName;
31464
 
31465
      _Fields(short thriftId, String fieldName) {
31466
        _thriftId = thriftId;
31467
        _fieldName = fieldName;
31468
      }
31469
 
31470
      public short getThriftFieldId() {
31471
        return _thriftId;
31472
      }
31473
 
31474
      public String getFieldName() {
31475
        return _fieldName;
31476
      }
31477
    }
31478
 
31479
    // isset id assignments
31480
 
31481
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31482
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
771 rajveer 31483
          new StructMetaData(TType.STRUCT, Widget.class)));
553 chandransh 31484
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
130 ashish 31485
          new FieldValueMetaData(TType.STRUCT)));
31486
    }});
31487
 
31488
    static {
771 rajveer 31489
      FieldMetaData.addStructMetaDataMap(getBrowseHistory_result.class, metaDataMap);
130 ashish 31490
    }
31491
 
771 rajveer 31492
    public getBrowseHistory_result() {
130 ashish 31493
    }
31494
 
771 rajveer 31495
    public getBrowseHistory_result(
31496
      Widget success,
553 chandransh 31497
      WidgetException scx)
130 ashish 31498
    {
31499
      this();
31500
      this.success = success;
553 chandransh 31501
      this.scx = scx;
130 ashish 31502
    }
31503
 
31504
    /**
31505
     * Performs a deep copy on <i>other</i>.
31506
     */
771 rajveer 31507
    public getBrowseHistory_result(getBrowseHistory_result other) {
553 chandransh 31508
      if (other.isSetSuccess()) {
771 rajveer 31509
        this.success = new Widget(other.success);
553 chandransh 31510
      }
31511
      if (other.isSetScx()) {
31512
        this.scx = new WidgetException(other.scx);
31513
      }
31514
    }
31515
 
771 rajveer 31516
    public getBrowseHistory_result deepCopy() {
31517
      return new getBrowseHistory_result(this);
553 chandransh 31518
    }
31519
 
31520
    @Deprecated
771 rajveer 31521
    public getBrowseHistory_result clone() {
31522
      return new getBrowseHistory_result(this);
553 chandransh 31523
    }
31524
 
771 rajveer 31525
    public Widget getSuccess() {
553 chandransh 31526
      return this.success;
31527
    }
31528
 
771 rajveer 31529
    public getBrowseHistory_result setSuccess(Widget success) {
553 chandransh 31530
      this.success = success;
31531
      return this;
31532
    }
31533
 
31534
    public void unsetSuccess() {
31535
      this.success = null;
31536
    }
31537
 
31538
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31539
    public boolean isSetSuccess() {
31540
      return this.success != null;
31541
    }
31542
 
31543
    public void setSuccessIsSet(boolean value) {
31544
      if (!value) {
31545
        this.success = null;
31546
      }
31547
    }
31548
 
31549
    public WidgetException getScx() {
31550
      return this.scx;
31551
    }
31552
 
771 rajveer 31553
    public getBrowseHistory_result setScx(WidgetException scx) {
553 chandransh 31554
      this.scx = scx;
31555
      return this;
31556
    }
31557
 
31558
    public void unsetScx() {
31559
      this.scx = null;
31560
    }
31561
 
31562
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
31563
    public boolean isSetScx() {
31564
      return this.scx != null;
31565
    }
31566
 
31567
    public void setScxIsSet(boolean value) {
31568
      if (!value) {
31569
        this.scx = null;
31570
      }
31571
    }
31572
 
31573
    public void setFieldValue(_Fields field, Object value) {
31574
      switch (field) {
31575
      case SUCCESS:
31576
        if (value == null) {
31577
          unsetSuccess();
31578
        } else {
771 rajveer 31579
          setSuccess((Widget)value);
553 chandransh 31580
        }
31581
        break;
31582
 
31583
      case SCX:
31584
        if (value == null) {
31585
          unsetScx();
31586
        } else {
31587
          setScx((WidgetException)value);
31588
        }
31589
        break;
31590
 
31591
      }
31592
    }
31593
 
31594
    public void setFieldValue(int fieldID, Object value) {
31595
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31596
    }
31597
 
31598
    public Object getFieldValue(_Fields field) {
31599
      switch (field) {
31600
      case SUCCESS:
31601
        return getSuccess();
31602
 
31603
      case SCX:
31604
        return getScx();
31605
 
31606
      }
31607
      throw new IllegalStateException();
31608
    }
31609
 
31610
    public Object getFieldValue(int fieldId) {
31611
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31612
    }
31613
 
31614
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31615
    public boolean isSet(_Fields field) {
31616
      switch (field) {
31617
      case SUCCESS:
31618
        return isSetSuccess();
31619
      case SCX:
31620
        return isSetScx();
31621
      }
31622
      throw new IllegalStateException();
31623
    }
31624
 
31625
    public boolean isSet(int fieldID) {
31626
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31627
    }
31628
 
31629
    @Override
31630
    public boolean equals(Object that) {
31631
      if (that == null)
31632
        return false;
771 rajveer 31633
      if (that instanceof getBrowseHistory_result)
31634
        return this.equals((getBrowseHistory_result)that);
553 chandransh 31635
      return false;
31636
    }
31637
 
771 rajveer 31638
    public boolean equals(getBrowseHistory_result that) {
553 chandransh 31639
      if (that == null)
31640
        return false;
31641
 
31642
      boolean this_present_success = true && this.isSetSuccess();
31643
      boolean that_present_success = true && that.isSetSuccess();
31644
      if (this_present_success || that_present_success) {
31645
        if (!(this_present_success && that_present_success))
31646
          return false;
31647
        if (!this.success.equals(that.success))
31648
          return false;
31649
      }
31650
 
31651
      boolean this_present_scx = true && this.isSetScx();
31652
      boolean that_present_scx = true && that.isSetScx();
31653
      if (this_present_scx || that_present_scx) {
31654
        if (!(this_present_scx && that_present_scx))
31655
          return false;
31656
        if (!this.scx.equals(that.scx))
31657
          return false;
31658
      }
31659
 
31660
      return true;
31661
    }
31662
 
31663
    @Override
31664
    public int hashCode() {
31665
      return 0;
31666
    }
31667
 
771 rajveer 31668
    public int compareTo(getBrowseHistory_result other) {
31669
      if (!getClass().equals(other.getClass())) {
31670
        return getClass().getName().compareTo(other.getClass().getName());
31671
      }
31672
 
31673
      int lastComparison = 0;
31674
      getBrowseHistory_result typedOther = (getBrowseHistory_result)other;
31675
 
31676
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31677
      if (lastComparison != 0) {
31678
        return lastComparison;
31679
      }
31680
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31681
      if (lastComparison != 0) {
31682
        return lastComparison;
31683
      }
31684
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
31685
      if (lastComparison != 0) {
31686
        return lastComparison;
31687
      }
31688
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
31689
      if (lastComparison != 0) {
31690
        return lastComparison;
31691
      }
31692
      return 0;
31693
    }
31694
 
553 chandransh 31695
    public void read(TProtocol iprot) throws TException {
31696
      TField field;
31697
      iprot.readStructBegin();
31698
      while (true)
31699
      {
31700
        field = iprot.readFieldBegin();
31701
        if (field.type == TType.STOP) { 
31702
          break;
31703
        }
31704
        _Fields fieldId = _Fields.findByThriftId(field.id);
31705
        if (fieldId == null) {
31706
          TProtocolUtil.skip(iprot, field.type);
31707
        } else {
31708
          switch (fieldId) {
31709
            case SUCCESS:
31710
              if (field.type == TType.STRUCT) {
771 rajveer 31711
                this.success = new Widget();
553 chandransh 31712
                this.success.read(iprot);
31713
              } else { 
31714
                TProtocolUtil.skip(iprot, field.type);
31715
              }
31716
              break;
31717
            case SCX:
31718
              if (field.type == TType.STRUCT) {
31719
                this.scx = new WidgetException();
31720
                this.scx.read(iprot);
31721
              } else { 
31722
                TProtocolUtil.skip(iprot, field.type);
31723
              }
31724
              break;
31725
          }
31726
          iprot.readFieldEnd();
31727
        }
31728
      }
31729
      iprot.readStructEnd();
31730
      validate();
31731
    }
31732
 
31733
    public void write(TProtocol oprot) throws TException {
31734
      oprot.writeStructBegin(STRUCT_DESC);
31735
 
31736
      if (this.isSetSuccess()) {
31737
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31738
        this.success.write(oprot);
31739
        oprot.writeFieldEnd();
31740
      } else if (this.isSetScx()) {
31741
        oprot.writeFieldBegin(SCX_FIELD_DESC);
31742
        this.scx.write(oprot);
31743
        oprot.writeFieldEnd();
31744
      }
31745
      oprot.writeFieldStop();
31746
      oprot.writeStructEnd();
31747
    }
31748
 
31749
    @Override
31750
    public String toString() {
771 rajveer 31751
      StringBuilder sb = new StringBuilder("getBrowseHistory_result(");
553 chandransh 31752
      boolean first = true;
31753
 
31754
      sb.append("success:");
31755
      if (this.success == null) {
31756
        sb.append("null");
31757
      } else {
31758
        sb.append(this.success);
31759
      }
31760
      first = false;
31761
      if (!first) sb.append(", ");
31762
      sb.append("scx:");
31763
      if (this.scx == null) {
31764
        sb.append("null");
31765
      } else {
31766
        sb.append(this.scx);
31767
      }
31768
      first = false;
31769
      sb.append(")");
31770
      return sb.toString();
31771
    }
31772
 
31773
    public void validate() throws TException {
31774
      // check for required fields
31775
    }
31776
 
31777
  }
31778
 
771 rajveer 31779
  public static class mergeBrowseHistory_args implements TBase<mergeBrowseHistory_args._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_args>   {
31780
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_args");
553 chandransh 31781
 
771 rajveer 31782
    private static final TField FROM_USER_ID_FIELD_DESC = new TField("fromUserId", TType.I64, (short)1);
31783
    private static final TField TO_USER_ID_FIELD_DESC = new TField("toUserId", TType.I64, (short)2);
553 chandransh 31784
 
771 rajveer 31785
    private long fromUserId;
31786
    private long toUserId;
553 chandransh 31787
 
31788
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31789
    public enum _Fields implements TFieldIdEnum {
771 rajveer 31790
      FROM_USER_ID((short)1, "fromUserId"),
31791
      TO_USER_ID((short)2, "toUserId");
553 chandransh 31792
 
31793
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31794
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31795
 
31796
      static {
31797
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31798
          byId.put((int)field._thriftId, field);
31799
          byName.put(field.getFieldName(), field);
31800
        }
31801
      }
31802
 
31803
      /**
31804
       * Find the _Fields constant that matches fieldId, or null if its not found.
31805
       */
31806
      public static _Fields findByThriftId(int fieldId) {
31807
        return byId.get(fieldId);
31808
      }
31809
 
31810
      /**
31811
       * Find the _Fields constant that matches fieldId, throwing an exception
31812
       * if it is not found.
31813
       */
31814
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31815
        _Fields fields = findByThriftId(fieldId);
31816
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31817
        return fields;
31818
      }
31819
 
31820
      /**
31821
       * Find the _Fields constant that matches name, or null if its not found.
31822
       */
31823
      public static _Fields findByName(String name) {
31824
        return byName.get(name);
31825
      }
31826
 
31827
      private final short _thriftId;
31828
      private final String _fieldName;
31829
 
31830
      _Fields(short thriftId, String fieldName) {
31831
        _thriftId = thriftId;
31832
        _fieldName = fieldName;
31833
      }
31834
 
31835
      public short getThriftFieldId() {
31836
        return _thriftId;
31837
      }
31838
 
31839
      public String getFieldName() {
31840
        return _fieldName;
31841
      }
31842
    }
31843
 
31844
    // isset id assignments
771 rajveer 31845
    private static final int __FROMUSERID_ISSET_ID = 0;
31846
    private static final int __TOUSERID_ISSET_ID = 1;
31847
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 31848
 
31849
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
771 rajveer 31850
      put(_Fields.FROM_USER_ID, new FieldMetaData("fromUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 31851
          new FieldValueMetaData(TType.I64)));
771 rajveer 31852
      put(_Fields.TO_USER_ID, new FieldMetaData("toUserId", TFieldRequirementType.DEFAULT, 
553 chandransh 31853
          new FieldValueMetaData(TType.I64)));
31854
    }});
31855
 
31856
    static {
771 rajveer 31857
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_args.class, metaDataMap);
553 chandransh 31858
    }
31859
 
771 rajveer 31860
    public mergeBrowseHistory_args() {
553 chandransh 31861
    }
31862
 
771 rajveer 31863
    public mergeBrowseHistory_args(
31864
      long fromUserId,
31865
      long toUserId)
553 chandransh 31866
    {
31867
      this();
771 rajveer 31868
      this.fromUserId = fromUserId;
31869
      setFromUserIdIsSet(true);
31870
      this.toUserId = toUserId;
31871
      setToUserIdIsSet(true);
553 chandransh 31872
    }
31873
 
31874
    /**
31875
     * Performs a deep copy on <i>other</i>.
31876
     */
771 rajveer 31877
    public mergeBrowseHistory_args(mergeBrowseHistory_args other) {
130 ashish 31878
      __isset_bit_vector.clear();
31879
      __isset_bit_vector.or(other.__isset_bit_vector);
771 rajveer 31880
      this.fromUserId = other.fromUserId;
31881
      this.toUserId = other.toUserId;
553 chandransh 31882
    }
31883
 
771 rajveer 31884
    public mergeBrowseHistory_args deepCopy() {
31885
      return new mergeBrowseHistory_args(this);
553 chandransh 31886
    }
31887
 
31888
    @Deprecated
771 rajveer 31889
    public mergeBrowseHistory_args clone() {
31890
      return new mergeBrowseHistory_args(this);
553 chandransh 31891
    }
31892
 
771 rajveer 31893
    public long getFromUserId() {
31894
      return this.fromUserId;
553 chandransh 31895
    }
31896
 
771 rajveer 31897
    public mergeBrowseHistory_args setFromUserId(long fromUserId) {
31898
      this.fromUserId = fromUserId;
31899
      setFromUserIdIsSet(true);
553 chandransh 31900
      return this;
31901
    }
31902
 
771 rajveer 31903
    public void unsetFromUserId() {
31904
      __isset_bit_vector.clear(__FROMUSERID_ISSET_ID);
553 chandransh 31905
    }
31906
 
771 rajveer 31907
    /** Returns true if field fromUserId is set (has been asigned a value) and false otherwise */
31908
    public boolean isSetFromUserId() {
31909
      return __isset_bit_vector.get(__FROMUSERID_ISSET_ID);
553 chandransh 31910
    }
31911
 
771 rajveer 31912
    public void setFromUserIdIsSet(boolean value) {
31913
      __isset_bit_vector.set(__FROMUSERID_ISSET_ID, value);
553 chandransh 31914
    }
31915
 
771 rajveer 31916
    public long getToUserId() {
31917
      return this.toUserId;
553 chandransh 31918
    }
31919
 
771 rajveer 31920
    public mergeBrowseHistory_args setToUserId(long toUserId) {
31921
      this.toUserId = toUserId;
31922
      setToUserIdIsSet(true);
553 chandransh 31923
      return this;
31924
    }
31925
 
771 rajveer 31926
    public void unsetToUserId() {
31927
      __isset_bit_vector.clear(__TOUSERID_ISSET_ID);
553 chandransh 31928
    }
31929
 
771 rajveer 31930
    /** Returns true if field toUserId is set (has been asigned a value) and false otherwise */
31931
    public boolean isSetToUserId() {
31932
      return __isset_bit_vector.get(__TOUSERID_ISSET_ID);
553 chandransh 31933
    }
31934
 
771 rajveer 31935
    public void setToUserIdIsSet(boolean value) {
31936
      __isset_bit_vector.set(__TOUSERID_ISSET_ID, value);
553 chandransh 31937
    }
31938
 
31939
    public void setFieldValue(_Fields field, Object value) {
31940
      switch (field) {
771 rajveer 31941
      case FROM_USER_ID:
553 chandransh 31942
        if (value == null) {
771 rajveer 31943
          unsetFromUserId();
553 chandransh 31944
        } else {
771 rajveer 31945
          setFromUserId((Long)value);
553 chandransh 31946
        }
31947
        break;
31948
 
771 rajveer 31949
      case TO_USER_ID:
553 chandransh 31950
        if (value == null) {
771 rajveer 31951
          unsetToUserId();
553 chandransh 31952
        } else {
771 rajveer 31953
          setToUserId((Long)value);
553 chandransh 31954
        }
31955
        break;
31956
 
130 ashish 31957
      }
31958
    }
31959
 
553 chandransh 31960
    public void setFieldValue(int fieldID, Object value) {
31961
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
130 ashish 31962
    }
31963
 
553 chandransh 31964
    public Object getFieldValue(_Fields field) {
31965
      switch (field) {
771 rajveer 31966
      case FROM_USER_ID:
31967
        return new Long(getFromUserId());
553 chandransh 31968
 
771 rajveer 31969
      case TO_USER_ID:
31970
        return new Long(getToUserId());
553 chandransh 31971
 
31972
      }
31973
      throw new IllegalStateException();
31974
    }
31975
 
31976
    public Object getFieldValue(int fieldId) {
31977
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31978
    }
31979
 
31980
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31981
    public boolean isSet(_Fields field) {
31982
      switch (field) {
771 rajveer 31983
      case FROM_USER_ID:
31984
        return isSetFromUserId();
31985
      case TO_USER_ID:
31986
        return isSetToUserId();
553 chandransh 31987
      }
31988
      throw new IllegalStateException();
31989
    }
31990
 
31991
    public boolean isSet(int fieldID) {
31992
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31993
    }
31994
 
31995
    @Override
31996
    public boolean equals(Object that) {
31997
      if (that == null)
31998
        return false;
771 rajveer 31999
      if (that instanceof mergeBrowseHistory_args)
32000
        return this.equals((mergeBrowseHistory_args)that);
553 chandransh 32001
      return false;
32002
    }
32003
 
771 rajveer 32004
    public boolean equals(mergeBrowseHistory_args that) {
553 chandransh 32005
      if (that == null)
32006
        return false;
32007
 
771 rajveer 32008
      boolean this_present_fromUserId = true;
32009
      boolean that_present_fromUserId = true;
32010
      if (this_present_fromUserId || that_present_fromUserId) {
32011
        if (!(this_present_fromUserId && that_present_fromUserId))
553 chandransh 32012
          return false;
771 rajveer 32013
        if (this.fromUserId != that.fromUserId)
553 chandransh 32014
          return false;
32015
      }
32016
 
771 rajveer 32017
      boolean this_present_toUserId = true;
32018
      boolean that_present_toUserId = true;
32019
      if (this_present_toUserId || that_present_toUserId) {
32020
        if (!(this_present_toUserId && that_present_toUserId))
553 chandransh 32021
          return false;
771 rajveer 32022
        if (this.toUserId != that.toUserId)
553 chandransh 32023
          return false;
32024
      }
32025
 
32026
      return true;
32027
    }
32028
 
32029
    @Override
32030
    public int hashCode() {
32031
      return 0;
32032
    }
32033
 
771 rajveer 32034
    public int compareTo(mergeBrowseHistory_args other) {
553 chandransh 32035
      if (!getClass().equals(other.getClass())) {
32036
        return getClass().getName().compareTo(other.getClass().getName());
32037
      }
32038
 
32039
      int lastComparison = 0;
771 rajveer 32040
      mergeBrowseHistory_args typedOther = (mergeBrowseHistory_args)other;
553 chandransh 32041
 
771 rajveer 32042
      lastComparison = Boolean.valueOf(isSetFromUserId()).compareTo(isSetFromUserId());
553 chandransh 32043
      if (lastComparison != 0) {
32044
        return lastComparison;
32045
      }
771 rajveer 32046
      lastComparison = TBaseHelper.compareTo(fromUserId, typedOther.fromUserId);
553 chandransh 32047
      if (lastComparison != 0) {
32048
        return lastComparison;
32049
      }
771 rajveer 32050
      lastComparison = Boolean.valueOf(isSetToUserId()).compareTo(isSetToUserId());
553 chandransh 32051
      if (lastComparison != 0) {
32052
        return lastComparison;
32053
      }
771 rajveer 32054
      lastComparison = TBaseHelper.compareTo(toUserId, typedOther.toUserId);
553 chandransh 32055
      if (lastComparison != 0) {
32056
        return lastComparison;
32057
      }
32058
      return 0;
32059
    }
32060
 
32061
    public void read(TProtocol iprot) throws TException {
32062
      TField field;
32063
      iprot.readStructBegin();
32064
      while (true)
32065
      {
32066
        field = iprot.readFieldBegin();
32067
        if (field.type == TType.STOP) { 
32068
          break;
32069
        }
32070
        _Fields fieldId = _Fields.findByThriftId(field.id);
32071
        if (fieldId == null) {
32072
          TProtocolUtil.skip(iprot, field.type);
32073
        } else {
32074
          switch (fieldId) {
771 rajveer 32075
            case FROM_USER_ID:
553 chandransh 32076
              if (field.type == TType.I64) {
771 rajveer 32077
                this.fromUserId = iprot.readI64();
32078
                setFromUserIdIsSet(true);
553 chandransh 32079
              } else { 
32080
                TProtocolUtil.skip(iprot, field.type);
32081
              }
32082
              break;
771 rajveer 32083
            case TO_USER_ID:
553 chandransh 32084
              if (field.type == TType.I64) {
771 rajveer 32085
                this.toUserId = iprot.readI64();
32086
                setToUserIdIsSet(true);
553 chandransh 32087
              } else { 
32088
                TProtocolUtil.skip(iprot, field.type);
32089
              }
32090
              break;
32091
          }
32092
          iprot.readFieldEnd();
32093
        }
32094
      }
32095
      iprot.readStructEnd();
32096
      validate();
32097
    }
32098
 
32099
    public void write(TProtocol oprot) throws TException {
32100
      validate();
32101
 
32102
      oprot.writeStructBegin(STRUCT_DESC);
771 rajveer 32103
      oprot.writeFieldBegin(FROM_USER_ID_FIELD_DESC);
32104
      oprot.writeI64(this.fromUserId);
553 chandransh 32105
      oprot.writeFieldEnd();
771 rajveer 32106
      oprot.writeFieldBegin(TO_USER_ID_FIELD_DESC);
32107
      oprot.writeI64(this.toUserId);
553 chandransh 32108
      oprot.writeFieldEnd();
32109
      oprot.writeFieldStop();
32110
      oprot.writeStructEnd();
32111
    }
32112
 
32113
    @Override
32114
    public String toString() {
771 rajveer 32115
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_args(");
553 chandransh 32116
      boolean first = true;
32117
 
771 rajveer 32118
      sb.append("fromUserId:");
32119
      sb.append(this.fromUserId);
553 chandransh 32120
      first = false;
32121
      if (!first) sb.append(", ");
771 rajveer 32122
      sb.append("toUserId:");
32123
      sb.append(this.toUserId);
553 chandransh 32124
      first = false;
32125
      sb.append(")");
32126
      return sb.toString();
32127
    }
32128
 
32129
    public void validate() throws TException {
32130
      // check for required fields
32131
    }
32132
 
32133
  }
32134
 
771 rajveer 32135
  public static class mergeBrowseHistory_result implements TBase<mergeBrowseHistory_result._Fields>, java.io.Serializable, Cloneable, Comparable<mergeBrowseHistory_result>   {
32136
    private static final TStruct STRUCT_DESC = new TStruct("mergeBrowseHistory_result");
553 chandransh 32137
 
32138
 
32139
 
32140
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
32141
    public enum _Fields implements TFieldIdEnum {
32142
;
32143
 
32144
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
32145
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
32146
 
32147
      static {
32148
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
32149
          byId.put((int)field._thriftId, field);
32150
          byName.put(field.getFieldName(), field);
32151
        }
32152
      }
32153
 
32154
      /**
32155
       * Find the _Fields constant that matches fieldId, or null if its not found.
32156
       */
32157
      public static _Fields findByThriftId(int fieldId) {
32158
        return byId.get(fieldId);
32159
      }
32160
 
32161
      /**
32162
       * Find the _Fields constant that matches fieldId, throwing an exception
32163
       * if it is not found.
32164
       */
32165
      public static _Fields findByThriftIdOrThrow(int fieldId) {
32166
        _Fields fields = findByThriftId(fieldId);
32167
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
32168
        return fields;
32169
      }
32170
 
32171
      /**
32172
       * Find the _Fields constant that matches name, or null if its not found.
32173
       */
32174
      public static _Fields findByName(String name) {
32175
        return byName.get(name);
32176
      }
32177
 
32178
      private final short _thriftId;
32179
      private final String _fieldName;
32180
 
32181
      _Fields(short thriftId, String fieldName) {
32182
        _thriftId = thriftId;
32183
        _fieldName = fieldName;
32184
      }
32185
 
32186
      public short getThriftFieldId() {
32187
        return _thriftId;
32188
      }
32189
 
32190
      public String getFieldName() {
32191
        return _fieldName;
32192
      }
32193
    }
32194
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
32195
    }});
32196
 
32197
    static {
771 rajveer 32198
      FieldMetaData.addStructMetaDataMap(mergeBrowseHistory_result.class, metaDataMap);
553 chandransh 32199
    }
32200
 
771 rajveer 32201
    public mergeBrowseHistory_result() {
553 chandransh 32202
    }
32203
 
32204
    /**
32205
     * Performs a deep copy on <i>other</i>.
32206
     */
771 rajveer 32207
    public mergeBrowseHistory_result(mergeBrowseHistory_result other) {
553 chandransh 32208
    }
32209
 
771 rajveer 32210
    public mergeBrowseHistory_result deepCopy() {
32211
      return new mergeBrowseHistory_result(this);
553 chandransh 32212
    }
32213
 
130 ashish 32214
    @Deprecated
771 rajveer 32215
    public mergeBrowseHistory_result clone() {
32216
      return new mergeBrowseHistory_result(this);
130 ashish 32217
    }
32218
 
553 chandransh 32219
    public void setFieldValue(_Fields field, Object value) {
32220
      switch (field) {
32221
      }
32222
    }
32223
 
32224
    public void setFieldValue(int fieldID, Object value) {
32225
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
32226
    }
32227
 
32228
    public Object getFieldValue(_Fields field) {
32229
      switch (field) {
32230
      }
32231
      throw new IllegalStateException();
32232
    }
32233
 
32234
    public Object getFieldValue(int fieldId) {
32235
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
32236
    }
32237
 
32238
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
32239
    public boolean isSet(_Fields field) {
32240
      switch (field) {
32241
      }
32242
      throw new IllegalStateException();
32243
    }
32244
 
32245
    public boolean isSet(int fieldID) {
32246
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
32247
    }
32248
 
32249
    @Override
32250
    public boolean equals(Object that) {
32251
      if (that == null)
32252
        return false;
771 rajveer 32253
      if (that instanceof mergeBrowseHistory_result)
32254
        return this.equals((mergeBrowseHistory_result)that);
553 chandransh 32255
      return false;
32256
    }
32257
 
771 rajveer 32258
    public boolean equals(mergeBrowseHistory_result that) {
553 chandransh 32259
      if (that == null)
32260
        return false;
32261
 
32262
      return true;
32263
    }
32264
 
32265
    @Override
32266
    public int hashCode() {
32267
      return 0;
32268
    }
32269
 
771 rajveer 32270
    public int compareTo(mergeBrowseHistory_result other) {
553 chandransh 32271
      if (!getClass().equals(other.getClass())) {
32272
        return getClass().getName().compareTo(other.getClass().getName());
32273
      }
32274
 
32275
      int lastComparison = 0;
771 rajveer 32276
      mergeBrowseHistory_result typedOther = (mergeBrowseHistory_result)other;
553 chandransh 32277
 
32278
      return 0;
32279
    }
32280
 
32281
    public void read(TProtocol iprot) throws TException {
32282
      TField field;
32283
      iprot.readStructBegin();
32284
      while (true)
32285
      {
32286
        field = iprot.readFieldBegin();
32287
        if (field.type == TType.STOP) { 
32288
          break;
32289
        }
32290
        _Fields fieldId = _Fields.findByThriftId(field.id);
32291
        if (fieldId == null) {
32292
          TProtocolUtil.skip(iprot, field.type);
32293
        } else {
32294
          switch (fieldId) {
32295
          }
32296
          iprot.readFieldEnd();
32297
        }
32298
      }
32299
      iprot.readStructEnd();
32300
      validate();
32301
    }
32302
 
32303
    public void write(TProtocol oprot) throws TException {
32304
      oprot.writeStructBegin(STRUCT_DESC);
32305
 
32306
      oprot.writeFieldStop();
32307
      oprot.writeStructEnd();
32308
    }
32309
 
32310
    @Override
32311
    public String toString() {
771 rajveer 32312
      StringBuilder sb = new StringBuilder("mergeBrowseHistory_result(");
553 chandransh 32313
      boolean first = true;
32314
 
32315
      sb.append(")");
32316
      return sb.toString();
32317
    }
32318
 
32319
    public void validate() throws TException {
32320
      // check for required fields
32321
    }
32322
 
32323
  }
32324
 
48 ashish 32325
}