Subversion Repositories SmartDukaan

Rev

Rev 1177 | Rev 1491 | 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.
1466 ankur.sing 110
     * 2. All of the lines in the cart are active items.
688 chandransh 111
     * 3. The estimate for any of the lines in cart doesn't change.
1466 ankur.sing 112
     * If all three are true, returns empty string; else returns appropriate message.
688 chandransh 113
     * 
114
     * @param cartId
115
     */
1466 ankur.sing 116
    public String 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
 
1466 ankur.sing 1380
    public String 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
 
1466 ankur.sing 1396
    public String 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
        } catch (ShoppingCartException scex) {
2736
          result.scex = scex;
2737
        } catch (Throwable th) {
2738
          LOGGER.error("Internal error processing validateCart", th);
2739
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateCart");
2740
          oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.EXCEPTION, seqid));
2741
          x.write(oprot);
2742
          oprot.writeMessageEnd();
2743
          oprot.getTransport().flush();
2744
          return;
2745
        }
553 chandransh 2746
        oprot.writeMessageBegin(new TMessage("validateCart", TMessageType.REPLY, seqid));
2747
        result.write(oprot);
2748
        oprot.writeMessageEnd();
2749
        oprot.getTransport().flush();
2750
      }
2751
 
2752
    }
2753
 
688 chandransh 2754
    private class mergeCart implements ProcessFunction {
578 chandransh 2755
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2756
      {
688 chandransh 2757
        mergeCart_args args = new mergeCart_args();
578 chandransh 2758
        args.read(iprot);
2759
        iprot.readMessageEnd();
688 chandransh 2760
        mergeCart_result result = new mergeCart_result();
2761
        iface_.mergeCart(args.fromCartId, args.toCartId);
2762
        oprot.writeMessageBegin(new TMessage("mergeCart", TMessageType.REPLY, seqid));
2763
        result.write(oprot);
2764
        oprot.writeMessageEnd();
2765
        oprot.getTransport().flush();
2766
      }
2767
 
2768
    }
2769
 
2770
    private class checkOut implements ProcessFunction {
2771
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2772
      {
2773
        checkOut_args args = new checkOut_args();
2774
        args.read(iprot);
2775
        iprot.readMessageEnd();
2776
        checkOut_result result = new checkOut_result();
578 chandransh 2777
        try {
688 chandransh 2778
          result.success = iface_.checkOut(args.cartId);
578 chandransh 2779
          result.setSuccessIsSet(true);
2780
        } catch (ShoppingCartException scex) {
2781
          result.scex = scex;
2782
        } catch (Throwable th) {
688 chandransh 2783
          LOGGER.error("Internal error processing checkOut", th);
2784
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing checkOut");
2785
          oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.EXCEPTION, seqid));
578 chandransh 2786
          x.write(oprot);
2787
          oprot.writeMessageEnd();
2788
          oprot.getTransport().flush();
2789
          return;
2790
        }
688 chandransh 2791
        oprot.writeMessageBegin(new TMessage("checkOut", TMessageType.REPLY, seqid));
578 chandransh 2792
        result.write(oprot);
2793
        oprot.writeMessageEnd();
2794
        oprot.getTransport().flush();
2795
      }
2796
 
2797
    }
2798
 
688 chandransh 2799
    private class resetCart implements ProcessFunction {
553 chandransh 2800
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2801
      {
688 chandransh 2802
        resetCart_args args = new resetCart_args();
553 chandransh 2803
        args.read(iprot);
2804
        iprot.readMessageEnd();
688 chandransh 2805
        resetCart_result result = new resetCart_result();
2806
        try {
2807
          result.success = iface_.resetCart(args.cartId, args.items);
2808
          result.setSuccessIsSet(true);
2809
        } catch (ShoppingCartException scex) {
2810
          result.scex = scex;
2811
        } catch (Throwable th) {
2812
          LOGGER.error("Internal error processing resetCart", th);
2813
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing resetCart");
2814
          oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.EXCEPTION, seqid));
2815
          x.write(oprot);
2816
          oprot.writeMessageEnd();
2817
          oprot.getTransport().flush();
2818
          return;
2819
        }
2820
        oprot.writeMessageBegin(new TMessage("resetCart", TMessageType.REPLY, seqid));
553 chandransh 2821
        result.write(oprot);
2822
        oprot.writeMessageEnd();
2823
        oprot.getTransport().flush();
2824
      }
2825
 
2826
    }
2827
 
2828
    private class getMyResearch implements ProcessFunction {
2829
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2830
      {
2831
        getMyResearch_args args = new getMyResearch_args();
2832
        args.read(iprot);
2833
        iprot.readMessageEnd();
2834
        getMyResearch_result result = new getMyResearch_result();
2835
        try {
771 rajveer 2836
          result.success = iface_.getMyResearch(args.userId);
553 chandransh 2837
        } catch (WidgetException scx) {
2838
          result.scx = scx;
2839
        } catch (Throwable th) {
2840
          LOGGER.error("Internal error processing getMyResearch", th);
2841
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getMyResearch");
2842
          oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.EXCEPTION, seqid));
2843
          x.write(oprot);
2844
          oprot.writeMessageEnd();
2845
          oprot.getTransport().flush();
2846
          return;
2847
        }
2848
        oprot.writeMessageBegin(new TMessage("getMyResearch", TMessageType.REPLY, seqid));
2849
        result.write(oprot);
2850
        oprot.writeMessageEnd();
2851
        oprot.getTransport().flush();
2852
      }
2853
 
2854
    }
2855
 
2856
    private class updateMyResearch implements ProcessFunction {
2857
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2858
      {
2859
        updateMyResearch_args args = new updateMyResearch_args();
2860
        args.read(iprot);
2861
        iprot.readMessageEnd();
2862
        updateMyResearch_result result = new updateMyResearch_result();
2863
        try {
771 rajveer 2864
          result.success = iface_.updateMyResearch(args.userId, args.itemId);
130 ashish 2865
          result.setSuccessIsSet(true);
553 chandransh 2866
        } catch (WidgetException scx) {
2867
          result.scx = scx;
130 ashish 2868
        } catch (Throwable th) {
553 chandransh 2869
          LOGGER.error("Internal error processing updateMyResearch", th);
2870
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateMyResearch");
2871
          oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.EXCEPTION, seqid));
130 ashish 2872
          x.write(oprot);
2873
          oprot.writeMessageEnd();
2874
          oprot.getTransport().flush();
2875
          return;
2876
        }
553 chandransh 2877
        oprot.writeMessageBegin(new TMessage("updateMyResearch", TMessageType.REPLY, seqid));
130 ashish 2878
        result.write(oprot);
2879
        oprot.writeMessageEnd();
2880
        oprot.getTransport().flush();
2881
      }
2882
 
2883
    }
2884
 
553 chandransh 2885
    private class deleteItemFromMyResearch implements ProcessFunction {
2886
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2887
      {
2888
        deleteItemFromMyResearch_args args = new deleteItemFromMyResearch_args();
2889
        args.read(iprot);
2890
        iprot.readMessageEnd();
2891
        deleteItemFromMyResearch_result result = new deleteItemFromMyResearch_result();
2892
        try {
771 rajveer 2893
          iface_.deleteItemFromMyResearch(args.userId, args.itemId);
553 chandransh 2894
        } catch (WidgetException scx) {
2895
          result.scx = scx;
2896
        } catch (Throwable th) {
2897
          LOGGER.error("Internal error processing deleteItemFromMyResearch", th);
2898
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing deleteItemFromMyResearch");
2899
          oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.EXCEPTION, seqid));
2900
          x.write(oprot);
2901
          oprot.writeMessageEnd();
2902
          oprot.getTransport().flush();
2903
          return;
2904
        }
2905
        oprot.writeMessageBegin(new TMessage("deleteItemFromMyResearch", TMessageType.REPLY, seqid));
2906
        result.write(oprot);
2907
        oprot.writeMessageEnd();
2908
        oprot.getTransport().flush();
2909
      }
2910
 
2911
    }
2912
 
771 rajveer 2913
    private class updateBrowseHistory implements ProcessFunction {
553 chandransh 2914
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2915
      {
771 rajveer 2916
        updateBrowseHistory_args args = new updateBrowseHistory_args();
553 chandransh 2917
        args.read(iprot);
2918
        iprot.readMessageEnd();
771 rajveer 2919
        updateBrowseHistory_result result = new updateBrowseHistory_result();
2920
        iface_.updateBrowseHistory(args.userId, args.itemId);
2921
        oprot.writeMessageBegin(new TMessage("updateBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2922
        result.write(oprot);
2923
        oprot.writeMessageEnd();
2924
        oprot.getTransport().flush();
2925
      }
2926
 
2927
    }
2928
 
771 rajveer 2929
    private class getBrowseHistory implements ProcessFunction {
553 chandransh 2930
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2931
      {
771 rajveer 2932
        getBrowseHistory_args args = new getBrowseHistory_args();
553 chandransh 2933
        args.read(iprot);
2934
        iprot.readMessageEnd();
771 rajveer 2935
        getBrowseHistory_result result = new getBrowseHistory_result();
553 chandransh 2936
        try {
771 rajveer 2937
          result.success = iface_.getBrowseHistory(args.userId);
553 chandransh 2938
        } catch (WidgetException scx) {
2939
          result.scx = scx;
2940
        } catch (Throwable th) {
771 rajveer 2941
          LOGGER.error("Internal error processing getBrowseHistory", th);
2942
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getBrowseHistory");
2943
          oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.EXCEPTION, seqid));
553 chandransh 2944
          x.write(oprot);
2945
          oprot.writeMessageEnd();
2946
          oprot.getTransport().flush();
2947
          return;
2948
        }
771 rajveer 2949
        oprot.writeMessageBegin(new TMessage("getBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2950
        result.write(oprot);
2951
        oprot.writeMessageEnd();
2952
        oprot.getTransport().flush();
2953
      }
2954
 
2955
    }
2956
 
771 rajveer 2957
    private class mergeBrowseHistory implements ProcessFunction {
553 chandransh 2958
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2959
      {
771 rajveer 2960
        mergeBrowseHistory_args args = new mergeBrowseHistory_args();
553 chandransh 2961
        args.read(iprot);
2962
        iprot.readMessageEnd();
771 rajveer 2963
        mergeBrowseHistory_result result = new mergeBrowseHistory_result();
2964
        iface_.mergeBrowseHistory(args.fromUserId, args.toUserId);
2965
        oprot.writeMessageBegin(new TMessage("mergeBrowseHistory", TMessageType.REPLY, seqid));
553 chandransh 2966
        result.write(oprot);
2967
        oprot.writeMessageEnd();
2968
        oprot.getTransport().flush();
2969
      }
2970
 
2971
    }
2972
 
48 ashish 2973
  }
2974
 
764 rajveer 2975
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2976
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2977
 
2978
 
2979
 
2980
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2981
    public enum _Fields implements TFieldIdEnum {
2982
;
2983
 
2984
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2985
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2986
 
2987
      static {
2988
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2989
          byId.put((int)field._thriftId, field);
2990
          byName.put(field.getFieldName(), field);
2991
        }
2992
      }
2993
 
2994
      /**
2995
       * Find the _Fields constant that matches fieldId, or null if its not found.
2996
       */
2997
      public static _Fields findByThriftId(int fieldId) {
2998
        return byId.get(fieldId);
2999
      }
3000
 
3001
      /**
3002
       * Find the _Fields constant that matches fieldId, throwing an exception
3003
       * if it is not found.
3004
       */
3005
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3006
        _Fields fields = findByThriftId(fieldId);
3007
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3008
        return fields;
3009
      }
3010
 
3011
      /**
3012
       * Find the _Fields constant that matches name, or null if its not found.
3013
       */
3014
      public static _Fields findByName(String name) {
3015
        return byName.get(name);
3016
      }
3017
 
3018
      private final short _thriftId;
3019
      private final String _fieldName;
3020
 
3021
      _Fields(short thriftId, String fieldName) {
3022
        _thriftId = thriftId;
3023
        _fieldName = fieldName;
3024
      }
3025
 
3026
      public short getThriftFieldId() {
3027
        return _thriftId;
3028
      }
3029
 
3030
      public String getFieldName() {
3031
        return _fieldName;
3032
      }
3033
    }
3034
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3035
    }});
3036
 
3037
    static {
3038
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3039
    }
3040
 
3041
    public closeSession_args() {
3042
    }
3043
 
3044
    /**
3045
     * Performs a deep copy on <i>other</i>.
3046
     */
3047
    public closeSession_args(closeSession_args other) {
3048
    }
3049
 
3050
    public closeSession_args deepCopy() {
3051
      return new closeSession_args(this);
3052
    }
3053
 
3054
    @Deprecated
3055
    public closeSession_args clone() {
3056
      return new closeSession_args(this);
3057
    }
3058
 
3059
    public void setFieldValue(_Fields field, Object value) {
3060
      switch (field) {
3061
      }
3062
    }
3063
 
3064
    public void setFieldValue(int fieldID, Object value) {
3065
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3066
    }
3067
 
3068
    public Object getFieldValue(_Fields field) {
3069
      switch (field) {
3070
      }
3071
      throw new IllegalStateException();
3072
    }
3073
 
3074
    public Object getFieldValue(int fieldId) {
3075
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3076
    }
3077
 
3078
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3079
    public boolean isSet(_Fields field) {
3080
      switch (field) {
3081
      }
3082
      throw new IllegalStateException();
3083
    }
3084
 
3085
    public boolean isSet(int fieldID) {
3086
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3087
    }
3088
 
3089
    @Override
3090
    public boolean equals(Object that) {
3091
      if (that == null)
3092
        return false;
3093
      if (that instanceof closeSession_args)
3094
        return this.equals((closeSession_args)that);
3095
      return false;
3096
    }
3097
 
3098
    public boolean equals(closeSession_args that) {
3099
      if (that == null)
3100
        return false;
3101
 
3102
      return true;
3103
    }
3104
 
3105
    @Override
3106
    public int hashCode() {
3107
      return 0;
3108
    }
3109
 
3110
    public int compareTo(closeSession_args other) {
3111
      if (!getClass().equals(other.getClass())) {
3112
        return getClass().getName().compareTo(other.getClass().getName());
3113
      }
3114
 
3115
      int lastComparison = 0;
3116
      closeSession_args typedOther = (closeSession_args)other;
3117
 
3118
      return 0;
3119
    }
3120
 
3121
    public void read(TProtocol iprot) throws TException {
3122
      TField field;
3123
      iprot.readStructBegin();
3124
      while (true)
3125
      {
3126
        field = iprot.readFieldBegin();
3127
        if (field.type == TType.STOP) { 
3128
          break;
3129
        }
3130
        _Fields fieldId = _Fields.findByThriftId(field.id);
3131
        if (fieldId == null) {
3132
          TProtocolUtil.skip(iprot, field.type);
3133
        } else {
3134
          switch (fieldId) {
3135
          }
3136
          iprot.readFieldEnd();
3137
        }
3138
      }
3139
      iprot.readStructEnd();
3140
      validate();
3141
    }
3142
 
3143
    public void write(TProtocol oprot) throws TException {
3144
      validate();
3145
 
3146
      oprot.writeStructBegin(STRUCT_DESC);
3147
      oprot.writeFieldStop();
3148
      oprot.writeStructEnd();
3149
    }
3150
 
3151
    @Override
3152
    public String toString() {
3153
      StringBuilder sb = new StringBuilder("closeSession_args(");
3154
      boolean first = true;
3155
 
3156
      sb.append(")");
3157
      return sb.toString();
3158
    }
3159
 
3160
    public void validate() throws TException {
3161
      // check for required fields
3162
    }
3163
 
3164
  }
3165
 
3166
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3167
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3168
 
3169
 
3170
 
3171
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3172
    public enum _Fields implements TFieldIdEnum {
3173
;
3174
 
3175
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3176
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3177
 
3178
      static {
3179
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3180
          byId.put((int)field._thriftId, field);
3181
          byName.put(field.getFieldName(), field);
3182
        }
3183
      }
3184
 
3185
      /**
3186
       * Find the _Fields constant that matches fieldId, or null if its not found.
3187
       */
3188
      public static _Fields findByThriftId(int fieldId) {
3189
        return byId.get(fieldId);
3190
      }
3191
 
3192
      /**
3193
       * Find the _Fields constant that matches fieldId, throwing an exception
3194
       * if it is not found.
3195
       */
3196
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3197
        _Fields fields = findByThriftId(fieldId);
3198
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3199
        return fields;
3200
      }
3201
 
3202
      /**
3203
       * Find the _Fields constant that matches name, or null if its not found.
3204
       */
3205
      public static _Fields findByName(String name) {
3206
        return byName.get(name);
3207
      }
3208
 
3209
      private final short _thriftId;
3210
      private final String _fieldName;
3211
 
3212
      _Fields(short thriftId, String fieldName) {
3213
        _thriftId = thriftId;
3214
        _fieldName = fieldName;
3215
      }
3216
 
3217
      public short getThriftFieldId() {
3218
        return _thriftId;
3219
      }
3220
 
3221
      public String getFieldName() {
3222
        return _fieldName;
3223
      }
3224
    }
3225
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3226
    }});
3227
 
3228
    static {
3229
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3230
    }
3231
 
3232
    public closeSession_result() {
3233
    }
3234
 
3235
    /**
3236
     * Performs a deep copy on <i>other</i>.
3237
     */
3238
    public closeSession_result(closeSession_result other) {
3239
    }
3240
 
3241
    public closeSession_result deepCopy() {
3242
      return new closeSession_result(this);
3243
    }
3244
 
3245
    @Deprecated
3246
    public closeSession_result clone() {
3247
      return new closeSession_result(this);
3248
    }
3249
 
3250
    public void setFieldValue(_Fields field, Object value) {
3251
      switch (field) {
3252
      }
3253
    }
3254
 
3255
    public void setFieldValue(int fieldID, Object value) {
3256
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3257
    }
3258
 
3259
    public Object getFieldValue(_Fields field) {
3260
      switch (field) {
3261
      }
3262
      throw new IllegalStateException();
3263
    }
3264
 
3265
    public Object getFieldValue(int fieldId) {
3266
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3267
    }
3268
 
3269
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3270
    public boolean isSet(_Fields field) {
3271
      switch (field) {
3272
      }
3273
      throw new IllegalStateException();
3274
    }
3275
 
3276
    public boolean isSet(int fieldID) {
3277
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3278
    }
3279
 
3280
    @Override
3281
    public boolean equals(Object that) {
3282
      if (that == null)
3283
        return false;
3284
      if (that instanceof closeSession_result)
3285
        return this.equals((closeSession_result)that);
3286
      return false;
3287
    }
3288
 
3289
    public boolean equals(closeSession_result that) {
3290
      if (that == null)
3291
        return false;
3292
 
3293
      return true;
3294
    }
3295
 
3296
    @Override
3297
    public int hashCode() {
3298
      return 0;
3299
    }
3300
 
3301
    public int compareTo(closeSession_result other) {
3302
      if (!getClass().equals(other.getClass())) {
3303
        return getClass().getName().compareTo(other.getClass().getName());
3304
      }
3305
 
3306
      int lastComparison = 0;
3307
      closeSession_result typedOther = (closeSession_result)other;
3308
 
3309
      return 0;
3310
    }
3311
 
3312
    public void read(TProtocol iprot) throws TException {
3313
      TField field;
3314
      iprot.readStructBegin();
3315
      while (true)
3316
      {
3317
        field = iprot.readFieldBegin();
3318
        if (field.type == TType.STOP) { 
3319
          break;
3320
        }
3321
        _Fields fieldId = _Fields.findByThriftId(field.id);
3322
        if (fieldId == null) {
3323
          TProtocolUtil.skip(iprot, field.type);
3324
        } else {
3325
          switch (fieldId) {
3326
          }
3327
          iprot.readFieldEnd();
3328
        }
3329
      }
3330
      iprot.readStructEnd();
3331
      validate();
3332
    }
3333
 
3334
    public void write(TProtocol oprot) throws TException {
3335
      oprot.writeStructBegin(STRUCT_DESC);
3336
 
3337
      oprot.writeFieldStop();
3338
      oprot.writeStructEnd();
3339
    }
3340
 
3341
    @Override
3342
    public String toString() {
3343
      StringBuilder sb = new StringBuilder("closeSession_result(");
3344
      boolean first = true;
3345
 
3346
      sb.append(")");
3347
      return sb.toString();
3348
    }
3349
 
3350
    public void validate() throws TException {
3351
      // check for required fields
3352
    }
3353
 
3354
  }
3355
 
553 chandransh 3356
  public static class createAnonymousUser_args implements TBase<createAnonymousUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_args>   {
3357
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_args");
48 ashish 3358
 
553 chandransh 3359
    private static final TField JSESSION_ID_FIELD_DESC = new TField("jsessionId", TType.STRING, (short)1);
48 ashish 3360
 
553 chandransh 3361
    private String jsessionId;
48 ashish 3362
 
3363
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3364
    public enum _Fields implements TFieldIdEnum {
553 chandransh 3365
      JSESSION_ID((short)1, "jsessionId");
48 ashish 3366
 
3367
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3368
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3369
 
3370
      static {
3371
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3372
          byId.put((int)field._thriftId, field);
3373
          byName.put(field.getFieldName(), field);
3374
        }
3375
      }
3376
 
3377
      /**
3378
       * Find the _Fields constant that matches fieldId, or null if its not found.
3379
       */
3380
      public static _Fields findByThriftId(int fieldId) {
3381
        return byId.get(fieldId);
3382
      }
3383
 
3384
      /**
3385
       * Find the _Fields constant that matches fieldId, throwing an exception
3386
       * if it is not found.
3387
       */
3388
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3389
        _Fields fields = findByThriftId(fieldId);
3390
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3391
        return fields;
3392
      }
3393
 
3394
      /**
3395
       * Find the _Fields constant that matches name, or null if its not found.
3396
       */
3397
      public static _Fields findByName(String name) {
3398
        return byName.get(name);
3399
      }
3400
 
3401
      private final short _thriftId;
3402
      private final String _fieldName;
3403
 
3404
      _Fields(short thriftId, String fieldName) {
3405
        _thriftId = thriftId;
3406
        _fieldName = fieldName;
3407
      }
3408
 
3409
      public short getThriftFieldId() {
3410
        return _thriftId;
3411
      }
3412
 
3413
      public String getFieldName() {
3414
        return _fieldName;
3415
      }
3416
    }
3417
 
3418
    // isset id assignments
3419
 
3420
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 3421
      put(_Fields.JSESSION_ID, new FieldMetaData("jsessionId", TFieldRequirementType.DEFAULT, 
3422
          new FieldValueMetaData(TType.STRING)));
48 ashish 3423
    }});
3424
 
3425
    static {
553 chandransh 3426
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_args.class, metaDataMap);
48 ashish 3427
    }
3428
 
553 chandransh 3429
    public createAnonymousUser_args() {
48 ashish 3430
    }
3431
 
553 chandransh 3432
    public createAnonymousUser_args(
3433
      String jsessionId)
48 ashish 3434
    {
3435
      this();
553 chandransh 3436
      this.jsessionId = jsessionId;
48 ashish 3437
    }
3438
 
3439
    /**
3440
     * Performs a deep copy on <i>other</i>.
3441
     */
553 chandransh 3442
    public createAnonymousUser_args(createAnonymousUser_args other) {
3443
      if (other.isSetJsessionId()) {
3444
        this.jsessionId = other.jsessionId;
48 ashish 3445
      }
3446
    }
3447
 
553 chandransh 3448
    public createAnonymousUser_args deepCopy() {
3449
      return new createAnonymousUser_args(this);
48 ashish 3450
    }
3451
 
3452
    @Deprecated
553 chandransh 3453
    public createAnonymousUser_args clone() {
3454
      return new createAnonymousUser_args(this);
48 ashish 3455
    }
3456
 
553 chandransh 3457
    public String getJsessionId() {
3458
      return this.jsessionId;
48 ashish 3459
    }
3460
 
553 chandransh 3461
    public createAnonymousUser_args setJsessionId(String jsessionId) {
3462
      this.jsessionId = jsessionId;
48 ashish 3463
      return this;
3464
    }
3465
 
553 chandransh 3466
    public void unsetJsessionId() {
3467
      this.jsessionId = null;
48 ashish 3468
    }
3469
 
553 chandransh 3470
    /** Returns true if field jsessionId is set (has been asigned a value) and false otherwise */
3471
    public boolean isSetJsessionId() {
3472
      return this.jsessionId != null;
48 ashish 3473
    }
3474
 
553 chandransh 3475
    public void setJsessionIdIsSet(boolean value) {
48 ashish 3476
      if (!value) {
553 chandransh 3477
        this.jsessionId = null;
48 ashish 3478
      }
3479
    }
3480
 
3481
    public void setFieldValue(_Fields field, Object value) {
3482
      switch (field) {
553 chandransh 3483
      case JSESSION_ID:
48 ashish 3484
        if (value == null) {
553 chandransh 3485
          unsetJsessionId();
48 ashish 3486
        } else {
553 chandransh 3487
          setJsessionId((String)value);
48 ashish 3488
        }
3489
        break;
3490
 
3491
      }
3492
    }
3493
 
3494
    public void setFieldValue(int fieldID, Object value) {
3495
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3496
    }
3497
 
3498
    public Object getFieldValue(_Fields field) {
3499
      switch (field) {
553 chandransh 3500
      case JSESSION_ID:
3501
        return getJsessionId();
48 ashish 3502
 
3503
      }
3504
      throw new IllegalStateException();
3505
    }
3506
 
3507
    public Object getFieldValue(int fieldId) {
3508
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3509
    }
3510
 
3511
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3512
    public boolean isSet(_Fields field) {
3513
      switch (field) {
553 chandransh 3514
      case JSESSION_ID:
3515
        return isSetJsessionId();
48 ashish 3516
      }
3517
      throw new IllegalStateException();
3518
    }
3519
 
3520
    public boolean isSet(int fieldID) {
3521
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3522
    }
3523
 
3524
    @Override
3525
    public boolean equals(Object that) {
3526
      if (that == null)
3527
        return false;
553 chandransh 3528
      if (that instanceof createAnonymousUser_args)
3529
        return this.equals((createAnonymousUser_args)that);
48 ashish 3530
      return false;
3531
    }
3532
 
553 chandransh 3533
    public boolean equals(createAnonymousUser_args that) {
48 ashish 3534
      if (that == null)
3535
        return false;
3536
 
553 chandransh 3537
      boolean this_present_jsessionId = true && this.isSetJsessionId();
3538
      boolean that_present_jsessionId = true && that.isSetJsessionId();
3539
      if (this_present_jsessionId || that_present_jsessionId) {
3540
        if (!(this_present_jsessionId && that_present_jsessionId))
48 ashish 3541
          return false;
553 chandransh 3542
        if (!this.jsessionId.equals(that.jsessionId))
48 ashish 3543
          return false;
3544
      }
3545
 
3546
      return true;
3547
    }
3548
 
3549
    @Override
3550
    public int hashCode() {
3551
      return 0;
3552
    }
3553
 
553 chandransh 3554
    public int compareTo(createAnonymousUser_args other) {
3555
      if (!getClass().equals(other.getClass())) {
3556
        return getClass().getName().compareTo(other.getClass().getName());
3557
      }
3558
 
3559
      int lastComparison = 0;
3560
      createAnonymousUser_args typedOther = (createAnonymousUser_args)other;
3561
 
3562
      lastComparison = Boolean.valueOf(isSetJsessionId()).compareTo(isSetJsessionId());
3563
      if (lastComparison != 0) {
3564
        return lastComparison;
3565
      }
3566
      lastComparison = TBaseHelper.compareTo(jsessionId, typedOther.jsessionId);
3567
      if (lastComparison != 0) {
3568
        return lastComparison;
3569
      }
3570
      return 0;
3571
    }
3572
 
48 ashish 3573
    public void read(TProtocol iprot) throws TException {
3574
      TField field;
3575
      iprot.readStructBegin();
3576
      while (true)
3577
      {
3578
        field = iprot.readFieldBegin();
3579
        if (field.type == TType.STOP) { 
3580
          break;
3581
        }
3582
        _Fields fieldId = _Fields.findByThriftId(field.id);
3583
        if (fieldId == null) {
3584
          TProtocolUtil.skip(iprot, field.type);
3585
        } else {
3586
          switch (fieldId) {
553 chandransh 3587
            case JSESSION_ID:
3588
              if (field.type == TType.STRING) {
3589
                this.jsessionId = iprot.readString();
48 ashish 3590
              } else { 
3591
                TProtocolUtil.skip(iprot, field.type);
3592
              }
3593
              break;
3594
          }
3595
          iprot.readFieldEnd();
3596
        }
3597
      }
3598
      iprot.readStructEnd();
3599
      validate();
3600
    }
3601
 
3602
    public void write(TProtocol oprot) throws TException {
3603
      validate();
3604
 
3605
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 3606
      if (this.jsessionId != null) {
3607
        oprot.writeFieldBegin(JSESSION_ID_FIELD_DESC);
3608
        oprot.writeString(this.jsessionId);
48 ashish 3609
        oprot.writeFieldEnd();
3610
      }
3611
      oprot.writeFieldStop();
3612
      oprot.writeStructEnd();
3613
    }
3614
 
3615
    @Override
3616
    public String toString() {
553 chandransh 3617
      StringBuilder sb = new StringBuilder("createAnonymousUser_args(");
48 ashish 3618
      boolean first = true;
3619
 
553 chandransh 3620
      sb.append("jsessionId:");
3621
      if (this.jsessionId == null) {
48 ashish 3622
        sb.append("null");
3623
      } else {
553 chandransh 3624
        sb.append(this.jsessionId);
48 ashish 3625
      }
3626
      first = false;
3627
      sb.append(")");
3628
      return sb.toString();
3629
    }
3630
 
3631
    public void validate() throws TException {
3632
      // check for required fields
3633
    }
3634
 
3635
  }
3636
 
571 rajveer 3637
  public static class createAnonymousUser_result implements TBase<createAnonymousUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createAnonymousUser_result>   {
553 chandransh 3638
    private static final TStruct STRUCT_DESC = new TStruct("createAnonymousUser_result");
48 ashish 3639
 
3640
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 3641
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 3642
 
553 chandransh 3643
    private User success;
3644
    private UserContextException ucex;
48 ashish 3645
 
3646
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3647
    public enum _Fields implements TFieldIdEnum {
3648
      SUCCESS((short)0, "success"),
553 chandransh 3649
      UCEX((short)1, "ucex");
48 ashish 3650
 
3651
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3652
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3653
 
3654
      static {
3655
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3656
          byId.put((int)field._thriftId, field);
3657
          byName.put(field.getFieldName(), field);
3658
        }
3659
      }
3660
 
3661
      /**
3662
       * Find the _Fields constant that matches fieldId, or null if its not found.
3663
       */
3664
      public static _Fields findByThriftId(int fieldId) {
3665
        return byId.get(fieldId);
3666
      }
3667
 
3668
      /**
3669
       * Find the _Fields constant that matches fieldId, throwing an exception
3670
       * if it is not found.
3671
       */
3672
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3673
        _Fields fields = findByThriftId(fieldId);
3674
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3675
        return fields;
3676
      }
3677
 
3678
      /**
3679
       * Find the _Fields constant that matches name, or null if its not found.
3680
       */
3681
      public static _Fields findByName(String name) {
3682
        return byName.get(name);
3683
      }
3684
 
3685
      private final short _thriftId;
3686
      private final String _fieldName;
3687
 
3688
      _Fields(short thriftId, String fieldName) {
3689
        _thriftId = thriftId;
3690
        _fieldName = fieldName;
3691
      }
3692
 
3693
      public short getThriftFieldId() {
3694
        return _thriftId;
3695
      }
3696
 
3697
      public String getFieldName() {
3698
        return _fieldName;
3699
      }
3700
    }
3701
 
3702
    // isset id assignments
3703
 
3704
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3705
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 3706
          new StructMetaData(TType.STRUCT, User.class)));
3707
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 3708
          new FieldValueMetaData(TType.STRUCT)));
3709
    }});
3710
 
3711
    static {
553 chandransh 3712
      FieldMetaData.addStructMetaDataMap(createAnonymousUser_result.class, metaDataMap);
48 ashish 3713
    }
3714
 
553 chandransh 3715
    public createAnonymousUser_result() {
48 ashish 3716
    }
3717
 
553 chandransh 3718
    public createAnonymousUser_result(
3719
      User success,
3720
      UserContextException ucex)
48 ashish 3721
    {
3722
      this();
3723
      this.success = success;
553 chandransh 3724
      this.ucex = ucex;
48 ashish 3725
    }
3726
 
3727
    /**
3728
     * Performs a deep copy on <i>other</i>.
3729
     */
553 chandransh 3730
    public createAnonymousUser_result(createAnonymousUser_result other) {
48 ashish 3731
      if (other.isSetSuccess()) {
553 chandransh 3732
        this.success = new User(other.success);
48 ashish 3733
      }
553 chandransh 3734
      if (other.isSetUcex()) {
3735
        this.ucex = new UserContextException(other.ucex);
48 ashish 3736
      }
3737
    }
3738
 
553 chandransh 3739
    public createAnonymousUser_result deepCopy() {
3740
      return new createAnonymousUser_result(this);
48 ashish 3741
    }
3742
 
3743
    @Deprecated
553 chandransh 3744
    public createAnonymousUser_result clone() {
3745
      return new createAnonymousUser_result(this);
48 ashish 3746
    }
3747
 
553 chandransh 3748
    public User getSuccess() {
48 ashish 3749
      return this.success;
3750
    }
3751
 
553 chandransh 3752
    public createAnonymousUser_result setSuccess(User success) {
48 ashish 3753
      this.success = success;
3754
      return this;
3755
    }
3756
 
3757
    public void unsetSuccess() {
3758
      this.success = null;
3759
    }
3760
 
3761
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3762
    public boolean isSetSuccess() {
3763
      return this.success != null;
3764
    }
3765
 
3766
    public void setSuccessIsSet(boolean value) {
3767
      if (!value) {
3768
        this.success = null;
3769
      }
3770
    }
3771
 
553 chandransh 3772
    public UserContextException getUcex() {
3773
      return this.ucex;
48 ashish 3774
    }
3775
 
553 chandransh 3776
    public createAnonymousUser_result setUcex(UserContextException ucex) {
3777
      this.ucex = ucex;
48 ashish 3778
      return this;
3779
    }
3780
 
553 chandransh 3781
    public void unsetUcex() {
3782
      this.ucex = null;
48 ashish 3783
    }
3784
 
553 chandransh 3785
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
3786
    public boolean isSetUcex() {
3787
      return this.ucex != null;
48 ashish 3788
    }
3789
 
553 chandransh 3790
    public void setUcexIsSet(boolean value) {
48 ashish 3791
      if (!value) {
553 chandransh 3792
        this.ucex = null;
48 ashish 3793
      }
3794
    }
3795
 
3796
    public void setFieldValue(_Fields field, Object value) {
3797
      switch (field) {
3798
      case SUCCESS:
3799
        if (value == null) {
3800
          unsetSuccess();
3801
        } else {
553 chandransh 3802
          setSuccess((User)value);
48 ashish 3803
        }
3804
        break;
3805
 
553 chandransh 3806
      case UCEX:
48 ashish 3807
        if (value == null) {
553 chandransh 3808
          unsetUcex();
48 ashish 3809
        } else {
553 chandransh 3810
          setUcex((UserContextException)value);
48 ashish 3811
        }
3812
        break;
3813
 
3814
      }
3815
    }
3816
 
3817
    public void setFieldValue(int fieldID, Object value) {
3818
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3819
    }
3820
 
3821
    public Object getFieldValue(_Fields field) {
3822
      switch (field) {
3823
      case SUCCESS:
3824
        return getSuccess();
3825
 
553 chandransh 3826
      case UCEX:
3827
        return getUcex();
48 ashish 3828
 
3829
      }
3830
      throw new IllegalStateException();
3831
    }
3832
 
3833
    public Object getFieldValue(int fieldId) {
3834
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3835
    }
3836
 
3837
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3838
    public boolean isSet(_Fields field) {
3839
      switch (field) {
3840
      case SUCCESS:
3841
        return isSetSuccess();
553 chandransh 3842
      case UCEX:
3843
        return isSetUcex();
48 ashish 3844
      }
3845
      throw new IllegalStateException();
3846
    }
3847
 
3848
    public boolean isSet(int fieldID) {
3849
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3850
    }
3851
 
3852
    @Override
3853
    public boolean equals(Object that) {
3854
      if (that == null)
3855
        return false;
553 chandransh 3856
      if (that instanceof createAnonymousUser_result)
3857
        return this.equals((createAnonymousUser_result)that);
48 ashish 3858
      return false;
3859
    }
3860
 
553 chandransh 3861
    public boolean equals(createAnonymousUser_result that) {
48 ashish 3862
      if (that == null)
3863
        return false;
3864
 
3865
      boolean this_present_success = true && this.isSetSuccess();
3866
      boolean that_present_success = true && that.isSetSuccess();
3867
      if (this_present_success || that_present_success) {
3868
        if (!(this_present_success && that_present_success))
3869
          return false;
3870
        if (!this.success.equals(that.success))
3871
          return false;
3872
      }
3873
 
553 chandransh 3874
      boolean this_present_ucex = true && this.isSetUcex();
3875
      boolean that_present_ucex = true && that.isSetUcex();
3876
      if (this_present_ucex || that_present_ucex) {
3877
        if (!(this_present_ucex && that_present_ucex))
48 ashish 3878
          return false;
553 chandransh 3879
        if (!this.ucex.equals(that.ucex))
48 ashish 3880
          return false;
3881
      }
3882
 
3883
      return true;
3884
    }
3885
 
3886
    @Override
3887
    public int hashCode() {
3888
      return 0;
3889
    }
3890
 
571 rajveer 3891
    public int compareTo(createAnonymousUser_result other) {
3892
      if (!getClass().equals(other.getClass())) {
3893
        return getClass().getName().compareTo(other.getClass().getName());
3894
      }
3895
 
3896
      int lastComparison = 0;
3897
      createAnonymousUser_result typedOther = (createAnonymousUser_result)other;
3898
 
3899
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3900
      if (lastComparison != 0) {
3901
        return lastComparison;
3902
      }
3903
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3904
      if (lastComparison != 0) {
3905
        return lastComparison;
3906
      }
3907
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
3908
      if (lastComparison != 0) {
3909
        return lastComparison;
3910
      }
3911
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
3912
      if (lastComparison != 0) {
3913
        return lastComparison;
3914
      }
3915
      return 0;
3916
    }
3917
 
48 ashish 3918
    public void read(TProtocol iprot) throws TException {
3919
      TField field;
3920
      iprot.readStructBegin();
3921
      while (true)
3922
      {
3923
        field = iprot.readFieldBegin();
3924
        if (field.type == TType.STOP) { 
3925
          break;
3926
        }
3927
        _Fields fieldId = _Fields.findByThriftId(field.id);
3928
        if (fieldId == null) {
3929
          TProtocolUtil.skip(iprot, field.type);
3930
        } else {
3931
          switch (fieldId) {
3932
            case SUCCESS:
3933
              if (field.type == TType.STRUCT) {
553 chandransh 3934
                this.success = new User();
48 ashish 3935
                this.success.read(iprot);
3936
              } else { 
3937
                TProtocolUtil.skip(iprot, field.type);
3938
              }
3939
              break;
553 chandransh 3940
            case UCEX:
48 ashish 3941
              if (field.type == TType.STRUCT) {
553 chandransh 3942
                this.ucex = new UserContextException();
3943
                this.ucex.read(iprot);
48 ashish 3944
              } else { 
3945
                TProtocolUtil.skip(iprot, field.type);
3946
              }
3947
              break;
3948
          }
3949
          iprot.readFieldEnd();
3950
        }
3951
      }
3952
      iprot.readStructEnd();
3953
      validate();
3954
    }
3955
 
3956
    public void write(TProtocol oprot) throws TException {
3957
      oprot.writeStructBegin(STRUCT_DESC);
3958
 
3959
      if (this.isSetSuccess()) {
3960
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3961
        this.success.write(oprot);
3962
        oprot.writeFieldEnd();
553 chandransh 3963
      } else if (this.isSetUcex()) {
3964
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
3965
        this.ucex.write(oprot);
48 ashish 3966
        oprot.writeFieldEnd();
3967
      }
3968
      oprot.writeFieldStop();
3969
      oprot.writeStructEnd();
3970
    }
3971
 
3972
    @Override
3973
    public String toString() {
553 chandransh 3974
      StringBuilder sb = new StringBuilder("createAnonymousUser_result(");
48 ashish 3975
      boolean first = true;
3976
 
3977
      sb.append("success:");
3978
      if (this.success == null) {
3979
        sb.append("null");
3980
      } else {
3981
        sb.append(this.success);
3982
      }
3983
      first = false;
3984
      if (!first) sb.append(", ");
553 chandransh 3985
      sb.append("ucex:");
3986
      if (this.ucex == null) {
48 ashish 3987
        sb.append("null");
3988
      } else {
553 chandransh 3989
        sb.append(this.ucex);
48 ashish 3990
      }
3991
      first = false;
3992
      sb.append(")");
3993
      return sb.toString();
3994
    }
3995
 
3996
    public void validate() throws TException {
3997
      // check for required fields
3998
    }
3999
 
4000
  }
4001
 
553 chandransh 4002
  public static class getUserById_args implements TBase<getUserById_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_args>   {
4003
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_args");
48 ashish 4004
 
4005
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
4006
 
4007
    private long userId;
4008
 
4009
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4010
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4011
      USER_ID((short)1, "userId");
48 ashish 4012
 
4013
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4014
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4015
 
4016
      static {
4017
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4018
          byId.put((int)field._thriftId, field);
4019
          byName.put(field.getFieldName(), field);
4020
        }
4021
      }
4022
 
4023
      /**
4024
       * Find the _Fields constant that matches fieldId, or null if its not found.
4025
       */
4026
      public static _Fields findByThriftId(int fieldId) {
4027
        return byId.get(fieldId);
4028
      }
4029
 
4030
      /**
4031
       * Find the _Fields constant that matches fieldId, throwing an exception
4032
       * if it is not found.
4033
       */
4034
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4035
        _Fields fields = findByThriftId(fieldId);
4036
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4037
        return fields;
4038
      }
4039
 
4040
      /**
4041
       * Find the _Fields constant that matches name, or null if its not found.
4042
       */
4043
      public static _Fields findByName(String name) {
4044
        return byName.get(name);
4045
      }
4046
 
4047
      private final short _thriftId;
4048
      private final String _fieldName;
4049
 
4050
      _Fields(short thriftId, String fieldName) {
4051
        _thriftId = thriftId;
4052
        _fieldName = fieldName;
4053
      }
4054
 
4055
      public short getThriftFieldId() {
4056
        return _thriftId;
4057
      }
4058
 
4059
      public String getFieldName() {
4060
        return _fieldName;
4061
      }
4062
    }
4063
 
4064
    // isset id assignments
4065
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 4066
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 4067
 
4068
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4069
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
4070
          new FieldValueMetaData(TType.I64)));
4071
    }});
4072
 
4073
    static {
553 chandransh 4074
      FieldMetaData.addStructMetaDataMap(getUserById_args.class, metaDataMap);
48 ashish 4075
    }
4076
 
553 chandransh 4077
    public getUserById_args() {
48 ashish 4078
    }
4079
 
553 chandransh 4080
    public getUserById_args(
4081
      long userId)
48 ashish 4082
    {
4083
      this();
4084
      this.userId = userId;
4085
      setUserIdIsSet(true);
4086
    }
4087
 
4088
    /**
4089
     * Performs a deep copy on <i>other</i>.
4090
     */
553 chandransh 4091
    public getUserById_args(getUserById_args other) {
48 ashish 4092
      __isset_bit_vector.clear();
4093
      __isset_bit_vector.or(other.__isset_bit_vector);
4094
      this.userId = other.userId;
4095
    }
4096
 
553 chandransh 4097
    public getUserById_args deepCopy() {
4098
      return new getUserById_args(this);
48 ashish 4099
    }
4100
 
4101
    @Deprecated
553 chandransh 4102
    public getUserById_args clone() {
4103
      return new getUserById_args(this);
48 ashish 4104
    }
4105
 
4106
    public long getUserId() {
4107
      return this.userId;
4108
    }
4109
 
553 chandransh 4110
    public getUserById_args setUserId(long userId) {
48 ashish 4111
      this.userId = userId;
4112
      setUserIdIsSet(true);
4113
      return this;
4114
    }
4115
 
4116
    public void unsetUserId() {
4117
      __isset_bit_vector.clear(__USERID_ISSET_ID);
4118
    }
4119
 
4120
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
4121
    public boolean isSetUserId() {
4122
      return __isset_bit_vector.get(__USERID_ISSET_ID);
4123
    }
4124
 
4125
    public void setUserIdIsSet(boolean value) {
4126
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
4127
    }
4128
 
4129
    public void setFieldValue(_Fields field, Object value) {
4130
      switch (field) {
4131
      case USER_ID:
4132
        if (value == null) {
4133
          unsetUserId();
4134
        } else {
4135
          setUserId((Long)value);
4136
        }
4137
        break;
4138
 
4139
      }
4140
    }
4141
 
4142
    public void setFieldValue(int fieldID, Object value) {
4143
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4144
    }
4145
 
4146
    public Object getFieldValue(_Fields field) {
4147
      switch (field) {
4148
      case USER_ID:
4149
        return new Long(getUserId());
4150
 
4151
      }
4152
      throw new IllegalStateException();
4153
    }
4154
 
4155
    public Object getFieldValue(int fieldId) {
4156
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4157
    }
4158
 
4159
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4160
    public boolean isSet(_Fields field) {
4161
      switch (field) {
4162
      case USER_ID:
4163
        return isSetUserId();
4164
      }
4165
      throw new IllegalStateException();
4166
    }
4167
 
4168
    public boolean isSet(int fieldID) {
4169
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4170
    }
4171
 
4172
    @Override
4173
    public boolean equals(Object that) {
4174
      if (that == null)
4175
        return false;
553 chandransh 4176
      if (that instanceof getUserById_args)
4177
        return this.equals((getUserById_args)that);
48 ashish 4178
      return false;
4179
    }
4180
 
553 chandransh 4181
    public boolean equals(getUserById_args that) {
48 ashish 4182
      if (that == null)
4183
        return false;
4184
 
4185
      boolean this_present_userId = true;
4186
      boolean that_present_userId = true;
4187
      if (this_present_userId || that_present_userId) {
4188
        if (!(this_present_userId && that_present_userId))
4189
          return false;
4190
        if (this.userId != that.userId)
4191
          return false;
4192
      }
4193
 
4194
      return true;
4195
    }
4196
 
4197
    @Override
4198
    public int hashCode() {
4199
      return 0;
4200
    }
4201
 
553 chandransh 4202
    public int compareTo(getUserById_args other) {
48 ashish 4203
      if (!getClass().equals(other.getClass())) {
4204
        return getClass().getName().compareTo(other.getClass().getName());
4205
      }
4206
 
4207
      int lastComparison = 0;
553 chandransh 4208
      getUserById_args typedOther = (getUserById_args)other;
48 ashish 4209
 
4210
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
4211
      if (lastComparison != 0) {
4212
        return lastComparison;
4213
      }
4214
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
4215
      if (lastComparison != 0) {
4216
        return lastComparison;
4217
      }
4218
      return 0;
4219
    }
4220
 
4221
    public void read(TProtocol iprot) throws TException {
4222
      TField field;
4223
      iprot.readStructBegin();
4224
      while (true)
4225
      {
4226
        field = iprot.readFieldBegin();
4227
        if (field.type == TType.STOP) { 
4228
          break;
4229
        }
4230
        _Fields fieldId = _Fields.findByThriftId(field.id);
4231
        if (fieldId == null) {
4232
          TProtocolUtil.skip(iprot, field.type);
4233
        } else {
4234
          switch (fieldId) {
4235
            case USER_ID:
4236
              if (field.type == TType.I64) {
4237
                this.userId = iprot.readI64();
4238
                setUserIdIsSet(true);
4239
              } else { 
4240
                TProtocolUtil.skip(iprot, field.type);
4241
              }
4242
              break;
4243
          }
4244
          iprot.readFieldEnd();
4245
        }
4246
      }
4247
      iprot.readStructEnd();
4248
      validate();
4249
    }
4250
 
4251
    public void write(TProtocol oprot) throws TException {
4252
      validate();
4253
 
4254
      oprot.writeStructBegin(STRUCT_DESC);
4255
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
4256
      oprot.writeI64(this.userId);
4257
      oprot.writeFieldEnd();
4258
      oprot.writeFieldStop();
4259
      oprot.writeStructEnd();
4260
    }
4261
 
4262
    @Override
4263
    public String toString() {
553 chandransh 4264
      StringBuilder sb = new StringBuilder("getUserById_args(");
48 ashish 4265
      boolean first = true;
4266
 
4267
      sb.append("userId:");
4268
      sb.append(this.userId);
4269
      first = false;
4270
      sb.append(")");
4271
      return sb.toString();
4272
    }
4273
 
4274
    public void validate() throws TException {
4275
      // check for required fields
4276
    }
4277
 
4278
  }
4279
 
571 rajveer 4280
  public static class getUserById_result implements TBase<getUserById_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserById_result>   {
553 chandransh 4281
    private static final TStruct STRUCT_DESC = new TStruct("getUserById_result");
48 ashish 4282
 
4283
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4284
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4285
 
553 chandransh 4286
    private User success;
4287
    private UserContextException ucex;
48 ashish 4288
 
4289
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4290
    public enum _Fields implements TFieldIdEnum {
4291
      SUCCESS((short)0, "success"),
553 chandransh 4292
      UCEX((short)1, "ucex");
48 ashish 4293
 
4294
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4296
 
4297
      static {
4298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4299
          byId.put((int)field._thriftId, field);
4300
          byName.put(field.getFieldName(), field);
4301
        }
4302
      }
4303
 
4304
      /**
4305
       * Find the _Fields constant that matches fieldId, or null if its not found.
4306
       */
4307
      public static _Fields findByThriftId(int fieldId) {
4308
        return byId.get(fieldId);
4309
      }
4310
 
4311
      /**
4312
       * Find the _Fields constant that matches fieldId, throwing an exception
4313
       * if it is not found.
4314
       */
4315
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4316
        _Fields fields = findByThriftId(fieldId);
4317
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4318
        return fields;
4319
      }
4320
 
4321
      /**
4322
       * Find the _Fields constant that matches name, or null if its not found.
4323
       */
4324
      public static _Fields findByName(String name) {
4325
        return byName.get(name);
4326
      }
4327
 
4328
      private final short _thriftId;
4329
      private final String _fieldName;
4330
 
4331
      _Fields(short thriftId, String fieldName) {
4332
        _thriftId = thriftId;
4333
        _fieldName = fieldName;
4334
      }
4335
 
4336
      public short getThriftFieldId() {
4337
        return _thriftId;
4338
      }
4339
 
4340
      public String getFieldName() {
4341
        return _fieldName;
4342
      }
4343
    }
4344
 
4345
    // isset id assignments
4346
 
4347
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4348
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4349
          new StructMetaData(TType.STRUCT, User.class)));
4350
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4351
          new FieldValueMetaData(TType.STRUCT)));
4352
    }});
4353
 
4354
    static {
553 chandransh 4355
      FieldMetaData.addStructMetaDataMap(getUserById_result.class, metaDataMap);
48 ashish 4356
    }
4357
 
553 chandransh 4358
    public getUserById_result() {
48 ashish 4359
    }
4360
 
553 chandransh 4361
    public getUserById_result(
4362
      User success,
4363
      UserContextException ucex)
48 ashish 4364
    {
4365
      this();
4366
      this.success = success;
553 chandransh 4367
      this.ucex = ucex;
48 ashish 4368
    }
4369
 
4370
    /**
4371
     * Performs a deep copy on <i>other</i>.
4372
     */
553 chandransh 4373
    public getUserById_result(getUserById_result other) {
48 ashish 4374
      if (other.isSetSuccess()) {
553 chandransh 4375
        this.success = new User(other.success);
48 ashish 4376
      }
553 chandransh 4377
      if (other.isSetUcex()) {
4378
        this.ucex = new UserContextException(other.ucex);
48 ashish 4379
      }
4380
    }
4381
 
553 chandransh 4382
    public getUserById_result deepCopy() {
4383
      return new getUserById_result(this);
48 ashish 4384
    }
4385
 
4386
    @Deprecated
553 chandransh 4387
    public getUserById_result clone() {
4388
      return new getUserById_result(this);
48 ashish 4389
    }
4390
 
553 chandransh 4391
    public User getSuccess() {
48 ashish 4392
      return this.success;
4393
    }
4394
 
553 chandransh 4395
    public getUserById_result setSuccess(User success) {
48 ashish 4396
      this.success = success;
4397
      return this;
4398
    }
4399
 
4400
    public void unsetSuccess() {
4401
      this.success = null;
4402
    }
4403
 
4404
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4405
    public boolean isSetSuccess() {
4406
      return this.success != null;
4407
    }
4408
 
4409
    public void setSuccessIsSet(boolean value) {
4410
      if (!value) {
4411
        this.success = null;
4412
      }
4413
    }
4414
 
553 chandransh 4415
    public UserContextException getUcex() {
4416
      return this.ucex;
48 ashish 4417
    }
4418
 
553 chandransh 4419
    public getUserById_result setUcex(UserContextException ucex) {
4420
      this.ucex = ucex;
48 ashish 4421
      return this;
4422
    }
4423
 
553 chandransh 4424
    public void unsetUcex() {
4425
      this.ucex = null;
48 ashish 4426
    }
4427
 
553 chandransh 4428
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
4429
    public boolean isSetUcex() {
4430
      return this.ucex != null;
48 ashish 4431
    }
4432
 
553 chandransh 4433
    public void setUcexIsSet(boolean value) {
48 ashish 4434
      if (!value) {
553 chandransh 4435
        this.ucex = null;
48 ashish 4436
      }
4437
    }
4438
 
4439
    public void setFieldValue(_Fields field, Object value) {
4440
      switch (field) {
4441
      case SUCCESS:
4442
        if (value == null) {
4443
          unsetSuccess();
4444
        } else {
553 chandransh 4445
          setSuccess((User)value);
48 ashish 4446
        }
4447
        break;
4448
 
553 chandransh 4449
      case UCEX:
48 ashish 4450
        if (value == null) {
553 chandransh 4451
          unsetUcex();
48 ashish 4452
        } else {
553 chandransh 4453
          setUcex((UserContextException)value);
48 ashish 4454
        }
4455
        break;
4456
 
4457
      }
4458
    }
4459
 
4460
    public void setFieldValue(int fieldID, Object value) {
4461
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4462
    }
4463
 
4464
    public Object getFieldValue(_Fields field) {
4465
      switch (field) {
4466
      case SUCCESS:
4467
        return getSuccess();
4468
 
553 chandransh 4469
      case UCEX:
4470
        return getUcex();
48 ashish 4471
 
4472
      }
4473
      throw new IllegalStateException();
4474
    }
4475
 
4476
    public Object getFieldValue(int fieldId) {
4477
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4478
    }
4479
 
4480
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4481
    public boolean isSet(_Fields field) {
4482
      switch (field) {
4483
      case SUCCESS:
4484
        return isSetSuccess();
553 chandransh 4485
      case UCEX:
4486
        return isSetUcex();
48 ashish 4487
      }
4488
      throw new IllegalStateException();
4489
    }
4490
 
4491
    public boolean isSet(int fieldID) {
4492
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4493
    }
4494
 
4495
    @Override
4496
    public boolean equals(Object that) {
4497
      if (that == null)
4498
        return false;
553 chandransh 4499
      if (that instanceof getUserById_result)
4500
        return this.equals((getUserById_result)that);
48 ashish 4501
      return false;
4502
    }
4503
 
553 chandransh 4504
    public boolean equals(getUserById_result that) {
48 ashish 4505
      if (that == null)
4506
        return false;
4507
 
4508
      boolean this_present_success = true && this.isSetSuccess();
4509
      boolean that_present_success = true && that.isSetSuccess();
4510
      if (this_present_success || that_present_success) {
4511
        if (!(this_present_success && that_present_success))
4512
          return false;
4513
        if (!this.success.equals(that.success))
4514
          return false;
4515
      }
4516
 
553 chandransh 4517
      boolean this_present_ucex = true && this.isSetUcex();
4518
      boolean that_present_ucex = true && that.isSetUcex();
4519
      if (this_present_ucex || that_present_ucex) {
4520
        if (!(this_present_ucex && that_present_ucex))
48 ashish 4521
          return false;
553 chandransh 4522
        if (!this.ucex.equals(that.ucex))
48 ashish 4523
          return false;
4524
      }
4525
 
4526
      return true;
4527
    }
4528
 
4529
    @Override
4530
    public int hashCode() {
4531
      return 0;
4532
    }
4533
 
571 rajveer 4534
    public int compareTo(getUserById_result other) {
4535
      if (!getClass().equals(other.getClass())) {
4536
        return getClass().getName().compareTo(other.getClass().getName());
4537
      }
4538
 
4539
      int lastComparison = 0;
4540
      getUserById_result typedOther = (getUserById_result)other;
4541
 
4542
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4543
      if (lastComparison != 0) {
4544
        return lastComparison;
4545
      }
4546
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4547
      if (lastComparison != 0) {
4548
        return lastComparison;
4549
      }
4550
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
4551
      if (lastComparison != 0) {
4552
        return lastComparison;
4553
      }
4554
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
4555
      if (lastComparison != 0) {
4556
        return lastComparison;
4557
      }
4558
      return 0;
4559
    }
4560
 
48 ashish 4561
    public void read(TProtocol iprot) throws TException {
4562
      TField field;
4563
      iprot.readStructBegin();
4564
      while (true)
4565
      {
4566
        field = iprot.readFieldBegin();
4567
        if (field.type == TType.STOP) { 
4568
          break;
4569
        }
4570
        _Fields fieldId = _Fields.findByThriftId(field.id);
4571
        if (fieldId == null) {
4572
          TProtocolUtil.skip(iprot, field.type);
4573
        } else {
4574
          switch (fieldId) {
4575
            case SUCCESS:
4576
              if (field.type == TType.STRUCT) {
553 chandransh 4577
                this.success = new User();
48 ashish 4578
                this.success.read(iprot);
4579
              } else { 
4580
                TProtocolUtil.skip(iprot, field.type);
4581
              }
4582
              break;
553 chandransh 4583
            case UCEX:
48 ashish 4584
              if (field.type == TType.STRUCT) {
553 chandransh 4585
                this.ucex = new UserContextException();
4586
                this.ucex.read(iprot);
48 ashish 4587
              } else { 
4588
                TProtocolUtil.skip(iprot, field.type);
4589
              }
4590
              break;
4591
          }
4592
          iprot.readFieldEnd();
4593
        }
4594
      }
4595
      iprot.readStructEnd();
4596
      validate();
4597
    }
4598
 
4599
    public void write(TProtocol oprot) throws TException {
4600
      oprot.writeStructBegin(STRUCT_DESC);
4601
 
4602
      if (this.isSetSuccess()) {
4603
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4604
        this.success.write(oprot);
4605
        oprot.writeFieldEnd();
553 chandransh 4606
      } else if (this.isSetUcex()) {
4607
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
4608
        this.ucex.write(oprot);
48 ashish 4609
        oprot.writeFieldEnd();
4610
      }
4611
      oprot.writeFieldStop();
4612
      oprot.writeStructEnd();
4613
    }
4614
 
4615
    @Override
4616
    public String toString() {
553 chandransh 4617
      StringBuilder sb = new StringBuilder("getUserById_result(");
48 ashish 4618
      boolean first = true;
4619
 
4620
      sb.append("success:");
4621
      if (this.success == null) {
4622
        sb.append("null");
4623
      } else {
4624
        sb.append(this.success);
4625
      }
4626
      first = false;
4627
      if (!first) sb.append(", ");
553 chandransh 4628
      sb.append("ucex:");
4629
      if (this.ucex == null) {
48 ashish 4630
        sb.append("null");
4631
      } else {
553 chandransh 4632
        sb.append(this.ucex);
48 ashish 4633
      }
4634
      first = false;
4635
      sb.append(")");
4636
      return sb.toString();
4637
    }
4638
 
4639
    public void validate() throws TException {
4640
      // check for required fields
4641
    }
4642
 
4643
  }
4644
 
571 rajveer 4645
  public static class createUser_args implements TBase<createUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_args>   {
553 chandransh 4646
    private static final TStruct STRUCT_DESC = new TStruct("createUser_args");
48 ashish 4647
 
553 chandransh 4648
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 4649
 
553 chandransh 4650
    private User user;
48 ashish 4651
 
4652
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4653
    public enum _Fields implements TFieldIdEnum {
553 chandransh 4654
      USER((short)1, "user");
48 ashish 4655
 
4656
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4657
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4658
 
4659
      static {
4660
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4661
          byId.put((int)field._thriftId, field);
4662
          byName.put(field.getFieldName(), field);
4663
        }
4664
      }
4665
 
4666
      /**
4667
       * Find the _Fields constant that matches fieldId, or null if its not found.
4668
       */
4669
      public static _Fields findByThriftId(int fieldId) {
4670
        return byId.get(fieldId);
4671
      }
4672
 
4673
      /**
4674
       * Find the _Fields constant that matches fieldId, throwing an exception
4675
       * if it is not found.
4676
       */
4677
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4678
        _Fields fields = findByThriftId(fieldId);
4679
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4680
        return fields;
4681
      }
4682
 
4683
      /**
4684
       * Find the _Fields constant that matches name, or null if its not found.
4685
       */
4686
      public static _Fields findByName(String name) {
4687
        return byName.get(name);
4688
      }
4689
 
4690
      private final short _thriftId;
4691
      private final String _fieldName;
4692
 
4693
      _Fields(short thriftId, String fieldName) {
4694
        _thriftId = thriftId;
4695
        _fieldName = fieldName;
4696
      }
4697
 
4698
      public short getThriftFieldId() {
4699
        return _thriftId;
4700
      }
4701
 
4702
      public String getFieldName() {
4703
        return _fieldName;
4704
      }
4705
    }
4706
 
4707
    // isset id assignments
4708
 
4709
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 4710
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
4711
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 4712
    }});
4713
 
4714
    static {
553 chandransh 4715
      FieldMetaData.addStructMetaDataMap(createUser_args.class, metaDataMap);
48 ashish 4716
    }
4717
 
553 chandransh 4718
    public createUser_args() {
48 ashish 4719
    }
4720
 
553 chandransh 4721
    public createUser_args(
4722
      User user)
48 ashish 4723
    {
4724
      this();
553 chandransh 4725
      this.user = user;
48 ashish 4726
    }
4727
 
4728
    /**
4729
     * Performs a deep copy on <i>other</i>.
4730
     */
553 chandransh 4731
    public createUser_args(createUser_args other) {
4732
      if (other.isSetUser()) {
4733
        this.user = new User(other.user);
48 ashish 4734
      }
4735
    }
4736
 
553 chandransh 4737
    public createUser_args deepCopy() {
4738
      return new createUser_args(this);
48 ashish 4739
    }
4740
 
4741
    @Deprecated
553 chandransh 4742
    public createUser_args clone() {
4743
      return new createUser_args(this);
48 ashish 4744
    }
4745
 
553 chandransh 4746
    public User getUser() {
4747
      return this.user;
48 ashish 4748
    }
4749
 
553 chandransh 4750
    public createUser_args setUser(User user) {
4751
      this.user = user;
48 ashish 4752
      return this;
4753
    }
4754
 
553 chandransh 4755
    public void unsetUser() {
4756
      this.user = null;
48 ashish 4757
    }
4758
 
553 chandransh 4759
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
4760
    public boolean isSetUser() {
4761
      return this.user != null;
48 ashish 4762
    }
4763
 
553 chandransh 4764
    public void setUserIsSet(boolean value) {
48 ashish 4765
      if (!value) {
553 chandransh 4766
        this.user = null;
48 ashish 4767
      }
4768
    }
4769
 
4770
    public void setFieldValue(_Fields field, Object value) {
4771
      switch (field) {
553 chandransh 4772
      case USER:
48 ashish 4773
        if (value == null) {
553 chandransh 4774
          unsetUser();
48 ashish 4775
        } else {
553 chandransh 4776
          setUser((User)value);
48 ashish 4777
        }
4778
        break;
4779
 
4780
      }
4781
    }
4782
 
4783
    public void setFieldValue(int fieldID, Object value) {
4784
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4785
    }
4786
 
4787
    public Object getFieldValue(_Fields field) {
4788
      switch (field) {
553 chandransh 4789
      case USER:
4790
        return getUser();
48 ashish 4791
 
4792
      }
4793
      throw new IllegalStateException();
4794
    }
4795
 
4796
    public Object getFieldValue(int fieldId) {
4797
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4798
    }
4799
 
4800
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4801
    public boolean isSet(_Fields field) {
4802
      switch (field) {
553 chandransh 4803
      case USER:
4804
        return isSetUser();
48 ashish 4805
      }
4806
      throw new IllegalStateException();
4807
    }
4808
 
4809
    public boolean isSet(int fieldID) {
4810
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4811
    }
4812
 
4813
    @Override
4814
    public boolean equals(Object that) {
4815
      if (that == null)
4816
        return false;
553 chandransh 4817
      if (that instanceof createUser_args)
4818
        return this.equals((createUser_args)that);
48 ashish 4819
      return false;
4820
    }
4821
 
553 chandransh 4822
    public boolean equals(createUser_args that) {
48 ashish 4823
      if (that == null)
4824
        return false;
4825
 
553 chandransh 4826
      boolean this_present_user = true && this.isSetUser();
4827
      boolean that_present_user = true && that.isSetUser();
4828
      if (this_present_user || that_present_user) {
4829
        if (!(this_present_user && that_present_user))
48 ashish 4830
          return false;
553 chandransh 4831
        if (!this.user.equals(that.user))
48 ashish 4832
          return false;
4833
      }
4834
 
4835
      return true;
4836
    }
4837
 
4838
    @Override
4839
    public int hashCode() {
4840
      return 0;
4841
    }
4842
 
571 rajveer 4843
    public int compareTo(createUser_args other) {
4844
      if (!getClass().equals(other.getClass())) {
4845
        return getClass().getName().compareTo(other.getClass().getName());
4846
      }
4847
 
4848
      int lastComparison = 0;
4849
      createUser_args typedOther = (createUser_args)other;
4850
 
4851
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
4852
      if (lastComparison != 0) {
4853
        return lastComparison;
4854
      }
4855
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
4856
      if (lastComparison != 0) {
4857
        return lastComparison;
4858
      }
4859
      return 0;
4860
    }
4861
 
48 ashish 4862
    public void read(TProtocol iprot) throws TException {
4863
      TField field;
4864
      iprot.readStructBegin();
4865
      while (true)
4866
      {
4867
        field = iprot.readFieldBegin();
4868
        if (field.type == TType.STOP) { 
4869
          break;
4870
        }
4871
        _Fields fieldId = _Fields.findByThriftId(field.id);
4872
        if (fieldId == null) {
4873
          TProtocolUtil.skip(iprot, field.type);
4874
        } else {
4875
          switch (fieldId) {
553 chandransh 4876
            case USER:
4877
              if (field.type == TType.STRUCT) {
4878
                this.user = new User();
4879
                this.user.read(iprot);
48 ashish 4880
              } else { 
4881
                TProtocolUtil.skip(iprot, field.type);
4882
              }
4883
              break;
4884
          }
4885
          iprot.readFieldEnd();
4886
        }
4887
      }
4888
      iprot.readStructEnd();
4889
      validate();
4890
    }
4891
 
4892
    public void write(TProtocol oprot) throws TException {
4893
      validate();
4894
 
4895
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 4896
      if (this.user != null) {
4897
        oprot.writeFieldBegin(USER_FIELD_DESC);
4898
        this.user.write(oprot);
48 ashish 4899
        oprot.writeFieldEnd();
4900
      }
4901
      oprot.writeFieldStop();
4902
      oprot.writeStructEnd();
4903
    }
4904
 
4905
    @Override
4906
    public String toString() {
553 chandransh 4907
      StringBuilder sb = new StringBuilder("createUser_args(");
48 ashish 4908
      boolean first = true;
4909
 
553 chandransh 4910
      sb.append("user:");
4911
      if (this.user == null) {
48 ashish 4912
        sb.append("null");
4913
      } else {
553 chandransh 4914
        sb.append(this.user);
48 ashish 4915
      }
4916
      first = false;
4917
      sb.append(")");
4918
      return sb.toString();
4919
    }
4920
 
4921
    public void validate() throws TException {
4922
      // check for required fields
4923
    }
4924
 
4925
  }
4926
 
571 rajveer 4927
  public static class createUser_result implements TBase<createUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<createUser_result>   {
553 chandransh 4928
    private static final TStruct STRUCT_DESC = new TStruct("createUser_result");
48 ashish 4929
 
4930
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 4931
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 4932
 
553 chandransh 4933
    private User success;
4934
    private UserContextException ucex;
48 ashish 4935
 
4936
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4937
    public enum _Fields implements TFieldIdEnum {
4938
      SUCCESS((short)0, "success"),
553 chandransh 4939
      UCEX((short)1, "ucex");
48 ashish 4940
 
4941
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4942
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4943
 
4944
      static {
4945
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4946
          byId.put((int)field._thriftId, field);
4947
          byName.put(field.getFieldName(), field);
4948
        }
4949
      }
4950
 
4951
      /**
4952
       * Find the _Fields constant that matches fieldId, or null if its not found.
4953
       */
4954
      public static _Fields findByThriftId(int fieldId) {
4955
        return byId.get(fieldId);
4956
      }
4957
 
4958
      /**
4959
       * Find the _Fields constant that matches fieldId, throwing an exception
4960
       * if it is not found.
4961
       */
4962
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4963
        _Fields fields = findByThriftId(fieldId);
4964
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4965
        return fields;
4966
      }
4967
 
4968
      /**
4969
       * Find the _Fields constant that matches name, or null if its not found.
4970
       */
4971
      public static _Fields findByName(String name) {
4972
        return byName.get(name);
4973
      }
4974
 
4975
      private final short _thriftId;
4976
      private final String _fieldName;
4977
 
4978
      _Fields(short thriftId, String fieldName) {
4979
        _thriftId = thriftId;
4980
        _fieldName = fieldName;
4981
      }
4982
 
4983
      public short getThriftFieldId() {
4984
        return _thriftId;
4985
      }
4986
 
4987
      public String getFieldName() {
4988
        return _fieldName;
4989
      }
4990
    }
4991
 
4992
    // isset id assignments
4993
 
4994
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4995
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 4996
          new StructMetaData(TType.STRUCT, User.class)));
4997
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 4998
          new FieldValueMetaData(TType.STRUCT)));
4999
    }});
5000
 
5001
    static {
553 chandransh 5002
      FieldMetaData.addStructMetaDataMap(createUser_result.class, metaDataMap);
48 ashish 5003
    }
5004
 
553 chandransh 5005
    public createUser_result() {
48 ashish 5006
    }
5007
 
553 chandransh 5008
    public createUser_result(
5009
      User success,
5010
      UserContextException ucex)
48 ashish 5011
    {
5012
      this();
5013
      this.success = success;
553 chandransh 5014
      this.ucex = ucex;
48 ashish 5015
    }
5016
 
5017
    /**
5018
     * Performs a deep copy on <i>other</i>.
5019
     */
553 chandransh 5020
    public createUser_result(createUser_result other) {
48 ashish 5021
      if (other.isSetSuccess()) {
553 chandransh 5022
        this.success = new User(other.success);
48 ashish 5023
      }
553 chandransh 5024
      if (other.isSetUcex()) {
5025
        this.ucex = new UserContextException(other.ucex);
48 ashish 5026
      }
5027
    }
5028
 
553 chandransh 5029
    public createUser_result deepCopy() {
5030
      return new createUser_result(this);
48 ashish 5031
    }
5032
 
5033
    @Deprecated
553 chandransh 5034
    public createUser_result clone() {
5035
      return new createUser_result(this);
48 ashish 5036
    }
5037
 
553 chandransh 5038
    public User getSuccess() {
48 ashish 5039
      return this.success;
5040
    }
5041
 
553 chandransh 5042
    public createUser_result setSuccess(User success) {
48 ashish 5043
      this.success = success;
5044
      return this;
5045
    }
5046
 
5047
    public void unsetSuccess() {
5048
      this.success = null;
5049
    }
5050
 
5051
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5052
    public boolean isSetSuccess() {
5053
      return this.success != null;
5054
    }
5055
 
5056
    public void setSuccessIsSet(boolean value) {
5057
      if (!value) {
5058
        this.success = null;
5059
      }
5060
    }
5061
 
553 chandransh 5062
    public UserContextException getUcex() {
5063
      return this.ucex;
48 ashish 5064
    }
5065
 
553 chandransh 5066
    public createUser_result setUcex(UserContextException ucex) {
5067
      this.ucex = ucex;
48 ashish 5068
      return this;
5069
    }
5070
 
553 chandransh 5071
    public void unsetUcex() {
5072
      this.ucex = null;
48 ashish 5073
    }
5074
 
553 chandransh 5075
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5076
    public boolean isSetUcex() {
5077
      return this.ucex != null;
48 ashish 5078
    }
5079
 
553 chandransh 5080
    public void setUcexIsSet(boolean value) {
48 ashish 5081
      if (!value) {
553 chandransh 5082
        this.ucex = null;
48 ashish 5083
      }
5084
    }
5085
 
5086
    public void setFieldValue(_Fields field, Object value) {
5087
      switch (field) {
5088
      case SUCCESS:
5089
        if (value == null) {
5090
          unsetSuccess();
5091
        } else {
553 chandransh 5092
          setSuccess((User)value);
48 ashish 5093
        }
5094
        break;
5095
 
553 chandransh 5096
      case UCEX:
48 ashish 5097
        if (value == null) {
553 chandransh 5098
          unsetUcex();
48 ashish 5099
        } else {
553 chandransh 5100
          setUcex((UserContextException)value);
48 ashish 5101
        }
5102
        break;
5103
 
5104
      }
5105
    }
5106
 
5107
    public void setFieldValue(int fieldID, Object value) {
5108
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5109
    }
5110
 
5111
    public Object getFieldValue(_Fields field) {
5112
      switch (field) {
5113
      case SUCCESS:
5114
        return getSuccess();
5115
 
553 chandransh 5116
      case UCEX:
5117
        return getUcex();
48 ashish 5118
 
5119
      }
5120
      throw new IllegalStateException();
5121
    }
5122
 
5123
    public Object getFieldValue(int fieldId) {
5124
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5125
    }
5126
 
5127
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5128
    public boolean isSet(_Fields field) {
5129
      switch (field) {
5130
      case SUCCESS:
5131
        return isSetSuccess();
553 chandransh 5132
      case UCEX:
5133
        return isSetUcex();
48 ashish 5134
      }
5135
      throw new IllegalStateException();
5136
    }
5137
 
5138
    public boolean isSet(int fieldID) {
5139
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5140
    }
5141
 
5142
    @Override
5143
    public boolean equals(Object that) {
5144
      if (that == null)
5145
        return false;
553 chandransh 5146
      if (that instanceof createUser_result)
5147
        return this.equals((createUser_result)that);
48 ashish 5148
      return false;
5149
    }
5150
 
553 chandransh 5151
    public boolean equals(createUser_result that) {
48 ashish 5152
      if (that == null)
5153
        return false;
5154
 
5155
      boolean this_present_success = true && this.isSetSuccess();
5156
      boolean that_present_success = true && that.isSetSuccess();
5157
      if (this_present_success || that_present_success) {
5158
        if (!(this_present_success && that_present_success))
5159
          return false;
5160
        if (!this.success.equals(that.success))
5161
          return false;
5162
      }
5163
 
553 chandransh 5164
      boolean this_present_ucex = true && this.isSetUcex();
5165
      boolean that_present_ucex = true && that.isSetUcex();
5166
      if (this_present_ucex || that_present_ucex) {
5167
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5168
          return false;
553 chandransh 5169
        if (!this.ucex.equals(that.ucex))
48 ashish 5170
          return false;
5171
      }
5172
 
5173
      return true;
5174
    }
5175
 
5176
    @Override
5177
    public int hashCode() {
5178
      return 0;
5179
    }
5180
 
571 rajveer 5181
    public int compareTo(createUser_result other) {
5182
      if (!getClass().equals(other.getClass())) {
5183
        return getClass().getName().compareTo(other.getClass().getName());
5184
      }
5185
 
5186
      int lastComparison = 0;
5187
      createUser_result typedOther = (createUser_result)other;
5188
 
5189
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5190
      if (lastComparison != 0) {
5191
        return lastComparison;
5192
      }
5193
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5194
      if (lastComparison != 0) {
5195
        return lastComparison;
5196
      }
5197
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5198
      if (lastComparison != 0) {
5199
        return lastComparison;
5200
      }
5201
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5202
      if (lastComparison != 0) {
5203
        return lastComparison;
5204
      }
5205
      return 0;
5206
    }
5207
 
48 ashish 5208
    public void read(TProtocol iprot) throws TException {
5209
      TField field;
5210
      iprot.readStructBegin();
5211
      while (true)
5212
      {
5213
        field = iprot.readFieldBegin();
5214
        if (field.type == TType.STOP) { 
5215
          break;
5216
        }
5217
        _Fields fieldId = _Fields.findByThriftId(field.id);
5218
        if (fieldId == null) {
5219
          TProtocolUtil.skip(iprot, field.type);
5220
        } else {
5221
          switch (fieldId) {
5222
            case SUCCESS:
5223
              if (field.type == TType.STRUCT) {
553 chandransh 5224
                this.success = new User();
48 ashish 5225
                this.success.read(iprot);
5226
              } else { 
5227
                TProtocolUtil.skip(iprot, field.type);
5228
              }
5229
              break;
553 chandransh 5230
            case UCEX:
48 ashish 5231
              if (field.type == TType.STRUCT) {
553 chandransh 5232
                this.ucex = new UserContextException();
5233
                this.ucex.read(iprot);
48 ashish 5234
              } else { 
5235
                TProtocolUtil.skip(iprot, field.type);
5236
              }
5237
              break;
5238
          }
5239
          iprot.readFieldEnd();
5240
        }
5241
      }
5242
      iprot.readStructEnd();
5243
      validate();
5244
    }
5245
 
5246
    public void write(TProtocol oprot) throws TException {
5247
      oprot.writeStructBegin(STRUCT_DESC);
5248
 
5249
      if (this.isSetSuccess()) {
5250
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5251
        this.success.write(oprot);
5252
        oprot.writeFieldEnd();
553 chandransh 5253
      } else if (this.isSetUcex()) {
5254
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5255
        this.ucex.write(oprot);
48 ashish 5256
        oprot.writeFieldEnd();
5257
      }
5258
      oprot.writeFieldStop();
5259
      oprot.writeStructEnd();
5260
    }
5261
 
5262
    @Override
5263
    public String toString() {
553 chandransh 5264
      StringBuilder sb = new StringBuilder("createUser_result(");
48 ashish 5265
      boolean first = true;
5266
 
5267
      sb.append("success:");
5268
      if (this.success == null) {
5269
        sb.append("null");
5270
      } else {
5271
        sb.append(this.success);
5272
      }
5273
      first = false;
5274
      if (!first) sb.append(", ");
553 chandransh 5275
      sb.append("ucex:");
5276
      if (this.ucex == null) {
48 ashish 5277
        sb.append("null");
5278
      } else {
553 chandransh 5279
        sb.append(this.ucex);
48 ashish 5280
      }
5281
      first = false;
5282
      sb.append(")");
5283
      return sb.toString();
5284
    }
5285
 
5286
    public void validate() throws TException {
5287
      // check for required fields
5288
    }
5289
 
5290
  }
5291
 
571 rajveer 5292
  public static class updateUser_args implements TBase<updateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_args>   {
553 chandransh 5293
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_args");
48 ashish 5294
 
553 chandransh 5295
    private static final TField USER_FIELD_DESC = new TField("user", TType.STRUCT, (short)1);
48 ashish 5296
 
553 chandransh 5297
    private User user;
48 ashish 5298
 
5299
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5300
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5301
      USER((short)1, "user");
48 ashish 5302
 
5303
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5304
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5305
 
5306
      static {
5307
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5308
          byId.put((int)field._thriftId, field);
5309
          byName.put(field.getFieldName(), field);
5310
        }
5311
      }
5312
 
5313
      /**
5314
       * Find the _Fields constant that matches fieldId, or null if its not found.
5315
       */
5316
      public static _Fields findByThriftId(int fieldId) {
5317
        return byId.get(fieldId);
5318
      }
5319
 
5320
      /**
5321
       * Find the _Fields constant that matches fieldId, throwing an exception
5322
       * if it is not found.
5323
       */
5324
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5325
        _Fields fields = findByThriftId(fieldId);
5326
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5327
        return fields;
5328
      }
5329
 
5330
      /**
5331
       * Find the _Fields constant that matches name, or null if its not found.
5332
       */
5333
      public static _Fields findByName(String name) {
5334
        return byName.get(name);
5335
      }
5336
 
5337
      private final short _thriftId;
5338
      private final String _fieldName;
5339
 
5340
      _Fields(short thriftId, String fieldName) {
5341
        _thriftId = thriftId;
5342
        _fieldName = fieldName;
5343
      }
5344
 
5345
      public short getThriftFieldId() {
5346
        return _thriftId;
5347
      }
5348
 
5349
      public String getFieldName() {
5350
        return _fieldName;
5351
      }
5352
    }
5353
 
5354
    // isset id assignments
5355
 
5356
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 5357
      put(_Fields.USER, new FieldMetaData("user", TFieldRequirementType.DEFAULT, 
5358
          new StructMetaData(TType.STRUCT, User.class)));
48 ashish 5359
    }});
5360
 
5361
    static {
553 chandransh 5362
      FieldMetaData.addStructMetaDataMap(updateUser_args.class, metaDataMap);
48 ashish 5363
    }
5364
 
553 chandransh 5365
    public updateUser_args() {
48 ashish 5366
    }
5367
 
553 chandransh 5368
    public updateUser_args(
5369
      User user)
48 ashish 5370
    {
5371
      this();
553 chandransh 5372
      this.user = user;
48 ashish 5373
    }
5374
 
5375
    /**
5376
     * Performs a deep copy on <i>other</i>.
5377
     */
553 chandransh 5378
    public updateUser_args(updateUser_args other) {
5379
      if (other.isSetUser()) {
5380
        this.user = new User(other.user);
5381
      }
48 ashish 5382
    }
5383
 
553 chandransh 5384
    public updateUser_args deepCopy() {
5385
      return new updateUser_args(this);
48 ashish 5386
    }
5387
 
5388
    @Deprecated
553 chandransh 5389
    public updateUser_args clone() {
5390
      return new updateUser_args(this);
48 ashish 5391
    }
5392
 
553 chandransh 5393
    public User getUser() {
5394
      return this.user;
48 ashish 5395
    }
5396
 
553 chandransh 5397
    public updateUser_args setUser(User user) {
5398
      this.user = user;
48 ashish 5399
      return this;
5400
    }
5401
 
553 chandransh 5402
    public void unsetUser() {
5403
      this.user = null;
48 ashish 5404
    }
5405
 
553 chandransh 5406
    /** Returns true if field user is set (has been asigned a value) and false otherwise */
5407
    public boolean isSetUser() {
5408
      return this.user != null;
48 ashish 5409
    }
5410
 
553 chandransh 5411
    public void setUserIsSet(boolean value) {
5412
      if (!value) {
5413
        this.user = null;
5414
      }
48 ashish 5415
    }
5416
 
5417
    public void setFieldValue(_Fields field, Object value) {
5418
      switch (field) {
553 chandransh 5419
      case USER:
48 ashish 5420
        if (value == null) {
553 chandransh 5421
          unsetUser();
48 ashish 5422
        } else {
553 chandransh 5423
          setUser((User)value);
48 ashish 5424
        }
5425
        break;
5426
 
5427
      }
5428
    }
5429
 
5430
    public void setFieldValue(int fieldID, Object value) {
5431
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5432
    }
5433
 
5434
    public Object getFieldValue(_Fields field) {
5435
      switch (field) {
553 chandransh 5436
      case USER:
5437
        return getUser();
48 ashish 5438
 
5439
      }
5440
      throw new IllegalStateException();
5441
    }
5442
 
5443
    public Object getFieldValue(int fieldId) {
5444
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5445
    }
5446
 
5447
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5448
    public boolean isSet(_Fields field) {
5449
      switch (field) {
553 chandransh 5450
      case USER:
5451
        return isSetUser();
48 ashish 5452
      }
5453
      throw new IllegalStateException();
5454
    }
5455
 
5456
    public boolean isSet(int fieldID) {
5457
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5458
    }
5459
 
5460
    @Override
5461
    public boolean equals(Object that) {
5462
      if (that == null)
5463
        return false;
553 chandransh 5464
      if (that instanceof updateUser_args)
5465
        return this.equals((updateUser_args)that);
48 ashish 5466
      return false;
5467
    }
5468
 
553 chandransh 5469
    public boolean equals(updateUser_args that) {
48 ashish 5470
      if (that == null)
5471
        return false;
5472
 
553 chandransh 5473
      boolean this_present_user = true && this.isSetUser();
5474
      boolean that_present_user = true && that.isSetUser();
5475
      if (this_present_user || that_present_user) {
5476
        if (!(this_present_user && that_present_user))
48 ashish 5477
          return false;
553 chandransh 5478
        if (!this.user.equals(that.user))
48 ashish 5479
          return false;
5480
      }
5481
 
5482
      return true;
5483
    }
5484
 
5485
    @Override
5486
    public int hashCode() {
5487
      return 0;
5488
    }
5489
 
571 rajveer 5490
    public int compareTo(updateUser_args other) {
5491
      if (!getClass().equals(other.getClass())) {
5492
        return getClass().getName().compareTo(other.getClass().getName());
5493
      }
5494
 
5495
      int lastComparison = 0;
5496
      updateUser_args typedOther = (updateUser_args)other;
5497
 
5498
      lastComparison = Boolean.valueOf(isSetUser()).compareTo(isSetUser());
5499
      if (lastComparison != 0) {
5500
        return lastComparison;
5501
      }
5502
      lastComparison = TBaseHelper.compareTo(user, typedOther.user);
5503
      if (lastComparison != 0) {
5504
        return lastComparison;
5505
      }
5506
      return 0;
5507
    }
5508
 
48 ashish 5509
    public void read(TProtocol iprot) throws TException {
5510
      TField field;
5511
      iprot.readStructBegin();
5512
      while (true)
5513
      {
5514
        field = iprot.readFieldBegin();
5515
        if (field.type == TType.STOP) { 
5516
          break;
5517
        }
5518
        _Fields fieldId = _Fields.findByThriftId(field.id);
5519
        if (fieldId == null) {
5520
          TProtocolUtil.skip(iprot, field.type);
5521
        } else {
5522
          switch (fieldId) {
553 chandransh 5523
            case USER:
5524
              if (field.type == TType.STRUCT) {
5525
                this.user = new User();
5526
                this.user.read(iprot);
48 ashish 5527
              } else { 
5528
                TProtocolUtil.skip(iprot, field.type);
5529
              }
5530
              break;
5531
          }
5532
          iprot.readFieldEnd();
5533
        }
5534
      }
5535
      iprot.readStructEnd();
5536
      validate();
5537
    }
5538
 
5539
    public void write(TProtocol oprot) throws TException {
5540
      validate();
5541
 
5542
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 5543
      if (this.user != null) {
5544
        oprot.writeFieldBegin(USER_FIELD_DESC);
5545
        this.user.write(oprot);
5546
        oprot.writeFieldEnd();
5547
      }
48 ashish 5548
      oprot.writeFieldStop();
5549
      oprot.writeStructEnd();
5550
    }
5551
 
5552
    @Override
5553
    public String toString() {
553 chandransh 5554
      StringBuilder sb = new StringBuilder("updateUser_args(");
48 ashish 5555
      boolean first = true;
5556
 
553 chandransh 5557
      sb.append("user:");
5558
      if (this.user == null) {
5559
        sb.append("null");
5560
      } else {
5561
        sb.append(this.user);
5562
      }
48 ashish 5563
      first = false;
5564
      sb.append(")");
5565
      return sb.toString();
5566
    }
5567
 
5568
    public void validate() throws TException {
5569
      // check for required fields
5570
    }
5571
 
5572
  }
5573
 
571 rajveer 5574
  public static class updateUser_result implements TBase<updateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateUser_result>   {
553 chandransh 5575
    private static final TStruct STRUCT_DESC = new TStruct("updateUser_result");
48 ashish 5576
 
5577
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 5578
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 5579
 
553 chandransh 5580
    private User success;
5581
    private UserContextException ucex;
48 ashish 5582
 
5583
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5584
    public enum _Fields implements TFieldIdEnum {
5585
      SUCCESS((short)0, "success"),
553 chandransh 5586
      UCEX((short)1, "ucex");
48 ashish 5587
 
5588
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5589
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5590
 
5591
      static {
5592
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5593
          byId.put((int)field._thriftId, field);
5594
          byName.put(field.getFieldName(), field);
5595
        }
5596
      }
5597
 
5598
      /**
5599
       * Find the _Fields constant that matches fieldId, or null if its not found.
5600
       */
5601
      public static _Fields findByThriftId(int fieldId) {
5602
        return byId.get(fieldId);
5603
      }
5604
 
5605
      /**
5606
       * Find the _Fields constant that matches fieldId, throwing an exception
5607
       * if it is not found.
5608
       */
5609
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5610
        _Fields fields = findByThriftId(fieldId);
5611
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5612
        return fields;
5613
      }
5614
 
5615
      /**
5616
       * Find the _Fields constant that matches name, or null if its not found.
5617
       */
5618
      public static _Fields findByName(String name) {
5619
        return byName.get(name);
5620
      }
5621
 
5622
      private final short _thriftId;
5623
      private final String _fieldName;
5624
 
5625
      _Fields(short thriftId, String fieldName) {
5626
        _thriftId = thriftId;
5627
        _fieldName = fieldName;
5628
      }
5629
 
5630
      public short getThriftFieldId() {
5631
        return _thriftId;
5632
      }
5633
 
5634
      public String getFieldName() {
5635
        return _fieldName;
5636
      }
5637
    }
5638
 
5639
    // isset id assignments
5640
 
5641
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5642
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 5643
          new StructMetaData(TType.STRUCT, User.class)));
5644
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 5645
          new FieldValueMetaData(TType.STRUCT)));
5646
    }});
5647
 
5648
    static {
553 chandransh 5649
      FieldMetaData.addStructMetaDataMap(updateUser_result.class, metaDataMap);
48 ashish 5650
    }
5651
 
553 chandransh 5652
    public updateUser_result() {
48 ashish 5653
    }
5654
 
553 chandransh 5655
    public updateUser_result(
5656
      User success,
5657
      UserContextException ucex)
48 ashish 5658
    {
5659
      this();
5660
      this.success = success;
553 chandransh 5661
      this.ucex = ucex;
48 ashish 5662
    }
5663
 
5664
    /**
5665
     * Performs a deep copy on <i>other</i>.
5666
     */
553 chandransh 5667
    public updateUser_result(updateUser_result other) {
48 ashish 5668
      if (other.isSetSuccess()) {
553 chandransh 5669
        this.success = new User(other.success);
48 ashish 5670
      }
553 chandransh 5671
      if (other.isSetUcex()) {
5672
        this.ucex = new UserContextException(other.ucex);
48 ashish 5673
      }
5674
    }
5675
 
553 chandransh 5676
    public updateUser_result deepCopy() {
5677
      return new updateUser_result(this);
48 ashish 5678
    }
5679
 
5680
    @Deprecated
553 chandransh 5681
    public updateUser_result clone() {
5682
      return new updateUser_result(this);
48 ashish 5683
    }
5684
 
553 chandransh 5685
    public User getSuccess() {
48 ashish 5686
      return this.success;
5687
    }
5688
 
553 chandransh 5689
    public updateUser_result setSuccess(User success) {
48 ashish 5690
      this.success = success;
5691
      return this;
5692
    }
5693
 
5694
    public void unsetSuccess() {
5695
      this.success = null;
5696
    }
5697
 
5698
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5699
    public boolean isSetSuccess() {
5700
      return this.success != null;
5701
    }
5702
 
5703
    public void setSuccessIsSet(boolean value) {
5704
      if (!value) {
5705
        this.success = null;
5706
      }
5707
    }
5708
 
553 chandransh 5709
    public UserContextException getUcex() {
5710
      return this.ucex;
48 ashish 5711
    }
5712
 
553 chandransh 5713
    public updateUser_result setUcex(UserContextException ucex) {
5714
      this.ucex = ucex;
48 ashish 5715
      return this;
5716
    }
5717
 
553 chandransh 5718
    public void unsetUcex() {
5719
      this.ucex = null;
48 ashish 5720
    }
5721
 
553 chandransh 5722
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
5723
    public boolean isSetUcex() {
5724
      return this.ucex != null;
48 ashish 5725
    }
5726
 
553 chandransh 5727
    public void setUcexIsSet(boolean value) {
48 ashish 5728
      if (!value) {
553 chandransh 5729
        this.ucex = null;
48 ashish 5730
      }
5731
    }
5732
 
5733
    public void setFieldValue(_Fields field, Object value) {
5734
      switch (field) {
5735
      case SUCCESS:
5736
        if (value == null) {
5737
          unsetSuccess();
5738
        } else {
553 chandransh 5739
          setSuccess((User)value);
48 ashish 5740
        }
5741
        break;
5742
 
553 chandransh 5743
      case UCEX:
48 ashish 5744
        if (value == null) {
553 chandransh 5745
          unsetUcex();
48 ashish 5746
        } else {
553 chandransh 5747
          setUcex((UserContextException)value);
48 ashish 5748
        }
5749
        break;
5750
 
5751
      }
5752
    }
5753
 
5754
    public void setFieldValue(int fieldID, Object value) {
5755
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5756
    }
5757
 
5758
    public Object getFieldValue(_Fields field) {
5759
      switch (field) {
5760
      case SUCCESS:
5761
        return getSuccess();
5762
 
553 chandransh 5763
      case UCEX:
5764
        return getUcex();
48 ashish 5765
 
5766
      }
5767
      throw new IllegalStateException();
5768
    }
5769
 
5770
    public Object getFieldValue(int fieldId) {
5771
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5772
    }
5773
 
5774
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5775
    public boolean isSet(_Fields field) {
5776
      switch (field) {
5777
      case SUCCESS:
5778
        return isSetSuccess();
553 chandransh 5779
      case UCEX:
5780
        return isSetUcex();
48 ashish 5781
      }
5782
      throw new IllegalStateException();
5783
    }
5784
 
5785
    public boolean isSet(int fieldID) {
5786
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5787
    }
5788
 
5789
    @Override
5790
    public boolean equals(Object that) {
5791
      if (that == null)
5792
        return false;
553 chandransh 5793
      if (that instanceof updateUser_result)
5794
        return this.equals((updateUser_result)that);
48 ashish 5795
      return false;
5796
    }
5797
 
553 chandransh 5798
    public boolean equals(updateUser_result that) {
48 ashish 5799
      if (that == null)
5800
        return false;
5801
 
5802
      boolean this_present_success = true && this.isSetSuccess();
5803
      boolean that_present_success = true && that.isSetSuccess();
5804
      if (this_present_success || that_present_success) {
5805
        if (!(this_present_success && that_present_success))
5806
          return false;
5807
        if (!this.success.equals(that.success))
5808
          return false;
5809
      }
5810
 
553 chandransh 5811
      boolean this_present_ucex = true && this.isSetUcex();
5812
      boolean that_present_ucex = true && that.isSetUcex();
5813
      if (this_present_ucex || that_present_ucex) {
5814
        if (!(this_present_ucex && that_present_ucex))
48 ashish 5815
          return false;
553 chandransh 5816
        if (!this.ucex.equals(that.ucex))
48 ashish 5817
          return false;
5818
      }
5819
 
5820
      return true;
5821
    }
5822
 
5823
    @Override
5824
    public int hashCode() {
5825
      return 0;
5826
    }
5827
 
571 rajveer 5828
    public int compareTo(updateUser_result other) {
5829
      if (!getClass().equals(other.getClass())) {
5830
        return getClass().getName().compareTo(other.getClass().getName());
5831
      }
5832
 
5833
      int lastComparison = 0;
5834
      updateUser_result typedOther = (updateUser_result)other;
5835
 
5836
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5837
      if (lastComparison != 0) {
5838
        return lastComparison;
5839
      }
5840
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5841
      if (lastComparison != 0) {
5842
        return lastComparison;
5843
      }
5844
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
5845
      if (lastComparison != 0) {
5846
        return lastComparison;
5847
      }
5848
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
5849
      if (lastComparison != 0) {
5850
        return lastComparison;
5851
      }
5852
      return 0;
5853
    }
5854
 
48 ashish 5855
    public void read(TProtocol iprot) throws TException {
5856
      TField field;
5857
      iprot.readStructBegin();
5858
      while (true)
5859
      {
5860
        field = iprot.readFieldBegin();
5861
        if (field.type == TType.STOP) { 
5862
          break;
5863
        }
5864
        _Fields fieldId = _Fields.findByThriftId(field.id);
5865
        if (fieldId == null) {
5866
          TProtocolUtil.skip(iprot, field.type);
5867
        } else {
5868
          switch (fieldId) {
5869
            case SUCCESS:
5870
              if (field.type == TType.STRUCT) {
553 chandransh 5871
                this.success = new User();
48 ashish 5872
                this.success.read(iprot);
5873
              } else { 
5874
                TProtocolUtil.skip(iprot, field.type);
5875
              }
5876
              break;
553 chandransh 5877
            case UCEX:
48 ashish 5878
              if (field.type == TType.STRUCT) {
553 chandransh 5879
                this.ucex = new UserContextException();
5880
                this.ucex.read(iprot);
48 ashish 5881
              } else { 
5882
                TProtocolUtil.skip(iprot, field.type);
5883
              }
5884
              break;
5885
          }
5886
          iprot.readFieldEnd();
5887
        }
5888
      }
5889
      iprot.readStructEnd();
5890
      validate();
5891
    }
5892
 
5893
    public void write(TProtocol oprot) throws TException {
5894
      oprot.writeStructBegin(STRUCT_DESC);
5895
 
5896
      if (this.isSetSuccess()) {
5897
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5898
        this.success.write(oprot);
5899
        oprot.writeFieldEnd();
553 chandransh 5900
      } else if (this.isSetUcex()) {
5901
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
5902
        this.ucex.write(oprot);
48 ashish 5903
        oprot.writeFieldEnd();
5904
      }
5905
      oprot.writeFieldStop();
5906
      oprot.writeStructEnd();
5907
    }
5908
 
5909
    @Override
5910
    public String toString() {
553 chandransh 5911
      StringBuilder sb = new StringBuilder("updateUser_result(");
48 ashish 5912
      boolean first = true;
5913
 
5914
      sb.append("success:");
5915
      if (this.success == null) {
5916
        sb.append("null");
5917
      } else {
5918
        sb.append(this.success);
5919
      }
5920
      first = false;
5921
      if (!first) sb.append(", ");
553 chandransh 5922
      sb.append("ucex:");
5923
      if (this.ucex == null) {
48 ashish 5924
        sb.append("null");
5925
      } else {
553 chandransh 5926
        sb.append(this.ucex);
48 ashish 5927
      }
5928
      first = false;
5929
      sb.append(")");
5930
      return sb.toString();
5931
    }
5932
 
5933
    public void validate() throws TException {
5934
      // check for required fields
5935
    }
5936
 
5937
  }
5938
 
553 chandransh 5939
  public static class deleteUser_args implements TBase<deleteUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_args>   {
5940
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_args");
48 ashish 5941
 
5942
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
5943
 
5944
    private long userId;
5945
 
5946
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5947
    public enum _Fields implements TFieldIdEnum {
553 chandransh 5948
      USER_ID((short)1, "userId");
48 ashish 5949
 
5950
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5952
 
5953
      static {
5954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5955
          byId.put((int)field._thriftId, field);
5956
          byName.put(field.getFieldName(), field);
5957
        }
5958
      }
5959
 
5960
      /**
5961
       * Find the _Fields constant that matches fieldId, or null if its not found.
5962
       */
5963
      public static _Fields findByThriftId(int fieldId) {
5964
        return byId.get(fieldId);
5965
      }
5966
 
5967
      /**
5968
       * Find the _Fields constant that matches fieldId, throwing an exception
5969
       * if it is not found.
5970
       */
5971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5972
        _Fields fields = findByThriftId(fieldId);
5973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5974
        return fields;
5975
      }
5976
 
5977
      /**
5978
       * Find the _Fields constant that matches name, or null if its not found.
5979
       */
5980
      public static _Fields findByName(String name) {
5981
        return byName.get(name);
5982
      }
5983
 
5984
      private final short _thriftId;
5985
      private final String _fieldName;
5986
 
5987
      _Fields(short thriftId, String fieldName) {
5988
        _thriftId = thriftId;
5989
        _fieldName = fieldName;
5990
      }
5991
 
5992
      public short getThriftFieldId() {
5993
        return _thriftId;
5994
      }
5995
 
5996
      public String getFieldName() {
5997
        return _fieldName;
5998
      }
5999
    }
6000
 
6001
    // isset id assignments
6002
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6003
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6004
 
6005
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6006
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6007
          new FieldValueMetaData(TType.I64)));
6008
    }});
6009
 
6010
    static {
553 chandransh 6011
      FieldMetaData.addStructMetaDataMap(deleteUser_args.class, metaDataMap);
48 ashish 6012
    }
6013
 
553 chandransh 6014
    public deleteUser_args() {
48 ashish 6015
    }
6016
 
553 chandransh 6017
    public deleteUser_args(
6018
      long userId)
48 ashish 6019
    {
6020
      this();
6021
      this.userId = userId;
6022
      setUserIdIsSet(true);
6023
    }
6024
 
6025
    /**
6026
     * Performs a deep copy on <i>other</i>.
6027
     */
553 chandransh 6028
    public deleteUser_args(deleteUser_args other) {
48 ashish 6029
      __isset_bit_vector.clear();
6030
      __isset_bit_vector.or(other.__isset_bit_vector);
6031
      this.userId = other.userId;
6032
    }
6033
 
553 chandransh 6034
    public deleteUser_args deepCopy() {
6035
      return new deleteUser_args(this);
48 ashish 6036
    }
6037
 
6038
    @Deprecated
553 chandransh 6039
    public deleteUser_args clone() {
6040
      return new deleteUser_args(this);
48 ashish 6041
    }
6042
 
6043
    public long getUserId() {
6044
      return this.userId;
6045
    }
6046
 
553 chandransh 6047
    public deleteUser_args setUserId(long userId) {
48 ashish 6048
      this.userId = userId;
6049
      setUserIdIsSet(true);
6050
      return this;
6051
    }
6052
 
6053
    public void unsetUserId() {
6054
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6055
    }
6056
 
6057
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6058
    public boolean isSetUserId() {
6059
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6060
    }
6061
 
6062
    public void setUserIdIsSet(boolean value) {
6063
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6064
    }
6065
 
6066
    public void setFieldValue(_Fields field, Object value) {
6067
      switch (field) {
6068
      case USER_ID:
6069
        if (value == null) {
6070
          unsetUserId();
6071
        } else {
6072
          setUserId((Long)value);
6073
        }
6074
        break;
6075
 
6076
      }
6077
    }
6078
 
6079
    public void setFieldValue(int fieldID, Object value) {
6080
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6081
    }
6082
 
6083
    public Object getFieldValue(_Fields field) {
6084
      switch (field) {
6085
      case USER_ID:
6086
        return new Long(getUserId());
6087
 
6088
      }
6089
      throw new IllegalStateException();
6090
    }
6091
 
6092
    public Object getFieldValue(int fieldId) {
6093
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6094
    }
6095
 
6096
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6097
    public boolean isSet(_Fields field) {
6098
      switch (field) {
6099
      case USER_ID:
6100
        return isSetUserId();
6101
      }
6102
      throw new IllegalStateException();
6103
    }
6104
 
6105
    public boolean isSet(int fieldID) {
6106
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6107
    }
6108
 
6109
    @Override
6110
    public boolean equals(Object that) {
6111
      if (that == null)
6112
        return false;
553 chandransh 6113
      if (that instanceof deleteUser_args)
6114
        return this.equals((deleteUser_args)that);
48 ashish 6115
      return false;
6116
    }
6117
 
553 chandransh 6118
    public boolean equals(deleteUser_args that) {
48 ashish 6119
      if (that == null)
6120
        return false;
6121
 
6122
      boolean this_present_userId = true;
6123
      boolean that_present_userId = true;
6124
      if (this_present_userId || that_present_userId) {
6125
        if (!(this_present_userId && that_present_userId))
6126
          return false;
6127
        if (this.userId != that.userId)
6128
          return false;
6129
      }
6130
 
6131
      return true;
6132
    }
6133
 
6134
    @Override
6135
    public int hashCode() {
6136
      return 0;
6137
    }
6138
 
553 chandransh 6139
    public int compareTo(deleteUser_args other) {
48 ashish 6140
      if (!getClass().equals(other.getClass())) {
6141
        return getClass().getName().compareTo(other.getClass().getName());
6142
      }
6143
 
6144
      int lastComparison = 0;
553 chandransh 6145
      deleteUser_args typedOther = (deleteUser_args)other;
48 ashish 6146
 
6147
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6148
      if (lastComparison != 0) {
6149
        return lastComparison;
6150
      }
6151
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6152
      if (lastComparison != 0) {
6153
        return lastComparison;
6154
      }
6155
      return 0;
6156
    }
6157
 
6158
    public void read(TProtocol iprot) throws TException {
6159
      TField field;
6160
      iprot.readStructBegin();
6161
      while (true)
6162
      {
6163
        field = iprot.readFieldBegin();
6164
        if (field.type == TType.STOP) { 
6165
          break;
6166
        }
6167
        _Fields fieldId = _Fields.findByThriftId(field.id);
6168
        if (fieldId == null) {
6169
          TProtocolUtil.skip(iprot, field.type);
6170
        } else {
6171
          switch (fieldId) {
6172
            case USER_ID:
6173
              if (field.type == TType.I64) {
6174
                this.userId = iprot.readI64();
6175
                setUserIdIsSet(true);
6176
              } else { 
6177
                TProtocolUtil.skip(iprot, field.type);
6178
              }
6179
              break;
6180
          }
6181
          iprot.readFieldEnd();
6182
        }
6183
      }
6184
      iprot.readStructEnd();
6185
      validate();
6186
    }
6187
 
6188
    public void write(TProtocol oprot) throws TException {
6189
      validate();
6190
 
6191
      oprot.writeStructBegin(STRUCT_DESC);
6192
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6193
      oprot.writeI64(this.userId);
6194
      oprot.writeFieldEnd();
6195
      oprot.writeFieldStop();
6196
      oprot.writeStructEnd();
6197
    }
6198
 
6199
    @Override
6200
    public String toString() {
553 chandransh 6201
      StringBuilder sb = new StringBuilder("deleteUser_args(");
48 ashish 6202
      boolean first = true;
6203
 
6204
      sb.append("userId:");
6205
      sb.append(this.userId);
6206
      first = false;
6207
      sb.append(")");
6208
      return sb.toString();
6209
    }
6210
 
6211
    public void validate() throws TException {
6212
      // check for required fields
6213
    }
6214
 
6215
  }
6216
 
553 chandransh 6217
  public static class deleteUser_result implements TBase<deleteUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteUser_result>   {
6218
    private static final TStruct STRUCT_DESC = new TStruct("deleteUser_result");
48 ashish 6219
 
553 chandransh 6220
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6221
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6222
 
553 chandransh 6223
    private boolean success;
6224
    private UserContextException ucex;
48 ashish 6225
 
6226
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6227
    public enum _Fields implements TFieldIdEnum {
6228
      SUCCESS((short)0, "success"),
553 chandransh 6229
      UCEX((short)1, "ucex");
48 ashish 6230
 
6231
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6232
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6233
 
6234
      static {
6235
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6236
          byId.put((int)field._thriftId, field);
6237
          byName.put(field.getFieldName(), field);
6238
        }
6239
      }
6240
 
6241
      /**
6242
       * Find the _Fields constant that matches fieldId, or null if its not found.
6243
       */
6244
      public static _Fields findByThriftId(int fieldId) {
6245
        return byId.get(fieldId);
6246
      }
6247
 
6248
      /**
6249
       * Find the _Fields constant that matches fieldId, throwing an exception
6250
       * if it is not found.
6251
       */
6252
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6253
        _Fields fields = findByThriftId(fieldId);
6254
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6255
        return fields;
6256
      }
6257
 
6258
      /**
6259
       * Find the _Fields constant that matches name, or null if its not found.
6260
       */
6261
      public static _Fields findByName(String name) {
6262
        return byName.get(name);
6263
      }
6264
 
6265
      private final short _thriftId;
6266
      private final String _fieldName;
6267
 
6268
      _Fields(short thriftId, String fieldName) {
6269
        _thriftId = thriftId;
6270
        _fieldName = fieldName;
6271
      }
6272
 
6273
      public short getThriftFieldId() {
6274
        return _thriftId;
6275
      }
6276
 
6277
      public String getFieldName() {
6278
        return _fieldName;
6279
      }
6280
    }
6281
 
6282
    // isset id assignments
553 chandransh 6283
    private static final int __SUCCESS_ISSET_ID = 0;
6284
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6285
 
6286
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6287
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6288
          new FieldValueMetaData(TType.BOOL)));
6289
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6290
          new FieldValueMetaData(TType.STRUCT)));
6291
    }});
6292
 
6293
    static {
553 chandransh 6294
      FieldMetaData.addStructMetaDataMap(deleteUser_result.class, metaDataMap);
48 ashish 6295
    }
6296
 
553 chandransh 6297
    public deleteUser_result() {
48 ashish 6298
    }
6299
 
553 chandransh 6300
    public deleteUser_result(
6301
      boolean success,
6302
      UserContextException ucex)
48 ashish 6303
    {
6304
      this();
6305
      this.success = success;
553 chandransh 6306
      setSuccessIsSet(true);
6307
      this.ucex = ucex;
48 ashish 6308
    }
6309
 
6310
    /**
6311
     * Performs a deep copy on <i>other</i>.
6312
     */
553 chandransh 6313
    public deleteUser_result(deleteUser_result other) {
6314
      __isset_bit_vector.clear();
6315
      __isset_bit_vector.or(other.__isset_bit_vector);
6316
      this.success = other.success;
6317
      if (other.isSetUcex()) {
6318
        this.ucex = new UserContextException(other.ucex);
48 ashish 6319
      }
6320
    }
6321
 
553 chandransh 6322
    public deleteUser_result deepCopy() {
6323
      return new deleteUser_result(this);
48 ashish 6324
    }
6325
 
6326
    @Deprecated
553 chandransh 6327
    public deleteUser_result clone() {
6328
      return new deleteUser_result(this);
48 ashish 6329
    }
6330
 
553 chandransh 6331
    public boolean isSuccess() {
48 ashish 6332
      return this.success;
6333
    }
6334
 
553 chandransh 6335
    public deleteUser_result setSuccess(boolean success) {
48 ashish 6336
      this.success = success;
553 chandransh 6337
      setSuccessIsSet(true);
48 ashish 6338
      return this;
6339
    }
6340
 
6341
    public void unsetSuccess() {
553 chandransh 6342
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
48 ashish 6343
    }
6344
 
6345
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6346
    public boolean isSetSuccess() {
553 chandransh 6347
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
48 ashish 6348
    }
6349
 
6350
    public void setSuccessIsSet(boolean value) {
553 chandransh 6351
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
48 ashish 6352
    }
6353
 
553 chandransh 6354
    public UserContextException getUcex() {
6355
      return this.ucex;
48 ashish 6356
    }
6357
 
553 chandransh 6358
    public deleteUser_result setUcex(UserContextException ucex) {
6359
      this.ucex = ucex;
48 ashish 6360
      return this;
6361
    }
6362
 
553 chandransh 6363
    public void unsetUcex() {
6364
      this.ucex = null;
48 ashish 6365
    }
6366
 
553 chandransh 6367
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
6368
    public boolean isSetUcex() {
6369
      return this.ucex != null;
48 ashish 6370
    }
6371
 
553 chandransh 6372
    public void setUcexIsSet(boolean value) {
48 ashish 6373
      if (!value) {
553 chandransh 6374
        this.ucex = null;
48 ashish 6375
      }
6376
    }
6377
 
6378
    public void setFieldValue(_Fields field, Object value) {
6379
      switch (field) {
6380
      case SUCCESS:
6381
        if (value == null) {
6382
          unsetSuccess();
6383
        } else {
553 chandransh 6384
          setSuccess((Boolean)value);
48 ashish 6385
        }
6386
        break;
6387
 
553 chandransh 6388
      case UCEX:
48 ashish 6389
        if (value == null) {
553 chandransh 6390
          unsetUcex();
48 ashish 6391
        } else {
553 chandransh 6392
          setUcex((UserContextException)value);
48 ashish 6393
        }
6394
        break;
6395
 
6396
      }
6397
    }
6398
 
6399
    public void setFieldValue(int fieldID, Object value) {
6400
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6401
    }
6402
 
6403
    public Object getFieldValue(_Fields field) {
6404
      switch (field) {
6405
      case SUCCESS:
553 chandransh 6406
        return new Boolean(isSuccess());
48 ashish 6407
 
553 chandransh 6408
      case UCEX:
6409
        return getUcex();
48 ashish 6410
 
6411
      }
6412
      throw new IllegalStateException();
6413
    }
6414
 
6415
    public Object getFieldValue(int fieldId) {
6416
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6417
    }
6418
 
6419
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6420
    public boolean isSet(_Fields field) {
6421
      switch (field) {
6422
      case SUCCESS:
6423
        return isSetSuccess();
553 chandransh 6424
      case UCEX:
6425
        return isSetUcex();
48 ashish 6426
      }
6427
      throw new IllegalStateException();
6428
    }
6429
 
6430
    public boolean isSet(int fieldID) {
6431
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6432
    }
6433
 
6434
    @Override
6435
    public boolean equals(Object that) {
6436
      if (that == null)
6437
        return false;
553 chandransh 6438
      if (that instanceof deleteUser_result)
6439
        return this.equals((deleteUser_result)that);
48 ashish 6440
      return false;
6441
    }
6442
 
553 chandransh 6443
    public boolean equals(deleteUser_result that) {
48 ashish 6444
      if (that == null)
6445
        return false;
6446
 
553 chandransh 6447
      boolean this_present_success = true;
6448
      boolean that_present_success = true;
48 ashish 6449
      if (this_present_success || that_present_success) {
6450
        if (!(this_present_success && that_present_success))
6451
          return false;
553 chandransh 6452
        if (this.success != that.success)
48 ashish 6453
          return false;
6454
      }
6455
 
553 chandransh 6456
      boolean this_present_ucex = true && this.isSetUcex();
6457
      boolean that_present_ucex = true && that.isSetUcex();
6458
      if (this_present_ucex || that_present_ucex) {
6459
        if (!(this_present_ucex && that_present_ucex))
48 ashish 6460
          return false;
553 chandransh 6461
        if (!this.ucex.equals(that.ucex))
48 ashish 6462
          return false;
6463
      }
6464
 
6465
      return true;
6466
    }
6467
 
6468
    @Override
6469
    public int hashCode() {
6470
      return 0;
6471
    }
6472
 
553 chandransh 6473
    public int compareTo(deleteUser_result other) {
6474
      if (!getClass().equals(other.getClass())) {
6475
        return getClass().getName().compareTo(other.getClass().getName());
6476
      }
6477
 
6478
      int lastComparison = 0;
6479
      deleteUser_result typedOther = (deleteUser_result)other;
6480
 
6481
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6482
      if (lastComparison != 0) {
6483
        return lastComparison;
6484
      }
6485
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6486
      if (lastComparison != 0) {
6487
        return lastComparison;
6488
      }
6489
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
6490
      if (lastComparison != 0) {
6491
        return lastComparison;
6492
      }
6493
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
6494
      if (lastComparison != 0) {
6495
        return lastComparison;
6496
      }
6497
      return 0;
6498
    }
6499
 
48 ashish 6500
    public void read(TProtocol iprot) throws TException {
6501
      TField field;
6502
      iprot.readStructBegin();
6503
      while (true)
6504
      {
6505
        field = iprot.readFieldBegin();
6506
        if (field.type == TType.STOP) { 
6507
          break;
6508
        }
6509
        _Fields fieldId = _Fields.findByThriftId(field.id);
6510
        if (fieldId == null) {
6511
          TProtocolUtil.skip(iprot, field.type);
6512
        } else {
6513
          switch (fieldId) {
6514
            case SUCCESS:
553 chandransh 6515
              if (field.type == TType.BOOL) {
6516
                this.success = iprot.readBool();
6517
                setSuccessIsSet(true);
48 ashish 6518
              } else { 
6519
                TProtocolUtil.skip(iprot, field.type);
6520
              }
6521
              break;
553 chandransh 6522
            case UCEX:
48 ashish 6523
              if (field.type == TType.STRUCT) {
553 chandransh 6524
                this.ucex = new UserContextException();
6525
                this.ucex.read(iprot);
48 ashish 6526
              } else { 
6527
                TProtocolUtil.skip(iprot, field.type);
6528
              }
6529
              break;
6530
          }
6531
          iprot.readFieldEnd();
6532
        }
6533
      }
6534
      iprot.readStructEnd();
6535
      validate();
6536
    }
6537
 
6538
    public void write(TProtocol oprot) throws TException {
6539
      oprot.writeStructBegin(STRUCT_DESC);
6540
 
6541
      if (this.isSetSuccess()) {
6542
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 6543
        oprot.writeBool(this.success);
48 ashish 6544
        oprot.writeFieldEnd();
553 chandransh 6545
      } else if (this.isSetUcex()) {
6546
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
6547
        this.ucex.write(oprot);
48 ashish 6548
        oprot.writeFieldEnd();
6549
      }
6550
      oprot.writeFieldStop();
6551
      oprot.writeStructEnd();
6552
    }
6553
 
6554
    @Override
6555
    public String toString() {
553 chandransh 6556
      StringBuilder sb = new StringBuilder("deleteUser_result(");
48 ashish 6557
      boolean first = true;
6558
 
6559
      sb.append("success:");
553 chandransh 6560
      sb.append(this.success);
48 ashish 6561
      first = false;
6562
      if (!first) sb.append(", ");
553 chandransh 6563
      sb.append("ucex:");
6564
      if (this.ucex == null) {
48 ashish 6565
        sb.append("null");
6566
      } else {
553 chandransh 6567
        sb.append(this.ucex);
48 ashish 6568
      }
6569
      first = false;
6570
      sb.append(")");
6571
      return sb.toString();
6572
    }
6573
 
6574
    public void validate() throws TException {
6575
      // check for required fields
6576
    }
6577
 
6578
  }
6579
 
553 chandransh 6580
  public static class getUserState_args implements TBase<getUserState_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_args>   {
6581
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_args");
48 ashish 6582
 
6583
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
6584
 
6585
    private long userId;
6586
 
6587
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6588
    public enum _Fields implements TFieldIdEnum {
553 chandransh 6589
      USER_ID((short)1, "userId");
48 ashish 6590
 
6591
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6592
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6593
 
6594
      static {
6595
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6596
          byId.put((int)field._thriftId, field);
6597
          byName.put(field.getFieldName(), field);
6598
        }
6599
      }
6600
 
6601
      /**
6602
       * Find the _Fields constant that matches fieldId, or null if its not found.
6603
       */
6604
      public static _Fields findByThriftId(int fieldId) {
6605
        return byId.get(fieldId);
6606
      }
6607
 
6608
      /**
6609
       * Find the _Fields constant that matches fieldId, throwing an exception
6610
       * if it is not found.
6611
       */
6612
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6613
        _Fields fields = findByThriftId(fieldId);
6614
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6615
        return fields;
6616
      }
6617
 
6618
      /**
6619
       * Find the _Fields constant that matches name, or null if its not found.
6620
       */
6621
      public static _Fields findByName(String name) {
6622
        return byName.get(name);
6623
      }
6624
 
6625
      private final short _thriftId;
6626
      private final String _fieldName;
6627
 
6628
      _Fields(short thriftId, String fieldName) {
6629
        _thriftId = thriftId;
6630
        _fieldName = fieldName;
6631
      }
6632
 
6633
      public short getThriftFieldId() {
6634
        return _thriftId;
6635
      }
6636
 
6637
      public String getFieldName() {
6638
        return _fieldName;
6639
      }
6640
    }
6641
 
6642
    // isset id assignments
6643
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 6644
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 6645
 
6646
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6647
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
6648
          new FieldValueMetaData(TType.I64)));
6649
    }});
6650
 
6651
    static {
553 chandransh 6652
      FieldMetaData.addStructMetaDataMap(getUserState_args.class, metaDataMap);
48 ashish 6653
    }
6654
 
553 chandransh 6655
    public getUserState_args() {
48 ashish 6656
    }
6657
 
553 chandransh 6658
    public getUserState_args(
6659
      long userId)
48 ashish 6660
    {
6661
      this();
6662
      this.userId = userId;
6663
      setUserIdIsSet(true);
6664
    }
6665
 
6666
    /**
6667
     * Performs a deep copy on <i>other</i>.
6668
     */
553 chandransh 6669
    public getUserState_args(getUserState_args other) {
48 ashish 6670
      __isset_bit_vector.clear();
6671
      __isset_bit_vector.or(other.__isset_bit_vector);
6672
      this.userId = other.userId;
6673
    }
6674
 
553 chandransh 6675
    public getUserState_args deepCopy() {
6676
      return new getUserState_args(this);
48 ashish 6677
    }
6678
 
6679
    @Deprecated
553 chandransh 6680
    public getUserState_args clone() {
6681
      return new getUserState_args(this);
48 ashish 6682
    }
6683
 
6684
    public long getUserId() {
6685
      return this.userId;
6686
    }
6687
 
553 chandransh 6688
    public getUserState_args setUserId(long userId) {
48 ashish 6689
      this.userId = userId;
6690
      setUserIdIsSet(true);
6691
      return this;
6692
    }
6693
 
6694
    public void unsetUserId() {
6695
      __isset_bit_vector.clear(__USERID_ISSET_ID);
6696
    }
6697
 
6698
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
6699
    public boolean isSetUserId() {
6700
      return __isset_bit_vector.get(__USERID_ISSET_ID);
6701
    }
6702
 
6703
    public void setUserIdIsSet(boolean value) {
6704
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
6705
    }
6706
 
6707
    public void setFieldValue(_Fields field, Object value) {
6708
      switch (field) {
6709
      case USER_ID:
6710
        if (value == null) {
6711
          unsetUserId();
6712
        } else {
6713
          setUserId((Long)value);
6714
        }
6715
        break;
6716
 
6717
      }
6718
    }
6719
 
6720
    public void setFieldValue(int fieldID, Object value) {
6721
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6722
    }
6723
 
6724
    public Object getFieldValue(_Fields field) {
6725
      switch (field) {
6726
      case USER_ID:
6727
        return new Long(getUserId());
6728
 
6729
      }
6730
      throw new IllegalStateException();
6731
    }
6732
 
6733
    public Object getFieldValue(int fieldId) {
6734
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6735
    }
6736
 
6737
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6738
    public boolean isSet(_Fields field) {
6739
      switch (field) {
6740
      case USER_ID:
6741
        return isSetUserId();
6742
      }
6743
      throw new IllegalStateException();
6744
    }
6745
 
6746
    public boolean isSet(int fieldID) {
6747
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6748
    }
6749
 
6750
    @Override
6751
    public boolean equals(Object that) {
6752
      if (that == null)
6753
        return false;
553 chandransh 6754
      if (that instanceof getUserState_args)
6755
        return this.equals((getUserState_args)that);
48 ashish 6756
      return false;
6757
    }
6758
 
553 chandransh 6759
    public boolean equals(getUserState_args that) {
48 ashish 6760
      if (that == null)
6761
        return false;
6762
 
6763
      boolean this_present_userId = true;
6764
      boolean that_present_userId = true;
6765
      if (this_present_userId || that_present_userId) {
6766
        if (!(this_present_userId && that_present_userId))
6767
          return false;
6768
        if (this.userId != that.userId)
6769
          return false;
6770
      }
6771
 
6772
      return true;
6773
    }
6774
 
6775
    @Override
6776
    public int hashCode() {
6777
      return 0;
6778
    }
6779
 
553 chandransh 6780
    public int compareTo(getUserState_args other) {
48 ashish 6781
      if (!getClass().equals(other.getClass())) {
6782
        return getClass().getName().compareTo(other.getClass().getName());
6783
      }
6784
 
6785
      int lastComparison = 0;
553 chandransh 6786
      getUserState_args typedOther = (getUserState_args)other;
48 ashish 6787
 
6788
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
6789
      if (lastComparison != 0) {
6790
        return lastComparison;
6791
      }
6792
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
6793
      if (lastComparison != 0) {
6794
        return lastComparison;
6795
      }
6796
      return 0;
6797
    }
6798
 
6799
    public void read(TProtocol iprot) throws TException {
6800
      TField field;
6801
      iprot.readStructBegin();
6802
      while (true)
6803
      {
6804
        field = iprot.readFieldBegin();
6805
        if (field.type == TType.STOP) { 
6806
          break;
6807
        }
6808
        _Fields fieldId = _Fields.findByThriftId(field.id);
6809
        if (fieldId == null) {
6810
          TProtocolUtil.skip(iprot, field.type);
6811
        } else {
6812
          switch (fieldId) {
6813
            case USER_ID:
6814
              if (field.type == TType.I64) {
6815
                this.userId = iprot.readI64();
6816
                setUserIdIsSet(true);
6817
              } else { 
6818
                TProtocolUtil.skip(iprot, field.type);
6819
              }
6820
              break;
6821
          }
6822
          iprot.readFieldEnd();
6823
        }
6824
      }
6825
      iprot.readStructEnd();
6826
      validate();
6827
    }
6828
 
6829
    public void write(TProtocol oprot) throws TException {
6830
      validate();
6831
 
6832
      oprot.writeStructBegin(STRUCT_DESC);
6833
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
6834
      oprot.writeI64(this.userId);
6835
      oprot.writeFieldEnd();
6836
      oprot.writeFieldStop();
6837
      oprot.writeStructEnd();
6838
    }
6839
 
6840
    @Override
6841
    public String toString() {
553 chandransh 6842
      StringBuilder sb = new StringBuilder("getUserState_args(");
48 ashish 6843
      boolean first = true;
6844
 
6845
      sb.append("userId:");
6846
      sb.append(this.userId);
6847
      first = false;
6848
      sb.append(")");
6849
      return sb.toString();
6850
    }
6851
 
6852
    public void validate() throws TException {
6853
      // check for required fields
6854
    }
6855
 
6856
  }
6857
 
553 chandransh 6858
  public static class getUserState_result implements TBase<getUserState_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUserState_result>   {
6859
    private static final TStruct STRUCT_DESC = new TStruct("getUserState_result");
48 ashish 6860
 
6861
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 6862
    private static final TField UCEX_FIELD_DESC = new TField("ucex", TType.STRUCT, (short)1);
48 ashish 6863
 
553 chandransh 6864
    private UserState success;
6865
    private UserContextException ucex;
48 ashish 6866
 
6867
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6868
    public enum _Fields implements TFieldIdEnum {
6869
      SUCCESS((short)0, "success"),
553 chandransh 6870
      UCEX((short)1, "ucex");
48 ashish 6871
 
6872
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6873
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6874
 
6875
      static {
6876
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6877
          byId.put((int)field._thriftId, field);
6878
          byName.put(field.getFieldName(), field);
6879
        }
6880
      }
6881
 
6882
      /**
6883
       * Find the _Fields constant that matches fieldId, or null if its not found.
6884
       */
6885
      public static _Fields findByThriftId(int fieldId) {
6886
        return byId.get(fieldId);
6887
      }
6888
 
6889
      /**
6890
       * Find the _Fields constant that matches fieldId, throwing an exception
6891
       * if it is not found.
6892
       */
6893
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6894
        _Fields fields = findByThriftId(fieldId);
6895
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6896
        return fields;
6897
      }
6898
 
6899
      /**
6900
       * Find the _Fields constant that matches name, or null if its not found.
6901
       */
6902
      public static _Fields findByName(String name) {
6903
        return byName.get(name);
6904
      }
6905
 
6906
      private final short _thriftId;
6907
      private final String _fieldName;
6908
 
6909
      _Fields(short thriftId, String fieldName) {
6910
        _thriftId = thriftId;
6911
        _fieldName = fieldName;
6912
      }
6913
 
6914
      public short getThriftFieldId() {
6915
        return _thriftId;
6916
      }
6917
 
6918
      public String getFieldName() {
6919
        return _fieldName;
6920
      }
6921
    }
6922
 
6923
    // isset id assignments
6924
 
6925
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6926
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 6927
          new StructMetaData(TType.STRUCT, UserState.class)));
6928
      put(_Fields.UCEX, new FieldMetaData("ucex", TFieldRequirementType.DEFAULT, 
48 ashish 6929
          new FieldValueMetaData(TType.STRUCT)));
6930
    }});
6931
 
6932
    static {
553 chandransh 6933
      FieldMetaData.addStructMetaDataMap(getUserState_result.class, metaDataMap);
48 ashish 6934
    }
6935
 
553 chandransh 6936
    public getUserState_result() {
48 ashish 6937
    }
6938
 
553 chandransh 6939
    public getUserState_result(
6940
      UserState success,
6941
      UserContextException ucex)
48 ashish 6942
    {
6943
      this();
6944
      this.success = success;
553 chandransh 6945
      this.ucex = ucex;
48 ashish 6946
    }
6947
 
6948
    /**
6949
     * Performs a deep copy on <i>other</i>.
6950
     */
553 chandransh 6951
    public getUserState_result(getUserState_result other) {
48 ashish 6952
      if (other.isSetSuccess()) {
553 chandransh 6953
        this.success = new UserState(other.success);
48 ashish 6954
      }
553 chandransh 6955
      if (other.isSetUcex()) {
6956
        this.ucex = new UserContextException(other.ucex);
48 ashish 6957
      }
6958
    }
6959
 
553 chandransh 6960
    public getUserState_result deepCopy() {
6961
      return new getUserState_result(this);
48 ashish 6962
    }
6963
 
6964
    @Deprecated
553 chandransh 6965
    public getUserState_result clone() {
6966
      return new getUserState_result(this);
48 ashish 6967
    }
6968
 
553 chandransh 6969
    public UserState getSuccess() {
48 ashish 6970
      return this.success;
6971
    }
6972
 
553 chandransh 6973
    public getUserState_result setSuccess(UserState success) {
48 ashish 6974
      this.success = success;
6975
      return this;
6976
    }
6977
 
6978
    public void unsetSuccess() {
6979
      this.success = null;
6980
    }
6981
 
6982
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6983
    public boolean isSetSuccess() {
6984
      return this.success != null;
6985
    }
6986
 
6987
    public void setSuccessIsSet(boolean value) {
6988
      if (!value) {
6989
        this.success = null;
6990
      }
6991
    }
6992
 
553 chandransh 6993
    public UserContextException getUcex() {
6994
      return this.ucex;
48 ashish 6995
    }
6996
 
553 chandransh 6997
    public getUserState_result setUcex(UserContextException ucex) {
6998
      this.ucex = ucex;
48 ashish 6999
      return this;
7000
    }
7001
 
553 chandransh 7002
    public void unsetUcex() {
7003
      this.ucex = null;
48 ashish 7004
    }
7005
 
553 chandransh 7006
    /** Returns true if field ucex is set (has been asigned a value) and false otherwise */
7007
    public boolean isSetUcex() {
7008
      return this.ucex != null;
48 ashish 7009
    }
7010
 
553 chandransh 7011
    public void setUcexIsSet(boolean value) {
48 ashish 7012
      if (!value) {
553 chandransh 7013
        this.ucex = null;
48 ashish 7014
      }
7015
    }
7016
 
7017
    public void setFieldValue(_Fields field, Object value) {
7018
      switch (field) {
7019
      case SUCCESS:
7020
        if (value == null) {
7021
          unsetSuccess();
7022
        } else {
553 chandransh 7023
          setSuccess((UserState)value);
48 ashish 7024
        }
7025
        break;
7026
 
553 chandransh 7027
      case UCEX:
48 ashish 7028
        if (value == null) {
553 chandransh 7029
          unsetUcex();
48 ashish 7030
        } else {
553 chandransh 7031
          setUcex((UserContextException)value);
48 ashish 7032
        }
7033
        break;
7034
 
7035
      }
7036
    }
7037
 
7038
    public void setFieldValue(int fieldID, Object value) {
7039
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7040
    }
7041
 
7042
    public Object getFieldValue(_Fields field) {
7043
      switch (field) {
7044
      case SUCCESS:
7045
        return getSuccess();
7046
 
553 chandransh 7047
      case UCEX:
7048
        return getUcex();
48 ashish 7049
 
7050
      }
7051
      throw new IllegalStateException();
7052
    }
7053
 
7054
    public Object getFieldValue(int fieldId) {
7055
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7056
    }
7057
 
7058
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7059
    public boolean isSet(_Fields field) {
7060
      switch (field) {
7061
      case SUCCESS:
7062
        return isSetSuccess();
553 chandransh 7063
      case UCEX:
7064
        return isSetUcex();
48 ashish 7065
      }
7066
      throw new IllegalStateException();
7067
    }
7068
 
7069
    public boolean isSet(int fieldID) {
7070
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7071
    }
7072
 
7073
    @Override
7074
    public boolean equals(Object that) {
7075
      if (that == null)
7076
        return false;
553 chandransh 7077
      if (that instanceof getUserState_result)
7078
        return this.equals((getUserState_result)that);
48 ashish 7079
      return false;
7080
    }
7081
 
553 chandransh 7082
    public boolean equals(getUserState_result that) {
48 ashish 7083
      if (that == null)
7084
        return false;
7085
 
7086
      boolean this_present_success = true && this.isSetSuccess();
7087
      boolean that_present_success = true && that.isSetSuccess();
7088
      if (this_present_success || that_present_success) {
7089
        if (!(this_present_success && that_present_success))
7090
          return false;
7091
        if (!this.success.equals(that.success))
7092
          return false;
7093
      }
7094
 
553 chandransh 7095
      boolean this_present_ucex = true && this.isSetUcex();
7096
      boolean that_present_ucex = true && that.isSetUcex();
7097
      if (this_present_ucex || that_present_ucex) {
7098
        if (!(this_present_ucex && that_present_ucex))
48 ashish 7099
          return false;
553 chandransh 7100
        if (!this.ucex.equals(that.ucex))
48 ashish 7101
          return false;
7102
      }
7103
 
7104
      return true;
7105
    }
7106
 
7107
    @Override
7108
    public int hashCode() {
7109
      return 0;
7110
    }
7111
 
553 chandransh 7112
    public int compareTo(getUserState_result other) {
48 ashish 7113
      if (!getClass().equals(other.getClass())) {
7114
        return getClass().getName().compareTo(other.getClass().getName());
7115
      }
7116
 
7117
      int lastComparison = 0;
553 chandransh 7118
      getUserState_result typedOther = (getUserState_result)other;
48 ashish 7119
 
7120
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7121
      if (lastComparison != 0) {
7122
        return lastComparison;
7123
      }
7124
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7125
      if (lastComparison != 0) {
7126
        return lastComparison;
7127
      }
553 chandransh 7128
      lastComparison = Boolean.valueOf(isSetUcex()).compareTo(isSetUcex());
48 ashish 7129
      if (lastComparison != 0) {
7130
        return lastComparison;
7131
      }
553 chandransh 7132
      lastComparison = TBaseHelper.compareTo(ucex, typedOther.ucex);
48 ashish 7133
      if (lastComparison != 0) {
7134
        return lastComparison;
7135
      }
7136
      return 0;
7137
    }
7138
 
7139
    public void read(TProtocol iprot) throws TException {
7140
      TField field;
7141
      iprot.readStructBegin();
7142
      while (true)
7143
      {
7144
        field = iprot.readFieldBegin();
7145
        if (field.type == TType.STOP) { 
7146
          break;
7147
        }
7148
        _Fields fieldId = _Fields.findByThriftId(field.id);
7149
        if (fieldId == null) {
7150
          TProtocolUtil.skip(iprot, field.type);
7151
        } else {
7152
          switch (fieldId) {
7153
            case SUCCESS:
7154
              if (field.type == TType.STRUCT) {
553 chandransh 7155
                this.success = new UserState();
48 ashish 7156
                this.success.read(iprot);
7157
              } else { 
7158
                TProtocolUtil.skip(iprot, field.type);
7159
              }
7160
              break;
553 chandransh 7161
            case UCEX:
48 ashish 7162
              if (field.type == TType.STRUCT) {
553 chandransh 7163
                this.ucex = new UserContextException();
7164
                this.ucex.read(iprot);
48 ashish 7165
              } else { 
7166
                TProtocolUtil.skip(iprot, field.type);
7167
              }
7168
              break;
7169
          }
7170
          iprot.readFieldEnd();
7171
        }
7172
      }
7173
      iprot.readStructEnd();
7174
      validate();
7175
    }
7176
 
7177
    public void write(TProtocol oprot) throws TException {
7178
      oprot.writeStructBegin(STRUCT_DESC);
7179
 
7180
      if (this.isSetSuccess()) {
7181
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7182
        this.success.write(oprot);
7183
        oprot.writeFieldEnd();
553 chandransh 7184
      } else if (this.isSetUcex()) {
7185
        oprot.writeFieldBegin(UCEX_FIELD_DESC);
7186
        this.ucex.write(oprot);
48 ashish 7187
        oprot.writeFieldEnd();
7188
      }
7189
      oprot.writeFieldStop();
7190
      oprot.writeStructEnd();
7191
    }
7192
 
7193
    @Override
7194
    public String toString() {
553 chandransh 7195
      StringBuilder sb = new StringBuilder("getUserState_result(");
48 ashish 7196
      boolean first = true;
7197
 
7198
      sb.append("success:");
7199
      if (this.success == null) {
7200
        sb.append("null");
7201
      } else {
7202
        sb.append(this.success);
7203
      }
7204
      first = false;
7205
      if (!first) sb.append(", ");
553 chandransh 7206
      sb.append("ucex:");
7207
      if (this.ucex == null) {
48 ashish 7208
        sb.append("null");
7209
      } else {
553 chandransh 7210
        sb.append(this.ucex);
48 ashish 7211
      }
7212
      first = false;
7213
      sb.append(")");
7214
      return sb.toString();
7215
    }
7216
 
7217
    public void validate() throws TException {
7218
      // check for required fields
7219
    }
7220
 
7221
  }
7222
 
553 chandransh 7223
  public static class authenticateUser_args implements TBase<authenticateUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_args>   {
7224
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_args");
48 ashish 7225
 
7226
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
7227
    private static final TField PASSWORD_FIELD_DESC = new TField("password", TType.STRING, (short)2);
7228
 
7229
    private String email;
7230
    private String password;
7231
 
7232
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7233
    public enum _Fields implements TFieldIdEnum {
7234
      EMAIL((short)1, "email"),
7235
      PASSWORD((short)2, "password");
7236
 
7237
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7238
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7239
 
7240
      static {
7241
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7242
          byId.put((int)field._thriftId, field);
7243
          byName.put(field.getFieldName(), field);
7244
        }
7245
      }
7246
 
7247
      /**
7248
       * Find the _Fields constant that matches fieldId, or null if its not found.
7249
       */
7250
      public static _Fields findByThriftId(int fieldId) {
7251
        return byId.get(fieldId);
7252
      }
7253
 
7254
      /**
7255
       * Find the _Fields constant that matches fieldId, throwing an exception
7256
       * if it is not found.
7257
       */
7258
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7259
        _Fields fields = findByThriftId(fieldId);
7260
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7261
        return fields;
7262
      }
7263
 
7264
      /**
7265
       * Find the _Fields constant that matches name, or null if its not found.
7266
       */
7267
      public static _Fields findByName(String name) {
7268
        return byName.get(name);
7269
      }
7270
 
7271
      private final short _thriftId;
7272
      private final String _fieldName;
7273
 
7274
      _Fields(short thriftId, String fieldName) {
7275
        _thriftId = thriftId;
7276
        _fieldName = fieldName;
7277
      }
7278
 
7279
      public short getThriftFieldId() {
7280
        return _thriftId;
7281
      }
7282
 
7283
      public String getFieldName() {
7284
        return _fieldName;
7285
      }
7286
    }
7287
 
7288
    // isset id assignments
7289
 
7290
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7291
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
7292
          new FieldValueMetaData(TType.STRING)));
7293
      put(_Fields.PASSWORD, new FieldMetaData("password", TFieldRequirementType.DEFAULT, 
7294
          new FieldValueMetaData(TType.STRING)));
7295
    }});
7296
 
7297
    static {
553 chandransh 7298
      FieldMetaData.addStructMetaDataMap(authenticateUser_args.class, metaDataMap);
48 ashish 7299
    }
7300
 
553 chandransh 7301
    public authenticateUser_args() {
48 ashish 7302
    }
7303
 
553 chandransh 7304
    public authenticateUser_args(
48 ashish 7305
      String email,
7306
      String password)
7307
    {
7308
      this();
7309
      this.email = email;
7310
      this.password = password;
7311
    }
7312
 
7313
    /**
7314
     * Performs a deep copy on <i>other</i>.
7315
     */
553 chandransh 7316
    public authenticateUser_args(authenticateUser_args other) {
48 ashish 7317
      if (other.isSetEmail()) {
7318
        this.email = other.email;
7319
      }
7320
      if (other.isSetPassword()) {
7321
        this.password = other.password;
7322
      }
7323
    }
7324
 
553 chandransh 7325
    public authenticateUser_args deepCopy() {
7326
      return new authenticateUser_args(this);
48 ashish 7327
    }
7328
 
7329
    @Deprecated
553 chandransh 7330
    public authenticateUser_args clone() {
7331
      return new authenticateUser_args(this);
48 ashish 7332
    }
7333
 
7334
    public String getEmail() {
7335
      return this.email;
7336
    }
7337
 
553 chandransh 7338
    public authenticateUser_args setEmail(String email) {
48 ashish 7339
      this.email = email;
7340
      return this;
7341
    }
7342
 
7343
    public void unsetEmail() {
7344
      this.email = null;
7345
    }
7346
 
7347
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
7348
    public boolean isSetEmail() {
7349
      return this.email != null;
7350
    }
7351
 
7352
    public void setEmailIsSet(boolean value) {
7353
      if (!value) {
7354
        this.email = null;
7355
      }
7356
    }
7357
 
7358
    public String getPassword() {
7359
      return this.password;
7360
    }
7361
 
553 chandransh 7362
    public authenticateUser_args setPassword(String password) {
48 ashish 7363
      this.password = password;
7364
      return this;
7365
    }
7366
 
7367
    public void unsetPassword() {
7368
      this.password = null;
7369
    }
7370
 
7371
    /** Returns true if field password is set (has been asigned a value) and false otherwise */
7372
    public boolean isSetPassword() {
7373
      return this.password != null;
7374
    }
7375
 
7376
    public void setPasswordIsSet(boolean value) {
7377
      if (!value) {
7378
        this.password = null;
7379
      }
7380
    }
7381
 
7382
    public void setFieldValue(_Fields field, Object value) {
7383
      switch (field) {
7384
      case EMAIL:
7385
        if (value == null) {
7386
          unsetEmail();
7387
        } else {
7388
          setEmail((String)value);
7389
        }
7390
        break;
7391
 
7392
      case PASSWORD:
7393
        if (value == null) {
7394
          unsetPassword();
7395
        } else {
7396
          setPassword((String)value);
7397
        }
7398
        break;
7399
 
7400
      }
7401
    }
7402
 
7403
    public void setFieldValue(int fieldID, Object value) {
7404
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7405
    }
7406
 
7407
    public Object getFieldValue(_Fields field) {
7408
      switch (field) {
7409
      case EMAIL:
7410
        return getEmail();
7411
 
7412
      case PASSWORD:
7413
        return getPassword();
7414
 
7415
      }
7416
      throw new IllegalStateException();
7417
    }
7418
 
7419
    public Object getFieldValue(int fieldId) {
7420
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7421
    }
7422
 
7423
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7424
    public boolean isSet(_Fields field) {
7425
      switch (field) {
7426
      case EMAIL:
7427
        return isSetEmail();
7428
      case PASSWORD:
7429
        return isSetPassword();
7430
      }
7431
      throw new IllegalStateException();
7432
    }
7433
 
7434
    public boolean isSet(int fieldID) {
7435
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7436
    }
7437
 
7438
    @Override
7439
    public boolean equals(Object that) {
7440
      if (that == null)
7441
        return false;
553 chandransh 7442
      if (that instanceof authenticateUser_args)
7443
        return this.equals((authenticateUser_args)that);
48 ashish 7444
      return false;
7445
    }
7446
 
553 chandransh 7447
    public boolean equals(authenticateUser_args that) {
48 ashish 7448
      if (that == null)
7449
        return false;
7450
 
7451
      boolean this_present_email = true && this.isSetEmail();
7452
      boolean that_present_email = true && that.isSetEmail();
7453
      if (this_present_email || that_present_email) {
7454
        if (!(this_present_email && that_present_email))
7455
          return false;
7456
        if (!this.email.equals(that.email))
7457
          return false;
7458
      }
7459
 
7460
      boolean this_present_password = true && this.isSetPassword();
7461
      boolean that_present_password = true && that.isSetPassword();
7462
      if (this_present_password || that_present_password) {
7463
        if (!(this_present_password && that_present_password))
7464
          return false;
7465
        if (!this.password.equals(that.password))
7466
          return false;
7467
      }
7468
 
7469
      return true;
7470
    }
7471
 
7472
    @Override
7473
    public int hashCode() {
7474
      return 0;
7475
    }
7476
 
553 chandransh 7477
    public int compareTo(authenticateUser_args other) {
48 ashish 7478
      if (!getClass().equals(other.getClass())) {
7479
        return getClass().getName().compareTo(other.getClass().getName());
7480
      }
7481
 
7482
      int lastComparison = 0;
553 chandransh 7483
      authenticateUser_args typedOther = (authenticateUser_args)other;
48 ashish 7484
 
7485
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
7486
      if (lastComparison != 0) {
7487
        return lastComparison;
7488
      }
7489
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
7490
      if (lastComparison != 0) {
7491
        return lastComparison;
7492
      }
7493
      lastComparison = Boolean.valueOf(isSetPassword()).compareTo(isSetPassword());
7494
      if (lastComparison != 0) {
7495
        return lastComparison;
7496
      }
7497
      lastComparison = TBaseHelper.compareTo(password, typedOther.password);
7498
      if (lastComparison != 0) {
7499
        return lastComparison;
7500
      }
7501
      return 0;
7502
    }
7503
 
7504
    public void read(TProtocol iprot) throws TException {
7505
      TField field;
7506
      iprot.readStructBegin();
7507
      while (true)
7508
      {
7509
        field = iprot.readFieldBegin();
7510
        if (field.type == TType.STOP) { 
7511
          break;
7512
        }
7513
        _Fields fieldId = _Fields.findByThriftId(field.id);
7514
        if (fieldId == null) {
7515
          TProtocolUtil.skip(iprot, field.type);
7516
        } else {
7517
          switch (fieldId) {
7518
            case EMAIL:
7519
              if (field.type == TType.STRING) {
7520
                this.email = iprot.readString();
7521
              } else { 
7522
                TProtocolUtil.skip(iprot, field.type);
7523
              }
7524
              break;
7525
            case PASSWORD:
7526
              if (field.type == TType.STRING) {
7527
                this.password = iprot.readString();
7528
              } else { 
7529
                TProtocolUtil.skip(iprot, field.type);
7530
              }
7531
              break;
7532
          }
7533
          iprot.readFieldEnd();
7534
        }
7535
      }
7536
      iprot.readStructEnd();
7537
      validate();
7538
    }
7539
 
7540
    public void write(TProtocol oprot) throws TException {
7541
      validate();
7542
 
7543
      oprot.writeStructBegin(STRUCT_DESC);
7544
      if (this.email != null) {
7545
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
7546
        oprot.writeString(this.email);
7547
        oprot.writeFieldEnd();
7548
      }
7549
      if (this.password != null) {
7550
        oprot.writeFieldBegin(PASSWORD_FIELD_DESC);
7551
        oprot.writeString(this.password);
7552
        oprot.writeFieldEnd();
7553
      }
7554
      oprot.writeFieldStop();
7555
      oprot.writeStructEnd();
7556
    }
7557
 
7558
    @Override
7559
    public String toString() {
553 chandransh 7560
      StringBuilder sb = new StringBuilder("authenticateUser_args(");
48 ashish 7561
      boolean first = true;
7562
 
7563
      sb.append("email:");
7564
      if (this.email == null) {
7565
        sb.append("null");
7566
      } else {
7567
        sb.append(this.email);
7568
      }
7569
      first = false;
7570
      if (!first) sb.append(", ");
7571
      sb.append("password:");
7572
      if (this.password == null) {
7573
        sb.append("null");
7574
      } else {
7575
        sb.append(this.password);
7576
      }
7577
      first = false;
7578
      sb.append(")");
7579
      return sb.toString();
7580
    }
7581
 
7582
    public void validate() throws TException {
7583
      // check for required fields
7584
    }
7585
 
7586
  }
7587
 
571 rajveer 7588
  public static class authenticateUser_result implements TBase<authenticateUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<authenticateUser_result>   {
553 chandransh 7589
    private static final TStruct STRUCT_DESC = new TStruct("authenticateUser_result");
48 ashish 7590
 
7591
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
553 chandransh 7592
    private static final TField AUEX_FIELD_DESC = new TField("auex", TType.STRUCT, (short)1);
48 ashish 7593
 
553 chandransh 7594
    private User success;
7595
    private AuthenticationException auex;
48 ashish 7596
 
7597
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7598
    public enum _Fields implements TFieldIdEnum {
7599
      SUCCESS((short)0, "success"),
553 chandransh 7600
      AUEX((short)1, "auex");
48 ashish 7601
 
7602
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7603
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7604
 
7605
      static {
7606
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7607
          byId.put((int)field._thriftId, field);
7608
          byName.put(field.getFieldName(), field);
7609
        }
7610
      }
7611
 
7612
      /**
7613
       * Find the _Fields constant that matches fieldId, or null if its not found.
7614
       */
7615
      public static _Fields findByThriftId(int fieldId) {
7616
        return byId.get(fieldId);
7617
      }
7618
 
7619
      /**
7620
       * Find the _Fields constant that matches fieldId, throwing an exception
7621
       * if it is not found.
7622
       */
7623
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7624
        _Fields fields = findByThriftId(fieldId);
7625
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7626
        return fields;
7627
      }
7628
 
7629
      /**
7630
       * Find the _Fields constant that matches name, or null if its not found.
7631
       */
7632
      public static _Fields findByName(String name) {
7633
        return byName.get(name);
7634
      }
7635
 
7636
      private final short _thriftId;
7637
      private final String _fieldName;
7638
 
7639
      _Fields(short thriftId, String fieldName) {
7640
        _thriftId = thriftId;
7641
        _fieldName = fieldName;
7642
      }
7643
 
7644
      public short getThriftFieldId() {
7645
        return _thriftId;
7646
      }
7647
 
7648
      public String getFieldName() {
7649
        return _fieldName;
7650
      }
7651
    }
7652
 
7653
    // isset id assignments
7654
 
7655
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7656
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 7657
          new StructMetaData(TType.STRUCT, User.class)));
7658
      put(_Fields.AUEX, new FieldMetaData("auex", TFieldRequirementType.DEFAULT, 
48 ashish 7659
          new FieldValueMetaData(TType.STRUCT)));
7660
    }});
7661
 
7662
    static {
553 chandransh 7663
      FieldMetaData.addStructMetaDataMap(authenticateUser_result.class, metaDataMap);
48 ashish 7664
    }
7665
 
553 chandransh 7666
    public authenticateUser_result() {
48 ashish 7667
    }
7668
 
553 chandransh 7669
    public authenticateUser_result(
7670
      User success,
7671
      AuthenticationException auex)
48 ashish 7672
    {
7673
      this();
7674
      this.success = success;
553 chandransh 7675
      this.auex = auex;
48 ashish 7676
    }
7677
 
7678
    /**
7679
     * Performs a deep copy on <i>other</i>.
7680
     */
553 chandransh 7681
    public authenticateUser_result(authenticateUser_result other) {
48 ashish 7682
      if (other.isSetSuccess()) {
553 chandransh 7683
        this.success = new User(other.success);
48 ashish 7684
      }
553 chandransh 7685
      if (other.isSetAuex()) {
7686
        this.auex = new AuthenticationException(other.auex);
48 ashish 7687
      }
7688
    }
7689
 
553 chandransh 7690
    public authenticateUser_result deepCopy() {
7691
      return new authenticateUser_result(this);
48 ashish 7692
    }
7693
 
7694
    @Deprecated
553 chandransh 7695
    public authenticateUser_result clone() {
7696
      return new authenticateUser_result(this);
48 ashish 7697
    }
7698
 
553 chandransh 7699
    public User getSuccess() {
48 ashish 7700
      return this.success;
7701
    }
7702
 
553 chandransh 7703
    public authenticateUser_result setSuccess(User success) {
48 ashish 7704
      this.success = success;
7705
      return this;
7706
    }
7707
 
7708
    public void unsetSuccess() {
7709
      this.success = null;
7710
    }
7711
 
7712
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7713
    public boolean isSetSuccess() {
7714
      return this.success != null;
7715
    }
7716
 
7717
    public void setSuccessIsSet(boolean value) {
7718
      if (!value) {
7719
        this.success = null;
7720
      }
7721
    }
7722
 
553 chandransh 7723
    public AuthenticationException getAuex() {
7724
      return this.auex;
48 ashish 7725
    }
7726
 
553 chandransh 7727
    public authenticateUser_result setAuex(AuthenticationException auex) {
7728
      this.auex = auex;
48 ashish 7729
      return this;
7730
    }
7731
 
553 chandransh 7732
    public void unsetAuex() {
7733
      this.auex = null;
48 ashish 7734
    }
7735
 
553 chandransh 7736
    /** Returns true if field auex is set (has been asigned a value) and false otherwise */
7737
    public boolean isSetAuex() {
7738
      return this.auex != null;
48 ashish 7739
    }
7740
 
553 chandransh 7741
    public void setAuexIsSet(boolean value) {
48 ashish 7742
      if (!value) {
553 chandransh 7743
        this.auex = null;
48 ashish 7744
      }
7745
    }
7746
 
7747
    public void setFieldValue(_Fields field, Object value) {
7748
      switch (field) {
7749
      case SUCCESS:
7750
        if (value == null) {
7751
          unsetSuccess();
7752
        } else {
553 chandransh 7753
          setSuccess((User)value);
48 ashish 7754
        }
7755
        break;
7756
 
553 chandransh 7757
      case AUEX:
48 ashish 7758
        if (value == null) {
553 chandransh 7759
          unsetAuex();
48 ashish 7760
        } else {
553 chandransh 7761
          setAuex((AuthenticationException)value);
48 ashish 7762
        }
7763
        break;
7764
 
7765
      }
7766
    }
7767
 
7768
    public void setFieldValue(int fieldID, Object value) {
7769
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7770
    }
7771
 
7772
    public Object getFieldValue(_Fields field) {
7773
      switch (field) {
7774
      case SUCCESS:
7775
        return getSuccess();
7776
 
553 chandransh 7777
      case AUEX:
7778
        return getAuex();
48 ashish 7779
 
7780
      }
7781
      throw new IllegalStateException();
7782
    }
7783
 
7784
    public Object getFieldValue(int fieldId) {
7785
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7786
    }
7787
 
7788
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7789
    public boolean isSet(_Fields field) {
7790
      switch (field) {
7791
      case SUCCESS:
7792
        return isSetSuccess();
553 chandransh 7793
      case AUEX:
7794
        return isSetAuex();
48 ashish 7795
      }
7796
      throw new IllegalStateException();
7797
    }
7798
 
7799
    public boolean isSet(int fieldID) {
7800
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7801
    }
7802
 
7803
    @Override
7804
    public boolean equals(Object that) {
7805
      if (that == null)
7806
        return false;
553 chandransh 7807
      if (that instanceof authenticateUser_result)
7808
        return this.equals((authenticateUser_result)that);
48 ashish 7809
      return false;
7810
    }
7811
 
553 chandransh 7812
    public boolean equals(authenticateUser_result that) {
48 ashish 7813
      if (that == null)
7814
        return false;
7815
 
7816
      boolean this_present_success = true && this.isSetSuccess();
7817
      boolean that_present_success = true && that.isSetSuccess();
7818
      if (this_present_success || that_present_success) {
7819
        if (!(this_present_success && that_present_success))
7820
          return false;
7821
        if (!this.success.equals(that.success))
7822
          return false;
7823
      }
7824
 
553 chandransh 7825
      boolean this_present_auex = true && this.isSetAuex();
7826
      boolean that_present_auex = true && that.isSetAuex();
7827
      if (this_present_auex || that_present_auex) {
7828
        if (!(this_present_auex && that_present_auex))
48 ashish 7829
          return false;
553 chandransh 7830
        if (!this.auex.equals(that.auex))
48 ashish 7831
          return false;
7832
      }
7833
 
7834
      return true;
7835
    }
7836
 
7837
    @Override
7838
    public int hashCode() {
7839
      return 0;
7840
    }
7841
 
571 rajveer 7842
    public int compareTo(authenticateUser_result other) {
7843
      if (!getClass().equals(other.getClass())) {
7844
        return getClass().getName().compareTo(other.getClass().getName());
7845
      }
7846
 
7847
      int lastComparison = 0;
7848
      authenticateUser_result typedOther = (authenticateUser_result)other;
7849
 
7850
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7851
      if (lastComparison != 0) {
7852
        return lastComparison;
7853
      }
7854
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7855
      if (lastComparison != 0) {
7856
        return lastComparison;
7857
      }
7858
      lastComparison = Boolean.valueOf(isSetAuex()).compareTo(isSetAuex());
7859
      if (lastComparison != 0) {
7860
        return lastComparison;
7861
      }
7862
      lastComparison = TBaseHelper.compareTo(auex, typedOther.auex);
7863
      if (lastComparison != 0) {
7864
        return lastComparison;
7865
      }
7866
      return 0;
7867
    }
7868
 
48 ashish 7869
    public void read(TProtocol iprot) throws TException {
7870
      TField field;
7871
      iprot.readStructBegin();
7872
      while (true)
7873
      {
7874
        field = iprot.readFieldBegin();
7875
        if (field.type == TType.STOP) { 
7876
          break;
7877
        }
7878
        _Fields fieldId = _Fields.findByThriftId(field.id);
7879
        if (fieldId == null) {
7880
          TProtocolUtil.skip(iprot, field.type);
7881
        } else {
7882
          switch (fieldId) {
7883
            case SUCCESS:
7884
              if (field.type == TType.STRUCT) {
553 chandransh 7885
                this.success = new User();
48 ashish 7886
                this.success.read(iprot);
7887
              } else { 
7888
                TProtocolUtil.skip(iprot, field.type);
7889
              }
7890
              break;
553 chandransh 7891
            case AUEX:
48 ashish 7892
              if (field.type == TType.STRUCT) {
553 chandransh 7893
                this.auex = new AuthenticationException();
7894
                this.auex.read(iprot);
48 ashish 7895
              } else { 
7896
                TProtocolUtil.skip(iprot, field.type);
7897
              }
7898
              break;
7899
          }
7900
          iprot.readFieldEnd();
7901
        }
7902
      }
7903
      iprot.readStructEnd();
7904
      validate();
7905
    }
7906
 
7907
    public void write(TProtocol oprot) throws TException {
7908
      oprot.writeStructBegin(STRUCT_DESC);
7909
 
7910
      if (this.isSetSuccess()) {
7911
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7912
        this.success.write(oprot);
7913
        oprot.writeFieldEnd();
553 chandransh 7914
      } else if (this.isSetAuex()) {
7915
        oprot.writeFieldBegin(AUEX_FIELD_DESC);
7916
        this.auex.write(oprot);
48 ashish 7917
        oprot.writeFieldEnd();
7918
      }
7919
      oprot.writeFieldStop();
7920
      oprot.writeStructEnd();
7921
    }
7922
 
7923
    @Override
7924
    public String toString() {
553 chandransh 7925
      StringBuilder sb = new StringBuilder("authenticateUser_result(");
48 ashish 7926
      boolean first = true;
7927
 
7928
      sb.append("success:");
7929
      if (this.success == null) {
7930
        sb.append("null");
7931
      } else {
7932
        sb.append(this.success);
7933
      }
7934
      first = false;
7935
      if (!first) sb.append(", ");
553 chandransh 7936
      sb.append("auex:");
7937
      if (this.auex == null) {
48 ashish 7938
        sb.append("null");
7939
      } else {
553 chandransh 7940
        sb.append(this.auex);
48 ashish 7941
      }
7942
      first = false;
7943
      sb.append(")");
7944
      return sb.toString();
7945
    }
7946
 
7947
    public void validate() throws TException {
7948
      // check for required fields
7949
    }
7950
 
7951
  }
7952
 
553 chandransh 7953
  public static class userExists_args implements TBase<userExists_args._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_args>   {
7954
    private static final TStruct STRUCT_DESC = new TStruct("userExists_args");
123 ashish 7955
 
553 chandransh 7956
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
123 ashish 7957
 
553 chandransh 7958
    private String email;
123 ashish 7959
 
7960
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7961
    public enum _Fields implements TFieldIdEnum {
553 chandransh 7962
      EMAIL((short)1, "email");
123 ashish 7963
 
7964
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7965
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7966
 
7967
      static {
7968
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7969
          byId.put((int)field._thriftId, field);
7970
          byName.put(field.getFieldName(), field);
7971
        }
7972
      }
7973
 
7974
      /**
7975
       * Find the _Fields constant that matches fieldId, or null if its not found.
7976
       */
7977
      public static _Fields findByThriftId(int fieldId) {
7978
        return byId.get(fieldId);
7979
      }
7980
 
7981
      /**
7982
       * Find the _Fields constant that matches fieldId, throwing an exception
7983
       * if it is not found.
7984
       */
7985
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7986
        _Fields fields = findByThriftId(fieldId);
7987
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7988
        return fields;
7989
      }
7990
 
7991
      /**
7992
       * Find the _Fields constant that matches name, or null if its not found.
7993
       */
7994
      public static _Fields findByName(String name) {
7995
        return byName.get(name);
7996
      }
7997
 
7998
      private final short _thriftId;
7999
      private final String _fieldName;
8000
 
8001
      _Fields(short thriftId, String fieldName) {
8002
        _thriftId = thriftId;
8003
        _fieldName = fieldName;
8004
      }
8005
 
8006
      public short getThriftFieldId() {
8007
        return _thriftId;
8008
      }
8009
 
8010
      public String getFieldName() {
8011
        return _fieldName;
8012
      }
8013
    }
8014
 
8015
    // isset id assignments
553 chandransh 8016
 
8017
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8018
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
8019
          new FieldValueMetaData(TType.STRING)));
8020
    }});
8021
 
8022
    static {
8023
      FieldMetaData.addStructMetaDataMap(userExists_args.class, metaDataMap);
8024
    }
8025
 
8026
    public userExists_args() {
8027
    }
8028
 
8029
    public userExists_args(
8030
      String email)
8031
    {
8032
      this();
8033
      this.email = email;
8034
    }
8035
 
8036
    /**
8037
     * Performs a deep copy on <i>other</i>.
8038
     */
8039
    public userExists_args(userExists_args other) {
8040
      if (other.isSetEmail()) {
8041
        this.email = other.email;
8042
      }
8043
    }
8044
 
8045
    public userExists_args deepCopy() {
8046
      return new userExists_args(this);
8047
    }
8048
 
8049
    @Deprecated
8050
    public userExists_args clone() {
8051
      return new userExists_args(this);
8052
    }
8053
 
8054
    public String getEmail() {
8055
      return this.email;
8056
    }
8057
 
8058
    public userExists_args setEmail(String email) {
8059
      this.email = email;
8060
      return this;
8061
    }
8062
 
8063
    public void unsetEmail() {
8064
      this.email = null;
8065
    }
8066
 
8067
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
8068
    public boolean isSetEmail() {
8069
      return this.email != null;
8070
    }
8071
 
8072
    public void setEmailIsSet(boolean value) {
8073
      if (!value) {
8074
        this.email = null;
8075
      }
8076
    }
8077
 
8078
    public void setFieldValue(_Fields field, Object value) {
8079
      switch (field) {
8080
      case EMAIL:
8081
        if (value == null) {
8082
          unsetEmail();
8083
        } else {
8084
          setEmail((String)value);
8085
        }
8086
        break;
8087
 
8088
      }
8089
    }
8090
 
8091
    public void setFieldValue(int fieldID, Object value) {
8092
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8093
    }
8094
 
8095
    public Object getFieldValue(_Fields field) {
8096
      switch (field) {
8097
      case EMAIL:
8098
        return getEmail();
8099
 
8100
      }
8101
      throw new IllegalStateException();
8102
    }
8103
 
8104
    public Object getFieldValue(int fieldId) {
8105
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8106
    }
8107
 
8108
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8109
    public boolean isSet(_Fields field) {
8110
      switch (field) {
8111
      case EMAIL:
8112
        return isSetEmail();
8113
      }
8114
      throw new IllegalStateException();
8115
    }
8116
 
8117
    public boolean isSet(int fieldID) {
8118
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8119
    }
8120
 
8121
    @Override
8122
    public boolean equals(Object that) {
8123
      if (that == null)
8124
        return false;
8125
      if (that instanceof userExists_args)
8126
        return this.equals((userExists_args)that);
8127
      return false;
8128
    }
8129
 
8130
    public boolean equals(userExists_args that) {
8131
      if (that == null)
8132
        return false;
8133
 
8134
      boolean this_present_email = true && this.isSetEmail();
8135
      boolean that_present_email = true && that.isSetEmail();
8136
      if (this_present_email || that_present_email) {
8137
        if (!(this_present_email && that_present_email))
8138
          return false;
8139
        if (!this.email.equals(that.email))
8140
          return false;
8141
      }
8142
 
8143
      return true;
8144
    }
8145
 
8146
    @Override
8147
    public int hashCode() {
8148
      return 0;
8149
    }
8150
 
8151
    public int compareTo(userExists_args other) {
8152
      if (!getClass().equals(other.getClass())) {
8153
        return getClass().getName().compareTo(other.getClass().getName());
8154
      }
8155
 
8156
      int lastComparison = 0;
8157
      userExists_args typedOther = (userExists_args)other;
8158
 
8159
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
8160
      if (lastComparison != 0) {
8161
        return lastComparison;
8162
      }
8163
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
8164
      if (lastComparison != 0) {
8165
        return lastComparison;
8166
      }
8167
      return 0;
8168
    }
8169
 
8170
    public void read(TProtocol iprot) throws TException {
8171
      TField field;
8172
      iprot.readStructBegin();
8173
      while (true)
8174
      {
8175
        field = iprot.readFieldBegin();
8176
        if (field.type == TType.STOP) { 
8177
          break;
8178
        }
8179
        _Fields fieldId = _Fields.findByThriftId(field.id);
8180
        if (fieldId == null) {
8181
          TProtocolUtil.skip(iprot, field.type);
8182
        } else {
8183
          switch (fieldId) {
8184
            case EMAIL:
8185
              if (field.type == TType.STRING) {
8186
                this.email = iprot.readString();
8187
              } else { 
8188
                TProtocolUtil.skip(iprot, field.type);
8189
              }
8190
              break;
8191
          }
8192
          iprot.readFieldEnd();
8193
        }
8194
      }
8195
      iprot.readStructEnd();
8196
      validate();
8197
    }
8198
 
8199
    public void write(TProtocol oprot) throws TException {
8200
      validate();
8201
 
8202
      oprot.writeStructBegin(STRUCT_DESC);
8203
      if (this.email != null) {
8204
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
8205
        oprot.writeString(this.email);
8206
        oprot.writeFieldEnd();
8207
      }
8208
      oprot.writeFieldStop();
8209
      oprot.writeStructEnd();
8210
    }
8211
 
8212
    @Override
8213
    public String toString() {
8214
      StringBuilder sb = new StringBuilder("userExists_args(");
8215
      boolean first = true;
8216
 
8217
      sb.append("email:");
8218
      if (this.email == null) {
8219
        sb.append("null");
8220
      } else {
8221
        sb.append(this.email);
8222
      }
8223
      first = false;
8224
      sb.append(")");
8225
      return sb.toString();
8226
    }
8227
 
8228
    public void validate() throws TException {
8229
      // check for required fields
8230
    }
8231
 
8232
  }
8233
 
8234
  public static class userExists_result implements TBase<userExists_result._Fields>, java.io.Serializable, Cloneable, Comparable<userExists_result>   {
8235
    private static final TStruct STRUCT_DESC = new TStruct("userExists_result");
8236
 
8237
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8238
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
8239
 
8240
    private boolean success;
8241
    private UserContextException ucx;
8242
 
8243
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8244
    public enum _Fields implements TFieldIdEnum {
8245
      SUCCESS((short)0, "success"),
8246
      UCX((short)1, "ucx");
8247
 
8248
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8249
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8250
 
8251
      static {
8252
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8253
          byId.put((int)field._thriftId, field);
8254
          byName.put(field.getFieldName(), field);
8255
        }
8256
      }
8257
 
8258
      /**
8259
       * Find the _Fields constant that matches fieldId, or null if its not found.
8260
       */
8261
      public static _Fields findByThriftId(int fieldId) {
8262
        return byId.get(fieldId);
8263
      }
8264
 
8265
      /**
8266
       * Find the _Fields constant that matches fieldId, throwing an exception
8267
       * if it is not found.
8268
       */
8269
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8270
        _Fields fields = findByThriftId(fieldId);
8271
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8272
        return fields;
8273
      }
8274
 
8275
      /**
8276
       * Find the _Fields constant that matches name, or null if its not found.
8277
       */
8278
      public static _Fields findByName(String name) {
8279
        return byName.get(name);
8280
      }
8281
 
8282
      private final short _thriftId;
8283
      private final String _fieldName;
8284
 
8285
      _Fields(short thriftId, String fieldName) {
8286
        _thriftId = thriftId;
8287
        _fieldName = fieldName;
8288
      }
8289
 
8290
      public short getThriftFieldId() {
8291
        return _thriftId;
8292
      }
8293
 
8294
      public String getFieldName() {
8295
        return _fieldName;
8296
      }
8297
    }
8298
 
8299
    // isset id assignments
8300
    private static final int __SUCCESS_ISSET_ID = 0;
123 ashish 8301
    private BitSet __isset_bit_vector = new BitSet(1);
8302
 
8303
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 8304
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
123 ashish 8305
          new FieldValueMetaData(TType.BOOL)));
553 chandransh 8306
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
8307
          new FieldValueMetaData(TType.STRUCT)));
123 ashish 8308
    }});
8309
 
8310
    static {
553 chandransh 8311
      FieldMetaData.addStructMetaDataMap(userExists_result.class, metaDataMap);
123 ashish 8312
    }
8313
 
553 chandransh 8314
    public userExists_result() {
123 ashish 8315
    }
8316
 
553 chandransh 8317
    public userExists_result(
8318
      boolean success,
8319
      UserContextException ucx)
123 ashish 8320
    {
8321
      this();
553 chandransh 8322
      this.success = success;
8323
      setSuccessIsSet(true);
8324
      this.ucx = ucx;
123 ashish 8325
    }
8326
 
8327
    /**
8328
     * Performs a deep copy on <i>other</i>.
8329
     */
553 chandransh 8330
    public userExists_result(userExists_result other) {
123 ashish 8331
      __isset_bit_vector.clear();
8332
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 8333
      this.success = other.success;
8334
      if (other.isSetUcx()) {
8335
        this.ucx = new UserContextException(other.ucx);
123 ashish 8336
      }
8337
    }
8338
 
553 chandransh 8339
    public userExists_result deepCopy() {
8340
      return new userExists_result(this);
123 ashish 8341
    }
8342
 
8343
    @Deprecated
553 chandransh 8344
    public userExists_result clone() {
8345
      return new userExists_result(this);
123 ashish 8346
    }
8347
 
553 chandransh 8348
    public boolean isSuccess() {
8349
      return this.success;
123 ashish 8350
    }
8351
 
553 chandransh 8352
    public userExists_result setSuccess(boolean success) {
8353
      this.success = success;
8354
      setSuccessIsSet(true);
123 ashish 8355
      return this;
8356
    }
8357
 
553 chandransh 8358
    public void unsetSuccess() {
8359
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
123 ashish 8360
    }
8361
 
553 chandransh 8362
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8363
    public boolean isSetSuccess() {
8364
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
123 ashish 8365
    }
8366
 
553 chandransh 8367
    public void setSuccessIsSet(boolean value) {
8368
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8369
    }
8370
 
8371
    public UserContextException getUcx() {
8372
      return this.ucx;
8373
    }
8374
 
8375
    public userExists_result setUcx(UserContextException ucx) {
8376
      this.ucx = ucx;
8377
      return this;
8378
    }
8379
 
8380
    public void unsetUcx() {
8381
      this.ucx = null;
8382
    }
8383
 
8384
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
8385
    public boolean isSetUcx() {
8386
      return this.ucx != null;
8387
    }
8388
 
8389
    public void setUcxIsSet(boolean value) {
123 ashish 8390
      if (!value) {
553 chandransh 8391
        this.ucx = null;
123 ashish 8392
      }
8393
    }
8394
 
553 chandransh 8395
    public void setFieldValue(_Fields field, Object value) {
8396
      switch (field) {
8397
      case SUCCESS:
8398
        if (value == null) {
8399
          unsetSuccess();
8400
        } else {
8401
          setSuccess((Boolean)value);
8402
        }
8403
        break;
8404
 
8405
      case UCX:
8406
        if (value == null) {
8407
          unsetUcx();
8408
        } else {
8409
          setUcx((UserContextException)value);
8410
        }
8411
        break;
8412
 
8413
      }
123 ashish 8414
    }
8415
 
553 chandransh 8416
    public void setFieldValue(int fieldID, Object value) {
8417
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8418
    }
8419
 
8420
    public Object getFieldValue(_Fields field) {
8421
      switch (field) {
8422
      case SUCCESS:
8423
        return new Boolean(isSuccess());
8424
 
8425
      case UCX:
8426
        return getUcx();
8427
 
8428
      }
8429
      throw new IllegalStateException();
8430
    }
8431
 
8432
    public Object getFieldValue(int fieldId) {
8433
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8434
    }
8435
 
8436
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8437
    public boolean isSet(_Fields field) {
8438
      switch (field) {
8439
      case SUCCESS:
8440
        return isSetSuccess();
8441
      case UCX:
8442
        return isSetUcx();
8443
      }
8444
      throw new IllegalStateException();
8445
    }
8446
 
8447
    public boolean isSet(int fieldID) {
8448
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8449
    }
8450
 
8451
    @Override
8452
    public boolean equals(Object that) {
8453
      if (that == null)
8454
        return false;
8455
      if (that instanceof userExists_result)
8456
        return this.equals((userExists_result)that);
8457
      return false;
8458
    }
8459
 
8460
    public boolean equals(userExists_result that) {
8461
      if (that == null)
8462
        return false;
8463
 
8464
      boolean this_present_success = true;
8465
      boolean that_present_success = true;
8466
      if (this_present_success || that_present_success) {
8467
        if (!(this_present_success && that_present_success))
8468
          return false;
8469
        if (this.success != that.success)
8470
          return false;
8471
      }
8472
 
8473
      boolean this_present_ucx = true && this.isSetUcx();
8474
      boolean that_present_ucx = true && that.isSetUcx();
8475
      if (this_present_ucx || that_present_ucx) {
8476
        if (!(this_present_ucx && that_present_ucx))
8477
          return false;
8478
        if (!this.ucx.equals(that.ucx))
8479
          return false;
8480
      }
8481
 
8482
      return true;
8483
    }
8484
 
8485
    @Override
8486
    public int hashCode() {
8487
      return 0;
8488
    }
8489
 
8490
    public int compareTo(userExists_result other) {
8491
      if (!getClass().equals(other.getClass())) {
8492
        return getClass().getName().compareTo(other.getClass().getName());
8493
      }
8494
 
8495
      int lastComparison = 0;
8496
      userExists_result typedOther = (userExists_result)other;
8497
 
8498
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8499
      if (lastComparison != 0) {
8500
        return lastComparison;
8501
      }
8502
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8503
      if (lastComparison != 0) {
8504
        return lastComparison;
8505
      }
8506
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
8507
      if (lastComparison != 0) {
8508
        return lastComparison;
8509
      }
8510
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
8511
      if (lastComparison != 0) {
8512
        return lastComparison;
8513
      }
8514
      return 0;
8515
    }
8516
 
8517
    public void read(TProtocol iprot) throws TException {
8518
      TField field;
8519
      iprot.readStructBegin();
8520
      while (true)
8521
      {
8522
        field = iprot.readFieldBegin();
8523
        if (field.type == TType.STOP) { 
8524
          break;
8525
        }
8526
        _Fields fieldId = _Fields.findByThriftId(field.id);
8527
        if (fieldId == null) {
8528
          TProtocolUtil.skip(iprot, field.type);
8529
        } else {
8530
          switch (fieldId) {
8531
            case SUCCESS:
8532
              if (field.type == TType.BOOL) {
8533
                this.success = iprot.readBool();
8534
                setSuccessIsSet(true);
8535
              } else { 
8536
                TProtocolUtil.skip(iprot, field.type);
8537
              }
8538
              break;
8539
            case UCX:
8540
              if (field.type == TType.STRUCT) {
8541
                this.ucx = new UserContextException();
8542
                this.ucx.read(iprot);
8543
              } else { 
8544
                TProtocolUtil.skip(iprot, field.type);
8545
              }
8546
              break;
8547
          }
8548
          iprot.readFieldEnd();
8549
        }
8550
      }
8551
      iprot.readStructEnd();
8552
      validate();
8553
    }
8554
 
8555
    public void write(TProtocol oprot) throws TException {
8556
      oprot.writeStructBegin(STRUCT_DESC);
8557
 
8558
      if (this.isSetSuccess()) {
8559
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8560
        oprot.writeBool(this.success);
8561
        oprot.writeFieldEnd();
8562
      } else if (this.isSetUcx()) {
8563
        oprot.writeFieldBegin(UCX_FIELD_DESC);
8564
        this.ucx.write(oprot);
8565
        oprot.writeFieldEnd();
8566
      }
8567
      oprot.writeFieldStop();
8568
      oprot.writeStructEnd();
8569
    }
8570
 
8571
    @Override
8572
    public String toString() {
8573
      StringBuilder sb = new StringBuilder("userExists_result(");
8574
      boolean first = true;
8575
 
8576
      sb.append("success:");
8577
      sb.append(this.success);
8578
      first = false;
8579
      if (!first) sb.append(", ");
8580
      sb.append("ucx:");
8581
      if (this.ucx == null) {
8582
        sb.append("null");
8583
      } else {
8584
        sb.append(this.ucx);
8585
      }
8586
      first = false;
8587
      sb.append(")");
8588
      return sb.toString();
8589
    }
8590
 
8591
    public void validate() throws TException {
8592
      // check for required fields
8593
    }
8594
 
8595
  }
8596
 
8597
  public static class addAddressForUser_args implements TBase<addAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_args>   {
8598
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_args");
8599
 
8600
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
8601
    private static final TField ADDRESS_FIELD_DESC = new TField("address", TType.STRUCT, (short)2);
571 rajveer 8602
    private static final TField SET_DEFAULT_FIELD_DESC = new TField("setDefault", TType.BOOL, (short)3);
553 chandransh 8603
 
8604
    private long userId;
8605
    private Address address;
8606
    private boolean setDefault;
8607
 
8608
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8609
    public enum _Fields implements TFieldIdEnum {
8610
      USER_ID((short)1, "userId"),
8611
      ADDRESS((short)2, "address"),
571 rajveer 8612
      SET_DEFAULT((short)3, "setDefault");
553 chandransh 8613
 
8614
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8615
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8616
 
8617
      static {
8618
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8619
          byId.put((int)field._thriftId, field);
8620
          byName.put(field.getFieldName(), field);
8621
        }
8622
      }
8623
 
8624
      /**
8625
       * Find the _Fields constant that matches fieldId, or null if its not found.
8626
       */
8627
      public static _Fields findByThriftId(int fieldId) {
8628
        return byId.get(fieldId);
8629
      }
8630
 
8631
      /**
8632
       * Find the _Fields constant that matches fieldId, throwing an exception
8633
       * if it is not found.
8634
       */
8635
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8636
        _Fields fields = findByThriftId(fieldId);
8637
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8638
        return fields;
8639
      }
8640
 
8641
      /**
8642
       * Find the _Fields constant that matches name, or null if its not found.
8643
       */
8644
      public static _Fields findByName(String name) {
8645
        return byName.get(name);
8646
      }
8647
 
8648
      private final short _thriftId;
8649
      private final String _fieldName;
8650
 
8651
      _Fields(short thriftId, String fieldName) {
8652
        _thriftId = thriftId;
8653
        _fieldName = fieldName;
8654
      }
8655
 
8656
      public short getThriftFieldId() {
8657
        return _thriftId;
8658
      }
8659
 
8660
      public String getFieldName() {
8661
        return _fieldName;
8662
      }
8663
    }
8664
 
8665
    // isset id assignments
8666
    private static final int __USERID_ISSET_ID = 0;
571 rajveer 8667
    private static final int __SETDEFAULT_ISSET_ID = 1;
8668
    private BitSet __isset_bit_vector = new BitSet(2);
553 chandransh 8669
 
8670
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8671
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
8672
          new FieldValueMetaData(TType.I64)));
8673
      put(_Fields.ADDRESS, new FieldMetaData("address", TFieldRequirementType.DEFAULT, 
8674
          new StructMetaData(TType.STRUCT, Address.class)));
8675
      put(_Fields.SET_DEFAULT, new FieldMetaData("setDefault", TFieldRequirementType.DEFAULT, 
8676
          new FieldValueMetaData(TType.BOOL)));
8677
    }});
8678
 
8679
    static {
8680
      FieldMetaData.addStructMetaDataMap(addAddressForUser_args.class, metaDataMap);
8681
    }
8682
 
8683
    public addAddressForUser_args() {
8684
    }
8685
 
8686
    public addAddressForUser_args(
8687
      long userId,
8688
      Address address,
8689
      boolean setDefault)
8690
    {
8691
      this();
8692
      this.userId = userId;
8693
      setUserIdIsSet(true);
8694
      this.address = address;
8695
      this.setDefault = setDefault;
8696
      setSetDefaultIsSet(true);
8697
    }
8698
 
8699
    /**
8700
     * Performs a deep copy on <i>other</i>.
8701
     */
8702
    public addAddressForUser_args(addAddressForUser_args other) {
8703
      __isset_bit_vector.clear();
8704
      __isset_bit_vector.or(other.__isset_bit_vector);
8705
      this.userId = other.userId;
8706
      if (other.isSetAddress()) {
8707
        this.address = new Address(other.address);
8708
      }
8709
      this.setDefault = other.setDefault;
8710
    }
8711
 
8712
    public addAddressForUser_args deepCopy() {
8713
      return new addAddressForUser_args(this);
8714
    }
8715
 
8716
    @Deprecated
8717
    public addAddressForUser_args clone() {
8718
      return new addAddressForUser_args(this);
8719
    }
8720
 
8721
    public long getUserId() {
8722
      return this.userId;
8723
    }
8724
 
8725
    public addAddressForUser_args setUserId(long userId) {
8726
      this.userId = userId;
8727
      setUserIdIsSet(true);
123 ashish 8728
      return this;
8729
    }
8730
 
553 chandransh 8731
    public void unsetUserId() {
8732
      __isset_bit_vector.clear(__USERID_ISSET_ID);
123 ashish 8733
    }
8734
 
553 chandransh 8735
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
8736
    public boolean isSetUserId() {
8737
      return __isset_bit_vector.get(__USERID_ISSET_ID);
123 ashish 8738
    }
8739
 
553 chandransh 8740
    public void setUserIdIsSet(boolean value) {
8741
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
8742
    }
8743
 
8744
    public Address getAddress() {
8745
      return this.address;
8746
    }
8747
 
8748
    public addAddressForUser_args setAddress(Address address) {
8749
      this.address = address;
8750
      return this;
8751
    }
8752
 
8753
    public void unsetAddress() {
8754
      this.address = null;
8755
    }
8756
 
8757
    /** Returns true if field address is set (has been asigned a value) and false otherwise */
8758
    public boolean isSetAddress() {
8759
      return this.address != null;
8760
    }
8761
 
8762
    public void setAddressIsSet(boolean value) {
123 ashish 8763
      if (!value) {
553 chandransh 8764
        this.address = null;
123 ashish 8765
      }
8766
    }
8767
 
553 chandransh 8768
    public boolean isSetDefault() {
8769
      return this.setDefault;
8770
    }
8771
 
8772
    public addAddressForUser_args setSetDefault(boolean setDefault) {
8773
      this.setDefault = setDefault;
8774
      setSetDefaultIsSet(true);
8775
      return this;
8776
    }
8777
 
8778
    public void unsetSetDefault() {
8779
      __isset_bit_vector.clear(__SETDEFAULT_ISSET_ID);
8780
    }
8781
 
8782
    /** Returns true if field setDefault is set (has been asigned a value) and false otherwise */
8783
    public boolean isSetSetDefault() {
8784
      return __isset_bit_vector.get(__SETDEFAULT_ISSET_ID);
8785
    }
8786
 
8787
    public void setSetDefaultIsSet(boolean value) {
8788
      __isset_bit_vector.set(__SETDEFAULT_ISSET_ID, value);
8789
    }
8790
 
123 ashish 8791
    public void setFieldValue(_Fields field, Object value) {
8792
      switch (field) {
553 chandransh 8793
      case USER_ID:
123 ashish 8794
        if (value == null) {
553 chandransh 8795
          unsetUserId();
123 ashish 8796
        } else {
553 chandransh 8797
          setUserId((Long)value);
123 ashish 8798
        }
8799
        break;
8800
 
553 chandransh 8801
      case ADDRESS:
123 ashish 8802
        if (value == null) {
553 chandransh 8803
          unsetAddress();
123 ashish 8804
        } else {
553 chandransh 8805
          setAddress((Address)value);
123 ashish 8806
        }
8807
        break;
8808
 
553 chandransh 8809
      case SET_DEFAULT:
8810
        if (value == null) {
8811
          unsetSetDefault();
8812
        } else {
8813
          setSetDefault((Boolean)value);
8814
        }
8815
        break;
8816
 
123 ashish 8817
      }
8818
    }
8819
 
8820
    public void setFieldValue(int fieldID, Object value) {
8821
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8822
    }
8823
 
8824
    public Object getFieldValue(_Fields field) {
8825
      switch (field) {
553 chandransh 8826
      case USER_ID:
8827
        return new Long(getUserId());
123 ashish 8828
 
553 chandransh 8829
      case ADDRESS:
8830
        return getAddress();
123 ashish 8831
 
553 chandransh 8832
      case SET_DEFAULT:
8833
        return new Boolean(isSetDefault());
8834
 
123 ashish 8835
      }
8836
      throw new IllegalStateException();
8837
    }
8838
 
8839
    public Object getFieldValue(int fieldId) {
8840
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8841
    }
8842
 
8843
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8844
    public boolean isSet(_Fields field) {
8845
      switch (field) {
553 chandransh 8846
      case USER_ID:
8847
        return isSetUserId();
8848
      case ADDRESS:
8849
        return isSetAddress();
8850
      case SET_DEFAULT:
8851
        return isSetSetDefault();
123 ashish 8852
      }
8853
      throw new IllegalStateException();
8854
    }
8855
 
8856
    public boolean isSet(int fieldID) {
8857
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8858
    }
8859
 
8860
    @Override
8861
    public boolean equals(Object that) {
8862
      if (that == null)
8863
        return false;
553 chandransh 8864
      if (that instanceof addAddressForUser_args)
8865
        return this.equals((addAddressForUser_args)that);
123 ashish 8866
      return false;
8867
    }
8868
 
553 chandransh 8869
    public boolean equals(addAddressForUser_args that) {
123 ashish 8870
      if (that == null)
8871
        return false;
8872
 
553 chandransh 8873
      boolean this_present_userId = true;
8874
      boolean that_present_userId = true;
8875
      if (this_present_userId || that_present_userId) {
8876
        if (!(this_present_userId && that_present_userId))
123 ashish 8877
          return false;
553 chandransh 8878
        if (this.userId != that.userId)
123 ashish 8879
          return false;
8880
      }
8881
 
553 chandransh 8882
      boolean this_present_address = true && this.isSetAddress();
8883
      boolean that_present_address = true && that.isSetAddress();
8884
      if (this_present_address || that_present_address) {
8885
        if (!(this_present_address && that_present_address))
123 ashish 8886
          return false;
553 chandransh 8887
        if (!this.address.equals(that.address))
123 ashish 8888
          return false;
8889
      }
8890
 
553 chandransh 8891
      boolean this_present_setDefault = true;
8892
      boolean that_present_setDefault = true;
8893
      if (this_present_setDefault || that_present_setDefault) {
8894
        if (!(this_present_setDefault && that_present_setDefault))
8895
          return false;
8896
        if (this.setDefault != that.setDefault)
8897
          return false;
8898
      }
8899
 
123 ashish 8900
      return true;
8901
    }
8902
 
8903
    @Override
8904
    public int hashCode() {
8905
      return 0;
8906
    }
8907
 
553 chandransh 8908
    public int compareTo(addAddressForUser_args other) {
123 ashish 8909
      if (!getClass().equals(other.getClass())) {
8910
        return getClass().getName().compareTo(other.getClass().getName());
8911
      }
8912
 
8913
      int lastComparison = 0;
553 chandransh 8914
      addAddressForUser_args typedOther = (addAddressForUser_args)other;
123 ashish 8915
 
553 chandransh 8916
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
123 ashish 8917
      if (lastComparison != 0) {
8918
        return lastComparison;
8919
      }
553 chandransh 8920
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
123 ashish 8921
      if (lastComparison != 0) {
8922
        return lastComparison;
8923
      }
553 chandransh 8924
      lastComparison = Boolean.valueOf(isSetAddress()).compareTo(isSetAddress());
123 ashish 8925
      if (lastComparison != 0) {
8926
        return lastComparison;
8927
      }
553 chandransh 8928
      lastComparison = TBaseHelper.compareTo(address, typedOther.address);
123 ashish 8929
      if (lastComparison != 0) {
8930
        return lastComparison;
8931
      }
553 chandransh 8932
      lastComparison = Boolean.valueOf(isSetSetDefault()).compareTo(isSetSetDefault());
8933
      if (lastComparison != 0) {
8934
        return lastComparison;
8935
      }
8936
      lastComparison = TBaseHelper.compareTo(setDefault, typedOther.setDefault);
8937
      if (lastComparison != 0) {
8938
        return lastComparison;
8939
      }
123 ashish 8940
      return 0;
8941
    }
8942
 
8943
    public void read(TProtocol iprot) throws TException {
8944
      TField field;
8945
      iprot.readStructBegin();
8946
      while (true)
8947
      {
8948
        field = iprot.readFieldBegin();
8949
        if (field.type == TType.STOP) { 
8950
          break;
8951
        }
8952
        _Fields fieldId = _Fields.findByThriftId(field.id);
8953
        if (fieldId == null) {
8954
          TProtocolUtil.skip(iprot, field.type);
8955
        } else {
8956
          switch (fieldId) {
553 chandransh 8957
            case USER_ID:
8958
              if (field.type == TType.I64) {
8959
                this.userId = iprot.readI64();
8960
                setUserIdIsSet(true);
123 ashish 8961
              } else { 
8962
                TProtocolUtil.skip(iprot, field.type);
8963
              }
8964
              break;
553 chandransh 8965
            case ADDRESS:
8966
              if (field.type == TType.STRUCT) {
8967
                this.address = new Address();
8968
                this.address.read(iprot);
123 ashish 8969
              } else { 
8970
                TProtocolUtil.skip(iprot, field.type);
8971
              }
8972
              break;
553 chandransh 8973
            case SET_DEFAULT:
123 ashish 8974
              if (field.type == TType.BOOL) {
553 chandransh 8975
                this.setDefault = iprot.readBool();
8976
                setSetDefaultIsSet(true);
123 ashish 8977
              } else { 
8978
                TProtocolUtil.skip(iprot, field.type);
8979
              }
8980
              break;
8981
          }
8982
          iprot.readFieldEnd();
8983
        }
8984
      }
8985
      iprot.readStructEnd();
8986
      validate();
8987
    }
8988
 
8989
    public void write(TProtocol oprot) throws TException {
8990
      validate();
8991
 
8992
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 8993
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
8994
      oprot.writeI64(this.userId);
8995
      oprot.writeFieldEnd();
8996
      if (this.address != null) {
8997
        oprot.writeFieldBegin(ADDRESS_FIELD_DESC);
8998
        this.address.write(oprot);
123 ashish 8999
        oprot.writeFieldEnd();
9000
      }
553 chandransh 9001
      oprot.writeFieldBegin(SET_DEFAULT_FIELD_DESC);
9002
      oprot.writeBool(this.setDefault);
9003
      oprot.writeFieldEnd();
123 ashish 9004
      oprot.writeFieldStop();
9005
      oprot.writeStructEnd();
9006
    }
9007
 
9008
    @Override
9009
    public String toString() {
553 chandransh 9010
      StringBuilder sb = new StringBuilder("addAddressForUser_args(");
123 ashish 9011
      boolean first = true;
9012
 
553 chandransh 9013
      sb.append("userId:");
9014
      sb.append(this.userId);
123 ashish 9015
      first = false;
9016
      if (!first) sb.append(", ");
553 chandransh 9017
      sb.append("address:");
9018
      if (this.address == null) {
123 ashish 9019
        sb.append("null");
9020
      } else {
553 chandransh 9021
        sb.append(this.address);
123 ashish 9022
      }
9023
      first = false;
9024
      if (!first) sb.append(", ");
553 chandransh 9025
      sb.append("setDefault:");
9026
      sb.append(this.setDefault);
9027
      first = false;
123 ashish 9028
      sb.append(")");
9029
      return sb.toString();
9030
    }
9031
 
9032
    public void validate() throws TException {
9033
      // check for required fields
9034
    }
9035
 
9036
  }
9037
 
553 chandransh 9038
  public static class addAddressForUser_result implements TBase<addAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressForUser_result>   {
9039
    private static final TStruct STRUCT_DESC = new TStruct("addAddressForUser_result");
123 ashish 9040
 
571 rajveer 9041
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 9042
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
123 ashish 9043
 
571 rajveer 9044
    private long success;
553 chandransh 9045
    private UserContextException ucx;
123 ashish 9046
 
9047
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9048
    public enum _Fields implements TFieldIdEnum {
9049
      SUCCESS((short)0, "success"),
553 chandransh 9050
      UCX((short)1, "ucx");
123 ashish 9051
 
9052
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9053
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9054
 
9055
      static {
9056
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9057
          byId.put((int)field._thriftId, field);
9058
          byName.put(field.getFieldName(), field);
9059
        }
9060
      }
9061
 
9062
      /**
9063
       * Find the _Fields constant that matches fieldId, or null if its not found.
9064
       */
9065
      public static _Fields findByThriftId(int fieldId) {
9066
        return byId.get(fieldId);
9067
      }
9068
 
9069
      /**
9070
       * Find the _Fields constant that matches fieldId, throwing an exception
9071
       * if it is not found.
9072
       */
9073
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9074
        _Fields fields = findByThriftId(fieldId);
9075
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9076
        return fields;
9077
      }
9078
 
9079
      /**
9080
       * Find the _Fields constant that matches name, or null if its not found.
9081
       */
9082
      public static _Fields findByName(String name) {
9083
        return byName.get(name);
9084
      }
9085
 
9086
      private final short _thriftId;
9087
      private final String _fieldName;
9088
 
9089
      _Fields(short thriftId, String fieldName) {
9090
        _thriftId = thriftId;
9091
        _fieldName = fieldName;
9092
      }
9093
 
9094
      public short getThriftFieldId() {
9095
        return _thriftId;
9096
      }
9097
 
9098
      public String getFieldName() {
9099
        return _fieldName;
9100
      }
9101
    }
9102
 
9103
    // isset id assignments
9104
    private static final int __SUCCESS_ISSET_ID = 0;
9105
    private BitSet __isset_bit_vector = new BitSet(1);
9106
 
9107
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9108
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
571 rajveer 9109
          new FieldValueMetaData(TType.I64)));
553 chandransh 9110
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
123 ashish 9111
          new FieldValueMetaData(TType.STRUCT)));
9112
    }});
9113
 
9114
    static {
553 chandransh 9115
      FieldMetaData.addStructMetaDataMap(addAddressForUser_result.class, metaDataMap);
123 ashish 9116
    }
9117
 
553 chandransh 9118
    public addAddressForUser_result() {
123 ashish 9119
    }
9120
 
553 chandransh 9121
    public addAddressForUser_result(
571 rajveer 9122
      long success,
553 chandransh 9123
      UserContextException ucx)
123 ashish 9124
    {
9125
      this();
9126
      this.success = success;
9127
      setSuccessIsSet(true);
553 chandransh 9128
      this.ucx = ucx;
123 ashish 9129
    }
9130
 
9131
    /**
9132
     * Performs a deep copy on <i>other</i>.
9133
     */
553 chandransh 9134
    public addAddressForUser_result(addAddressForUser_result other) {
123 ashish 9135
      __isset_bit_vector.clear();
9136
      __isset_bit_vector.or(other.__isset_bit_vector);
9137
      this.success = other.success;
553 chandransh 9138
      if (other.isSetUcx()) {
9139
        this.ucx = new UserContextException(other.ucx);
123 ashish 9140
      }
9141
    }
9142
 
553 chandransh 9143
    public addAddressForUser_result deepCopy() {
9144
      return new addAddressForUser_result(this);
123 ashish 9145
    }
9146
 
9147
    @Deprecated
553 chandransh 9148
    public addAddressForUser_result clone() {
9149
      return new addAddressForUser_result(this);
123 ashish 9150
    }
9151
 
571 rajveer 9152
    public long getSuccess() {
123 ashish 9153
      return this.success;
9154
    }
9155
 
571 rajveer 9156
    public addAddressForUser_result setSuccess(long success) {
123 ashish 9157
      this.success = success;
9158
      setSuccessIsSet(true);
9159
      return this;
9160
    }
9161
 
9162
    public void unsetSuccess() {
9163
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9164
    }
9165
 
9166
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9167
    public boolean isSetSuccess() {
9168
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9169
    }
9170
 
9171
    public void setSuccessIsSet(boolean value) {
9172
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9173
    }
9174
 
553 chandransh 9175
    public UserContextException getUcx() {
9176
      return this.ucx;
123 ashish 9177
    }
9178
 
553 chandransh 9179
    public addAddressForUser_result setUcx(UserContextException ucx) {
9180
      this.ucx = ucx;
123 ashish 9181
      return this;
9182
    }
9183
 
553 chandransh 9184
    public void unsetUcx() {
9185
      this.ucx = null;
123 ashish 9186
    }
9187
 
553 chandransh 9188
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9189
    public boolean isSetUcx() {
9190
      return this.ucx != null;
123 ashish 9191
    }
9192
 
553 chandransh 9193
    public void setUcxIsSet(boolean value) {
123 ashish 9194
      if (!value) {
553 chandransh 9195
        this.ucx = null;
123 ashish 9196
      }
9197
    }
9198
 
9199
    public void setFieldValue(_Fields field, Object value) {
9200
      switch (field) {
9201
      case SUCCESS:
9202
        if (value == null) {
9203
          unsetSuccess();
9204
        } else {
571 rajveer 9205
          setSuccess((Long)value);
123 ashish 9206
        }
9207
        break;
9208
 
553 chandransh 9209
      case UCX:
123 ashish 9210
        if (value == null) {
553 chandransh 9211
          unsetUcx();
123 ashish 9212
        } else {
553 chandransh 9213
          setUcx((UserContextException)value);
123 ashish 9214
        }
9215
        break;
9216
 
9217
      }
9218
    }
9219
 
9220
    public void setFieldValue(int fieldID, Object value) {
9221
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9222
    }
9223
 
9224
    public Object getFieldValue(_Fields field) {
9225
      switch (field) {
9226
      case SUCCESS:
571 rajveer 9227
        return new Long(getSuccess());
123 ashish 9228
 
553 chandransh 9229
      case UCX:
9230
        return getUcx();
123 ashish 9231
 
9232
      }
9233
      throw new IllegalStateException();
9234
    }
9235
 
9236
    public Object getFieldValue(int fieldId) {
9237
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9238
    }
9239
 
9240
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9241
    public boolean isSet(_Fields field) {
9242
      switch (field) {
9243
      case SUCCESS:
9244
        return isSetSuccess();
553 chandransh 9245
      case UCX:
9246
        return isSetUcx();
123 ashish 9247
      }
9248
      throw new IllegalStateException();
9249
    }
9250
 
9251
    public boolean isSet(int fieldID) {
9252
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9253
    }
9254
 
9255
    @Override
9256
    public boolean equals(Object that) {
9257
      if (that == null)
9258
        return false;
553 chandransh 9259
      if (that instanceof addAddressForUser_result)
9260
        return this.equals((addAddressForUser_result)that);
123 ashish 9261
      return false;
9262
    }
9263
 
553 chandransh 9264
    public boolean equals(addAddressForUser_result that) {
123 ashish 9265
      if (that == null)
9266
        return false;
9267
 
9268
      boolean this_present_success = true;
9269
      boolean that_present_success = true;
9270
      if (this_present_success || that_present_success) {
9271
        if (!(this_present_success && that_present_success))
9272
          return false;
9273
        if (this.success != that.success)
9274
          return false;
9275
      }
9276
 
553 chandransh 9277
      boolean this_present_ucx = true && this.isSetUcx();
9278
      boolean that_present_ucx = true && that.isSetUcx();
9279
      if (this_present_ucx || that_present_ucx) {
9280
        if (!(this_present_ucx && that_present_ucx))
123 ashish 9281
          return false;
553 chandransh 9282
        if (!this.ucx.equals(that.ucx))
123 ashish 9283
          return false;
9284
      }
9285
 
9286
      return true;
9287
    }
9288
 
9289
    @Override
9290
    public int hashCode() {
9291
      return 0;
9292
    }
9293
 
553 chandransh 9294
    public int compareTo(addAddressForUser_result other) {
123 ashish 9295
      if (!getClass().equals(other.getClass())) {
9296
        return getClass().getName().compareTo(other.getClass().getName());
9297
      }
9298
 
9299
      int lastComparison = 0;
553 chandransh 9300
      addAddressForUser_result typedOther = (addAddressForUser_result)other;
123 ashish 9301
 
9302
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9303
      if (lastComparison != 0) {
9304
        return lastComparison;
9305
      }
9306
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9307
      if (lastComparison != 0) {
9308
        return lastComparison;
9309
      }
553 chandransh 9310
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
123 ashish 9311
      if (lastComparison != 0) {
9312
        return lastComparison;
9313
      }
553 chandransh 9314
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
123 ashish 9315
      if (lastComparison != 0) {
9316
        return lastComparison;
9317
      }
9318
      return 0;
9319
    }
9320
 
9321
    public void read(TProtocol iprot) throws TException {
9322
      TField field;
9323
      iprot.readStructBegin();
9324
      while (true)
9325
      {
9326
        field = iprot.readFieldBegin();
9327
        if (field.type == TType.STOP) { 
9328
          break;
9329
        }
9330
        _Fields fieldId = _Fields.findByThriftId(field.id);
9331
        if (fieldId == null) {
9332
          TProtocolUtil.skip(iprot, field.type);
9333
        } else {
9334
          switch (fieldId) {
9335
            case SUCCESS:
571 rajveer 9336
              if (field.type == TType.I64) {
9337
                this.success = iprot.readI64();
123 ashish 9338
                setSuccessIsSet(true);
9339
              } else { 
9340
                TProtocolUtil.skip(iprot, field.type);
9341
              }
9342
              break;
553 chandransh 9343
            case UCX:
123 ashish 9344
              if (field.type == TType.STRUCT) {
553 chandransh 9345
                this.ucx = new UserContextException();
9346
                this.ucx.read(iprot);
123 ashish 9347
              } else { 
9348
                TProtocolUtil.skip(iprot, field.type);
9349
              }
9350
              break;
9351
          }
9352
          iprot.readFieldEnd();
9353
        }
9354
      }
9355
      iprot.readStructEnd();
9356
      validate();
9357
    }
9358
 
9359
    public void write(TProtocol oprot) throws TException {
9360
      oprot.writeStructBegin(STRUCT_DESC);
9361
 
9362
      if (this.isSetSuccess()) {
9363
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
571 rajveer 9364
        oprot.writeI64(this.success);
123 ashish 9365
        oprot.writeFieldEnd();
553 chandransh 9366
      } else if (this.isSetUcx()) {
9367
        oprot.writeFieldBegin(UCX_FIELD_DESC);
9368
        this.ucx.write(oprot);
123 ashish 9369
        oprot.writeFieldEnd();
9370
      }
9371
      oprot.writeFieldStop();
9372
      oprot.writeStructEnd();
9373
    }
9374
 
9375
    @Override
9376
    public String toString() {
553 chandransh 9377
      StringBuilder sb = new StringBuilder("addAddressForUser_result(");
123 ashish 9378
      boolean first = true;
9379
 
9380
      sb.append("success:");
9381
      sb.append(this.success);
9382
      first = false;
9383
      if (!first) sb.append(", ");
553 chandransh 9384
      sb.append("ucx:");
9385
      if (this.ucx == null) {
123 ashish 9386
        sb.append("null");
9387
      } else {
553 chandransh 9388
        sb.append(this.ucx);
123 ashish 9389
      }
9390
      first = false;
9391
      sb.append(")");
9392
      return sb.toString();
9393
    }
9394
 
9395
    public void validate() throws TException {
9396
      // check for required fields
9397
    }
9398
 
9399
  }
9400
 
553 chandransh 9401
  public static class removeAddressForUser_args implements TBase<removeAddressForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_args>   {
9402
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_args");
48 ashish 9403
 
553 chandransh 9404
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
9405
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
48 ashish 9406
 
553 chandransh 9407
    private long userid;
9408
    private long addressId;
48 ashish 9409
 
9410
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9411
    public enum _Fields implements TFieldIdEnum {
553 chandransh 9412
      USERID((short)1, "userid"),
9413
      ADDRESS_ID((short)2, "addressId");
48 ashish 9414
 
9415
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9417
 
9418
      static {
9419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9420
          byId.put((int)field._thriftId, field);
9421
          byName.put(field.getFieldName(), field);
9422
        }
9423
      }
9424
 
9425
      /**
9426
       * Find the _Fields constant that matches fieldId, or null if its not found.
9427
       */
9428
      public static _Fields findByThriftId(int fieldId) {
9429
        return byId.get(fieldId);
9430
      }
9431
 
9432
      /**
9433
       * Find the _Fields constant that matches fieldId, throwing an exception
9434
       * if it is not found.
9435
       */
9436
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9437
        _Fields fields = findByThriftId(fieldId);
9438
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9439
        return fields;
9440
      }
9441
 
9442
      /**
9443
       * Find the _Fields constant that matches name, or null if its not found.
9444
       */
9445
      public static _Fields findByName(String name) {
9446
        return byName.get(name);
9447
      }
9448
 
9449
      private final short _thriftId;
9450
      private final String _fieldName;
9451
 
9452
      _Fields(short thriftId, String fieldName) {
9453
        _thriftId = thriftId;
9454
        _fieldName = fieldName;
9455
      }
9456
 
9457
      public short getThriftFieldId() {
9458
        return _thriftId;
9459
      }
9460
 
9461
      public String getFieldName() {
9462
        return _fieldName;
9463
      }
9464
    }
9465
 
9466
    // isset id assignments
553 chandransh 9467
    private static final int __USERID_ISSET_ID = 0;
9468
    private static final int __ADDRESSID_ISSET_ID = 1;
9469
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 9470
 
9471
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 9472
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
9473
          new FieldValueMetaData(TType.I64)));
9474
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
9475
          new FieldValueMetaData(TType.I64)));
48 ashish 9476
    }});
9477
 
9478
    static {
553 chandransh 9479
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_args.class, metaDataMap);
48 ashish 9480
    }
9481
 
553 chandransh 9482
    public removeAddressForUser_args() {
48 ashish 9483
    }
9484
 
553 chandransh 9485
    public removeAddressForUser_args(
9486
      long userid,
9487
      long addressId)
48 ashish 9488
    {
9489
      this();
553 chandransh 9490
      this.userid = userid;
9491
      setUseridIsSet(true);
9492
      this.addressId = addressId;
9493
      setAddressIdIsSet(true);
48 ashish 9494
    }
9495
 
9496
    /**
9497
     * Performs a deep copy on <i>other</i>.
9498
     */
553 chandransh 9499
    public removeAddressForUser_args(removeAddressForUser_args other) {
9500
      __isset_bit_vector.clear();
9501
      __isset_bit_vector.or(other.__isset_bit_vector);
9502
      this.userid = other.userid;
9503
      this.addressId = other.addressId;
48 ashish 9504
    }
9505
 
553 chandransh 9506
    public removeAddressForUser_args deepCopy() {
9507
      return new removeAddressForUser_args(this);
48 ashish 9508
    }
9509
 
9510
    @Deprecated
553 chandransh 9511
    public removeAddressForUser_args clone() {
9512
      return new removeAddressForUser_args(this);
48 ashish 9513
    }
9514
 
553 chandransh 9515
    public long getUserid() {
9516
      return this.userid;
48 ashish 9517
    }
9518
 
553 chandransh 9519
    public removeAddressForUser_args setUserid(long userid) {
9520
      this.userid = userid;
9521
      setUseridIsSet(true);
48 ashish 9522
      return this;
9523
    }
9524
 
553 chandransh 9525
    public void unsetUserid() {
9526
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 9527
    }
9528
 
553 chandransh 9529
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
9530
    public boolean isSetUserid() {
9531
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 9532
    }
9533
 
553 chandransh 9534
    public void setUseridIsSet(boolean value) {
9535
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 9536
    }
9537
 
553 chandransh 9538
    public long getAddressId() {
9539
      return this.addressId;
9540
    }
9541
 
9542
    public removeAddressForUser_args setAddressId(long addressId) {
9543
      this.addressId = addressId;
9544
      setAddressIdIsSet(true);
9545
      return this;
9546
    }
9547
 
9548
    public void unsetAddressId() {
9549
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
9550
    }
9551
 
9552
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
9553
    public boolean isSetAddressId() {
9554
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
9555
    }
9556
 
9557
    public void setAddressIdIsSet(boolean value) {
9558
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
9559
    }
9560
 
48 ashish 9561
    public void setFieldValue(_Fields field, Object value) {
9562
      switch (field) {
553 chandransh 9563
      case USERID:
48 ashish 9564
        if (value == null) {
553 chandransh 9565
          unsetUserid();
48 ashish 9566
        } else {
553 chandransh 9567
          setUserid((Long)value);
48 ashish 9568
        }
9569
        break;
9570
 
553 chandransh 9571
      case ADDRESS_ID:
9572
        if (value == null) {
9573
          unsetAddressId();
9574
        } else {
9575
          setAddressId((Long)value);
9576
        }
9577
        break;
9578
 
48 ashish 9579
      }
9580
    }
9581
 
9582
    public void setFieldValue(int fieldID, Object value) {
9583
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9584
    }
9585
 
9586
    public Object getFieldValue(_Fields field) {
9587
      switch (field) {
553 chandransh 9588
      case USERID:
9589
        return new Long(getUserid());
48 ashish 9590
 
553 chandransh 9591
      case ADDRESS_ID:
9592
        return new Long(getAddressId());
9593
 
48 ashish 9594
      }
9595
      throw new IllegalStateException();
9596
    }
9597
 
9598
    public Object getFieldValue(int fieldId) {
9599
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9600
    }
9601
 
9602
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9603
    public boolean isSet(_Fields field) {
9604
      switch (field) {
553 chandransh 9605
      case USERID:
9606
        return isSetUserid();
9607
      case ADDRESS_ID:
9608
        return isSetAddressId();
48 ashish 9609
      }
9610
      throw new IllegalStateException();
9611
    }
9612
 
9613
    public boolean isSet(int fieldID) {
9614
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9615
    }
9616
 
9617
    @Override
9618
    public boolean equals(Object that) {
9619
      if (that == null)
9620
        return false;
553 chandransh 9621
      if (that instanceof removeAddressForUser_args)
9622
        return this.equals((removeAddressForUser_args)that);
48 ashish 9623
      return false;
9624
    }
9625
 
553 chandransh 9626
    public boolean equals(removeAddressForUser_args that) {
48 ashish 9627
      if (that == null)
9628
        return false;
9629
 
553 chandransh 9630
      boolean this_present_userid = true;
9631
      boolean that_present_userid = true;
9632
      if (this_present_userid || that_present_userid) {
9633
        if (!(this_present_userid && that_present_userid))
48 ashish 9634
          return false;
553 chandransh 9635
        if (this.userid != that.userid)
48 ashish 9636
          return false;
9637
      }
9638
 
553 chandransh 9639
      boolean this_present_addressId = true;
9640
      boolean that_present_addressId = true;
9641
      if (this_present_addressId || that_present_addressId) {
9642
        if (!(this_present_addressId && that_present_addressId))
9643
          return false;
9644
        if (this.addressId != that.addressId)
9645
          return false;
9646
      }
9647
 
48 ashish 9648
      return true;
9649
    }
9650
 
9651
    @Override
9652
    public int hashCode() {
9653
      return 0;
9654
    }
9655
 
553 chandransh 9656
    public int compareTo(removeAddressForUser_args other) {
48 ashish 9657
      if (!getClass().equals(other.getClass())) {
9658
        return getClass().getName().compareTo(other.getClass().getName());
9659
      }
9660
 
9661
      int lastComparison = 0;
553 chandransh 9662
      removeAddressForUser_args typedOther = (removeAddressForUser_args)other;
48 ashish 9663
 
553 chandransh 9664
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 9665
      if (lastComparison != 0) {
9666
        return lastComparison;
9667
      }
553 chandransh 9668
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 9669
      if (lastComparison != 0) {
9670
        return lastComparison;
9671
      }
553 chandransh 9672
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
9673
      if (lastComparison != 0) {
9674
        return lastComparison;
9675
      }
9676
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
9677
      if (lastComparison != 0) {
9678
        return lastComparison;
9679
      }
48 ashish 9680
      return 0;
9681
    }
9682
 
9683
    public void read(TProtocol iprot) throws TException {
9684
      TField field;
9685
      iprot.readStructBegin();
9686
      while (true)
9687
      {
9688
        field = iprot.readFieldBegin();
9689
        if (field.type == TType.STOP) { 
9690
          break;
9691
        }
9692
        _Fields fieldId = _Fields.findByThriftId(field.id);
9693
        if (fieldId == null) {
9694
          TProtocolUtil.skip(iprot, field.type);
9695
        } else {
9696
          switch (fieldId) {
553 chandransh 9697
            case USERID:
9698
              if (field.type == TType.I64) {
9699
                this.userid = iprot.readI64();
9700
                setUseridIsSet(true);
48 ashish 9701
              } else { 
9702
                TProtocolUtil.skip(iprot, field.type);
9703
              }
9704
              break;
553 chandransh 9705
            case ADDRESS_ID:
9706
              if (field.type == TType.I64) {
9707
                this.addressId = iprot.readI64();
9708
                setAddressIdIsSet(true);
9709
              } else { 
9710
                TProtocolUtil.skip(iprot, field.type);
9711
              }
9712
              break;
48 ashish 9713
          }
9714
          iprot.readFieldEnd();
9715
        }
9716
      }
9717
      iprot.readStructEnd();
9718
      validate();
9719
    }
9720
 
9721
    public void write(TProtocol oprot) throws TException {
9722
      validate();
9723
 
9724
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 9725
      oprot.writeFieldBegin(USERID_FIELD_DESC);
9726
      oprot.writeI64(this.userid);
9727
      oprot.writeFieldEnd();
9728
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
9729
      oprot.writeI64(this.addressId);
9730
      oprot.writeFieldEnd();
48 ashish 9731
      oprot.writeFieldStop();
9732
      oprot.writeStructEnd();
9733
    }
9734
 
9735
    @Override
9736
    public String toString() {
553 chandransh 9737
      StringBuilder sb = new StringBuilder("removeAddressForUser_args(");
48 ashish 9738
      boolean first = true;
9739
 
553 chandransh 9740
      sb.append("userid:");
9741
      sb.append(this.userid);
48 ashish 9742
      first = false;
553 chandransh 9743
      if (!first) sb.append(", ");
9744
      sb.append("addressId:");
9745
      sb.append(this.addressId);
9746
      first = false;
48 ashish 9747
      sb.append(")");
9748
      return sb.toString();
9749
    }
9750
 
9751
    public void validate() throws TException {
9752
      // check for required fields
9753
    }
9754
 
9755
  }
9756
 
553 chandransh 9757
  public static class removeAddressForUser_result implements TBase<removeAddressForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<removeAddressForUser_result>   {
9758
    private static final TStruct STRUCT_DESC = new TStruct("removeAddressForUser_result");
48 ashish 9759
 
9760
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
9761
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
9762
 
9763
    private boolean success;
9764
    private UserContextException ucx;
9765
 
9766
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9767
    public enum _Fields implements TFieldIdEnum {
9768
      SUCCESS((short)0, "success"),
9769
      UCX((short)1, "ucx");
9770
 
9771
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9772
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9773
 
9774
      static {
9775
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9776
          byId.put((int)field._thriftId, field);
9777
          byName.put(field.getFieldName(), field);
9778
        }
9779
      }
9780
 
9781
      /**
9782
       * Find the _Fields constant that matches fieldId, or null if its not found.
9783
       */
9784
      public static _Fields findByThriftId(int fieldId) {
9785
        return byId.get(fieldId);
9786
      }
9787
 
9788
      /**
9789
       * Find the _Fields constant that matches fieldId, throwing an exception
9790
       * if it is not found.
9791
       */
9792
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9793
        _Fields fields = findByThriftId(fieldId);
9794
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9795
        return fields;
9796
      }
9797
 
9798
      /**
9799
       * Find the _Fields constant that matches name, or null if its not found.
9800
       */
9801
      public static _Fields findByName(String name) {
9802
        return byName.get(name);
9803
      }
9804
 
9805
      private final short _thriftId;
9806
      private final String _fieldName;
9807
 
9808
      _Fields(short thriftId, String fieldName) {
9809
        _thriftId = thriftId;
9810
        _fieldName = fieldName;
9811
      }
9812
 
9813
      public short getThriftFieldId() {
9814
        return _thriftId;
9815
      }
9816
 
9817
      public String getFieldName() {
9818
        return _fieldName;
9819
      }
9820
    }
9821
 
9822
    // isset id assignments
9823
    private static final int __SUCCESS_ISSET_ID = 0;
9824
    private BitSet __isset_bit_vector = new BitSet(1);
9825
 
9826
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9827
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9828
          new FieldValueMetaData(TType.BOOL)));
9829
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
9830
          new FieldValueMetaData(TType.STRUCT)));
9831
    }});
9832
 
9833
    static {
553 chandransh 9834
      FieldMetaData.addStructMetaDataMap(removeAddressForUser_result.class, metaDataMap);
48 ashish 9835
    }
9836
 
553 chandransh 9837
    public removeAddressForUser_result() {
48 ashish 9838
    }
9839
 
553 chandransh 9840
    public removeAddressForUser_result(
48 ashish 9841
      boolean success,
9842
      UserContextException ucx)
9843
    {
9844
      this();
9845
      this.success = success;
9846
      setSuccessIsSet(true);
9847
      this.ucx = ucx;
9848
    }
9849
 
9850
    /**
9851
     * Performs a deep copy on <i>other</i>.
9852
     */
553 chandransh 9853
    public removeAddressForUser_result(removeAddressForUser_result other) {
48 ashish 9854
      __isset_bit_vector.clear();
9855
      __isset_bit_vector.or(other.__isset_bit_vector);
9856
      this.success = other.success;
9857
      if (other.isSetUcx()) {
9858
        this.ucx = new UserContextException(other.ucx);
9859
      }
9860
    }
9861
 
553 chandransh 9862
    public removeAddressForUser_result deepCopy() {
9863
      return new removeAddressForUser_result(this);
48 ashish 9864
    }
9865
 
9866
    @Deprecated
553 chandransh 9867
    public removeAddressForUser_result clone() {
9868
      return new removeAddressForUser_result(this);
48 ashish 9869
    }
9870
 
9871
    public boolean isSuccess() {
9872
      return this.success;
9873
    }
9874
 
553 chandransh 9875
    public removeAddressForUser_result setSuccess(boolean success) {
48 ashish 9876
      this.success = success;
9877
      setSuccessIsSet(true);
9878
      return this;
9879
    }
9880
 
9881
    public void unsetSuccess() {
9882
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
9883
    }
9884
 
9885
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9886
    public boolean isSetSuccess() {
9887
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
9888
    }
9889
 
9890
    public void setSuccessIsSet(boolean value) {
9891
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
9892
    }
9893
 
9894
    public UserContextException getUcx() {
9895
      return this.ucx;
9896
    }
9897
 
553 chandransh 9898
    public removeAddressForUser_result setUcx(UserContextException ucx) {
48 ashish 9899
      this.ucx = ucx;
9900
      return this;
9901
    }
9902
 
9903
    public void unsetUcx() {
9904
      this.ucx = null;
9905
    }
9906
 
9907
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
9908
    public boolean isSetUcx() {
9909
      return this.ucx != null;
9910
    }
9911
 
9912
    public void setUcxIsSet(boolean value) {
9913
      if (!value) {
9914
        this.ucx = null;
9915
      }
9916
    }
9917
 
9918
    public void setFieldValue(_Fields field, Object value) {
9919
      switch (field) {
9920
      case SUCCESS:
9921
        if (value == null) {
9922
          unsetSuccess();
9923
        } else {
9924
          setSuccess((Boolean)value);
9925
        }
9926
        break;
9927
 
9928
      case UCX:
9929
        if (value == null) {
9930
          unsetUcx();
9931
        } else {
9932
          setUcx((UserContextException)value);
9933
        }
9934
        break;
9935
 
9936
      }
9937
    }
9938
 
9939
    public void setFieldValue(int fieldID, Object value) {
9940
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9941
    }
9942
 
9943
    public Object getFieldValue(_Fields field) {
9944
      switch (field) {
9945
      case SUCCESS:
9946
        return new Boolean(isSuccess());
9947
 
9948
      case UCX:
9949
        return getUcx();
9950
 
9951
      }
9952
      throw new IllegalStateException();
9953
    }
9954
 
9955
    public Object getFieldValue(int fieldId) {
9956
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9957
    }
9958
 
9959
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9960
    public boolean isSet(_Fields field) {
9961
      switch (field) {
9962
      case SUCCESS:
9963
        return isSetSuccess();
9964
      case UCX:
9965
        return isSetUcx();
9966
      }
9967
      throw new IllegalStateException();
9968
    }
9969
 
9970
    public boolean isSet(int fieldID) {
9971
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9972
    }
9973
 
9974
    @Override
9975
    public boolean equals(Object that) {
9976
      if (that == null)
9977
        return false;
553 chandransh 9978
      if (that instanceof removeAddressForUser_result)
9979
        return this.equals((removeAddressForUser_result)that);
48 ashish 9980
      return false;
9981
    }
9982
 
553 chandransh 9983
    public boolean equals(removeAddressForUser_result that) {
48 ashish 9984
      if (that == null)
9985
        return false;
9986
 
9987
      boolean this_present_success = true;
9988
      boolean that_present_success = true;
9989
      if (this_present_success || that_present_success) {
9990
        if (!(this_present_success && that_present_success))
9991
          return false;
9992
        if (this.success != that.success)
9993
          return false;
9994
      }
9995
 
9996
      boolean this_present_ucx = true && this.isSetUcx();
9997
      boolean that_present_ucx = true && that.isSetUcx();
9998
      if (this_present_ucx || that_present_ucx) {
9999
        if (!(this_present_ucx && that_present_ucx))
10000
          return false;
10001
        if (!this.ucx.equals(that.ucx))
10002
          return false;
10003
      }
10004
 
10005
      return true;
10006
    }
10007
 
10008
    @Override
10009
    public int hashCode() {
10010
      return 0;
10011
    }
10012
 
553 chandransh 10013
    public int compareTo(removeAddressForUser_result other) {
48 ashish 10014
      if (!getClass().equals(other.getClass())) {
10015
        return getClass().getName().compareTo(other.getClass().getName());
10016
      }
10017
 
10018
      int lastComparison = 0;
553 chandransh 10019
      removeAddressForUser_result typedOther = (removeAddressForUser_result)other;
48 ashish 10020
 
10021
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10022
      if (lastComparison != 0) {
10023
        return lastComparison;
10024
      }
10025
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10026
      if (lastComparison != 0) {
10027
        return lastComparison;
10028
      }
10029
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10030
      if (lastComparison != 0) {
10031
        return lastComparison;
10032
      }
10033
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10034
      if (lastComparison != 0) {
10035
        return lastComparison;
10036
      }
10037
      return 0;
10038
    }
10039
 
10040
    public void read(TProtocol iprot) throws TException {
10041
      TField field;
10042
      iprot.readStructBegin();
10043
      while (true)
10044
      {
10045
        field = iprot.readFieldBegin();
10046
        if (field.type == TType.STOP) { 
10047
          break;
10048
        }
10049
        _Fields fieldId = _Fields.findByThriftId(field.id);
10050
        if (fieldId == null) {
10051
          TProtocolUtil.skip(iprot, field.type);
10052
        } else {
10053
          switch (fieldId) {
10054
            case SUCCESS:
10055
              if (field.type == TType.BOOL) {
10056
                this.success = iprot.readBool();
10057
                setSuccessIsSet(true);
10058
              } else { 
10059
                TProtocolUtil.skip(iprot, field.type);
10060
              }
10061
              break;
10062
            case UCX:
10063
              if (field.type == TType.STRUCT) {
10064
                this.ucx = new UserContextException();
10065
                this.ucx.read(iprot);
10066
              } else { 
10067
                TProtocolUtil.skip(iprot, field.type);
10068
              }
10069
              break;
10070
          }
10071
          iprot.readFieldEnd();
10072
        }
10073
      }
10074
      iprot.readStructEnd();
10075
      validate();
10076
    }
10077
 
10078
    public void write(TProtocol oprot) throws TException {
10079
      oprot.writeStructBegin(STRUCT_DESC);
10080
 
10081
      if (this.isSetSuccess()) {
10082
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10083
        oprot.writeBool(this.success);
10084
        oprot.writeFieldEnd();
10085
      } else if (this.isSetUcx()) {
10086
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10087
        this.ucx.write(oprot);
10088
        oprot.writeFieldEnd();
10089
      }
10090
      oprot.writeFieldStop();
10091
      oprot.writeStructEnd();
10092
    }
10093
 
10094
    @Override
10095
    public String toString() {
553 chandransh 10096
      StringBuilder sb = new StringBuilder("removeAddressForUser_result(");
48 ashish 10097
      boolean first = true;
10098
 
10099
      sb.append("success:");
10100
      sb.append(this.success);
10101
      first = false;
10102
      if (!first) sb.append(", ");
10103
      sb.append("ucx:");
10104
      if (this.ucx == null) {
10105
        sb.append("null");
10106
      } else {
10107
        sb.append(this.ucx);
10108
      }
10109
      first = false;
10110
      sb.append(")");
10111
      return sb.toString();
10112
    }
10113
 
10114
    public void validate() throws TException {
10115
      // check for required fields
10116
    }
10117
 
10118
  }
10119
 
553 chandransh 10120
  public static class setUserAsLoggedIn_args implements TBase<setUserAsLoggedIn_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_args>   {
10121
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_args");
48 ashish 10122
 
553 chandransh 10123
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 10124
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
10125
 
553 chandransh 10126
    private long userId;
48 ashish 10127
    private long timestamp;
10128
 
10129
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10130
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10131
      USER_ID((short)1, "userId"),
10132
      TIMESTAMP((short)2, "timestamp");
48 ashish 10133
 
10134
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10135
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10136
 
10137
      static {
10138
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10139
          byId.put((int)field._thriftId, field);
10140
          byName.put(field.getFieldName(), field);
10141
        }
10142
      }
10143
 
10144
      /**
10145
       * Find the _Fields constant that matches fieldId, or null if its not found.
10146
       */
10147
      public static _Fields findByThriftId(int fieldId) {
10148
        return byId.get(fieldId);
10149
      }
10150
 
10151
      /**
10152
       * Find the _Fields constant that matches fieldId, throwing an exception
10153
       * if it is not found.
10154
       */
10155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10156
        _Fields fields = findByThriftId(fieldId);
10157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10158
        return fields;
10159
      }
10160
 
10161
      /**
10162
       * Find the _Fields constant that matches name, or null if its not found.
10163
       */
10164
      public static _Fields findByName(String name) {
10165
        return byName.get(name);
10166
      }
10167
 
10168
      private final short _thriftId;
10169
      private final String _fieldName;
10170
 
10171
      _Fields(short thriftId, String fieldName) {
10172
        _thriftId = thriftId;
10173
        _fieldName = fieldName;
10174
      }
10175
 
10176
      public short getThriftFieldId() {
10177
        return _thriftId;
10178
      }
10179
 
10180
      public String getFieldName() {
10181
        return _fieldName;
10182
      }
10183
    }
10184
 
10185
    // isset id assignments
553 chandransh 10186
    private static final int __USERID_ISSET_ID = 0;
10187
    private static final int __TIMESTAMP_ISSET_ID = 1;
48 ashish 10188
    private BitSet __isset_bit_vector = new BitSet(2);
10189
 
10190
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 10191
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
10192
          new FieldValueMetaData(TType.I64)));
48 ashish 10193
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10194
          new FieldValueMetaData(TType.I64)));
10195
    }});
10196
 
10197
    static {
553 chandransh 10198
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_args.class, metaDataMap);
48 ashish 10199
    }
10200
 
553 chandransh 10201
    public setUserAsLoggedIn_args() {
48 ashish 10202
    }
10203
 
553 chandransh 10204
    public setUserAsLoggedIn_args(
10205
      long userId,
10206
      long timestamp)
48 ashish 10207
    {
10208
      this();
553 chandransh 10209
      this.userId = userId;
10210
      setUserIdIsSet(true);
48 ashish 10211
      this.timestamp = timestamp;
10212
      setTimestampIsSet(true);
10213
    }
10214
 
10215
    /**
10216
     * Performs a deep copy on <i>other</i>.
10217
     */
553 chandransh 10218
    public setUserAsLoggedIn_args(setUserAsLoggedIn_args other) {
48 ashish 10219
      __isset_bit_vector.clear();
10220
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 10221
      this.userId = other.userId;
48 ashish 10222
      this.timestamp = other.timestamp;
10223
    }
10224
 
553 chandransh 10225
    public setUserAsLoggedIn_args deepCopy() {
10226
      return new setUserAsLoggedIn_args(this);
48 ashish 10227
    }
10228
 
10229
    @Deprecated
553 chandransh 10230
    public setUserAsLoggedIn_args clone() {
10231
      return new setUserAsLoggedIn_args(this);
48 ashish 10232
    }
10233
 
553 chandransh 10234
    public long getUserId() {
10235
      return this.userId;
48 ashish 10236
    }
10237
 
553 chandransh 10238
    public setUserAsLoggedIn_args setUserId(long userId) {
10239
      this.userId = userId;
10240
      setUserIdIsSet(true);
48 ashish 10241
      return this;
10242
    }
10243
 
553 chandransh 10244
    public void unsetUserId() {
10245
      __isset_bit_vector.clear(__USERID_ISSET_ID);
48 ashish 10246
    }
10247
 
553 chandransh 10248
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
10249
    public boolean isSetUserId() {
10250
      return __isset_bit_vector.get(__USERID_ISSET_ID);
48 ashish 10251
    }
10252
 
553 chandransh 10253
    public void setUserIdIsSet(boolean value) {
10254
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
48 ashish 10255
    }
10256
 
10257
    public long getTimestamp() {
10258
      return this.timestamp;
10259
    }
10260
 
553 chandransh 10261
    public setUserAsLoggedIn_args setTimestamp(long timestamp) {
48 ashish 10262
      this.timestamp = timestamp;
10263
      setTimestampIsSet(true);
10264
      return this;
10265
    }
10266
 
10267
    public void unsetTimestamp() {
10268
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10269
    }
10270
 
10271
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10272
    public boolean isSetTimestamp() {
10273
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10274
    }
10275
 
10276
    public void setTimestampIsSet(boolean value) {
10277
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10278
    }
10279
 
10280
    public void setFieldValue(_Fields field, Object value) {
10281
      switch (field) {
553 chandransh 10282
      case USER_ID:
48 ashish 10283
        if (value == null) {
553 chandransh 10284
          unsetUserId();
48 ashish 10285
        } else {
553 chandransh 10286
          setUserId((Long)value);
48 ashish 10287
        }
10288
        break;
10289
 
10290
      case TIMESTAMP:
10291
        if (value == null) {
10292
          unsetTimestamp();
10293
        } else {
10294
          setTimestamp((Long)value);
10295
        }
10296
        break;
10297
 
10298
      }
10299
    }
10300
 
10301
    public void setFieldValue(int fieldID, Object value) {
10302
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10303
    }
10304
 
10305
    public Object getFieldValue(_Fields field) {
10306
      switch (field) {
553 chandransh 10307
      case USER_ID:
10308
        return new Long(getUserId());
48 ashish 10309
 
10310
      case TIMESTAMP:
10311
        return new Long(getTimestamp());
10312
 
10313
      }
10314
      throw new IllegalStateException();
10315
    }
10316
 
10317
    public Object getFieldValue(int fieldId) {
10318
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10319
    }
10320
 
10321
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10322
    public boolean isSet(_Fields field) {
10323
      switch (field) {
553 chandransh 10324
      case USER_ID:
10325
        return isSetUserId();
48 ashish 10326
      case TIMESTAMP:
10327
        return isSetTimestamp();
10328
      }
10329
      throw new IllegalStateException();
10330
    }
10331
 
10332
    public boolean isSet(int fieldID) {
10333
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10334
    }
10335
 
10336
    @Override
10337
    public boolean equals(Object that) {
10338
      if (that == null)
10339
        return false;
553 chandransh 10340
      if (that instanceof setUserAsLoggedIn_args)
10341
        return this.equals((setUserAsLoggedIn_args)that);
48 ashish 10342
      return false;
10343
    }
10344
 
553 chandransh 10345
    public boolean equals(setUserAsLoggedIn_args that) {
48 ashish 10346
      if (that == null)
10347
        return false;
10348
 
553 chandransh 10349
      boolean this_present_userId = true;
10350
      boolean that_present_userId = true;
10351
      if (this_present_userId || that_present_userId) {
10352
        if (!(this_present_userId && that_present_userId))
48 ashish 10353
          return false;
553 chandransh 10354
        if (this.userId != that.userId)
48 ashish 10355
          return false;
10356
      }
10357
 
10358
      boolean this_present_timestamp = true;
10359
      boolean that_present_timestamp = true;
10360
      if (this_present_timestamp || that_present_timestamp) {
10361
        if (!(this_present_timestamp && that_present_timestamp))
10362
          return false;
10363
        if (this.timestamp != that.timestamp)
10364
          return false;
10365
      }
10366
 
10367
      return true;
10368
    }
10369
 
10370
    @Override
10371
    public int hashCode() {
10372
      return 0;
10373
    }
10374
 
553 chandransh 10375
    public int compareTo(setUserAsLoggedIn_args other) {
48 ashish 10376
      if (!getClass().equals(other.getClass())) {
10377
        return getClass().getName().compareTo(other.getClass().getName());
10378
      }
10379
 
10380
      int lastComparison = 0;
553 chandransh 10381
      setUserAsLoggedIn_args typedOther = (setUserAsLoggedIn_args)other;
48 ashish 10382
 
553 chandransh 10383
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 10384
      if (lastComparison != 0) {
10385
        return lastComparison;
10386
      }
553 chandransh 10387
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 10388
      if (lastComparison != 0) {
10389
        return lastComparison;
10390
      }
10391
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
10392
      if (lastComparison != 0) {
10393
        return lastComparison;
10394
      }
10395
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
10396
      if (lastComparison != 0) {
10397
        return lastComparison;
10398
      }
10399
      return 0;
10400
    }
10401
 
10402
    public void read(TProtocol iprot) throws TException {
10403
      TField field;
10404
      iprot.readStructBegin();
10405
      while (true)
10406
      {
10407
        field = iprot.readFieldBegin();
10408
        if (field.type == TType.STOP) { 
10409
          break;
10410
        }
10411
        _Fields fieldId = _Fields.findByThriftId(field.id);
10412
        if (fieldId == null) {
10413
          TProtocolUtil.skip(iprot, field.type);
10414
        } else {
10415
          switch (fieldId) {
553 chandransh 10416
            case USER_ID:
10417
              if (field.type == TType.I64) {
10418
                this.userId = iprot.readI64();
10419
                setUserIdIsSet(true);
48 ashish 10420
              } else { 
10421
                TProtocolUtil.skip(iprot, field.type);
10422
              }
10423
              break;
10424
            case TIMESTAMP:
10425
              if (field.type == TType.I64) {
10426
                this.timestamp = iprot.readI64();
10427
                setTimestampIsSet(true);
10428
              } else { 
10429
                TProtocolUtil.skip(iprot, field.type);
10430
              }
10431
              break;
10432
          }
10433
          iprot.readFieldEnd();
10434
        }
10435
      }
10436
      iprot.readStructEnd();
10437
      validate();
10438
    }
10439
 
10440
    public void write(TProtocol oprot) throws TException {
10441
      validate();
10442
 
10443
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 10444
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
10445
      oprot.writeI64(this.userId);
10446
      oprot.writeFieldEnd();
48 ashish 10447
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
10448
      oprot.writeI64(this.timestamp);
10449
      oprot.writeFieldEnd();
10450
      oprot.writeFieldStop();
10451
      oprot.writeStructEnd();
10452
    }
10453
 
10454
    @Override
10455
    public String toString() {
553 chandransh 10456
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_args(");
48 ashish 10457
      boolean first = true;
10458
 
553 chandransh 10459
      sb.append("userId:");
10460
      sb.append(this.userId);
48 ashish 10461
      first = false;
10462
      if (!first) sb.append(", ");
10463
      sb.append("timestamp:");
10464
      sb.append(this.timestamp);
10465
      first = false;
10466
      sb.append(")");
10467
      return sb.toString();
10468
    }
10469
 
10470
    public void validate() throws TException {
10471
      // check for required fields
10472
    }
10473
 
10474
  }
10475
 
553 chandransh 10476
  public static class setUserAsLoggedIn_result implements TBase<setUserAsLoggedIn_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedIn_result>   {
10477
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedIn_result");
48 ashish 10478
 
10479
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
10480
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
10481
 
10482
    private boolean success;
10483
    private UserContextException ucx;
10484
 
10485
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10486
    public enum _Fields implements TFieldIdEnum {
10487
      SUCCESS((short)0, "success"),
10488
      UCX((short)1, "ucx");
10489
 
10490
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10491
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10492
 
10493
      static {
10494
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10495
          byId.put((int)field._thriftId, field);
10496
          byName.put(field.getFieldName(), field);
10497
        }
10498
      }
10499
 
10500
      /**
10501
       * Find the _Fields constant that matches fieldId, or null if its not found.
10502
       */
10503
      public static _Fields findByThriftId(int fieldId) {
10504
        return byId.get(fieldId);
10505
      }
10506
 
10507
      /**
10508
       * Find the _Fields constant that matches fieldId, throwing an exception
10509
       * if it is not found.
10510
       */
10511
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10512
        _Fields fields = findByThriftId(fieldId);
10513
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10514
        return fields;
10515
      }
10516
 
10517
      /**
10518
       * Find the _Fields constant that matches name, or null if its not found.
10519
       */
10520
      public static _Fields findByName(String name) {
10521
        return byName.get(name);
10522
      }
10523
 
10524
      private final short _thriftId;
10525
      private final String _fieldName;
10526
 
10527
      _Fields(short thriftId, String fieldName) {
10528
        _thriftId = thriftId;
10529
        _fieldName = fieldName;
10530
      }
10531
 
10532
      public short getThriftFieldId() {
10533
        return _thriftId;
10534
      }
10535
 
10536
      public String getFieldName() {
10537
        return _fieldName;
10538
      }
10539
    }
10540
 
10541
    // isset id assignments
10542
    private static final int __SUCCESS_ISSET_ID = 0;
10543
    private BitSet __isset_bit_vector = new BitSet(1);
10544
 
10545
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10546
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10547
          new FieldValueMetaData(TType.BOOL)));
10548
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
10549
          new FieldValueMetaData(TType.STRUCT)));
10550
    }});
10551
 
10552
    static {
553 chandransh 10553
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedIn_result.class, metaDataMap);
48 ashish 10554
    }
10555
 
553 chandransh 10556
    public setUserAsLoggedIn_result() {
48 ashish 10557
    }
10558
 
553 chandransh 10559
    public setUserAsLoggedIn_result(
48 ashish 10560
      boolean success,
10561
      UserContextException ucx)
10562
    {
10563
      this();
10564
      this.success = success;
10565
      setSuccessIsSet(true);
10566
      this.ucx = ucx;
10567
    }
10568
 
10569
    /**
10570
     * Performs a deep copy on <i>other</i>.
10571
     */
553 chandransh 10572
    public setUserAsLoggedIn_result(setUserAsLoggedIn_result other) {
48 ashish 10573
      __isset_bit_vector.clear();
10574
      __isset_bit_vector.or(other.__isset_bit_vector);
10575
      this.success = other.success;
10576
      if (other.isSetUcx()) {
10577
        this.ucx = new UserContextException(other.ucx);
10578
      }
10579
    }
10580
 
553 chandransh 10581
    public setUserAsLoggedIn_result deepCopy() {
10582
      return new setUserAsLoggedIn_result(this);
48 ashish 10583
    }
10584
 
10585
    @Deprecated
553 chandransh 10586
    public setUserAsLoggedIn_result clone() {
10587
      return new setUserAsLoggedIn_result(this);
48 ashish 10588
    }
10589
 
10590
    public boolean isSuccess() {
10591
      return this.success;
10592
    }
10593
 
553 chandransh 10594
    public setUserAsLoggedIn_result setSuccess(boolean success) {
48 ashish 10595
      this.success = success;
10596
      setSuccessIsSet(true);
10597
      return this;
10598
    }
10599
 
10600
    public void unsetSuccess() {
10601
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
10602
    }
10603
 
10604
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10605
    public boolean isSetSuccess() {
10606
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
10607
    }
10608
 
10609
    public void setSuccessIsSet(boolean value) {
10610
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
10611
    }
10612
 
10613
    public UserContextException getUcx() {
10614
      return this.ucx;
10615
    }
10616
 
553 chandransh 10617
    public setUserAsLoggedIn_result setUcx(UserContextException ucx) {
48 ashish 10618
      this.ucx = ucx;
10619
      return this;
10620
    }
10621
 
10622
    public void unsetUcx() {
10623
      this.ucx = null;
10624
    }
10625
 
10626
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
10627
    public boolean isSetUcx() {
10628
      return this.ucx != null;
10629
    }
10630
 
10631
    public void setUcxIsSet(boolean value) {
10632
      if (!value) {
10633
        this.ucx = null;
10634
      }
10635
    }
10636
 
10637
    public void setFieldValue(_Fields field, Object value) {
10638
      switch (field) {
10639
      case SUCCESS:
10640
        if (value == null) {
10641
          unsetSuccess();
10642
        } else {
10643
          setSuccess((Boolean)value);
10644
        }
10645
        break;
10646
 
10647
      case UCX:
10648
        if (value == null) {
10649
          unsetUcx();
10650
        } else {
10651
          setUcx((UserContextException)value);
10652
        }
10653
        break;
10654
 
10655
      }
10656
    }
10657
 
10658
    public void setFieldValue(int fieldID, Object value) {
10659
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10660
    }
10661
 
10662
    public Object getFieldValue(_Fields field) {
10663
      switch (field) {
10664
      case SUCCESS:
10665
        return new Boolean(isSuccess());
10666
 
10667
      case UCX:
10668
        return getUcx();
10669
 
10670
      }
10671
      throw new IllegalStateException();
10672
    }
10673
 
10674
    public Object getFieldValue(int fieldId) {
10675
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10676
    }
10677
 
10678
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10679
    public boolean isSet(_Fields field) {
10680
      switch (field) {
10681
      case SUCCESS:
10682
        return isSetSuccess();
10683
      case UCX:
10684
        return isSetUcx();
10685
      }
10686
      throw new IllegalStateException();
10687
    }
10688
 
10689
    public boolean isSet(int fieldID) {
10690
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10691
    }
10692
 
10693
    @Override
10694
    public boolean equals(Object that) {
10695
      if (that == null)
10696
        return false;
553 chandransh 10697
      if (that instanceof setUserAsLoggedIn_result)
10698
        return this.equals((setUserAsLoggedIn_result)that);
48 ashish 10699
      return false;
10700
    }
10701
 
553 chandransh 10702
    public boolean equals(setUserAsLoggedIn_result that) {
48 ashish 10703
      if (that == null)
10704
        return false;
10705
 
10706
      boolean this_present_success = true;
10707
      boolean that_present_success = true;
10708
      if (this_present_success || that_present_success) {
10709
        if (!(this_present_success && that_present_success))
10710
          return false;
10711
        if (this.success != that.success)
10712
          return false;
10713
      }
10714
 
10715
      boolean this_present_ucx = true && this.isSetUcx();
10716
      boolean that_present_ucx = true && that.isSetUcx();
10717
      if (this_present_ucx || that_present_ucx) {
10718
        if (!(this_present_ucx && that_present_ucx))
10719
          return false;
10720
        if (!this.ucx.equals(that.ucx))
10721
          return false;
10722
      }
10723
 
10724
      return true;
10725
    }
10726
 
10727
    @Override
10728
    public int hashCode() {
10729
      return 0;
10730
    }
10731
 
553 chandransh 10732
    public int compareTo(setUserAsLoggedIn_result other) {
48 ashish 10733
      if (!getClass().equals(other.getClass())) {
10734
        return getClass().getName().compareTo(other.getClass().getName());
10735
      }
10736
 
10737
      int lastComparison = 0;
553 chandransh 10738
      setUserAsLoggedIn_result typedOther = (setUserAsLoggedIn_result)other;
48 ashish 10739
 
10740
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10741
      if (lastComparison != 0) {
10742
        return lastComparison;
10743
      }
10744
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10745
      if (lastComparison != 0) {
10746
        return lastComparison;
10747
      }
10748
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
10749
      if (lastComparison != 0) {
10750
        return lastComparison;
10751
      }
10752
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
10753
      if (lastComparison != 0) {
10754
        return lastComparison;
10755
      }
10756
      return 0;
10757
    }
10758
 
10759
    public void read(TProtocol iprot) throws TException {
10760
      TField field;
10761
      iprot.readStructBegin();
10762
      while (true)
10763
      {
10764
        field = iprot.readFieldBegin();
10765
        if (field.type == TType.STOP) { 
10766
          break;
10767
        }
10768
        _Fields fieldId = _Fields.findByThriftId(field.id);
10769
        if (fieldId == null) {
10770
          TProtocolUtil.skip(iprot, field.type);
10771
        } else {
10772
          switch (fieldId) {
10773
            case SUCCESS:
10774
              if (field.type == TType.BOOL) {
10775
                this.success = iprot.readBool();
10776
                setSuccessIsSet(true);
10777
              } else { 
10778
                TProtocolUtil.skip(iprot, field.type);
10779
              }
10780
              break;
10781
            case UCX:
10782
              if (field.type == TType.STRUCT) {
10783
                this.ucx = new UserContextException();
10784
                this.ucx.read(iprot);
10785
              } else { 
10786
                TProtocolUtil.skip(iprot, field.type);
10787
              }
10788
              break;
10789
          }
10790
          iprot.readFieldEnd();
10791
        }
10792
      }
10793
      iprot.readStructEnd();
10794
      validate();
10795
    }
10796
 
10797
    public void write(TProtocol oprot) throws TException {
10798
      oprot.writeStructBegin(STRUCT_DESC);
10799
 
10800
      if (this.isSetSuccess()) {
10801
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10802
        oprot.writeBool(this.success);
10803
        oprot.writeFieldEnd();
10804
      } else if (this.isSetUcx()) {
10805
        oprot.writeFieldBegin(UCX_FIELD_DESC);
10806
        this.ucx.write(oprot);
10807
        oprot.writeFieldEnd();
10808
      }
10809
      oprot.writeFieldStop();
10810
      oprot.writeStructEnd();
10811
    }
10812
 
10813
    @Override
10814
    public String toString() {
553 chandransh 10815
      StringBuilder sb = new StringBuilder("setUserAsLoggedIn_result(");
48 ashish 10816
      boolean first = true;
10817
 
10818
      sb.append("success:");
10819
      sb.append(this.success);
10820
      first = false;
10821
      if (!first) sb.append(", ");
10822
      sb.append("ucx:");
10823
      if (this.ucx == null) {
10824
        sb.append("null");
10825
      } else {
10826
        sb.append(this.ucx);
10827
      }
10828
      first = false;
10829
      sb.append(")");
10830
      return sb.toString();
10831
    }
10832
 
10833
    public void validate() throws TException {
10834
      // check for required fields
10835
    }
10836
 
10837
  }
10838
 
553 chandransh 10839
  public static class setUserAsLoggedOut_args implements TBase<setUserAsLoggedOut_args._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_args>   {
10840
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_args");
48 ashish 10841
 
553 chandransh 10842
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
10843
    private static final TField TIMESTAMP_FIELD_DESC = new TField("timestamp", TType.I64, (short)2);
48 ashish 10844
 
10845
    private long userid;
10846
    private long timestamp;
10847
 
10848
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10849
    public enum _Fields implements TFieldIdEnum {
553 chandransh 10850
      USERID((short)1, "userid"),
10851
      TIMESTAMP((short)2, "timestamp");
48 ashish 10852
 
10853
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10854
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10855
 
10856
      static {
10857
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10858
          byId.put((int)field._thriftId, field);
10859
          byName.put(field.getFieldName(), field);
10860
        }
10861
      }
10862
 
10863
      /**
10864
       * Find the _Fields constant that matches fieldId, or null if its not found.
10865
       */
10866
      public static _Fields findByThriftId(int fieldId) {
10867
        return byId.get(fieldId);
10868
      }
10869
 
10870
      /**
10871
       * Find the _Fields constant that matches fieldId, throwing an exception
10872
       * if it is not found.
10873
       */
10874
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10875
        _Fields fields = findByThriftId(fieldId);
10876
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10877
        return fields;
10878
      }
10879
 
10880
      /**
10881
       * Find the _Fields constant that matches name, or null if its not found.
10882
       */
10883
      public static _Fields findByName(String name) {
10884
        return byName.get(name);
10885
      }
10886
 
10887
      private final short _thriftId;
10888
      private final String _fieldName;
10889
 
10890
      _Fields(short thriftId, String fieldName) {
10891
        _thriftId = thriftId;
10892
        _fieldName = fieldName;
10893
      }
10894
 
10895
      public short getThriftFieldId() {
10896
        return _thriftId;
10897
      }
10898
 
10899
      public String getFieldName() {
10900
        return _fieldName;
10901
      }
10902
    }
10903
 
10904
    // isset id assignments
10905
    private static final int __USERID_ISSET_ID = 0;
10906
    private static final int __TIMESTAMP_ISSET_ID = 1;
553 chandransh 10907
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 10908
 
10909
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10910
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
10911
          new FieldValueMetaData(TType.I64)));
10912
      put(_Fields.TIMESTAMP, new FieldMetaData("timestamp", TFieldRequirementType.DEFAULT, 
10913
          new FieldValueMetaData(TType.I64)));
10914
    }});
10915
 
10916
    static {
553 chandransh 10917
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_args.class, metaDataMap);
48 ashish 10918
    }
10919
 
553 chandransh 10920
    public setUserAsLoggedOut_args() {
48 ashish 10921
    }
10922
 
553 chandransh 10923
    public setUserAsLoggedOut_args(
48 ashish 10924
      long userid,
553 chandransh 10925
      long timestamp)
48 ashish 10926
    {
10927
      this();
10928
      this.userid = userid;
10929
      setUseridIsSet(true);
10930
      this.timestamp = timestamp;
10931
      setTimestampIsSet(true);
10932
    }
10933
 
10934
    /**
10935
     * Performs a deep copy on <i>other</i>.
10936
     */
553 chandransh 10937
    public setUserAsLoggedOut_args(setUserAsLoggedOut_args other) {
48 ashish 10938
      __isset_bit_vector.clear();
10939
      __isset_bit_vector.or(other.__isset_bit_vector);
10940
      this.userid = other.userid;
10941
      this.timestamp = other.timestamp;
10942
    }
10943
 
553 chandransh 10944
    public setUserAsLoggedOut_args deepCopy() {
10945
      return new setUserAsLoggedOut_args(this);
48 ashish 10946
    }
10947
 
10948
    @Deprecated
553 chandransh 10949
    public setUserAsLoggedOut_args clone() {
10950
      return new setUserAsLoggedOut_args(this);
48 ashish 10951
    }
10952
 
10953
    public long getUserid() {
10954
      return this.userid;
10955
    }
10956
 
553 chandransh 10957
    public setUserAsLoggedOut_args setUserid(long userid) {
48 ashish 10958
      this.userid = userid;
10959
      setUseridIsSet(true);
10960
      return this;
10961
    }
10962
 
10963
    public void unsetUserid() {
10964
      __isset_bit_vector.clear(__USERID_ISSET_ID);
10965
    }
10966
 
10967
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
10968
    public boolean isSetUserid() {
10969
      return __isset_bit_vector.get(__USERID_ISSET_ID);
10970
    }
10971
 
10972
    public void setUseridIsSet(boolean value) {
10973
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
10974
    }
10975
 
10976
    public long getTimestamp() {
10977
      return this.timestamp;
10978
    }
10979
 
553 chandransh 10980
    public setUserAsLoggedOut_args setTimestamp(long timestamp) {
48 ashish 10981
      this.timestamp = timestamp;
10982
      setTimestampIsSet(true);
10983
      return this;
10984
    }
10985
 
10986
    public void unsetTimestamp() {
10987
      __isset_bit_vector.clear(__TIMESTAMP_ISSET_ID);
10988
    }
10989
 
10990
    /** Returns true if field timestamp is set (has been asigned a value) and false otherwise */
10991
    public boolean isSetTimestamp() {
10992
      return __isset_bit_vector.get(__TIMESTAMP_ISSET_ID);
10993
    }
10994
 
10995
    public void setTimestampIsSet(boolean value) {
10996
      __isset_bit_vector.set(__TIMESTAMP_ISSET_ID, value);
10997
    }
10998
 
10999
    public void setFieldValue(_Fields field, Object value) {
11000
      switch (field) {
11001
      case USERID:
11002
        if (value == null) {
11003
          unsetUserid();
11004
        } else {
11005
          setUserid((Long)value);
11006
        }
11007
        break;
11008
 
11009
      case TIMESTAMP:
11010
        if (value == null) {
11011
          unsetTimestamp();
11012
        } else {
11013
          setTimestamp((Long)value);
11014
        }
11015
        break;
11016
 
11017
      }
11018
    }
11019
 
11020
    public void setFieldValue(int fieldID, Object value) {
11021
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11022
    }
11023
 
11024
    public Object getFieldValue(_Fields field) {
11025
      switch (field) {
11026
      case USERID:
11027
        return new Long(getUserid());
11028
 
11029
      case TIMESTAMP:
11030
        return new Long(getTimestamp());
11031
 
11032
      }
11033
      throw new IllegalStateException();
11034
    }
11035
 
11036
    public Object getFieldValue(int fieldId) {
11037
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11038
    }
11039
 
11040
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11041
    public boolean isSet(_Fields field) {
11042
      switch (field) {
11043
      case USERID:
11044
        return isSetUserid();
11045
      case TIMESTAMP:
11046
        return isSetTimestamp();
11047
      }
11048
      throw new IllegalStateException();
11049
    }
11050
 
11051
    public boolean isSet(int fieldID) {
11052
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11053
    }
11054
 
11055
    @Override
11056
    public boolean equals(Object that) {
11057
      if (that == null)
11058
        return false;
553 chandransh 11059
      if (that instanceof setUserAsLoggedOut_args)
11060
        return this.equals((setUserAsLoggedOut_args)that);
48 ashish 11061
      return false;
11062
    }
11063
 
553 chandransh 11064
    public boolean equals(setUserAsLoggedOut_args that) {
48 ashish 11065
      if (that == null)
11066
        return false;
11067
 
11068
      boolean this_present_userid = true;
11069
      boolean that_present_userid = true;
11070
      if (this_present_userid || that_present_userid) {
11071
        if (!(this_present_userid && that_present_userid))
11072
          return false;
11073
        if (this.userid != that.userid)
11074
          return false;
11075
      }
11076
 
11077
      boolean this_present_timestamp = true;
11078
      boolean that_present_timestamp = true;
11079
      if (this_present_timestamp || that_present_timestamp) {
11080
        if (!(this_present_timestamp && that_present_timestamp))
11081
          return false;
11082
        if (this.timestamp != that.timestamp)
11083
          return false;
11084
      }
11085
 
11086
      return true;
11087
    }
11088
 
11089
    @Override
11090
    public int hashCode() {
11091
      return 0;
11092
    }
11093
 
553 chandransh 11094
    public int compareTo(setUserAsLoggedOut_args other) {
48 ashish 11095
      if (!getClass().equals(other.getClass())) {
11096
        return getClass().getName().compareTo(other.getClass().getName());
11097
      }
11098
 
11099
      int lastComparison = 0;
553 chandransh 11100
      setUserAsLoggedOut_args typedOther = (setUserAsLoggedOut_args)other;
48 ashish 11101
 
11102
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11103
      if (lastComparison != 0) {
11104
        return lastComparison;
11105
      }
11106
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11107
      if (lastComparison != 0) {
11108
        return lastComparison;
11109
      }
11110
      lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(isSetTimestamp());
11111
      if (lastComparison != 0) {
11112
        return lastComparison;
11113
      }
11114
      lastComparison = TBaseHelper.compareTo(timestamp, typedOther.timestamp);
11115
      if (lastComparison != 0) {
11116
        return lastComparison;
11117
      }
11118
      return 0;
11119
    }
11120
 
11121
    public void read(TProtocol iprot) throws TException {
11122
      TField field;
11123
      iprot.readStructBegin();
11124
      while (true)
11125
      {
11126
        field = iprot.readFieldBegin();
11127
        if (field.type == TType.STOP) { 
11128
          break;
11129
        }
11130
        _Fields fieldId = _Fields.findByThriftId(field.id);
11131
        if (fieldId == null) {
11132
          TProtocolUtil.skip(iprot, field.type);
11133
        } else {
11134
          switch (fieldId) {
11135
            case USERID:
11136
              if (field.type == TType.I64) {
11137
                this.userid = iprot.readI64();
11138
                setUseridIsSet(true);
11139
              } else { 
11140
                TProtocolUtil.skip(iprot, field.type);
11141
              }
11142
              break;
11143
            case TIMESTAMP:
11144
              if (field.type == TType.I64) {
11145
                this.timestamp = iprot.readI64();
11146
                setTimestampIsSet(true);
11147
              } else { 
11148
                TProtocolUtil.skip(iprot, field.type);
11149
              }
11150
              break;
11151
          }
11152
          iprot.readFieldEnd();
11153
        }
11154
      }
11155
      iprot.readStructEnd();
11156
      validate();
11157
    }
11158
 
11159
    public void write(TProtocol oprot) throws TException {
11160
      validate();
11161
 
11162
      oprot.writeStructBegin(STRUCT_DESC);
11163
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11164
      oprot.writeI64(this.userid);
11165
      oprot.writeFieldEnd();
11166
      oprot.writeFieldBegin(TIMESTAMP_FIELD_DESC);
11167
      oprot.writeI64(this.timestamp);
11168
      oprot.writeFieldEnd();
11169
      oprot.writeFieldStop();
11170
      oprot.writeStructEnd();
11171
    }
11172
 
11173
    @Override
11174
    public String toString() {
553 chandransh 11175
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_args(");
48 ashish 11176
      boolean first = true;
11177
 
11178
      sb.append("userid:");
11179
      sb.append(this.userid);
11180
      first = false;
11181
      if (!first) sb.append(", ");
11182
      sb.append("timestamp:");
11183
      sb.append(this.timestamp);
11184
      first = false;
11185
      sb.append(")");
11186
      return sb.toString();
11187
    }
11188
 
11189
    public void validate() throws TException {
11190
      // check for required fields
11191
    }
11192
 
11193
  }
11194
 
553 chandransh 11195
  public static class setUserAsLoggedOut_result implements TBase<setUserAsLoggedOut_result._Fields>, java.io.Serializable, Cloneable, Comparable<setUserAsLoggedOut_result>   {
11196
    private static final TStruct STRUCT_DESC = new TStruct("setUserAsLoggedOut_result");
48 ashish 11197
 
11198
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11199
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11200
 
11201
    private boolean success;
11202
    private UserContextException ucx;
11203
 
11204
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11205
    public enum _Fields implements TFieldIdEnum {
11206
      SUCCESS((short)0, "success"),
11207
      UCX((short)1, "ucx");
11208
 
11209
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11210
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11211
 
11212
      static {
11213
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11214
          byId.put((int)field._thriftId, field);
11215
          byName.put(field.getFieldName(), field);
11216
        }
11217
      }
11218
 
11219
      /**
11220
       * Find the _Fields constant that matches fieldId, or null if its not found.
11221
       */
11222
      public static _Fields findByThriftId(int fieldId) {
11223
        return byId.get(fieldId);
11224
      }
11225
 
11226
      /**
11227
       * Find the _Fields constant that matches fieldId, throwing an exception
11228
       * if it is not found.
11229
       */
11230
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11231
        _Fields fields = findByThriftId(fieldId);
11232
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11233
        return fields;
11234
      }
11235
 
11236
      /**
11237
       * Find the _Fields constant that matches name, or null if its not found.
11238
       */
11239
      public static _Fields findByName(String name) {
11240
        return byName.get(name);
11241
      }
11242
 
11243
      private final short _thriftId;
11244
      private final String _fieldName;
11245
 
11246
      _Fields(short thriftId, String fieldName) {
11247
        _thriftId = thriftId;
11248
        _fieldName = fieldName;
11249
      }
11250
 
11251
      public short getThriftFieldId() {
11252
        return _thriftId;
11253
      }
11254
 
11255
      public String getFieldName() {
11256
        return _fieldName;
11257
      }
11258
    }
11259
 
11260
    // isset id assignments
11261
    private static final int __SUCCESS_ISSET_ID = 0;
11262
    private BitSet __isset_bit_vector = new BitSet(1);
11263
 
11264
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11265
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11266
          new FieldValueMetaData(TType.BOOL)));
11267
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11268
          new FieldValueMetaData(TType.STRUCT)));
11269
    }});
11270
 
11271
    static {
553 chandransh 11272
      FieldMetaData.addStructMetaDataMap(setUserAsLoggedOut_result.class, metaDataMap);
48 ashish 11273
    }
11274
 
553 chandransh 11275
    public setUserAsLoggedOut_result() {
48 ashish 11276
    }
11277
 
553 chandransh 11278
    public setUserAsLoggedOut_result(
48 ashish 11279
      boolean success,
11280
      UserContextException ucx)
11281
    {
11282
      this();
11283
      this.success = success;
11284
      setSuccessIsSet(true);
11285
      this.ucx = ucx;
11286
    }
11287
 
11288
    /**
11289
     * Performs a deep copy on <i>other</i>.
11290
     */
553 chandransh 11291
    public setUserAsLoggedOut_result(setUserAsLoggedOut_result other) {
48 ashish 11292
      __isset_bit_vector.clear();
11293
      __isset_bit_vector.or(other.__isset_bit_vector);
11294
      this.success = other.success;
11295
      if (other.isSetUcx()) {
11296
        this.ucx = new UserContextException(other.ucx);
11297
      }
11298
    }
11299
 
553 chandransh 11300
    public setUserAsLoggedOut_result deepCopy() {
11301
      return new setUserAsLoggedOut_result(this);
48 ashish 11302
    }
11303
 
11304
    @Deprecated
553 chandransh 11305
    public setUserAsLoggedOut_result clone() {
11306
      return new setUserAsLoggedOut_result(this);
48 ashish 11307
    }
11308
 
11309
    public boolean isSuccess() {
11310
      return this.success;
11311
    }
11312
 
553 chandransh 11313
    public setUserAsLoggedOut_result setSuccess(boolean success) {
48 ashish 11314
      this.success = success;
11315
      setSuccessIsSet(true);
11316
      return this;
11317
    }
11318
 
11319
    public void unsetSuccess() {
11320
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11321
    }
11322
 
11323
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11324
    public boolean isSetSuccess() {
11325
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11326
    }
11327
 
11328
    public void setSuccessIsSet(boolean value) {
11329
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11330
    }
11331
 
11332
    public UserContextException getUcx() {
11333
      return this.ucx;
11334
    }
11335
 
553 chandransh 11336
    public setUserAsLoggedOut_result setUcx(UserContextException ucx) {
48 ashish 11337
      this.ucx = ucx;
11338
      return this;
11339
    }
11340
 
11341
    public void unsetUcx() {
11342
      this.ucx = null;
11343
    }
11344
 
11345
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
11346
    public boolean isSetUcx() {
11347
      return this.ucx != null;
11348
    }
11349
 
11350
    public void setUcxIsSet(boolean value) {
11351
      if (!value) {
11352
        this.ucx = null;
11353
      }
11354
    }
11355
 
11356
    public void setFieldValue(_Fields field, Object value) {
11357
      switch (field) {
11358
      case SUCCESS:
11359
        if (value == null) {
11360
          unsetSuccess();
11361
        } else {
11362
          setSuccess((Boolean)value);
11363
        }
11364
        break;
11365
 
11366
      case UCX:
11367
        if (value == null) {
11368
          unsetUcx();
11369
        } else {
11370
          setUcx((UserContextException)value);
11371
        }
11372
        break;
11373
 
11374
      }
11375
    }
11376
 
11377
    public void setFieldValue(int fieldID, Object value) {
11378
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11379
    }
11380
 
11381
    public Object getFieldValue(_Fields field) {
11382
      switch (field) {
11383
      case SUCCESS:
11384
        return new Boolean(isSuccess());
11385
 
11386
      case UCX:
11387
        return getUcx();
11388
 
11389
      }
11390
      throw new IllegalStateException();
11391
    }
11392
 
11393
    public Object getFieldValue(int fieldId) {
11394
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11395
    }
11396
 
11397
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11398
    public boolean isSet(_Fields field) {
11399
      switch (field) {
11400
      case SUCCESS:
11401
        return isSetSuccess();
11402
      case UCX:
11403
        return isSetUcx();
11404
      }
11405
      throw new IllegalStateException();
11406
    }
11407
 
11408
    public boolean isSet(int fieldID) {
11409
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11410
    }
11411
 
11412
    @Override
11413
    public boolean equals(Object that) {
11414
      if (that == null)
11415
        return false;
553 chandransh 11416
      if (that instanceof setUserAsLoggedOut_result)
11417
        return this.equals((setUserAsLoggedOut_result)that);
48 ashish 11418
      return false;
11419
    }
11420
 
553 chandransh 11421
    public boolean equals(setUserAsLoggedOut_result that) {
48 ashish 11422
      if (that == null)
11423
        return false;
11424
 
11425
      boolean this_present_success = true;
11426
      boolean that_present_success = true;
11427
      if (this_present_success || that_present_success) {
11428
        if (!(this_present_success && that_present_success))
11429
          return false;
11430
        if (this.success != that.success)
11431
          return false;
11432
      }
11433
 
11434
      boolean this_present_ucx = true && this.isSetUcx();
11435
      boolean that_present_ucx = true && that.isSetUcx();
11436
      if (this_present_ucx || that_present_ucx) {
11437
        if (!(this_present_ucx && that_present_ucx))
11438
          return false;
11439
        if (!this.ucx.equals(that.ucx))
11440
          return false;
11441
      }
11442
 
11443
      return true;
11444
    }
11445
 
11446
    @Override
11447
    public int hashCode() {
11448
      return 0;
11449
    }
11450
 
553 chandransh 11451
    public int compareTo(setUserAsLoggedOut_result other) {
48 ashish 11452
      if (!getClass().equals(other.getClass())) {
11453
        return getClass().getName().compareTo(other.getClass().getName());
11454
      }
11455
 
11456
      int lastComparison = 0;
553 chandransh 11457
      setUserAsLoggedOut_result typedOther = (setUserAsLoggedOut_result)other;
48 ashish 11458
 
11459
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11460
      if (lastComparison != 0) {
11461
        return lastComparison;
11462
      }
11463
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11464
      if (lastComparison != 0) {
11465
        return lastComparison;
11466
      }
11467
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
11468
      if (lastComparison != 0) {
11469
        return lastComparison;
11470
      }
11471
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
11472
      if (lastComparison != 0) {
11473
        return lastComparison;
11474
      }
11475
      return 0;
11476
    }
11477
 
11478
    public void read(TProtocol iprot) throws TException {
11479
      TField field;
11480
      iprot.readStructBegin();
11481
      while (true)
11482
      {
11483
        field = iprot.readFieldBegin();
11484
        if (field.type == TType.STOP) { 
11485
          break;
11486
        }
11487
        _Fields fieldId = _Fields.findByThriftId(field.id);
11488
        if (fieldId == null) {
11489
          TProtocolUtil.skip(iprot, field.type);
11490
        } else {
11491
          switch (fieldId) {
11492
            case SUCCESS:
11493
              if (field.type == TType.BOOL) {
11494
                this.success = iprot.readBool();
11495
                setSuccessIsSet(true);
11496
              } else { 
11497
                TProtocolUtil.skip(iprot, field.type);
11498
              }
11499
              break;
11500
            case UCX:
11501
              if (field.type == TType.STRUCT) {
11502
                this.ucx = new UserContextException();
11503
                this.ucx.read(iprot);
11504
              } else { 
11505
                TProtocolUtil.skip(iprot, field.type);
11506
              }
11507
              break;
11508
          }
11509
          iprot.readFieldEnd();
11510
        }
11511
      }
11512
      iprot.readStructEnd();
11513
      validate();
11514
    }
11515
 
11516
    public void write(TProtocol oprot) throws TException {
11517
      oprot.writeStructBegin(STRUCT_DESC);
11518
 
11519
      if (this.isSetSuccess()) {
11520
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11521
        oprot.writeBool(this.success);
11522
        oprot.writeFieldEnd();
11523
      } else if (this.isSetUcx()) {
11524
        oprot.writeFieldBegin(UCX_FIELD_DESC);
11525
        this.ucx.write(oprot);
11526
        oprot.writeFieldEnd();
11527
      }
11528
      oprot.writeFieldStop();
11529
      oprot.writeStructEnd();
11530
    }
11531
 
11532
    @Override
11533
    public String toString() {
553 chandransh 11534
      StringBuilder sb = new StringBuilder("setUserAsLoggedOut_result(");
48 ashish 11535
      boolean first = true;
11536
 
11537
      sb.append("success:");
11538
      sb.append(this.success);
11539
      first = false;
11540
      if (!first) sb.append(", ");
11541
      sb.append("ucx:");
11542
      if (this.ucx == null) {
11543
        sb.append("null");
11544
      } else {
11545
        sb.append(this.ucx);
11546
      }
11547
      first = false;
11548
      sb.append(")");
11549
      return sb.toString();
11550
    }
11551
 
11552
    public void validate() throws TException {
11553
      // check for required fields
11554
    }
11555
 
11556
  }
11557
 
553 chandransh 11558
  public static class setDefaultAddress_args implements TBase<setDefaultAddress_args._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_args>   {
11559
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_args");
48 ashish 11560
 
11561
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
11562
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
11563
 
11564
    private long userid;
11565
    private long addressId;
11566
 
11567
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11568
    public enum _Fields implements TFieldIdEnum {
11569
      USERID((short)1, "userid"),
11570
      ADDRESS_ID((short)2, "addressId");
11571
 
11572
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11573
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11574
 
11575
      static {
11576
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11577
          byId.put((int)field._thriftId, field);
11578
          byName.put(field.getFieldName(), field);
11579
        }
11580
      }
11581
 
11582
      /**
11583
       * Find the _Fields constant that matches fieldId, or null if its not found.
11584
       */
11585
      public static _Fields findByThriftId(int fieldId) {
11586
        return byId.get(fieldId);
11587
      }
11588
 
11589
      /**
11590
       * Find the _Fields constant that matches fieldId, throwing an exception
11591
       * if it is not found.
11592
       */
11593
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11594
        _Fields fields = findByThriftId(fieldId);
11595
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11596
        return fields;
11597
      }
11598
 
11599
      /**
11600
       * Find the _Fields constant that matches name, or null if its not found.
11601
       */
11602
      public static _Fields findByName(String name) {
11603
        return byName.get(name);
11604
      }
11605
 
11606
      private final short _thriftId;
11607
      private final String _fieldName;
11608
 
11609
      _Fields(short thriftId, String fieldName) {
11610
        _thriftId = thriftId;
11611
        _fieldName = fieldName;
11612
      }
11613
 
11614
      public short getThriftFieldId() {
11615
        return _thriftId;
11616
      }
11617
 
11618
      public String getFieldName() {
11619
        return _fieldName;
11620
      }
11621
    }
11622
 
11623
    // isset id assignments
11624
    private static final int __USERID_ISSET_ID = 0;
11625
    private static final int __ADDRESSID_ISSET_ID = 1;
11626
    private BitSet __isset_bit_vector = new BitSet(2);
11627
 
11628
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11629
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
11630
          new FieldValueMetaData(TType.I64)));
11631
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
11632
          new FieldValueMetaData(TType.I64)));
11633
    }});
11634
 
11635
    static {
553 chandransh 11636
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_args.class, metaDataMap);
48 ashish 11637
    }
11638
 
553 chandransh 11639
    public setDefaultAddress_args() {
48 ashish 11640
    }
11641
 
553 chandransh 11642
    public setDefaultAddress_args(
48 ashish 11643
      long userid,
11644
      long addressId)
11645
    {
11646
      this();
11647
      this.userid = userid;
11648
      setUseridIsSet(true);
11649
      this.addressId = addressId;
11650
      setAddressIdIsSet(true);
11651
    }
11652
 
11653
    /**
11654
     * Performs a deep copy on <i>other</i>.
11655
     */
553 chandransh 11656
    public setDefaultAddress_args(setDefaultAddress_args other) {
48 ashish 11657
      __isset_bit_vector.clear();
11658
      __isset_bit_vector.or(other.__isset_bit_vector);
11659
      this.userid = other.userid;
11660
      this.addressId = other.addressId;
11661
    }
11662
 
553 chandransh 11663
    public setDefaultAddress_args deepCopy() {
11664
      return new setDefaultAddress_args(this);
48 ashish 11665
    }
11666
 
11667
    @Deprecated
553 chandransh 11668
    public setDefaultAddress_args clone() {
11669
      return new setDefaultAddress_args(this);
48 ashish 11670
    }
11671
 
11672
    public long getUserid() {
11673
      return this.userid;
11674
    }
11675
 
553 chandransh 11676
    public setDefaultAddress_args setUserid(long userid) {
48 ashish 11677
      this.userid = userid;
11678
      setUseridIsSet(true);
11679
      return this;
11680
    }
11681
 
11682
    public void unsetUserid() {
11683
      __isset_bit_vector.clear(__USERID_ISSET_ID);
11684
    }
11685
 
11686
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
11687
    public boolean isSetUserid() {
11688
      return __isset_bit_vector.get(__USERID_ISSET_ID);
11689
    }
11690
 
11691
    public void setUseridIsSet(boolean value) {
11692
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
11693
    }
11694
 
11695
    public long getAddressId() {
11696
      return this.addressId;
11697
    }
11698
 
553 chandransh 11699
    public setDefaultAddress_args setAddressId(long addressId) {
48 ashish 11700
      this.addressId = addressId;
11701
      setAddressIdIsSet(true);
11702
      return this;
11703
    }
11704
 
11705
    public void unsetAddressId() {
11706
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
11707
    }
11708
 
11709
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
11710
    public boolean isSetAddressId() {
11711
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
11712
    }
11713
 
11714
    public void setAddressIdIsSet(boolean value) {
11715
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
11716
    }
11717
 
11718
    public void setFieldValue(_Fields field, Object value) {
11719
      switch (field) {
11720
      case USERID:
11721
        if (value == null) {
11722
          unsetUserid();
11723
        } else {
11724
          setUserid((Long)value);
11725
        }
11726
        break;
11727
 
11728
      case ADDRESS_ID:
11729
        if (value == null) {
11730
          unsetAddressId();
11731
        } else {
11732
          setAddressId((Long)value);
11733
        }
11734
        break;
11735
 
11736
      }
11737
    }
11738
 
11739
    public void setFieldValue(int fieldID, Object value) {
11740
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11741
    }
11742
 
11743
    public Object getFieldValue(_Fields field) {
11744
      switch (field) {
11745
      case USERID:
11746
        return new Long(getUserid());
11747
 
11748
      case ADDRESS_ID:
11749
        return new Long(getAddressId());
11750
 
11751
      }
11752
      throw new IllegalStateException();
11753
    }
11754
 
11755
    public Object getFieldValue(int fieldId) {
11756
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11757
    }
11758
 
11759
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11760
    public boolean isSet(_Fields field) {
11761
      switch (field) {
11762
      case USERID:
11763
        return isSetUserid();
11764
      case ADDRESS_ID:
11765
        return isSetAddressId();
11766
      }
11767
      throw new IllegalStateException();
11768
    }
11769
 
11770
    public boolean isSet(int fieldID) {
11771
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11772
    }
11773
 
11774
    @Override
11775
    public boolean equals(Object that) {
11776
      if (that == null)
11777
        return false;
553 chandransh 11778
      if (that instanceof setDefaultAddress_args)
11779
        return this.equals((setDefaultAddress_args)that);
48 ashish 11780
      return false;
11781
    }
11782
 
553 chandransh 11783
    public boolean equals(setDefaultAddress_args that) {
48 ashish 11784
      if (that == null)
11785
        return false;
11786
 
11787
      boolean this_present_userid = true;
11788
      boolean that_present_userid = true;
11789
      if (this_present_userid || that_present_userid) {
11790
        if (!(this_present_userid && that_present_userid))
11791
          return false;
11792
        if (this.userid != that.userid)
11793
          return false;
11794
      }
11795
 
11796
      boolean this_present_addressId = true;
11797
      boolean that_present_addressId = true;
11798
      if (this_present_addressId || that_present_addressId) {
11799
        if (!(this_present_addressId && that_present_addressId))
11800
          return false;
11801
        if (this.addressId != that.addressId)
11802
          return false;
11803
      }
11804
 
11805
      return true;
11806
    }
11807
 
11808
    @Override
11809
    public int hashCode() {
11810
      return 0;
11811
    }
11812
 
553 chandransh 11813
    public int compareTo(setDefaultAddress_args other) {
48 ashish 11814
      if (!getClass().equals(other.getClass())) {
11815
        return getClass().getName().compareTo(other.getClass().getName());
11816
      }
11817
 
11818
      int lastComparison = 0;
553 chandransh 11819
      setDefaultAddress_args typedOther = (setDefaultAddress_args)other;
48 ashish 11820
 
11821
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
11822
      if (lastComparison != 0) {
11823
        return lastComparison;
11824
      }
11825
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
11826
      if (lastComparison != 0) {
11827
        return lastComparison;
11828
      }
11829
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
11830
      if (lastComparison != 0) {
11831
        return lastComparison;
11832
      }
11833
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
11834
      if (lastComparison != 0) {
11835
        return lastComparison;
11836
      }
11837
      return 0;
11838
    }
11839
 
11840
    public void read(TProtocol iprot) throws TException {
11841
      TField field;
11842
      iprot.readStructBegin();
11843
      while (true)
11844
      {
11845
        field = iprot.readFieldBegin();
11846
        if (field.type == TType.STOP) { 
11847
          break;
11848
        }
11849
        _Fields fieldId = _Fields.findByThriftId(field.id);
11850
        if (fieldId == null) {
11851
          TProtocolUtil.skip(iprot, field.type);
11852
        } else {
11853
          switch (fieldId) {
11854
            case USERID:
11855
              if (field.type == TType.I64) {
11856
                this.userid = iprot.readI64();
11857
                setUseridIsSet(true);
11858
              } else { 
11859
                TProtocolUtil.skip(iprot, field.type);
11860
              }
11861
              break;
11862
            case ADDRESS_ID:
11863
              if (field.type == TType.I64) {
11864
                this.addressId = iprot.readI64();
11865
                setAddressIdIsSet(true);
11866
              } else { 
11867
                TProtocolUtil.skip(iprot, field.type);
11868
              }
11869
              break;
11870
          }
11871
          iprot.readFieldEnd();
11872
        }
11873
      }
11874
      iprot.readStructEnd();
11875
      validate();
11876
    }
11877
 
11878
    public void write(TProtocol oprot) throws TException {
11879
      validate();
11880
 
11881
      oprot.writeStructBegin(STRUCT_DESC);
11882
      oprot.writeFieldBegin(USERID_FIELD_DESC);
11883
      oprot.writeI64(this.userid);
11884
      oprot.writeFieldEnd();
11885
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
11886
      oprot.writeI64(this.addressId);
11887
      oprot.writeFieldEnd();
11888
      oprot.writeFieldStop();
11889
      oprot.writeStructEnd();
11890
    }
11891
 
11892
    @Override
11893
    public String toString() {
553 chandransh 11894
      StringBuilder sb = new StringBuilder("setDefaultAddress_args(");
48 ashish 11895
      boolean first = true;
11896
 
11897
      sb.append("userid:");
11898
      sb.append(this.userid);
11899
      first = false;
11900
      if (!first) sb.append(", ");
11901
      sb.append("addressId:");
11902
      sb.append(this.addressId);
11903
      first = false;
11904
      sb.append(")");
11905
      return sb.toString();
11906
    }
11907
 
11908
    public void validate() throws TException {
11909
      // check for required fields
11910
    }
11911
 
11912
  }
11913
 
553 chandransh 11914
  public static class setDefaultAddress_result implements TBase<setDefaultAddress_result._Fields>, java.io.Serializable, Cloneable, Comparable<setDefaultAddress_result>   {
11915
    private static final TStruct STRUCT_DESC = new TStruct("setDefaultAddress_result");
48 ashish 11916
 
11917
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11918
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
11919
 
11920
    private boolean success;
11921
    private UserContextException ucx;
11922
 
11923
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11924
    public enum _Fields implements TFieldIdEnum {
11925
      SUCCESS((short)0, "success"),
11926
      UCX((short)1, "ucx");
11927
 
11928
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11929
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11930
 
11931
      static {
11932
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11933
          byId.put((int)field._thriftId, field);
11934
          byName.put(field.getFieldName(), field);
11935
        }
11936
      }
11937
 
11938
      /**
11939
       * Find the _Fields constant that matches fieldId, or null if its not found.
11940
       */
11941
      public static _Fields findByThriftId(int fieldId) {
11942
        return byId.get(fieldId);
11943
      }
11944
 
11945
      /**
11946
       * Find the _Fields constant that matches fieldId, throwing an exception
11947
       * if it is not found.
11948
       */
11949
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11950
        _Fields fields = findByThriftId(fieldId);
11951
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11952
        return fields;
11953
      }
11954
 
11955
      /**
11956
       * Find the _Fields constant that matches name, or null if its not found.
11957
       */
11958
      public static _Fields findByName(String name) {
11959
        return byName.get(name);
11960
      }
11961
 
11962
      private final short _thriftId;
11963
      private final String _fieldName;
11964
 
11965
      _Fields(short thriftId, String fieldName) {
11966
        _thriftId = thriftId;
11967
        _fieldName = fieldName;
11968
      }
11969
 
11970
      public short getThriftFieldId() {
11971
        return _thriftId;
11972
      }
11973
 
11974
      public String getFieldName() {
11975
        return _fieldName;
11976
      }
11977
    }
11978
 
11979
    // isset id assignments
11980
    private static final int __SUCCESS_ISSET_ID = 0;
11981
    private BitSet __isset_bit_vector = new BitSet(1);
11982
 
11983
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11984
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11985
          new FieldValueMetaData(TType.BOOL)));
11986
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
11987
          new FieldValueMetaData(TType.STRUCT)));
11988
    }});
11989
 
11990
    static {
553 chandransh 11991
      FieldMetaData.addStructMetaDataMap(setDefaultAddress_result.class, metaDataMap);
48 ashish 11992
    }
11993
 
553 chandransh 11994
    public setDefaultAddress_result() {
48 ashish 11995
    }
11996
 
553 chandransh 11997
    public setDefaultAddress_result(
48 ashish 11998
      boolean success,
11999
      UserContextException ucx)
12000
    {
12001
      this();
12002
      this.success = success;
12003
      setSuccessIsSet(true);
12004
      this.ucx = ucx;
12005
    }
12006
 
12007
    /**
12008
     * Performs a deep copy on <i>other</i>.
12009
     */
553 chandransh 12010
    public setDefaultAddress_result(setDefaultAddress_result other) {
48 ashish 12011
      __isset_bit_vector.clear();
12012
      __isset_bit_vector.or(other.__isset_bit_vector);
12013
      this.success = other.success;
12014
      if (other.isSetUcx()) {
12015
        this.ucx = new UserContextException(other.ucx);
12016
      }
12017
    }
12018
 
553 chandransh 12019
    public setDefaultAddress_result deepCopy() {
12020
      return new setDefaultAddress_result(this);
48 ashish 12021
    }
12022
 
12023
    @Deprecated
553 chandransh 12024
    public setDefaultAddress_result clone() {
12025
      return new setDefaultAddress_result(this);
48 ashish 12026
    }
12027
 
12028
    public boolean isSuccess() {
12029
      return this.success;
12030
    }
12031
 
553 chandransh 12032
    public setDefaultAddress_result setSuccess(boolean success) {
48 ashish 12033
      this.success = success;
12034
      setSuccessIsSet(true);
12035
      return this;
12036
    }
12037
 
12038
    public void unsetSuccess() {
12039
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12040
    }
12041
 
12042
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12043
    public boolean isSetSuccess() {
12044
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12045
    }
12046
 
12047
    public void setSuccessIsSet(boolean value) {
12048
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12049
    }
12050
 
12051
    public UserContextException getUcx() {
12052
      return this.ucx;
12053
    }
12054
 
553 chandransh 12055
    public setDefaultAddress_result setUcx(UserContextException ucx) {
48 ashish 12056
      this.ucx = ucx;
12057
      return this;
12058
    }
12059
 
12060
    public void unsetUcx() {
12061
      this.ucx = null;
12062
    }
12063
 
12064
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12065
    public boolean isSetUcx() {
12066
      return this.ucx != null;
12067
    }
12068
 
12069
    public void setUcxIsSet(boolean value) {
12070
      if (!value) {
12071
        this.ucx = null;
12072
      }
12073
    }
12074
 
12075
    public void setFieldValue(_Fields field, Object value) {
12076
      switch (field) {
12077
      case SUCCESS:
12078
        if (value == null) {
12079
          unsetSuccess();
12080
        } else {
12081
          setSuccess((Boolean)value);
12082
        }
12083
        break;
12084
 
12085
      case UCX:
12086
        if (value == null) {
12087
          unsetUcx();
12088
        } else {
12089
          setUcx((UserContextException)value);
12090
        }
12091
        break;
12092
 
12093
      }
12094
    }
12095
 
12096
    public void setFieldValue(int fieldID, Object value) {
12097
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12098
    }
12099
 
12100
    public Object getFieldValue(_Fields field) {
12101
      switch (field) {
12102
      case SUCCESS:
12103
        return new Boolean(isSuccess());
12104
 
12105
      case UCX:
12106
        return getUcx();
12107
 
12108
      }
12109
      throw new IllegalStateException();
12110
    }
12111
 
12112
    public Object getFieldValue(int fieldId) {
12113
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12114
    }
12115
 
12116
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12117
    public boolean isSet(_Fields field) {
12118
      switch (field) {
12119
      case SUCCESS:
12120
        return isSetSuccess();
12121
      case UCX:
12122
        return isSetUcx();
12123
      }
12124
      throw new IllegalStateException();
12125
    }
12126
 
12127
    public boolean isSet(int fieldID) {
12128
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12129
    }
12130
 
12131
    @Override
12132
    public boolean equals(Object that) {
12133
      if (that == null)
12134
        return false;
553 chandransh 12135
      if (that instanceof setDefaultAddress_result)
12136
        return this.equals((setDefaultAddress_result)that);
48 ashish 12137
      return false;
12138
    }
12139
 
553 chandransh 12140
    public boolean equals(setDefaultAddress_result that) {
48 ashish 12141
      if (that == null)
12142
        return false;
12143
 
12144
      boolean this_present_success = true;
12145
      boolean that_present_success = true;
12146
      if (this_present_success || that_present_success) {
12147
        if (!(this_present_success && that_present_success))
12148
          return false;
12149
        if (this.success != that.success)
12150
          return false;
12151
      }
12152
 
12153
      boolean this_present_ucx = true && this.isSetUcx();
12154
      boolean that_present_ucx = true && that.isSetUcx();
12155
      if (this_present_ucx || that_present_ucx) {
12156
        if (!(this_present_ucx && that_present_ucx))
12157
          return false;
12158
        if (!this.ucx.equals(that.ucx))
12159
          return false;
12160
      }
12161
 
12162
      return true;
12163
    }
12164
 
12165
    @Override
12166
    public int hashCode() {
12167
      return 0;
12168
    }
12169
 
553 chandransh 12170
    public int compareTo(setDefaultAddress_result other) {
48 ashish 12171
      if (!getClass().equals(other.getClass())) {
12172
        return getClass().getName().compareTo(other.getClass().getName());
12173
      }
12174
 
12175
      int lastComparison = 0;
553 chandransh 12176
      setDefaultAddress_result typedOther = (setDefaultAddress_result)other;
48 ashish 12177
 
12178
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12179
      if (lastComparison != 0) {
12180
        return lastComparison;
12181
      }
12182
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12183
      if (lastComparison != 0) {
12184
        return lastComparison;
12185
      }
12186
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12187
      if (lastComparison != 0) {
12188
        return lastComparison;
12189
      }
12190
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
12191
      if (lastComparison != 0) {
12192
        return lastComparison;
12193
      }
12194
      return 0;
12195
    }
12196
 
12197
    public void read(TProtocol iprot) throws TException {
12198
      TField field;
12199
      iprot.readStructBegin();
12200
      while (true)
12201
      {
12202
        field = iprot.readFieldBegin();
12203
        if (field.type == TType.STOP) { 
12204
          break;
12205
        }
12206
        _Fields fieldId = _Fields.findByThriftId(field.id);
12207
        if (fieldId == null) {
12208
          TProtocolUtil.skip(iprot, field.type);
12209
        } else {
12210
          switch (fieldId) {
12211
            case SUCCESS:
12212
              if (field.type == TType.BOOL) {
12213
                this.success = iprot.readBool();
12214
                setSuccessIsSet(true);
12215
              } else { 
12216
                TProtocolUtil.skip(iprot, field.type);
12217
              }
12218
              break;
12219
            case UCX:
12220
              if (field.type == TType.STRUCT) {
12221
                this.ucx = new UserContextException();
12222
                this.ucx.read(iprot);
12223
              } else { 
12224
                TProtocolUtil.skip(iprot, field.type);
12225
              }
12226
              break;
12227
          }
12228
          iprot.readFieldEnd();
12229
        }
12230
      }
12231
      iprot.readStructEnd();
12232
      validate();
12233
    }
12234
 
12235
    public void write(TProtocol oprot) throws TException {
12236
      oprot.writeStructBegin(STRUCT_DESC);
12237
 
12238
      if (this.isSetSuccess()) {
12239
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12240
        oprot.writeBool(this.success);
12241
        oprot.writeFieldEnd();
12242
      } else if (this.isSetUcx()) {
12243
        oprot.writeFieldBegin(UCX_FIELD_DESC);
12244
        this.ucx.write(oprot);
12245
        oprot.writeFieldEnd();
12246
      }
12247
      oprot.writeFieldStop();
12248
      oprot.writeStructEnd();
12249
    }
12250
 
12251
    @Override
12252
    public String toString() {
553 chandransh 12253
      StringBuilder sb = new StringBuilder("setDefaultAddress_result(");
48 ashish 12254
      boolean first = true;
12255
 
12256
      sb.append("success:");
12257
      sb.append(this.success);
12258
      first = false;
12259
      if (!first) sb.append(", ");
12260
      sb.append("ucx:");
12261
      if (this.ucx == null) {
12262
        sb.append("null");
12263
      } else {
12264
        sb.append(this.ucx);
12265
      }
12266
      first = false;
12267
      sb.append(")");
12268
      return sb.toString();
12269
    }
12270
 
12271
    public void validate() throws TException {
12272
      // check for required fields
12273
    }
12274
 
12275
  }
12276
 
553 chandransh 12277
  public static class updatePassword_args implements TBase<updatePassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_args>   {
12278
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_args");
48 ashish 12279
 
553 chandransh 12280
    private static final TField USERID_FIELD_DESC = new TField("userid", TType.I64, (short)1);
593 rajveer 12281
    private static final TField OLD_PASSWORD_FIELD_DESC = new TField("oldPassword", TType.STRING, (short)2);
12282
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)3);
48 ashish 12283
 
553 chandransh 12284
    private long userid;
593 rajveer 12285
    private String oldPassword;
12286
    private String newPassword;
48 ashish 12287
 
12288
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12289
    public enum _Fields implements TFieldIdEnum {
553 chandransh 12290
      USERID((short)1, "userid"),
593 rajveer 12291
      OLD_PASSWORD((short)2, "oldPassword"),
12292
      NEW_PASSWORD((short)3, "newPassword");
48 ashish 12293
 
12294
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12295
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12296
 
12297
      static {
12298
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12299
          byId.put((int)field._thriftId, field);
12300
          byName.put(field.getFieldName(), field);
12301
        }
12302
      }
12303
 
12304
      /**
12305
       * Find the _Fields constant that matches fieldId, or null if its not found.
12306
       */
12307
      public static _Fields findByThriftId(int fieldId) {
12308
        return byId.get(fieldId);
12309
      }
12310
 
12311
      /**
12312
       * Find the _Fields constant that matches fieldId, throwing an exception
12313
       * if it is not found.
12314
       */
12315
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12316
        _Fields fields = findByThriftId(fieldId);
12317
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12318
        return fields;
12319
      }
12320
 
12321
      /**
12322
       * Find the _Fields constant that matches name, or null if its not found.
12323
       */
12324
      public static _Fields findByName(String name) {
12325
        return byName.get(name);
12326
      }
12327
 
12328
      private final short _thriftId;
12329
      private final String _fieldName;
12330
 
12331
      _Fields(short thriftId, String fieldName) {
12332
        _thriftId = thriftId;
12333
        _fieldName = fieldName;
12334
      }
12335
 
12336
      public short getThriftFieldId() {
12337
        return _thriftId;
12338
      }
12339
 
12340
      public String getFieldName() {
12341
        return _fieldName;
12342
      }
12343
    }
12344
 
12345
    // isset id assignments
12346
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 12347
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 12348
 
12349
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 12350
      put(_Fields.USERID, new FieldMetaData("userid", TFieldRequirementType.DEFAULT, 
48 ashish 12351
          new FieldValueMetaData(TType.I64)));
593 rajveer 12352
      put(_Fields.OLD_PASSWORD, new FieldMetaData("oldPassword", TFieldRequirementType.DEFAULT, 
553 chandransh 12353
          new FieldValueMetaData(TType.STRING)));
593 rajveer 12354
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
12355
          new FieldValueMetaData(TType.STRING)));
48 ashish 12356
    }});
12357
 
12358
    static {
553 chandransh 12359
      FieldMetaData.addStructMetaDataMap(updatePassword_args.class, metaDataMap);
48 ashish 12360
    }
12361
 
553 chandransh 12362
    public updatePassword_args() {
48 ashish 12363
    }
12364
 
553 chandransh 12365
    public updatePassword_args(
12366
      long userid,
593 rajveer 12367
      String oldPassword,
12368
      String newPassword)
48 ashish 12369
    {
12370
      this();
553 chandransh 12371
      this.userid = userid;
12372
      setUseridIsSet(true);
593 rajveer 12373
      this.oldPassword = oldPassword;
12374
      this.newPassword = newPassword;
48 ashish 12375
    }
12376
 
12377
    /**
12378
     * Performs a deep copy on <i>other</i>.
12379
     */
553 chandransh 12380
    public updatePassword_args(updatePassword_args other) {
48 ashish 12381
      __isset_bit_vector.clear();
12382
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 12383
      this.userid = other.userid;
593 rajveer 12384
      if (other.isSetOldPassword()) {
12385
        this.oldPassword = other.oldPassword;
553 chandransh 12386
      }
593 rajveer 12387
      if (other.isSetNewPassword()) {
12388
        this.newPassword = other.newPassword;
12389
      }
48 ashish 12390
    }
12391
 
553 chandransh 12392
    public updatePassword_args deepCopy() {
12393
      return new updatePassword_args(this);
48 ashish 12394
    }
12395
 
12396
    @Deprecated
553 chandransh 12397
    public updatePassword_args clone() {
12398
      return new updatePassword_args(this);
48 ashish 12399
    }
12400
 
553 chandransh 12401
    public long getUserid() {
12402
      return this.userid;
48 ashish 12403
    }
12404
 
553 chandransh 12405
    public updatePassword_args setUserid(long userid) {
12406
      this.userid = userid;
12407
      setUseridIsSet(true);
48 ashish 12408
      return this;
12409
    }
12410
 
553 chandransh 12411
    public void unsetUserid() {
48 ashish 12412
      __isset_bit_vector.clear(__USERID_ISSET_ID);
12413
    }
12414
 
553 chandransh 12415
    /** Returns true if field userid is set (has been asigned a value) and false otherwise */
12416
    public boolean isSetUserid() {
48 ashish 12417
      return __isset_bit_vector.get(__USERID_ISSET_ID);
12418
    }
12419
 
553 chandransh 12420
    public void setUseridIsSet(boolean value) {
48 ashish 12421
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
12422
    }
12423
 
593 rajveer 12424
    public String getOldPassword() {
12425
      return this.oldPassword;
48 ashish 12426
    }
12427
 
593 rajveer 12428
    public updatePassword_args setOldPassword(String oldPassword) {
12429
      this.oldPassword = oldPassword;
48 ashish 12430
      return this;
12431
    }
12432
 
593 rajveer 12433
    public void unsetOldPassword() {
12434
      this.oldPassword = null;
48 ashish 12435
    }
12436
 
593 rajveer 12437
    /** Returns true if field oldPassword is set (has been asigned a value) and false otherwise */
12438
    public boolean isSetOldPassword() {
12439
      return this.oldPassword != null;
48 ashish 12440
    }
12441
 
593 rajveer 12442
    public void setOldPasswordIsSet(boolean value) {
553 chandransh 12443
      if (!value) {
593 rajveer 12444
        this.oldPassword = null;
553 chandransh 12445
      }
48 ashish 12446
    }
12447
 
593 rajveer 12448
    public String getNewPassword() {
12449
      return this.newPassword;
12450
    }
12451
 
12452
    public updatePassword_args setNewPassword(String newPassword) {
12453
      this.newPassword = newPassword;
12454
      return this;
12455
    }
12456
 
12457
    public void unsetNewPassword() {
12458
      this.newPassword = null;
12459
    }
12460
 
12461
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
12462
    public boolean isSetNewPassword() {
12463
      return this.newPassword != null;
12464
    }
12465
 
12466
    public void setNewPasswordIsSet(boolean value) {
12467
      if (!value) {
12468
        this.newPassword = null;
12469
      }
12470
    }
12471
 
48 ashish 12472
    public void setFieldValue(_Fields field, Object value) {
12473
      switch (field) {
553 chandransh 12474
      case USERID:
48 ashish 12475
        if (value == null) {
553 chandransh 12476
          unsetUserid();
48 ashish 12477
        } else {
553 chandransh 12478
          setUserid((Long)value);
48 ashish 12479
        }
12480
        break;
12481
 
593 rajveer 12482
      case OLD_PASSWORD:
48 ashish 12483
        if (value == null) {
593 rajveer 12484
          unsetOldPassword();
48 ashish 12485
        } else {
593 rajveer 12486
          setOldPassword((String)value);
48 ashish 12487
        }
12488
        break;
12489
 
593 rajveer 12490
      case NEW_PASSWORD:
12491
        if (value == null) {
12492
          unsetNewPassword();
12493
        } else {
12494
          setNewPassword((String)value);
12495
        }
12496
        break;
12497
 
48 ashish 12498
      }
12499
    }
12500
 
12501
    public void setFieldValue(int fieldID, Object value) {
12502
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12503
    }
12504
 
12505
    public Object getFieldValue(_Fields field) {
12506
      switch (field) {
553 chandransh 12507
      case USERID:
12508
        return new Long(getUserid());
48 ashish 12509
 
593 rajveer 12510
      case OLD_PASSWORD:
12511
        return getOldPassword();
48 ashish 12512
 
593 rajveer 12513
      case NEW_PASSWORD:
12514
        return getNewPassword();
12515
 
48 ashish 12516
      }
12517
      throw new IllegalStateException();
12518
    }
12519
 
12520
    public Object getFieldValue(int fieldId) {
12521
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12522
    }
12523
 
12524
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12525
    public boolean isSet(_Fields field) {
12526
      switch (field) {
553 chandransh 12527
      case USERID:
12528
        return isSetUserid();
593 rajveer 12529
      case OLD_PASSWORD:
12530
        return isSetOldPassword();
12531
      case NEW_PASSWORD:
12532
        return isSetNewPassword();
48 ashish 12533
      }
12534
      throw new IllegalStateException();
12535
    }
12536
 
12537
    public boolean isSet(int fieldID) {
12538
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12539
    }
12540
 
12541
    @Override
12542
    public boolean equals(Object that) {
12543
      if (that == null)
12544
        return false;
553 chandransh 12545
      if (that instanceof updatePassword_args)
12546
        return this.equals((updatePassword_args)that);
48 ashish 12547
      return false;
12548
    }
12549
 
553 chandransh 12550
    public boolean equals(updatePassword_args that) {
48 ashish 12551
      if (that == null)
12552
        return false;
12553
 
553 chandransh 12554
      boolean this_present_userid = true;
12555
      boolean that_present_userid = true;
12556
      if (this_present_userid || that_present_userid) {
12557
        if (!(this_present_userid && that_present_userid))
48 ashish 12558
          return false;
553 chandransh 12559
        if (this.userid != that.userid)
48 ashish 12560
          return false;
12561
      }
12562
 
593 rajveer 12563
      boolean this_present_oldPassword = true && this.isSetOldPassword();
12564
      boolean that_present_oldPassword = true && that.isSetOldPassword();
12565
      if (this_present_oldPassword || that_present_oldPassword) {
12566
        if (!(this_present_oldPassword && that_present_oldPassword))
48 ashish 12567
          return false;
593 rajveer 12568
        if (!this.oldPassword.equals(that.oldPassword))
48 ashish 12569
          return false;
12570
      }
12571
 
593 rajveer 12572
      boolean this_present_newPassword = true && this.isSetNewPassword();
12573
      boolean that_present_newPassword = true && that.isSetNewPassword();
12574
      if (this_present_newPassword || that_present_newPassword) {
12575
        if (!(this_present_newPassword && that_present_newPassword))
12576
          return false;
12577
        if (!this.newPassword.equals(that.newPassword))
12578
          return false;
12579
      }
12580
 
48 ashish 12581
      return true;
12582
    }
12583
 
12584
    @Override
12585
    public int hashCode() {
12586
      return 0;
12587
    }
12588
 
553 chandransh 12589
    public int compareTo(updatePassword_args other) {
48 ashish 12590
      if (!getClass().equals(other.getClass())) {
12591
        return getClass().getName().compareTo(other.getClass().getName());
12592
      }
12593
 
12594
      int lastComparison = 0;
553 chandransh 12595
      updatePassword_args typedOther = (updatePassword_args)other;
48 ashish 12596
 
553 chandransh 12597
      lastComparison = Boolean.valueOf(isSetUserid()).compareTo(isSetUserid());
48 ashish 12598
      if (lastComparison != 0) {
12599
        return lastComparison;
12600
      }
553 chandransh 12601
      lastComparison = TBaseHelper.compareTo(userid, typedOther.userid);
48 ashish 12602
      if (lastComparison != 0) {
12603
        return lastComparison;
12604
      }
593 rajveer 12605
      lastComparison = Boolean.valueOf(isSetOldPassword()).compareTo(isSetOldPassword());
48 ashish 12606
      if (lastComparison != 0) {
12607
        return lastComparison;
12608
      }
593 rajveer 12609
      lastComparison = TBaseHelper.compareTo(oldPassword, typedOther.oldPassword);
48 ashish 12610
      if (lastComparison != 0) {
12611
        return lastComparison;
12612
      }
593 rajveer 12613
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
12614
      if (lastComparison != 0) {
12615
        return lastComparison;
12616
      }
12617
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
12618
      if (lastComparison != 0) {
12619
        return lastComparison;
12620
      }
48 ashish 12621
      return 0;
12622
    }
12623
 
12624
    public void read(TProtocol iprot) throws TException {
12625
      TField field;
12626
      iprot.readStructBegin();
12627
      while (true)
12628
      {
12629
        field = iprot.readFieldBegin();
12630
        if (field.type == TType.STOP) { 
12631
          break;
12632
        }
12633
        _Fields fieldId = _Fields.findByThriftId(field.id);
12634
        if (fieldId == null) {
12635
          TProtocolUtil.skip(iprot, field.type);
12636
        } else {
12637
          switch (fieldId) {
553 chandransh 12638
            case USERID:
48 ashish 12639
              if (field.type == TType.I64) {
553 chandransh 12640
                this.userid = iprot.readI64();
12641
                setUseridIsSet(true);
48 ashish 12642
              } else { 
12643
                TProtocolUtil.skip(iprot, field.type);
12644
              }
12645
              break;
593 rajveer 12646
            case OLD_PASSWORD:
553 chandransh 12647
              if (field.type == TType.STRING) {
593 rajveer 12648
                this.oldPassword = iprot.readString();
48 ashish 12649
              } else { 
12650
                TProtocolUtil.skip(iprot, field.type);
12651
              }
12652
              break;
593 rajveer 12653
            case NEW_PASSWORD:
12654
              if (field.type == TType.STRING) {
12655
                this.newPassword = iprot.readString();
12656
              } else { 
12657
                TProtocolUtil.skip(iprot, field.type);
12658
              }
12659
              break;
48 ashish 12660
          }
12661
          iprot.readFieldEnd();
12662
        }
12663
      }
12664
      iprot.readStructEnd();
12665
      validate();
12666
    }
12667
 
12668
    public void write(TProtocol oprot) throws TException {
12669
      validate();
12670
 
12671
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 12672
      oprot.writeFieldBegin(USERID_FIELD_DESC);
12673
      oprot.writeI64(this.userid);
48 ashish 12674
      oprot.writeFieldEnd();
593 rajveer 12675
      if (this.oldPassword != null) {
12676
        oprot.writeFieldBegin(OLD_PASSWORD_FIELD_DESC);
12677
        oprot.writeString(this.oldPassword);
553 chandransh 12678
        oprot.writeFieldEnd();
12679
      }
593 rajveer 12680
      if (this.newPassword != null) {
12681
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
12682
        oprot.writeString(this.newPassword);
12683
        oprot.writeFieldEnd();
12684
      }
48 ashish 12685
      oprot.writeFieldStop();
12686
      oprot.writeStructEnd();
12687
    }
12688
 
12689
    @Override
12690
    public String toString() {
553 chandransh 12691
      StringBuilder sb = new StringBuilder("updatePassword_args(");
48 ashish 12692
      boolean first = true;
12693
 
553 chandransh 12694
      sb.append("userid:");
12695
      sb.append(this.userid);
48 ashish 12696
      first = false;
12697
      if (!first) sb.append(", ");
593 rajveer 12698
      sb.append("oldPassword:");
12699
      if (this.oldPassword == null) {
553 chandransh 12700
        sb.append("null");
12701
      } else {
593 rajveer 12702
        sb.append(this.oldPassword);
553 chandransh 12703
      }
48 ashish 12704
      first = false;
593 rajveer 12705
      if (!first) sb.append(", ");
12706
      sb.append("newPassword:");
12707
      if (this.newPassword == null) {
12708
        sb.append("null");
12709
      } else {
12710
        sb.append(this.newPassword);
12711
      }
12712
      first = false;
48 ashish 12713
      sb.append(")");
12714
      return sb.toString();
12715
    }
12716
 
12717
    public void validate() throws TException {
12718
      // check for required fields
12719
    }
12720
 
12721
  }
12722
 
553 chandransh 12723
  public static class updatePassword_result implements TBase<updatePassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<updatePassword_result>   {
12724
    private static final TStruct STRUCT_DESC = new TStruct("updatePassword_result");
48 ashish 12725
 
12726
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12727
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
12728
 
12729
    private boolean success;
12730
    private UserContextException ucx;
12731
 
12732
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12733
    public enum _Fields implements TFieldIdEnum {
12734
      SUCCESS((short)0, "success"),
12735
      UCX((short)1, "ucx");
12736
 
12737
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12738
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12739
 
12740
      static {
12741
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12742
          byId.put((int)field._thriftId, field);
12743
          byName.put(field.getFieldName(), field);
12744
        }
12745
      }
12746
 
12747
      /**
12748
       * Find the _Fields constant that matches fieldId, or null if its not found.
12749
       */
12750
      public static _Fields findByThriftId(int fieldId) {
12751
        return byId.get(fieldId);
12752
      }
12753
 
12754
      /**
12755
       * Find the _Fields constant that matches fieldId, throwing an exception
12756
       * if it is not found.
12757
       */
12758
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12759
        _Fields fields = findByThriftId(fieldId);
12760
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12761
        return fields;
12762
      }
12763
 
12764
      /**
12765
       * Find the _Fields constant that matches name, or null if its not found.
12766
       */
12767
      public static _Fields findByName(String name) {
12768
        return byName.get(name);
12769
      }
12770
 
12771
      private final short _thriftId;
12772
      private final String _fieldName;
12773
 
12774
      _Fields(short thriftId, String fieldName) {
12775
        _thriftId = thriftId;
12776
        _fieldName = fieldName;
12777
      }
12778
 
12779
      public short getThriftFieldId() {
12780
        return _thriftId;
12781
      }
12782
 
12783
      public String getFieldName() {
12784
        return _fieldName;
12785
      }
12786
    }
12787
 
12788
    // isset id assignments
12789
    private static final int __SUCCESS_ISSET_ID = 0;
12790
    private BitSet __isset_bit_vector = new BitSet(1);
12791
 
12792
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12793
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12794
          new FieldValueMetaData(TType.BOOL)));
12795
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
12796
          new FieldValueMetaData(TType.STRUCT)));
12797
    }});
12798
 
12799
    static {
553 chandransh 12800
      FieldMetaData.addStructMetaDataMap(updatePassword_result.class, metaDataMap);
48 ashish 12801
    }
12802
 
553 chandransh 12803
    public updatePassword_result() {
48 ashish 12804
    }
12805
 
553 chandransh 12806
    public updatePassword_result(
48 ashish 12807
      boolean success,
12808
      UserContextException ucx)
12809
    {
12810
      this();
12811
      this.success = success;
12812
      setSuccessIsSet(true);
12813
      this.ucx = ucx;
12814
    }
12815
 
12816
    /**
12817
     * Performs a deep copy on <i>other</i>.
12818
     */
553 chandransh 12819
    public updatePassword_result(updatePassword_result other) {
48 ashish 12820
      __isset_bit_vector.clear();
12821
      __isset_bit_vector.or(other.__isset_bit_vector);
12822
      this.success = other.success;
12823
      if (other.isSetUcx()) {
12824
        this.ucx = new UserContextException(other.ucx);
12825
      }
12826
    }
12827
 
553 chandransh 12828
    public updatePassword_result deepCopy() {
12829
      return new updatePassword_result(this);
48 ashish 12830
    }
12831
 
12832
    @Deprecated
553 chandransh 12833
    public updatePassword_result clone() {
12834
      return new updatePassword_result(this);
48 ashish 12835
    }
12836
 
12837
    public boolean isSuccess() {
12838
      return this.success;
12839
    }
12840
 
553 chandransh 12841
    public updatePassword_result setSuccess(boolean success) {
48 ashish 12842
      this.success = success;
12843
      setSuccessIsSet(true);
12844
      return this;
12845
    }
12846
 
12847
    public void unsetSuccess() {
12848
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12849
    }
12850
 
12851
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12852
    public boolean isSetSuccess() {
12853
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12854
    }
12855
 
12856
    public void setSuccessIsSet(boolean value) {
12857
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12858
    }
12859
 
12860
    public UserContextException getUcx() {
12861
      return this.ucx;
12862
    }
12863
 
553 chandransh 12864
    public updatePassword_result setUcx(UserContextException ucx) {
48 ashish 12865
      this.ucx = ucx;
12866
      return this;
12867
    }
12868
 
12869
    public void unsetUcx() {
12870
      this.ucx = null;
12871
    }
12872
 
12873
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
12874
    public boolean isSetUcx() {
12875
      return this.ucx != null;
12876
    }
12877
 
12878
    public void setUcxIsSet(boolean value) {
12879
      if (!value) {
12880
        this.ucx = null;
12881
      }
12882
    }
12883
 
12884
    public void setFieldValue(_Fields field, Object value) {
12885
      switch (field) {
12886
      case SUCCESS:
12887
        if (value == null) {
12888
          unsetSuccess();
12889
        } else {
12890
          setSuccess((Boolean)value);
12891
        }
12892
        break;
12893
 
12894
      case UCX:
12895
        if (value == null) {
12896
          unsetUcx();
12897
        } else {
12898
          setUcx((UserContextException)value);
12899
        }
12900
        break;
12901
 
12902
      }
12903
    }
12904
 
12905
    public void setFieldValue(int fieldID, Object value) {
12906
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12907
    }
12908
 
12909
    public Object getFieldValue(_Fields field) {
12910
      switch (field) {
12911
      case SUCCESS:
12912
        return new Boolean(isSuccess());
12913
 
12914
      case UCX:
12915
        return getUcx();
12916
 
12917
      }
12918
      throw new IllegalStateException();
12919
    }
12920
 
12921
    public Object getFieldValue(int fieldId) {
12922
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12923
    }
12924
 
12925
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12926
    public boolean isSet(_Fields field) {
12927
      switch (field) {
12928
      case SUCCESS:
12929
        return isSetSuccess();
12930
      case UCX:
12931
        return isSetUcx();
12932
      }
12933
      throw new IllegalStateException();
12934
    }
12935
 
12936
    public boolean isSet(int fieldID) {
12937
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12938
    }
12939
 
12940
    @Override
12941
    public boolean equals(Object that) {
12942
      if (that == null)
12943
        return false;
553 chandransh 12944
      if (that instanceof updatePassword_result)
12945
        return this.equals((updatePassword_result)that);
48 ashish 12946
      return false;
12947
    }
12948
 
553 chandransh 12949
    public boolean equals(updatePassword_result that) {
48 ashish 12950
      if (that == null)
12951
        return false;
12952
 
12953
      boolean this_present_success = true;
12954
      boolean that_present_success = true;
12955
      if (this_present_success || that_present_success) {
12956
        if (!(this_present_success && that_present_success))
12957
          return false;
12958
        if (this.success != that.success)
12959
          return false;
12960
      }
12961
 
12962
      boolean this_present_ucx = true && this.isSetUcx();
12963
      boolean that_present_ucx = true && that.isSetUcx();
12964
      if (this_present_ucx || that_present_ucx) {
12965
        if (!(this_present_ucx && that_present_ucx))
12966
          return false;
12967
        if (!this.ucx.equals(that.ucx))
12968
          return false;
12969
      }
12970
 
12971
      return true;
12972
    }
12973
 
12974
    @Override
12975
    public int hashCode() {
12976
      return 0;
12977
    }
12978
 
553 chandransh 12979
    public int compareTo(updatePassword_result other) {
48 ashish 12980
      if (!getClass().equals(other.getClass())) {
12981
        return getClass().getName().compareTo(other.getClass().getName());
12982
      }
12983
 
12984
      int lastComparison = 0;
553 chandransh 12985
      updatePassword_result typedOther = (updatePassword_result)other;
48 ashish 12986
 
12987
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12988
      if (lastComparison != 0) {
12989
        return lastComparison;
12990
      }
12991
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12992
      if (lastComparison != 0) {
12993
        return lastComparison;
12994
      }
12995
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
12996
      if (lastComparison != 0) {
12997
        return lastComparison;
12998
      }
12999
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13000
      if (lastComparison != 0) {
13001
        return lastComparison;
13002
      }
13003
      return 0;
13004
    }
13005
 
13006
    public void read(TProtocol iprot) throws TException {
13007
      TField field;
13008
      iprot.readStructBegin();
13009
      while (true)
13010
      {
13011
        field = iprot.readFieldBegin();
13012
        if (field.type == TType.STOP) { 
13013
          break;
13014
        }
13015
        _Fields fieldId = _Fields.findByThriftId(field.id);
13016
        if (fieldId == null) {
13017
          TProtocolUtil.skip(iprot, field.type);
13018
        } else {
13019
          switch (fieldId) {
13020
            case SUCCESS:
13021
              if (field.type == TType.BOOL) {
13022
                this.success = iprot.readBool();
13023
                setSuccessIsSet(true);
13024
              } else { 
13025
                TProtocolUtil.skip(iprot, field.type);
13026
              }
13027
              break;
13028
            case UCX:
13029
              if (field.type == TType.STRUCT) {
13030
                this.ucx = new UserContextException();
13031
                this.ucx.read(iprot);
13032
              } else { 
13033
                TProtocolUtil.skip(iprot, field.type);
13034
              }
13035
              break;
13036
          }
13037
          iprot.readFieldEnd();
13038
        }
13039
      }
13040
      iprot.readStructEnd();
13041
      validate();
13042
    }
13043
 
13044
    public void write(TProtocol oprot) throws TException {
13045
      oprot.writeStructBegin(STRUCT_DESC);
13046
 
13047
      if (this.isSetSuccess()) {
13048
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13049
        oprot.writeBool(this.success);
13050
        oprot.writeFieldEnd();
13051
      } else if (this.isSetUcx()) {
13052
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13053
        this.ucx.write(oprot);
13054
        oprot.writeFieldEnd();
13055
      }
13056
      oprot.writeFieldStop();
13057
      oprot.writeStructEnd();
13058
    }
13059
 
13060
    @Override
13061
    public String toString() {
553 chandransh 13062
      StringBuilder sb = new StringBuilder("updatePassword_result(");
48 ashish 13063
      boolean first = true;
13064
 
13065
      sb.append("success:");
13066
      sb.append(this.success);
13067
      first = false;
13068
      if (!first) sb.append(", ");
13069
      sb.append("ucx:");
13070
      if (this.ucx == null) {
13071
        sb.append("null");
13072
      } else {
13073
        sb.append(this.ucx);
13074
      }
13075
      first = false;
13076
      sb.append(")");
13077
      return sb.toString();
13078
    }
13079
 
13080
    public void validate() throws TException {
13081
      // check for required fields
13082
    }
13083
 
13084
  }
13085
 
582 rajveer 13086
  public static class forgotPassword_args implements TBase<forgotPassword_args._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_args>   {
13087
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_args");
13088
 
13089
    private static final TField EMAIL_FIELD_DESC = new TField("email", TType.STRING, (short)1);
896 rajveer 13090
    private static final TField NEW_PASSWORD_FIELD_DESC = new TField("newPassword", TType.STRING, (short)2);
582 rajveer 13091
 
13092
    private String email;
896 rajveer 13093
    private String newPassword;
582 rajveer 13094
 
13095
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13096
    public enum _Fields implements TFieldIdEnum {
896 rajveer 13097
      EMAIL((short)1, "email"),
13098
      NEW_PASSWORD((short)2, "newPassword");
582 rajveer 13099
 
13100
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13101
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13102
 
13103
      static {
13104
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13105
          byId.put((int)field._thriftId, field);
13106
          byName.put(field.getFieldName(), field);
13107
        }
13108
      }
13109
 
13110
      /**
13111
       * Find the _Fields constant that matches fieldId, or null if its not found.
13112
       */
13113
      public static _Fields findByThriftId(int fieldId) {
13114
        return byId.get(fieldId);
13115
      }
13116
 
13117
      /**
13118
       * Find the _Fields constant that matches fieldId, throwing an exception
13119
       * if it is not found.
13120
       */
13121
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13122
        _Fields fields = findByThriftId(fieldId);
13123
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13124
        return fields;
13125
      }
13126
 
13127
      /**
13128
       * Find the _Fields constant that matches name, or null if its not found.
13129
       */
13130
      public static _Fields findByName(String name) {
13131
        return byName.get(name);
13132
      }
13133
 
13134
      private final short _thriftId;
13135
      private final String _fieldName;
13136
 
13137
      _Fields(short thriftId, String fieldName) {
13138
        _thriftId = thriftId;
13139
        _fieldName = fieldName;
13140
      }
13141
 
13142
      public short getThriftFieldId() {
13143
        return _thriftId;
13144
      }
13145
 
13146
      public String getFieldName() {
13147
        return _fieldName;
13148
      }
13149
    }
13150
 
13151
    // isset id assignments
13152
 
13153
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13154
      put(_Fields.EMAIL, new FieldMetaData("email", TFieldRequirementType.DEFAULT, 
13155
          new FieldValueMetaData(TType.STRING)));
896 rajveer 13156
      put(_Fields.NEW_PASSWORD, new FieldMetaData("newPassword", TFieldRequirementType.DEFAULT, 
13157
          new FieldValueMetaData(TType.STRING)));
582 rajveer 13158
    }});
13159
 
13160
    static {
13161
      FieldMetaData.addStructMetaDataMap(forgotPassword_args.class, metaDataMap);
13162
    }
13163
 
13164
    public forgotPassword_args() {
13165
    }
13166
 
13167
    public forgotPassword_args(
896 rajveer 13168
      String email,
13169
      String newPassword)
582 rajveer 13170
    {
13171
      this();
13172
      this.email = email;
896 rajveer 13173
      this.newPassword = newPassword;
582 rajveer 13174
    }
13175
 
13176
    /**
13177
     * Performs a deep copy on <i>other</i>.
13178
     */
13179
    public forgotPassword_args(forgotPassword_args other) {
13180
      if (other.isSetEmail()) {
13181
        this.email = other.email;
13182
      }
896 rajveer 13183
      if (other.isSetNewPassword()) {
13184
        this.newPassword = other.newPassword;
13185
      }
582 rajveer 13186
    }
13187
 
13188
    public forgotPassword_args deepCopy() {
13189
      return new forgotPassword_args(this);
13190
    }
13191
 
13192
    @Deprecated
13193
    public forgotPassword_args clone() {
13194
      return new forgotPassword_args(this);
13195
    }
13196
 
13197
    public String getEmail() {
13198
      return this.email;
13199
    }
13200
 
13201
    public forgotPassword_args setEmail(String email) {
13202
      this.email = email;
13203
      return this;
13204
    }
13205
 
13206
    public void unsetEmail() {
13207
      this.email = null;
13208
    }
13209
 
13210
    /** Returns true if field email is set (has been asigned a value) and false otherwise */
13211
    public boolean isSetEmail() {
13212
      return this.email != null;
13213
    }
13214
 
13215
    public void setEmailIsSet(boolean value) {
13216
      if (!value) {
13217
        this.email = null;
13218
      }
13219
    }
13220
 
896 rajveer 13221
    public String getNewPassword() {
13222
      return this.newPassword;
13223
    }
13224
 
13225
    public forgotPassword_args setNewPassword(String newPassword) {
13226
      this.newPassword = newPassword;
13227
      return this;
13228
    }
13229
 
13230
    public void unsetNewPassword() {
13231
      this.newPassword = null;
13232
    }
13233
 
13234
    /** Returns true if field newPassword is set (has been asigned a value) and false otherwise */
13235
    public boolean isSetNewPassword() {
13236
      return this.newPassword != null;
13237
    }
13238
 
13239
    public void setNewPasswordIsSet(boolean value) {
13240
      if (!value) {
13241
        this.newPassword = null;
13242
      }
13243
    }
13244
 
582 rajveer 13245
    public void setFieldValue(_Fields field, Object value) {
13246
      switch (field) {
13247
      case EMAIL:
13248
        if (value == null) {
13249
          unsetEmail();
13250
        } else {
13251
          setEmail((String)value);
13252
        }
13253
        break;
13254
 
896 rajveer 13255
      case NEW_PASSWORD:
13256
        if (value == null) {
13257
          unsetNewPassword();
13258
        } else {
13259
          setNewPassword((String)value);
13260
        }
13261
        break;
13262
 
582 rajveer 13263
      }
13264
    }
13265
 
13266
    public void setFieldValue(int fieldID, Object value) {
13267
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13268
    }
13269
 
13270
    public Object getFieldValue(_Fields field) {
13271
      switch (field) {
13272
      case EMAIL:
13273
        return getEmail();
13274
 
896 rajveer 13275
      case NEW_PASSWORD:
13276
        return getNewPassword();
13277
 
582 rajveer 13278
      }
13279
      throw new IllegalStateException();
13280
    }
13281
 
13282
    public Object getFieldValue(int fieldId) {
13283
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13284
    }
13285
 
13286
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13287
    public boolean isSet(_Fields field) {
13288
      switch (field) {
13289
      case EMAIL:
13290
        return isSetEmail();
896 rajveer 13291
      case NEW_PASSWORD:
13292
        return isSetNewPassword();
582 rajveer 13293
      }
13294
      throw new IllegalStateException();
13295
    }
13296
 
13297
    public boolean isSet(int fieldID) {
13298
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13299
    }
13300
 
13301
    @Override
13302
    public boolean equals(Object that) {
13303
      if (that == null)
13304
        return false;
13305
      if (that instanceof forgotPassword_args)
13306
        return this.equals((forgotPassword_args)that);
13307
      return false;
13308
    }
13309
 
13310
    public boolean equals(forgotPassword_args that) {
13311
      if (that == null)
13312
        return false;
13313
 
13314
      boolean this_present_email = true && this.isSetEmail();
13315
      boolean that_present_email = true && that.isSetEmail();
13316
      if (this_present_email || that_present_email) {
13317
        if (!(this_present_email && that_present_email))
13318
          return false;
13319
        if (!this.email.equals(that.email))
13320
          return false;
13321
      }
13322
 
896 rajveer 13323
      boolean this_present_newPassword = true && this.isSetNewPassword();
13324
      boolean that_present_newPassword = true && that.isSetNewPassword();
13325
      if (this_present_newPassword || that_present_newPassword) {
13326
        if (!(this_present_newPassword && that_present_newPassword))
13327
          return false;
13328
        if (!this.newPassword.equals(that.newPassword))
13329
          return false;
13330
      }
13331
 
582 rajveer 13332
      return true;
13333
    }
13334
 
13335
    @Override
13336
    public int hashCode() {
13337
      return 0;
13338
    }
13339
 
13340
    public int compareTo(forgotPassword_args other) {
13341
      if (!getClass().equals(other.getClass())) {
13342
        return getClass().getName().compareTo(other.getClass().getName());
13343
      }
13344
 
13345
      int lastComparison = 0;
13346
      forgotPassword_args typedOther = (forgotPassword_args)other;
13347
 
13348
      lastComparison = Boolean.valueOf(isSetEmail()).compareTo(isSetEmail());
13349
      if (lastComparison != 0) {
13350
        return lastComparison;
13351
      }
13352
      lastComparison = TBaseHelper.compareTo(email, typedOther.email);
13353
      if (lastComparison != 0) {
13354
        return lastComparison;
13355
      }
896 rajveer 13356
      lastComparison = Boolean.valueOf(isSetNewPassword()).compareTo(isSetNewPassword());
13357
      if (lastComparison != 0) {
13358
        return lastComparison;
13359
      }
13360
      lastComparison = TBaseHelper.compareTo(newPassword, typedOther.newPassword);
13361
      if (lastComparison != 0) {
13362
        return lastComparison;
13363
      }
582 rajveer 13364
      return 0;
13365
    }
13366
 
13367
    public void read(TProtocol iprot) throws TException {
13368
      TField field;
13369
      iprot.readStructBegin();
13370
      while (true)
13371
      {
13372
        field = iprot.readFieldBegin();
13373
        if (field.type == TType.STOP) { 
13374
          break;
13375
        }
13376
        _Fields fieldId = _Fields.findByThriftId(field.id);
13377
        if (fieldId == null) {
13378
          TProtocolUtil.skip(iprot, field.type);
13379
        } else {
13380
          switch (fieldId) {
13381
            case EMAIL:
13382
              if (field.type == TType.STRING) {
13383
                this.email = iprot.readString();
13384
              } else { 
13385
                TProtocolUtil.skip(iprot, field.type);
13386
              }
13387
              break;
896 rajveer 13388
            case NEW_PASSWORD:
13389
              if (field.type == TType.STRING) {
13390
                this.newPassword = iprot.readString();
13391
              } else { 
13392
                TProtocolUtil.skip(iprot, field.type);
13393
              }
13394
              break;
582 rajveer 13395
          }
13396
          iprot.readFieldEnd();
13397
        }
13398
      }
13399
      iprot.readStructEnd();
13400
      validate();
13401
    }
13402
 
13403
    public void write(TProtocol oprot) throws TException {
13404
      validate();
13405
 
13406
      oprot.writeStructBegin(STRUCT_DESC);
13407
      if (this.email != null) {
13408
        oprot.writeFieldBegin(EMAIL_FIELD_DESC);
13409
        oprot.writeString(this.email);
13410
        oprot.writeFieldEnd();
13411
      }
896 rajveer 13412
      if (this.newPassword != null) {
13413
        oprot.writeFieldBegin(NEW_PASSWORD_FIELD_DESC);
13414
        oprot.writeString(this.newPassword);
13415
        oprot.writeFieldEnd();
13416
      }
582 rajveer 13417
      oprot.writeFieldStop();
13418
      oprot.writeStructEnd();
13419
    }
13420
 
13421
    @Override
13422
    public String toString() {
13423
      StringBuilder sb = new StringBuilder("forgotPassword_args(");
13424
      boolean first = true;
13425
 
13426
      sb.append("email:");
13427
      if (this.email == null) {
13428
        sb.append("null");
13429
      } else {
13430
        sb.append(this.email);
13431
      }
13432
      first = false;
896 rajveer 13433
      if (!first) sb.append(", ");
13434
      sb.append("newPassword:");
13435
      if (this.newPassword == null) {
13436
        sb.append("null");
13437
      } else {
13438
        sb.append(this.newPassword);
13439
      }
13440
      first = false;
582 rajveer 13441
      sb.append(")");
13442
      return sb.toString();
13443
    }
13444
 
13445
    public void validate() throws TException {
13446
      // check for required fields
13447
    }
13448
 
13449
  }
13450
 
13451
  public static class forgotPassword_result implements TBase<forgotPassword_result._Fields>, java.io.Serializable, Cloneable, Comparable<forgotPassword_result>   {
13452
    private static final TStruct STRUCT_DESC = new TStruct("forgotPassword_result");
13453
 
13454
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13455
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
13456
 
13457
    private boolean success;
13458
    private UserContextException ucx;
13459
 
13460
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13461
    public enum _Fields implements TFieldIdEnum {
13462
      SUCCESS((short)0, "success"),
13463
      UCX((short)1, "ucx");
13464
 
13465
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13466
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13467
 
13468
      static {
13469
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13470
          byId.put((int)field._thriftId, field);
13471
          byName.put(field.getFieldName(), field);
13472
        }
13473
      }
13474
 
13475
      /**
13476
       * Find the _Fields constant that matches fieldId, or null if its not found.
13477
       */
13478
      public static _Fields findByThriftId(int fieldId) {
13479
        return byId.get(fieldId);
13480
      }
13481
 
13482
      /**
13483
       * Find the _Fields constant that matches fieldId, throwing an exception
13484
       * if it is not found.
13485
       */
13486
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13487
        _Fields fields = findByThriftId(fieldId);
13488
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13489
        return fields;
13490
      }
13491
 
13492
      /**
13493
       * Find the _Fields constant that matches name, or null if its not found.
13494
       */
13495
      public static _Fields findByName(String name) {
13496
        return byName.get(name);
13497
      }
13498
 
13499
      private final short _thriftId;
13500
      private final String _fieldName;
13501
 
13502
      _Fields(short thriftId, String fieldName) {
13503
        _thriftId = thriftId;
13504
        _fieldName = fieldName;
13505
      }
13506
 
13507
      public short getThriftFieldId() {
13508
        return _thriftId;
13509
      }
13510
 
13511
      public String getFieldName() {
13512
        return _fieldName;
13513
      }
13514
    }
13515
 
13516
    // isset id assignments
13517
    private static final int __SUCCESS_ISSET_ID = 0;
13518
    private BitSet __isset_bit_vector = new BitSet(1);
13519
 
13520
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13521
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13522
          new FieldValueMetaData(TType.BOOL)));
13523
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
13524
          new FieldValueMetaData(TType.STRUCT)));
13525
    }});
13526
 
13527
    static {
13528
      FieldMetaData.addStructMetaDataMap(forgotPassword_result.class, metaDataMap);
13529
    }
13530
 
13531
    public forgotPassword_result() {
13532
    }
13533
 
13534
    public forgotPassword_result(
13535
      boolean success,
13536
      UserContextException ucx)
13537
    {
13538
      this();
13539
      this.success = success;
13540
      setSuccessIsSet(true);
13541
      this.ucx = ucx;
13542
    }
13543
 
13544
    /**
13545
     * Performs a deep copy on <i>other</i>.
13546
     */
13547
    public forgotPassword_result(forgotPassword_result other) {
13548
      __isset_bit_vector.clear();
13549
      __isset_bit_vector.or(other.__isset_bit_vector);
13550
      this.success = other.success;
13551
      if (other.isSetUcx()) {
13552
        this.ucx = new UserContextException(other.ucx);
13553
      }
13554
    }
13555
 
13556
    public forgotPassword_result deepCopy() {
13557
      return new forgotPassword_result(this);
13558
    }
13559
 
13560
    @Deprecated
13561
    public forgotPassword_result clone() {
13562
      return new forgotPassword_result(this);
13563
    }
13564
 
13565
    public boolean isSuccess() {
13566
      return this.success;
13567
    }
13568
 
13569
    public forgotPassword_result setSuccess(boolean success) {
13570
      this.success = success;
13571
      setSuccessIsSet(true);
13572
      return this;
13573
    }
13574
 
13575
    public void unsetSuccess() {
13576
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13577
    }
13578
 
13579
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13580
    public boolean isSetSuccess() {
13581
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13582
    }
13583
 
13584
    public void setSuccessIsSet(boolean value) {
13585
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13586
    }
13587
 
13588
    public UserContextException getUcx() {
13589
      return this.ucx;
13590
    }
13591
 
13592
    public forgotPassword_result setUcx(UserContextException ucx) {
13593
      this.ucx = ucx;
13594
      return this;
13595
    }
13596
 
13597
    public void unsetUcx() {
13598
      this.ucx = null;
13599
    }
13600
 
13601
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
13602
    public boolean isSetUcx() {
13603
      return this.ucx != null;
13604
    }
13605
 
13606
    public void setUcxIsSet(boolean value) {
13607
      if (!value) {
13608
        this.ucx = null;
13609
      }
13610
    }
13611
 
13612
    public void setFieldValue(_Fields field, Object value) {
13613
      switch (field) {
13614
      case SUCCESS:
13615
        if (value == null) {
13616
          unsetSuccess();
13617
        } else {
13618
          setSuccess((Boolean)value);
13619
        }
13620
        break;
13621
 
13622
      case UCX:
13623
        if (value == null) {
13624
          unsetUcx();
13625
        } else {
13626
          setUcx((UserContextException)value);
13627
        }
13628
        break;
13629
 
13630
      }
13631
    }
13632
 
13633
    public void setFieldValue(int fieldID, Object value) {
13634
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13635
    }
13636
 
13637
    public Object getFieldValue(_Fields field) {
13638
      switch (field) {
13639
      case SUCCESS:
13640
        return new Boolean(isSuccess());
13641
 
13642
      case UCX:
13643
        return getUcx();
13644
 
13645
      }
13646
      throw new IllegalStateException();
13647
    }
13648
 
13649
    public Object getFieldValue(int fieldId) {
13650
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13651
    }
13652
 
13653
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13654
    public boolean isSet(_Fields field) {
13655
      switch (field) {
13656
      case SUCCESS:
13657
        return isSetSuccess();
13658
      case UCX:
13659
        return isSetUcx();
13660
      }
13661
      throw new IllegalStateException();
13662
    }
13663
 
13664
    public boolean isSet(int fieldID) {
13665
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13666
    }
13667
 
13668
    @Override
13669
    public boolean equals(Object that) {
13670
      if (that == null)
13671
        return false;
13672
      if (that instanceof forgotPassword_result)
13673
        return this.equals((forgotPassword_result)that);
13674
      return false;
13675
    }
13676
 
13677
    public boolean equals(forgotPassword_result that) {
13678
      if (that == null)
13679
        return false;
13680
 
13681
      boolean this_present_success = true;
13682
      boolean that_present_success = true;
13683
      if (this_present_success || that_present_success) {
13684
        if (!(this_present_success && that_present_success))
13685
          return false;
13686
        if (this.success != that.success)
13687
          return false;
13688
      }
13689
 
13690
      boolean this_present_ucx = true && this.isSetUcx();
13691
      boolean that_present_ucx = true && that.isSetUcx();
13692
      if (this_present_ucx || that_present_ucx) {
13693
        if (!(this_present_ucx && that_present_ucx))
13694
          return false;
13695
        if (!this.ucx.equals(that.ucx))
13696
          return false;
13697
      }
13698
 
13699
      return true;
13700
    }
13701
 
13702
    @Override
13703
    public int hashCode() {
13704
      return 0;
13705
    }
13706
 
13707
    public int compareTo(forgotPassword_result other) {
13708
      if (!getClass().equals(other.getClass())) {
13709
        return getClass().getName().compareTo(other.getClass().getName());
13710
      }
13711
 
13712
      int lastComparison = 0;
13713
      forgotPassword_result typedOther = (forgotPassword_result)other;
13714
 
13715
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13716
      if (lastComparison != 0) {
13717
        return lastComparison;
13718
      }
13719
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13720
      if (lastComparison != 0) {
13721
        return lastComparison;
13722
      }
13723
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
13724
      if (lastComparison != 0) {
13725
        return lastComparison;
13726
      }
13727
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
13728
      if (lastComparison != 0) {
13729
        return lastComparison;
13730
      }
13731
      return 0;
13732
    }
13733
 
13734
    public void read(TProtocol iprot) throws TException {
13735
      TField field;
13736
      iprot.readStructBegin();
13737
      while (true)
13738
      {
13739
        field = iprot.readFieldBegin();
13740
        if (field.type == TType.STOP) { 
13741
          break;
13742
        }
13743
        _Fields fieldId = _Fields.findByThriftId(field.id);
13744
        if (fieldId == null) {
13745
          TProtocolUtil.skip(iprot, field.type);
13746
        } else {
13747
          switch (fieldId) {
13748
            case SUCCESS:
13749
              if (field.type == TType.BOOL) {
13750
                this.success = iprot.readBool();
13751
                setSuccessIsSet(true);
13752
              } else { 
13753
                TProtocolUtil.skip(iprot, field.type);
13754
              }
13755
              break;
13756
            case UCX:
13757
              if (field.type == TType.STRUCT) {
13758
                this.ucx = new UserContextException();
13759
                this.ucx.read(iprot);
13760
              } else { 
13761
                TProtocolUtil.skip(iprot, field.type);
13762
              }
13763
              break;
13764
          }
13765
          iprot.readFieldEnd();
13766
        }
13767
      }
13768
      iprot.readStructEnd();
13769
      validate();
13770
    }
13771
 
13772
    public void write(TProtocol oprot) throws TException {
13773
      oprot.writeStructBegin(STRUCT_DESC);
13774
 
13775
      if (this.isSetSuccess()) {
13776
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13777
        oprot.writeBool(this.success);
13778
        oprot.writeFieldEnd();
13779
      } else if (this.isSetUcx()) {
13780
        oprot.writeFieldBegin(UCX_FIELD_DESC);
13781
        this.ucx.write(oprot);
13782
        oprot.writeFieldEnd();
13783
      }
13784
      oprot.writeFieldStop();
13785
      oprot.writeStructEnd();
13786
    }
13787
 
13788
    @Override
13789
    public String toString() {
13790
      StringBuilder sb = new StringBuilder("forgotPassword_result(");
13791
      boolean first = true;
13792
 
13793
      sb.append("success:");
13794
      sb.append(this.success);
13795
      first = false;
13796
      if (!first) sb.append(", ");
13797
      sb.append("ucx:");
13798
      if (this.ucx == null) {
13799
        sb.append("null");
13800
      } else {
13801
        sb.append(this.ucx);
13802
      }
13803
      first = false;
13804
      sb.append(")");
13805
      return sb.toString();
13806
    }
13807
 
13808
    public void validate() throws TException {
13809
      // check for required fields
13810
    }
13811
 
13812
  }
13813
 
593 rajveer 13814
  public static class getAllAddressesForUser_args implements TBase<getAllAddressesForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_args>   {
13815
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_args");
13816
 
13817
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
13818
 
13819
    private long userId;
13820
 
13821
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13822
    public enum _Fields implements TFieldIdEnum {
13823
      USER_ID((short)1, "userId");
13824
 
13825
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13826
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13827
 
13828
      static {
13829
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13830
          byId.put((int)field._thriftId, field);
13831
          byName.put(field.getFieldName(), field);
13832
        }
13833
      }
13834
 
13835
      /**
13836
       * Find the _Fields constant that matches fieldId, or null if its not found.
13837
       */
13838
      public static _Fields findByThriftId(int fieldId) {
13839
        return byId.get(fieldId);
13840
      }
13841
 
13842
      /**
13843
       * Find the _Fields constant that matches fieldId, throwing an exception
13844
       * if it is not found.
13845
       */
13846
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13847
        _Fields fields = findByThriftId(fieldId);
13848
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13849
        return fields;
13850
      }
13851
 
13852
      /**
13853
       * Find the _Fields constant that matches name, or null if its not found.
13854
       */
13855
      public static _Fields findByName(String name) {
13856
        return byName.get(name);
13857
      }
13858
 
13859
      private final short _thriftId;
13860
      private final String _fieldName;
13861
 
13862
      _Fields(short thriftId, String fieldName) {
13863
        _thriftId = thriftId;
13864
        _fieldName = fieldName;
13865
      }
13866
 
13867
      public short getThriftFieldId() {
13868
        return _thriftId;
13869
      }
13870
 
13871
      public String getFieldName() {
13872
        return _fieldName;
13873
      }
13874
    }
13875
 
13876
    // isset id assignments
13877
    private static final int __USERID_ISSET_ID = 0;
13878
    private BitSet __isset_bit_vector = new BitSet(1);
13879
 
13880
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13881
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
13882
          new FieldValueMetaData(TType.I64)));
13883
    }});
13884
 
13885
    static {
13886
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_args.class, metaDataMap);
13887
    }
13888
 
13889
    public getAllAddressesForUser_args() {
13890
    }
13891
 
13892
    public getAllAddressesForUser_args(
13893
      long userId)
13894
    {
13895
      this();
13896
      this.userId = userId;
13897
      setUserIdIsSet(true);
13898
    }
13899
 
13900
    /**
13901
     * Performs a deep copy on <i>other</i>.
13902
     */
13903
    public getAllAddressesForUser_args(getAllAddressesForUser_args other) {
13904
      __isset_bit_vector.clear();
13905
      __isset_bit_vector.or(other.__isset_bit_vector);
13906
      this.userId = other.userId;
13907
    }
13908
 
13909
    public getAllAddressesForUser_args deepCopy() {
13910
      return new getAllAddressesForUser_args(this);
13911
    }
13912
 
13913
    @Deprecated
13914
    public getAllAddressesForUser_args clone() {
13915
      return new getAllAddressesForUser_args(this);
13916
    }
13917
 
13918
    public long getUserId() {
13919
      return this.userId;
13920
    }
13921
 
13922
    public getAllAddressesForUser_args setUserId(long userId) {
13923
      this.userId = userId;
13924
      setUserIdIsSet(true);
13925
      return this;
13926
    }
13927
 
13928
    public void unsetUserId() {
13929
      __isset_bit_vector.clear(__USERID_ISSET_ID);
13930
    }
13931
 
13932
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
13933
    public boolean isSetUserId() {
13934
      return __isset_bit_vector.get(__USERID_ISSET_ID);
13935
    }
13936
 
13937
    public void setUserIdIsSet(boolean value) {
13938
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
13939
    }
13940
 
13941
    public void setFieldValue(_Fields field, Object value) {
13942
      switch (field) {
13943
      case USER_ID:
13944
        if (value == null) {
13945
          unsetUserId();
13946
        } else {
13947
          setUserId((Long)value);
13948
        }
13949
        break;
13950
 
13951
      }
13952
    }
13953
 
13954
    public void setFieldValue(int fieldID, Object value) {
13955
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13956
    }
13957
 
13958
    public Object getFieldValue(_Fields field) {
13959
      switch (field) {
13960
      case USER_ID:
13961
        return new Long(getUserId());
13962
 
13963
      }
13964
      throw new IllegalStateException();
13965
    }
13966
 
13967
    public Object getFieldValue(int fieldId) {
13968
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13969
    }
13970
 
13971
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13972
    public boolean isSet(_Fields field) {
13973
      switch (field) {
13974
      case USER_ID:
13975
        return isSetUserId();
13976
      }
13977
      throw new IllegalStateException();
13978
    }
13979
 
13980
    public boolean isSet(int fieldID) {
13981
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13982
    }
13983
 
13984
    @Override
13985
    public boolean equals(Object that) {
13986
      if (that == null)
13987
        return false;
13988
      if (that instanceof getAllAddressesForUser_args)
13989
        return this.equals((getAllAddressesForUser_args)that);
13990
      return false;
13991
    }
13992
 
13993
    public boolean equals(getAllAddressesForUser_args that) {
13994
      if (that == null)
13995
        return false;
13996
 
13997
      boolean this_present_userId = true;
13998
      boolean that_present_userId = true;
13999
      if (this_present_userId || that_present_userId) {
14000
        if (!(this_present_userId && that_present_userId))
14001
          return false;
14002
        if (this.userId != that.userId)
14003
          return false;
14004
      }
14005
 
14006
      return true;
14007
    }
14008
 
14009
    @Override
14010
    public int hashCode() {
14011
      return 0;
14012
    }
14013
 
14014
    public int compareTo(getAllAddressesForUser_args other) {
14015
      if (!getClass().equals(other.getClass())) {
14016
        return getClass().getName().compareTo(other.getClass().getName());
14017
      }
14018
 
14019
      int lastComparison = 0;
14020
      getAllAddressesForUser_args typedOther = (getAllAddressesForUser_args)other;
14021
 
14022
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14023
      if (lastComparison != 0) {
14024
        return lastComparison;
14025
      }
14026
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14027
      if (lastComparison != 0) {
14028
        return lastComparison;
14029
      }
14030
      return 0;
14031
    }
14032
 
14033
    public void read(TProtocol iprot) throws TException {
14034
      TField field;
14035
      iprot.readStructBegin();
14036
      while (true)
14037
      {
14038
        field = iprot.readFieldBegin();
14039
        if (field.type == TType.STOP) { 
14040
          break;
14041
        }
14042
        _Fields fieldId = _Fields.findByThriftId(field.id);
14043
        if (fieldId == null) {
14044
          TProtocolUtil.skip(iprot, field.type);
14045
        } else {
14046
          switch (fieldId) {
14047
            case USER_ID:
14048
              if (field.type == TType.I64) {
14049
                this.userId = iprot.readI64();
14050
                setUserIdIsSet(true);
14051
              } else { 
14052
                TProtocolUtil.skip(iprot, field.type);
14053
              }
14054
              break;
14055
          }
14056
          iprot.readFieldEnd();
14057
        }
14058
      }
14059
      iprot.readStructEnd();
14060
      validate();
14061
    }
14062
 
14063
    public void write(TProtocol oprot) throws TException {
14064
      validate();
14065
 
14066
      oprot.writeStructBegin(STRUCT_DESC);
14067
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14068
      oprot.writeI64(this.userId);
14069
      oprot.writeFieldEnd();
14070
      oprot.writeFieldStop();
14071
      oprot.writeStructEnd();
14072
    }
14073
 
14074
    @Override
14075
    public String toString() {
14076
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_args(");
14077
      boolean first = true;
14078
 
14079
      sb.append("userId:");
14080
      sb.append(this.userId);
14081
      first = false;
14082
      sb.append(")");
14083
      return sb.toString();
14084
    }
14085
 
14086
    public void validate() throws TException {
14087
      // check for required fields
14088
    }
14089
 
14090
  }
14091
 
14092
  public static class getAllAddressesForUser_result implements TBase<getAllAddressesForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllAddressesForUser_result>   {
14093
    private static final TStruct STRUCT_DESC = new TStruct("getAllAddressesForUser_result");
14094
 
14095
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
14096
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14097
 
14098
    private List<Address> success;
14099
    private UserContextException ucx;
14100
 
14101
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14102
    public enum _Fields implements TFieldIdEnum {
14103
      SUCCESS((short)0, "success"),
14104
      UCX((short)1, "ucx");
14105
 
14106
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14107
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14108
 
14109
      static {
14110
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14111
          byId.put((int)field._thriftId, field);
14112
          byName.put(field.getFieldName(), field);
14113
        }
14114
      }
14115
 
14116
      /**
14117
       * Find the _Fields constant that matches fieldId, or null if its not found.
14118
       */
14119
      public static _Fields findByThriftId(int fieldId) {
14120
        return byId.get(fieldId);
14121
      }
14122
 
14123
      /**
14124
       * Find the _Fields constant that matches fieldId, throwing an exception
14125
       * if it is not found.
14126
       */
14127
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14128
        _Fields fields = findByThriftId(fieldId);
14129
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14130
        return fields;
14131
      }
14132
 
14133
      /**
14134
       * Find the _Fields constant that matches name, or null if its not found.
14135
       */
14136
      public static _Fields findByName(String name) {
14137
        return byName.get(name);
14138
      }
14139
 
14140
      private final short _thriftId;
14141
      private final String _fieldName;
14142
 
14143
      _Fields(short thriftId, String fieldName) {
14144
        _thriftId = thriftId;
14145
        _fieldName = fieldName;
14146
      }
14147
 
14148
      public short getThriftFieldId() {
14149
        return _thriftId;
14150
      }
14151
 
14152
      public String getFieldName() {
14153
        return _fieldName;
14154
      }
14155
    }
14156
 
14157
    // isset id assignments
14158
 
14159
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14160
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14161
          new ListMetaData(TType.LIST, 
14162
              new StructMetaData(TType.STRUCT, Address.class))));
14163
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14164
          new FieldValueMetaData(TType.STRUCT)));
14165
    }});
14166
 
14167
    static {
14168
      FieldMetaData.addStructMetaDataMap(getAllAddressesForUser_result.class, metaDataMap);
14169
    }
14170
 
14171
    public getAllAddressesForUser_result() {
14172
    }
14173
 
14174
    public getAllAddressesForUser_result(
14175
      List<Address> success,
14176
      UserContextException ucx)
14177
    {
14178
      this();
14179
      this.success = success;
14180
      this.ucx = ucx;
14181
    }
14182
 
14183
    /**
14184
     * Performs a deep copy on <i>other</i>.
14185
     */
14186
    public getAllAddressesForUser_result(getAllAddressesForUser_result other) {
14187
      if (other.isSetSuccess()) {
14188
        List<Address> __this__success = new ArrayList<Address>();
14189
        for (Address other_element : other.success) {
14190
          __this__success.add(new Address(other_element));
14191
        }
14192
        this.success = __this__success;
14193
      }
14194
      if (other.isSetUcx()) {
14195
        this.ucx = new UserContextException(other.ucx);
14196
      }
14197
    }
14198
 
14199
    public getAllAddressesForUser_result deepCopy() {
14200
      return new getAllAddressesForUser_result(this);
14201
    }
14202
 
14203
    @Deprecated
14204
    public getAllAddressesForUser_result clone() {
14205
      return new getAllAddressesForUser_result(this);
14206
    }
14207
 
14208
    public int getSuccessSize() {
14209
      return (this.success == null) ? 0 : this.success.size();
14210
    }
14211
 
14212
    public java.util.Iterator<Address> getSuccessIterator() {
14213
      return (this.success == null) ? null : this.success.iterator();
14214
    }
14215
 
14216
    public void addToSuccess(Address elem) {
14217
      if (this.success == null) {
14218
        this.success = new ArrayList<Address>();
14219
      }
14220
      this.success.add(elem);
14221
    }
14222
 
14223
    public List<Address> getSuccess() {
14224
      return this.success;
14225
    }
14226
 
14227
    public getAllAddressesForUser_result setSuccess(List<Address> success) {
14228
      this.success = success;
14229
      return this;
14230
    }
14231
 
14232
    public void unsetSuccess() {
14233
      this.success = null;
14234
    }
14235
 
14236
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14237
    public boolean isSetSuccess() {
14238
      return this.success != null;
14239
    }
14240
 
14241
    public void setSuccessIsSet(boolean value) {
14242
      if (!value) {
14243
        this.success = null;
14244
      }
14245
    }
14246
 
14247
    public UserContextException getUcx() {
14248
      return this.ucx;
14249
    }
14250
 
14251
    public getAllAddressesForUser_result setUcx(UserContextException ucx) {
14252
      this.ucx = ucx;
14253
      return this;
14254
    }
14255
 
14256
    public void unsetUcx() {
14257
      this.ucx = null;
14258
    }
14259
 
14260
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14261
    public boolean isSetUcx() {
14262
      return this.ucx != null;
14263
    }
14264
 
14265
    public void setUcxIsSet(boolean value) {
14266
      if (!value) {
14267
        this.ucx = null;
14268
      }
14269
    }
14270
 
14271
    public void setFieldValue(_Fields field, Object value) {
14272
      switch (field) {
14273
      case SUCCESS:
14274
        if (value == null) {
14275
          unsetSuccess();
14276
        } else {
14277
          setSuccess((List<Address>)value);
14278
        }
14279
        break;
14280
 
14281
      case UCX:
14282
        if (value == null) {
14283
          unsetUcx();
14284
        } else {
14285
          setUcx((UserContextException)value);
14286
        }
14287
        break;
14288
 
14289
      }
14290
    }
14291
 
14292
    public void setFieldValue(int fieldID, Object value) {
14293
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14294
    }
14295
 
14296
    public Object getFieldValue(_Fields field) {
14297
      switch (field) {
14298
      case SUCCESS:
14299
        return getSuccess();
14300
 
14301
      case UCX:
14302
        return getUcx();
14303
 
14304
      }
14305
      throw new IllegalStateException();
14306
    }
14307
 
14308
    public Object getFieldValue(int fieldId) {
14309
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14310
    }
14311
 
14312
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14313
    public boolean isSet(_Fields field) {
14314
      switch (field) {
14315
      case SUCCESS:
14316
        return isSetSuccess();
14317
      case UCX:
14318
        return isSetUcx();
14319
      }
14320
      throw new IllegalStateException();
14321
    }
14322
 
14323
    public boolean isSet(int fieldID) {
14324
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14325
    }
14326
 
14327
    @Override
14328
    public boolean equals(Object that) {
14329
      if (that == null)
14330
        return false;
14331
      if (that instanceof getAllAddressesForUser_result)
14332
        return this.equals((getAllAddressesForUser_result)that);
14333
      return false;
14334
    }
14335
 
14336
    public boolean equals(getAllAddressesForUser_result that) {
14337
      if (that == null)
14338
        return false;
14339
 
14340
      boolean this_present_success = true && this.isSetSuccess();
14341
      boolean that_present_success = true && that.isSetSuccess();
14342
      if (this_present_success || that_present_success) {
14343
        if (!(this_present_success && that_present_success))
14344
          return false;
14345
        if (!this.success.equals(that.success))
14346
          return false;
14347
      }
14348
 
14349
      boolean this_present_ucx = true && this.isSetUcx();
14350
      boolean that_present_ucx = true && that.isSetUcx();
14351
      if (this_present_ucx || that_present_ucx) {
14352
        if (!(this_present_ucx && that_present_ucx))
14353
          return false;
14354
        if (!this.ucx.equals(that.ucx))
14355
          return false;
14356
      }
14357
 
14358
      return true;
14359
    }
14360
 
14361
    @Override
14362
    public int hashCode() {
14363
      return 0;
14364
    }
14365
 
14366
    public int compareTo(getAllAddressesForUser_result other) {
14367
      if (!getClass().equals(other.getClass())) {
14368
        return getClass().getName().compareTo(other.getClass().getName());
14369
      }
14370
 
14371
      int lastComparison = 0;
14372
      getAllAddressesForUser_result typedOther = (getAllAddressesForUser_result)other;
14373
 
14374
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14375
      if (lastComparison != 0) {
14376
        return lastComparison;
14377
      }
14378
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14379
      if (lastComparison != 0) {
14380
        return lastComparison;
14381
      }
14382
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
14383
      if (lastComparison != 0) {
14384
        return lastComparison;
14385
      }
14386
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
14387
      if (lastComparison != 0) {
14388
        return lastComparison;
14389
      }
14390
      return 0;
14391
    }
14392
 
14393
    public void read(TProtocol iprot) throws TException {
14394
      TField field;
14395
      iprot.readStructBegin();
14396
      while (true)
14397
      {
14398
        field = iprot.readFieldBegin();
14399
        if (field.type == TType.STOP) { 
14400
          break;
14401
        }
14402
        _Fields fieldId = _Fields.findByThriftId(field.id);
14403
        if (fieldId == null) {
14404
          TProtocolUtil.skip(iprot, field.type);
14405
        } else {
14406
          switch (fieldId) {
14407
            case SUCCESS:
14408
              if (field.type == TType.LIST) {
14409
                {
771 rajveer 14410
                  TList _list16 = iprot.readListBegin();
14411
                  this.success = new ArrayList<Address>(_list16.size);
14412
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
593 rajveer 14413
                  {
771 rajveer 14414
                    Address _elem18;
14415
                    _elem18 = new Address();
14416
                    _elem18.read(iprot);
14417
                    this.success.add(_elem18);
593 rajveer 14418
                  }
14419
                  iprot.readListEnd();
14420
                }
14421
              } else { 
14422
                TProtocolUtil.skip(iprot, field.type);
14423
              }
14424
              break;
14425
            case UCX:
14426
              if (field.type == TType.STRUCT) {
14427
                this.ucx = new UserContextException();
14428
                this.ucx.read(iprot);
14429
              } else { 
14430
                TProtocolUtil.skip(iprot, field.type);
14431
              }
14432
              break;
14433
          }
14434
          iprot.readFieldEnd();
14435
        }
14436
      }
14437
      iprot.readStructEnd();
14438
      validate();
14439
    }
14440
 
14441
    public void write(TProtocol oprot) throws TException {
14442
      oprot.writeStructBegin(STRUCT_DESC);
14443
 
14444
      if (this.isSetSuccess()) {
14445
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14446
        {
14447
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 14448
          for (Address _iter19 : this.success)
593 rajveer 14449
          {
771 rajveer 14450
            _iter19.write(oprot);
593 rajveer 14451
          }
14452
          oprot.writeListEnd();
14453
        }
14454
        oprot.writeFieldEnd();
14455
      } else if (this.isSetUcx()) {
14456
        oprot.writeFieldBegin(UCX_FIELD_DESC);
14457
        this.ucx.write(oprot);
14458
        oprot.writeFieldEnd();
14459
      }
14460
      oprot.writeFieldStop();
14461
      oprot.writeStructEnd();
14462
    }
14463
 
14464
    @Override
14465
    public String toString() {
14466
      StringBuilder sb = new StringBuilder("getAllAddressesForUser_result(");
14467
      boolean first = true;
14468
 
14469
      sb.append("success:");
14470
      if (this.success == null) {
14471
        sb.append("null");
14472
      } else {
14473
        sb.append(this.success);
14474
      }
14475
      first = false;
14476
      if (!first) sb.append(", ");
14477
      sb.append("ucx:");
14478
      if (this.ucx == null) {
14479
        sb.append("null");
14480
      } else {
14481
        sb.append(this.ucx);
14482
      }
14483
      first = false;
14484
      sb.append(")");
14485
      return sb.toString();
14486
    }
14487
 
14488
    public void validate() throws TException {
14489
      // check for required fields
14490
    }
14491
 
14492
  }
14493
 
14494
  public static class getDefaultAddressId_args implements TBase<getDefaultAddressId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_args>   {
14495
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_args");
14496
 
14497
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
14498
 
14499
    private long userId;
14500
 
14501
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14502
    public enum _Fields implements TFieldIdEnum {
14503
      USER_ID((short)1, "userId");
14504
 
14505
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14506
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14507
 
14508
      static {
14509
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14510
          byId.put((int)field._thriftId, field);
14511
          byName.put(field.getFieldName(), field);
14512
        }
14513
      }
14514
 
14515
      /**
14516
       * Find the _Fields constant that matches fieldId, or null if its not found.
14517
       */
14518
      public static _Fields findByThriftId(int fieldId) {
14519
        return byId.get(fieldId);
14520
      }
14521
 
14522
      /**
14523
       * Find the _Fields constant that matches fieldId, throwing an exception
14524
       * if it is not found.
14525
       */
14526
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14527
        _Fields fields = findByThriftId(fieldId);
14528
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14529
        return fields;
14530
      }
14531
 
14532
      /**
14533
       * Find the _Fields constant that matches name, or null if its not found.
14534
       */
14535
      public static _Fields findByName(String name) {
14536
        return byName.get(name);
14537
      }
14538
 
14539
      private final short _thriftId;
14540
      private final String _fieldName;
14541
 
14542
      _Fields(short thriftId, String fieldName) {
14543
        _thriftId = thriftId;
14544
        _fieldName = fieldName;
14545
      }
14546
 
14547
      public short getThriftFieldId() {
14548
        return _thriftId;
14549
      }
14550
 
14551
      public String getFieldName() {
14552
        return _fieldName;
14553
      }
14554
    }
14555
 
14556
    // isset id assignments
14557
    private static final int __USERID_ISSET_ID = 0;
14558
    private BitSet __isset_bit_vector = new BitSet(1);
14559
 
14560
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14561
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
14562
          new FieldValueMetaData(TType.I64)));
14563
    }});
14564
 
14565
    static {
14566
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_args.class, metaDataMap);
14567
    }
14568
 
14569
    public getDefaultAddressId_args() {
14570
    }
14571
 
14572
    public getDefaultAddressId_args(
14573
      long userId)
14574
    {
14575
      this();
14576
      this.userId = userId;
14577
      setUserIdIsSet(true);
14578
    }
14579
 
14580
    /**
14581
     * Performs a deep copy on <i>other</i>.
14582
     */
14583
    public getDefaultAddressId_args(getDefaultAddressId_args other) {
14584
      __isset_bit_vector.clear();
14585
      __isset_bit_vector.or(other.__isset_bit_vector);
14586
      this.userId = other.userId;
14587
    }
14588
 
14589
    public getDefaultAddressId_args deepCopy() {
14590
      return new getDefaultAddressId_args(this);
14591
    }
14592
 
14593
    @Deprecated
14594
    public getDefaultAddressId_args clone() {
14595
      return new getDefaultAddressId_args(this);
14596
    }
14597
 
14598
    public long getUserId() {
14599
      return this.userId;
14600
    }
14601
 
14602
    public getDefaultAddressId_args setUserId(long userId) {
14603
      this.userId = userId;
14604
      setUserIdIsSet(true);
14605
      return this;
14606
    }
14607
 
14608
    public void unsetUserId() {
14609
      __isset_bit_vector.clear(__USERID_ISSET_ID);
14610
    }
14611
 
14612
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
14613
    public boolean isSetUserId() {
14614
      return __isset_bit_vector.get(__USERID_ISSET_ID);
14615
    }
14616
 
14617
    public void setUserIdIsSet(boolean value) {
14618
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
14619
    }
14620
 
14621
    public void setFieldValue(_Fields field, Object value) {
14622
      switch (field) {
14623
      case USER_ID:
14624
        if (value == null) {
14625
          unsetUserId();
14626
        } else {
14627
          setUserId((Long)value);
14628
        }
14629
        break;
14630
 
14631
      }
14632
    }
14633
 
14634
    public void setFieldValue(int fieldID, Object value) {
14635
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14636
    }
14637
 
14638
    public Object getFieldValue(_Fields field) {
14639
      switch (field) {
14640
      case USER_ID:
14641
        return new Long(getUserId());
14642
 
14643
      }
14644
      throw new IllegalStateException();
14645
    }
14646
 
14647
    public Object getFieldValue(int fieldId) {
14648
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14649
    }
14650
 
14651
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14652
    public boolean isSet(_Fields field) {
14653
      switch (field) {
14654
      case USER_ID:
14655
        return isSetUserId();
14656
      }
14657
      throw new IllegalStateException();
14658
    }
14659
 
14660
    public boolean isSet(int fieldID) {
14661
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14662
    }
14663
 
14664
    @Override
14665
    public boolean equals(Object that) {
14666
      if (that == null)
14667
        return false;
14668
      if (that instanceof getDefaultAddressId_args)
14669
        return this.equals((getDefaultAddressId_args)that);
14670
      return false;
14671
    }
14672
 
14673
    public boolean equals(getDefaultAddressId_args that) {
14674
      if (that == null)
14675
        return false;
14676
 
14677
      boolean this_present_userId = true;
14678
      boolean that_present_userId = true;
14679
      if (this_present_userId || that_present_userId) {
14680
        if (!(this_present_userId && that_present_userId))
14681
          return false;
14682
        if (this.userId != that.userId)
14683
          return false;
14684
      }
14685
 
14686
      return true;
14687
    }
14688
 
14689
    @Override
14690
    public int hashCode() {
14691
      return 0;
14692
    }
14693
 
14694
    public int compareTo(getDefaultAddressId_args other) {
14695
      if (!getClass().equals(other.getClass())) {
14696
        return getClass().getName().compareTo(other.getClass().getName());
14697
      }
14698
 
14699
      int lastComparison = 0;
14700
      getDefaultAddressId_args typedOther = (getDefaultAddressId_args)other;
14701
 
14702
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
14703
      if (lastComparison != 0) {
14704
        return lastComparison;
14705
      }
14706
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
14707
      if (lastComparison != 0) {
14708
        return lastComparison;
14709
      }
14710
      return 0;
14711
    }
14712
 
14713
    public void read(TProtocol iprot) throws TException {
14714
      TField field;
14715
      iprot.readStructBegin();
14716
      while (true)
14717
      {
14718
        field = iprot.readFieldBegin();
14719
        if (field.type == TType.STOP) { 
14720
          break;
14721
        }
14722
        _Fields fieldId = _Fields.findByThriftId(field.id);
14723
        if (fieldId == null) {
14724
          TProtocolUtil.skip(iprot, field.type);
14725
        } else {
14726
          switch (fieldId) {
14727
            case USER_ID:
14728
              if (field.type == TType.I64) {
14729
                this.userId = iprot.readI64();
14730
                setUserIdIsSet(true);
14731
              } else { 
14732
                TProtocolUtil.skip(iprot, field.type);
14733
              }
14734
              break;
14735
          }
14736
          iprot.readFieldEnd();
14737
        }
14738
      }
14739
      iprot.readStructEnd();
14740
      validate();
14741
    }
14742
 
14743
    public void write(TProtocol oprot) throws TException {
14744
      validate();
14745
 
14746
      oprot.writeStructBegin(STRUCT_DESC);
14747
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
14748
      oprot.writeI64(this.userId);
14749
      oprot.writeFieldEnd();
14750
      oprot.writeFieldStop();
14751
      oprot.writeStructEnd();
14752
    }
14753
 
14754
    @Override
14755
    public String toString() {
14756
      StringBuilder sb = new StringBuilder("getDefaultAddressId_args(");
14757
      boolean first = true;
14758
 
14759
      sb.append("userId:");
14760
      sb.append(this.userId);
14761
      first = false;
14762
      sb.append(")");
14763
      return sb.toString();
14764
    }
14765
 
14766
    public void validate() throws TException {
14767
      // check for required fields
14768
    }
14769
 
14770
  }
14771
 
14772
  public static class getDefaultAddressId_result implements TBase<getDefaultAddressId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultAddressId_result>   {
14773
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultAddressId_result");
14774
 
14775
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
14776
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
14777
 
14778
    private long success;
14779
    private UserContextException ucx;
14780
 
14781
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14782
    public enum _Fields implements TFieldIdEnum {
14783
      SUCCESS((short)0, "success"),
14784
      UCX((short)1, "ucx");
14785
 
14786
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14787
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14788
 
14789
      static {
14790
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14791
          byId.put((int)field._thriftId, field);
14792
          byName.put(field.getFieldName(), field);
14793
        }
14794
      }
14795
 
14796
      /**
14797
       * Find the _Fields constant that matches fieldId, or null if its not found.
14798
       */
14799
      public static _Fields findByThriftId(int fieldId) {
14800
        return byId.get(fieldId);
14801
      }
14802
 
14803
      /**
14804
       * Find the _Fields constant that matches fieldId, throwing an exception
14805
       * if it is not found.
14806
       */
14807
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14808
        _Fields fields = findByThriftId(fieldId);
14809
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14810
        return fields;
14811
      }
14812
 
14813
      /**
14814
       * Find the _Fields constant that matches name, or null if its not found.
14815
       */
14816
      public static _Fields findByName(String name) {
14817
        return byName.get(name);
14818
      }
14819
 
14820
      private final short _thriftId;
14821
      private final String _fieldName;
14822
 
14823
      _Fields(short thriftId, String fieldName) {
14824
        _thriftId = thriftId;
14825
        _fieldName = fieldName;
14826
      }
14827
 
14828
      public short getThriftFieldId() {
14829
        return _thriftId;
14830
      }
14831
 
14832
      public String getFieldName() {
14833
        return _fieldName;
14834
      }
14835
    }
14836
 
14837
    // isset id assignments
14838
    private static final int __SUCCESS_ISSET_ID = 0;
14839
    private BitSet __isset_bit_vector = new BitSet(1);
14840
 
14841
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14842
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14843
          new FieldValueMetaData(TType.I64)));
14844
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
14845
          new FieldValueMetaData(TType.STRUCT)));
14846
    }});
14847
 
14848
    static {
14849
      FieldMetaData.addStructMetaDataMap(getDefaultAddressId_result.class, metaDataMap);
14850
    }
14851
 
14852
    public getDefaultAddressId_result() {
14853
    }
14854
 
14855
    public getDefaultAddressId_result(
14856
      long success,
14857
      UserContextException ucx)
14858
    {
14859
      this();
14860
      this.success = success;
14861
      setSuccessIsSet(true);
14862
      this.ucx = ucx;
14863
    }
14864
 
14865
    /**
14866
     * Performs a deep copy on <i>other</i>.
14867
     */
14868
    public getDefaultAddressId_result(getDefaultAddressId_result other) {
14869
      __isset_bit_vector.clear();
14870
      __isset_bit_vector.or(other.__isset_bit_vector);
14871
      this.success = other.success;
14872
      if (other.isSetUcx()) {
14873
        this.ucx = new UserContextException(other.ucx);
14874
      }
14875
    }
14876
 
14877
    public getDefaultAddressId_result deepCopy() {
14878
      return new getDefaultAddressId_result(this);
14879
    }
14880
 
14881
    @Deprecated
14882
    public getDefaultAddressId_result clone() {
14883
      return new getDefaultAddressId_result(this);
14884
    }
14885
 
14886
    public long getSuccess() {
14887
      return this.success;
14888
    }
14889
 
14890
    public getDefaultAddressId_result setSuccess(long success) {
14891
      this.success = success;
14892
      setSuccessIsSet(true);
14893
      return this;
14894
    }
14895
 
14896
    public void unsetSuccess() {
14897
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14898
    }
14899
 
14900
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14901
    public boolean isSetSuccess() {
14902
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14903
    }
14904
 
14905
    public void setSuccessIsSet(boolean value) {
14906
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14907
    }
14908
 
14909
    public UserContextException getUcx() {
14910
      return this.ucx;
14911
    }
14912
 
14913
    public getDefaultAddressId_result setUcx(UserContextException ucx) {
14914
      this.ucx = ucx;
14915
      return this;
14916
    }
14917
 
14918
    public void unsetUcx() {
14919
      this.ucx = null;
14920
    }
14921
 
14922
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
14923
    public boolean isSetUcx() {
14924
      return this.ucx != null;
14925
    }
14926
 
14927
    public void setUcxIsSet(boolean value) {
14928
      if (!value) {
14929
        this.ucx = null;
14930
      }
14931
    }
14932
 
14933
    public void setFieldValue(_Fields field, Object value) {
14934
      switch (field) {
14935
      case SUCCESS:
14936
        if (value == null) {
14937
          unsetSuccess();
14938
        } else {
14939
          setSuccess((Long)value);
14940
        }
14941
        break;
14942
 
14943
      case UCX:
14944
        if (value == null) {
14945
          unsetUcx();
14946
        } else {
14947
          setUcx((UserContextException)value);
14948
        }
14949
        break;
14950
 
14951
      }
14952
    }
14953
 
14954
    public void setFieldValue(int fieldID, Object value) {
14955
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14956
    }
14957
 
14958
    public Object getFieldValue(_Fields field) {
14959
      switch (field) {
14960
      case SUCCESS:
14961
        return new Long(getSuccess());
14962
 
14963
      case UCX:
14964
        return getUcx();
14965
 
14966
      }
14967
      throw new IllegalStateException();
14968
    }
14969
 
14970
    public Object getFieldValue(int fieldId) {
14971
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14972
    }
14973
 
14974
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14975
    public boolean isSet(_Fields field) {
14976
      switch (field) {
14977
      case SUCCESS:
14978
        return isSetSuccess();
14979
      case UCX:
14980
        return isSetUcx();
14981
      }
14982
      throw new IllegalStateException();
14983
    }
14984
 
14985
    public boolean isSet(int fieldID) {
14986
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14987
    }
14988
 
14989
    @Override
14990
    public boolean equals(Object that) {
14991
      if (that == null)
14992
        return false;
14993
      if (that instanceof getDefaultAddressId_result)
14994
        return this.equals((getDefaultAddressId_result)that);
14995
      return false;
14996
    }
14997
 
14998
    public boolean equals(getDefaultAddressId_result that) {
14999
      if (that == null)
15000
        return false;
15001
 
15002
      boolean this_present_success = true;
15003
      boolean that_present_success = true;
15004
      if (this_present_success || that_present_success) {
15005
        if (!(this_present_success && that_present_success))
15006
          return false;
15007
        if (this.success != that.success)
15008
          return false;
15009
      }
15010
 
15011
      boolean this_present_ucx = true && this.isSetUcx();
15012
      boolean that_present_ucx = true && that.isSetUcx();
15013
      if (this_present_ucx || that_present_ucx) {
15014
        if (!(this_present_ucx && that_present_ucx))
15015
          return false;
15016
        if (!this.ucx.equals(that.ucx))
15017
          return false;
15018
      }
15019
 
15020
      return true;
15021
    }
15022
 
15023
    @Override
15024
    public int hashCode() {
15025
      return 0;
15026
    }
15027
 
15028
    public int compareTo(getDefaultAddressId_result other) {
15029
      if (!getClass().equals(other.getClass())) {
15030
        return getClass().getName().compareTo(other.getClass().getName());
15031
      }
15032
 
15033
      int lastComparison = 0;
15034
      getDefaultAddressId_result typedOther = (getDefaultAddressId_result)other;
15035
 
15036
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15037
      if (lastComparison != 0) {
15038
        return lastComparison;
15039
      }
15040
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15041
      if (lastComparison != 0) {
15042
        return lastComparison;
15043
      }
15044
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15045
      if (lastComparison != 0) {
15046
        return lastComparison;
15047
      }
15048
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15049
      if (lastComparison != 0) {
15050
        return lastComparison;
15051
      }
15052
      return 0;
15053
    }
15054
 
15055
    public void read(TProtocol iprot) throws TException {
15056
      TField field;
15057
      iprot.readStructBegin();
15058
      while (true)
15059
      {
15060
        field = iprot.readFieldBegin();
15061
        if (field.type == TType.STOP) { 
15062
          break;
15063
        }
15064
        _Fields fieldId = _Fields.findByThriftId(field.id);
15065
        if (fieldId == null) {
15066
          TProtocolUtil.skip(iprot, field.type);
15067
        } else {
15068
          switch (fieldId) {
15069
            case SUCCESS:
15070
              if (field.type == TType.I64) {
15071
                this.success = iprot.readI64();
15072
                setSuccessIsSet(true);
15073
              } else { 
15074
                TProtocolUtil.skip(iprot, field.type);
15075
              }
15076
              break;
15077
            case UCX:
15078
              if (field.type == TType.STRUCT) {
15079
                this.ucx = new UserContextException();
15080
                this.ucx.read(iprot);
15081
              } else { 
15082
                TProtocolUtil.skip(iprot, field.type);
15083
              }
15084
              break;
15085
          }
15086
          iprot.readFieldEnd();
15087
        }
15088
      }
15089
      iprot.readStructEnd();
15090
      validate();
15091
    }
15092
 
15093
    public void write(TProtocol oprot) throws TException {
15094
      oprot.writeStructBegin(STRUCT_DESC);
15095
 
15096
      if (this.isSetSuccess()) {
15097
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15098
        oprot.writeI64(this.success);
15099
        oprot.writeFieldEnd();
15100
      } else if (this.isSetUcx()) {
15101
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15102
        this.ucx.write(oprot);
15103
        oprot.writeFieldEnd();
15104
      }
15105
      oprot.writeFieldStop();
15106
      oprot.writeStructEnd();
15107
    }
15108
 
15109
    @Override
15110
    public String toString() {
15111
      StringBuilder sb = new StringBuilder("getDefaultAddressId_result(");
15112
      boolean first = true;
15113
 
15114
      sb.append("success:");
15115
      sb.append(this.success);
15116
      first = false;
15117
      if (!first) sb.append(", ");
15118
      sb.append("ucx:");
15119
      if (this.ucx == null) {
15120
        sb.append("null");
15121
      } else {
15122
        sb.append(this.ucx);
15123
      }
15124
      first = false;
15125
      sb.append(")");
15126
      return sb.toString();
15127
    }
15128
 
15129
    public void validate() throws TException {
15130
      // check for required fields
15131
    }
15132
 
15133
  }
15134
 
784 rajveer 15135
  public static class getDefaultPincode_args implements TBase<getDefaultPincode_args._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_args>   {
15136
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_args");
15137
 
15138
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15139
 
15140
    private long userId;
15141
 
15142
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15143
    public enum _Fields implements TFieldIdEnum {
15144
      USER_ID((short)1, "userId");
15145
 
15146
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15147
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15148
 
15149
      static {
15150
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15151
          byId.put((int)field._thriftId, field);
15152
          byName.put(field.getFieldName(), field);
15153
        }
15154
      }
15155
 
15156
      /**
15157
       * Find the _Fields constant that matches fieldId, or null if its not found.
15158
       */
15159
      public static _Fields findByThriftId(int fieldId) {
15160
        return byId.get(fieldId);
15161
      }
15162
 
15163
      /**
15164
       * Find the _Fields constant that matches fieldId, throwing an exception
15165
       * if it is not found.
15166
       */
15167
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15168
        _Fields fields = findByThriftId(fieldId);
15169
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15170
        return fields;
15171
      }
15172
 
15173
      /**
15174
       * Find the _Fields constant that matches name, or null if its not found.
15175
       */
15176
      public static _Fields findByName(String name) {
15177
        return byName.get(name);
15178
      }
15179
 
15180
      private final short _thriftId;
15181
      private final String _fieldName;
15182
 
15183
      _Fields(short thriftId, String fieldName) {
15184
        _thriftId = thriftId;
15185
        _fieldName = fieldName;
15186
      }
15187
 
15188
      public short getThriftFieldId() {
15189
        return _thriftId;
15190
      }
15191
 
15192
      public String getFieldName() {
15193
        return _fieldName;
15194
      }
15195
    }
15196
 
15197
    // isset id assignments
15198
    private static final int __USERID_ISSET_ID = 0;
15199
    private BitSet __isset_bit_vector = new BitSet(1);
15200
 
15201
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15202
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15203
          new FieldValueMetaData(TType.I64)));
15204
    }});
15205
 
15206
    static {
15207
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_args.class, metaDataMap);
15208
    }
15209
 
15210
    public getDefaultPincode_args() {
15211
    }
15212
 
15213
    public getDefaultPincode_args(
15214
      long userId)
15215
    {
15216
      this();
15217
      this.userId = userId;
15218
      setUserIdIsSet(true);
15219
    }
15220
 
15221
    /**
15222
     * Performs a deep copy on <i>other</i>.
15223
     */
15224
    public getDefaultPincode_args(getDefaultPincode_args other) {
15225
      __isset_bit_vector.clear();
15226
      __isset_bit_vector.or(other.__isset_bit_vector);
15227
      this.userId = other.userId;
15228
    }
15229
 
15230
    public getDefaultPincode_args deepCopy() {
15231
      return new getDefaultPincode_args(this);
15232
    }
15233
 
15234
    @Deprecated
15235
    public getDefaultPincode_args clone() {
15236
      return new getDefaultPincode_args(this);
15237
    }
15238
 
15239
    public long getUserId() {
15240
      return this.userId;
15241
    }
15242
 
15243
    public getDefaultPincode_args setUserId(long userId) {
15244
      this.userId = userId;
15245
      setUserIdIsSet(true);
15246
      return this;
15247
    }
15248
 
15249
    public void unsetUserId() {
15250
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15251
    }
15252
 
15253
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15254
    public boolean isSetUserId() {
15255
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15256
    }
15257
 
15258
    public void setUserIdIsSet(boolean value) {
15259
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15260
    }
15261
 
15262
    public void setFieldValue(_Fields field, Object value) {
15263
      switch (field) {
15264
      case USER_ID:
15265
        if (value == null) {
15266
          unsetUserId();
15267
        } else {
15268
          setUserId((Long)value);
15269
        }
15270
        break;
15271
 
15272
      }
15273
    }
15274
 
15275
    public void setFieldValue(int fieldID, Object value) {
15276
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15277
    }
15278
 
15279
    public Object getFieldValue(_Fields field) {
15280
      switch (field) {
15281
      case USER_ID:
15282
        return new Long(getUserId());
15283
 
15284
      }
15285
      throw new IllegalStateException();
15286
    }
15287
 
15288
    public Object getFieldValue(int fieldId) {
15289
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15290
    }
15291
 
15292
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15293
    public boolean isSet(_Fields field) {
15294
      switch (field) {
15295
      case USER_ID:
15296
        return isSetUserId();
15297
      }
15298
      throw new IllegalStateException();
15299
    }
15300
 
15301
    public boolean isSet(int fieldID) {
15302
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15303
    }
15304
 
15305
    @Override
15306
    public boolean equals(Object that) {
15307
      if (that == null)
15308
        return false;
15309
      if (that instanceof getDefaultPincode_args)
15310
        return this.equals((getDefaultPincode_args)that);
15311
      return false;
15312
    }
15313
 
15314
    public boolean equals(getDefaultPincode_args that) {
15315
      if (that == null)
15316
        return false;
15317
 
15318
      boolean this_present_userId = true;
15319
      boolean that_present_userId = true;
15320
      if (this_present_userId || that_present_userId) {
15321
        if (!(this_present_userId && that_present_userId))
15322
          return false;
15323
        if (this.userId != that.userId)
15324
          return false;
15325
      }
15326
 
15327
      return true;
15328
    }
15329
 
15330
    @Override
15331
    public int hashCode() {
15332
      return 0;
15333
    }
15334
 
15335
    public int compareTo(getDefaultPincode_args other) {
15336
      if (!getClass().equals(other.getClass())) {
15337
        return getClass().getName().compareTo(other.getClass().getName());
15338
      }
15339
 
15340
      int lastComparison = 0;
15341
      getDefaultPincode_args typedOther = (getDefaultPincode_args)other;
15342
 
15343
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
15344
      if (lastComparison != 0) {
15345
        return lastComparison;
15346
      }
15347
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
15348
      if (lastComparison != 0) {
15349
        return lastComparison;
15350
      }
15351
      return 0;
15352
    }
15353
 
15354
    public void read(TProtocol iprot) throws TException {
15355
      TField field;
15356
      iprot.readStructBegin();
15357
      while (true)
15358
      {
15359
        field = iprot.readFieldBegin();
15360
        if (field.type == TType.STOP) { 
15361
          break;
15362
        }
15363
        _Fields fieldId = _Fields.findByThriftId(field.id);
15364
        if (fieldId == null) {
15365
          TProtocolUtil.skip(iprot, field.type);
15366
        } else {
15367
          switch (fieldId) {
15368
            case USER_ID:
15369
              if (field.type == TType.I64) {
15370
                this.userId = iprot.readI64();
15371
                setUserIdIsSet(true);
15372
              } else { 
15373
                TProtocolUtil.skip(iprot, field.type);
15374
              }
15375
              break;
15376
          }
15377
          iprot.readFieldEnd();
15378
        }
15379
      }
15380
      iprot.readStructEnd();
15381
      validate();
15382
    }
15383
 
15384
    public void write(TProtocol oprot) throws TException {
15385
      validate();
15386
 
15387
      oprot.writeStructBegin(STRUCT_DESC);
15388
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
15389
      oprot.writeI64(this.userId);
15390
      oprot.writeFieldEnd();
15391
      oprot.writeFieldStop();
15392
      oprot.writeStructEnd();
15393
    }
15394
 
15395
    @Override
15396
    public String toString() {
15397
      StringBuilder sb = new StringBuilder("getDefaultPincode_args(");
15398
      boolean first = true;
15399
 
15400
      sb.append("userId:");
15401
      sb.append(this.userId);
15402
      first = false;
15403
      sb.append(")");
15404
      return sb.toString();
15405
    }
15406
 
15407
    public void validate() throws TException {
15408
      // check for required fields
15409
    }
15410
 
15411
  }
15412
 
15413
  public static class getDefaultPincode_result implements TBase<getDefaultPincode_result._Fields>, java.io.Serializable, Cloneable, Comparable<getDefaultPincode_result>   {
15414
    private static final TStruct STRUCT_DESC = new TStruct("getDefaultPincode_result");
15415
 
15416
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
15417
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
15418
 
15419
    private String success;
15420
    private UserContextException ucx;
15421
 
15422
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15423
    public enum _Fields implements TFieldIdEnum {
15424
      SUCCESS((short)0, "success"),
15425
      UCX((short)1, "ucx");
15426
 
15427
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15428
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15429
 
15430
      static {
15431
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15432
          byId.put((int)field._thriftId, field);
15433
          byName.put(field.getFieldName(), field);
15434
        }
15435
      }
15436
 
15437
      /**
15438
       * Find the _Fields constant that matches fieldId, or null if its not found.
15439
       */
15440
      public static _Fields findByThriftId(int fieldId) {
15441
        return byId.get(fieldId);
15442
      }
15443
 
15444
      /**
15445
       * Find the _Fields constant that matches fieldId, throwing an exception
15446
       * if it is not found.
15447
       */
15448
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15449
        _Fields fields = findByThriftId(fieldId);
15450
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15451
        return fields;
15452
      }
15453
 
15454
      /**
15455
       * Find the _Fields constant that matches name, or null if its not found.
15456
       */
15457
      public static _Fields findByName(String name) {
15458
        return byName.get(name);
15459
      }
15460
 
15461
      private final short _thriftId;
15462
      private final String _fieldName;
15463
 
15464
      _Fields(short thriftId, String fieldName) {
15465
        _thriftId = thriftId;
15466
        _fieldName = fieldName;
15467
      }
15468
 
15469
      public short getThriftFieldId() {
15470
        return _thriftId;
15471
      }
15472
 
15473
      public String getFieldName() {
15474
        return _fieldName;
15475
      }
15476
    }
15477
 
15478
    // isset id assignments
15479
 
15480
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15481
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15482
          new FieldValueMetaData(TType.STRING)));
15483
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
15484
          new FieldValueMetaData(TType.STRUCT)));
15485
    }});
15486
 
15487
    static {
15488
      FieldMetaData.addStructMetaDataMap(getDefaultPincode_result.class, metaDataMap);
15489
    }
15490
 
15491
    public getDefaultPincode_result() {
15492
    }
15493
 
15494
    public getDefaultPincode_result(
15495
      String success,
15496
      UserContextException ucx)
15497
    {
15498
      this();
15499
      this.success = success;
15500
      this.ucx = ucx;
15501
    }
15502
 
15503
    /**
15504
     * Performs a deep copy on <i>other</i>.
15505
     */
15506
    public getDefaultPincode_result(getDefaultPincode_result other) {
15507
      if (other.isSetSuccess()) {
15508
        this.success = other.success;
15509
      }
15510
      if (other.isSetUcx()) {
15511
        this.ucx = new UserContextException(other.ucx);
15512
      }
15513
    }
15514
 
15515
    public getDefaultPincode_result deepCopy() {
15516
      return new getDefaultPincode_result(this);
15517
    }
15518
 
15519
    @Deprecated
15520
    public getDefaultPincode_result clone() {
15521
      return new getDefaultPincode_result(this);
15522
    }
15523
 
15524
    public String getSuccess() {
15525
      return this.success;
15526
    }
15527
 
15528
    public getDefaultPincode_result setSuccess(String success) {
15529
      this.success = success;
15530
      return this;
15531
    }
15532
 
15533
    public void unsetSuccess() {
15534
      this.success = null;
15535
    }
15536
 
15537
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15538
    public boolean isSetSuccess() {
15539
      return this.success != null;
15540
    }
15541
 
15542
    public void setSuccessIsSet(boolean value) {
15543
      if (!value) {
15544
        this.success = null;
15545
      }
15546
    }
15547
 
15548
    public UserContextException getUcx() {
15549
      return this.ucx;
15550
    }
15551
 
15552
    public getDefaultPincode_result setUcx(UserContextException ucx) {
15553
      this.ucx = ucx;
15554
      return this;
15555
    }
15556
 
15557
    public void unsetUcx() {
15558
      this.ucx = null;
15559
    }
15560
 
15561
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
15562
    public boolean isSetUcx() {
15563
      return this.ucx != null;
15564
    }
15565
 
15566
    public void setUcxIsSet(boolean value) {
15567
      if (!value) {
15568
        this.ucx = null;
15569
      }
15570
    }
15571
 
15572
    public void setFieldValue(_Fields field, Object value) {
15573
      switch (field) {
15574
      case SUCCESS:
15575
        if (value == null) {
15576
          unsetSuccess();
15577
        } else {
15578
          setSuccess((String)value);
15579
        }
15580
        break;
15581
 
15582
      case UCX:
15583
        if (value == null) {
15584
          unsetUcx();
15585
        } else {
15586
          setUcx((UserContextException)value);
15587
        }
15588
        break;
15589
 
15590
      }
15591
    }
15592
 
15593
    public void setFieldValue(int fieldID, Object value) {
15594
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15595
    }
15596
 
15597
    public Object getFieldValue(_Fields field) {
15598
      switch (field) {
15599
      case SUCCESS:
15600
        return getSuccess();
15601
 
15602
      case UCX:
15603
        return getUcx();
15604
 
15605
      }
15606
      throw new IllegalStateException();
15607
    }
15608
 
15609
    public Object getFieldValue(int fieldId) {
15610
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15611
    }
15612
 
15613
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15614
    public boolean isSet(_Fields field) {
15615
      switch (field) {
15616
      case SUCCESS:
15617
        return isSetSuccess();
15618
      case UCX:
15619
        return isSetUcx();
15620
      }
15621
      throw new IllegalStateException();
15622
    }
15623
 
15624
    public boolean isSet(int fieldID) {
15625
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15626
    }
15627
 
15628
    @Override
15629
    public boolean equals(Object that) {
15630
      if (that == null)
15631
        return false;
15632
      if (that instanceof getDefaultPincode_result)
15633
        return this.equals((getDefaultPincode_result)that);
15634
      return false;
15635
    }
15636
 
15637
    public boolean equals(getDefaultPincode_result that) {
15638
      if (that == null)
15639
        return false;
15640
 
15641
      boolean this_present_success = true && this.isSetSuccess();
15642
      boolean that_present_success = true && that.isSetSuccess();
15643
      if (this_present_success || that_present_success) {
15644
        if (!(this_present_success && that_present_success))
15645
          return false;
15646
        if (!this.success.equals(that.success))
15647
          return false;
15648
      }
15649
 
15650
      boolean this_present_ucx = true && this.isSetUcx();
15651
      boolean that_present_ucx = true && that.isSetUcx();
15652
      if (this_present_ucx || that_present_ucx) {
15653
        if (!(this_present_ucx && that_present_ucx))
15654
          return false;
15655
        if (!this.ucx.equals(that.ucx))
15656
          return false;
15657
      }
15658
 
15659
      return true;
15660
    }
15661
 
15662
    @Override
15663
    public int hashCode() {
15664
      return 0;
15665
    }
15666
 
15667
    public int compareTo(getDefaultPincode_result other) {
15668
      if (!getClass().equals(other.getClass())) {
15669
        return getClass().getName().compareTo(other.getClass().getName());
15670
      }
15671
 
15672
      int lastComparison = 0;
15673
      getDefaultPincode_result typedOther = (getDefaultPincode_result)other;
15674
 
15675
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15676
      if (lastComparison != 0) {
15677
        return lastComparison;
15678
      }
15679
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15680
      if (lastComparison != 0) {
15681
        return lastComparison;
15682
      }
15683
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
15684
      if (lastComparison != 0) {
15685
        return lastComparison;
15686
      }
15687
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
15688
      if (lastComparison != 0) {
15689
        return lastComparison;
15690
      }
15691
      return 0;
15692
    }
15693
 
15694
    public void read(TProtocol iprot) throws TException {
15695
      TField field;
15696
      iprot.readStructBegin();
15697
      while (true)
15698
      {
15699
        field = iprot.readFieldBegin();
15700
        if (field.type == TType.STOP) { 
15701
          break;
15702
        }
15703
        _Fields fieldId = _Fields.findByThriftId(field.id);
15704
        if (fieldId == null) {
15705
          TProtocolUtil.skip(iprot, field.type);
15706
        } else {
15707
          switch (fieldId) {
15708
            case SUCCESS:
15709
              if (field.type == TType.STRING) {
15710
                this.success = iprot.readString();
15711
              } else { 
15712
                TProtocolUtil.skip(iprot, field.type);
15713
              }
15714
              break;
15715
            case UCX:
15716
              if (field.type == TType.STRUCT) {
15717
                this.ucx = new UserContextException();
15718
                this.ucx.read(iprot);
15719
              } else { 
15720
                TProtocolUtil.skip(iprot, field.type);
15721
              }
15722
              break;
15723
          }
15724
          iprot.readFieldEnd();
15725
        }
15726
      }
15727
      iprot.readStructEnd();
15728
      validate();
15729
    }
15730
 
15731
    public void write(TProtocol oprot) throws TException {
15732
      oprot.writeStructBegin(STRUCT_DESC);
15733
 
15734
      if (this.isSetSuccess()) {
15735
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15736
        oprot.writeString(this.success);
15737
        oprot.writeFieldEnd();
15738
      } else if (this.isSetUcx()) {
15739
        oprot.writeFieldBegin(UCX_FIELD_DESC);
15740
        this.ucx.write(oprot);
15741
        oprot.writeFieldEnd();
15742
      }
15743
      oprot.writeFieldStop();
15744
      oprot.writeStructEnd();
15745
    }
15746
 
15747
    @Override
15748
    public String toString() {
15749
      StringBuilder sb = new StringBuilder("getDefaultPincode_result(");
15750
      boolean first = true;
15751
 
15752
      sb.append("success:");
15753
      if (this.success == null) {
15754
        sb.append("null");
15755
      } else {
15756
        sb.append(this.success);
15757
      }
15758
      first = false;
15759
      if (!first) sb.append(", ");
15760
      sb.append("ucx:");
15761
      if (this.ucx == null) {
15762
        sb.append("null");
15763
      } else {
15764
        sb.append(this.ucx);
15765
      }
15766
      first = false;
15767
      sb.append(")");
15768
      return sb.toString();
15769
    }
15770
 
15771
    public void validate() throws TException {
15772
      // check for required fields
15773
    }
15774
 
15775
  }
15776
 
1177 varun.gupt 15777
  public static class saveUserCommunication_args implements TBase<saveUserCommunication_args._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_args>   {
15778
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_args");
15779
 
15780
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
15781
    private static final TField REPLY_TO_FIELD_DESC = new TField("replyTo", TType.STRING, (short)2);
15782
    private static final TField COMMUNICATION_TYPE_FIELD_DESC = new TField("communicationType", TType.I64, (short)3);
15783
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)4);
15784
    private static final TField AIRWAYBILL_NO_FIELD_DESC = new TField("airwaybillNo", TType.STRING, (short)5);
15785
    private static final TField PRODUCT_NAME_FIELD_DESC = new TField("productName", TType.STRING, (short)6);
15786
    private static final TField SUBJECT_FIELD_DESC = new TField("subject", TType.STRING, (short)7);
15787
    private static final TField MESSAGE_FIELD_DESC = new TField("message", TType.STRING, (short)8);
15788
 
15789
    private long userId;
15790
    private String replyTo;
15791
    private long communicationType;
15792
    private long orderId;
15793
    private String airwaybillNo;
15794
    private String productName;
15795
    private String subject;
15796
    private String message;
15797
 
15798
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15799
    public enum _Fields implements TFieldIdEnum {
15800
      USER_ID((short)1, "userId"),
15801
      REPLY_TO((short)2, "replyTo"),
15802
      COMMUNICATION_TYPE((short)3, "communicationType"),
15803
      ORDER_ID((short)4, "orderId"),
15804
      AIRWAYBILL_NO((short)5, "airwaybillNo"),
15805
      PRODUCT_NAME((short)6, "productName"),
15806
      SUBJECT((short)7, "subject"),
15807
      MESSAGE((short)8, "message");
15808
 
15809
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15810
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15811
 
15812
      static {
15813
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15814
          byId.put((int)field._thriftId, field);
15815
          byName.put(field.getFieldName(), field);
15816
        }
15817
      }
15818
 
15819
      /**
15820
       * Find the _Fields constant that matches fieldId, or null if its not found.
15821
       */
15822
      public static _Fields findByThriftId(int fieldId) {
15823
        return byId.get(fieldId);
15824
      }
15825
 
15826
      /**
15827
       * Find the _Fields constant that matches fieldId, throwing an exception
15828
       * if it is not found.
15829
       */
15830
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15831
        _Fields fields = findByThriftId(fieldId);
15832
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15833
        return fields;
15834
      }
15835
 
15836
      /**
15837
       * Find the _Fields constant that matches name, or null if its not found.
15838
       */
15839
      public static _Fields findByName(String name) {
15840
        return byName.get(name);
15841
      }
15842
 
15843
      private final short _thriftId;
15844
      private final String _fieldName;
15845
 
15846
      _Fields(short thriftId, String fieldName) {
15847
        _thriftId = thriftId;
15848
        _fieldName = fieldName;
15849
      }
15850
 
15851
      public short getThriftFieldId() {
15852
        return _thriftId;
15853
      }
15854
 
15855
      public String getFieldName() {
15856
        return _fieldName;
15857
      }
15858
    }
15859
 
15860
    // isset id assignments
15861
    private static final int __USERID_ISSET_ID = 0;
15862
    private static final int __COMMUNICATIONTYPE_ISSET_ID = 1;
15863
    private static final int __ORDERID_ISSET_ID = 2;
15864
    private BitSet __isset_bit_vector = new BitSet(3);
15865
 
15866
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15867
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
15868
          new FieldValueMetaData(TType.I64)));
15869
      put(_Fields.REPLY_TO, new FieldMetaData("replyTo", TFieldRequirementType.DEFAULT, 
15870
          new FieldValueMetaData(TType.STRING)));
15871
      put(_Fields.COMMUNICATION_TYPE, new FieldMetaData("communicationType", TFieldRequirementType.DEFAULT, 
15872
          new FieldValueMetaData(TType.I64)));
15873
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
15874
          new FieldValueMetaData(TType.I64)));
15875
      put(_Fields.AIRWAYBILL_NO, new FieldMetaData("airwaybillNo", TFieldRequirementType.DEFAULT, 
15876
          new FieldValueMetaData(TType.STRING)));
15877
      put(_Fields.PRODUCT_NAME, new FieldMetaData("productName", TFieldRequirementType.DEFAULT, 
15878
          new FieldValueMetaData(TType.STRING)));
15879
      put(_Fields.SUBJECT, new FieldMetaData("subject", TFieldRequirementType.DEFAULT, 
15880
          new FieldValueMetaData(TType.STRING)));
15881
      put(_Fields.MESSAGE, new FieldMetaData("message", TFieldRequirementType.DEFAULT, 
15882
          new FieldValueMetaData(TType.STRING)));
15883
    }});
15884
 
15885
    static {
15886
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_args.class, metaDataMap);
15887
    }
15888
 
15889
    public saveUserCommunication_args() {
15890
    }
15891
 
15892
    public saveUserCommunication_args(
15893
      long userId,
15894
      String replyTo,
15895
      long communicationType,
15896
      long orderId,
15897
      String airwaybillNo,
15898
      String productName,
15899
      String subject,
15900
      String message)
15901
    {
15902
      this();
15903
      this.userId = userId;
15904
      setUserIdIsSet(true);
15905
      this.replyTo = replyTo;
15906
      this.communicationType = communicationType;
15907
      setCommunicationTypeIsSet(true);
15908
      this.orderId = orderId;
15909
      setOrderIdIsSet(true);
15910
      this.airwaybillNo = airwaybillNo;
15911
      this.productName = productName;
15912
      this.subject = subject;
15913
      this.message = message;
15914
    }
15915
 
15916
    /**
15917
     * Performs a deep copy on <i>other</i>.
15918
     */
15919
    public saveUserCommunication_args(saveUserCommunication_args other) {
15920
      __isset_bit_vector.clear();
15921
      __isset_bit_vector.or(other.__isset_bit_vector);
15922
      this.userId = other.userId;
15923
      if (other.isSetReplyTo()) {
15924
        this.replyTo = other.replyTo;
15925
      }
15926
      this.communicationType = other.communicationType;
15927
      this.orderId = other.orderId;
15928
      if (other.isSetAirwaybillNo()) {
15929
        this.airwaybillNo = other.airwaybillNo;
15930
      }
15931
      if (other.isSetProductName()) {
15932
        this.productName = other.productName;
15933
      }
15934
      if (other.isSetSubject()) {
15935
        this.subject = other.subject;
15936
      }
15937
      if (other.isSetMessage()) {
15938
        this.message = other.message;
15939
      }
15940
    }
15941
 
15942
    public saveUserCommunication_args deepCopy() {
15943
      return new saveUserCommunication_args(this);
15944
    }
15945
 
15946
    @Deprecated
15947
    public saveUserCommunication_args clone() {
15948
      return new saveUserCommunication_args(this);
15949
    }
15950
 
15951
    public long getUserId() {
15952
      return this.userId;
15953
    }
15954
 
15955
    public saveUserCommunication_args setUserId(long userId) {
15956
      this.userId = userId;
15957
      setUserIdIsSet(true);
15958
      return this;
15959
    }
15960
 
15961
    public void unsetUserId() {
15962
      __isset_bit_vector.clear(__USERID_ISSET_ID);
15963
    }
15964
 
15965
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
15966
    public boolean isSetUserId() {
15967
      return __isset_bit_vector.get(__USERID_ISSET_ID);
15968
    }
15969
 
15970
    public void setUserIdIsSet(boolean value) {
15971
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
15972
    }
15973
 
15974
    public String getReplyTo() {
15975
      return this.replyTo;
15976
    }
15977
 
15978
    public saveUserCommunication_args setReplyTo(String replyTo) {
15979
      this.replyTo = replyTo;
15980
      return this;
15981
    }
15982
 
15983
    public void unsetReplyTo() {
15984
      this.replyTo = null;
15985
    }
15986
 
15987
    /** Returns true if field replyTo is set (has been asigned a value) and false otherwise */
15988
    public boolean isSetReplyTo() {
15989
      return this.replyTo != null;
15990
    }
15991
 
15992
    public void setReplyToIsSet(boolean value) {
15993
      if (!value) {
15994
        this.replyTo = null;
15995
      }
15996
    }
15997
 
15998
    public long getCommunicationType() {
15999
      return this.communicationType;
16000
    }
16001
 
16002
    public saveUserCommunication_args setCommunicationType(long communicationType) {
16003
      this.communicationType = communicationType;
16004
      setCommunicationTypeIsSet(true);
16005
      return this;
16006
    }
16007
 
16008
    public void unsetCommunicationType() {
16009
      __isset_bit_vector.clear(__COMMUNICATIONTYPE_ISSET_ID);
16010
    }
16011
 
16012
    /** Returns true if field communicationType is set (has been asigned a value) and false otherwise */
16013
    public boolean isSetCommunicationType() {
16014
      return __isset_bit_vector.get(__COMMUNICATIONTYPE_ISSET_ID);
16015
    }
16016
 
16017
    public void setCommunicationTypeIsSet(boolean value) {
16018
      __isset_bit_vector.set(__COMMUNICATIONTYPE_ISSET_ID, value);
16019
    }
16020
 
16021
    public long getOrderId() {
16022
      return this.orderId;
16023
    }
16024
 
16025
    public saveUserCommunication_args setOrderId(long orderId) {
16026
      this.orderId = orderId;
16027
      setOrderIdIsSet(true);
16028
      return this;
16029
    }
16030
 
16031
    public void unsetOrderId() {
16032
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
16033
    }
16034
 
16035
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
16036
    public boolean isSetOrderId() {
16037
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
16038
    }
16039
 
16040
    public void setOrderIdIsSet(boolean value) {
16041
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
16042
    }
16043
 
16044
    public String getAirwaybillNo() {
16045
      return this.airwaybillNo;
16046
    }
16047
 
16048
    public saveUserCommunication_args setAirwaybillNo(String airwaybillNo) {
16049
      this.airwaybillNo = airwaybillNo;
16050
      return this;
16051
    }
16052
 
16053
    public void unsetAirwaybillNo() {
16054
      this.airwaybillNo = null;
16055
    }
16056
 
16057
    /** Returns true if field airwaybillNo is set (has been asigned a value) and false otherwise */
16058
    public boolean isSetAirwaybillNo() {
16059
      return this.airwaybillNo != null;
16060
    }
16061
 
16062
    public void setAirwaybillNoIsSet(boolean value) {
16063
      if (!value) {
16064
        this.airwaybillNo = null;
16065
      }
16066
    }
16067
 
16068
    public String getProductName() {
16069
      return this.productName;
16070
    }
16071
 
16072
    public saveUserCommunication_args setProductName(String productName) {
16073
      this.productName = productName;
16074
      return this;
16075
    }
16076
 
16077
    public void unsetProductName() {
16078
      this.productName = null;
16079
    }
16080
 
16081
    /** Returns true if field productName is set (has been asigned a value) and false otherwise */
16082
    public boolean isSetProductName() {
16083
      return this.productName != null;
16084
    }
16085
 
16086
    public void setProductNameIsSet(boolean value) {
16087
      if (!value) {
16088
        this.productName = null;
16089
      }
16090
    }
16091
 
16092
    public String getSubject() {
16093
      return this.subject;
16094
    }
16095
 
16096
    public saveUserCommunication_args setSubject(String subject) {
16097
      this.subject = subject;
16098
      return this;
16099
    }
16100
 
16101
    public void unsetSubject() {
16102
      this.subject = null;
16103
    }
16104
 
16105
    /** Returns true if field subject is set (has been asigned a value) and false otherwise */
16106
    public boolean isSetSubject() {
16107
      return this.subject != null;
16108
    }
16109
 
16110
    public void setSubjectIsSet(boolean value) {
16111
      if (!value) {
16112
        this.subject = null;
16113
      }
16114
    }
16115
 
16116
    public String getMessage() {
16117
      return this.message;
16118
    }
16119
 
16120
    public saveUserCommunication_args setMessage(String message) {
16121
      this.message = message;
16122
      return this;
16123
    }
16124
 
16125
    public void unsetMessage() {
16126
      this.message = null;
16127
    }
16128
 
16129
    /** Returns true if field message is set (has been asigned a value) and false otherwise */
16130
    public boolean isSetMessage() {
16131
      return this.message != null;
16132
    }
16133
 
16134
    public void setMessageIsSet(boolean value) {
16135
      if (!value) {
16136
        this.message = null;
16137
      }
16138
    }
16139
 
16140
    public void setFieldValue(_Fields field, Object value) {
16141
      switch (field) {
16142
      case USER_ID:
16143
        if (value == null) {
16144
          unsetUserId();
16145
        } else {
16146
          setUserId((Long)value);
16147
        }
16148
        break;
16149
 
16150
      case REPLY_TO:
16151
        if (value == null) {
16152
          unsetReplyTo();
16153
        } else {
16154
          setReplyTo((String)value);
16155
        }
16156
        break;
16157
 
16158
      case COMMUNICATION_TYPE:
16159
        if (value == null) {
16160
          unsetCommunicationType();
16161
        } else {
16162
          setCommunicationType((Long)value);
16163
        }
16164
        break;
16165
 
16166
      case ORDER_ID:
16167
        if (value == null) {
16168
          unsetOrderId();
16169
        } else {
16170
          setOrderId((Long)value);
16171
        }
16172
        break;
16173
 
16174
      case AIRWAYBILL_NO:
16175
        if (value == null) {
16176
          unsetAirwaybillNo();
16177
        } else {
16178
          setAirwaybillNo((String)value);
16179
        }
16180
        break;
16181
 
16182
      case PRODUCT_NAME:
16183
        if (value == null) {
16184
          unsetProductName();
16185
        } else {
16186
          setProductName((String)value);
16187
        }
16188
        break;
16189
 
16190
      case SUBJECT:
16191
        if (value == null) {
16192
          unsetSubject();
16193
        } else {
16194
          setSubject((String)value);
16195
        }
16196
        break;
16197
 
16198
      case MESSAGE:
16199
        if (value == null) {
16200
          unsetMessage();
16201
        } else {
16202
          setMessage((String)value);
16203
        }
16204
        break;
16205
 
16206
      }
16207
    }
16208
 
16209
    public void setFieldValue(int fieldID, Object value) {
16210
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16211
    }
16212
 
16213
    public Object getFieldValue(_Fields field) {
16214
      switch (field) {
16215
      case USER_ID:
16216
        return new Long(getUserId());
16217
 
16218
      case REPLY_TO:
16219
        return getReplyTo();
16220
 
16221
      case COMMUNICATION_TYPE:
16222
        return new Long(getCommunicationType());
16223
 
16224
      case ORDER_ID:
16225
        return new Long(getOrderId());
16226
 
16227
      case AIRWAYBILL_NO:
16228
        return getAirwaybillNo();
16229
 
16230
      case PRODUCT_NAME:
16231
        return getProductName();
16232
 
16233
      case SUBJECT:
16234
        return getSubject();
16235
 
16236
      case MESSAGE:
16237
        return getMessage();
16238
 
16239
      }
16240
      throw new IllegalStateException();
16241
    }
16242
 
16243
    public Object getFieldValue(int fieldId) {
16244
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16245
    }
16246
 
16247
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16248
    public boolean isSet(_Fields field) {
16249
      switch (field) {
16250
      case USER_ID:
16251
        return isSetUserId();
16252
      case REPLY_TO:
16253
        return isSetReplyTo();
16254
      case COMMUNICATION_TYPE:
16255
        return isSetCommunicationType();
16256
      case ORDER_ID:
16257
        return isSetOrderId();
16258
      case AIRWAYBILL_NO:
16259
        return isSetAirwaybillNo();
16260
      case PRODUCT_NAME:
16261
        return isSetProductName();
16262
      case SUBJECT:
16263
        return isSetSubject();
16264
      case MESSAGE:
16265
        return isSetMessage();
16266
      }
16267
      throw new IllegalStateException();
16268
    }
16269
 
16270
    public boolean isSet(int fieldID) {
16271
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16272
    }
16273
 
16274
    @Override
16275
    public boolean equals(Object that) {
16276
      if (that == null)
16277
        return false;
16278
      if (that instanceof saveUserCommunication_args)
16279
        return this.equals((saveUserCommunication_args)that);
16280
      return false;
16281
    }
16282
 
16283
    public boolean equals(saveUserCommunication_args that) {
16284
      if (that == null)
16285
        return false;
16286
 
16287
      boolean this_present_userId = true;
16288
      boolean that_present_userId = true;
16289
      if (this_present_userId || that_present_userId) {
16290
        if (!(this_present_userId && that_present_userId))
16291
          return false;
16292
        if (this.userId != that.userId)
16293
          return false;
16294
      }
16295
 
16296
      boolean this_present_replyTo = true && this.isSetReplyTo();
16297
      boolean that_present_replyTo = true && that.isSetReplyTo();
16298
      if (this_present_replyTo || that_present_replyTo) {
16299
        if (!(this_present_replyTo && that_present_replyTo))
16300
          return false;
16301
        if (!this.replyTo.equals(that.replyTo))
16302
          return false;
16303
      }
16304
 
16305
      boolean this_present_communicationType = true;
16306
      boolean that_present_communicationType = true;
16307
      if (this_present_communicationType || that_present_communicationType) {
16308
        if (!(this_present_communicationType && that_present_communicationType))
16309
          return false;
16310
        if (this.communicationType != that.communicationType)
16311
          return false;
16312
      }
16313
 
16314
      boolean this_present_orderId = true;
16315
      boolean that_present_orderId = true;
16316
      if (this_present_orderId || that_present_orderId) {
16317
        if (!(this_present_orderId && that_present_orderId))
16318
          return false;
16319
        if (this.orderId != that.orderId)
16320
          return false;
16321
      }
16322
 
16323
      boolean this_present_airwaybillNo = true && this.isSetAirwaybillNo();
16324
      boolean that_present_airwaybillNo = true && that.isSetAirwaybillNo();
16325
      if (this_present_airwaybillNo || that_present_airwaybillNo) {
16326
        if (!(this_present_airwaybillNo && that_present_airwaybillNo))
16327
          return false;
16328
        if (!this.airwaybillNo.equals(that.airwaybillNo))
16329
          return false;
16330
      }
16331
 
16332
      boolean this_present_productName = true && this.isSetProductName();
16333
      boolean that_present_productName = true && that.isSetProductName();
16334
      if (this_present_productName || that_present_productName) {
16335
        if (!(this_present_productName && that_present_productName))
16336
          return false;
16337
        if (!this.productName.equals(that.productName))
16338
          return false;
16339
      }
16340
 
16341
      boolean this_present_subject = true && this.isSetSubject();
16342
      boolean that_present_subject = true && that.isSetSubject();
16343
      if (this_present_subject || that_present_subject) {
16344
        if (!(this_present_subject && that_present_subject))
16345
          return false;
16346
        if (!this.subject.equals(that.subject))
16347
          return false;
16348
      }
16349
 
16350
      boolean this_present_message = true && this.isSetMessage();
16351
      boolean that_present_message = true && that.isSetMessage();
16352
      if (this_present_message || that_present_message) {
16353
        if (!(this_present_message && that_present_message))
16354
          return false;
16355
        if (!this.message.equals(that.message))
16356
          return false;
16357
      }
16358
 
16359
      return true;
16360
    }
16361
 
16362
    @Override
16363
    public int hashCode() {
16364
      return 0;
16365
    }
16366
 
16367
    public int compareTo(saveUserCommunication_args other) {
16368
      if (!getClass().equals(other.getClass())) {
16369
        return getClass().getName().compareTo(other.getClass().getName());
16370
      }
16371
 
16372
      int lastComparison = 0;
16373
      saveUserCommunication_args typedOther = (saveUserCommunication_args)other;
16374
 
16375
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
16376
      if (lastComparison != 0) {
16377
        return lastComparison;
16378
      }
16379
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
16380
      if (lastComparison != 0) {
16381
        return lastComparison;
16382
      }
16383
      lastComparison = Boolean.valueOf(isSetReplyTo()).compareTo(isSetReplyTo());
16384
      if (lastComparison != 0) {
16385
        return lastComparison;
16386
      }
16387
      lastComparison = TBaseHelper.compareTo(replyTo, typedOther.replyTo);
16388
      if (lastComparison != 0) {
16389
        return lastComparison;
16390
      }
16391
      lastComparison = Boolean.valueOf(isSetCommunicationType()).compareTo(isSetCommunicationType());
16392
      if (lastComparison != 0) {
16393
        return lastComparison;
16394
      }
16395
      lastComparison = TBaseHelper.compareTo(communicationType, typedOther.communicationType);
16396
      if (lastComparison != 0) {
16397
        return lastComparison;
16398
      }
16399
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
16400
      if (lastComparison != 0) {
16401
        return lastComparison;
16402
      }
16403
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
16404
      if (lastComparison != 0) {
16405
        return lastComparison;
16406
      }
16407
      lastComparison = Boolean.valueOf(isSetAirwaybillNo()).compareTo(isSetAirwaybillNo());
16408
      if (lastComparison != 0) {
16409
        return lastComparison;
16410
      }
16411
      lastComparison = TBaseHelper.compareTo(airwaybillNo, typedOther.airwaybillNo);
16412
      if (lastComparison != 0) {
16413
        return lastComparison;
16414
      }
16415
      lastComparison = Boolean.valueOf(isSetProductName()).compareTo(isSetProductName());
16416
      if (lastComparison != 0) {
16417
        return lastComparison;
16418
      }
16419
      lastComparison = TBaseHelper.compareTo(productName, typedOther.productName);
16420
      if (lastComparison != 0) {
16421
        return lastComparison;
16422
      }
16423
      lastComparison = Boolean.valueOf(isSetSubject()).compareTo(isSetSubject());
16424
      if (lastComparison != 0) {
16425
        return lastComparison;
16426
      }
16427
      lastComparison = TBaseHelper.compareTo(subject, typedOther.subject);
16428
      if (lastComparison != 0) {
16429
        return lastComparison;
16430
      }
16431
      lastComparison = Boolean.valueOf(isSetMessage()).compareTo(isSetMessage());
16432
      if (lastComparison != 0) {
16433
        return lastComparison;
16434
      }
16435
      lastComparison = TBaseHelper.compareTo(message, typedOther.message);
16436
      if (lastComparison != 0) {
16437
        return lastComparison;
16438
      }
16439
      return 0;
16440
    }
16441
 
16442
    public void read(TProtocol iprot) throws TException {
16443
      TField field;
16444
      iprot.readStructBegin();
16445
      while (true)
16446
      {
16447
        field = iprot.readFieldBegin();
16448
        if (field.type == TType.STOP) { 
16449
          break;
16450
        }
16451
        _Fields fieldId = _Fields.findByThriftId(field.id);
16452
        if (fieldId == null) {
16453
          TProtocolUtil.skip(iprot, field.type);
16454
        } else {
16455
          switch (fieldId) {
16456
            case USER_ID:
16457
              if (field.type == TType.I64) {
16458
                this.userId = iprot.readI64();
16459
                setUserIdIsSet(true);
16460
              } else { 
16461
                TProtocolUtil.skip(iprot, field.type);
16462
              }
16463
              break;
16464
            case REPLY_TO:
16465
              if (field.type == TType.STRING) {
16466
                this.replyTo = iprot.readString();
16467
              } else { 
16468
                TProtocolUtil.skip(iprot, field.type);
16469
              }
16470
              break;
16471
            case COMMUNICATION_TYPE:
16472
              if (field.type == TType.I64) {
16473
                this.communicationType = iprot.readI64();
16474
                setCommunicationTypeIsSet(true);
16475
              } else { 
16476
                TProtocolUtil.skip(iprot, field.type);
16477
              }
16478
              break;
16479
            case ORDER_ID:
16480
              if (field.type == TType.I64) {
16481
                this.orderId = iprot.readI64();
16482
                setOrderIdIsSet(true);
16483
              } else { 
16484
                TProtocolUtil.skip(iprot, field.type);
16485
              }
16486
              break;
16487
            case AIRWAYBILL_NO:
16488
              if (field.type == TType.STRING) {
16489
                this.airwaybillNo = iprot.readString();
16490
              } else { 
16491
                TProtocolUtil.skip(iprot, field.type);
16492
              }
16493
              break;
16494
            case PRODUCT_NAME:
16495
              if (field.type == TType.STRING) {
16496
                this.productName = iprot.readString();
16497
              } else { 
16498
                TProtocolUtil.skip(iprot, field.type);
16499
              }
16500
              break;
16501
            case SUBJECT:
16502
              if (field.type == TType.STRING) {
16503
                this.subject = iprot.readString();
16504
              } else { 
16505
                TProtocolUtil.skip(iprot, field.type);
16506
              }
16507
              break;
16508
            case MESSAGE:
16509
              if (field.type == TType.STRING) {
16510
                this.message = iprot.readString();
16511
              } else { 
16512
                TProtocolUtil.skip(iprot, field.type);
16513
              }
16514
              break;
16515
          }
16516
          iprot.readFieldEnd();
16517
        }
16518
      }
16519
      iprot.readStructEnd();
16520
      validate();
16521
    }
16522
 
16523
    public void write(TProtocol oprot) throws TException {
16524
      validate();
16525
 
16526
      oprot.writeStructBegin(STRUCT_DESC);
16527
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
16528
      oprot.writeI64(this.userId);
16529
      oprot.writeFieldEnd();
16530
      if (this.replyTo != null) {
16531
        oprot.writeFieldBegin(REPLY_TO_FIELD_DESC);
16532
        oprot.writeString(this.replyTo);
16533
        oprot.writeFieldEnd();
16534
      }
16535
      oprot.writeFieldBegin(COMMUNICATION_TYPE_FIELD_DESC);
16536
      oprot.writeI64(this.communicationType);
16537
      oprot.writeFieldEnd();
16538
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
16539
      oprot.writeI64(this.orderId);
16540
      oprot.writeFieldEnd();
16541
      if (this.airwaybillNo != null) {
16542
        oprot.writeFieldBegin(AIRWAYBILL_NO_FIELD_DESC);
16543
        oprot.writeString(this.airwaybillNo);
16544
        oprot.writeFieldEnd();
16545
      }
16546
      if (this.productName != null) {
16547
        oprot.writeFieldBegin(PRODUCT_NAME_FIELD_DESC);
16548
        oprot.writeString(this.productName);
16549
        oprot.writeFieldEnd();
16550
      }
16551
      if (this.subject != null) {
16552
        oprot.writeFieldBegin(SUBJECT_FIELD_DESC);
16553
        oprot.writeString(this.subject);
16554
        oprot.writeFieldEnd();
16555
      }
16556
      if (this.message != null) {
16557
        oprot.writeFieldBegin(MESSAGE_FIELD_DESC);
16558
        oprot.writeString(this.message);
16559
        oprot.writeFieldEnd();
16560
      }
16561
      oprot.writeFieldStop();
16562
      oprot.writeStructEnd();
16563
    }
16564
 
16565
    @Override
16566
    public String toString() {
16567
      StringBuilder sb = new StringBuilder("saveUserCommunication_args(");
16568
      boolean first = true;
16569
 
16570
      sb.append("userId:");
16571
      sb.append(this.userId);
16572
      first = false;
16573
      if (!first) sb.append(", ");
16574
      sb.append("replyTo:");
16575
      if (this.replyTo == null) {
16576
        sb.append("null");
16577
      } else {
16578
        sb.append(this.replyTo);
16579
      }
16580
      first = false;
16581
      if (!first) sb.append(", ");
16582
      sb.append("communicationType:");
16583
      sb.append(this.communicationType);
16584
      first = false;
16585
      if (!first) sb.append(", ");
16586
      sb.append("orderId:");
16587
      sb.append(this.orderId);
16588
      first = false;
16589
      if (!first) sb.append(", ");
16590
      sb.append("airwaybillNo:");
16591
      if (this.airwaybillNo == null) {
16592
        sb.append("null");
16593
      } else {
16594
        sb.append(this.airwaybillNo);
16595
      }
16596
      first = false;
16597
      if (!first) sb.append(", ");
16598
      sb.append("productName:");
16599
      if (this.productName == null) {
16600
        sb.append("null");
16601
      } else {
16602
        sb.append(this.productName);
16603
      }
16604
      first = false;
16605
      if (!first) sb.append(", ");
16606
      sb.append("subject:");
16607
      if (this.subject == null) {
16608
        sb.append("null");
16609
      } else {
16610
        sb.append(this.subject);
16611
      }
16612
      first = false;
16613
      if (!first) sb.append(", ");
16614
      sb.append("message:");
16615
      if (this.message == null) {
16616
        sb.append("null");
16617
      } else {
16618
        sb.append(this.message);
16619
      }
16620
      first = false;
16621
      sb.append(")");
16622
      return sb.toString();
16623
    }
16624
 
16625
    public void validate() throws TException {
16626
      // check for required fields
16627
    }
16628
 
16629
  }
16630
 
16631
  public static class saveUserCommunication_result implements TBase<saveUserCommunication_result._Fields>, java.io.Serializable, Cloneable, Comparable<saveUserCommunication_result>   {
16632
    private static final TStruct STRUCT_DESC = new TStruct("saveUserCommunication_result");
16633
 
16634
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
16635
    private static final TField UCX_FIELD_DESC = new TField("ucx", TType.STRUCT, (short)1);
16636
 
16637
    private boolean success;
16638
    private UserCommunicationException ucx;
16639
 
16640
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16641
    public enum _Fields implements TFieldIdEnum {
16642
      SUCCESS((short)0, "success"),
16643
      UCX((short)1, "ucx");
16644
 
16645
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16646
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16647
 
16648
      static {
16649
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16650
          byId.put((int)field._thriftId, field);
16651
          byName.put(field.getFieldName(), field);
16652
        }
16653
      }
16654
 
16655
      /**
16656
       * Find the _Fields constant that matches fieldId, or null if its not found.
16657
       */
16658
      public static _Fields findByThriftId(int fieldId) {
16659
        return byId.get(fieldId);
16660
      }
16661
 
16662
      /**
16663
       * Find the _Fields constant that matches fieldId, throwing an exception
16664
       * if it is not found.
16665
       */
16666
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16667
        _Fields fields = findByThriftId(fieldId);
16668
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16669
        return fields;
16670
      }
16671
 
16672
      /**
16673
       * Find the _Fields constant that matches name, or null if its not found.
16674
       */
16675
      public static _Fields findByName(String name) {
16676
        return byName.get(name);
16677
      }
16678
 
16679
      private final short _thriftId;
16680
      private final String _fieldName;
16681
 
16682
      _Fields(short thriftId, String fieldName) {
16683
        _thriftId = thriftId;
16684
        _fieldName = fieldName;
16685
      }
16686
 
16687
      public short getThriftFieldId() {
16688
        return _thriftId;
16689
      }
16690
 
16691
      public String getFieldName() {
16692
        return _fieldName;
16693
      }
16694
    }
16695
 
16696
    // isset id assignments
16697
    private static final int __SUCCESS_ISSET_ID = 0;
16698
    private BitSet __isset_bit_vector = new BitSet(1);
16699
 
16700
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16701
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
16702
          new FieldValueMetaData(TType.BOOL)));
16703
      put(_Fields.UCX, new FieldMetaData("ucx", TFieldRequirementType.DEFAULT, 
16704
          new FieldValueMetaData(TType.STRUCT)));
16705
    }});
16706
 
16707
    static {
16708
      FieldMetaData.addStructMetaDataMap(saveUserCommunication_result.class, metaDataMap);
16709
    }
16710
 
16711
    public saveUserCommunication_result() {
16712
    }
16713
 
16714
    public saveUserCommunication_result(
16715
      boolean success,
16716
      UserCommunicationException ucx)
16717
    {
16718
      this();
16719
      this.success = success;
16720
      setSuccessIsSet(true);
16721
      this.ucx = ucx;
16722
    }
16723
 
16724
    /**
16725
     * Performs a deep copy on <i>other</i>.
16726
     */
16727
    public saveUserCommunication_result(saveUserCommunication_result other) {
16728
      __isset_bit_vector.clear();
16729
      __isset_bit_vector.or(other.__isset_bit_vector);
16730
      this.success = other.success;
16731
      if (other.isSetUcx()) {
16732
        this.ucx = new UserCommunicationException(other.ucx);
16733
      }
16734
    }
16735
 
16736
    public saveUserCommunication_result deepCopy() {
16737
      return new saveUserCommunication_result(this);
16738
    }
16739
 
16740
    @Deprecated
16741
    public saveUserCommunication_result clone() {
16742
      return new saveUserCommunication_result(this);
16743
    }
16744
 
16745
    public boolean isSuccess() {
16746
      return this.success;
16747
    }
16748
 
16749
    public saveUserCommunication_result setSuccess(boolean success) {
16750
      this.success = success;
16751
      setSuccessIsSet(true);
16752
      return this;
16753
    }
16754
 
16755
    public void unsetSuccess() {
16756
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16757
    }
16758
 
16759
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16760
    public boolean isSetSuccess() {
16761
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16762
    }
16763
 
16764
    public void setSuccessIsSet(boolean value) {
16765
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
16766
    }
16767
 
16768
    public UserCommunicationException getUcx() {
16769
      return this.ucx;
16770
    }
16771
 
16772
    public saveUserCommunication_result setUcx(UserCommunicationException ucx) {
16773
      this.ucx = ucx;
16774
      return this;
16775
    }
16776
 
16777
    public void unsetUcx() {
16778
      this.ucx = null;
16779
    }
16780
 
16781
    /** Returns true if field ucx is set (has been asigned a value) and false otherwise */
16782
    public boolean isSetUcx() {
16783
      return this.ucx != null;
16784
    }
16785
 
16786
    public void setUcxIsSet(boolean value) {
16787
      if (!value) {
16788
        this.ucx = null;
16789
      }
16790
    }
16791
 
16792
    public void setFieldValue(_Fields field, Object value) {
16793
      switch (field) {
16794
      case SUCCESS:
16795
        if (value == null) {
16796
          unsetSuccess();
16797
        } else {
16798
          setSuccess((Boolean)value);
16799
        }
16800
        break;
16801
 
16802
      case UCX:
16803
        if (value == null) {
16804
          unsetUcx();
16805
        } else {
16806
          setUcx((UserCommunicationException)value);
16807
        }
16808
        break;
16809
 
16810
      }
16811
    }
16812
 
16813
    public void setFieldValue(int fieldID, Object value) {
16814
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16815
    }
16816
 
16817
    public Object getFieldValue(_Fields field) {
16818
      switch (field) {
16819
      case SUCCESS:
16820
        return new Boolean(isSuccess());
16821
 
16822
      case UCX:
16823
        return getUcx();
16824
 
16825
      }
16826
      throw new IllegalStateException();
16827
    }
16828
 
16829
    public Object getFieldValue(int fieldId) {
16830
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16831
    }
16832
 
16833
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16834
    public boolean isSet(_Fields field) {
16835
      switch (field) {
16836
      case SUCCESS:
16837
        return isSetSuccess();
16838
      case UCX:
16839
        return isSetUcx();
16840
      }
16841
      throw new IllegalStateException();
16842
    }
16843
 
16844
    public boolean isSet(int fieldID) {
16845
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16846
    }
16847
 
16848
    @Override
16849
    public boolean equals(Object that) {
16850
      if (that == null)
16851
        return false;
16852
      if (that instanceof saveUserCommunication_result)
16853
        return this.equals((saveUserCommunication_result)that);
16854
      return false;
16855
    }
16856
 
16857
    public boolean equals(saveUserCommunication_result that) {
16858
      if (that == null)
16859
        return false;
16860
 
16861
      boolean this_present_success = true;
16862
      boolean that_present_success = true;
16863
      if (this_present_success || that_present_success) {
16864
        if (!(this_present_success && that_present_success))
16865
          return false;
16866
        if (this.success != that.success)
16867
          return false;
16868
      }
16869
 
16870
      boolean this_present_ucx = true && this.isSetUcx();
16871
      boolean that_present_ucx = true && that.isSetUcx();
16872
      if (this_present_ucx || that_present_ucx) {
16873
        if (!(this_present_ucx && that_present_ucx))
16874
          return false;
16875
        if (!this.ucx.equals(that.ucx))
16876
          return false;
16877
      }
16878
 
16879
      return true;
16880
    }
16881
 
16882
    @Override
16883
    public int hashCode() {
16884
      return 0;
16885
    }
16886
 
16887
    public int compareTo(saveUserCommunication_result other) {
16888
      if (!getClass().equals(other.getClass())) {
16889
        return getClass().getName().compareTo(other.getClass().getName());
16890
      }
16891
 
16892
      int lastComparison = 0;
16893
      saveUserCommunication_result typedOther = (saveUserCommunication_result)other;
16894
 
16895
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16896
      if (lastComparison != 0) {
16897
        return lastComparison;
16898
      }
16899
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16900
      if (lastComparison != 0) {
16901
        return lastComparison;
16902
      }
16903
      lastComparison = Boolean.valueOf(isSetUcx()).compareTo(isSetUcx());
16904
      if (lastComparison != 0) {
16905
        return lastComparison;
16906
      }
16907
      lastComparison = TBaseHelper.compareTo(ucx, typedOther.ucx);
16908
      if (lastComparison != 0) {
16909
        return lastComparison;
16910
      }
16911
      return 0;
16912
    }
16913
 
16914
    public void read(TProtocol iprot) throws TException {
16915
      TField field;
16916
      iprot.readStructBegin();
16917
      while (true)
16918
      {
16919
        field = iprot.readFieldBegin();
16920
        if (field.type == TType.STOP) { 
16921
          break;
16922
        }
16923
        _Fields fieldId = _Fields.findByThriftId(field.id);
16924
        if (fieldId == null) {
16925
          TProtocolUtil.skip(iprot, field.type);
16926
        } else {
16927
          switch (fieldId) {
16928
            case SUCCESS:
16929
              if (field.type == TType.BOOL) {
16930
                this.success = iprot.readBool();
16931
                setSuccessIsSet(true);
16932
              } else { 
16933
                TProtocolUtil.skip(iprot, field.type);
16934
              }
16935
              break;
16936
            case UCX:
16937
              if (field.type == TType.STRUCT) {
16938
                this.ucx = new UserCommunicationException();
16939
                this.ucx.read(iprot);
16940
              } else { 
16941
                TProtocolUtil.skip(iprot, field.type);
16942
              }
16943
              break;
16944
          }
16945
          iprot.readFieldEnd();
16946
        }
16947
      }
16948
      iprot.readStructEnd();
16949
      validate();
16950
    }
16951
 
16952
    public void write(TProtocol oprot) throws TException {
16953
      oprot.writeStructBegin(STRUCT_DESC);
16954
 
16955
      if (this.isSetSuccess()) {
16956
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
16957
        oprot.writeBool(this.success);
16958
        oprot.writeFieldEnd();
16959
      } else if (this.isSetUcx()) {
16960
        oprot.writeFieldBegin(UCX_FIELD_DESC);
16961
        this.ucx.write(oprot);
16962
        oprot.writeFieldEnd();
16963
      }
16964
      oprot.writeFieldStop();
16965
      oprot.writeStructEnd();
16966
    }
16967
 
16968
    @Override
16969
    public String toString() {
16970
      StringBuilder sb = new StringBuilder("saveUserCommunication_result(");
16971
      boolean first = true;
16972
 
16973
      sb.append("success:");
16974
      sb.append(this.success);
16975
      first = false;
16976
      if (!first) sb.append(", ");
16977
      sb.append("ucx:");
16978
      if (this.ucx == null) {
16979
        sb.append("null");
16980
      } else {
16981
        sb.append(this.ucx);
16982
      }
16983
      first = false;
16984
      sb.append(")");
16985
      return sb.toString();
16986
    }
16987
 
16988
    public void validate() throws TException {
16989
      // check for required fields
16990
    }
16991
 
16992
  }
16993
 
553 chandransh 16994
  public static class createCart_args implements TBase<createCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_args>   {
16995
    private static final TStruct STRUCT_DESC = new TStruct("createCart_args");
48 ashish 16996
 
553 chandransh 16997
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
48 ashish 16998
 
553 chandransh 16999
    private long userId;
48 ashish 17000
 
17001
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17002
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17003
      USER_ID((short)1, "userId");
48 ashish 17004
 
17005
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17006
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17007
 
17008
      static {
17009
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17010
          byId.put((int)field._thriftId, field);
17011
          byName.put(field.getFieldName(), field);
17012
        }
17013
      }
17014
 
17015
      /**
17016
       * Find the _Fields constant that matches fieldId, or null if its not found.
17017
       */
17018
      public static _Fields findByThriftId(int fieldId) {
17019
        return byId.get(fieldId);
17020
      }
17021
 
17022
      /**
17023
       * Find the _Fields constant that matches fieldId, throwing an exception
17024
       * if it is not found.
17025
       */
17026
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17027
        _Fields fields = findByThriftId(fieldId);
17028
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17029
        return fields;
17030
      }
17031
 
17032
      /**
17033
       * Find the _Fields constant that matches name, or null if its not found.
17034
       */
17035
      public static _Fields findByName(String name) {
17036
        return byName.get(name);
17037
      }
17038
 
17039
      private final short _thriftId;
17040
      private final String _fieldName;
17041
 
17042
      _Fields(short thriftId, String fieldName) {
17043
        _thriftId = thriftId;
17044
        _fieldName = fieldName;
17045
      }
17046
 
17047
      public short getThriftFieldId() {
17048
        return _thriftId;
17049
      }
17050
 
17051
      public String getFieldName() {
17052
        return _fieldName;
17053
      }
17054
    }
17055
 
17056
    // isset id assignments
17057
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 17058
    private BitSet __isset_bit_vector = new BitSet(1);
48 ashish 17059
 
17060
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17061
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 17062
          new FieldValueMetaData(TType.I64)));
17063
    }});
17064
 
17065
    static {
553 chandransh 17066
      FieldMetaData.addStructMetaDataMap(createCart_args.class, metaDataMap);
48 ashish 17067
    }
17068
 
553 chandransh 17069
    public createCart_args() {
48 ashish 17070
    }
17071
 
553 chandransh 17072
    public createCart_args(
17073
      long userId)
48 ashish 17074
    {
17075
      this();
553 chandransh 17076
      this.userId = userId;
17077
      setUserIdIsSet(true);
48 ashish 17078
    }
17079
 
17080
    /**
17081
     * Performs a deep copy on <i>other</i>.
17082
     */
553 chandransh 17083
    public createCart_args(createCart_args other) {
48 ashish 17084
      __isset_bit_vector.clear();
17085
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17086
      this.userId = other.userId;
48 ashish 17087
    }
17088
 
553 chandransh 17089
    public createCart_args deepCopy() {
17090
      return new createCart_args(this);
48 ashish 17091
    }
17092
 
17093
    @Deprecated
553 chandransh 17094
    public createCart_args clone() {
17095
      return new createCart_args(this);
48 ashish 17096
    }
17097
 
553 chandransh 17098
    public long getUserId() {
17099
      return this.userId;
48 ashish 17100
    }
17101
 
553 chandransh 17102
    public createCart_args setUserId(long userId) {
17103
      this.userId = userId;
17104
      setUserIdIsSet(true);
48 ashish 17105
      return this;
17106
    }
17107
 
553 chandransh 17108
    public void unsetUserId() {
48 ashish 17109
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17110
    }
17111
 
553 chandransh 17112
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
17113
    public boolean isSetUserId() {
48 ashish 17114
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17115
    }
17116
 
553 chandransh 17117
    public void setUserIdIsSet(boolean value) {
48 ashish 17118
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17119
    }
17120
 
17121
    public void setFieldValue(_Fields field, Object value) {
17122
      switch (field) {
553 chandransh 17123
      case USER_ID:
48 ashish 17124
        if (value == null) {
553 chandransh 17125
          unsetUserId();
48 ashish 17126
        } else {
553 chandransh 17127
          setUserId((Long)value);
48 ashish 17128
        }
17129
        break;
17130
 
17131
      }
17132
    }
17133
 
17134
    public void setFieldValue(int fieldID, Object value) {
17135
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17136
    }
17137
 
17138
    public Object getFieldValue(_Fields field) {
17139
      switch (field) {
553 chandransh 17140
      case USER_ID:
17141
        return new Long(getUserId());
48 ashish 17142
 
17143
      }
17144
      throw new IllegalStateException();
17145
    }
17146
 
17147
    public Object getFieldValue(int fieldId) {
17148
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17149
    }
17150
 
17151
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17152
    public boolean isSet(_Fields field) {
17153
      switch (field) {
553 chandransh 17154
      case USER_ID:
17155
        return isSetUserId();
48 ashish 17156
      }
17157
      throw new IllegalStateException();
17158
    }
17159
 
17160
    public boolean isSet(int fieldID) {
17161
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17162
    }
17163
 
17164
    @Override
17165
    public boolean equals(Object that) {
17166
      if (that == null)
17167
        return false;
553 chandransh 17168
      if (that instanceof createCart_args)
17169
        return this.equals((createCart_args)that);
48 ashish 17170
      return false;
17171
    }
17172
 
553 chandransh 17173
    public boolean equals(createCart_args that) {
48 ashish 17174
      if (that == null)
17175
        return false;
17176
 
553 chandransh 17177
      boolean this_present_userId = true;
17178
      boolean that_present_userId = true;
17179
      if (this_present_userId || that_present_userId) {
17180
        if (!(this_present_userId && that_present_userId))
48 ashish 17181
          return false;
553 chandransh 17182
        if (this.userId != that.userId)
48 ashish 17183
          return false;
17184
      }
17185
 
17186
      return true;
17187
    }
17188
 
17189
    @Override
17190
    public int hashCode() {
17191
      return 0;
17192
    }
17193
 
553 chandransh 17194
    public int compareTo(createCart_args other) {
48 ashish 17195
      if (!getClass().equals(other.getClass())) {
17196
        return getClass().getName().compareTo(other.getClass().getName());
17197
      }
17198
 
17199
      int lastComparison = 0;
553 chandransh 17200
      createCart_args typedOther = (createCart_args)other;
48 ashish 17201
 
553 chandransh 17202
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 17203
      if (lastComparison != 0) {
17204
        return lastComparison;
17205
      }
553 chandransh 17206
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 17207
      if (lastComparison != 0) {
17208
        return lastComparison;
17209
      }
17210
      return 0;
17211
    }
17212
 
17213
    public void read(TProtocol iprot) throws TException {
17214
      TField field;
17215
      iprot.readStructBegin();
17216
      while (true)
17217
      {
17218
        field = iprot.readFieldBegin();
17219
        if (field.type == TType.STOP) { 
17220
          break;
17221
        }
17222
        _Fields fieldId = _Fields.findByThriftId(field.id);
17223
        if (fieldId == null) {
17224
          TProtocolUtil.skip(iprot, field.type);
17225
        } else {
17226
          switch (fieldId) {
553 chandransh 17227
            case USER_ID:
48 ashish 17228
              if (field.type == TType.I64) {
553 chandransh 17229
                this.userId = iprot.readI64();
17230
                setUserIdIsSet(true);
48 ashish 17231
              } else { 
17232
                TProtocolUtil.skip(iprot, field.type);
17233
              }
17234
              break;
17235
          }
17236
          iprot.readFieldEnd();
17237
        }
17238
      }
17239
      iprot.readStructEnd();
17240
      validate();
17241
    }
17242
 
17243
    public void write(TProtocol oprot) throws TException {
17244
      validate();
17245
 
17246
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 17247
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17248
      oprot.writeI64(this.userId);
48 ashish 17249
      oprot.writeFieldEnd();
17250
      oprot.writeFieldStop();
17251
      oprot.writeStructEnd();
17252
    }
17253
 
17254
    @Override
17255
    public String toString() {
553 chandransh 17256
      StringBuilder sb = new StringBuilder("createCart_args(");
48 ashish 17257
      boolean first = true;
17258
 
553 chandransh 17259
      sb.append("userId:");
17260
      sb.append(this.userId);
48 ashish 17261
      first = false;
17262
      sb.append(")");
17263
      return sb.toString();
17264
    }
17265
 
17266
    public void validate() throws TException {
17267
      // check for required fields
17268
    }
17269
 
17270
  }
17271
 
553 chandransh 17272
  public static class createCart_result implements TBase<createCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<createCart_result>   {
17273
    private static final TStruct STRUCT_DESC = new TStruct("createCart_result");
48 ashish 17274
 
553 chandransh 17275
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
17276
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 17277
 
553 chandransh 17278
    private long success;
17279
    private ShoppingCartException scx;
48 ashish 17280
 
17281
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17282
    public enum _Fields implements TFieldIdEnum {
17283
      SUCCESS((short)0, "success"),
553 chandransh 17284
      SCX((short)1, "scx");
48 ashish 17285
 
17286
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17287
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17288
 
17289
      static {
17290
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17291
          byId.put((int)field._thriftId, field);
17292
          byName.put(field.getFieldName(), field);
17293
        }
17294
      }
17295
 
17296
      /**
17297
       * Find the _Fields constant that matches fieldId, or null if its not found.
17298
       */
17299
      public static _Fields findByThriftId(int fieldId) {
17300
        return byId.get(fieldId);
17301
      }
17302
 
17303
      /**
17304
       * Find the _Fields constant that matches fieldId, throwing an exception
17305
       * if it is not found.
17306
       */
17307
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17308
        _Fields fields = findByThriftId(fieldId);
17309
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17310
        return fields;
17311
      }
17312
 
17313
      /**
17314
       * Find the _Fields constant that matches name, or null if its not found.
17315
       */
17316
      public static _Fields findByName(String name) {
17317
        return byName.get(name);
17318
      }
17319
 
17320
      private final short _thriftId;
17321
      private final String _fieldName;
17322
 
17323
      _Fields(short thriftId, String fieldName) {
17324
        _thriftId = thriftId;
17325
        _fieldName = fieldName;
17326
      }
17327
 
17328
      public short getThriftFieldId() {
17329
        return _thriftId;
17330
      }
17331
 
17332
      public String getFieldName() {
17333
        return _fieldName;
17334
      }
17335
    }
17336
 
17337
    // isset id assignments
17338
    private static final int __SUCCESS_ISSET_ID = 0;
17339
    private BitSet __isset_bit_vector = new BitSet(1);
17340
 
17341
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17342
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 17343
          new FieldValueMetaData(TType.I64)));
17344
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 17345
          new FieldValueMetaData(TType.STRUCT)));
17346
    }});
17347
 
17348
    static {
553 chandransh 17349
      FieldMetaData.addStructMetaDataMap(createCart_result.class, metaDataMap);
48 ashish 17350
    }
17351
 
553 chandransh 17352
    public createCart_result() {
48 ashish 17353
    }
17354
 
553 chandransh 17355
    public createCart_result(
17356
      long success,
17357
      ShoppingCartException scx)
48 ashish 17358
    {
17359
      this();
17360
      this.success = success;
17361
      setSuccessIsSet(true);
553 chandransh 17362
      this.scx = scx;
48 ashish 17363
    }
17364
 
17365
    /**
17366
     * Performs a deep copy on <i>other</i>.
17367
     */
553 chandransh 17368
    public createCart_result(createCart_result other) {
48 ashish 17369
      __isset_bit_vector.clear();
17370
      __isset_bit_vector.or(other.__isset_bit_vector);
17371
      this.success = other.success;
553 chandransh 17372
      if (other.isSetScx()) {
17373
        this.scx = new ShoppingCartException(other.scx);
48 ashish 17374
      }
17375
    }
17376
 
553 chandransh 17377
    public createCart_result deepCopy() {
17378
      return new createCart_result(this);
48 ashish 17379
    }
17380
 
17381
    @Deprecated
553 chandransh 17382
    public createCart_result clone() {
17383
      return new createCart_result(this);
48 ashish 17384
    }
17385
 
553 chandransh 17386
    public long getSuccess() {
48 ashish 17387
      return this.success;
17388
    }
17389
 
553 chandransh 17390
    public createCart_result setSuccess(long success) {
48 ashish 17391
      this.success = success;
17392
      setSuccessIsSet(true);
17393
      return this;
17394
    }
17395
 
17396
    public void unsetSuccess() {
17397
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17398
    }
17399
 
17400
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17401
    public boolean isSetSuccess() {
17402
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17403
    }
17404
 
17405
    public void setSuccessIsSet(boolean value) {
17406
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17407
    }
17408
 
553 chandransh 17409
    public ShoppingCartException getScx() {
17410
      return this.scx;
48 ashish 17411
    }
17412
 
553 chandransh 17413
    public createCart_result setScx(ShoppingCartException scx) {
17414
      this.scx = scx;
48 ashish 17415
      return this;
17416
    }
17417
 
553 chandransh 17418
    public void unsetScx() {
17419
      this.scx = null;
48 ashish 17420
    }
17421
 
553 chandransh 17422
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
17423
    public boolean isSetScx() {
17424
      return this.scx != null;
48 ashish 17425
    }
17426
 
553 chandransh 17427
    public void setScxIsSet(boolean value) {
48 ashish 17428
      if (!value) {
553 chandransh 17429
        this.scx = null;
48 ashish 17430
      }
17431
    }
17432
 
17433
    public void setFieldValue(_Fields field, Object value) {
17434
      switch (field) {
17435
      case SUCCESS:
17436
        if (value == null) {
17437
          unsetSuccess();
17438
        } else {
553 chandransh 17439
          setSuccess((Long)value);
48 ashish 17440
        }
17441
        break;
17442
 
553 chandransh 17443
      case SCX:
48 ashish 17444
        if (value == null) {
553 chandransh 17445
          unsetScx();
48 ashish 17446
        } else {
553 chandransh 17447
          setScx((ShoppingCartException)value);
48 ashish 17448
        }
17449
        break;
17450
 
17451
      }
17452
    }
17453
 
17454
    public void setFieldValue(int fieldID, Object value) {
17455
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17456
    }
17457
 
17458
    public Object getFieldValue(_Fields field) {
17459
      switch (field) {
17460
      case SUCCESS:
553 chandransh 17461
        return new Long(getSuccess());
48 ashish 17462
 
553 chandransh 17463
      case SCX:
17464
        return getScx();
48 ashish 17465
 
17466
      }
17467
      throw new IllegalStateException();
17468
    }
17469
 
17470
    public Object getFieldValue(int fieldId) {
17471
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17472
    }
17473
 
17474
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17475
    public boolean isSet(_Fields field) {
17476
      switch (field) {
17477
      case SUCCESS:
17478
        return isSetSuccess();
553 chandransh 17479
      case SCX:
17480
        return isSetScx();
48 ashish 17481
      }
17482
      throw new IllegalStateException();
17483
    }
17484
 
17485
    public boolean isSet(int fieldID) {
17486
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17487
    }
17488
 
17489
    @Override
17490
    public boolean equals(Object that) {
17491
      if (that == null)
17492
        return false;
553 chandransh 17493
      if (that instanceof createCart_result)
17494
        return this.equals((createCart_result)that);
48 ashish 17495
      return false;
17496
    }
17497
 
553 chandransh 17498
    public boolean equals(createCart_result that) {
48 ashish 17499
      if (that == null)
17500
        return false;
17501
 
17502
      boolean this_present_success = true;
17503
      boolean that_present_success = true;
17504
      if (this_present_success || that_present_success) {
17505
        if (!(this_present_success && that_present_success))
17506
          return false;
17507
        if (this.success != that.success)
17508
          return false;
17509
      }
17510
 
553 chandransh 17511
      boolean this_present_scx = true && this.isSetScx();
17512
      boolean that_present_scx = true && that.isSetScx();
17513
      if (this_present_scx || that_present_scx) {
17514
        if (!(this_present_scx && that_present_scx))
48 ashish 17515
          return false;
553 chandransh 17516
        if (!this.scx.equals(that.scx))
48 ashish 17517
          return false;
17518
      }
17519
 
17520
      return true;
17521
    }
17522
 
17523
    @Override
17524
    public int hashCode() {
17525
      return 0;
17526
    }
17527
 
553 chandransh 17528
    public int compareTo(createCart_result other) {
48 ashish 17529
      if (!getClass().equals(other.getClass())) {
17530
        return getClass().getName().compareTo(other.getClass().getName());
17531
      }
17532
 
17533
      int lastComparison = 0;
553 chandransh 17534
      createCart_result typedOther = (createCart_result)other;
48 ashish 17535
 
17536
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17537
      if (lastComparison != 0) {
17538
        return lastComparison;
17539
      }
17540
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17541
      if (lastComparison != 0) {
17542
        return lastComparison;
17543
      }
553 chandransh 17544
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 17545
      if (lastComparison != 0) {
17546
        return lastComparison;
17547
      }
553 chandransh 17548
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 17549
      if (lastComparison != 0) {
17550
        return lastComparison;
17551
      }
17552
      return 0;
17553
    }
17554
 
17555
    public void read(TProtocol iprot) throws TException {
17556
      TField field;
17557
      iprot.readStructBegin();
17558
      while (true)
17559
      {
17560
        field = iprot.readFieldBegin();
17561
        if (field.type == TType.STOP) { 
17562
          break;
17563
        }
17564
        _Fields fieldId = _Fields.findByThriftId(field.id);
17565
        if (fieldId == null) {
17566
          TProtocolUtil.skip(iprot, field.type);
17567
        } else {
17568
          switch (fieldId) {
17569
            case SUCCESS:
553 chandransh 17570
              if (field.type == TType.I64) {
17571
                this.success = iprot.readI64();
48 ashish 17572
                setSuccessIsSet(true);
17573
              } else { 
17574
                TProtocolUtil.skip(iprot, field.type);
17575
              }
17576
              break;
553 chandransh 17577
            case SCX:
48 ashish 17578
              if (field.type == TType.STRUCT) {
553 chandransh 17579
                this.scx = new ShoppingCartException();
17580
                this.scx.read(iprot);
48 ashish 17581
              } else { 
17582
                TProtocolUtil.skip(iprot, field.type);
17583
              }
17584
              break;
17585
          }
17586
          iprot.readFieldEnd();
17587
        }
17588
      }
17589
      iprot.readStructEnd();
17590
      validate();
17591
    }
17592
 
17593
    public void write(TProtocol oprot) throws TException {
17594
      oprot.writeStructBegin(STRUCT_DESC);
17595
 
17596
      if (this.isSetSuccess()) {
17597
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 17598
        oprot.writeI64(this.success);
48 ashish 17599
        oprot.writeFieldEnd();
553 chandransh 17600
      } else if (this.isSetScx()) {
17601
        oprot.writeFieldBegin(SCX_FIELD_DESC);
17602
        this.scx.write(oprot);
48 ashish 17603
        oprot.writeFieldEnd();
17604
      }
17605
      oprot.writeFieldStop();
17606
      oprot.writeStructEnd();
17607
    }
17608
 
17609
    @Override
17610
    public String toString() {
553 chandransh 17611
      StringBuilder sb = new StringBuilder("createCart_result(");
48 ashish 17612
      boolean first = true;
17613
 
17614
      sb.append("success:");
17615
      sb.append(this.success);
17616
      first = false;
17617
      if (!first) sb.append(", ");
553 chandransh 17618
      sb.append("scx:");
17619
      if (this.scx == null) {
48 ashish 17620
        sb.append("null");
17621
      } else {
553 chandransh 17622
        sb.append(this.scx);
48 ashish 17623
      }
17624
      first = false;
17625
      sb.append(")");
17626
      return sb.toString();
17627
    }
17628
 
17629
    public void validate() throws TException {
17630
      // check for required fields
17631
    }
17632
 
17633
  }
17634
 
553 chandransh 17635
  public static class getCurrentCart_args implements TBase<getCurrentCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_args>   {
17636
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_args");
506 rajveer 17637
 
553 chandransh 17638
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
506 rajveer 17639
 
553 chandransh 17640
    private long userId;
506 rajveer 17641
 
17642
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17643
    public enum _Fields implements TFieldIdEnum {
553 chandransh 17644
      USER_ID((short)1, "userId");
506 rajveer 17645
 
17646
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17647
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17648
 
17649
      static {
17650
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17651
          byId.put((int)field._thriftId, field);
17652
          byName.put(field.getFieldName(), field);
17653
        }
17654
      }
17655
 
17656
      /**
17657
       * Find the _Fields constant that matches fieldId, or null if its not found.
17658
       */
17659
      public static _Fields findByThriftId(int fieldId) {
17660
        return byId.get(fieldId);
17661
      }
17662
 
17663
      /**
17664
       * Find the _Fields constant that matches fieldId, throwing an exception
17665
       * if it is not found.
17666
       */
17667
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17668
        _Fields fields = findByThriftId(fieldId);
17669
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17670
        return fields;
17671
      }
17672
 
17673
      /**
17674
       * Find the _Fields constant that matches name, or null if its not found.
17675
       */
17676
      public static _Fields findByName(String name) {
17677
        return byName.get(name);
17678
      }
17679
 
17680
      private final short _thriftId;
17681
      private final String _fieldName;
17682
 
17683
      _Fields(short thriftId, String fieldName) {
17684
        _thriftId = thriftId;
17685
        _fieldName = fieldName;
17686
      }
17687
 
17688
      public short getThriftFieldId() {
17689
        return _thriftId;
17690
      }
17691
 
17692
      public String getFieldName() {
17693
        return _fieldName;
17694
      }
17695
    }
17696
 
17697
    // isset id assignments
17698
    private static final int __USERID_ISSET_ID = 0;
553 chandransh 17699
    private BitSet __isset_bit_vector = new BitSet(1);
506 rajveer 17700
 
17701
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 17702
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
506 rajveer 17703
          new FieldValueMetaData(TType.I64)));
17704
    }});
17705
 
17706
    static {
553 chandransh 17707
      FieldMetaData.addStructMetaDataMap(getCurrentCart_args.class, metaDataMap);
506 rajveer 17708
    }
17709
 
553 chandransh 17710
    public getCurrentCart_args() {
506 rajveer 17711
    }
17712
 
553 chandransh 17713
    public getCurrentCart_args(
17714
      long userId)
506 rajveer 17715
    {
17716
      this();
553 chandransh 17717
      this.userId = userId;
17718
      setUserIdIsSet(true);
506 rajveer 17719
    }
17720
 
17721
    /**
17722
     * Performs a deep copy on <i>other</i>.
17723
     */
553 chandransh 17724
    public getCurrentCart_args(getCurrentCart_args other) {
506 rajveer 17725
      __isset_bit_vector.clear();
17726
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 17727
      this.userId = other.userId;
506 rajveer 17728
    }
17729
 
553 chandransh 17730
    public getCurrentCart_args deepCopy() {
17731
      return new getCurrentCart_args(this);
506 rajveer 17732
    }
17733
 
17734
    @Deprecated
553 chandransh 17735
    public getCurrentCart_args clone() {
17736
      return new getCurrentCart_args(this);
506 rajveer 17737
    }
17738
 
553 chandransh 17739
    public long getUserId() {
17740
      return this.userId;
506 rajveer 17741
    }
17742
 
553 chandransh 17743
    public getCurrentCart_args setUserId(long userId) {
17744
      this.userId = userId;
17745
      setUserIdIsSet(true);
506 rajveer 17746
      return this;
17747
    }
17748
 
553 chandransh 17749
    public void unsetUserId() {
506 rajveer 17750
      __isset_bit_vector.clear(__USERID_ISSET_ID);
17751
    }
17752
 
553 chandransh 17753
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
17754
    public boolean isSetUserId() {
506 rajveer 17755
      return __isset_bit_vector.get(__USERID_ISSET_ID);
17756
    }
17757
 
553 chandransh 17758
    public void setUserIdIsSet(boolean value) {
506 rajveer 17759
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
17760
    }
17761
 
553 chandransh 17762
    public void setFieldValue(_Fields field, Object value) {
17763
      switch (field) {
17764
      case USER_ID:
17765
        if (value == null) {
17766
          unsetUserId();
17767
        } else {
17768
          setUserId((Long)value);
17769
        }
17770
        break;
17771
 
17772
      }
506 rajveer 17773
    }
17774
 
553 chandransh 17775
    public void setFieldValue(int fieldID, Object value) {
17776
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17777
    }
17778
 
17779
    public Object getFieldValue(_Fields field) {
17780
      switch (field) {
17781
      case USER_ID:
17782
        return new Long(getUserId());
17783
 
17784
      }
17785
      throw new IllegalStateException();
17786
    }
17787
 
17788
    public Object getFieldValue(int fieldId) {
17789
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17790
    }
17791
 
17792
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17793
    public boolean isSet(_Fields field) {
17794
      switch (field) {
17795
      case USER_ID:
17796
        return isSetUserId();
17797
      }
17798
      throw new IllegalStateException();
17799
    }
17800
 
17801
    public boolean isSet(int fieldID) {
17802
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17803
    }
17804
 
17805
    @Override
17806
    public boolean equals(Object that) {
17807
      if (that == null)
17808
        return false;
17809
      if (that instanceof getCurrentCart_args)
17810
        return this.equals((getCurrentCart_args)that);
17811
      return false;
17812
    }
17813
 
17814
    public boolean equals(getCurrentCart_args that) {
17815
      if (that == null)
17816
        return false;
17817
 
17818
      boolean this_present_userId = true;
17819
      boolean that_present_userId = true;
17820
      if (this_present_userId || that_present_userId) {
17821
        if (!(this_present_userId && that_present_userId))
17822
          return false;
17823
        if (this.userId != that.userId)
17824
          return false;
17825
      }
17826
 
17827
      return true;
17828
    }
17829
 
17830
    @Override
17831
    public int hashCode() {
17832
      return 0;
17833
    }
17834
 
17835
    public int compareTo(getCurrentCart_args other) {
17836
      if (!getClass().equals(other.getClass())) {
17837
        return getClass().getName().compareTo(other.getClass().getName());
17838
      }
17839
 
17840
      int lastComparison = 0;
17841
      getCurrentCart_args typedOther = (getCurrentCart_args)other;
17842
 
17843
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
17844
      if (lastComparison != 0) {
17845
        return lastComparison;
17846
      }
17847
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
17848
      if (lastComparison != 0) {
17849
        return lastComparison;
17850
      }
17851
      return 0;
17852
    }
17853
 
17854
    public void read(TProtocol iprot) throws TException {
17855
      TField field;
17856
      iprot.readStructBegin();
17857
      while (true)
17858
      {
17859
        field = iprot.readFieldBegin();
17860
        if (field.type == TType.STOP) { 
17861
          break;
17862
        }
17863
        _Fields fieldId = _Fields.findByThriftId(field.id);
17864
        if (fieldId == null) {
17865
          TProtocolUtil.skip(iprot, field.type);
17866
        } else {
17867
          switch (fieldId) {
17868
            case USER_ID:
17869
              if (field.type == TType.I64) {
17870
                this.userId = iprot.readI64();
17871
                setUserIdIsSet(true);
17872
              } else { 
17873
                TProtocolUtil.skip(iprot, field.type);
17874
              }
17875
              break;
17876
          }
17877
          iprot.readFieldEnd();
17878
        }
17879
      }
17880
      iprot.readStructEnd();
17881
      validate();
17882
    }
17883
 
17884
    public void write(TProtocol oprot) throws TException {
17885
      validate();
17886
 
17887
      oprot.writeStructBegin(STRUCT_DESC);
17888
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
17889
      oprot.writeI64(this.userId);
17890
      oprot.writeFieldEnd();
17891
      oprot.writeFieldStop();
17892
      oprot.writeStructEnd();
17893
    }
17894
 
17895
    @Override
17896
    public String toString() {
17897
      StringBuilder sb = new StringBuilder("getCurrentCart_args(");
17898
      boolean first = true;
17899
 
17900
      sb.append("userId:");
17901
      sb.append(this.userId);
17902
      first = false;
17903
      sb.append(")");
17904
      return sb.toString();
17905
    }
17906
 
17907
    public void validate() throws TException {
17908
      // check for required fields
17909
    }
17910
 
17911
  }
17912
 
17913
  public static class getCurrentCart_result implements TBase<getCurrentCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCurrentCart_result>   {
17914
    private static final TStruct STRUCT_DESC = new TStruct("getCurrentCart_result");
17915
 
17916
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
17917
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
17918
 
17919
    private Cart success;
17920
    private ShoppingCartException scx;
17921
 
17922
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17923
    public enum _Fields implements TFieldIdEnum {
17924
      SUCCESS((short)0, "success"),
17925
      SCX((short)1, "scx");
17926
 
17927
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17928
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17929
 
17930
      static {
17931
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17932
          byId.put((int)field._thriftId, field);
17933
          byName.put(field.getFieldName(), field);
17934
        }
17935
      }
17936
 
17937
      /**
17938
       * Find the _Fields constant that matches fieldId, or null if its not found.
17939
       */
17940
      public static _Fields findByThriftId(int fieldId) {
17941
        return byId.get(fieldId);
17942
      }
17943
 
17944
      /**
17945
       * Find the _Fields constant that matches fieldId, throwing an exception
17946
       * if it is not found.
17947
       */
17948
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17949
        _Fields fields = findByThriftId(fieldId);
17950
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17951
        return fields;
17952
      }
17953
 
17954
      /**
17955
       * Find the _Fields constant that matches name, or null if its not found.
17956
       */
17957
      public static _Fields findByName(String name) {
17958
        return byName.get(name);
17959
      }
17960
 
17961
      private final short _thriftId;
17962
      private final String _fieldName;
17963
 
17964
      _Fields(short thriftId, String fieldName) {
17965
        _thriftId = thriftId;
17966
        _fieldName = fieldName;
17967
      }
17968
 
17969
      public short getThriftFieldId() {
17970
        return _thriftId;
17971
      }
17972
 
17973
      public String getFieldName() {
17974
        return _fieldName;
17975
      }
17976
    }
17977
 
17978
    // isset id assignments
17979
 
17980
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17981
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
17982
          new StructMetaData(TType.STRUCT, Cart.class)));
17983
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
17984
          new FieldValueMetaData(TType.STRUCT)));
17985
    }});
17986
 
17987
    static {
17988
      FieldMetaData.addStructMetaDataMap(getCurrentCart_result.class, metaDataMap);
17989
    }
17990
 
17991
    public getCurrentCart_result() {
17992
    }
17993
 
17994
    public getCurrentCart_result(
17995
      Cart success,
17996
      ShoppingCartException scx)
17997
    {
17998
      this();
17999
      this.success = success;
18000
      this.scx = scx;
18001
    }
18002
 
18003
    /**
18004
     * Performs a deep copy on <i>other</i>.
18005
     */
18006
    public getCurrentCart_result(getCurrentCart_result other) {
18007
      if (other.isSetSuccess()) {
18008
        this.success = new Cart(other.success);
18009
      }
18010
      if (other.isSetScx()) {
18011
        this.scx = new ShoppingCartException(other.scx);
18012
      }
18013
    }
18014
 
18015
    public getCurrentCart_result deepCopy() {
18016
      return new getCurrentCart_result(this);
18017
    }
18018
 
18019
    @Deprecated
18020
    public getCurrentCart_result clone() {
18021
      return new getCurrentCart_result(this);
18022
    }
18023
 
18024
    public Cart getSuccess() {
18025
      return this.success;
18026
    }
18027
 
18028
    public getCurrentCart_result setSuccess(Cart success) {
18029
      this.success = success;
506 rajveer 18030
      return this;
18031
    }
18032
 
553 chandransh 18033
    public void unsetSuccess() {
18034
      this.success = null;
506 rajveer 18035
    }
18036
 
553 chandransh 18037
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18038
    public boolean isSetSuccess() {
18039
      return this.success != null;
506 rajveer 18040
    }
18041
 
553 chandransh 18042
    public void setSuccessIsSet(boolean value) {
18043
      if (!value) {
18044
        this.success = null;
18045
      }
506 rajveer 18046
    }
18047
 
553 chandransh 18048
    public ShoppingCartException getScx() {
18049
      return this.scx;
18050
    }
18051
 
18052
    public getCurrentCart_result setScx(ShoppingCartException scx) {
18053
      this.scx = scx;
18054
      return this;
18055
    }
18056
 
18057
    public void unsetScx() {
18058
      this.scx = null;
18059
    }
18060
 
18061
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18062
    public boolean isSetScx() {
18063
      return this.scx != null;
18064
    }
18065
 
18066
    public void setScxIsSet(boolean value) {
18067
      if (!value) {
18068
        this.scx = null;
18069
      }
18070
    }
18071
 
506 rajveer 18072
    public void setFieldValue(_Fields field, Object value) {
18073
      switch (field) {
553 chandransh 18074
      case SUCCESS:
506 rajveer 18075
        if (value == null) {
553 chandransh 18076
          unsetSuccess();
506 rajveer 18077
        } else {
553 chandransh 18078
          setSuccess((Cart)value);
506 rajveer 18079
        }
18080
        break;
18081
 
553 chandransh 18082
      case SCX:
506 rajveer 18083
        if (value == null) {
553 chandransh 18084
          unsetScx();
506 rajveer 18085
        } else {
553 chandransh 18086
          setScx((ShoppingCartException)value);
506 rajveer 18087
        }
18088
        break;
18089
 
18090
      }
18091
    }
18092
 
18093
    public void setFieldValue(int fieldID, Object value) {
18094
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18095
    }
18096
 
18097
    public Object getFieldValue(_Fields field) {
18098
      switch (field) {
553 chandransh 18099
      case SUCCESS:
18100
        return getSuccess();
506 rajveer 18101
 
553 chandransh 18102
      case SCX:
18103
        return getScx();
506 rajveer 18104
 
18105
      }
18106
      throw new IllegalStateException();
18107
    }
18108
 
18109
    public Object getFieldValue(int fieldId) {
18110
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18111
    }
18112
 
18113
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18114
    public boolean isSet(_Fields field) {
18115
      switch (field) {
553 chandransh 18116
      case SUCCESS:
18117
        return isSetSuccess();
18118
      case SCX:
18119
        return isSetScx();
506 rajveer 18120
      }
18121
      throw new IllegalStateException();
18122
    }
18123
 
18124
    public boolean isSet(int fieldID) {
18125
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18126
    }
18127
 
18128
    @Override
18129
    public boolean equals(Object that) {
18130
      if (that == null)
18131
        return false;
553 chandransh 18132
      if (that instanceof getCurrentCart_result)
18133
        return this.equals((getCurrentCart_result)that);
506 rajveer 18134
      return false;
18135
    }
18136
 
553 chandransh 18137
    public boolean equals(getCurrentCart_result that) {
506 rajveer 18138
      if (that == null)
18139
        return false;
18140
 
553 chandransh 18141
      boolean this_present_success = true && this.isSetSuccess();
18142
      boolean that_present_success = true && that.isSetSuccess();
18143
      if (this_present_success || that_present_success) {
18144
        if (!(this_present_success && that_present_success))
506 rajveer 18145
          return false;
553 chandransh 18146
        if (!this.success.equals(that.success))
506 rajveer 18147
          return false;
18148
      }
18149
 
553 chandransh 18150
      boolean this_present_scx = true && this.isSetScx();
18151
      boolean that_present_scx = true && that.isSetScx();
18152
      if (this_present_scx || that_present_scx) {
18153
        if (!(this_present_scx && that_present_scx))
506 rajveer 18154
          return false;
553 chandransh 18155
        if (!this.scx.equals(that.scx))
506 rajveer 18156
          return false;
18157
      }
18158
 
18159
      return true;
18160
    }
18161
 
18162
    @Override
18163
    public int hashCode() {
18164
      return 0;
18165
    }
18166
 
553 chandransh 18167
    public int compareTo(getCurrentCart_result other) {
506 rajveer 18168
      if (!getClass().equals(other.getClass())) {
18169
        return getClass().getName().compareTo(other.getClass().getName());
18170
      }
18171
 
18172
      int lastComparison = 0;
553 chandransh 18173
      getCurrentCart_result typedOther = (getCurrentCart_result)other;
506 rajveer 18174
 
553 chandransh 18175
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
506 rajveer 18176
      if (lastComparison != 0) {
18177
        return lastComparison;
18178
      }
553 chandransh 18179
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
506 rajveer 18180
      if (lastComparison != 0) {
18181
        return lastComparison;
18182
      }
553 chandransh 18183
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 18184
      if (lastComparison != 0) {
18185
        return lastComparison;
18186
      }
553 chandransh 18187
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 18188
      if (lastComparison != 0) {
18189
        return lastComparison;
18190
      }
18191
      return 0;
18192
    }
18193
 
18194
    public void read(TProtocol iprot) throws TException {
18195
      TField field;
18196
      iprot.readStructBegin();
18197
      while (true)
18198
      {
18199
        field = iprot.readFieldBegin();
18200
        if (field.type == TType.STOP) { 
18201
          break;
18202
        }
18203
        _Fields fieldId = _Fields.findByThriftId(field.id);
18204
        if (fieldId == null) {
18205
          TProtocolUtil.skip(iprot, field.type);
18206
        } else {
18207
          switch (fieldId) {
553 chandransh 18208
            case SUCCESS:
18209
              if (field.type == TType.STRUCT) {
18210
                this.success = new Cart();
18211
                this.success.read(iprot);
506 rajveer 18212
              } else { 
18213
                TProtocolUtil.skip(iprot, field.type);
18214
              }
18215
              break;
553 chandransh 18216
            case SCX:
18217
              if (field.type == TType.STRUCT) {
18218
                this.scx = new ShoppingCartException();
18219
                this.scx.read(iprot);
18220
              } else { 
18221
                TProtocolUtil.skip(iprot, field.type);
18222
              }
18223
              break;
18224
          }
18225
          iprot.readFieldEnd();
18226
        }
18227
      }
18228
      iprot.readStructEnd();
18229
      validate();
18230
    }
18231
 
18232
    public void write(TProtocol oprot) throws TException {
18233
      oprot.writeStructBegin(STRUCT_DESC);
18234
 
18235
      if (this.isSetSuccess()) {
18236
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
18237
        this.success.write(oprot);
18238
        oprot.writeFieldEnd();
18239
      } else if (this.isSetScx()) {
18240
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18241
        this.scx.write(oprot);
18242
        oprot.writeFieldEnd();
18243
      }
18244
      oprot.writeFieldStop();
18245
      oprot.writeStructEnd();
18246
    }
18247
 
18248
    @Override
18249
    public String toString() {
18250
      StringBuilder sb = new StringBuilder("getCurrentCart_result(");
18251
      boolean first = true;
18252
 
18253
      sb.append("success:");
18254
      if (this.success == null) {
18255
        sb.append("null");
18256
      } else {
18257
        sb.append(this.success);
18258
      }
18259
      first = false;
18260
      if (!first) sb.append(", ");
18261
      sb.append("scx:");
18262
      if (this.scx == null) {
18263
        sb.append("null");
18264
      } else {
18265
        sb.append(this.scx);
18266
      }
18267
      first = false;
18268
      sb.append(")");
18269
      return sb.toString();
18270
    }
18271
 
18272
    public void validate() throws TException {
18273
      // check for required fields
18274
    }
18275
 
18276
  }
18277
 
18278
  public static class getCart_args implements TBase<getCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_args>   {
18279
    private static final TStruct STRUCT_DESC = new TStruct("getCart_args");
18280
 
18281
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
18282
 
18283
    private long cartId;
18284
 
18285
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18286
    public enum _Fields implements TFieldIdEnum {
18287
      CART_ID((short)1, "cartId");
18288
 
18289
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18290
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18291
 
18292
      static {
18293
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18294
          byId.put((int)field._thriftId, field);
18295
          byName.put(field.getFieldName(), field);
18296
        }
18297
      }
18298
 
18299
      /**
18300
       * Find the _Fields constant that matches fieldId, or null if its not found.
18301
       */
18302
      public static _Fields findByThriftId(int fieldId) {
18303
        return byId.get(fieldId);
18304
      }
18305
 
18306
      /**
18307
       * Find the _Fields constant that matches fieldId, throwing an exception
18308
       * if it is not found.
18309
       */
18310
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18311
        _Fields fields = findByThriftId(fieldId);
18312
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18313
        return fields;
18314
      }
18315
 
18316
      /**
18317
       * Find the _Fields constant that matches name, or null if its not found.
18318
       */
18319
      public static _Fields findByName(String name) {
18320
        return byName.get(name);
18321
      }
18322
 
18323
      private final short _thriftId;
18324
      private final String _fieldName;
18325
 
18326
      _Fields(short thriftId, String fieldName) {
18327
        _thriftId = thriftId;
18328
        _fieldName = fieldName;
18329
      }
18330
 
18331
      public short getThriftFieldId() {
18332
        return _thriftId;
18333
      }
18334
 
18335
      public String getFieldName() {
18336
        return _fieldName;
18337
      }
18338
    }
18339
 
18340
    // isset id assignments
18341
    private static final int __CARTID_ISSET_ID = 0;
18342
    private BitSet __isset_bit_vector = new BitSet(1);
18343
 
18344
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18345
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
18346
          new FieldValueMetaData(TType.I64)));
18347
    }});
18348
 
18349
    static {
18350
      FieldMetaData.addStructMetaDataMap(getCart_args.class, metaDataMap);
18351
    }
18352
 
18353
    public getCart_args() {
18354
    }
18355
 
18356
    public getCart_args(
18357
      long cartId)
18358
    {
18359
      this();
18360
      this.cartId = cartId;
18361
      setCartIdIsSet(true);
18362
    }
18363
 
18364
    /**
18365
     * Performs a deep copy on <i>other</i>.
18366
     */
18367
    public getCart_args(getCart_args other) {
18368
      __isset_bit_vector.clear();
18369
      __isset_bit_vector.or(other.__isset_bit_vector);
18370
      this.cartId = other.cartId;
18371
    }
18372
 
18373
    public getCart_args deepCopy() {
18374
      return new getCart_args(this);
18375
    }
18376
 
18377
    @Deprecated
18378
    public getCart_args clone() {
18379
      return new getCart_args(this);
18380
    }
18381
 
18382
    public long getCartId() {
18383
      return this.cartId;
18384
    }
18385
 
18386
    public getCart_args setCartId(long cartId) {
18387
      this.cartId = cartId;
18388
      setCartIdIsSet(true);
18389
      return this;
18390
    }
18391
 
18392
    public void unsetCartId() {
18393
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
18394
    }
18395
 
18396
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
18397
    public boolean isSetCartId() {
18398
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
18399
    }
18400
 
18401
    public void setCartIdIsSet(boolean value) {
18402
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
18403
    }
18404
 
18405
    public void setFieldValue(_Fields field, Object value) {
18406
      switch (field) {
18407
      case CART_ID:
18408
        if (value == null) {
18409
          unsetCartId();
18410
        } else {
18411
          setCartId((Long)value);
18412
        }
18413
        break;
18414
 
18415
      }
18416
    }
18417
 
18418
    public void setFieldValue(int fieldID, Object value) {
18419
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18420
    }
18421
 
18422
    public Object getFieldValue(_Fields field) {
18423
      switch (field) {
18424
      case CART_ID:
18425
        return new Long(getCartId());
18426
 
18427
      }
18428
      throw new IllegalStateException();
18429
    }
18430
 
18431
    public Object getFieldValue(int fieldId) {
18432
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18433
    }
18434
 
18435
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18436
    public boolean isSet(_Fields field) {
18437
      switch (field) {
18438
      case CART_ID:
18439
        return isSetCartId();
18440
      }
18441
      throw new IllegalStateException();
18442
    }
18443
 
18444
    public boolean isSet(int fieldID) {
18445
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18446
    }
18447
 
18448
    @Override
18449
    public boolean equals(Object that) {
18450
      if (that == null)
18451
        return false;
18452
      if (that instanceof getCart_args)
18453
        return this.equals((getCart_args)that);
18454
      return false;
18455
    }
18456
 
18457
    public boolean equals(getCart_args that) {
18458
      if (that == null)
18459
        return false;
18460
 
18461
      boolean this_present_cartId = true;
18462
      boolean that_present_cartId = true;
18463
      if (this_present_cartId || that_present_cartId) {
18464
        if (!(this_present_cartId && that_present_cartId))
18465
          return false;
18466
        if (this.cartId != that.cartId)
18467
          return false;
18468
      }
18469
 
18470
      return true;
18471
    }
18472
 
18473
    @Override
18474
    public int hashCode() {
18475
      return 0;
18476
    }
18477
 
18478
    public int compareTo(getCart_args other) {
18479
      if (!getClass().equals(other.getClass())) {
18480
        return getClass().getName().compareTo(other.getClass().getName());
18481
      }
18482
 
18483
      int lastComparison = 0;
18484
      getCart_args typedOther = (getCart_args)other;
18485
 
18486
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
18487
      if (lastComparison != 0) {
18488
        return lastComparison;
18489
      }
18490
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
18491
      if (lastComparison != 0) {
18492
        return lastComparison;
18493
      }
18494
      return 0;
18495
    }
18496
 
18497
    public void read(TProtocol iprot) throws TException {
18498
      TField field;
18499
      iprot.readStructBegin();
18500
      while (true)
18501
      {
18502
        field = iprot.readFieldBegin();
18503
        if (field.type == TType.STOP) { 
18504
          break;
18505
        }
18506
        _Fields fieldId = _Fields.findByThriftId(field.id);
18507
        if (fieldId == null) {
18508
          TProtocolUtil.skip(iprot, field.type);
18509
        } else {
18510
          switch (fieldId) {
18511
            case CART_ID:
506 rajveer 18512
              if (field.type == TType.I64) {
553 chandransh 18513
                this.cartId = iprot.readI64();
18514
                setCartIdIsSet(true);
506 rajveer 18515
              } else { 
18516
                TProtocolUtil.skip(iprot, field.type);
18517
              }
18518
              break;
18519
          }
18520
          iprot.readFieldEnd();
18521
        }
18522
      }
18523
      iprot.readStructEnd();
18524
      validate();
18525
    }
18526
 
18527
    public void write(TProtocol oprot) throws TException {
18528
      validate();
18529
 
18530
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 18531
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
18532
      oprot.writeI64(this.cartId);
506 rajveer 18533
      oprot.writeFieldEnd();
18534
      oprot.writeFieldStop();
18535
      oprot.writeStructEnd();
18536
    }
18537
 
18538
    @Override
18539
    public String toString() {
553 chandransh 18540
      StringBuilder sb = new StringBuilder("getCart_args(");
506 rajveer 18541
      boolean first = true;
18542
 
553 chandransh 18543
      sb.append("cartId:");
18544
      sb.append(this.cartId);
506 rajveer 18545
      first = false;
18546
      sb.append(")");
18547
      return sb.toString();
18548
    }
18549
 
18550
    public void validate() throws TException {
18551
      // check for required fields
18552
    }
18553
 
18554
  }
18555
 
553 chandransh 18556
  public static class getCart_result implements TBase<getCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCart_result>   {
18557
    private static final TStruct STRUCT_DESC = new TStruct("getCart_result");
506 rajveer 18558
 
553 chandransh 18559
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
18560
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
506 rajveer 18561
 
553 chandransh 18562
    private Cart success;
18563
    private ShoppingCartException scx;
506 rajveer 18564
 
18565
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18566
    public enum _Fields implements TFieldIdEnum {
18567
      SUCCESS((short)0, "success"),
553 chandransh 18568
      SCX((short)1, "scx");
506 rajveer 18569
 
18570
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18571
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18572
 
18573
      static {
18574
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18575
          byId.put((int)field._thriftId, field);
18576
          byName.put(field.getFieldName(), field);
18577
        }
18578
      }
18579
 
18580
      /**
18581
       * Find the _Fields constant that matches fieldId, or null if its not found.
18582
       */
18583
      public static _Fields findByThriftId(int fieldId) {
18584
        return byId.get(fieldId);
18585
      }
18586
 
18587
      /**
18588
       * Find the _Fields constant that matches fieldId, throwing an exception
18589
       * if it is not found.
18590
       */
18591
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18592
        _Fields fields = findByThriftId(fieldId);
18593
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18594
        return fields;
18595
      }
18596
 
18597
      /**
18598
       * Find the _Fields constant that matches name, or null if its not found.
18599
       */
18600
      public static _Fields findByName(String name) {
18601
        return byName.get(name);
18602
      }
18603
 
18604
      private final short _thriftId;
18605
      private final String _fieldName;
18606
 
18607
      _Fields(short thriftId, String fieldName) {
18608
        _thriftId = thriftId;
18609
        _fieldName = fieldName;
18610
      }
18611
 
18612
      public short getThriftFieldId() {
18613
        return _thriftId;
18614
      }
18615
 
18616
      public String getFieldName() {
18617
        return _fieldName;
18618
      }
18619
    }
18620
 
18621
    // isset id assignments
18622
 
18623
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18624
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 18625
          new StructMetaData(TType.STRUCT, Cart.class)));
18626
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
506 rajveer 18627
          new FieldValueMetaData(TType.STRUCT)));
18628
    }});
18629
 
18630
    static {
553 chandransh 18631
      FieldMetaData.addStructMetaDataMap(getCart_result.class, metaDataMap);
506 rajveer 18632
    }
18633
 
553 chandransh 18634
    public getCart_result() {
506 rajveer 18635
    }
18636
 
553 chandransh 18637
    public getCart_result(
18638
      Cart success,
18639
      ShoppingCartException scx)
506 rajveer 18640
    {
18641
      this();
18642
      this.success = success;
553 chandransh 18643
      this.scx = scx;
506 rajveer 18644
    }
18645
 
18646
    /**
18647
     * Performs a deep copy on <i>other</i>.
18648
     */
553 chandransh 18649
    public getCart_result(getCart_result other) {
18650
      if (other.isSetSuccess()) {
18651
        this.success = new Cart(other.success);
506 rajveer 18652
      }
553 chandransh 18653
      if (other.isSetScx()) {
18654
        this.scx = new ShoppingCartException(other.scx);
18655
      }
506 rajveer 18656
    }
18657
 
553 chandransh 18658
    public getCart_result deepCopy() {
18659
      return new getCart_result(this);
506 rajveer 18660
    }
18661
 
18662
    @Deprecated
553 chandransh 18663
    public getCart_result clone() {
18664
      return new getCart_result(this);
506 rajveer 18665
    }
18666
 
553 chandransh 18667
    public Cart getSuccess() {
506 rajveer 18668
      return this.success;
18669
    }
18670
 
553 chandransh 18671
    public getCart_result setSuccess(Cart success) {
506 rajveer 18672
      this.success = success;
18673
      return this;
18674
    }
18675
 
18676
    public void unsetSuccess() {
553 chandransh 18677
      this.success = null;
506 rajveer 18678
    }
18679
 
18680
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18681
    public boolean isSetSuccess() {
553 chandransh 18682
      return this.success != null;
506 rajveer 18683
    }
18684
 
18685
    public void setSuccessIsSet(boolean value) {
553 chandransh 18686
      if (!value) {
18687
        this.success = null;
18688
      }
506 rajveer 18689
    }
18690
 
553 chandransh 18691
    public ShoppingCartException getScx() {
18692
      return this.scx;
506 rajveer 18693
    }
18694
 
553 chandransh 18695
    public getCart_result setScx(ShoppingCartException scx) {
18696
      this.scx = scx;
506 rajveer 18697
      return this;
18698
    }
18699
 
553 chandransh 18700
    public void unsetScx() {
18701
      this.scx = null;
506 rajveer 18702
    }
18703
 
553 chandransh 18704
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
18705
    public boolean isSetScx() {
18706
      return this.scx != null;
506 rajveer 18707
    }
18708
 
553 chandransh 18709
    public void setScxIsSet(boolean value) {
506 rajveer 18710
      if (!value) {
553 chandransh 18711
        this.scx = null;
506 rajveer 18712
      }
18713
    }
18714
 
18715
    public void setFieldValue(_Fields field, Object value) {
18716
      switch (field) {
18717
      case SUCCESS:
18718
        if (value == null) {
18719
          unsetSuccess();
18720
        } else {
553 chandransh 18721
          setSuccess((Cart)value);
506 rajveer 18722
        }
18723
        break;
18724
 
553 chandransh 18725
      case SCX:
506 rajveer 18726
        if (value == null) {
553 chandransh 18727
          unsetScx();
506 rajveer 18728
        } else {
553 chandransh 18729
          setScx((ShoppingCartException)value);
506 rajveer 18730
        }
18731
        break;
18732
 
18733
      }
18734
    }
18735
 
18736
    public void setFieldValue(int fieldID, Object value) {
18737
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18738
    }
18739
 
18740
    public Object getFieldValue(_Fields field) {
18741
      switch (field) {
18742
      case SUCCESS:
553 chandransh 18743
        return getSuccess();
506 rajveer 18744
 
553 chandransh 18745
      case SCX:
18746
        return getScx();
506 rajveer 18747
 
18748
      }
18749
      throw new IllegalStateException();
18750
    }
18751
 
18752
    public Object getFieldValue(int fieldId) {
18753
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18754
    }
18755
 
18756
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18757
    public boolean isSet(_Fields field) {
18758
      switch (field) {
18759
      case SUCCESS:
18760
        return isSetSuccess();
553 chandransh 18761
      case SCX:
18762
        return isSetScx();
506 rajveer 18763
      }
18764
      throw new IllegalStateException();
18765
    }
18766
 
18767
    public boolean isSet(int fieldID) {
18768
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18769
    }
18770
 
18771
    @Override
18772
    public boolean equals(Object that) {
18773
      if (that == null)
18774
        return false;
553 chandransh 18775
      if (that instanceof getCart_result)
18776
        return this.equals((getCart_result)that);
506 rajveer 18777
      return false;
18778
    }
18779
 
553 chandransh 18780
    public boolean equals(getCart_result that) {
506 rajveer 18781
      if (that == null)
18782
        return false;
18783
 
553 chandransh 18784
      boolean this_present_success = true && this.isSetSuccess();
18785
      boolean that_present_success = true && that.isSetSuccess();
506 rajveer 18786
      if (this_present_success || that_present_success) {
18787
        if (!(this_present_success && that_present_success))
18788
          return false;
553 chandransh 18789
        if (!this.success.equals(that.success))
506 rajveer 18790
          return false;
18791
      }
18792
 
553 chandransh 18793
      boolean this_present_scx = true && this.isSetScx();
18794
      boolean that_present_scx = true && that.isSetScx();
18795
      if (this_present_scx || that_present_scx) {
18796
        if (!(this_present_scx && that_present_scx))
506 rajveer 18797
          return false;
553 chandransh 18798
        if (!this.scx.equals(that.scx))
506 rajveer 18799
          return false;
18800
      }
18801
 
18802
      return true;
18803
    }
18804
 
18805
    @Override
18806
    public int hashCode() {
18807
      return 0;
18808
    }
18809
 
553 chandransh 18810
    public int compareTo(getCart_result other) {
506 rajveer 18811
      if (!getClass().equals(other.getClass())) {
18812
        return getClass().getName().compareTo(other.getClass().getName());
18813
      }
18814
 
18815
      int lastComparison = 0;
553 chandransh 18816
      getCart_result typedOther = (getCart_result)other;
506 rajveer 18817
 
18818
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18819
      if (lastComparison != 0) {
18820
        return lastComparison;
18821
      }
18822
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18823
      if (lastComparison != 0) {
18824
        return lastComparison;
18825
      }
553 chandransh 18826
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
506 rajveer 18827
      if (lastComparison != 0) {
18828
        return lastComparison;
18829
      }
553 chandransh 18830
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
506 rajveer 18831
      if (lastComparison != 0) {
18832
        return lastComparison;
18833
      }
18834
      return 0;
18835
    }
18836
 
18837
    public void read(TProtocol iprot) throws TException {
18838
      TField field;
18839
      iprot.readStructBegin();
18840
      while (true)
18841
      {
18842
        field = iprot.readFieldBegin();
18843
        if (field.type == TType.STOP) { 
18844
          break;
18845
        }
18846
        _Fields fieldId = _Fields.findByThriftId(field.id);
18847
        if (fieldId == null) {
18848
          TProtocolUtil.skip(iprot, field.type);
18849
        } else {
18850
          switch (fieldId) {
18851
            case SUCCESS:
553 chandransh 18852
              if (field.type == TType.STRUCT) {
18853
                this.success = new Cart();
18854
                this.success.read(iprot);
506 rajveer 18855
              } else { 
18856
                TProtocolUtil.skip(iprot, field.type);
18857
              }
18858
              break;
553 chandransh 18859
            case SCX:
506 rajveer 18860
              if (field.type == TType.STRUCT) {
553 chandransh 18861
                this.scx = new ShoppingCartException();
18862
                this.scx.read(iprot);
506 rajveer 18863
              } else { 
18864
                TProtocolUtil.skip(iprot, field.type);
18865
              }
18866
              break;
18867
          }
18868
          iprot.readFieldEnd();
18869
        }
18870
      }
18871
      iprot.readStructEnd();
18872
      validate();
18873
    }
18874
 
18875
    public void write(TProtocol oprot) throws TException {
18876
      oprot.writeStructBegin(STRUCT_DESC);
18877
 
18878
      if (this.isSetSuccess()) {
18879
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 18880
        this.success.write(oprot);
506 rajveer 18881
        oprot.writeFieldEnd();
553 chandransh 18882
      } else if (this.isSetScx()) {
18883
        oprot.writeFieldBegin(SCX_FIELD_DESC);
18884
        this.scx.write(oprot);
506 rajveer 18885
        oprot.writeFieldEnd();
18886
      }
18887
      oprot.writeFieldStop();
18888
      oprot.writeStructEnd();
18889
    }
18890
 
18891
    @Override
18892
    public String toString() {
553 chandransh 18893
      StringBuilder sb = new StringBuilder("getCart_result(");
506 rajveer 18894
      boolean first = true;
18895
 
18896
      sb.append("success:");
553 chandransh 18897
      if (this.success == null) {
18898
        sb.append("null");
18899
      } else {
18900
        sb.append(this.success);
18901
      }
506 rajveer 18902
      first = false;
18903
      if (!first) sb.append(", ");
553 chandransh 18904
      sb.append("scx:");
18905
      if (this.scx == null) {
506 rajveer 18906
        sb.append("null");
18907
      } else {
553 chandransh 18908
        sb.append(this.scx);
506 rajveer 18909
      }
18910
      first = false;
18911
      sb.append(")");
18912
      return sb.toString();
18913
    }
18914
 
18915
    public void validate() throws TException {
18916
      // check for required fields
18917
    }
18918
 
18919
  }
18920
 
553 chandransh 18921
  public static class getCartsForUser_args implements TBase<getCartsForUser_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_args>   {
18922
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_args");
48 ashish 18923
 
553 chandransh 18924
    private static final TField USER_ID_FIELD_DESC = new TField("userId", TType.I64, (short)1);
18925
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 18926
 
553 chandransh 18927
    private long userId;
18928
    private CartStatus status;
48 ashish 18929
 
18930
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18931
    public enum _Fields implements TFieldIdEnum {
553 chandransh 18932
      USER_ID((short)1, "userId"),
18933
      /**
18934
       * 
18935
       * @see CartStatus
18936
       */
18937
      STATUS((short)2, "status");
48 ashish 18938
 
18939
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18940
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18941
 
18942
      static {
18943
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18944
          byId.put((int)field._thriftId, field);
18945
          byName.put(field.getFieldName(), field);
18946
        }
18947
      }
18948
 
18949
      /**
18950
       * Find the _Fields constant that matches fieldId, or null if its not found.
18951
       */
18952
      public static _Fields findByThriftId(int fieldId) {
18953
        return byId.get(fieldId);
18954
      }
18955
 
18956
      /**
18957
       * Find the _Fields constant that matches fieldId, throwing an exception
18958
       * if it is not found.
18959
       */
18960
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18961
        _Fields fields = findByThriftId(fieldId);
18962
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18963
        return fields;
18964
      }
18965
 
18966
      /**
18967
       * Find the _Fields constant that matches name, or null if its not found.
18968
       */
18969
      public static _Fields findByName(String name) {
18970
        return byName.get(name);
18971
      }
18972
 
18973
      private final short _thriftId;
18974
      private final String _fieldName;
18975
 
18976
      _Fields(short thriftId, String fieldName) {
18977
        _thriftId = thriftId;
18978
        _fieldName = fieldName;
18979
      }
18980
 
18981
      public short getThriftFieldId() {
18982
        return _thriftId;
18983
      }
18984
 
18985
      public String getFieldName() {
18986
        return _fieldName;
18987
      }
18988
    }
18989
 
18990
    // isset id assignments
18991
    private static final int __USERID_ISSET_ID = 0;
18992
    private BitSet __isset_bit_vector = new BitSet(1);
18993
 
18994
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 18995
      put(_Fields.USER_ID, new FieldMetaData("userId", TFieldRequirementType.DEFAULT, 
48 ashish 18996
          new FieldValueMetaData(TType.I64)));
553 chandransh 18997
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
18998
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 18999
    }});
19000
 
19001
    static {
553 chandransh 19002
      FieldMetaData.addStructMetaDataMap(getCartsForUser_args.class, metaDataMap);
48 ashish 19003
    }
19004
 
553 chandransh 19005
    public getCartsForUser_args() {
48 ashish 19006
    }
19007
 
553 chandransh 19008
    public getCartsForUser_args(
19009
      long userId,
19010
      CartStatus status)
48 ashish 19011
    {
19012
      this();
553 chandransh 19013
      this.userId = userId;
19014
      setUserIdIsSet(true);
19015
      this.status = status;
48 ashish 19016
    }
19017
 
19018
    /**
19019
     * Performs a deep copy on <i>other</i>.
19020
     */
553 chandransh 19021
    public getCartsForUser_args(getCartsForUser_args other) {
48 ashish 19022
      __isset_bit_vector.clear();
19023
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 19024
      this.userId = other.userId;
19025
      if (other.isSetStatus()) {
19026
        this.status = other.status;
48 ashish 19027
      }
19028
    }
19029
 
553 chandransh 19030
    public getCartsForUser_args deepCopy() {
19031
      return new getCartsForUser_args(this);
48 ashish 19032
    }
19033
 
19034
    @Deprecated
553 chandransh 19035
    public getCartsForUser_args clone() {
19036
      return new getCartsForUser_args(this);
48 ashish 19037
    }
19038
 
553 chandransh 19039
    public long getUserId() {
19040
      return this.userId;
48 ashish 19041
    }
19042
 
553 chandransh 19043
    public getCartsForUser_args setUserId(long userId) {
19044
      this.userId = userId;
19045
      setUserIdIsSet(true);
48 ashish 19046
      return this;
19047
    }
19048
 
553 chandransh 19049
    public void unsetUserId() {
48 ashish 19050
      __isset_bit_vector.clear(__USERID_ISSET_ID);
19051
    }
19052
 
553 chandransh 19053
    /** Returns true if field userId is set (has been asigned a value) and false otherwise */
19054
    public boolean isSetUserId() {
48 ashish 19055
      return __isset_bit_vector.get(__USERID_ISSET_ID);
19056
    }
19057
 
553 chandransh 19058
    public void setUserIdIsSet(boolean value) {
48 ashish 19059
      __isset_bit_vector.set(__USERID_ISSET_ID, value);
19060
    }
19061
 
553 chandransh 19062
    /**
19063
     * 
19064
     * @see CartStatus
19065
     */
19066
    public CartStatus getStatus() {
19067
      return this.status;
48 ashish 19068
    }
19069
 
553 chandransh 19070
    /**
19071
     * 
19072
     * @see CartStatus
19073
     */
19074
    public getCartsForUser_args setStatus(CartStatus status) {
19075
      this.status = status;
48 ashish 19076
      return this;
19077
    }
19078
 
553 chandransh 19079
    public void unsetStatus() {
19080
      this.status = null;
48 ashish 19081
    }
19082
 
553 chandransh 19083
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19084
    public boolean isSetStatus() {
19085
      return this.status != null;
48 ashish 19086
    }
19087
 
553 chandransh 19088
    public void setStatusIsSet(boolean value) {
48 ashish 19089
      if (!value) {
553 chandransh 19090
        this.status = null;
48 ashish 19091
      }
19092
    }
19093
 
19094
    public void setFieldValue(_Fields field, Object value) {
19095
      switch (field) {
553 chandransh 19096
      case USER_ID:
48 ashish 19097
        if (value == null) {
553 chandransh 19098
          unsetUserId();
48 ashish 19099
        } else {
553 chandransh 19100
          setUserId((Long)value);
48 ashish 19101
        }
19102
        break;
19103
 
553 chandransh 19104
      case STATUS:
48 ashish 19105
        if (value == null) {
553 chandransh 19106
          unsetStatus();
48 ashish 19107
        } else {
553 chandransh 19108
          setStatus((CartStatus)value);
48 ashish 19109
        }
19110
        break;
19111
 
19112
      }
19113
    }
19114
 
19115
    public void setFieldValue(int fieldID, Object value) {
19116
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19117
    }
19118
 
19119
    public Object getFieldValue(_Fields field) {
19120
      switch (field) {
553 chandransh 19121
      case USER_ID:
19122
        return new Long(getUserId());
48 ashish 19123
 
553 chandransh 19124
      case STATUS:
19125
        return getStatus();
48 ashish 19126
 
19127
      }
19128
      throw new IllegalStateException();
19129
    }
19130
 
19131
    public Object getFieldValue(int fieldId) {
19132
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19133
    }
19134
 
19135
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19136
    public boolean isSet(_Fields field) {
19137
      switch (field) {
553 chandransh 19138
      case USER_ID:
19139
        return isSetUserId();
19140
      case STATUS:
19141
        return isSetStatus();
48 ashish 19142
      }
19143
      throw new IllegalStateException();
19144
    }
19145
 
19146
    public boolean isSet(int fieldID) {
19147
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19148
    }
19149
 
19150
    @Override
19151
    public boolean equals(Object that) {
19152
      if (that == null)
19153
        return false;
553 chandransh 19154
      if (that instanceof getCartsForUser_args)
19155
        return this.equals((getCartsForUser_args)that);
48 ashish 19156
      return false;
19157
    }
19158
 
553 chandransh 19159
    public boolean equals(getCartsForUser_args that) {
48 ashish 19160
      if (that == null)
19161
        return false;
19162
 
553 chandransh 19163
      boolean this_present_userId = true;
19164
      boolean that_present_userId = true;
19165
      if (this_present_userId || that_present_userId) {
19166
        if (!(this_present_userId && that_present_userId))
48 ashish 19167
          return false;
553 chandransh 19168
        if (this.userId != that.userId)
48 ashish 19169
          return false;
19170
      }
19171
 
553 chandransh 19172
      boolean this_present_status = true && this.isSetStatus();
19173
      boolean that_present_status = true && that.isSetStatus();
19174
      if (this_present_status || that_present_status) {
19175
        if (!(this_present_status && that_present_status))
48 ashish 19176
          return false;
553 chandransh 19177
        if (!this.status.equals(that.status))
48 ashish 19178
          return false;
19179
      }
19180
 
19181
      return true;
19182
    }
19183
 
19184
    @Override
19185
    public int hashCode() {
19186
      return 0;
19187
    }
19188
 
553 chandransh 19189
    public int compareTo(getCartsForUser_args other) {
48 ashish 19190
      if (!getClass().equals(other.getClass())) {
19191
        return getClass().getName().compareTo(other.getClass().getName());
19192
      }
19193
 
19194
      int lastComparison = 0;
553 chandransh 19195
      getCartsForUser_args typedOther = (getCartsForUser_args)other;
48 ashish 19196
 
553 chandransh 19197
      lastComparison = Boolean.valueOf(isSetUserId()).compareTo(isSetUserId());
48 ashish 19198
      if (lastComparison != 0) {
19199
        return lastComparison;
19200
      }
553 chandransh 19201
      lastComparison = TBaseHelper.compareTo(userId, typedOther.userId);
48 ashish 19202
      if (lastComparison != 0) {
19203
        return lastComparison;
19204
      }
553 chandransh 19205
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
48 ashish 19206
      if (lastComparison != 0) {
19207
        return lastComparison;
19208
      }
553 chandransh 19209
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
48 ashish 19210
      if (lastComparison != 0) {
19211
        return lastComparison;
19212
      }
19213
      return 0;
19214
    }
19215
 
19216
    public void read(TProtocol iprot) throws TException {
19217
      TField field;
19218
      iprot.readStructBegin();
19219
      while (true)
19220
      {
19221
        field = iprot.readFieldBegin();
19222
        if (field.type == TType.STOP) { 
19223
          break;
19224
        }
19225
        _Fields fieldId = _Fields.findByThriftId(field.id);
19226
        if (fieldId == null) {
19227
          TProtocolUtil.skip(iprot, field.type);
19228
        } else {
19229
          switch (fieldId) {
553 chandransh 19230
            case USER_ID:
48 ashish 19231
              if (field.type == TType.I64) {
553 chandransh 19232
                this.userId = iprot.readI64();
19233
                setUserIdIsSet(true);
48 ashish 19234
              } else { 
19235
                TProtocolUtil.skip(iprot, field.type);
19236
              }
19237
              break;
553 chandransh 19238
            case STATUS:
19239
              if (field.type == TType.I32) {
19240
                this.status = CartStatus.findByValue(iprot.readI32());
48 ashish 19241
              } else { 
19242
                TProtocolUtil.skip(iprot, field.type);
19243
              }
19244
              break;
19245
          }
19246
          iprot.readFieldEnd();
19247
        }
19248
      }
19249
      iprot.readStructEnd();
19250
      validate();
19251
    }
19252
 
19253
    public void write(TProtocol oprot) throws TException {
19254
      validate();
19255
 
19256
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 19257
      oprot.writeFieldBegin(USER_ID_FIELD_DESC);
19258
      oprot.writeI64(this.userId);
48 ashish 19259
      oprot.writeFieldEnd();
553 chandransh 19260
      if (this.status != null) {
19261
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19262
        oprot.writeI32(this.status.getValue());
48 ashish 19263
        oprot.writeFieldEnd();
19264
      }
19265
      oprot.writeFieldStop();
19266
      oprot.writeStructEnd();
19267
    }
19268
 
19269
    @Override
19270
    public String toString() {
553 chandransh 19271
      StringBuilder sb = new StringBuilder("getCartsForUser_args(");
48 ashish 19272
      boolean first = true;
19273
 
553 chandransh 19274
      sb.append("userId:");
19275
      sb.append(this.userId);
48 ashish 19276
      first = false;
19277
      if (!first) sb.append(", ");
553 chandransh 19278
      sb.append("status:");
19279
      if (this.status == null) {
48 ashish 19280
        sb.append("null");
19281
      } else {
553 chandransh 19282
        String status_name = status.name();
19283
        if (status_name != null) {
19284
          sb.append(status_name);
19285
          sb.append(" (");
19286
        }
19287
        sb.append(this.status);
19288
        if (status_name != null) {
19289
          sb.append(")");
19290
        }
48 ashish 19291
      }
19292
      first = false;
19293
      sb.append(")");
19294
      return sb.toString();
19295
    }
19296
 
19297
    public void validate() throws TException {
19298
      // check for required fields
19299
    }
19300
 
19301
  }
19302
 
553 chandransh 19303
  public static class getCartsForUser_result implements TBase<getCartsForUser_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsForUser_result>   {
19304
    private static final TStruct STRUCT_DESC = new TStruct("getCartsForUser_result");
48 ashish 19305
 
553 chandransh 19306
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19307
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 19308
 
553 chandransh 19309
    private List<Cart> success;
19310
    private ShoppingCartException scx;
48 ashish 19311
 
19312
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19313
    public enum _Fields implements TFieldIdEnum {
19314
      SUCCESS((short)0, "success"),
553 chandransh 19315
      SCX((short)1, "scx");
48 ashish 19316
 
19317
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19318
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19319
 
19320
      static {
19321
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19322
          byId.put((int)field._thriftId, field);
19323
          byName.put(field.getFieldName(), field);
19324
        }
19325
      }
19326
 
19327
      /**
19328
       * Find the _Fields constant that matches fieldId, or null if its not found.
19329
       */
19330
      public static _Fields findByThriftId(int fieldId) {
19331
        return byId.get(fieldId);
19332
      }
19333
 
19334
      /**
19335
       * Find the _Fields constant that matches fieldId, throwing an exception
19336
       * if it is not found.
19337
       */
19338
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19339
        _Fields fields = findByThriftId(fieldId);
19340
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19341
        return fields;
19342
      }
19343
 
19344
      /**
19345
       * Find the _Fields constant that matches name, or null if its not found.
19346
       */
19347
      public static _Fields findByName(String name) {
19348
        return byName.get(name);
19349
      }
19350
 
19351
      private final short _thriftId;
19352
      private final String _fieldName;
19353
 
19354
      _Fields(short thriftId, String fieldName) {
19355
        _thriftId = thriftId;
19356
        _fieldName = fieldName;
19357
      }
19358
 
19359
      public short getThriftFieldId() {
19360
        return _thriftId;
19361
      }
19362
 
19363
      public String getFieldName() {
19364
        return _fieldName;
19365
      }
19366
    }
19367
 
19368
    // isset id assignments
19369
 
19370
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19371
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 19372
          new ListMetaData(TType.LIST, 
19373
              new StructMetaData(TType.STRUCT, Cart.class))));
19374
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 19375
          new FieldValueMetaData(TType.STRUCT)));
19376
    }});
19377
 
19378
    static {
553 chandransh 19379
      FieldMetaData.addStructMetaDataMap(getCartsForUser_result.class, metaDataMap);
48 ashish 19380
    }
19381
 
553 chandransh 19382
    public getCartsForUser_result() {
48 ashish 19383
    }
19384
 
553 chandransh 19385
    public getCartsForUser_result(
19386
      List<Cart> success,
19387
      ShoppingCartException scx)
48 ashish 19388
    {
19389
      this();
19390
      this.success = success;
553 chandransh 19391
      this.scx = scx;
48 ashish 19392
    }
19393
 
19394
    /**
19395
     * Performs a deep copy on <i>other</i>.
19396
     */
553 chandransh 19397
    public getCartsForUser_result(getCartsForUser_result other) {
19398
      if (other.isSetSuccess()) {
19399
        List<Cart> __this__success = new ArrayList<Cart>();
19400
        for (Cart other_element : other.success) {
19401
          __this__success.add(new Cart(other_element));
19402
        }
19403
        this.success = __this__success;
48 ashish 19404
      }
553 chandransh 19405
      if (other.isSetScx()) {
19406
        this.scx = new ShoppingCartException(other.scx);
19407
      }
48 ashish 19408
    }
19409
 
553 chandransh 19410
    public getCartsForUser_result deepCopy() {
19411
      return new getCartsForUser_result(this);
48 ashish 19412
    }
19413
 
19414
    @Deprecated
553 chandransh 19415
    public getCartsForUser_result clone() {
19416
      return new getCartsForUser_result(this);
48 ashish 19417
    }
19418
 
553 chandransh 19419
    public int getSuccessSize() {
19420
      return (this.success == null) ? 0 : this.success.size();
19421
    }
19422
 
19423
    public java.util.Iterator<Cart> getSuccessIterator() {
19424
      return (this.success == null) ? null : this.success.iterator();
19425
    }
19426
 
19427
    public void addToSuccess(Cart elem) {
19428
      if (this.success == null) {
19429
        this.success = new ArrayList<Cart>();
19430
      }
19431
      this.success.add(elem);
19432
    }
19433
 
19434
    public List<Cart> getSuccess() {
48 ashish 19435
      return this.success;
19436
    }
19437
 
553 chandransh 19438
    public getCartsForUser_result setSuccess(List<Cart> success) {
48 ashish 19439
      this.success = success;
19440
      return this;
19441
    }
19442
 
19443
    public void unsetSuccess() {
553 chandransh 19444
      this.success = null;
48 ashish 19445
    }
19446
 
19447
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19448
    public boolean isSetSuccess() {
553 chandransh 19449
      return this.success != null;
48 ashish 19450
    }
19451
 
19452
    public void setSuccessIsSet(boolean value) {
553 chandransh 19453
      if (!value) {
19454
        this.success = null;
19455
      }
48 ashish 19456
    }
19457
 
553 chandransh 19458
    public ShoppingCartException getScx() {
19459
      return this.scx;
48 ashish 19460
    }
19461
 
553 chandransh 19462
    public getCartsForUser_result setScx(ShoppingCartException scx) {
19463
      this.scx = scx;
48 ashish 19464
      return this;
19465
    }
19466
 
553 chandransh 19467
    public void unsetScx() {
19468
      this.scx = null;
48 ashish 19469
    }
19470
 
553 chandransh 19471
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
19472
    public boolean isSetScx() {
19473
      return this.scx != null;
48 ashish 19474
    }
19475
 
553 chandransh 19476
    public void setScxIsSet(boolean value) {
48 ashish 19477
      if (!value) {
553 chandransh 19478
        this.scx = null;
48 ashish 19479
      }
19480
    }
19481
 
19482
    public void setFieldValue(_Fields field, Object value) {
19483
      switch (field) {
19484
      case SUCCESS:
19485
        if (value == null) {
19486
          unsetSuccess();
19487
        } else {
553 chandransh 19488
          setSuccess((List<Cart>)value);
48 ashish 19489
        }
19490
        break;
19491
 
553 chandransh 19492
      case SCX:
48 ashish 19493
        if (value == null) {
553 chandransh 19494
          unsetScx();
48 ashish 19495
        } else {
553 chandransh 19496
          setScx((ShoppingCartException)value);
48 ashish 19497
        }
19498
        break;
19499
 
19500
      }
19501
    }
19502
 
19503
    public void setFieldValue(int fieldID, Object value) {
19504
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19505
    }
19506
 
19507
    public Object getFieldValue(_Fields field) {
19508
      switch (field) {
19509
      case SUCCESS:
553 chandransh 19510
        return getSuccess();
48 ashish 19511
 
553 chandransh 19512
      case SCX:
19513
        return getScx();
48 ashish 19514
 
19515
      }
19516
      throw new IllegalStateException();
19517
    }
19518
 
19519
    public Object getFieldValue(int fieldId) {
19520
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19521
    }
19522
 
19523
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19524
    public boolean isSet(_Fields field) {
19525
      switch (field) {
19526
      case SUCCESS:
19527
        return isSetSuccess();
553 chandransh 19528
      case SCX:
19529
        return isSetScx();
48 ashish 19530
      }
19531
      throw new IllegalStateException();
19532
    }
19533
 
19534
    public boolean isSet(int fieldID) {
19535
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19536
    }
19537
 
19538
    @Override
19539
    public boolean equals(Object that) {
19540
      if (that == null)
19541
        return false;
553 chandransh 19542
      if (that instanceof getCartsForUser_result)
19543
        return this.equals((getCartsForUser_result)that);
48 ashish 19544
      return false;
19545
    }
19546
 
553 chandransh 19547
    public boolean equals(getCartsForUser_result that) {
48 ashish 19548
      if (that == null)
19549
        return false;
19550
 
553 chandransh 19551
      boolean this_present_success = true && this.isSetSuccess();
19552
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 19553
      if (this_present_success || that_present_success) {
19554
        if (!(this_present_success && that_present_success))
19555
          return false;
553 chandransh 19556
        if (!this.success.equals(that.success))
48 ashish 19557
          return false;
19558
      }
19559
 
553 chandransh 19560
      boolean this_present_scx = true && this.isSetScx();
19561
      boolean that_present_scx = true && that.isSetScx();
19562
      if (this_present_scx || that_present_scx) {
19563
        if (!(this_present_scx && that_present_scx))
48 ashish 19564
          return false;
553 chandransh 19565
        if (!this.scx.equals(that.scx))
48 ashish 19566
          return false;
19567
      }
19568
 
19569
      return true;
19570
    }
19571
 
19572
    @Override
19573
    public int hashCode() {
19574
      return 0;
19575
    }
19576
 
553 chandransh 19577
    public int compareTo(getCartsForUser_result other) {
48 ashish 19578
      if (!getClass().equals(other.getClass())) {
19579
        return getClass().getName().compareTo(other.getClass().getName());
19580
      }
19581
 
19582
      int lastComparison = 0;
553 chandransh 19583
      getCartsForUser_result typedOther = (getCartsForUser_result)other;
48 ashish 19584
 
19585
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19586
      if (lastComparison != 0) {
19587
        return lastComparison;
19588
      }
19589
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19590
      if (lastComparison != 0) {
19591
        return lastComparison;
19592
      }
553 chandransh 19593
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 19594
      if (lastComparison != 0) {
19595
        return lastComparison;
19596
      }
553 chandransh 19597
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 19598
      if (lastComparison != 0) {
19599
        return lastComparison;
19600
      }
19601
      return 0;
19602
    }
19603
 
19604
    public void read(TProtocol iprot) throws TException {
19605
      TField field;
19606
      iprot.readStructBegin();
19607
      while (true)
19608
      {
19609
        field = iprot.readFieldBegin();
19610
        if (field.type == TType.STOP) { 
19611
          break;
19612
        }
19613
        _Fields fieldId = _Fields.findByThriftId(field.id);
19614
        if (fieldId == null) {
19615
          TProtocolUtil.skip(iprot, field.type);
19616
        } else {
19617
          switch (fieldId) {
19618
            case SUCCESS:
553 chandransh 19619
              if (field.type == TType.LIST) {
19620
                {
771 rajveer 19621
                  TList _list20 = iprot.readListBegin();
19622
                  this.success = new ArrayList<Cart>(_list20.size);
19623
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
553 chandransh 19624
                  {
771 rajveer 19625
                    Cart _elem22;
19626
                    _elem22 = new Cart();
19627
                    _elem22.read(iprot);
19628
                    this.success.add(_elem22);
553 chandransh 19629
                  }
19630
                  iprot.readListEnd();
19631
                }
48 ashish 19632
              } else { 
19633
                TProtocolUtil.skip(iprot, field.type);
19634
              }
19635
              break;
553 chandransh 19636
            case SCX:
48 ashish 19637
              if (field.type == TType.STRUCT) {
553 chandransh 19638
                this.scx = new ShoppingCartException();
19639
                this.scx.read(iprot);
48 ashish 19640
              } else { 
19641
                TProtocolUtil.skip(iprot, field.type);
19642
              }
19643
              break;
19644
          }
19645
          iprot.readFieldEnd();
19646
        }
19647
      }
19648
      iprot.readStructEnd();
19649
      validate();
19650
    }
19651
 
19652
    public void write(TProtocol oprot) throws TException {
19653
      oprot.writeStructBegin(STRUCT_DESC);
19654
 
19655
      if (this.isSetSuccess()) {
19656
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 19657
        {
19658
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 19659
          for (Cart _iter23 : this.success)
553 chandransh 19660
          {
771 rajveer 19661
            _iter23.write(oprot);
553 chandransh 19662
          }
19663
          oprot.writeListEnd();
19664
        }
48 ashish 19665
        oprot.writeFieldEnd();
553 chandransh 19666
      } else if (this.isSetScx()) {
19667
        oprot.writeFieldBegin(SCX_FIELD_DESC);
19668
        this.scx.write(oprot);
48 ashish 19669
        oprot.writeFieldEnd();
19670
      }
19671
      oprot.writeFieldStop();
19672
      oprot.writeStructEnd();
19673
    }
19674
 
19675
    @Override
19676
    public String toString() {
553 chandransh 19677
      StringBuilder sb = new StringBuilder("getCartsForUser_result(");
48 ashish 19678
      boolean first = true;
19679
 
19680
      sb.append("success:");
553 chandransh 19681
      if (this.success == null) {
19682
        sb.append("null");
19683
      } else {
19684
        sb.append(this.success);
19685
      }
48 ashish 19686
      first = false;
19687
      if (!first) sb.append(", ");
553 chandransh 19688
      sb.append("scx:");
19689
      if (this.scx == null) {
48 ashish 19690
        sb.append("null");
19691
      } else {
553 chandransh 19692
        sb.append(this.scx);
48 ashish 19693
      }
19694
      first = false;
19695
      sb.append(")");
19696
      return sb.toString();
19697
    }
19698
 
19699
    public void validate() throws TException {
19700
      // check for required fields
19701
    }
19702
 
19703
  }
19704
 
553 chandransh 19705
  public static class getCartsByStatus_args implements TBase<getCartsByStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_args>   {
19706
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_args");
48 ashish 19707
 
553 chandransh 19708
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
48 ashish 19709
 
553 chandransh 19710
    private CartStatus status;
48 ashish 19711
 
19712
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19713
    public enum _Fields implements TFieldIdEnum {
553 chandransh 19714
      /**
19715
       * 
19716
       * @see CartStatus
19717
       */
19718
      STATUS((short)1, "status");
48 ashish 19719
 
19720
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19721
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19722
 
19723
      static {
19724
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19725
          byId.put((int)field._thriftId, field);
19726
          byName.put(field.getFieldName(), field);
19727
        }
19728
      }
19729
 
19730
      /**
19731
       * Find the _Fields constant that matches fieldId, or null if its not found.
19732
       */
19733
      public static _Fields findByThriftId(int fieldId) {
19734
        return byId.get(fieldId);
19735
      }
19736
 
19737
      /**
19738
       * Find the _Fields constant that matches fieldId, throwing an exception
19739
       * if it is not found.
19740
       */
19741
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19742
        _Fields fields = findByThriftId(fieldId);
19743
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19744
        return fields;
19745
      }
19746
 
19747
      /**
19748
       * Find the _Fields constant that matches name, or null if its not found.
19749
       */
19750
      public static _Fields findByName(String name) {
19751
        return byName.get(name);
19752
      }
19753
 
19754
      private final short _thriftId;
19755
      private final String _fieldName;
19756
 
19757
      _Fields(short thriftId, String fieldName) {
19758
        _thriftId = thriftId;
19759
        _fieldName = fieldName;
19760
      }
19761
 
19762
      public short getThriftFieldId() {
19763
        return _thriftId;
19764
      }
19765
 
19766
      public String getFieldName() {
19767
        return _fieldName;
19768
      }
19769
    }
19770
 
19771
    // isset id assignments
553 chandransh 19772
 
19773
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19774
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
19775
          new EnumMetaData(TType.ENUM, CartStatus.class)));
19776
    }});
19777
 
19778
    static {
19779
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_args.class, metaDataMap);
19780
    }
19781
 
19782
    public getCartsByStatus_args() {
19783
    }
19784
 
19785
    public getCartsByStatus_args(
19786
      CartStatus status)
19787
    {
19788
      this();
19789
      this.status = status;
19790
    }
19791
 
19792
    /**
19793
     * Performs a deep copy on <i>other</i>.
19794
     */
19795
    public getCartsByStatus_args(getCartsByStatus_args other) {
19796
      if (other.isSetStatus()) {
19797
        this.status = other.status;
19798
      }
19799
    }
19800
 
19801
    public getCartsByStatus_args deepCopy() {
19802
      return new getCartsByStatus_args(this);
19803
    }
19804
 
19805
    @Deprecated
19806
    public getCartsByStatus_args clone() {
19807
      return new getCartsByStatus_args(this);
19808
    }
19809
 
19810
    /**
19811
     * 
19812
     * @see CartStatus
19813
     */
19814
    public CartStatus getStatus() {
19815
      return this.status;
19816
    }
19817
 
19818
    /**
19819
     * 
19820
     * @see CartStatus
19821
     */
19822
    public getCartsByStatus_args setStatus(CartStatus status) {
19823
      this.status = status;
19824
      return this;
19825
    }
19826
 
19827
    public void unsetStatus() {
19828
      this.status = null;
19829
    }
19830
 
19831
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
19832
    public boolean isSetStatus() {
19833
      return this.status != null;
19834
    }
19835
 
19836
    public void setStatusIsSet(boolean value) {
19837
      if (!value) {
19838
        this.status = null;
19839
      }
19840
    }
19841
 
19842
    public void setFieldValue(_Fields field, Object value) {
19843
      switch (field) {
19844
      case STATUS:
19845
        if (value == null) {
19846
          unsetStatus();
19847
        } else {
19848
          setStatus((CartStatus)value);
19849
        }
19850
        break;
19851
 
19852
      }
19853
    }
19854
 
19855
    public void setFieldValue(int fieldID, Object value) {
19856
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19857
    }
19858
 
19859
    public Object getFieldValue(_Fields field) {
19860
      switch (field) {
19861
      case STATUS:
19862
        return getStatus();
19863
 
19864
      }
19865
      throw new IllegalStateException();
19866
    }
19867
 
19868
    public Object getFieldValue(int fieldId) {
19869
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19870
    }
19871
 
19872
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19873
    public boolean isSet(_Fields field) {
19874
      switch (field) {
19875
      case STATUS:
19876
        return isSetStatus();
19877
      }
19878
      throw new IllegalStateException();
19879
    }
19880
 
19881
    public boolean isSet(int fieldID) {
19882
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19883
    }
19884
 
19885
    @Override
19886
    public boolean equals(Object that) {
19887
      if (that == null)
19888
        return false;
19889
      if (that instanceof getCartsByStatus_args)
19890
        return this.equals((getCartsByStatus_args)that);
19891
      return false;
19892
    }
19893
 
19894
    public boolean equals(getCartsByStatus_args that) {
19895
      if (that == null)
19896
        return false;
19897
 
19898
      boolean this_present_status = true && this.isSetStatus();
19899
      boolean that_present_status = true && that.isSetStatus();
19900
      if (this_present_status || that_present_status) {
19901
        if (!(this_present_status && that_present_status))
19902
          return false;
19903
        if (!this.status.equals(that.status))
19904
          return false;
19905
      }
19906
 
19907
      return true;
19908
    }
19909
 
19910
    @Override
19911
    public int hashCode() {
19912
      return 0;
19913
    }
19914
 
19915
    public int compareTo(getCartsByStatus_args other) {
19916
      if (!getClass().equals(other.getClass())) {
19917
        return getClass().getName().compareTo(other.getClass().getName());
19918
      }
19919
 
19920
      int lastComparison = 0;
19921
      getCartsByStatus_args typedOther = (getCartsByStatus_args)other;
19922
 
19923
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
19924
      if (lastComparison != 0) {
19925
        return lastComparison;
19926
      }
19927
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
19928
      if (lastComparison != 0) {
19929
        return lastComparison;
19930
      }
19931
      return 0;
19932
    }
19933
 
19934
    public void read(TProtocol iprot) throws TException {
19935
      TField field;
19936
      iprot.readStructBegin();
19937
      while (true)
19938
      {
19939
        field = iprot.readFieldBegin();
19940
        if (field.type == TType.STOP) { 
19941
          break;
19942
        }
19943
        _Fields fieldId = _Fields.findByThriftId(field.id);
19944
        if (fieldId == null) {
19945
          TProtocolUtil.skip(iprot, field.type);
19946
        } else {
19947
          switch (fieldId) {
19948
            case STATUS:
19949
              if (field.type == TType.I32) {
19950
                this.status = CartStatus.findByValue(iprot.readI32());
19951
              } else { 
19952
                TProtocolUtil.skip(iprot, field.type);
19953
              }
19954
              break;
19955
          }
19956
          iprot.readFieldEnd();
19957
        }
19958
      }
19959
      iprot.readStructEnd();
19960
      validate();
19961
    }
19962
 
19963
    public void write(TProtocol oprot) throws TException {
19964
      validate();
19965
 
19966
      oprot.writeStructBegin(STRUCT_DESC);
19967
      if (this.status != null) {
19968
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
19969
        oprot.writeI32(this.status.getValue());
19970
        oprot.writeFieldEnd();
19971
      }
19972
      oprot.writeFieldStop();
19973
      oprot.writeStructEnd();
19974
    }
19975
 
19976
    @Override
19977
    public String toString() {
19978
      StringBuilder sb = new StringBuilder("getCartsByStatus_args(");
19979
      boolean first = true;
19980
 
19981
      sb.append("status:");
19982
      if (this.status == null) {
19983
        sb.append("null");
19984
      } else {
19985
        String status_name = status.name();
19986
        if (status_name != null) {
19987
          sb.append(status_name);
19988
          sb.append(" (");
19989
        }
19990
        sb.append(this.status);
19991
        if (status_name != null) {
19992
          sb.append(")");
19993
        }
19994
      }
19995
      first = false;
19996
      sb.append(")");
19997
      return sb.toString();
19998
    }
19999
 
20000
    public void validate() throws TException {
20001
      // check for required fields
20002
    }
20003
 
20004
  }
20005
 
20006
  public static class getCartsByStatus_result implements TBase<getCartsByStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByStatus_result>   {
20007
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByStatus_result");
20008
 
20009
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20010
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
20011
 
20012
    private List<Cart> success;
20013
    private ShoppingCartException scx;
20014
 
20015
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20016
    public enum _Fields implements TFieldIdEnum {
20017
      SUCCESS((short)0, "success"),
20018
      SCX((short)1, "scx");
20019
 
20020
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20021
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20022
 
20023
      static {
20024
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20025
          byId.put((int)field._thriftId, field);
20026
          byName.put(field.getFieldName(), field);
20027
        }
20028
      }
20029
 
20030
      /**
20031
       * Find the _Fields constant that matches fieldId, or null if its not found.
20032
       */
20033
      public static _Fields findByThriftId(int fieldId) {
20034
        return byId.get(fieldId);
20035
      }
20036
 
20037
      /**
20038
       * Find the _Fields constant that matches fieldId, throwing an exception
20039
       * if it is not found.
20040
       */
20041
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20042
        _Fields fields = findByThriftId(fieldId);
20043
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20044
        return fields;
20045
      }
20046
 
20047
      /**
20048
       * Find the _Fields constant that matches name, or null if its not found.
20049
       */
20050
      public static _Fields findByName(String name) {
20051
        return byName.get(name);
20052
      }
20053
 
20054
      private final short _thriftId;
20055
      private final String _fieldName;
20056
 
20057
      _Fields(short thriftId, String fieldName) {
20058
        _thriftId = thriftId;
20059
        _fieldName = fieldName;
20060
      }
20061
 
20062
      public short getThriftFieldId() {
20063
        return _thriftId;
20064
      }
20065
 
20066
      public String getFieldName() {
20067
        return _fieldName;
20068
      }
20069
    }
20070
 
20071
    // isset id assignments
20072
 
20073
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20074
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20075
          new ListMetaData(TType.LIST, 
20076
              new StructMetaData(TType.STRUCT, Cart.class))));
20077
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
20078
          new FieldValueMetaData(TType.STRUCT)));
20079
    }});
20080
 
20081
    static {
20082
      FieldMetaData.addStructMetaDataMap(getCartsByStatus_result.class, metaDataMap);
20083
    }
20084
 
20085
    public getCartsByStatus_result() {
20086
    }
20087
 
20088
    public getCartsByStatus_result(
20089
      List<Cart> success,
20090
      ShoppingCartException scx)
20091
    {
20092
      this();
20093
      this.success = success;
20094
      this.scx = scx;
20095
    }
20096
 
20097
    /**
20098
     * Performs a deep copy on <i>other</i>.
20099
     */
20100
    public getCartsByStatus_result(getCartsByStatus_result other) {
20101
      if (other.isSetSuccess()) {
20102
        List<Cart> __this__success = new ArrayList<Cart>();
20103
        for (Cart other_element : other.success) {
20104
          __this__success.add(new Cart(other_element));
20105
        }
20106
        this.success = __this__success;
20107
      }
20108
      if (other.isSetScx()) {
20109
        this.scx = new ShoppingCartException(other.scx);
20110
      }
20111
    }
20112
 
20113
    public getCartsByStatus_result deepCopy() {
20114
      return new getCartsByStatus_result(this);
20115
    }
20116
 
20117
    @Deprecated
20118
    public getCartsByStatus_result clone() {
20119
      return new getCartsByStatus_result(this);
20120
    }
20121
 
20122
    public int getSuccessSize() {
20123
      return (this.success == null) ? 0 : this.success.size();
20124
    }
20125
 
20126
    public java.util.Iterator<Cart> getSuccessIterator() {
20127
      return (this.success == null) ? null : this.success.iterator();
20128
    }
20129
 
20130
    public void addToSuccess(Cart elem) {
20131
      if (this.success == null) {
20132
        this.success = new ArrayList<Cart>();
20133
      }
20134
      this.success.add(elem);
20135
    }
20136
 
20137
    public List<Cart> getSuccess() {
20138
      return this.success;
20139
    }
20140
 
20141
    public getCartsByStatus_result setSuccess(List<Cart> success) {
20142
      this.success = success;
20143
      return this;
20144
    }
20145
 
20146
    public void unsetSuccess() {
20147
      this.success = null;
20148
    }
20149
 
20150
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20151
    public boolean isSetSuccess() {
20152
      return this.success != null;
20153
    }
20154
 
20155
    public void setSuccessIsSet(boolean value) {
20156
      if (!value) {
20157
        this.success = null;
20158
      }
20159
    }
20160
 
20161
    public ShoppingCartException getScx() {
20162
      return this.scx;
20163
    }
20164
 
20165
    public getCartsByStatus_result setScx(ShoppingCartException scx) {
20166
      this.scx = scx;
20167
      return this;
20168
    }
20169
 
20170
    public void unsetScx() {
20171
      this.scx = null;
20172
    }
20173
 
20174
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
20175
    public boolean isSetScx() {
20176
      return this.scx != null;
20177
    }
20178
 
20179
    public void setScxIsSet(boolean value) {
20180
      if (!value) {
20181
        this.scx = null;
20182
      }
20183
    }
20184
 
20185
    public void setFieldValue(_Fields field, Object value) {
20186
      switch (field) {
20187
      case SUCCESS:
20188
        if (value == null) {
20189
          unsetSuccess();
20190
        } else {
20191
          setSuccess((List<Cart>)value);
20192
        }
20193
        break;
20194
 
20195
      case SCX:
20196
        if (value == null) {
20197
          unsetScx();
20198
        } else {
20199
          setScx((ShoppingCartException)value);
20200
        }
20201
        break;
20202
 
20203
      }
20204
    }
20205
 
20206
    public void setFieldValue(int fieldID, Object value) {
20207
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20208
    }
20209
 
20210
    public Object getFieldValue(_Fields field) {
20211
      switch (field) {
20212
      case SUCCESS:
20213
        return getSuccess();
20214
 
20215
      case SCX:
20216
        return getScx();
20217
 
20218
      }
20219
      throw new IllegalStateException();
20220
    }
20221
 
20222
    public Object getFieldValue(int fieldId) {
20223
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20224
    }
20225
 
20226
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20227
    public boolean isSet(_Fields field) {
20228
      switch (field) {
20229
      case SUCCESS:
20230
        return isSetSuccess();
20231
      case SCX:
20232
        return isSetScx();
20233
      }
20234
      throw new IllegalStateException();
20235
    }
20236
 
20237
    public boolean isSet(int fieldID) {
20238
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20239
    }
20240
 
20241
    @Override
20242
    public boolean equals(Object that) {
20243
      if (that == null)
20244
        return false;
20245
      if (that instanceof getCartsByStatus_result)
20246
        return this.equals((getCartsByStatus_result)that);
20247
      return false;
20248
    }
20249
 
20250
    public boolean equals(getCartsByStatus_result that) {
20251
      if (that == null)
20252
        return false;
20253
 
20254
      boolean this_present_success = true && this.isSetSuccess();
20255
      boolean that_present_success = true && that.isSetSuccess();
20256
      if (this_present_success || that_present_success) {
20257
        if (!(this_present_success && that_present_success))
20258
          return false;
20259
        if (!this.success.equals(that.success))
20260
          return false;
20261
      }
20262
 
20263
      boolean this_present_scx = true && this.isSetScx();
20264
      boolean that_present_scx = true && that.isSetScx();
20265
      if (this_present_scx || that_present_scx) {
20266
        if (!(this_present_scx && that_present_scx))
20267
          return false;
20268
        if (!this.scx.equals(that.scx))
20269
          return false;
20270
      }
20271
 
20272
      return true;
20273
    }
20274
 
20275
    @Override
20276
    public int hashCode() {
20277
      return 0;
20278
    }
20279
 
20280
    public int compareTo(getCartsByStatus_result other) {
20281
      if (!getClass().equals(other.getClass())) {
20282
        return getClass().getName().compareTo(other.getClass().getName());
20283
      }
20284
 
20285
      int lastComparison = 0;
20286
      getCartsByStatus_result typedOther = (getCartsByStatus_result)other;
20287
 
20288
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20289
      if (lastComparison != 0) {
20290
        return lastComparison;
20291
      }
20292
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20293
      if (lastComparison != 0) {
20294
        return lastComparison;
20295
      }
20296
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
20297
      if (lastComparison != 0) {
20298
        return lastComparison;
20299
      }
20300
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
20301
      if (lastComparison != 0) {
20302
        return lastComparison;
20303
      }
20304
      return 0;
20305
    }
20306
 
20307
    public void read(TProtocol iprot) throws TException {
20308
      TField field;
20309
      iprot.readStructBegin();
20310
      while (true)
20311
      {
20312
        field = iprot.readFieldBegin();
20313
        if (field.type == TType.STOP) { 
20314
          break;
20315
        }
20316
        _Fields fieldId = _Fields.findByThriftId(field.id);
20317
        if (fieldId == null) {
20318
          TProtocolUtil.skip(iprot, field.type);
20319
        } else {
20320
          switch (fieldId) {
20321
            case SUCCESS:
20322
              if (field.type == TType.LIST) {
20323
                {
771 rajveer 20324
                  TList _list24 = iprot.readListBegin();
20325
                  this.success = new ArrayList<Cart>(_list24.size);
20326
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
553 chandransh 20327
                  {
771 rajveer 20328
                    Cart _elem26;
20329
                    _elem26 = new Cart();
20330
                    _elem26.read(iprot);
20331
                    this.success.add(_elem26);
553 chandransh 20332
                  }
20333
                  iprot.readListEnd();
20334
                }
20335
              } else { 
20336
                TProtocolUtil.skip(iprot, field.type);
20337
              }
20338
              break;
20339
            case SCX:
20340
              if (field.type == TType.STRUCT) {
20341
                this.scx = new ShoppingCartException();
20342
                this.scx.read(iprot);
20343
              } else { 
20344
                TProtocolUtil.skip(iprot, field.type);
20345
              }
20346
              break;
20347
          }
20348
          iprot.readFieldEnd();
20349
        }
20350
      }
20351
      iprot.readStructEnd();
20352
      validate();
20353
    }
20354
 
20355
    public void write(TProtocol oprot) throws TException {
20356
      oprot.writeStructBegin(STRUCT_DESC);
20357
 
20358
      if (this.isSetSuccess()) {
20359
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20360
        {
20361
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 20362
          for (Cart _iter27 : this.success)
553 chandransh 20363
          {
771 rajveer 20364
            _iter27.write(oprot);
553 chandransh 20365
          }
20366
          oprot.writeListEnd();
20367
        }
20368
        oprot.writeFieldEnd();
20369
      } else if (this.isSetScx()) {
20370
        oprot.writeFieldBegin(SCX_FIELD_DESC);
20371
        this.scx.write(oprot);
20372
        oprot.writeFieldEnd();
20373
      }
20374
      oprot.writeFieldStop();
20375
      oprot.writeStructEnd();
20376
    }
20377
 
20378
    @Override
20379
    public String toString() {
20380
      StringBuilder sb = new StringBuilder("getCartsByStatus_result(");
20381
      boolean first = true;
20382
 
20383
      sb.append("success:");
20384
      if (this.success == null) {
20385
        sb.append("null");
20386
      } else {
20387
        sb.append(this.success);
20388
      }
20389
      first = false;
20390
      if (!first) sb.append(", ");
20391
      sb.append("scx:");
20392
      if (this.scx == null) {
20393
        sb.append("null");
20394
      } else {
20395
        sb.append(this.scx);
20396
      }
20397
      first = false;
20398
      sb.append(")");
20399
      return sb.toString();
20400
    }
20401
 
20402
    public void validate() throws TException {
20403
      // check for required fields
20404
    }
20405
 
20406
  }
20407
 
20408
  public static class getCartsByTime_args implements TBase<getCartsByTime_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_args>   {
20409
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_args");
20410
 
20411
    private static final TField FROM_TIME_FIELD_DESC = new TField("from_time", TType.I64, (short)1);
20412
    private static final TField TO_TIME_FIELD_DESC = new TField("to_time", TType.I64, (short)2);
20413
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
20414
 
20415
    private long from_time;
20416
    private long to_time;
20417
    private CartStatus status;
20418
 
20419
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20420
    public enum _Fields implements TFieldIdEnum {
20421
      FROM_TIME((short)1, "from_time"),
20422
      TO_TIME((short)2, "to_time"),
20423
      /**
20424
       * 
20425
       * @see CartStatus
20426
       */
20427
      STATUS((short)3, "status");
20428
 
20429
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20430
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20431
 
20432
      static {
20433
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20434
          byId.put((int)field._thriftId, field);
20435
          byName.put(field.getFieldName(), field);
20436
        }
20437
      }
20438
 
20439
      /**
20440
       * Find the _Fields constant that matches fieldId, or null if its not found.
20441
       */
20442
      public static _Fields findByThriftId(int fieldId) {
20443
        return byId.get(fieldId);
20444
      }
20445
 
20446
      /**
20447
       * Find the _Fields constant that matches fieldId, throwing an exception
20448
       * if it is not found.
20449
       */
20450
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20451
        _Fields fields = findByThriftId(fieldId);
20452
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20453
        return fields;
20454
      }
20455
 
20456
      /**
20457
       * Find the _Fields constant that matches name, or null if its not found.
20458
       */
20459
      public static _Fields findByName(String name) {
20460
        return byName.get(name);
20461
      }
20462
 
20463
      private final short _thriftId;
20464
      private final String _fieldName;
20465
 
20466
      _Fields(short thriftId, String fieldName) {
20467
        _thriftId = thriftId;
20468
        _fieldName = fieldName;
20469
      }
20470
 
20471
      public short getThriftFieldId() {
20472
        return _thriftId;
20473
      }
20474
 
20475
      public String getFieldName() {
20476
        return _fieldName;
20477
      }
20478
    }
20479
 
20480
    // isset id assignments
20481
    private static final int __FROM_TIME_ISSET_ID = 0;
20482
    private static final int __TO_TIME_ISSET_ID = 1;
123 ashish 20483
    private BitSet __isset_bit_vector = new BitSet(2);
48 ashish 20484
 
20485
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 20486
      put(_Fields.FROM_TIME, new FieldMetaData("from_time", TFieldRequirementType.DEFAULT, 
48 ashish 20487
          new FieldValueMetaData(TType.I64)));
553 chandransh 20488
      put(_Fields.TO_TIME, new FieldMetaData("to_time", TFieldRequirementType.DEFAULT, 
20489
          new FieldValueMetaData(TType.I64)));
20490
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
20491
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 20492
    }});
20493
 
20494
    static {
553 chandransh 20495
      FieldMetaData.addStructMetaDataMap(getCartsByTime_args.class, metaDataMap);
48 ashish 20496
    }
20497
 
553 chandransh 20498
    public getCartsByTime_args() {
48 ashish 20499
    }
20500
 
553 chandransh 20501
    public getCartsByTime_args(
20502
      long from_time,
20503
      long to_time,
20504
      CartStatus status)
48 ashish 20505
    {
20506
      this();
553 chandransh 20507
      this.from_time = from_time;
20508
      setFrom_timeIsSet(true);
20509
      this.to_time = to_time;
20510
      setTo_timeIsSet(true);
20511
      this.status = status;
48 ashish 20512
    }
20513
 
20514
    /**
20515
     * Performs a deep copy on <i>other</i>.
20516
     */
553 chandransh 20517
    public getCartsByTime_args(getCartsByTime_args other) {
48 ashish 20518
      __isset_bit_vector.clear();
20519
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 20520
      this.from_time = other.from_time;
20521
      this.to_time = other.to_time;
20522
      if (other.isSetStatus()) {
20523
        this.status = other.status;
20524
      }
48 ashish 20525
    }
20526
 
553 chandransh 20527
    public getCartsByTime_args deepCopy() {
20528
      return new getCartsByTime_args(this);
48 ashish 20529
    }
20530
 
20531
    @Deprecated
553 chandransh 20532
    public getCartsByTime_args clone() {
20533
      return new getCartsByTime_args(this);
48 ashish 20534
    }
20535
 
553 chandransh 20536
    public long getFrom_time() {
20537
      return this.from_time;
48 ashish 20538
    }
20539
 
553 chandransh 20540
    public getCartsByTime_args setFrom_time(long from_time) {
20541
      this.from_time = from_time;
20542
      setFrom_timeIsSet(true);
48 ashish 20543
      return this;
20544
    }
20545
 
553 chandransh 20546
    public void unsetFrom_time() {
20547
      __isset_bit_vector.clear(__FROM_TIME_ISSET_ID);
48 ashish 20548
    }
20549
 
553 chandransh 20550
    /** Returns true if field from_time is set (has been asigned a value) and false otherwise */
20551
    public boolean isSetFrom_time() {
20552
      return __isset_bit_vector.get(__FROM_TIME_ISSET_ID);
48 ashish 20553
    }
20554
 
553 chandransh 20555
    public void setFrom_timeIsSet(boolean value) {
20556
      __isset_bit_vector.set(__FROM_TIME_ISSET_ID, value);
48 ashish 20557
    }
20558
 
553 chandransh 20559
    public long getTo_time() {
20560
      return this.to_time;
123 ashish 20561
    }
20562
 
553 chandransh 20563
    public getCartsByTime_args setTo_time(long to_time) {
20564
      this.to_time = to_time;
20565
      setTo_timeIsSet(true);
123 ashish 20566
      return this;
20567
    }
20568
 
553 chandransh 20569
    public void unsetTo_time() {
20570
      __isset_bit_vector.clear(__TO_TIME_ISSET_ID);
123 ashish 20571
    }
20572
 
553 chandransh 20573
    /** Returns true if field to_time is set (has been asigned a value) and false otherwise */
20574
    public boolean isSetTo_time() {
20575
      return __isset_bit_vector.get(__TO_TIME_ISSET_ID);
123 ashish 20576
    }
20577
 
553 chandransh 20578
    public void setTo_timeIsSet(boolean value) {
20579
      __isset_bit_vector.set(__TO_TIME_ISSET_ID, value);
123 ashish 20580
    }
20581
 
553 chandransh 20582
    /**
20583
     * 
20584
     * @see CartStatus
20585
     */
20586
    public CartStatus getStatus() {
20587
      return this.status;
20588
    }
20589
 
20590
    /**
20591
     * 
20592
     * @see CartStatus
20593
     */
20594
    public getCartsByTime_args setStatus(CartStatus status) {
20595
      this.status = status;
20596
      return this;
20597
    }
20598
 
20599
    public void unsetStatus() {
20600
      this.status = null;
20601
    }
20602
 
20603
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
20604
    public boolean isSetStatus() {
20605
      return this.status != null;
20606
    }
20607
 
20608
    public void setStatusIsSet(boolean value) {
20609
      if (!value) {
20610
        this.status = null;
20611
      }
20612
    }
20613
 
48 ashish 20614
    public void setFieldValue(_Fields field, Object value) {
20615
      switch (field) {
553 chandransh 20616
      case FROM_TIME:
48 ashish 20617
        if (value == null) {
553 chandransh 20618
          unsetFrom_time();
48 ashish 20619
        } else {
553 chandransh 20620
          setFrom_time((Long)value);
48 ashish 20621
        }
20622
        break;
20623
 
553 chandransh 20624
      case TO_TIME:
123 ashish 20625
        if (value == null) {
553 chandransh 20626
          unsetTo_time();
123 ashish 20627
        } else {
553 chandransh 20628
          setTo_time((Long)value);
123 ashish 20629
        }
20630
        break;
20631
 
553 chandransh 20632
      case STATUS:
20633
        if (value == null) {
20634
          unsetStatus();
20635
        } else {
20636
          setStatus((CartStatus)value);
20637
        }
20638
        break;
20639
 
48 ashish 20640
      }
20641
    }
20642
 
20643
    public void setFieldValue(int fieldID, Object value) {
20644
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20645
    }
20646
 
20647
    public Object getFieldValue(_Fields field) {
20648
      switch (field) {
553 chandransh 20649
      case FROM_TIME:
20650
        return new Long(getFrom_time());
48 ashish 20651
 
553 chandransh 20652
      case TO_TIME:
20653
        return new Long(getTo_time());
123 ashish 20654
 
553 chandransh 20655
      case STATUS:
20656
        return getStatus();
20657
 
48 ashish 20658
      }
20659
      throw new IllegalStateException();
20660
    }
20661
 
20662
    public Object getFieldValue(int fieldId) {
20663
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20664
    }
20665
 
20666
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20667
    public boolean isSet(_Fields field) {
20668
      switch (field) {
553 chandransh 20669
      case FROM_TIME:
20670
        return isSetFrom_time();
20671
      case TO_TIME:
20672
        return isSetTo_time();
20673
      case STATUS:
20674
        return isSetStatus();
48 ashish 20675
      }
20676
      throw new IllegalStateException();
20677
    }
20678
 
20679
    public boolean isSet(int fieldID) {
20680
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20681
    }
20682
 
20683
    @Override
20684
    public boolean equals(Object that) {
20685
      if (that == null)
20686
        return false;
553 chandransh 20687
      if (that instanceof getCartsByTime_args)
20688
        return this.equals((getCartsByTime_args)that);
48 ashish 20689
      return false;
20690
    }
20691
 
553 chandransh 20692
    public boolean equals(getCartsByTime_args that) {
48 ashish 20693
      if (that == null)
20694
        return false;
20695
 
553 chandransh 20696
      boolean this_present_from_time = true;
20697
      boolean that_present_from_time = true;
20698
      if (this_present_from_time || that_present_from_time) {
20699
        if (!(this_present_from_time && that_present_from_time))
48 ashish 20700
          return false;
553 chandransh 20701
        if (this.from_time != that.from_time)
48 ashish 20702
          return false;
20703
      }
20704
 
553 chandransh 20705
      boolean this_present_to_time = true;
20706
      boolean that_present_to_time = true;
20707
      if (this_present_to_time || that_present_to_time) {
20708
        if (!(this_present_to_time && that_present_to_time))
123 ashish 20709
          return false;
553 chandransh 20710
        if (this.to_time != that.to_time)
123 ashish 20711
          return false;
20712
      }
20713
 
553 chandransh 20714
      boolean this_present_status = true && this.isSetStatus();
20715
      boolean that_present_status = true && that.isSetStatus();
20716
      if (this_present_status || that_present_status) {
20717
        if (!(this_present_status && that_present_status))
20718
          return false;
20719
        if (!this.status.equals(that.status))
20720
          return false;
20721
      }
20722
 
48 ashish 20723
      return true;
20724
    }
20725
 
20726
    @Override
20727
    public int hashCode() {
20728
      return 0;
20729
    }
20730
 
553 chandransh 20731
    public int compareTo(getCartsByTime_args other) {
48 ashish 20732
      if (!getClass().equals(other.getClass())) {
20733
        return getClass().getName().compareTo(other.getClass().getName());
20734
      }
20735
 
20736
      int lastComparison = 0;
553 chandransh 20737
      getCartsByTime_args typedOther = (getCartsByTime_args)other;
48 ashish 20738
 
553 chandransh 20739
      lastComparison = Boolean.valueOf(isSetFrom_time()).compareTo(isSetFrom_time());
48 ashish 20740
      if (lastComparison != 0) {
20741
        return lastComparison;
20742
      }
553 chandransh 20743
      lastComparison = TBaseHelper.compareTo(from_time, typedOther.from_time);
48 ashish 20744
      if (lastComparison != 0) {
20745
        return lastComparison;
20746
      }
553 chandransh 20747
      lastComparison = Boolean.valueOf(isSetTo_time()).compareTo(isSetTo_time());
123 ashish 20748
      if (lastComparison != 0) {
20749
        return lastComparison;
20750
      }
553 chandransh 20751
      lastComparison = TBaseHelper.compareTo(to_time, typedOther.to_time);
123 ashish 20752
      if (lastComparison != 0) {
20753
        return lastComparison;
20754
      }
553 chandransh 20755
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
20756
      if (lastComparison != 0) {
20757
        return lastComparison;
20758
      }
20759
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
20760
      if (lastComparison != 0) {
20761
        return lastComparison;
20762
      }
48 ashish 20763
      return 0;
20764
    }
20765
 
20766
    public void read(TProtocol iprot) throws TException {
20767
      TField field;
20768
      iprot.readStructBegin();
20769
      while (true)
20770
      {
20771
        field = iprot.readFieldBegin();
20772
        if (field.type == TType.STOP) { 
20773
          break;
20774
        }
20775
        _Fields fieldId = _Fields.findByThriftId(field.id);
20776
        if (fieldId == null) {
20777
          TProtocolUtil.skip(iprot, field.type);
20778
        } else {
20779
          switch (fieldId) {
553 chandransh 20780
            case FROM_TIME:
48 ashish 20781
              if (field.type == TType.I64) {
553 chandransh 20782
                this.from_time = iprot.readI64();
20783
                setFrom_timeIsSet(true);
48 ashish 20784
              } else { 
20785
                TProtocolUtil.skip(iprot, field.type);
20786
              }
20787
              break;
553 chandransh 20788
            case TO_TIME:
20789
              if (field.type == TType.I64) {
20790
                this.to_time = iprot.readI64();
20791
                setTo_timeIsSet(true);
123 ashish 20792
              } else { 
20793
                TProtocolUtil.skip(iprot, field.type);
20794
              }
20795
              break;
553 chandransh 20796
            case STATUS:
20797
              if (field.type == TType.I32) {
20798
                this.status = CartStatus.findByValue(iprot.readI32());
20799
              } else { 
20800
                TProtocolUtil.skip(iprot, field.type);
20801
              }
20802
              break;
48 ashish 20803
          }
20804
          iprot.readFieldEnd();
20805
        }
20806
      }
20807
      iprot.readStructEnd();
20808
      validate();
20809
    }
20810
 
20811
    public void write(TProtocol oprot) throws TException {
20812
      validate();
20813
 
20814
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 20815
      oprot.writeFieldBegin(FROM_TIME_FIELD_DESC);
20816
      oprot.writeI64(this.from_time);
48 ashish 20817
      oprot.writeFieldEnd();
553 chandransh 20818
      oprot.writeFieldBegin(TO_TIME_FIELD_DESC);
20819
      oprot.writeI64(this.to_time);
123 ashish 20820
      oprot.writeFieldEnd();
553 chandransh 20821
      if (this.status != null) {
20822
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
20823
        oprot.writeI32(this.status.getValue());
20824
        oprot.writeFieldEnd();
20825
      }
48 ashish 20826
      oprot.writeFieldStop();
20827
      oprot.writeStructEnd();
20828
    }
20829
 
20830
    @Override
20831
    public String toString() {
553 chandransh 20832
      StringBuilder sb = new StringBuilder("getCartsByTime_args(");
48 ashish 20833
      boolean first = true;
20834
 
553 chandransh 20835
      sb.append("from_time:");
20836
      sb.append(this.from_time);
48 ashish 20837
      first = false;
123 ashish 20838
      if (!first) sb.append(", ");
553 chandransh 20839
      sb.append("to_time:");
20840
      sb.append(this.to_time);
123 ashish 20841
      first = false;
553 chandransh 20842
      if (!first) sb.append(", ");
20843
      sb.append("status:");
20844
      if (this.status == null) {
20845
        sb.append("null");
20846
      } else {
20847
        String status_name = status.name();
20848
        if (status_name != null) {
20849
          sb.append(status_name);
20850
          sb.append(" (");
20851
        }
20852
        sb.append(this.status);
20853
        if (status_name != null) {
20854
          sb.append(")");
20855
        }
20856
      }
20857
      first = false;
48 ashish 20858
      sb.append(")");
20859
      return sb.toString();
20860
    }
20861
 
20862
    public void validate() throws TException {
20863
      // check for required fields
20864
    }
20865
 
20866
  }
20867
 
553 chandransh 20868
  public static class getCartsByTime_result implements TBase<getCartsByTime_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCartsByTime_result>   {
20869
    private static final TStruct STRUCT_DESC = new TStruct("getCartsByTime_result");
48 ashish 20870
 
553 chandransh 20871
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20872
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 20873
 
553 chandransh 20874
    private List<Cart> success;
20875
    private ShoppingCartException scx;
48 ashish 20876
 
20877
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20878
    public enum _Fields implements TFieldIdEnum {
20879
      SUCCESS((short)0, "success"),
553 chandransh 20880
      SCX((short)1, "scx");
48 ashish 20881
 
20882
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20883
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20884
 
20885
      static {
20886
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20887
          byId.put((int)field._thriftId, field);
20888
          byName.put(field.getFieldName(), field);
20889
        }
20890
      }
20891
 
20892
      /**
20893
       * Find the _Fields constant that matches fieldId, or null if its not found.
20894
       */
20895
      public static _Fields findByThriftId(int fieldId) {
20896
        return byId.get(fieldId);
20897
      }
20898
 
20899
      /**
20900
       * Find the _Fields constant that matches fieldId, throwing an exception
20901
       * if it is not found.
20902
       */
20903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20904
        _Fields fields = findByThriftId(fieldId);
20905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20906
        return fields;
20907
      }
20908
 
20909
      /**
20910
       * Find the _Fields constant that matches name, or null if its not found.
20911
       */
20912
      public static _Fields findByName(String name) {
20913
        return byName.get(name);
20914
      }
20915
 
20916
      private final short _thriftId;
20917
      private final String _fieldName;
20918
 
20919
      _Fields(short thriftId, String fieldName) {
20920
        _thriftId = thriftId;
20921
        _fieldName = fieldName;
20922
      }
20923
 
20924
      public short getThriftFieldId() {
20925
        return _thriftId;
20926
      }
20927
 
20928
      public String getFieldName() {
20929
        return _fieldName;
20930
      }
20931
    }
20932
 
20933
    // isset id assignments
20934
 
20935
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20936
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
553 chandransh 20937
          new ListMetaData(TType.LIST, 
20938
              new StructMetaData(TType.STRUCT, Cart.class))));
20939
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 20940
          new FieldValueMetaData(TType.STRUCT)));
20941
    }});
20942
 
20943
    static {
553 chandransh 20944
      FieldMetaData.addStructMetaDataMap(getCartsByTime_result.class, metaDataMap);
48 ashish 20945
    }
20946
 
553 chandransh 20947
    public getCartsByTime_result() {
48 ashish 20948
    }
20949
 
553 chandransh 20950
    public getCartsByTime_result(
20951
      List<Cart> success,
20952
      ShoppingCartException scx)
48 ashish 20953
    {
20954
      this();
20955
      this.success = success;
553 chandransh 20956
      this.scx = scx;
48 ashish 20957
    }
20958
 
20959
    /**
20960
     * Performs a deep copy on <i>other</i>.
20961
     */
553 chandransh 20962
    public getCartsByTime_result(getCartsByTime_result other) {
20963
      if (other.isSetSuccess()) {
20964
        List<Cart> __this__success = new ArrayList<Cart>();
20965
        for (Cart other_element : other.success) {
20966
          __this__success.add(new Cart(other_element));
20967
        }
20968
        this.success = __this__success;
48 ashish 20969
      }
553 chandransh 20970
      if (other.isSetScx()) {
20971
        this.scx = new ShoppingCartException(other.scx);
20972
      }
48 ashish 20973
    }
20974
 
553 chandransh 20975
    public getCartsByTime_result deepCopy() {
20976
      return new getCartsByTime_result(this);
48 ashish 20977
    }
20978
 
20979
    @Deprecated
553 chandransh 20980
    public getCartsByTime_result clone() {
20981
      return new getCartsByTime_result(this);
48 ashish 20982
    }
20983
 
553 chandransh 20984
    public int getSuccessSize() {
20985
      return (this.success == null) ? 0 : this.success.size();
20986
    }
20987
 
20988
    public java.util.Iterator<Cart> getSuccessIterator() {
20989
      return (this.success == null) ? null : this.success.iterator();
20990
    }
20991
 
20992
    public void addToSuccess(Cart elem) {
20993
      if (this.success == null) {
20994
        this.success = new ArrayList<Cart>();
20995
      }
20996
      this.success.add(elem);
20997
    }
20998
 
20999
    public List<Cart> getSuccess() {
48 ashish 21000
      return this.success;
21001
    }
21002
 
553 chandransh 21003
    public getCartsByTime_result setSuccess(List<Cart> success) {
48 ashish 21004
      this.success = success;
21005
      return this;
21006
    }
21007
 
21008
    public void unsetSuccess() {
553 chandransh 21009
      this.success = null;
48 ashish 21010
    }
21011
 
21012
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21013
    public boolean isSetSuccess() {
553 chandransh 21014
      return this.success != null;
48 ashish 21015
    }
21016
 
21017
    public void setSuccessIsSet(boolean value) {
553 chandransh 21018
      if (!value) {
21019
        this.success = null;
21020
      }
48 ashish 21021
    }
21022
 
553 chandransh 21023
    public ShoppingCartException getScx() {
21024
      return this.scx;
48 ashish 21025
    }
21026
 
553 chandransh 21027
    public getCartsByTime_result setScx(ShoppingCartException scx) {
21028
      this.scx = scx;
48 ashish 21029
      return this;
21030
    }
21031
 
553 chandransh 21032
    public void unsetScx() {
21033
      this.scx = null;
48 ashish 21034
    }
21035
 
553 chandransh 21036
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21037
    public boolean isSetScx() {
21038
      return this.scx != null;
48 ashish 21039
    }
21040
 
553 chandransh 21041
    public void setScxIsSet(boolean value) {
48 ashish 21042
      if (!value) {
553 chandransh 21043
        this.scx = null;
48 ashish 21044
      }
21045
    }
21046
 
21047
    public void setFieldValue(_Fields field, Object value) {
21048
      switch (field) {
21049
      case SUCCESS:
21050
        if (value == null) {
21051
          unsetSuccess();
21052
        } else {
553 chandransh 21053
          setSuccess((List<Cart>)value);
48 ashish 21054
        }
21055
        break;
21056
 
553 chandransh 21057
      case SCX:
48 ashish 21058
        if (value == null) {
553 chandransh 21059
          unsetScx();
48 ashish 21060
        } else {
553 chandransh 21061
          setScx((ShoppingCartException)value);
48 ashish 21062
        }
21063
        break;
21064
 
21065
      }
21066
    }
21067
 
21068
    public void setFieldValue(int fieldID, Object value) {
21069
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21070
    }
21071
 
21072
    public Object getFieldValue(_Fields field) {
21073
      switch (field) {
21074
      case SUCCESS:
553 chandransh 21075
        return getSuccess();
48 ashish 21076
 
553 chandransh 21077
      case SCX:
21078
        return getScx();
48 ashish 21079
 
21080
      }
21081
      throw new IllegalStateException();
21082
    }
21083
 
21084
    public Object getFieldValue(int fieldId) {
21085
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21086
    }
21087
 
21088
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21089
    public boolean isSet(_Fields field) {
21090
      switch (field) {
21091
      case SUCCESS:
21092
        return isSetSuccess();
553 chandransh 21093
      case SCX:
21094
        return isSetScx();
48 ashish 21095
      }
21096
      throw new IllegalStateException();
21097
    }
21098
 
21099
    public boolean isSet(int fieldID) {
21100
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21101
    }
21102
 
21103
    @Override
21104
    public boolean equals(Object that) {
21105
      if (that == null)
21106
        return false;
553 chandransh 21107
      if (that instanceof getCartsByTime_result)
21108
        return this.equals((getCartsByTime_result)that);
48 ashish 21109
      return false;
21110
    }
21111
 
553 chandransh 21112
    public boolean equals(getCartsByTime_result that) {
48 ashish 21113
      if (that == null)
21114
        return false;
21115
 
553 chandransh 21116
      boolean this_present_success = true && this.isSetSuccess();
21117
      boolean that_present_success = true && that.isSetSuccess();
48 ashish 21118
      if (this_present_success || that_present_success) {
21119
        if (!(this_present_success && that_present_success))
21120
          return false;
553 chandransh 21121
        if (!this.success.equals(that.success))
48 ashish 21122
          return false;
21123
      }
21124
 
553 chandransh 21125
      boolean this_present_scx = true && this.isSetScx();
21126
      boolean that_present_scx = true && that.isSetScx();
21127
      if (this_present_scx || that_present_scx) {
21128
        if (!(this_present_scx && that_present_scx))
48 ashish 21129
          return false;
553 chandransh 21130
        if (!this.scx.equals(that.scx))
48 ashish 21131
          return false;
21132
      }
21133
 
21134
      return true;
21135
    }
21136
 
21137
    @Override
21138
    public int hashCode() {
21139
      return 0;
21140
    }
21141
 
553 chandransh 21142
    public int compareTo(getCartsByTime_result other) {
48 ashish 21143
      if (!getClass().equals(other.getClass())) {
21144
        return getClass().getName().compareTo(other.getClass().getName());
21145
      }
21146
 
21147
      int lastComparison = 0;
553 chandransh 21148
      getCartsByTime_result typedOther = (getCartsByTime_result)other;
48 ashish 21149
 
21150
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21151
      if (lastComparison != 0) {
21152
        return lastComparison;
21153
      }
21154
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21155
      if (lastComparison != 0) {
21156
        return lastComparison;
21157
      }
553 chandransh 21158
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 21159
      if (lastComparison != 0) {
21160
        return lastComparison;
21161
      }
553 chandransh 21162
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 21163
      if (lastComparison != 0) {
21164
        return lastComparison;
21165
      }
21166
      return 0;
21167
    }
21168
 
21169
    public void read(TProtocol iprot) throws TException {
21170
      TField field;
21171
      iprot.readStructBegin();
21172
      while (true)
21173
      {
21174
        field = iprot.readFieldBegin();
21175
        if (field.type == TType.STOP) { 
21176
          break;
21177
        }
21178
        _Fields fieldId = _Fields.findByThriftId(field.id);
21179
        if (fieldId == null) {
21180
          TProtocolUtil.skip(iprot, field.type);
21181
        } else {
21182
          switch (fieldId) {
21183
            case SUCCESS:
553 chandransh 21184
              if (field.type == TType.LIST) {
21185
                {
771 rajveer 21186
                  TList _list28 = iprot.readListBegin();
21187
                  this.success = new ArrayList<Cart>(_list28.size);
21188
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
553 chandransh 21189
                  {
771 rajveer 21190
                    Cart _elem30;
21191
                    _elem30 = new Cart();
21192
                    _elem30.read(iprot);
21193
                    this.success.add(_elem30);
553 chandransh 21194
                  }
21195
                  iprot.readListEnd();
21196
                }
48 ashish 21197
              } else { 
21198
                TProtocolUtil.skip(iprot, field.type);
21199
              }
21200
              break;
553 chandransh 21201
            case SCX:
48 ashish 21202
              if (field.type == TType.STRUCT) {
553 chandransh 21203
                this.scx = new ShoppingCartException();
21204
                this.scx.read(iprot);
48 ashish 21205
              } else { 
21206
                TProtocolUtil.skip(iprot, field.type);
21207
              }
21208
              break;
21209
          }
21210
          iprot.readFieldEnd();
21211
        }
21212
      }
21213
      iprot.readStructEnd();
21214
      validate();
21215
    }
21216
 
21217
    public void write(TProtocol oprot) throws TException {
21218
      oprot.writeStructBegin(STRUCT_DESC);
21219
 
21220
      if (this.isSetSuccess()) {
21221
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
553 chandransh 21222
        {
21223
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
771 rajveer 21224
          for (Cart _iter31 : this.success)
553 chandransh 21225
          {
771 rajveer 21226
            _iter31.write(oprot);
553 chandransh 21227
          }
21228
          oprot.writeListEnd();
21229
        }
48 ashish 21230
        oprot.writeFieldEnd();
553 chandransh 21231
      } else if (this.isSetScx()) {
21232
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21233
        this.scx.write(oprot);
48 ashish 21234
        oprot.writeFieldEnd();
21235
      }
21236
      oprot.writeFieldStop();
21237
      oprot.writeStructEnd();
21238
    }
21239
 
21240
    @Override
21241
    public String toString() {
553 chandransh 21242
      StringBuilder sb = new StringBuilder("getCartsByTime_result(");
48 ashish 21243
      boolean first = true;
21244
 
21245
      sb.append("success:");
553 chandransh 21246
      if (this.success == null) {
21247
        sb.append("null");
21248
      } else {
21249
        sb.append(this.success);
21250
      }
48 ashish 21251
      first = false;
21252
      if (!first) sb.append(", ");
553 chandransh 21253
      sb.append("scx:");
21254
      if (this.scx == null) {
48 ashish 21255
        sb.append("null");
21256
      } else {
553 chandransh 21257
        sb.append(this.scx);
48 ashish 21258
      }
21259
      first = false;
21260
      sb.append(")");
21261
      return sb.toString();
21262
    }
21263
 
21264
    public void validate() throws TException {
21265
      // check for required fields
21266
    }
21267
 
21268
  }
21269
 
553 chandransh 21270
  public static class changeCartStatus_args implements TBase<changeCartStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_args>   {
21271
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_args");
48 ashish 21272
 
553 chandransh 21273
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21274
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
48 ashish 21275
 
553 chandransh 21276
    private long cartId;
21277
    private CartStatus status;
48 ashish 21278
 
21279
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21280
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21281
      CART_ID((short)1, "cartId"),
21282
      /**
21283
       * 
21284
       * @see CartStatus
21285
       */
21286
      STATUS((short)2, "status");
48 ashish 21287
 
21288
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21289
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21290
 
21291
      static {
21292
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21293
          byId.put((int)field._thriftId, field);
21294
          byName.put(field.getFieldName(), field);
21295
        }
21296
      }
21297
 
21298
      /**
21299
       * Find the _Fields constant that matches fieldId, or null if its not found.
21300
       */
21301
      public static _Fields findByThriftId(int fieldId) {
21302
        return byId.get(fieldId);
21303
      }
21304
 
21305
      /**
21306
       * Find the _Fields constant that matches fieldId, throwing an exception
21307
       * if it is not found.
21308
       */
21309
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21310
        _Fields fields = findByThriftId(fieldId);
21311
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21312
        return fields;
21313
      }
21314
 
21315
      /**
21316
       * Find the _Fields constant that matches name, or null if its not found.
21317
       */
21318
      public static _Fields findByName(String name) {
21319
        return byName.get(name);
21320
      }
21321
 
21322
      private final short _thriftId;
21323
      private final String _fieldName;
21324
 
21325
      _Fields(short thriftId, String fieldName) {
21326
        _thriftId = thriftId;
21327
        _fieldName = fieldName;
21328
      }
21329
 
21330
      public short getThriftFieldId() {
21331
        return _thriftId;
21332
      }
21333
 
21334
      public String getFieldName() {
21335
        return _fieldName;
21336
      }
21337
    }
21338
 
21339
    // isset id assignments
553 chandransh 21340
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 21341
    private BitSet __isset_bit_vector = new BitSet(1);
21342
 
21343
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21344
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 21345
          new FieldValueMetaData(TType.I64)));
553 chandransh 21346
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
21347
          new EnumMetaData(TType.ENUM, CartStatus.class)));
48 ashish 21348
    }});
21349
 
21350
    static {
553 chandransh 21351
      FieldMetaData.addStructMetaDataMap(changeCartStatus_args.class, metaDataMap);
48 ashish 21352
    }
21353
 
553 chandransh 21354
    public changeCartStatus_args() {
48 ashish 21355
    }
21356
 
553 chandransh 21357
    public changeCartStatus_args(
21358
      long cartId,
21359
      CartStatus status)
48 ashish 21360
    {
21361
      this();
553 chandransh 21362
      this.cartId = cartId;
21363
      setCartIdIsSet(true);
21364
      this.status = status;
48 ashish 21365
    }
21366
 
21367
    /**
21368
     * Performs a deep copy on <i>other</i>.
21369
     */
553 chandransh 21370
    public changeCartStatus_args(changeCartStatus_args other) {
48 ashish 21371
      __isset_bit_vector.clear();
21372
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 21373
      this.cartId = other.cartId;
21374
      if (other.isSetStatus()) {
21375
        this.status = other.status;
21376
      }
48 ashish 21377
    }
21378
 
553 chandransh 21379
    public changeCartStatus_args deepCopy() {
21380
      return new changeCartStatus_args(this);
48 ashish 21381
    }
21382
 
21383
    @Deprecated
553 chandransh 21384
    public changeCartStatus_args clone() {
21385
      return new changeCartStatus_args(this);
48 ashish 21386
    }
21387
 
553 chandransh 21388
    public long getCartId() {
21389
      return this.cartId;
48 ashish 21390
    }
21391
 
553 chandransh 21392
    public changeCartStatus_args setCartId(long cartId) {
21393
      this.cartId = cartId;
21394
      setCartIdIsSet(true);
48 ashish 21395
      return this;
21396
    }
21397
 
553 chandransh 21398
    public void unsetCartId() {
21399
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 21400
    }
21401
 
553 chandransh 21402
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
21403
    public boolean isSetCartId() {
21404
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 21405
    }
21406
 
553 chandransh 21407
    public void setCartIdIsSet(boolean value) {
21408
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 21409
    }
21410
 
553 chandransh 21411
    /**
21412
     * 
21413
     * @see CartStatus
21414
     */
21415
    public CartStatus getStatus() {
21416
      return this.status;
21417
    }
21418
 
21419
    /**
21420
     * 
21421
     * @see CartStatus
21422
     */
21423
    public changeCartStatus_args setStatus(CartStatus status) {
21424
      this.status = status;
21425
      return this;
21426
    }
21427
 
21428
    public void unsetStatus() {
21429
      this.status = null;
21430
    }
21431
 
21432
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
21433
    public boolean isSetStatus() {
21434
      return this.status != null;
21435
    }
21436
 
21437
    public void setStatusIsSet(boolean value) {
21438
      if (!value) {
21439
        this.status = null;
21440
      }
21441
    }
21442
 
48 ashish 21443
    public void setFieldValue(_Fields field, Object value) {
21444
      switch (field) {
553 chandransh 21445
      case CART_ID:
48 ashish 21446
        if (value == null) {
553 chandransh 21447
          unsetCartId();
48 ashish 21448
        } else {
553 chandransh 21449
          setCartId((Long)value);
48 ashish 21450
        }
21451
        break;
21452
 
553 chandransh 21453
      case STATUS:
21454
        if (value == null) {
21455
          unsetStatus();
21456
        } else {
21457
          setStatus((CartStatus)value);
21458
        }
21459
        break;
21460
 
48 ashish 21461
      }
21462
    }
21463
 
21464
    public void setFieldValue(int fieldID, Object value) {
21465
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21466
    }
21467
 
21468
    public Object getFieldValue(_Fields field) {
21469
      switch (field) {
553 chandransh 21470
      case CART_ID:
21471
        return new Long(getCartId());
48 ashish 21472
 
553 chandransh 21473
      case STATUS:
21474
        return getStatus();
21475
 
48 ashish 21476
      }
21477
      throw new IllegalStateException();
21478
    }
21479
 
21480
    public Object getFieldValue(int fieldId) {
21481
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21482
    }
21483
 
21484
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21485
    public boolean isSet(_Fields field) {
21486
      switch (field) {
553 chandransh 21487
      case CART_ID:
21488
        return isSetCartId();
21489
      case STATUS:
21490
        return isSetStatus();
48 ashish 21491
      }
21492
      throw new IllegalStateException();
21493
    }
21494
 
21495
    public boolean isSet(int fieldID) {
21496
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21497
    }
21498
 
21499
    @Override
21500
    public boolean equals(Object that) {
21501
      if (that == null)
21502
        return false;
553 chandransh 21503
      if (that instanceof changeCartStatus_args)
21504
        return this.equals((changeCartStatus_args)that);
48 ashish 21505
      return false;
21506
    }
21507
 
553 chandransh 21508
    public boolean equals(changeCartStatus_args that) {
48 ashish 21509
      if (that == null)
21510
        return false;
21511
 
553 chandransh 21512
      boolean this_present_cartId = true;
21513
      boolean that_present_cartId = true;
21514
      if (this_present_cartId || that_present_cartId) {
21515
        if (!(this_present_cartId && that_present_cartId))
48 ashish 21516
          return false;
553 chandransh 21517
        if (this.cartId != that.cartId)
48 ashish 21518
          return false;
21519
      }
21520
 
553 chandransh 21521
      boolean this_present_status = true && this.isSetStatus();
21522
      boolean that_present_status = true && that.isSetStatus();
21523
      if (this_present_status || that_present_status) {
21524
        if (!(this_present_status && that_present_status))
21525
          return false;
21526
        if (!this.status.equals(that.status))
21527
          return false;
21528
      }
21529
 
48 ashish 21530
      return true;
21531
    }
21532
 
21533
    @Override
21534
    public int hashCode() {
21535
      return 0;
21536
    }
21537
 
553 chandransh 21538
    public int compareTo(changeCartStatus_args other) {
48 ashish 21539
      if (!getClass().equals(other.getClass())) {
21540
        return getClass().getName().compareTo(other.getClass().getName());
21541
      }
21542
 
21543
      int lastComparison = 0;
553 chandransh 21544
      changeCartStatus_args typedOther = (changeCartStatus_args)other;
48 ashish 21545
 
553 chandransh 21546
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 21547
      if (lastComparison != 0) {
21548
        return lastComparison;
21549
      }
553 chandransh 21550
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 21551
      if (lastComparison != 0) {
21552
        return lastComparison;
21553
      }
553 chandransh 21554
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
21555
      if (lastComparison != 0) {
21556
        return lastComparison;
21557
      }
21558
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
21559
      if (lastComparison != 0) {
21560
        return lastComparison;
21561
      }
48 ashish 21562
      return 0;
21563
    }
21564
 
21565
    public void read(TProtocol iprot) throws TException {
21566
      TField field;
21567
      iprot.readStructBegin();
21568
      while (true)
21569
      {
21570
        field = iprot.readFieldBegin();
21571
        if (field.type == TType.STOP) { 
21572
          break;
21573
        }
21574
        _Fields fieldId = _Fields.findByThriftId(field.id);
21575
        if (fieldId == null) {
21576
          TProtocolUtil.skip(iprot, field.type);
21577
        } else {
21578
          switch (fieldId) {
553 chandransh 21579
            case CART_ID:
48 ashish 21580
              if (field.type == TType.I64) {
553 chandransh 21581
                this.cartId = iprot.readI64();
21582
                setCartIdIsSet(true);
48 ashish 21583
              } else { 
21584
                TProtocolUtil.skip(iprot, field.type);
21585
              }
21586
              break;
553 chandransh 21587
            case STATUS:
21588
              if (field.type == TType.I32) {
21589
                this.status = CartStatus.findByValue(iprot.readI32());
21590
              } else { 
21591
                TProtocolUtil.skip(iprot, field.type);
21592
              }
21593
              break;
48 ashish 21594
          }
21595
          iprot.readFieldEnd();
21596
        }
21597
      }
21598
      iprot.readStructEnd();
21599
      validate();
21600
    }
21601
 
21602
    public void write(TProtocol oprot) throws TException {
21603
      validate();
21604
 
21605
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 21606
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
21607
      oprot.writeI64(this.cartId);
48 ashish 21608
      oprot.writeFieldEnd();
553 chandransh 21609
      if (this.status != null) {
21610
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
21611
        oprot.writeI32(this.status.getValue());
21612
        oprot.writeFieldEnd();
21613
      }
48 ashish 21614
      oprot.writeFieldStop();
21615
      oprot.writeStructEnd();
21616
    }
21617
 
21618
    @Override
21619
    public String toString() {
553 chandransh 21620
      StringBuilder sb = new StringBuilder("changeCartStatus_args(");
48 ashish 21621
      boolean first = true;
21622
 
553 chandransh 21623
      sb.append("cartId:");
21624
      sb.append(this.cartId);
48 ashish 21625
      first = false;
553 chandransh 21626
      if (!first) sb.append(", ");
21627
      sb.append("status:");
21628
      if (this.status == null) {
21629
        sb.append("null");
21630
      } else {
21631
        String status_name = status.name();
21632
        if (status_name != null) {
21633
          sb.append(status_name);
21634
          sb.append(" (");
21635
        }
21636
        sb.append(this.status);
21637
        if (status_name != null) {
21638
          sb.append(")");
21639
        }
21640
      }
21641
      first = false;
48 ashish 21642
      sb.append(")");
21643
      return sb.toString();
21644
    }
21645
 
21646
    public void validate() throws TException {
21647
      // check for required fields
21648
    }
21649
 
21650
  }
21651
 
553 chandransh 21652
  public static class changeCartStatus_result implements TBase<changeCartStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeCartStatus_result>   {
21653
    private static final TStruct STRUCT_DESC = new TStruct("changeCartStatus_result");
48 ashish 21654
 
553 chandransh 21655
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 21656
 
553 chandransh 21657
    private ShoppingCartException scx;
48 ashish 21658
 
21659
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21660
    public enum _Fields implements TFieldIdEnum {
553 chandransh 21661
      SCX((short)1, "scx");
48 ashish 21662
 
21663
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21664
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21665
 
21666
      static {
21667
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21668
          byId.put((int)field._thriftId, field);
21669
          byName.put(field.getFieldName(), field);
21670
        }
21671
      }
21672
 
21673
      /**
21674
       * Find the _Fields constant that matches fieldId, or null if its not found.
21675
       */
21676
      public static _Fields findByThriftId(int fieldId) {
21677
        return byId.get(fieldId);
21678
      }
21679
 
21680
      /**
21681
       * Find the _Fields constant that matches fieldId, throwing an exception
21682
       * if it is not found.
21683
       */
21684
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21685
        _Fields fields = findByThriftId(fieldId);
21686
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21687
        return fields;
21688
      }
21689
 
21690
      /**
21691
       * Find the _Fields constant that matches name, or null if its not found.
21692
       */
21693
      public static _Fields findByName(String name) {
21694
        return byName.get(name);
21695
      }
21696
 
21697
      private final short _thriftId;
21698
      private final String _fieldName;
21699
 
21700
      _Fields(short thriftId, String fieldName) {
21701
        _thriftId = thriftId;
21702
        _fieldName = fieldName;
21703
      }
21704
 
21705
      public short getThriftFieldId() {
21706
        return _thriftId;
21707
      }
21708
 
21709
      public String getFieldName() {
21710
        return _fieldName;
21711
      }
21712
    }
21713
 
21714
    // isset id assignments
21715
 
21716
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 21717
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 21718
          new FieldValueMetaData(TType.STRUCT)));
21719
    }});
21720
 
21721
    static {
553 chandransh 21722
      FieldMetaData.addStructMetaDataMap(changeCartStatus_result.class, metaDataMap);
48 ashish 21723
    }
21724
 
553 chandransh 21725
    public changeCartStatus_result() {
48 ashish 21726
    }
21727
 
553 chandransh 21728
    public changeCartStatus_result(
21729
      ShoppingCartException scx)
48 ashish 21730
    {
21731
      this();
553 chandransh 21732
      this.scx = scx;
48 ashish 21733
    }
21734
 
21735
    /**
21736
     * Performs a deep copy on <i>other</i>.
21737
     */
553 chandransh 21738
    public changeCartStatus_result(changeCartStatus_result other) {
21739
      if (other.isSetScx()) {
21740
        this.scx = new ShoppingCartException(other.scx);
21741
      }
21742
    }
21743
 
21744
    public changeCartStatus_result deepCopy() {
21745
      return new changeCartStatus_result(this);
21746
    }
21747
 
21748
    @Deprecated
21749
    public changeCartStatus_result clone() {
21750
      return new changeCartStatus_result(this);
21751
    }
21752
 
21753
    public ShoppingCartException getScx() {
21754
      return this.scx;
21755
    }
21756
 
21757
    public changeCartStatus_result setScx(ShoppingCartException scx) {
21758
      this.scx = scx;
21759
      return this;
21760
    }
21761
 
21762
    public void unsetScx() {
21763
      this.scx = null;
21764
    }
21765
 
21766
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
21767
    public boolean isSetScx() {
21768
      return this.scx != null;
21769
    }
21770
 
21771
    public void setScxIsSet(boolean value) {
21772
      if (!value) {
21773
        this.scx = null;
21774
      }
21775
    }
21776
 
21777
    public void setFieldValue(_Fields field, Object value) {
21778
      switch (field) {
21779
      case SCX:
21780
        if (value == null) {
21781
          unsetScx();
21782
        } else {
21783
          setScx((ShoppingCartException)value);
21784
        }
21785
        break;
21786
 
21787
      }
21788
    }
21789
 
21790
    public void setFieldValue(int fieldID, Object value) {
21791
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21792
    }
21793
 
21794
    public Object getFieldValue(_Fields field) {
21795
      switch (field) {
21796
      case SCX:
21797
        return getScx();
21798
 
21799
      }
21800
      throw new IllegalStateException();
21801
    }
21802
 
21803
    public Object getFieldValue(int fieldId) {
21804
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21805
    }
21806
 
21807
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21808
    public boolean isSet(_Fields field) {
21809
      switch (field) {
21810
      case SCX:
21811
        return isSetScx();
21812
      }
21813
      throw new IllegalStateException();
21814
    }
21815
 
21816
    public boolean isSet(int fieldID) {
21817
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21818
    }
21819
 
21820
    @Override
21821
    public boolean equals(Object that) {
21822
      if (that == null)
21823
        return false;
21824
      if (that instanceof changeCartStatus_result)
21825
        return this.equals((changeCartStatus_result)that);
21826
      return false;
21827
    }
21828
 
21829
    public boolean equals(changeCartStatus_result that) {
21830
      if (that == null)
21831
        return false;
21832
 
21833
      boolean this_present_scx = true && this.isSetScx();
21834
      boolean that_present_scx = true && that.isSetScx();
21835
      if (this_present_scx || that_present_scx) {
21836
        if (!(this_present_scx && that_present_scx))
21837
          return false;
21838
        if (!this.scx.equals(that.scx))
21839
          return false;
21840
      }
21841
 
21842
      return true;
21843
    }
21844
 
21845
    @Override
21846
    public int hashCode() {
21847
      return 0;
21848
    }
21849
 
21850
    public int compareTo(changeCartStatus_result other) {
21851
      if (!getClass().equals(other.getClass())) {
21852
        return getClass().getName().compareTo(other.getClass().getName());
21853
      }
21854
 
21855
      int lastComparison = 0;
21856
      changeCartStatus_result typedOther = (changeCartStatus_result)other;
21857
 
21858
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
21859
      if (lastComparison != 0) {
21860
        return lastComparison;
21861
      }
21862
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
21863
      if (lastComparison != 0) {
21864
        return lastComparison;
21865
      }
21866
      return 0;
21867
    }
21868
 
21869
    public void read(TProtocol iprot) throws TException {
21870
      TField field;
21871
      iprot.readStructBegin();
21872
      while (true)
21873
      {
21874
        field = iprot.readFieldBegin();
21875
        if (field.type == TType.STOP) { 
21876
          break;
21877
        }
21878
        _Fields fieldId = _Fields.findByThriftId(field.id);
21879
        if (fieldId == null) {
21880
          TProtocolUtil.skip(iprot, field.type);
21881
        } else {
21882
          switch (fieldId) {
21883
            case SCX:
21884
              if (field.type == TType.STRUCT) {
21885
                this.scx = new ShoppingCartException();
21886
                this.scx.read(iprot);
21887
              } else { 
21888
                TProtocolUtil.skip(iprot, field.type);
21889
              }
21890
              break;
21891
          }
21892
          iprot.readFieldEnd();
21893
        }
21894
      }
21895
      iprot.readStructEnd();
21896
      validate();
21897
    }
21898
 
21899
    public void write(TProtocol oprot) throws TException {
21900
      oprot.writeStructBegin(STRUCT_DESC);
21901
 
21902
      if (this.isSetScx()) {
21903
        oprot.writeFieldBegin(SCX_FIELD_DESC);
21904
        this.scx.write(oprot);
21905
        oprot.writeFieldEnd();
21906
      }
21907
      oprot.writeFieldStop();
21908
      oprot.writeStructEnd();
21909
    }
21910
 
21911
    @Override
21912
    public String toString() {
21913
      StringBuilder sb = new StringBuilder("changeCartStatus_result(");
21914
      boolean first = true;
21915
 
21916
      sb.append("scx:");
21917
      if (this.scx == null) {
21918
        sb.append("null");
21919
      } else {
21920
        sb.append(this.scx);
21921
      }
21922
      first = false;
21923
      sb.append(")");
21924
      return sb.toString();
21925
    }
21926
 
21927
    public void validate() throws TException {
21928
      // check for required fields
21929
    }
21930
 
21931
  }
21932
 
21933
  public static class addItemToCart_args implements TBase<addItemToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_args>   {
21934
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_args");
21935
 
21936
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
21937
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
21938
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
21939
 
21940
    private long cartId;
21941
    private long itemId;
21942
    private long quantity;
21943
 
21944
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21945
    public enum _Fields implements TFieldIdEnum {
21946
      CART_ID((short)1, "cartId"),
21947
      ITEM_ID((short)2, "itemId"),
21948
      QUANTITY((short)3, "quantity");
21949
 
21950
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21952
 
21953
      static {
21954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21955
          byId.put((int)field._thriftId, field);
21956
          byName.put(field.getFieldName(), field);
21957
        }
21958
      }
21959
 
21960
      /**
21961
       * Find the _Fields constant that matches fieldId, or null if its not found.
21962
       */
21963
      public static _Fields findByThriftId(int fieldId) {
21964
        return byId.get(fieldId);
21965
      }
21966
 
21967
      /**
21968
       * Find the _Fields constant that matches fieldId, throwing an exception
21969
       * if it is not found.
21970
       */
21971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21972
        _Fields fields = findByThriftId(fieldId);
21973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21974
        return fields;
21975
      }
21976
 
21977
      /**
21978
       * Find the _Fields constant that matches name, or null if its not found.
21979
       */
21980
      public static _Fields findByName(String name) {
21981
        return byName.get(name);
21982
      }
21983
 
21984
      private final short _thriftId;
21985
      private final String _fieldName;
21986
 
21987
      _Fields(short thriftId, String fieldName) {
21988
        _thriftId = thriftId;
21989
        _fieldName = fieldName;
21990
      }
21991
 
21992
      public short getThriftFieldId() {
21993
        return _thriftId;
21994
      }
21995
 
21996
      public String getFieldName() {
21997
        return _fieldName;
21998
      }
21999
    }
22000
 
22001
    // isset id assignments
22002
    private static final int __CARTID_ISSET_ID = 0;
22003
    private static final int __ITEMID_ISSET_ID = 1;
22004
    private static final int __QUANTITY_ISSET_ID = 2;
22005
    private BitSet __isset_bit_vector = new BitSet(3);
22006
 
22007
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22008
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22009
          new FieldValueMetaData(TType.I64)));
22010
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22011
          new FieldValueMetaData(TType.I64)));
22012
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
22013
          new FieldValueMetaData(TType.I64)));
22014
    }});
22015
 
22016
    static {
22017
      FieldMetaData.addStructMetaDataMap(addItemToCart_args.class, metaDataMap);
22018
    }
22019
 
22020
    public addItemToCart_args() {
22021
    }
22022
 
22023
    public addItemToCart_args(
22024
      long cartId,
22025
      long itemId,
22026
      long quantity)
22027
    {
22028
      this();
22029
      this.cartId = cartId;
22030
      setCartIdIsSet(true);
22031
      this.itemId = itemId;
22032
      setItemIdIsSet(true);
22033
      this.quantity = quantity;
22034
      setQuantityIsSet(true);
22035
    }
22036
 
22037
    /**
22038
     * Performs a deep copy on <i>other</i>.
22039
     */
22040
    public addItemToCart_args(addItemToCart_args other) {
48 ashish 22041
      __isset_bit_vector.clear();
22042
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 22043
      this.cartId = other.cartId;
22044
      this.itemId = other.itemId;
22045
      this.quantity = other.quantity;
48 ashish 22046
    }
22047
 
553 chandransh 22048
    public addItemToCart_args deepCopy() {
22049
      return new addItemToCart_args(this);
48 ashish 22050
    }
22051
 
22052
    @Deprecated
553 chandransh 22053
    public addItemToCart_args clone() {
22054
      return new addItemToCart_args(this);
48 ashish 22055
    }
22056
 
553 chandransh 22057
    public long getCartId() {
22058
      return this.cartId;
48 ashish 22059
    }
22060
 
553 chandransh 22061
    public addItemToCart_args setCartId(long cartId) {
22062
      this.cartId = cartId;
22063
      setCartIdIsSet(true);
48 ashish 22064
      return this;
22065
    }
22066
 
553 chandransh 22067
    public void unsetCartId() {
22068
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 22069
    }
22070
 
553 chandransh 22071
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22072
    public boolean isSetCartId() {
22073
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 22074
    }
22075
 
553 chandransh 22076
    public void setCartIdIsSet(boolean value) {
22077
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 22078
    }
22079
 
553 chandransh 22080
    public long getItemId() {
22081
      return this.itemId;
48 ashish 22082
    }
22083
 
553 chandransh 22084
    public addItemToCart_args setItemId(long itemId) {
22085
      this.itemId = itemId;
22086
      setItemIdIsSet(true);
48 ashish 22087
      return this;
22088
    }
22089
 
553 chandransh 22090
    public void unsetItemId() {
22091
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 22092
    }
22093
 
553 chandransh 22094
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22095
    public boolean isSetItemId() {
22096
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 22097
    }
22098
 
553 chandransh 22099
    public void setItemIdIsSet(boolean value) {
22100
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22101
    }
22102
 
22103
    public long getQuantity() {
22104
      return this.quantity;
22105
    }
22106
 
22107
    public addItemToCart_args setQuantity(long quantity) {
22108
      this.quantity = quantity;
22109
      setQuantityIsSet(true);
22110
      return this;
22111
    }
22112
 
22113
    public void unsetQuantity() {
22114
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
22115
    }
22116
 
22117
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
22118
    public boolean isSetQuantity() {
22119
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
22120
    }
22121
 
22122
    public void setQuantityIsSet(boolean value) {
22123
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
22124
    }
22125
 
22126
    public void setFieldValue(_Fields field, Object value) {
22127
      switch (field) {
22128
      case CART_ID:
22129
        if (value == null) {
22130
          unsetCartId();
22131
        } else {
22132
          setCartId((Long)value);
22133
        }
22134
        break;
22135
 
22136
      case ITEM_ID:
22137
        if (value == null) {
22138
          unsetItemId();
22139
        } else {
22140
          setItemId((Long)value);
22141
        }
22142
        break;
22143
 
22144
      case QUANTITY:
22145
        if (value == null) {
22146
          unsetQuantity();
22147
        } else {
22148
          setQuantity((Long)value);
22149
        }
22150
        break;
22151
 
22152
      }
22153
    }
22154
 
22155
    public void setFieldValue(int fieldID, Object value) {
22156
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22157
    }
22158
 
22159
    public Object getFieldValue(_Fields field) {
22160
      switch (field) {
22161
      case CART_ID:
22162
        return new Long(getCartId());
22163
 
22164
      case ITEM_ID:
22165
        return new Long(getItemId());
22166
 
22167
      case QUANTITY:
22168
        return new Long(getQuantity());
22169
 
22170
      }
22171
      throw new IllegalStateException();
22172
    }
22173
 
22174
    public Object getFieldValue(int fieldId) {
22175
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22176
    }
22177
 
22178
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22179
    public boolean isSet(_Fields field) {
22180
      switch (field) {
22181
      case CART_ID:
22182
        return isSetCartId();
22183
      case ITEM_ID:
22184
        return isSetItemId();
22185
      case QUANTITY:
22186
        return isSetQuantity();
22187
      }
22188
      throw new IllegalStateException();
22189
    }
22190
 
22191
    public boolean isSet(int fieldID) {
22192
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22193
    }
22194
 
22195
    @Override
22196
    public boolean equals(Object that) {
22197
      if (that == null)
22198
        return false;
22199
      if (that instanceof addItemToCart_args)
22200
        return this.equals((addItemToCart_args)that);
22201
      return false;
22202
    }
22203
 
22204
    public boolean equals(addItemToCart_args that) {
22205
      if (that == null)
22206
        return false;
22207
 
22208
      boolean this_present_cartId = true;
22209
      boolean that_present_cartId = true;
22210
      if (this_present_cartId || that_present_cartId) {
22211
        if (!(this_present_cartId && that_present_cartId))
22212
          return false;
22213
        if (this.cartId != that.cartId)
22214
          return false;
22215
      }
22216
 
22217
      boolean this_present_itemId = true;
22218
      boolean that_present_itemId = true;
22219
      if (this_present_itemId || that_present_itemId) {
22220
        if (!(this_present_itemId && that_present_itemId))
22221
          return false;
22222
        if (this.itemId != that.itemId)
22223
          return false;
22224
      }
22225
 
22226
      boolean this_present_quantity = true;
22227
      boolean that_present_quantity = true;
22228
      if (this_present_quantity || that_present_quantity) {
22229
        if (!(this_present_quantity && that_present_quantity))
22230
          return false;
22231
        if (this.quantity != that.quantity)
22232
          return false;
22233
      }
22234
 
22235
      return true;
22236
    }
22237
 
22238
    @Override
22239
    public int hashCode() {
22240
      return 0;
22241
    }
22242
 
22243
    public int compareTo(addItemToCart_args other) {
22244
      if (!getClass().equals(other.getClass())) {
22245
        return getClass().getName().compareTo(other.getClass().getName());
22246
      }
22247
 
22248
      int lastComparison = 0;
22249
      addItemToCart_args typedOther = (addItemToCart_args)other;
22250
 
22251
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
22252
      if (lastComparison != 0) {
22253
        return lastComparison;
22254
      }
22255
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
22256
      if (lastComparison != 0) {
22257
        return lastComparison;
22258
      }
22259
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
22260
      if (lastComparison != 0) {
22261
        return lastComparison;
22262
      }
22263
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
22264
      if (lastComparison != 0) {
22265
        return lastComparison;
22266
      }
22267
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
22268
      if (lastComparison != 0) {
22269
        return lastComparison;
22270
      }
22271
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
22272
      if (lastComparison != 0) {
22273
        return lastComparison;
22274
      }
22275
      return 0;
22276
    }
22277
 
22278
    public void read(TProtocol iprot) throws TException {
22279
      TField field;
22280
      iprot.readStructBegin();
22281
      while (true)
22282
      {
22283
        field = iprot.readFieldBegin();
22284
        if (field.type == TType.STOP) { 
22285
          break;
22286
        }
22287
        _Fields fieldId = _Fields.findByThriftId(field.id);
22288
        if (fieldId == null) {
22289
          TProtocolUtil.skip(iprot, field.type);
22290
        } else {
22291
          switch (fieldId) {
22292
            case CART_ID:
22293
              if (field.type == TType.I64) {
22294
                this.cartId = iprot.readI64();
22295
                setCartIdIsSet(true);
22296
              } else { 
22297
                TProtocolUtil.skip(iprot, field.type);
22298
              }
22299
              break;
22300
            case ITEM_ID:
22301
              if (field.type == TType.I64) {
22302
                this.itemId = iprot.readI64();
22303
                setItemIdIsSet(true);
22304
              } else { 
22305
                TProtocolUtil.skip(iprot, field.type);
22306
              }
22307
              break;
22308
            case QUANTITY:
22309
              if (field.type == TType.I64) {
22310
                this.quantity = iprot.readI64();
22311
                setQuantityIsSet(true);
22312
              } else { 
22313
                TProtocolUtil.skip(iprot, field.type);
22314
              }
22315
              break;
22316
          }
22317
          iprot.readFieldEnd();
22318
        }
22319
      }
22320
      iprot.readStructEnd();
22321
      validate();
22322
    }
22323
 
22324
    public void write(TProtocol oprot) throws TException {
22325
      validate();
22326
 
22327
      oprot.writeStructBegin(STRUCT_DESC);
22328
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22329
      oprot.writeI64(this.cartId);
22330
      oprot.writeFieldEnd();
22331
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22332
      oprot.writeI64(this.itemId);
22333
      oprot.writeFieldEnd();
22334
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
22335
      oprot.writeI64(this.quantity);
22336
      oprot.writeFieldEnd();
22337
      oprot.writeFieldStop();
22338
      oprot.writeStructEnd();
22339
    }
22340
 
22341
    @Override
22342
    public String toString() {
22343
      StringBuilder sb = new StringBuilder("addItemToCart_args(");
22344
      boolean first = true;
22345
 
22346
      sb.append("cartId:");
22347
      sb.append(this.cartId);
22348
      first = false;
22349
      if (!first) sb.append(", ");
22350
      sb.append("itemId:");
22351
      sb.append(this.itemId);
22352
      first = false;
22353
      if (!first) sb.append(", ");
22354
      sb.append("quantity:");
22355
      sb.append(this.quantity);
22356
      first = false;
22357
      sb.append(")");
22358
      return sb.toString();
22359
    }
22360
 
22361
    public void validate() throws TException {
22362
      // check for required fields
22363
    }
22364
 
22365
  }
22366
 
22367
  public static class addItemToCart_result implements TBase<addItemToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addItemToCart_result>   {
22368
    private static final TStruct STRUCT_DESC = new TStruct("addItemToCart_result");
22369
 
22370
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
22371
 
22372
    private ShoppingCartException scx;
22373
 
22374
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22375
    public enum _Fields implements TFieldIdEnum {
22376
      SCX((short)1, "scx");
22377
 
22378
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22379
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22380
 
22381
      static {
22382
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22383
          byId.put((int)field._thriftId, field);
22384
          byName.put(field.getFieldName(), field);
22385
        }
22386
      }
22387
 
22388
      /**
22389
       * Find the _Fields constant that matches fieldId, or null if its not found.
22390
       */
22391
      public static _Fields findByThriftId(int fieldId) {
22392
        return byId.get(fieldId);
22393
      }
22394
 
22395
      /**
22396
       * Find the _Fields constant that matches fieldId, throwing an exception
22397
       * if it is not found.
22398
       */
22399
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22400
        _Fields fields = findByThriftId(fieldId);
22401
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22402
        return fields;
22403
      }
22404
 
22405
      /**
22406
       * Find the _Fields constant that matches name, or null if its not found.
22407
       */
22408
      public static _Fields findByName(String name) {
22409
        return byName.get(name);
22410
      }
22411
 
22412
      private final short _thriftId;
22413
      private final String _fieldName;
22414
 
22415
      _Fields(short thriftId, String fieldName) {
22416
        _thriftId = thriftId;
22417
        _fieldName = fieldName;
22418
      }
22419
 
22420
      public short getThriftFieldId() {
22421
        return _thriftId;
22422
      }
22423
 
22424
      public String getFieldName() {
22425
        return _fieldName;
22426
      }
22427
    }
22428
 
22429
    // isset id assignments
22430
 
22431
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22432
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
22433
          new FieldValueMetaData(TType.STRUCT)));
22434
    }});
22435
 
22436
    static {
22437
      FieldMetaData.addStructMetaDataMap(addItemToCart_result.class, metaDataMap);
22438
    }
22439
 
22440
    public addItemToCart_result() {
22441
    }
22442
 
22443
    public addItemToCart_result(
22444
      ShoppingCartException scx)
22445
    {
22446
      this();
22447
      this.scx = scx;
22448
    }
22449
 
22450
    /**
22451
     * Performs a deep copy on <i>other</i>.
22452
     */
22453
    public addItemToCart_result(addItemToCart_result other) {
22454
      if (other.isSetScx()) {
22455
        this.scx = new ShoppingCartException(other.scx);
22456
      }
22457
    }
22458
 
22459
    public addItemToCart_result deepCopy() {
22460
      return new addItemToCart_result(this);
22461
    }
22462
 
22463
    @Deprecated
22464
    public addItemToCart_result clone() {
22465
      return new addItemToCart_result(this);
22466
    }
22467
 
22468
    public ShoppingCartException getScx() {
22469
      return this.scx;
22470
    }
22471
 
22472
    public addItemToCart_result setScx(ShoppingCartException scx) {
22473
      this.scx = scx;
22474
      return this;
22475
    }
22476
 
22477
    public void unsetScx() {
22478
      this.scx = null;
22479
    }
22480
 
22481
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
22482
    public boolean isSetScx() {
22483
      return this.scx != null;
22484
    }
22485
 
22486
    public void setScxIsSet(boolean value) {
48 ashish 22487
      if (!value) {
553 chandransh 22488
        this.scx = null;
48 ashish 22489
      }
22490
    }
22491
 
22492
    public void setFieldValue(_Fields field, Object value) {
22493
      switch (field) {
553 chandransh 22494
      case SCX:
48 ashish 22495
        if (value == null) {
553 chandransh 22496
          unsetScx();
48 ashish 22497
        } else {
553 chandransh 22498
          setScx((ShoppingCartException)value);
48 ashish 22499
        }
22500
        break;
22501
 
553 chandransh 22502
      }
22503
    }
22504
 
22505
    public void setFieldValue(int fieldID, Object value) {
22506
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22507
    }
22508
 
22509
    public Object getFieldValue(_Fields field) {
22510
      switch (field) {
22511
      case SCX:
22512
        return getScx();
22513
 
22514
      }
22515
      throw new IllegalStateException();
22516
    }
22517
 
22518
    public Object getFieldValue(int fieldId) {
22519
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22520
    }
22521
 
22522
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22523
    public boolean isSet(_Fields field) {
22524
      switch (field) {
22525
      case SCX:
22526
        return isSetScx();
22527
      }
22528
      throw new IllegalStateException();
22529
    }
22530
 
22531
    public boolean isSet(int fieldID) {
22532
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22533
    }
22534
 
22535
    @Override
22536
    public boolean equals(Object that) {
22537
      if (that == null)
22538
        return false;
22539
      if (that instanceof addItemToCart_result)
22540
        return this.equals((addItemToCart_result)that);
22541
      return false;
22542
    }
22543
 
22544
    public boolean equals(addItemToCart_result that) {
22545
      if (that == null)
22546
        return false;
22547
 
22548
      boolean this_present_scx = true && this.isSetScx();
22549
      boolean that_present_scx = true && that.isSetScx();
22550
      if (this_present_scx || that_present_scx) {
22551
        if (!(this_present_scx && that_present_scx))
22552
          return false;
22553
        if (!this.scx.equals(that.scx))
22554
          return false;
22555
      }
22556
 
22557
      return true;
22558
    }
22559
 
22560
    @Override
22561
    public int hashCode() {
22562
      return 0;
22563
    }
22564
 
22565
    public int compareTo(addItemToCart_result other) {
22566
      if (!getClass().equals(other.getClass())) {
22567
        return getClass().getName().compareTo(other.getClass().getName());
22568
      }
22569
 
22570
      int lastComparison = 0;
22571
      addItemToCart_result typedOther = (addItemToCart_result)other;
22572
 
22573
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
22574
      if (lastComparison != 0) {
22575
        return lastComparison;
22576
      }
22577
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
22578
      if (lastComparison != 0) {
22579
        return lastComparison;
22580
      }
22581
      return 0;
22582
    }
22583
 
22584
    public void read(TProtocol iprot) throws TException {
22585
      TField field;
22586
      iprot.readStructBegin();
22587
      while (true)
22588
      {
22589
        field = iprot.readFieldBegin();
22590
        if (field.type == TType.STOP) { 
22591
          break;
22592
        }
22593
        _Fields fieldId = _Fields.findByThriftId(field.id);
22594
        if (fieldId == null) {
22595
          TProtocolUtil.skip(iprot, field.type);
22596
        } else {
22597
          switch (fieldId) {
22598
            case SCX:
22599
              if (field.type == TType.STRUCT) {
22600
                this.scx = new ShoppingCartException();
22601
                this.scx.read(iprot);
22602
              } else { 
22603
                TProtocolUtil.skip(iprot, field.type);
22604
              }
22605
              break;
22606
          }
22607
          iprot.readFieldEnd();
22608
        }
22609
      }
22610
      iprot.readStructEnd();
22611
      validate();
22612
    }
22613
 
22614
    public void write(TProtocol oprot) throws TException {
22615
      oprot.writeStructBegin(STRUCT_DESC);
22616
 
22617
      if (this.isSetScx()) {
22618
        oprot.writeFieldBegin(SCX_FIELD_DESC);
22619
        this.scx.write(oprot);
22620
        oprot.writeFieldEnd();
22621
      }
22622
      oprot.writeFieldStop();
22623
      oprot.writeStructEnd();
22624
    }
22625
 
22626
    @Override
22627
    public String toString() {
22628
      StringBuilder sb = new StringBuilder("addItemToCart_result(");
22629
      boolean first = true;
22630
 
22631
      sb.append("scx:");
22632
      if (this.scx == null) {
22633
        sb.append("null");
22634
      } else {
22635
        sb.append(this.scx);
22636
      }
22637
      first = false;
22638
      sb.append(")");
22639
      return sb.toString();
22640
    }
22641
 
22642
    public void validate() throws TException {
22643
      // check for required fields
22644
    }
22645
 
22646
  }
22647
 
22648
  public static class deleteItemFromCart_args implements TBase<deleteItemFromCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_args>   {
22649
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_args");
22650
 
22651
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
22652
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
22653
 
22654
    private long cartId;
22655
    private long itemId;
22656
 
22657
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22658
    public enum _Fields implements TFieldIdEnum {
22659
      CART_ID((short)1, "cartId"),
22660
      ITEM_ID((short)2, "itemId");
22661
 
22662
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22663
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22664
 
22665
      static {
22666
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22667
          byId.put((int)field._thriftId, field);
22668
          byName.put(field.getFieldName(), field);
22669
        }
22670
      }
22671
 
22672
      /**
22673
       * Find the _Fields constant that matches fieldId, or null if its not found.
22674
       */
22675
      public static _Fields findByThriftId(int fieldId) {
22676
        return byId.get(fieldId);
22677
      }
22678
 
22679
      /**
22680
       * Find the _Fields constant that matches fieldId, throwing an exception
22681
       * if it is not found.
22682
       */
22683
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22684
        _Fields fields = findByThriftId(fieldId);
22685
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22686
        return fields;
22687
      }
22688
 
22689
      /**
22690
       * Find the _Fields constant that matches name, or null if its not found.
22691
       */
22692
      public static _Fields findByName(String name) {
22693
        return byName.get(name);
22694
      }
22695
 
22696
      private final short _thriftId;
22697
      private final String _fieldName;
22698
 
22699
      _Fields(short thriftId, String fieldName) {
22700
        _thriftId = thriftId;
22701
        _fieldName = fieldName;
22702
      }
22703
 
22704
      public short getThriftFieldId() {
22705
        return _thriftId;
22706
      }
22707
 
22708
      public String getFieldName() {
22709
        return _fieldName;
22710
      }
22711
    }
22712
 
22713
    // isset id assignments
22714
    private static final int __CARTID_ISSET_ID = 0;
22715
    private static final int __ITEMID_ISSET_ID = 1;
22716
    private BitSet __isset_bit_vector = new BitSet(2);
22717
 
22718
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22719
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
22720
          new FieldValueMetaData(TType.I64)));
22721
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
22722
          new FieldValueMetaData(TType.I64)));
22723
    }});
22724
 
22725
    static {
22726
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_args.class, metaDataMap);
22727
    }
22728
 
22729
    public deleteItemFromCart_args() {
22730
    }
22731
 
22732
    public deleteItemFromCart_args(
22733
      long cartId,
22734
      long itemId)
22735
    {
22736
      this();
22737
      this.cartId = cartId;
22738
      setCartIdIsSet(true);
22739
      this.itemId = itemId;
22740
      setItemIdIsSet(true);
22741
    }
22742
 
22743
    /**
22744
     * Performs a deep copy on <i>other</i>.
22745
     */
22746
    public deleteItemFromCart_args(deleteItemFromCart_args other) {
22747
      __isset_bit_vector.clear();
22748
      __isset_bit_vector.or(other.__isset_bit_vector);
22749
      this.cartId = other.cartId;
22750
      this.itemId = other.itemId;
22751
    }
22752
 
22753
    public deleteItemFromCart_args deepCopy() {
22754
      return new deleteItemFromCart_args(this);
22755
    }
22756
 
22757
    @Deprecated
22758
    public deleteItemFromCart_args clone() {
22759
      return new deleteItemFromCart_args(this);
22760
    }
22761
 
22762
    public long getCartId() {
22763
      return this.cartId;
22764
    }
22765
 
22766
    public deleteItemFromCart_args setCartId(long cartId) {
22767
      this.cartId = cartId;
22768
      setCartIdIsSet(true);
22769
      return this;
22770
    }
22771
 
22772
    public void unsetCartId() {
22773
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
22774
    }
22775
 
22776
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
22777
    public boolean isSetCartId() {
22778
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
22779
    }
22780
 
22781
    public void setCartIdIsSet(boolean value) {
22782
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
22783
    }
22784
 
22785
    public long getItemId() {
22786
      return this.itemId;
22787
    }
22788
 
22789
    public deleteItemFromCart_args setItemId(long itemId) {
22790
      this.itemId = itemId;
22791
      setItemIdIsSet(true);
22792
      return this;
22793
    }
22794
 
22795
    public void unsetItemId() {
22796
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
22797
    }
22798
 
22799
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
22800
    public boolean isSetItemId() {
22801
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
22802
    }
22803
 
22804
    public void setItemIdIsSet(boolean value) {
22805
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
22806
    }
22807
 
22808
    public void setFieldValue(_Fields field, Object value) {
22809
      switch (field) {
22810
      case CART_ID:
48 ashish 22811
        if (value == null) {
553 chandransh 22812
          unsetCartId();
48 ashish 22813
        } else {
553 chandransh 22814
          setCartId((Long)value);
48 ashish 22815
        }
22816
        break;
22817
 
553 chandransh 22818
      case ITEM_ID:
22819
        if (value == null) {
22820
          unsetItemId();
22821
        } else {
22822
          setItemId((Long)value);
22823
        }
22824
        break;
22825
 
48 ashish 22826
      }
22827
    }
22828
 
22829
    public void setFieldValue(int fieldID, Object value) {
22830
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22831
    }
22832
 
22833
    public Object getFieldValue(_Fields field) {
22834
      switch (field) {
553 chandransh 22835
      case CART_ID:
22836
        return new Long(getCartId());
48 ashish 22837
 
553 chandransh 22838
      case ITEM_ID:
22839
        return new Long(getItemId());
48 ashish 22840
 
22841
      }
22842
      throw new IllegalStateException();
22843
    }
22844
 
22845
    public Object getFieldValue(int fieldId) {
22846
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22847
    }
22848
 
22849
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22850
    public boolean isSet(_Fields field) {
22851
      switch (field) {
553 chandransh 22852
      case CART_ID:
22853
        return isSetCartId();
22854
      case ITEM_ID:
22855
        return isSetItemId();
48 ashish 22856
      }
22857
      throw new IllegalStateException();
22858
    }
22859
 
22860
    public boolean isSet(int fieldID) {
22861
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22862
    }
22863
 
22864
    @Override
22865
    public boolean equals(Object that) {
22866
      if (that == null)
22867
        return false;
553 chandransh 22868
      if (that instanceof deleteItemFromCart_args)
22869
        return this.equals((deleteItemFromCart_args)that);
48 ashish 22870
      return false;
22871
    }
22872
 
553 chandransh 22873
    public boolean equals(deleteItemFromCart_args that) {
48 ashish 22874
      if (that == null)
22875
        return false;
22876
 
553 chandransh 22877
      boolean this_present_cartId = true;
22878
      boolean that_present_cartId = true;
22879
      if (this_present_cartId || that_present_cartId) {
22880
        if (!(this_present_cartId && that_present_cartId))
48 ashish 22881
          return false;
553 chandransh 22882
        if (this.cartId != that.cartId)
48 ashish 22883
          return false;
22884
      }
22885
 
553 chandransh 22886
      boolean this_present_itemId = true;
22887
      boolean that_present_itemId = true;
22888
      if (this_present_itemId || that_present_itemId) {
22889
        if (!(this_present_itemId && that_present_itemId))
48 ashish 22890
          return false;
553 chandransh 22891
        if (this.itemId != that.itemId)
48 ashish 22892
          return false;
22893
      }
22894
 
22895
      return true;
22896
    }
22897
 
22898
    @Override
22899
    public int hashCode() {
22900
      return 0;
22901
    }
22902
 
553 chandransh 22903
    public int compareTo(deleteItemFromCart_args other) {
48 ashish 22904
      if (!getClass().equals(other.getClass())) {
22905
        return getClass().getName().compareTo(other.getClass().getName());
22906
      }
22907
 
22908
      int lastComparison = 0;
553 chandransh 22909
      deleteItemFromCart_args typedOther = (deleteItemFromCart_args)other;
48 ashish 22910
 
553 chandransh 22911
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 22912
      if (lastComparison != 0) {
22913
        return lastComparison;
22914
      }
553 chandransh 22915
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 22916
      if (lastComparison != 0) {
22917
        return lastComparison;
22918
      }
553 chandransh 22919
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 22920
      if (lastComparison != 0) {
22921
        return lastComparison;
22922
      }
553 chandransh 22923
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 22924
      if (lastComparison != 0) {
22925
        return lastComparison;
22926
      }
22927
      return 0;
22928
    }
22929
 
22930
    public void read(TProtocol iprot) throws TException {
22931
      TField field;
22932
      iprot.readStructBegin();
22933
      while (true)
22934
      {
22935
        field = iprot.readFieldBegin();
22936
        if (field.type == TType.STOP) { 
22937
          break;
22938
        }
22939
        _Fields fieldId = _Fields.findByThriftId(field.id);
22940
        if (fieldId == null) {
22941
          TProtocolUtil.skip(iprot, field.type);
22942
        } else {
22943
          switch (fieldId) {
553 chandransh 22944
            case CART_ID:
22945
              if (field.type == TType.I64) {
22946
                this.cartId = iprot.readI64();
22947
                setCartIdIsSet(true);
48 ashish 22948
              } else { 
22949
                TProtocolUtil.skip(iprot, field.type);
22950
              }
22951
              break;
553 chandransh 22952
            case ITEM_ID:
22953
              if (field.type == TType.I64) {
22954
                this.itemId = iprot.readI64();
22955
                setItemIdIsSet(true);
22956
              } else { 
22957
                TProtocolUtil.skip(iprot, field.type);
22958
              }
22959
              break;
22960
          }
22961
          iprot.readFieldEnd();
22962
        }
22963
      }
22964
      iprot.readStructEnd();
22965
      validate();
22966
    }
22967
 
22968
    public void write(TProtocol oprot) throws TException {
22969
      validate();
22970
 
22971
      oprot.writeStructBegin(STRUCT_DESC);
22972
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
22973
      oprot.writeI64(this.cartId);
22974
      oprot.writeFieldEnd();
22975
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
22976
      oprot.writeI64(this.itemId);
22977
      oprot.writeFieldEnd();
22978
      oprot.writeFieldStop();
22979
      oprot.writeStructEnd();
22980
    }
22981
 
22982
    @Override
22983
    public String toString() {
22984
      StringBuilder sb = new StringBuilder("deleteItemFromCart_args(");
22985
      boolean first = true;
22986
 
22987
      sb.append("cartId:");
22988
      sb.append(this.cartId);
22989
      first = false;
22990
      if (!first) sb.append(", ");
22991
      sb.append("itemId:");
22992
      sb.append(this.itemId);
22993
      first = false;
22994
      sb.append(")");
22995
      return sb.toString();
22996
    }
22997
 
22998
    public void validate() throws TException {
22999
      // check for required fields
23000
    }
23001
 
23002
  }
23003
 
23004
  public static class deleteItemFromCart_result implements TBase<deleteItemFromCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<deleteItemFromCart_result>   {
23005
    private static final TStruct STRUCT_DESC = new TStruct("deleteItemFromCart_result");
23006
 
23007
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
23008
 
23009
    private ShoppingCartException scx;
23010
 
23011
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23012
    public enum _Fields implements TFieldIdEnum {
23013
      SCX((short)1, "scx");
23014
 
23015
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23016
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23017
 
23018
      static {
23019
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23020
          byId.put((int)field._thriftId, field);
23021
          byName.put(field.getFieldName(), field);
23022
        }
23023
      }
23024
 
23025
      /**
23026
       * Find the _Fields constant that matches fieldId, or null if its not found.
23027
       */
23028
      public static _Fields findByThriftId(int fieldId) {
23029
        return byId.get(fieldId);
23030
      }
23031
 
23032
      /**
23033
       * Find the _Fields constant that matches fieldId, throwing an exception
23034
       * if it is not found.
23035
       */
23036
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23037
        _Fields fields = findByThriftId(fieldId);
23038
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23039
        return fields;
23040
      }
23041
 
23042
      /**
23043
       * Find the _Fields constant that matches name, or null if its not found.
23044
       */
23045
      public static _Fields findByName(String name) {
23046
        return byName.get(name);
23047
      }
23048
 
23049
      private final short _thriftId;
23050
      private final String _fieldName;
23051
 
23052
      _Fields(short thriftId, String fieldName) {
23053
        _thriftId = thriftId;
23054
        _fieldName = fieldName;
23055
      }
23056
 
23057
      public short getThriftFieldId() {
23058
        return _thriftId;
23059
      }
23060
 
23061
      public String getFieldName() {
23062
        return _fieldName;
23063
      }
23064
    }
23065
 
23066
    // isset id assignments
23067
 
23068
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23069
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
23070
          new FieldValueMetaData(TType.STRUCT)));
23071
    }});
23072
 
23073
    static {
23074
      FieldMetaData.addStructMetaDataMap(deleteItemFromCart_result.class, metaDataMap);
23075
    }
23076
 
23077
    public deleteItemFromCart_result() {
23078
    }
23079
 
23080
    public deleteItemFromCart_result(
23081
      ShoppingCartException scx)
23082
    {
23083
      this();
23084
      this.scx = scx;
23085
    }
23086
 
23087
    /**
23088
     * Performs a deep copy on <i>other</i>.
23089
     */
23090
    public deleteItemFromCart_result(deleteItemFromCart_result other) {
23091
      if (other.isSetScx()) {
23092
        this.scx = new ShoppingCartException(other.scx);
23093
      }
23094
    }
23095
 
23096
    public deleteItemFromCart_result deepCopy() {
23097
      return new deleteItemFromCart_result(this);
23098
    }
23099
 
23100
    @Deprecated
23101
    public deleteItemFromCart_result clone() {
23102
      return new deleteItemFromCart_result(this);
23103
    }
23104
 
23105
    public ShoppingCartException getScx() {
23106
      return this.scx;
23107
    }
23108
 
23109
    public deleteItemFromCart_result setScx(ShoppingCartException scx) {
23110
      this.scx = scx;
23111
      return this;
23112
    }
23113
 
23114
    public void unsetScx() {
23115
      this.scx = null;
23116
    }
23117
 
23118
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23119
    public boolean isSetScx() {
23120
      return this.scx != null;
23121
    }
23122
 
23123
    public void setScxIsSet(boolean value) {
23124
      if (!value) {
23125
        this.scx = null;
23126
      }
23127
    }
23128
 
23129
    public void setFieldValue(_Fields field, Object value) {
23130
      switch (field) {
23131
      case SCX:
23132
        if (value == null) {
23133
          unsetScx();
23134
        } else {
23135
          setScx((ShoppingCartException)value);
23136
        }
23137
        break;
23138
 
23139
      }
23140
    }
23141
 
23142
    public void setFieldValue(int fieldID, Object value) {
23143
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23144
    }
23145
 
23146
    public Object getFieldValue(_Fields field) {
23147
      switch (field) {
23148
      case SCX:
23149
        return getScx();
23150
 
23151
      }
23152
      throw new IllegalStateException();
23153
    }
23154
 
23155
    public Object getFieldValue(int fieldId) {
23156
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23157
    }
23158
 
23159
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23160
    public boolean isSet(_Fields field) {
23161
      switch (field) {
23162
      case SCX:
23163
        return isSetScx();
23164
      }
23165
      throw new IllegalStateException();
23166
    }
23167
 
23168
    public boolean isSet(int fieldID) {
23169
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23170
    }
23171
 
23172
    @Override
23173
    public boolean equals(Object that) {
23174
      if (that == null)
23175
        return false;
23176
      if (that instanceof deleteItemFromCart_result)
23177
        return this.equals((deleteItemFromCart_result)that);
23178
      return false;
23179
    }
23180
 
23181
    public boolean equals(deleteItemFromCart_result that) {
23182
      if (that == null)
23183
        return false;
23184
 
23185
      boolean this_present_scx = true && this.isSetScx();
23186
      boolean that_present_scx = true && that.isSetScx();
23187
      if (this_present_scx || that_present_scx) {
23188
        if (!(this_present_scx && that_present_scx))
23189
          return false;
23190
        if (!this.scx.equals(that.scx))
23191
          return false;
23192
      }
23193
 
23194
      return true;
23195
    }
23196
 
23197
    @Override
23198
    public int hashCode() {
23199
      return 0;
23200
    }
23201
 
23202
    public int compareTo(deleteItemFromCart_result other) {
23203
      if (!getClass().equals(other.getClass())) {
23204
        return getClass().getName().compareTo(other.getClass().getName());
23205
      }
23206
 
23207
      int lastComparison = 0;
23208
      deleteItemFromCart_result typedOther = (deleteItemFromCart_result)other;
23209
 
23210
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23211
      if (lastComparison != 0) {
23212
        return lastComparison;
23213
      }
23214
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23215
      if (lastComparison != 0) {
23216
        return lastComparison;
23217
      }
23218
      return 0;
23219
    }
23220
 
23221
    public void read(TProtocol iprot) throws TException {
23222
      TField field;
23223
      iprot.readStructBegin();
23224
      while (true)
23225
      {
23226
        field = iprot.readFieldBegin();
23227
        if (field.type == TType.STOP) { 
23228
          break;
23229
        }
23230
        _Fields fieldId = _Fields.findByThriftId(field.id);
23231
        if (fieldId == null) {
23232
          TProtocolUtil.skip(iprot, field.type);
23233
        } else {
23234
          switch (fieldId) {
23235
            case SCX:
48 ashish 23236
              if (field.type == TType.STRUCT) {
553 chandransh 23237
                this.scx = new ShoppingCartException();
23238
                this.scx.read(iprot);
48 ashish 23239
              } else { 
23240
                TProtocolUtil.skip(iprot, field.type);
23241
              }
23242
              break;
23243
          }
23244
          iprot.readFieldEnd();
23245
        }
23246
      }
23247
      iprot.readStructEnd();
23248
      validate();
23249
    }
23250
 
23251
    public void write(TProtocol oprot) throws TException {
23252
      oprot.writeStructBegin(STRUCT_DESC);
23253
 
553 chandransh 23254
      if (this.isSetScx()) {
23255
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23256
        this.scx.write(oprot);
48 ashish 23257
        oprot.writeFieldEnd();
23258
      }
23259
      oprot.writeFieldStop();
23260
      oprot.writeStructEnd();
23261
    }
23262
 
23263
    @Override
23264
    public String toString() {
553 chandransh 23265
      StringBuilder sb = new StringBuilder("deleteItemFromCart_result(");
48 ashish 23266
      boolean first = true;
23267
 
553 chandransh 23268
      sb.append("scx:");
23269
      if (this.scx == null) {
48 ashish 23270
        sb.append("null");
23271
      } else {
553 chandransh 23272
        sb.append(this.scx);
48 ashish 23273
      }
23274
      first = false;
23275
      sb.append(")");
23276
      return sb.toString();
23277
    }
23278
 
23279
    public void validate() throws TException {
23280
      // check for required fields
23281
    }
23282
 
23283
  }
23284
 
553 chandransh 23285
  public static class changeQuantity_args implements TBase<changeQuantity_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_args>   {
23286
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_args");
48 ashish 23287
 
553 chandransh 23288
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
23289
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
23290
    private static final TField QUANTITY_FIELD_DESC = new TField("quantity", TType.I64, (short)3);
48 ashish 23291
 
553 chandransh 23292
    private long cartId;
23293
    private long itemId;
23294
    private long quantity;
48 ashish 23295
 
23296
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23297
    public enum _Fields implements TFieldIdEnum {
553 chandransh 23298
      CART_ID((short)1, "cartId"),
23299
      ITEM_ID((short)2, "itemId"),
23300
      QUANTITY((short)3, "quantity");
48 ashish 23301
 
23302
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23303
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23304
 
23305
      static {
23306
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23307
          byId.put((int)field._thriftId, field);
23308
          byName.put(field.getFieldName(), field);
23309
        }
23310
      }
23311
 
23312
      /**
23313
       * Find the _Fields constant that matches fieldId, or null if its not found.
23314
       */
23315
      public static _Fields findByThriftId(int fieldId) {
23316
        return byId.get(fieldId);
23317
      }
23318
 
23319
      /**
23320
       * Find the _Fields constant that matches fieldId, throwing an exception
23321
       * if it is not found.
23322
       */
23323
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23324
        _Fields fields = findByThriftId(fieldId);
23325
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23326
        return fields;
23327
      }
23328
 
23329
      /**
23330
       * Find the _Fields constant that matches name, or null if its not found.
23331
       */
23332
      public static _Fields findByName(String name) {
23333
        return byName.get(name);
23334
      }
23335
 
23336
      private final short _thriftId;
23337
      private final String _fieldName;
23338
 
23339
      _Fields(short thriftId, String fieldName) {
23340
        _thriftId = thriftId;
23341
        _fieldName = fieldName;
23342
      }
23343
 
23344
      public short getThriftFieldId() {
23345
        return _thriftId;
23346
      }
23347
 
23348
      public String getFieldName() {
23349
        return _fieldName;
23350
      }
23351
    }
23352
 
23353
    // isset id assignments
553 chandransh 23354
    private static final int __CARTID_ISSET_ID = 0;
23355
    private static final int __ITEMID_ISSET_ID = 1;
23356
    private static final int __QUANTITY_ISSET_ID = 2;
23357
    private BitSet __isset_bit_vector = new BitSet(3);
48 ashish 23358
 
23359
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23360
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 23361
          new FieldValueMetaData(TType.I64)));
553 chandransh 23362
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
23363
          new FieldValueMetaData(TType.I64)));
23364
      put(_Fields.QUANTITY, new FieldMetaData("quantity", TFieldRequirementType.DEFAULT, 
23365
          new FieldValueMetaData(TType.I64)));
48 ashish 23366
    }});
23367
 
23368
    static {
553 chandransh 23369
      FieldMetaData.addStructMetaDataMap(changeQuantity_args.class, metaDataMap);
48 ashish 23370
    }
23371
 
553 chandransh 23372
    public changeQuantity_args() {
48 ashish 23373
    }
23374
 
553 chandransh 23375
    public changeQuantity_args(
23376
      long cartId,
23377
      long itemId,
23378
      long quantity)
48 ashish 23379
    {
23380
      this();
553 chandransh 23381
      this.cartId = cartId;
23382
      setCartIdIsSet(true);
23383
      this.itemId = itemId;
23384
      setItemIdIsSet(true);
23385
      this.quantity = quantity;
23386
      setQuantityIsSet(true);
48 ashish 23387
    }
23388
 
23389
    /**
23390
     * Performs a deep copy on <i>other</i>.
23391
     */
553 chandransh 23392
    public changeQuantity_args(changeQuantity_args other) {
48 ashish 23393
      __isset_bit_vector.clear();
23394
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 23395
      this.cartId = other.cartId;
23396
      this.itemId = other.itemId;
23397
      this.quantity = other.quantity;
48 ashish 23398
    }
23399
 
553 chandransh 23400
    public changeQuantity_args deepCopy() {
23401
      return new changeQuantity_args(this);
48 ashish 23402
    }
23403
 
23404
    @Deprecated
553 chandransh 23405
    public changeQuantity_args clone() {
23406
      return new changeQuantity_args(this);
48 ashish 23407
    }
23408
 
553 chandransh 23409
    public long getCartId() {
23410
      return this.cartId;
48 ashish 23411
    }
23412
 
553 chandransh 23413
    public changeQuantity_args setCartId(long cartId) {
23414
      this.cartId = cartId;
23415
      setCartIdIsSet(true);
48 ashish 23416
      return this;
23417
    }
23418
 
553 chandransh 23419
    public void unsetCartId() {
23420
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 23421
    }
23422
 
553 chandransh 23423
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
23424
    public boolean isSetCartId() {
23425
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 23426
    }
23427
 
553 chandransh 23428
    public void setCartIdIsSet(boolean value) {
23429
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 23430
    }
23431
 
553 chandransh 23432
    public long getItemId() {
23433
      return this.itemId;
23434
    }
23435
 
23436
    public changeQuantity_args setItemId(long itemId) {
23437
      this.itemId = itemId;
23438
      setItemIdIsSet(true);
23439
      return this;
23440
    }
23441
 
23442
    public void unsetItemId() {
23443
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
23444
    }
23445
 
23446
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
23447
    public boolean isSetItemId() {
23448
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
23449
    }
23450
 
23451
    public void setItemIdIsSet(boolean value) {
23452
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
23453
    }
23454
 
23455
    public long getQuantity() {
23456
      return this.quantity;
23457
    }
23458
 
23459
    public changeQuantity_args setQuantity(long quantity) {
23460
      this.quantity = quantity;
23461
      setQuantityIsSet(true);
23462
      return this;
23463
    }
23464
 
23465
    public void unsetQuantity() {
23466
      __isset_bit_vector.clear(__QUANTITY_ISSET_ID);
23467
    }
23468
 
23469
    /** Returns true if field quantity is set (has been asigned a value) and false otherwise */
23470
    public boolean isSetQuantity() {
23471
      return __isset_bit_vector.get(__QUANTITY_ISSET_ID);
23472
    }
23473
 
23474
    public void setQuantityIsSet(boolean value) {
23475
      __isset_bit_vector.set(__QUANTITY_ISSET_ID, value);
23476
    }
23477
 
48 ashish 23478
    public void setFieldValue(_Fields field, Object value) {
23479
      switch (field) {
553 chandransh 23480
      case CART_ID:
48 ashish 23481
        if (value == null) {
553 chandransh 23482
          unsetCartId();
48 ashish 23483
        } else {
553 chandransh 23484
          setCartId((Long)value);
48 ashish 23485
        }
23486
        break;
23487
 
553 chandransh 23488
      case ITEM_ID:
23489
        if (value == null) {
23490
          unsetItemId();
23491
        } else {
23492
          setItemId((Long)value);
23493
        }
23494
        break;
23495
 
23496
      case QUANTITY:
23497
        if (value == null) {
23498
          unsetQuantity();
23499
        } else {
23500
          setQuantity((Long)value);
23501
        }
23502
        break;
23503
 
48 ashish 23504
      }
23505
    }
23506
 
23507
    public void setFieldValue(int fieldID, Object value) {
23508
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23509
    }
23510
 
23511
    public Object getFieldValue(_Fields field) {
23512
      switch (field) {
553 chandransh 23513
      case CART_ID:
23514
        return new Long(getCartId());
48 ashish 23515
 
553 chandransh 23516
      case ITEM_ID:
23517
        return new Long(getItemId());
23518
 
23519
      case QUANTITY:
23520
        return new Long(getQuantity());
23521
 
48 ashish 23522
      }
23523
      throw new IllegalStateException();
23524
    }
23525
 
23526
    public Object getFieldValue(int fieldId) {
23527
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23528
    }
23529
 
23530
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23531
    public boolean isSet(_Fields field) {
23532
      switch (field) {
553 chandransh 23533
      case CART_ID:
23534
        return isSetCartId();
23535
      case ITEM_ID:
23536
        return isSetItemId();
23537
      case QUANTITY:
23538
        return isSetQuantity();
48 ashish 23539
      }
23540
      throw new IllegalStateException();
23541
    }
23542
 
23543
    public boolean isSet(int fieldID) {
23544
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23545
    }
23546
 
23547
    @Override
23548
    public boolean equals(Object that) {
23549
      if (that == null)
23550
        return false;
553 chandransh 23551
      if (that instanceof changeQuantity_args)
23552
        return this.equals((changeQuantity_args)that);
48 ashish 23553
      return false;
23554
    }
23555
 
553 chandransh 23556
    public boolean equals(changeQuantity_args that) {
48 ashish 23557
      if (that == null)
23558
        return false;
23559
 
553 chandransh 23560
      boolean this_present_cartId = true;
23561
      boolean that_present_cartId = true;
23562
      if (this_present_cartId || that_present_cartId) {
23563
        if (!(this_present_cartId && that_present_cartId))
48 ashish 23564
          return false;
553 chandransh 23565
        if (this.cartId != that.cartId)
48 ashish 23566
          return false;
23567
      }
23568
 
553 chandransh 23569
      boolean this_present_itemId = true;
23570
      boolean that_present_itemId = true;
23571
      if (this_present_itemId || that_present_itemId) {
23572
        if (!(this_present_itemId && that_present_itemId))
23573
          return false;
23574
        if (this.itemId != that.itemId)
23575
          return false;
23576
      }
23577
 
23578
      boolean this_present_quantity = true;
23579
      boolean that_present_quantity = true;
23580
      if (this_present_quantity || that_present_quantity) {
23581
        if (!(this_present_quantity && that_present_quantity))
23582
          return false;
23583
        if (this.quantity != that.quantity)
23584
          return false;
23585
      }
23586
 
48 ashish 23587
      return true;
23588
    }
23589
 
23590
    @Override
23591
    public int hashCode() {
23592
      return 0;
23593
    }
23594
 
553 chandransh 23595
    public int compareTo(changeQuantity_args other) {
48 ashish 23596
      if (!getClass().equals(other.getClass())) {
23597
        return getClass().getName().compareTo(other.getClass().getName());
23598
      }
23599
 
23600
      int lastComparison = 0;
553 chandransh 23601
      changeQuantity_args typedOther = (changeQuantity_args)other;
48 ashish 23602
 
553 chandransh 23603
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 23604
      if (lastComparison != 0) {
23605
        return lastComparison;
23606
      }
553 chandransh 23607
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 23608
      if (lastComparison != 0) {
23609
        return lastComparison;
23610
      }
553 chandransh 23611
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
23612
      if (lastComparison != 0) {
23613
        return lastComparison;
23614
      }
23615
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
23616
      if (lastComparison != 0) {
23617
        return lastComparison;
23618
      }
23619
      lastComparison = Boolean.valueOf(isSetQuantity()).compareTo(isSetQuantity());
23620
      if (lastComparison != 0) {
23621
        return lastComparison;
23622
      }
23623
      lastComparison = TBaseHelper.compareTo(quantity, typedOther.quantity);
23624
      if (lastComparison != 0) {
23625
        return lastComparison;
23626
      }
48 ashish 23627
      return 0;
23628
    }
23629
 
23630
    public void read(TProtocol iprot) throws TException {
23631
      TField field;
23632
      iprot.readStructBegin();
23633
      while (true)
23634
      {
23635
        field = iprot.readFieldBegin();
23636
        if (field.type == TType.STOP) { 
23637
          break;
23638
        }
23639
        _Fields fieldId = _Fields.findByThriftId(field.id);
23640
        if (fieldId == null) {
23641
          TProtocolUtil.skip(iprot, field.type);
23642
        } else {
23643
          switch (fieldId) {
553 chandransh 23644
            case CART_ID:
48 ashish 23645
              if (field.type == TType.I64) {
553 chandransh 23646
                this.cartId = iprot.readI64();
23647
                setCartIdIsSet(true);
48 ashish 23648
              } else { 
23649
                TProtocolUtil.skip(iprot, field.type);
23650
              }
23651
              break;
553 chandransh 23652
            case ITEM_ID:
23653
              if (field.type == TType.I64) {
23654
                this.itemId = iprot.readI64();
23655
                setItemIdIsSet(true);
23656
              } else { 
23657
                TProtocolUtil.skip(iprot, field.type);
23658
              }
23659
              break;
23660
            case QUANTITY:
23661
              if (field.type == TType.I64) {
23662
                this.quantity = iprot.readI64();
23663
                setQuantityIsSet(true);
23664
              } else { 
23665
                TProtocolUtil.skip(iprot, field.type);
23666
              }
23667
              break;
48 ashish 23668
          }
23669
          iprot.readFieldEnd();
23670
        }
23671
      }
23672
      iprot.readStructEnd();
23673
      validate();
23674
    }
23675
 
23676
    public void write(TProtocol oprot) throws TException {
23677
      validate();
23678
 
23679
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 23680
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
23681
      oprot.writeI64(this.cartId);
48 ashish 23682
      oprot.writeFieldEnd();
553 chandransh 23683
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
23684
      oprot.writeI64(this.itemId);
23685
      oprot.writeFieldEnd();
23686
      oprot.writeFieldBegin(QUANTITY_FIELD_DESC);
23687
      oprot.writeI64(this.quantity);
23688
      oprot.writeFieldEnd();
48 ashish 23689
      oprot.writeFieldStop();
23690
      oprot.writeStructEnd();
23691
    }
23692
 
23693
    @Override
23694
    public String toString() {
553 chandransh 23695
      StringBuilder sb = new StringBuilder("changeQuantity_args(");
48 ashish 23696
      boolean first = true;
23697
 
553 chandransh 23698
      sb.append("cartId:");
23699
      sb.append(this.cartId);
48 ashish 23700
      first = false;
553 chandransh 23701
      if (!first) sb.append(", ");
23702
      sb.append("itemId:");
23703
      sb.append(this.itemId);
23704
      first = false;
23705
      if (!first) sb.append(", ");
23706
      sb.append("quantity:");
23707
      sb.append(this.quantity);
23708
      first = false;
48 ashish 23709
      sb.append(")");
23710
      return sb.toString();
23711
    }
23712
 
23713
    public void validate() throws TException {
23714
      // check for required fields
23715
    }
23716
 
23717
  }
23718
 
553 chandransh 23719
  public static class changeQuantity_result implements TBase<changeQuantity_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeQuantity_result>   {
23720
    private static final TStruct STRUCT_DESC = new TStruct("changeQuantity_result");
48 ashish 23721
 
553 chandransh 23722
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 23723
 
553 chandransh 23724
    private ShoppingCartException scx;
48 ashish 23725
 
23726
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23727
    public enum _Fields implements TFieldIdEnum {
553 chandransh 23728
      SCX((short)1, "scx");
48 ashish 23729
 
23730
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23731
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23732
 
23733
      static {
23734
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23735
          byId.put((int)field._thriftId, field);
23736
          byName.put(field.getFieldName(), field);
23737
        }
23738
      }
23739
 
23740
      /**
23741
       * Find the _Fields constant that matches fieldId, or null if its not found.
23742
       */
23743
      public static _Fields findByThriftId(int fieldId) {
23744
        return byId.get(fieldId);
23745
      }
23746
 
23747
      /**
23748
       * Find the _Fields constant that matches fieldId, throwing an exception
23749
       * if it is not found.
23750
       */
23751
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23752
        _Fields fields = findByThriftId(fieldId);
23753
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23754
        return fields;
23755
      }
23756
 
23757
      /**
23758
       * Find the _Fields constant that matches name, or null if its not found.
23759
       */
23760
      public static _Fields findByName(String name) {
23761
        return byName.get(name);
23762
      }
23763
 
23764
      private final short _thriftId;
23765
      private final String _fieldName;
23766
 
23767
      _Fields(short thriftId, String fieldName) {
23768
        _thriftId = thriftId;
23769
        _fieldName = fieldName;
23770
      }
23771
 
23772
      public short getThriftFieldId() {
23773
        return _thriftId;
23774
      }
23775
 
23776
      public String getFieldName() {
23777
        return _fieldName;
23778
      }
23779
    }
23780
 
23781
    // isset id assignments
23782
 
23783
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 23784
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 23785
          new FieldValueMetaData(TType.STRUCT)));
23786
    }});
23787
 
23788
    static {
553 chandransh 23789
      FieldMetaData.addStructMetaDataMap(changeQuantity_result.class, metaDataMap);
48 ashish 23790
    }
23791
 
553 chandransh 23792
    public changeQuantity_result() {
48 ashish 23793
    }
23794
 
553 chandransh 23795
    public changeQuantity_result(
23796
      ShoppingCartException scx)
48 ashish 23797
    {
23798
      this();
553 chandransh 23799
      this.scx = scx;
48 ashish 23800
    }
23801
 
23802
    /**
23803
     * Performs a deep copy on <i>other</i>.
23804
     */
553 chandransh 23805
    public changeQuantity_result(changeQuantity_result other) {
23806
      if (other.isSetScx()) {
23807
        this.scx = new ShoppingCartException(other.scx);
23808
      }
23809
    }
23810
 
23811
    public changeQuantity_result deepCopy() {
23812
      return new changeQuantity_result(this);
23813
    }
23814
 
23815
    @Deprecated
23816
    public changeQuantity_result clone() {
23817
      return new changeQuantity_result(this);
23818
    }
23819
 
23820
    public ShoppingCartException getScx() {
23821
      return this.scx;
23822
    }
23823
 
23824
    public changeQuantity_result setScx(ShoppingCartException scx) {
23825
      this.scx = scx;
23826
      return this;
23827
    }
23828
 
23829
    public void unsetScx() {
23830
      this.scx = null;
23831
    }
23832
 
23833
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
23834
    public boolean isSetScx() {
23835
      return this.scx != null;
23836
    }
23837
 
23838
    public void setScxIsSet(boolean value) {
23839
      if (!value) {
23840
        this.scx = null;
23841
      }
23842
    }
23843
 
23844
    public void setFieldValue(_Fields field, Object value) {
23845
      switch (field) {
23846
      case SCX:
23847
        if (value == null) {
23848
          unsetScx();
23849
        } else {
23850
          setScx((ShoppingCartException)value);
23851
        }
23852
        break;
23853
 
23854
      }
23855
    }
23856
 
23857
    public void setFieldValue(int fieldID, Object value) {
23858
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23859
    }
23860
 
23861
    public Object getFieldValue(_Fields field) {
23862
      switch (field) {
23863
      case SCX:
23864
        return getScx();
23865
 
23866
      }
23867
      throw new IllegalStateException();
23868
    }
23869
 
23870
    public Object getFieldValue(int fieldId) {
23871
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23872
    }
23873
 
23874
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23875
    public boolean isSet(_Fields field) {
23876
      switch (field) {
23877
      case SCX:
23878
        return isSetScx();
23879
      }
23880
      throw new IllegalStateException();
23881
    }
23882
 
23883
    public boolean isSet(int fieldID) {
23884
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23885
    }
23886
 
23887
    @Override
23888
    public boolean equals(Object that) {
23889
      if (that == null)
23890
        return false;
23891
      if (that instanceof changeQuantity_result)
23892
        return this.equals((changeQuantity_result)that);
23893
      return false;
23894
    }
23895
 
23896
    public boolean equals(changeQuantity_result that) {
23897
      if (that == null)
23898
        return false;
23899
 
23900
      boolean this_present_scx = true && this.isSetScx();
23901
      boolean that_present_scx = true && that.isSetScx();
23902
      if (this_present_scx || that_present_scx) {
23903
        if (!(this_present_scx && that_present_scx))
23904
          return false;
23905
        if (!this.scx.equals(that.scx))
23906
          return false;
23907
      }
23908
 
23909
      return true;
23910
    }
23911
 
23912
    @Override
23913
    public int hashCode() {
23914
      return 0;
23915
    }
23916
 
23917
    public int compareTo(changeQuantity_result other) {
23918
      if (!getClass().equals(other.getClass())) {
23919
        return getClass().getName().compareTo(other.getClass().getName());
23920
      }
23921
 
23922
      int lastComparison = 0;
23923
      changeQuantity_result typedOther = (changeQuantity_result)other;
23924
 
23925
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
23926
      if (lastComparison != 0) {
23927
        return lastComparison;
23928
      }
23929
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
23930
      if (lastComparison != 0) {
23931
        return lastComparison;
23932
      }
23933
      return 0;
23934
    }
23935
 
23936
    public void read(TProtocol iprot) throws TException {
23937
      TField field;
23938
      iprot.readStructBegin();
23939
      while (true)
23940
      {
23941
        field = iprot.readFieldBegin();
23942
        if (field.type == TType.STOP) { 
23943
          break;
23944
        }
23945
        _Fields fieldId = _Fields.findByThriftId(field.id);
23946
        if (fieldId == null) {
23947
          TProtocolUtil.skip(iprot, field.type);
23948
        } else {
23949
          switch (fieldId) {
23950
            case SCX:
23951
              if (field.type == TType.STRUCT) {
23952
                this.scx = new ShoppingCartException();
23953
                this.scx.read(iprot);
23954
              } else { 
23955
                TProtocolUtil.skip(iprot, field.type);
23956
              }
23957
              break;
23958
          }
23959
          iprot.readFieldEnd();
23960
        }
23961
      }
23962
      iprot.readStructEnd();
23963
      validate();
23964
    }
23965
 
23966
    public void write(TProtocol oprot) throws TException {
23967
      oprot.writeStructBegin(STRUCT_DESC);
23968
 
23969
      if (this.isSetScx()) {
23970
        oprot.writeFieldBegin(SCX_FIELD_DESC);
23971
        this.scx.write(oprot);
23972
        oprot.writeFieldEnd();
23973
      }
23974
      oprot.writeFieldStop();
23975
      oprot.writeStructEnd();
23976
    }
23977
 
23978
    @Override
23979
    public String toString() {
23980
      StringBuilder sb = new StringBuilder("changeQuantity_result(");
23981
      boolean first = true;
23982
 
23983
      sb.append("scx:");
23984
      if (this.scx == null) {
23985
        sb.append("null");
23986
      } else {
23987
        sb.append(this.scx);
23988
      }
23989
      first = false;
23990
      sb.append(")");
23991
      return sb.toString();
23992
    }
23993
 
23994
    public void validate() throws TException {
23995
      // check for required fields
23996
    }
23997
 
23998
  }
23999
 
24000
  public static class changeItemStatus_args implements TBase<changeItemStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_args>   {
24001
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_args");
24002
 
24003
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24004
    private static final TField ITEM_ID_FIELD_DESC = new TField("itemId", TType.I64, (short)2);
24005
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)3);
24006
 
24007
    private long cartId;
24008
    private long itemId;
24009
    private LineStatus status;
24010
 
24011
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24012
    public enum _Fields implements TFieldIdEnum {
24013
      CART_ID((short)1, "cartId"),
24014
      ITEM_ID((short)2, "itemId"),
24015
      /**
24016
       * 
24017
       * @see LineStatus
24018
       */
24019
      STATUS((short)3, "status");
24020
 
24021
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24022
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24023
 
24024
      static {
24025
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24026
          byId.put((int)field._thriftId, field);
24027
          byName.put(field.getFieldName(), field);
24028
        }
24029
      }
24030
 
24031
      /**
24032
       * Find the _Fields constant that matches fieldId, or null if its not found.
24033
       */
24034
      public static _Fields findByThriftId(int fieldId) {
24035
        return byId.get(fieldId);
24036
      }
24037
 
24038
      /**
24039
       * Find the _Fields constant that matches fieldId, throwing an exception
24040
       * if it is not found.
24041
       */
24042
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24043
        _Fields fields = findByThriftId(fieldId);
24044
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24045
        return fields;
24046
      }
24047
 
24048
      /**
24049
       * Find the _Fields constant that matches name, or null if its not found.
24050
       */
24051
      public static _Fields findByName(String name) {
24052
        return byName.get(name);
24053
      }
24054
 
24055
      private final short _thriftId;
24056
      private final String _fieldName;
24057
 
24058
      _Fields(short thriftId, String fieldName) {
24059
        _thriftId = thriftId;
24060
        _fieldName = fieldName;
24061
      }
24062
 
24063
      public short getThriftFieldId() {
24064
        return _thriftId;
24065
      }
24066
 
24067
      public String getFieldName() {
24068
        return _fieldName;
24069
      }
24070
    }
24071
 
24072
    // isset id assignments
24073
    private static final int __CARTID_ISSET_ID = 0;
24074
    private static final int __ITEMID_ISSET_ID = 1;
24075
    private BitSet __isset_bit_vector = new BitSet(2);
24076
 
24077
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24078
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
24079
          new FieldValueMetaData(TType.I64)));
24080
      put(_Fields.ITEM_ID, new FieldMetaData("itemId", TFieldRequirementType.DEFAULT, 
24081
          new FieldValueMetaData(TType.I64)));
24082
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
24083
          new EnumMetaData(TType.ENUM, LineStatus.class)));
24084
    }});
24085
 
24086
    static {
24087
      FieldMetaData.addStructMetaDataMap(changeItemStatus_args.class, metaDataMap);
24088
    }
24089
 
24090
    public changeItemStatus_args() {
24091
    }
24092
 
24093
    public changeItemStatus_args(
24094
      long cartId,
24095
      long itemId,
24096
      LineStatus status)
24097
    {
24098
      this();
24099
      this.cartId = cartId;
24100
      setCartIdIsSet(true);
24101
      this.itemId = itemId;
24102
      setItemIdIsSet(true);
24103
      this.status = status;
24104
    }
24105
 
24106
    /**
24107
     * Performs a deep copy on <i>other</i>.
24108
     */
24109
    public changeItemStatus_args(changeItemStatus_args other) {
48 ashish 24110
      __isset_bit_vector.clear();
24111
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 24112
      this.cartId = other.cartId;
24113
      this.itemId = other.itemId;
24114
      if (other.isSetStatus()) {
24115
        this.status = other.status;
48 ashish 24116
      }
24117
    }
24118
 
553 chandransh 24119
    public changeItemStatus_args deepCopy() {
24120
      return new changeItemStatus_args(this);
48 ashish 24121
    }
24122
 
24123
    @Deprecated
553 chandransh 24124
    public changeItemStatus_args clone() {
24125
      return new changeItemStatus_args(this);
48 ashish 24126
    }
24127
 
553 chandransh 24128
    public long getCartId() {
24129
      return this.cartId;
48 ashish 24130
    }
24131
 
553 chandransh 24132
    public changeItemStatus_args setCartId(long cartId) {
24133
      this.cartId = cartId;
24134
      setCartIdIsSet(true);
48 ashish 24135
      return this;
24136
    }
24137
 
553 chandransh 24138
    public void unsetCartId() {
24139
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 24140
    }
24141
 
553 chandransh 24142
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24143
    public boolean isSetCartId() {
24144
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 24145
    }
24146
 
553 chandransh 24147
    public void setCartIdIsSet(boolean value) {
24148
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 24149
    }
24150
 
553 chandransh 24151
    public long getItemId() {
24152
      return this.itemId;
48 ashish 24153
    }
24154
 
553 chandransh 24155
    public changeItemStatus_args setItemId(long itemId) {
24156
      this.itemId = itemId;
24157
      setItemIdIsSet(true);
48 ashish 24158
      return this;
24159
    }
24160
 
553 chandransh 24161
    public void unsetItemId() {
24162
      __isset_bit_vector.clear(__ITEMID_ISSET_ID);
48 ashish 24163
    }
24164
 
553 chandransh 24165
    /** Returns true if field itemId is set (has been asigned a value) and false otherwise */
24166
    public boolean isSetItemId() {
24167
      return __isset_bit_vector.get(__ITEMID_ISSET_ID);
48 ashish 24168
    }
24169
 
553 chandransh 24170
    public void setItemIdIsSet(boolean value) {
24171
      __isset_bit_vector.set(__ITEMID_ISSET_ID, value);
24172
    }
24173
 
24174
    /**
24175
     * 
24176
     * @see LineStatus
24177
     */
24178
    public LineStatus getStatus() {
24179
      return this.status;
24180
    }
24181
 
24182
    /**
24183
     * 
24184
     * @see LineStatus
24185
     */
24186
    public changeItemStatus_args setStatus(LineStatus status) {
24187
      this.status = status;
24188
      return this;
24189
    }
24190
 
24191
    public void unsetStatus() {
24192
      this.status = null;
24193
    }
24194
 
24195
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
24196
    public boolean isSetStatus() {
24197
      return this.status != null;
24198
    }
24199
 
24200
    public void setStatusIsSet(boolean value) {
48 ashish 24201
      if (!value) {
553 chandransh 24202
        this.status = null;
48 ashish 24203
      }
24204
    }
24205
 
24206
    public void setFieldValue(_Fields field, Object value) {
24207
      switch (field) {
553 chandransh 24208
      case CART_ID:
48 ashish 24209
        if (value == null) {
553 chandransh 24210
          unsetCartId();
48 ashish 24211
        } else {
553 chandransh 24212
          setCartId((Long)value);
48 ashish 24213
        }
24214
        break;
24215
 
553 chandransh 24216
      case ITEM_ID:
48 ashish 24217
        if (value == null) {
553 chandransh 24218
          unsetItemId();
48 ashish 24219
        } else {
553 chandransh 24220
          setItemId((Long)value);
48 ashish 24221
        }
24222
        break;
24223
 
553 chandransh 24224
      case STATUS:
24225
        if (value == null) {
24226
          unsetStatus();
24227
        } else {
24228
          setStatus((LineStatus)value);
24229
        }
24230
        break;
24231
 
48 ashish 24232
      }
24233
    }
24234
 
24235
    public void setFieldValue(int fieldID, Object value) {
24236
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24237
    }
24238
 
24239
    public Object getFieldValue(_Fields field) {
24240
      switch (field) {
553 chandransh 24241
      case CART_ID:
24242
        return new Long(getCartId());
48 ashish 24243
 
553 chandransh 24244
      case ITEM_ID:
24245
        return new Long(getItemId());
48 ashish 24246
 
553 chandransh 24247
      case STATUS:
24248
        return getStatus();
24249
 
48 ashish 24250
      }
24251
      throw new IllegalStateException();
24252
    }
24253
 
24254
    public Object getFieldValue(int fieldId) {
24255
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24256
    }
24257
 
24258
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24259
    public boolean isSet(_Fields field) {
24260
      switch (field) {
553 chandransh 24261
      case CART_ID:
24262
        return isSetCartId();
24263
      case ITEM_ID:
24264
        return isSetItemId();
24265
      case STATUS:
24266
        return isSetStatus();
48 ashish 24267
      }
24268
      throw new IllegalStateException();
24269
    }
24270
 
24271
    public boolean isSet(int fieldID) {
24272
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24273
    }
24274
 
24275
    @Override
24276
    public boolean equals(Object that) {
24277
      if (that == null)
24278
        return false;
553 chandransh 24279
      if (that instanceof changeItemStatus_args)
24280
        return this.equals((changeItemStatus_args)that);
48 ashish 24281
      return false;
24282
    }
24283
 
553 chandransh 24284
    public boolean equals(changeItemStatus_args that) {
48 ashish 24285
      if (that == null)
24286
        return false;
24287
 
553 chandransh 24288
      boolean this_present_cartId = true;
24289
      boolean that_present_cartId = true;
24290
      if (this_present_cartId || that_present_cartId) {
24291
        if (!(this_present_cartId && that_present_cartId))
48 ashish 24292
          return false;
553 chandransh 24293
        if (this.cartId != that.cartId)
48 ashish 24294
          return false;
24295
      }
24296
 
553 chandransh 24297
      boolean this_present_itemId = true;
24298
      boolean that_present_itemId = true;
24299
      if (this_present_itemId || that_present_itemId) {
24300
        if (!(this_present_itemId && that_present_itemId))
48 ashish 24301
          return false;
553 chandransh 24302
        if (this.itemId != that.itemId)
48 ashish 24303
          return false;
24304
      }
24305
 
553 chandransh 24306
      boolean this_present_status = true && this.isSetStatus();
24307
      boolean that_present_status = true && that.isSetStatus();
24308
      if (this_present_status || that_present_status) {
24309
        if (!(this_present_status && that_present_status))
24310
          return false;
24311
        if (!this.status.equals(that.status))
24312
          return false;
24313
      }
24314
 
48 ashish 24315
      return true;
24316
    }
24317
 
24318
    @Override
24319
    public int hashCode() {
24320
      return 0;
24321
    }
24322
 
553 chandransh 24323
    public int compareTo(changeItemStatus_args other) {
48 ashish 24324
      if (!getClass().equals(other.getClass())) {
24325
        return getClass().getName().compareTo(other.getClass().getName());
24326
      }
24327
 
24328
      int lastComparison = 0;
553 chandransh 24329
      changeItemStatus_args typedOther = (changeItemStatus_args)other;
48 ashish 24330
 
553 chandransh 24331
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 24332
      if (lastComparison != 0) {
24333
        return lastComparison;
24334
      }
553 chandransh 24335
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 24336
      if (lastComparison != 0) {
24337
        return lastComparison;
24338
      }
553 chandransh 24339
      lastComparison = Boolean.valueOf(isSetItemId()).compareTo(isSetItemId());
48 ashish 24340
      if (lastComparison != 0) {
24341
        return lastComparison;
24342
      }
553 chandransh 24343
      lastComparison = TBaseHelper.compareTo(itemId, typedOther.itemId);
48 ashish 24344
      if (lastComparison != 0) {
24345
        return lastComparison;
24346
      }
553 chandransh 24347
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
24348
      if (lastComparison != 0) {
24349
        return lastComparison;
24350
      }
24351
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
24352
      if (lastComparison != 0) {
24353
        return lastComparison;
24354
      }
48 ashish 24355
      return 0;
24356
    }
24357
 
24358
    public void read(TProtocol iprot) throws TException {
24359
      TField field;
24360
      iprot.readStructBegin();
24361
      while (true)
24362
      {
24363
        field = iprot.readFieldBegin();
24364
        if (field.type == TType.STOP) { 
24365
          break;
24366
        }
24367
        _Fields fieldId = _Fields.findByThriftId(field.id);
24368
        if (fieldId == null) {
24369
          TProtocolUtil.skip(iprot, field.type);
24370
        } else {
24371
          switch (fieldId) {
553 chandransh 24372
            case CART_ID:
24373
              if (field.type == TType.I64) {
24374
                this.cartId = iprot.readI64();
24375
                setCartIdIsSet(true);
48 ashish 24376
              } else { 
24377
                TProtocolUtil.skip(iprot, field.type);
24378
              }
24379
              break;
553 chandransh 24380
            case ITEM_ID:
24381
              if (field.type == TType.I64) {
24382
                this.itemId = iprot.readI64();
24383
                setItemIdIsSet(true);
48 ashish 24384
              } else { 
24385
                TProtocolUtil.skip(iprot, field.type);
24386
              }
24387
              break;
553 chandransh 24388
            case STATUS:
24389
              if (field.type == TType.I32) {
24390
                this.status = LineStatus.findByValue(iprot.readI32());
24391
              } else { 
24392
                TProtocolUtil.skip(iprot, field.type);
24393
              }
24394
              break;
48 ashish 24395
          }
24396
          iprot.readFieldEnd();
24397
        }
24398
      }
24399
      iprot.readStructEnd();
24400
      validate();
24401
    }
24402
 
24403
    public void write(TProtocol oprot) throws TException {
553 chandransh 24404
      validate();
24405
 
48 ashish 24406
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 24407
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
24408
      oprot.writeI64(this.cartId);
24409
      oprot.writeFieldEnd();
24410
      oprot.writeFieldBegin(ITEM_ID_FIELD_DESC);
24411
      oprot.writeI64(this.itemId);
24412
      oprot.writeFieldEnd();
24413
      if (this.status != null) {
24414
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
24415
        oprot.writeI32(this.status.getValue());
48 ashish 24416
        oprot.writeFieldEnd();
24417
      }
24418
      oprot.writeFieldStop();
24419
      oprot.writeStructEnd();
24420
    }
24421
 
24422
    @Override
24423
    public String toString() {
553 chandransh 24424
      StringBuilder sb = new StringBuilder("changeItemStatus_args(");
48 ashish 24425
      boolean first = true;
24426
 
553 chandransh 24427
      sb.append("cartId:");
24428
      sb.append(this.cartId);
48 ashish 24429
      first = false;
24430
      if (!first) sb.append(", ");
553 chandransh 24431
      sb.append("itemId:");
24432
      sb.append(this.itemId);
24433
      first = false;
24434
      if (!first) sb.append(", ");
24435
      sb.append("status:");
24436
      if (this.status == null) {
48 ashish 24437
        sb.append("null");
24438
      } else {
553 chandransh 24439
        String status_name = status.name();
24440
        if (status_name != null) {
24441
          sb.append(status_name);
24442
          sb.append(" (");
24443
        }
24444
        sb.append(this.status);
24445
        if (status_name != null) {
24446
          sb.append(")");
24447
        }
48 ashish 24448
      }
24449
      first = false;
24450
      sb.append(")");
24451
      return sb.toString();
24452
    }
24453
 
24454
    public void validate() throws TException {
24455
      // check for required fields
24456
    }
24457
 
24458
  }
24459
 
553 chandransh 24460
  public static class changeItemStatus_result implements TBase<changeItemStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeItemStatus_result>   {
24461
    private static final TStruct STRUCT_DESC = new TStruct("changeItemStatus_result");
48 ashish 24462
 
553 chandransh 24463
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 24464
 
553 chandransh 24465
    private ShoppingCartException scx;
48 ashish 24466
 
24467
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24468
    public enum _Fields implements TFieldIdEnum {
553 chandransh 24469
      SCX((short)1, "scx");
48 ashish 24470
 
24471
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24472
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24473
 
24474
      static {
24475
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24476
          byId.put((int)field._thriftId, field);
24477
          byName.put(field.getFieldName(), field);
24478
        }
24479
      }
24480
 
24481
      /**
24482
       * Find the _Fields constant that matches fieldId, or null if its not found.
24483
       */
24484
      public static _Fields findByThriftId(int fieldId) {
24485
        return byId.get(fieldId);
24486
      }
24487
 
24488
      /**
24489
       * Find the _Fields constant that matches fieldId, throwing an exception
24490
       * if it is not found.
24491
       */
24492
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24493
        _Fields fields = findByThriftId(fieldId);
24494
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24495
        return fields;
24496
      }
24497
 
24498
      /**
24499
       * Find the _Fields constant that matches name, or null if its not found.
24500
       */
24501
      public static _Fields findByName(String name) {
24502
        return byName.get(name);
24503
      }
24504
 
24505
      private final short _thriftId;
24506
      private final String _fieldName;
24507
 
24508
      _Fields(short thriftId, String fieldName) {
24509
        _thriftId = thriftId;
24510
        _fieldName = fieldName;
24511
      }
24512
 
24513
      public short getThriftFieldId() {
24514
        return _thriftId;
24515
      }
24516
 
24517
      public String getFieldName() {
24518
        return _fieldName;
24519
      }
24520
    }
24521
 
24522
    // isset id assignments
553 chandransh 24523
 
24524
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24525
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
24526
          new FieldValueMetaData(TType.STRUCT)));
24527
    }});
24528
 
24529
    static {
24530
      FieldMetaData.addStructMetaDataMap(changeItemStatus_result.class, metaDataMap);
24531
    }
24532
 
24533
    public changeItemStatus_result() {
24534
    }
24535
 
24536
    public changeItemStatus_result(
24537
      ShoppingCartException scx)
24538
    {
24539
      this();
24540
      this.scx = scx;
24541
    }
24542
 
24543
    /**
24544
     * Performs a deep copy on <i>other</i>.
24545
     */
24546
    public changeItemStatus_result(changeItemStatus_result other) {
24547
      if (other.isSetScx()) {
24548
        this.scx = new ShoppingCartException(other.scx);
24549
      }
24550
    }
24551
 
24552
    public changeItemStatus_result deepCopy() {
24553
      return new changeItemStatus_result(this);
24554
    }
24555
 
24556
    @Deprecated
24557
    public changeItemStatus_result clone() {
24558
      return new changeItemStatus_result(this);
24559
    }
24560
 
24561
    public ShoppingCartException getScx() {
24562
      return this.scx;
24563
    }
24564
 
24565
    public changeItemStatus_result setScx(ShoppingCartException scx) {
24566
      this.scx = scx;
24567
      return this;
24568
    }
24569
 
24570
    public void unsetScx() {
24571
      this.scx = null;
24572
    }
24573
 
24574
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
24575
    public boolean isSetScx() {
24576
      return this.scx != null;
24577
    }
24578
 
24579
    public void setScxIsSet(boolean value) {
24580
      if (!value) {
24581
        this.scx = null;
24582
      }
24583
    }
24584
 
24585
    public void setFieldValue(_Fields field, Object value) {
24586
      switch (field) {
24587
      case SCX:
24588
        if (value == null) {
24589
          unsetScx();
24590
        } else {
24591
          setScx((ShoppingCartException)value);
24592
        }
24593
        break;
24594
 
24595
      }
24596
    }
24597
 
24598
    public void setFieldValue(int fieldID, Object value) {
24599
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24600
    }
24601
 
24602
    public Object getFieldValue(_Fields field) {
24603
      switch (field) {
24604
      case SCX:
24605
        return getScx();
24606
 
24607
      }
24608
      throw new IllegalStateException();
24609
    }
24610
 
24611
    public Object getFieldValue(int fieldId) {
24612
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24613
    }
24614
 
24615
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24616
    public boolean isSet(_Fields field) {
24617
      switch (field) {
24618
      case SCX:
24619
        return isSetScx();
24620
      }
24621
      throw new IllegalStateException();
24622
    }
24623
 
24624
    public boolean isSet(int fieldID) {
24625
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24626
    }
24627
 
24628
    @Override
24629
    public boolean equals(Object that) {
24630
      if (that == null)
24631
        return false;
24632
      if (that instanceof changeItemStatus_result)
24633
        return this.equals((changeItemStatus_result)that);
24634
      return false;
24635
    }
24636
 
24637
    public boolean equals(changeItemStatus_result that) {
24638
      if (that == null)
24639
        return false;
24640
 
24641
      boolean this_present_scx = true && this.isSetScx();
24642
      boolean that_present_scx = true && that.isSetScx();
24643
      if (this_present_scx || that_present_scx) {
24644
        if (!(this_present_scx && that_present_scx))
24645
          return false;
24646
        if (!this.scx.equals(that.scx))
24647
          return false;
24648
      }
24649
 
24650
      return true;
24651
    }
24652
 
24653
    @Override
24654
    public int hashCode() {
24655
      return 0;
24656
    }
24657
 
24658
    public int compareTo(changeItemStatus_result other) {
24659
      if (!getClass().equals(other.getClass())) {
24660
        return getClass().getName().compareTo(other.getClass().getName());
24661
      }
24662
 
24663
      int lastComparison = 0;
24664
      changeItemStatus_result typedOther = (changeItemStatus_result)other;
24665
 
24666
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
24667
      if (lastComparison != 0) {
24668
        return lastComparison;
24669
      }
24670
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
24671
      if (lastComparison != 0) {
24672
        return lastComparison;
24673
      }
24674
      return 0;
24675
    }
24676
 
24677
    public void read(TProtocol iprot) throws TException {
24678
      TField field;
24679
      iprot.readStructBegin();
24680
      while (true)
24681
      {
24682
        field = iprot.readFieldBegin();
24683
        if (field.type == TType.STOP) { 
24684
          break;
24685
        }
24686
        _Fields fieldId = _Fields.findByThriftId(field.id);
24687
        if (fieldId == null) {
24688
          TProtocolUtil.skip(iprot, field.type);
24689
        } else {
24690
          switch (fieldId) {
24691
            case SCX:
24692
              if (field.type == TType.STRUCT) {
24693
                this.scx = new ShoppingCartException();
24694
                this.scx.read(iprot);
24695
              } else { 
24696
                TProtocolUtil.skip(iprot, field.type);
24697
              }
24698
              break;
24699
          }
24700
          iprot.readFieldEnd();
24701
        }
24702
      }
24703
      iprot.readStructEnd();
24704
      validate();
24705
    }
24706
 
24707
    public void write(TProtocol oprot) throws TException {
24708
      oprot.writeStructBegin(STRUCT_DESC);
24709
 
24710
      if (this.isSetScx()) {
24711
        oprot.writeFieldBegin(SCX_FIELD_DESC);
24712
        this.scx.write(oprot);
24713
        oprot.writeFieldEnd();
24714
      }
24715
      oprot.writeFieldStop();
24716
      oprot.writeStructEnd();
24717
    }
24718
 
24719
    @Override
24720
    public String toString() {
24721
      StringBuilder sb = new StringBuilder("changeItemStatus_result(");
24722
      boolean first = true;
24723
 
24724
      sb.append("scx:");
24725
      if (this.scx == null) {
24726
        sb.append("null");
24727
      } else {
24728
        sb.append(this.scx);
24729
      }
24730
      first = false;
24731
      sb.append(")");
24732
      return sb.toString();
24733
    }
24734
 
24735
    public void validate() throws TException {
24736
      // check for required fields
24737
    }
24738
 
24739
  }
24740
 
24741
  public static class addAddressToCart_args implements TBase<addAddressToCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_args>   {
24742
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_args");
24743
 
24744
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
24745
    private static final TField ADDRESS_ID_FIELD_DESC = new TField("addressId", TType.I64, (short)2);
24746
 
24747
    private long cartId;
24748
    private long addressId;
24749
 
24750
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24751
    public enum _Fields implements TFieldIdEnum {
24752
      CART_ID((short)1, "cartId"),
24753
      ADDRESS_ID((short)2, "addressId");
24754
 
24755
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24756
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24757
 
24758
      static {
24759
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24760
          byId.put((int)field._thriftId, field);
24761
          byName.put(field.getFieldName(), field);
24762
        }
24763
      }
24764
 
24765
      /**
24766
       * Find the _Fields constant that matches fieldId, or null if its not found.
24767
       */
24768
      public static _Fields findByThriftId(int fieldId) {
24769
        return byId.get(fieldId);
24770
      }
24771
 
24772
      /**
24773
       * Find the _Fields constant that matches fieldId, throwing an exception
24774
       * if it is not found.
24775
       */
24776
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24777
        _Fields fields = findByThriftId(fieldId);
24778
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24779
        return fields;
24780
      }
24781
 
24782
      /**
24783
       * Find the _Fields constant that matches name, or null if its not found.
24784
       */
24785
      public static _Fields findByName(String name) {
24786
        return byName.get(name);
24787
      }
24788
 
24789
      private final short _thriftId;
24790
      private final String _fieldName;
24791
 
24792
      _Fields(short thriftId, String fieldName) {
24793
        _thriftId = thriftId;
24794
        _fieldName = fieldName;
24795
      }
24796
 
24797
      public short getThriftFieldId() {
24798
        return _thriftId;
24799
      }
24800
 
24801
      public String getFieldName() {
24802
        return _fieldName;
24803
      }
24804
    }
24805
 
24806
    // isset id assignments
24807
    private static final int __CARTID_ISSET_ID = 0;
24808
    private static final int __ADDRESSID_ISSET_ID = 1;
24809
    private BitSet __isset_bit_vector = new BitSet(2);
24810
 
24811
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24812
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
24813
          new FieldValueMetaData(TType.I64)));
24814
      put(_Fields.ADDRESS_ID, new FieldMetaData("addressId", TFieldRequirementType.DEFAULT, 
24815
          new FieldValueMetaData(TType.I64)));
24816
    }});
24817
 
24818
    static {
24819
      FieldMetaData.addStructMetaDataMap(addAddressToCart_args.class, metaDataMap);
24820
    }
24821
 
24822
    public addAddressToCart_args() {
24823
    }
24824
 
24825
    public addAddressToCart_args(
24826
      long cartId,
24827
      long addressId)
24828
    {
24829
      this();
24830
      this.cartId = cartId;
24831
      setCartIdIsSet(true);
24832
      this.addressId = addressId;
24833
      setAddressIdIsSet(true);
24834
    }
24835
 
24836
    /**
24837
     * Performs a deep copy on <i>other</i>.
24838
     */
24839
    public addAddressToCart_args(addAddressToCart_args other) {
24840
      __isset_bit_vector.clear();
24841
      __isset_bit_vector.or(other.__isset_bit_vector);
24842
      this.cartId = other.cartId;
24843
      this.addressId = other.addressId;
24844
    }
24845
 
24846
    public addAddressToCart_args deepCopy() {
24847
      return new addAddressToCart_args(this);
24848
    }
24849
 
24850
    @Deprecated
24851
    public addAddressToCart_args clone() {
24852
      return new addAddressToCart_args(this);
24853
    }
24854
 
24855
    public long getCartId() {
24856
      return this.cartId;
24857
    }
24858
 
24859
    public addAddressToCart_args setCartId(long cartId) {
24860
      this.cartId = cartId;
24861
      setCartIdIsSet(true);
24862
      return this;
24863
    }
24864
 
24865
    public void unsetCartId() {
24866
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
24867
    }
24868
 
24869
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
24870
    public boolean isSetCartId() {
24871
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
24872
    }
24873
 
24874
    public void setCartIdIsSet(boolean value) {
24875
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
24876
    }
24877
 
24878
    public long getAddressId() {
24879
      return this.addressId;
24880
    }
24881
 
24882
    public addAddressToCart_args setAddressId(long addressId) {
24883
      this.addressId = addressId;
24884
      setAddressIdIsSet(true);
24885
      return this;
24886
    }
24887
 
24888
    public void unsetAddressId() {
24889
      __isset_bit_vector.clear(__ADDRESSID_ISSET_ID);
24890
    }
24891
 
24892
    /** Returns true if field addressId is set (has been asigned a value) and false otherwise */
24893
    public boolean isSetAddressId() {
24894
      return __isset_bit_vector.get(__ADDRESSID_ISSET_ID);
24895
    }
24896
 
24897
    public void setAddressIdIsSet(boolean value) {
24898
      __isset_bit_vector.set(__ADDRESSID_ISSET_ID, value);
24899
    }
24900
 
24901
    public void setFieldValue(_Fields field, Object value) {
24902
      switch (field) {
24903
      case CART_ID:
24904
        if (value == null) {
24905
          unsetCartId();
24906
        } else {
24907
          setCartId((Long)value);
24908
        }
24909
        break;
24910
 
24911
      case ADDRESS_ID:
24912
        if (value == null) {
24913
          unsetAddressId();
24914
        } else {
24915
          setAddressId((Long)value);
24916
        }
24917
        break;
24918
 
24919
      }
24920
    }
24921
 
24922
    public void setFieldValue(int fieldID, Object value) {
24923
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24924
    }
24925
 
24926
    public Object getFieldValue(_Fields field) {
24927
      switch (field) {
24928
      case CART_ID:
24929
        return new Long(getCartId());
24930
 
24931
      case ADDRESS_ID:
24932
        return new Long(getAddressId());
24933
 
24934
      }
24935
      throw new IllegalStateException();
24936
    }
24937
 
24938
    public Object getFieldValue(int fieldId) {
24939
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24940
    }
24941
 
24942
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24943
    public boolean isSet(_Fields field) {
24944
      switch (field) {
24945
      case CART_ID:
24946
        return isSetCartId();
24947
      case ADDRESS_ID:
24948
        return isSetAddressId();
24949
      }
24950
      throw new IllegalStateException();
24951
    }
24952
 
24953
    public boolean isSet(int fieldID) {
24954
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24955
    }
24956
 
24957
    @Override
24958
    public boolean equals(Object that) {
24959
      if (that == null)
24960
        return false;
24961
      if (that instanceof addAddressToCart_args)
24962
        return this.equals((addAddressToCart_args)that);
24963
      return false;
24964
    }
24965
 
24966
    public boolean equals(addAddressToCart_args that) {
24967
      if (that == null)
24968
        return false;
24969
 
24970
      boolean this_present_cartId = true;
24971
      boolean that_present_cartId = true;
24972
      if (this_present_cartId || that_present_cartId) {
24973
        if (!(this_present_cartId && that_present_cartId))
24974
          return false;
24975
        if (this.cartId != that.cartId)
24976
          return false;
24977
      }
24978
 
24979
      boolean this_present_addressId = true;
24980
      boolean that_present_addressId = true;
24981
      if (this_present_addressId || that_present_addressId) {
24982
        if (!(this_present_addressId && that_present_addressId))
24983
          return false;
24984
        if (this.addressId != that.addressId)
24985
          return false;
24986
      }
24987
 
24988
      return true;
24989
    }
24990
 
24991
    @Override
24992
    public int hashCode() {
24993
      return 0;
24994
    }
24995
 
24996
    public int compareTo(addAddressToCart_args other) {
24997
      if (!getClass().equals(other.getClass())) {
24998
        return getClass().getName().compareTo(other.getClass().getName());
24999
      }
25000
 
25001
      int lastComparison = 0;
25002
      addAddressToCart_args typedOther = (addAddressToCart_args)other;
25003
 
25004
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
25005
      if (lastComparison != 0) {
25006
        return lastComparison;
25007
      }
25008
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
25009
      if (lastComparison != 0) {
25010
        return lastComparison;
25011
      }
25012
      lastComparison = Boolean.valueOf(isSetAddressId()).compareTo(isSetAddressId());
25013
      if (lastComparison != 0) {
25014
        return lastComparison;
25015
      }
25016
      lastComparison = TBaseHelper.compareTo(addressId, typedOther.addressId);
25017
      if (lastComparison != 0) {
25018
        return lastComparison;
25019
      }
25020
      return 0;
25021
    }
25022
 
25023
    public void read(TProtocol iprot) throws TException {
25024
      TField field;
25025
      iprot.readStructBegin();
25026
      while (true)
25027
      {
25028
        field = iprot.readFieldBegin();
25029
        if (field.type == TType.STOP) { 
25030
          break;
25031
        }
25032
        _Fields fieldId = _Fields.findByThriftId(field.id);
25033
        if (fieldId == null) {
25034
          TProtocolUtil.skip(iprot, field.type);
25035
        } else {
25036
          switch (fieldId) {
25037
            case CART_ID:
25038
              if (field.type == TType.I64) {
25039
                this.cartId = iprot.readI64();
25040
                setCartIdIsSet(true);
25041
              } else { 
25042
                TProtocolUtil.skip(iprot, field.type);
25043
              }
25044
              break;
25045
            case ADDRESS_ID:
25046
              if (field.type == TType.I64) {
25047
                this.addressId = iprot.readI64();
25048
                setAddressIdIsSet(true);
25049
              } else { 
25050
                TProtocolUtil.skip(iprot, field.type);
25051
              }
25052
              break;
25053
          }
25054
          iprot.readFieldEnd();
25055
        }
25056
      }
25057
      iprot.readStructEnd();
25058
      validate();
25059
    }
25060
 
25061
    public void write(TProtocol oprot) throws TException {
25062
      validate();
25063
 
25064
      oprot.writeStructBegin(STRUCT_DESC);
25065
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25066
      oprot.writeI64(this.cartId);
25067
      oprot.writeFieldEnd();
25068
      oprot.writeFieldBegin(ADDRESS_ID_FIELD_DESC);
25069
      oprot.writeI64(this.addressId);
25070
      oprot.writeFieldEnd();
25071
      oprot.writeFieldStop();
25072
      oprot.writeStructEnd();
25073
    }
25074
 
25075
    @Override
25076
    public String toString() {
25077
      StringBuilder sb = new StringBuilder("addAddressToCart_args(");
25078
      boolean first = true;
25079
 
25080
      sb.append("cartId:");
25081
      sb.append(this.cartId);
25082
      first = false;
25083
      if (!first) sb.append(", ");
25084
      sb.append("addressId:");
25085
      sb.append(this.addressId);
25086
      first = false;
25087
      sb.append(")");
25088
      return sb.toString();
25089
    }
25090
 
25091
    public void validate() throws TException {
25092
      // check for required fields
25093
    }
25094
 
25095
  }
25096
 
25097
  public static class addAddressToCart_result implements TBase<addAddressToCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<addAddressToCart_result>   {
25098
    private static final TStruct STRUCT_DESC = new TStruct("addAddressToCart_result");
25099
 
578 chandransh 25100
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
553 chandransh 25101
 
578 chandransh 25102
    private ShoppingCartException scx;
553 chandransh 25103
 
25104
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25105
    public enum _Fields implements TFieldIdEnum {
578 chandransh 25106
      SCX((short)1, "scx");
553 chandransh 25107
 
25108
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25109
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25110
 
25111
      static {
25112
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25113
          byId.put((int)field._thriftId, field);
25114
          byName.put(field.getFieldName(), field);
25115
        }
25116
      }
25117
 
25118
      /**
25119
       * Find the _Fields constant that matches fieldId, or null if its not found.
25120
       */
25121
      public static _Fields findByThriftId(int fieldId) {
25122
        return byId.get(fieldId);
25123
      }
25124
 
25125
      /**
25126
       * Find the _Fields constant that matches fieldId, throwing an exception
25127
       * if it is not found.
25128
       */
25129
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25130
        _Fields fields = findByThriftId(fieldId);
25131
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25132
        return fields;
25133
      }
25134
 
25135
      /**
25136
       * Find the _Fields constant that matches name, or null if its not found.
25137
       */
25138
      public static _Fields findByName(String name) {
25139
        return byName.get(name);
25140
      }
25141
 
25142
      private final short _thriftId;
25143
      private final String _fieldName;
25144
 
25145
      _Fields(short thriftId, String fieldName) {
25146
        _thriftId = thriftId;
25147
        _fieldName = fieldName;
25148
      }
25149
 
25150
      public short getThriftFieldId() {
25151
        return _thriftId;
25152
      }
25153
 
25154
      public String getFieldName() {
25155
        return _fieldName;
25156
      }
25157
    }
578 chandransh 25158
 
25159
    // isset id assignments
25160
 
553 chandransh 25161
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
578 chandransh 25162
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
25163
          new FieldValueMetaData(TType.STRUCT)));
553 chandransh 25164
    }});
25165
 
25166
    static {
25167
      FieldMetaData.addStructMetaDataMap(addAddressToCart_result.class, metaDataMap);
25168
    }
25169
 
25170
    public addAddressToCart_result() {
25171
    }
25172
 
578 chandransh 25173
    public addAddressToCart_result(
25174
      ShoppingCartException scx)
25175
    {
25176
      this();
25177
      this.scx = scx;
25178
    }
25179
 
553 chandransh 25180
    /**
25181
     * Performs a deep copy on <i>other</i>.
25182
     */
25183
    public addAddressToCart_result(addAddressToCart_result other) {
578 chandransh 25184
      if (other.isSetScx()) {
25185
        this.scx = new ShoppingCartException(other.scx);
25186
      }
553 chandransh 25187
    }
25188
 
25189
    public addAddressToCart_result deepCopy() {
25190
      return new addAddressToCart_result(this);
25191
    }
25192
 
25193
    @Deprecated
25194
    public addAddressToCart_result clone() {
25195
      return new addAddressToCart_result(this);
25196
    }
25197
 
578 chandransh 25198
    public ShoppingCartException getScx() {
25199
      return this.scx;
25200
    }
25201
 
25202
    public addAddressToCart_result setScx(ShoppingCartException scx) {
25203
      this.scx = scx;
25204
      return this;
25205
    }
25206
 
25207
    public void unsetScx() {
25208
      this.scx = null;
25209
    }
25210
 
25211
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25212
    public boolean isSetScx() {
25213
      return this.scx != null;
25214
    }
25215
 
25216
    public void setScxIsSet(boolean value) {
25217
      if (!value) {
25218
        this.scx = null;
25219
      }
25220
    }
25221
 
553 chandransh 25222
    public void setFieldValue(_Fields field, Object value) {
25223
      switch (field) {
578 chandransh 25224
      case SCX:
25225
        if (value == null) {
25226
          unsetScx();
25227
        } else {
25228
          setScx((ShoppingCartException)value);
25229
        }
25230
        break;
25231
 
553 chandransh 25232
      }
25233
    }
25234
 
25235
    public void setFieldValue(int fieldID, Object value) {
25236
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25237
    }
25238
 
25239
    public Object getFieldValue(_Fields field) {
25240
      switch (field) {
578 chandransh 25241
      case SCX:
25242
        return getScx();
25243
 
553 chandransh 25244
      }
25245
      throw new IllegalStateException();
25246
    }
25247
 
25248
    public Object getFieldValue(int fieldId) {
25249
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25250
    }
25251
 
25252
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25253
    public boolean isSet(_Fields field) {
25254
      switch (field) {
578 chandransh 25255
      case SCX:
25256
        return isSetScx();
553 chandransh 25257
      }
25258
      throw new IllegalStateException();
25259
    }
25260
 
25261
    public boolean isSet(int fieldID) {
25262
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25263
    }
25264
 
25265
    @Override
25266
    public boolean equals(Object that) {
25267
      if (that == null)
25268
        return false;
25269
      if (that instanceof addAddressToCart_result)
25270
        return this.equals((addAddressToCart_result)that);
25271
      return false;
25272
    }
25273
 
25274
    public boolean equals(addAddressToCart_result that) {
25275
      if (that == null)
25276
        return false;
25277
 
578 chandransh 25278
      boolean this_present_scx = true && this.isSetScx();
25279
      boolean that_present_scx = true && that.isSetScx();
25280
      if (this_present_scx || that_present_scx) {
25281
        if (!(this_present_scx && that_present_scx))
25282
          return false;
25283
        if (!this.scx.equals(that.scx))
25284
          return false;
25285
      }
25286
 
553 chandransh 25287
      return true;
25288
    }
25289
 
25290
    @Override
25291
    public int hashCode() {
25292
      return 0;
25293
    }
25294
 
25295
    public int compareTo(addAddressToCart_result other) {
25296
      if (!getClass().equals(other.getClass())) {
25297
        return getClass().getName().compareTo(other.getClass().getName());
25298
      }
25299
 
25300
      int lastComparison = 0;
25301
      addAddressToCart_result typedOther = (addAddressToCart_result)other;
25302
 
578 chandransh 25303
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
25304
      if (lastComparison != 0) {
25305
        return lastComparison;
25306
      }
25307
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
25308
      if (lastComparison != 0) {
25309
        return lastComparison;
25310
      }
553 chandransh 25311
      return 0;
25312
    }
25313
 
25314
    public void read(TProtocol iprot) throws TException {
25315
      TField field;
25316
      iprot.readStructBegin();
25317
      while (true)
25318
      {
25319
        field = iprot.readFieldBegin();
25320
        if (field.type == TType.STOP) { 
25321
          break;
25322
        }
25323
        _Fields fieldId = _Fields.findByThriftId(field.id);
25324
        if (fieldId == null) {
25325
          TProtocolUtil.skip(iprot, field.type);
25326
        } else {
25327
          switch (fieldId) {
578 chandransh 25328
            case SCX:
25329
              if (field.type == TType.STRUCT) {
25330
                this.scx = new ShoppingCartException();
25331
                this.scx.read(iprot);
25332
              } else { 
25333
                TProtocolUtil.skip(iprot, field.type);
25334
              }
25335
              break;
553 chandransh 25336
          }
25337
          iprot.readFieldEnd();
25338
        }
25339
      }
25340
      iprot.readStructEnd();
25341
      validate();
25342
    }
25343
 
25344
    public void write(TProtocol oprot) throws TException {
25345
      oprot.writeStructBegin(STRUCT_DESC);
25346
 
578 chandransh 25347
      if (this.isSetScx()) {
25348
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25349
        this.scx.write(oprot);
25350
        oprot.writeFieldEnd();
25351
      }
553 chandransh 25352
      oprot.writeFieldStop();
25353
      oprot.writeStructEnd();
25354
    }
25355
 
25356
    @Override
25357
    public String toString() {
25358
      StringBuilder sb = new StringBuilder("addAddressToCart_result(");
25359
      boolean first = true;
25360
 
578 chandransh 25361
      sb.append("scx:");
25362
      if (this.scx == null) {
25363
        sb.append("null");
25364
      } else {
25365
        sb.append(this.scx);
25366
      }
25367
      first = false;
553 chandransh 25368
      sb.append(")");
25369
      return sb.toString();
25370
    }
25371
 
25372
    public void validate() throws TException {
25373
      // check for required fields
25374
    }
25375
 
25376
  }
25377
 
688 chandransh 25378
  public static class createOrders_args implements TBase<createOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_args>   {
25379
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_args");
553 chandransh 25380
 
25381
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
25382
 
25383
    private long cartId;
25384
 
25385
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25386
    public enum _Fields implements TFieldIdEnum {
25387
      CART_ID((short)1, "cartId");
25388
 
25389
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25390
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25391
 
25392
      static {
25393
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25394
          byId.put((int)field._thriftId, field);
25395
          byName.put(field.getFieldName(), field);
25396
        }
25397
      }
25398
 
25399
      /**
25400
       * Find the _Fields constant that matches fieldId, or null if its not found.
25401
       */
25402
      public static _Fields findByThriftId(int fieldId) {
25403
        return byId.get(fieldId);
25404
      }
25405
 
25406
      /**
25407
       * Find the _Fields constant that matches fieldId, throwing an exception
25408
       * if it is not found.
25409
       */
25410
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25411
        _Fields fields = findByThriftId(fieldId);
25412
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25413
        return fields;
25414
      }
25415
 
25416
      /**
25417
       * Find the _Fields constant that matches name, or null if its not found.
25418
       */
25419
      public static _Fields findByName(String name) {
25420
        return byName.get(name);
25421
      }
25422
 
25423
      private final short _thriftId;
25424
      private final String _fieldName;
25425
 
25426
      _Fields(short thriftId, String fieldName) {
25427
        _thriftId = thriftId;
25428
        _fieldName = fieldName;
25429
      }
25430
 
25431
      public short getThriftFieldId() {
25432
        return _thriftId;
25433
      }
25434
 
25435
      public String getFieldName() {
25436
        return _fieldName;
25437
      }
25438
    }
25439
 
25440
    // isset id assignments
25441
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 25442
    private BitSet __isset_bit_vector = new BitSet(1);
25443
 
25444
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 25445
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 25446
          new FieldValueMetaData(TType.I64)));
25447
    }});
25448
 
25449
    static {
688 chandransh 25450
      FieldMetaData.addStructMetaDataMap(createOrders_args.class, metaDataMap);
48 ashish 25451
    }
25452
 
688 chandransh 25453
    public createOrders_args() {
48 ashish 25454
    }
25455
 
688 chandransh 25456
    public createOrders_args(
553 chandransh 25457
      long cartId)
48 ashish 25458
    {
25459
      this();
553 chandransh 25460
      this.cartId = cartId;
25461
      setCartIdIsSet(true);
48 ashish 25462
    }
25463
 
25464
    /**
25465
     * Performs a deep copy on <i>other</i>.
25466
     */
688 chandransh 25467
    public createOrders_args(createOrders_args other) {
48 ashish 25468
      __isset_bit_vector.clear();
25469
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 25470
      this.cartId = other.cartId;
48 ashish 25471
    }
25472
 
688 chandransh 25473
    public createOrders_args deepCopy() {
25474
      return new createOrders_args(this);
48 ashish 25475
    }
25476
 
25477
    @Deprecated
688 chandransh 25478
    public createOrders_args clone() {
25479
      return new createOrders_args(this);
48 ashish 25480
    }
25481
 
553 chandransh 25482
    public long getCartId() {
25483
      return this.cartId;
48 ashish 25484
    }
25485
 
688 chandransh 25486
    public createOrders_args setCartId(long cartId) {
553 chandransh 25487
      this.cartId = cartId;
25488
      setCartIdIsSet(true);
48 ashish 25489
      return this;
25490
    }
25491
 
553 chandransh 25492
    public void unsetCartId() {
25493
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 25494
    }
25495
 
553 chandransh 25496
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
25497
    public boolean isSetCartId() {
25498
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 25499
    }
25500
 
553 chandransh 25501
    public void setCartIdIsSet(boolean value) {
25502
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 25503
    }
25504
 
25505
    public void setFieldValue(_Fields field, Object value) {
25506
      switch (field) {
553 chandransh 25507
      case CART_ID:
48 ashish 25508
        if (value == null) {
553 chandransh 25509
          unsetCartId();
48 ashish 25510
        } else {
553 chandransh 25511
          setCartId((Long)value);
48 ashish 25512
        }
25513
        break;
25514
 
25515
      }
25516
    }
25517
 
25518
    public void setFieldValue(int fieldID, Object value) {
25519
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25520
    }
25521
 
25522
    public Object getFieldValue(_Fields field) {
25523
      switch (field) {
553 chandransh 25524
      case CART_ID:
25525
        return new Long(getCartId());
48 ashish 25526
 
25527
      }
25528
      throw new IllegalStateException();
25529
    }
25530
 
25531
    public Object getFieldValue(int fieldId) {
25532
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25533
    }
25534
 
25535
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25536
    public boolean isSet(_Fields field) {
25537
      switch (field) {
553 chandransh 25538
      case CART_ID:
25539
        return isSetCartId();
48 ashish 25540
      }
25541
      throw new IllegalStateException();
25542
    }
25543
 
25544
    public boolean isSet(int fieldID) {
25545
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25546
    }
25547
 
25548
    @Override
25549
    public boolean equals(Object that) {
25550
      if (that == null)
25551
        return false;
688 chandransh 25552
      if (that instanceof createOrders_args)
25553
        return this.equals((createOrders_args)that);
48 ashish 25554
      return false;
25555
    }
25556
 
688 chandransh 25557
    public boolean equals(createOrders_args that) {
48 ashish 25558
      if (that == null)
25559
        return false;
25560
 
553 chandransh 25561
      boolean this_present_cartId = true;
25562
      boolean that_present_cartId = true;
25563
      if (this_present_cartId || that_present_cartId) {
25564
        if (!(this_present_cartId && that_present_cartId))
48 ashish 25565
          return false;
553 chandransh 25566
        if (this.cartId != that.cartId)
48 ashish 25567
          return false;
25568
      }
25569
 
25570
      return true;
25571
    }
25572
 
25573
    @Override
25574
    public int hashCode() {
25575
      return 0;
25576
    }
25577
 
688 chandransh 25578
    public int compareTo(createOrders_args other) {
48 ashish 25579
      if (!getClass().equals(other.getClass())) {
25580
        return getClass().getName().compareTo(other.getClass().getName());
25581
      }
25582
 
25583
      int lastComparison = 0;
688 chandransh 25584
      createOrders_args typedOther = (createOrders_args)other;
48 ashish 25585
 
553 chandransh 25586
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 25587
      if (lastComparison != 0) {
25588
        return lastComparison;
25589
      }
553 chandransh 25590
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 25591
      if (lastComparison != 0) {
25592
        return lastComparison;
25593
      }
25594
      return 0;
25595
    }
25596
 
25597
    public void read(TProtocol iprot) throws TException {
25598
      TField field;
25599
      iprot.readStructBegin();
25600
      while (true)
25601
      {
25602
        field = iprot.readFieldBegin();
25603
        if (field.type == TType.STOP) { 
25604
          break;
25605
        }
25606
        _Fields fieldId = _Fields.findByThriftId(field.id);
25607
        if (fieldId == null) {
25608
          TProtocolUtil.skip(iprot, field.type);
25609
        } else {
25610
          switch (fieldId) {
553 chandransh 25611
            case CART_ID:
48 ashish 25612
              if (field.type == TType.I64) {
553 chandransh 25613
                this.cartId = iprot.readI64();
25614
                setCartIdIsSet(true);
48 ashish 25615
              } else { 
25616
                TProtocolUtil.skip(iprot, field.type);
25617
              }
25618
              break;
25619
          }
25620
          iprot.readFieldEnd();
25621
        }
25622
      }
25623
      iprot.readStructEnd();
25624
      validate();
25625
    }
25626
 
25627
    public void write(TProtocol oprot) throws TException {
25628
      validate();
25629
 
25630
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 25631
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
25632
      oprot.writeI64(this.cartId);
48 ashish 25633
      oprot.writeFieldEnd();
25634
      oprot.writeFieldStop();
25635
      oprot.writeStructEnd();
25636
    }
25637
 
25638
    @Override
25639
    public String toString() {
688 chandransh 25640
      StringBuilder sb = new StringBuilder("createOrders_args(");
48 ashish 25641
      boolean first = true;
25642
 
553 chandransh 25643
      sb.append("cartId:");
25644
      sb.append(this.cartId);
48 ashish 25645
      first = false;
25646
      sb.append(")");
25647
      return sb.toString();
25648
    }
25649
 
25650
    public void validate() throws TException {
25651
      // check for required fields
25652
    }
25653
 
25654
  }
25655
 
688 chandransh 25656
  public static class createOrders_result implements TBase<createOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrders_result>   {
25657
    private static final TStruct STRUCT_DESC = new TStruct("createOrders_result");
48 ashish 25658
 
578 chandransh 25659
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
553 chandransh 25660
    private static final TField SCX_FIELD_DESC = new TField("scx", TType.STRUCT, (short)1);
48 ashish 25661
 
578 chandransh 25662
    private long success;
553 chandransh 25663
    private ShoppingCartException scx;
48 ashish 25664
 
25665
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25666
    public enum _Fields implements TFieldIdEnum {
25667
      SUCCESS((short)0, "success"),
553 chandransh 25668
      SCX((short)1, "scx");
48 ashish 25669
 
25670
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25671
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25672
 
25673
      static {
25674
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25675
          byId.put((int)field._thriftId, field);
25676
          byName.put(field.getFieldName(), field);
25677
        }
25678
      }
25679
 
25680
      /**
25681
       * Find the _Fields constant that matches fieldId, or null if its not found.
25682
       */
25683
      public static _Fields findByThriftId(int fieldId) {
25684
        return byId.get(fieldId);
25685
      }
25686
 
25687
      /**
25688
       * Find the _Fields constant that matches fieldId, throwing an exception
25689
       * if it is not found.
25690
       */
25691
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25692
        _Fields fields = findByThriftId(fieldId);
25693
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25694
        return fields;
25695
      }
25696
 
25697
      /**
25698
       * Find the _Fields constant that matches name, or null if its not found.
25699
       */
25700
      public static _Fields findByName(String name) {
25701
        return byName.get(name);
25702
      }
25703
 
25704
      private final short _thriftId;
25705
      private final String _fieldName;
25706
 
25707
      _Fields(short thriftId, String fieldName) {
25708
        _thriftId = thriftId;
25709
        _fieldName = fieldName;
25710
      }
25711
 
25712
      public short getThriftFieldId() {
25713
        return _thriftId;
25714
      }
25715
 
25716
      public String getFieldName() {
25717
        return _fieldName;
25718
      }
25719
    }
25720
 
25721
    // isset id assignments
25722
    private static final int __SUCCESS_ISSET_ID = 0;
25723
    private BitSet __isset_bit_vector = new BitSet(1);
25724
 
25725
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25726
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
578 chandransh 25727
          new FieldValueMetaData(TType.I64)));
553 chandransh 25728
      put(_Fields.SCX, new FieldMetaData("scx", TFieldRequirementType.DEFAULT, 
48 ashish 25729
          new FieldValueMetaData(TType.STRUCT)));
25730
    }});
25731
 
25732
    static {
688 chandransh 25733
      FieldMetaData.addStructMetaDataMap(createOrders_result.class, metaDataMap);
48 ashish 25734
    }
25735
 
688 chandransh 25736
    public createOrders_result() {
48 ashish 25737
    }
25738
 
688 chandransh 25739
    public createOrders_result(
578 chandransh 25740
      long success,
553 chandransh 25741
      ShoppingCartException scx)
48 ashish 25742
    {
25743
      this();
25744
      this.success = success;
25745
      setSuccessIsSet(true);
553 chandransh 25746
      this.scx = scx;
48 ashish 25747
    }
25748
 
25749
    /**
25750
     * Performs a deep copy on <i>other</i>.
25751
     */
688 chandransh 25752
    public createOrders_result(createOrders_result other) {
48 ashish 25753
      __isset_bit_vector.clear();
25754
      __isset_bit_vector.or(other.__isset_bit_vector);
25755
      this.success = other.success;
553 chandransh 25756
      if (other.isSetScx()) {
25757
        this.scx = new ShoppingCartException(other.scx);
48 ashish 25758
      }
25759
    }
25760
 
688 chandransh 25761
    public createOrders_result deepCopy() {
25762
      return new createOrders_result(this);
48 ashish 25763
    }
25764
 
25765
    @Deprecated
688 chandransh 25766
    public createOrders_result clone() {
25767
      return new createOrders_result(this);
48 ashish 25768
    }
25769
 
578 chandransh 25770
    public long getSuccess() {
48 ashish 25771
      return this.success;
25772
    }
25773
 
688 chandransh 25774
    public createOrders_result setSuccess(long success) {
48 ashish 25775
      this.success = success;
25776
      setSuccessIsSet(true);
25777
      return this;
25778
    }
25779
 
25780
    public void unsetSuccess() {
25781
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
25782
    }
25783
 
25784
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25785
    public boolean isSetSuccess() {
25786
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
25787
    }
25788
 
25789
    public void setSuccessIsSet(boolean value) {
25790
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
25791
    }
25792
 
553 chandransh 25793
    public ShoppingCartException getScx() {
25794
      return this.scx;
48 ashish 25795
    }
25796
 
688 chandransh 25797
    public createOrders_result setScx(ShoppingCartException scx) {
553 chandransh 25798
      this.scx = scx;
48 ashish 25799
      return this;
25800
    }
25801
 
553 chandransh 25802
    public void unsetScx() {
25803
      this.scx = null;
48 ashish 25804
    }
25805
 
553 chandransh 25806
    /** Returns true if field scx is set (has been asigned a value) and false otherwise */
25807
    public boolean isSetScx() {
25808
      return this.scx != null;
48 ashish 25809
    }
25810
 
553 chandransh 25811
    public void setScxIsSet(boolean value) {
48 ashish 25812
      if (!value) {
553 chandransh 25813
        this.scx = null;
48 ashish 25814
      }
25815
    }
25816
 
25817
    public void setFieldValue(_Fields field, Object value) {
25818
      switch (field) {
25819
      case SUCCESS:
25820
        if (value == null) {
25821
          unsetSuccess();
25822
        } else {
578 chandransh 25823
          setSuccess((Long)value);
48 ashish 25824
        }
25825
        break;
25826
 
553 chandransh 25827
      case SCX:
48 ashish 25828
        if (value == null) {
553 chandransh 25829
          unsetScx();
48 ashish 25830
        } else {
553 chandransh 25831
          setScx((ShoppingCartException)value);
48 ashish 25832
        }
25833
        break;
25834
 
25835
      }
25836
    }
25837
 
25838
    public void setFieldValue(int fieldID, Object value) {
25839
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25840
    }
25841
 
25842
    public Object getFieldValue(_Fields field) {
25843
      switch (field) {
25844
      case SUCCESS:
578 chandransh 25845
        return new Long(getSuccess());
48 ashish 25846
 
553 chandransh 25847
      case SCX:
25848
        return getScx();
48 ashish 25849
 
25850
      }
25851
      throw new IllegalStateException();
25852
    }
25853
 
25854
    public Object getFieldValue(int fieldId) {
25855
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25856
    }
25857
 
25858
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25859
    public boolean isSet(_Fields field) {
25860
      switch (field) {
25861
      case SUCCESS:
25862
        return isSetSuccess();
553 chandransh 25863
      case SCX:
25864
        return isSetScx();
48 ashish 25865
      }
25866
      throw new IllegalStateException();
25867
    }
25868
 
25869
    public boolean isSet(int fieldID) {
25870
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25871
    }
25872
 
25873
    @Override
25874
    public boolean equals(Object that) {
25875
      if (that == null)
25876
        return false;
688 chandransh 25877
      if (that instanceof createOrders_result)
25878
        return this.equals((createOrders_result)that);
48 ashish 25879
      return false;
25880
    }
25881
 
688 chandransh 25882
    public boolean equals(createOrders_result that) {
48 ashish 25883
      if (that == null)
25884
        return false;
25885
 
25886
      boolean this_present_success = true;
25887
      boolean that_present_success = true;
25888
      if (this_present_success || that_present_success) {
25889
        if (!(this_present_success && that_present_success))
25890
          return false;
25891
        if (this.success != that.success)
25892
          return false;
25893
      }
25894
 
553 chandransh 25895
      boolean this_present_scx = true && this.isSetScx();
25896
      boolean that_present_scx = true && that.isSetScx();
25897
      if (this_present_scx || that_present_scx) {
25898
        if (!(this_present_scx && that_present_scx))
48 ashish 25899
          return false;
553 chandransh 25900
        if (!this.scx.equals(that.scx))
48 ashish 25901
          return false;
25902
      }
25903
 
25904
      return true;
25905
    }
25906
 
25907
    @Override
25908
    public int hashCode() {
25909
      return 0;
25910
    }
25911
 
688 chandransh 25912
    public int compareTo(createOrders_result other) {
48 ashish 25913
      if (!getClass().equals(other.getClass())) {
25914
        return getClass().getName().compareTo(other.getClass().getName());
25915
      }
25916
 
25917
      int lastComparison = 0;
688 chandransh 25918
      createOrders_result typedOther = (createOrders_result)other;
48 ashish 25919
 
25920
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25921
      if (lastComparison != 0) {
25922
        return lastComparison;
25923
      }
25924
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25925
      if (lastComparison != 0) {
25926
        return lastComparison;
25927
      }
553 chandransh 25928
      lastComparison = Boolean.valueOf(isSetScx()).compareTo(isSetScx());
48 ashish 25929
      if (lastComparison != 0) {
25930
        return lastComparison;
25931
      }
553 chandransh 25932
      lastComparison = TBaseHelper.compareTo(scx, typedOther.scx);
48 ashish 25933
      if (lastComparison != 0) {
25934
        return lastComparison;
25935
      }
25936
      return 0;
25937
    }
25938
 
25939
    public void read(TProtocol iprot) throws TException {
25940
      TField field;
25941
      iprot.readStructBegin();
25942
      while (true)
25943
      {
25944
        field = iprot.readFieldBegin();
25945
        if (field.type == TType.STOP) { 
25946
          break;
25947
        }
25948
        _Fields fieldId = _Fields.findByThriftId(field.id);
25949
        if (fieldId == null) {
25950
          TProtocolUtil.skip(iprot, field.type);
25951
        } else {
25952
          switch (fieldId) {
25953
            case SUCCESS:
578 chandransh 25954
              if (field.type == TType.I64) {
25955
                this.success = iprot.readI64();
48 ashish 25956
                setSuccessIsSet(true);
25957
              } else { 
25958
                TProtocolUtil.skip(iprot, field.type);
25959
              }
25960
              break;
553 chandransh 25961
            case SCX:
48 ashish 25962
              if (field.type == TType.STRUCT) {
553 chandransh 25963
                this.scx = new ShoppingCartException();
25964
                this.scx.read(iprot);
48 ashish 25965
              } else { 
25966
                TProtocolUtil.skip(iprot, field.type);
25967
              }
25968
              break;
25969
          }
25970
          iprot.readFieldEnd();
25971
        }
25972
      }
25973
      iprot.readStructEnd();
25974
      validate();
25975
    }
25976
 
25977
    public void write(TProtocol oprot) throws TException {
25978
      oprot.writeStructBegin(STRUCT_DESC);
25979
 
25980
      if (this.isSetSuccess()) {
25981
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
578 chandransh 25982
        oprot.writeI64(this.success);
48 ashish 25983
        oprot.writeFieldEnd();
553 chandransh 25984
      } else if (this.isSetScx()) {
25985
        oprot.writeFieldBegin(SCX_FIELD_DESC);
25986
        this.scx.write(oprot);
48 ashish 25987
        oprot.writeFieldEnd();
25988
      }
25989
      oprot.writeFieldStop();
25990
      oprot.writeStructEnd();
25991
    }
25992
 
25993
    @Override
25994
    public String toString() {
688 chandransh 25995
      StringBuilder sb = new StringBuilder("createOrders_result(");
48 ashish 25996
      boolean first = true;
25997
 
25998
      sb.append("success:");
25999
      sb.append(this.success);
26000
      first = false;
26001
      if (!first) sb.append(", ");
553 chandransh 26002
      sb.append("scx:");
26003
      if (this.scx == null) {
48 ashish 26004
        sb.append("null");
26005
      } else {
553 chandransh 26006
        sb.append(this.scx);
48 ashish 26007
      }
26008
      first = false;
26009
      sb.append(")");
26010
      return sb.toString();
26011
    }
26012
 
26013
    public void validate() throws TException {
26014
      // check for required fields
26015
    }
26016
 
26017
  }
26018
 
553 chandransh 26019
  public static class validateCart_args implements TBase<validateCart_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_args>   {
26020
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_args");
48 ashish 26021
 
553 chandransh 26022
    private static final TField CART_ID_FIELD_DESC = new TField("cartId", TType.I64, (short)1);
48 ashish 26023
 
553 chandransh 26024
    private long cartId;
48 ashish 26025
 
26026
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26027
    public enum _Fields implements TFieldIdEnum {
553 chandransh 26028
      CART_ID((short)1, "cartId");
48 ashish 26029
 
26030
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26031
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26032
 
26033
      static {
26034
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26035
          byId.put((int)field._thriftId, field);
26036
          byName.put(field.getFieldName(), field);
26037
        }
26038
      }
26039
 
26040
      /**
26041
       * Find the _Fields constant that matches fieldId, or null if its not found.
26042
       */
26043
      public static _Fields findByThriftId(int fieldId) {
26044
        return byId.get(fieldId);
26045
      }
26046
 
26047
      /**
26048
       * Find the _Fields constant that matches fieldId, throwing an exception
26049
       * if it is not found.
26050
       */
26051
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26052
        _Fields fields = findByThriftId(fieldId);
26053
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26054
        return fields;
26055
      }
26056
 
26057
      /**
26058
       * Find the _Fields constant that matches name, or null if its not found.
26059
       */
26060
      public static _Fields findByName(String name) {
26061
        return byName.get(name);
26062
      }
26063
 
26064
      private final short _thriftId;
26065
      private final String _fieldName;
26066
 
26067
      _Fields(short thriftId, String fieldName) {
26068
        _thriftId = thriftId;
26069
        _fieldName = fieldName;
26070
      }
26071
 
26072
      public short getThriftFieldId() {
26073
        return _thriftId;
26074
      }
26075
 
26076
      public String getFieldName() {
26077
        return _fieldName;
26078
      }
26079
    }
26080
 
26081
    // isset id assignments
553 chandransh 26082
    private static final int __CARTID_ISSET_ID = 0;
48 ashish 26083
    private BitSet __isset_bit_vector = new BitSet(1);
26084
 
26085
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
553 chandransh 26086
      put(_Fields.CART_ID, new FieldMetaData("cartId", TFieldRequirementType.DEFAULT, 
48 ashish 26087
          new FieldValueMetaData(TType.I64)));
26088
    }});
26089
 
26090
    static {
553 chandransh 26091
      FieldMetaData.addStructMetaDataMap(validateCart_args.class, metaDataMap);
48 ashish 26092
    }
26093
 
553 chandransh 26094
    public validateCart_args() {
48 ashish 26095
    }
26096
 
553 chandransh 26097
    public validateCart_args(
26098
      long cartId)
48 ashish 26099
    {
26100
      this();
553 chandransh 26101
      this.cartId = cartId;
26102
      setCartIdIsSet(true);
48 ashish 26103
    }
26104
 
26105
    /**
26106
     * Performs a deep copy on <i>other</i>.
26107
     */
553 chandransh 26108
    public validateCart_args(validateCart_args other) {
48 ashish 26109
      __isset_bit_vector.clear();
26110
      __isset_bit_vector.or(other.__isset_bit_vector);
553 chandransh 26111
      this.cartId = other.cartId;
48 ashish 26112
    }
26113
 
553 chandransh 26114
    public validateCart_args deepCopy() {
26115
      return new validateCart_args(this);
48 ashish 26116
    }
26117
 
26118
    @Deprecated
553 chandransh 26119
    public validateCart_args clone() {
26120
      return new validateCart_args(this);
48 ashish 26121
    }
26122
 
553 chandransh 26123
    public long getCartId() {
26124
      return this.cartId;
48 ashish 26125
    }
26126
 
553 chandransh 26127
    public validateCart_args setCartId(long cartId) {
26128
      this.cartId = cartId;
26129
      setCartIdIsSet(true);
48 ashish 26130
      return this;
26131
    }
26132
 
553 chandransh 26133
    public void unsetCartId() {
26134
      __isset_bit_vector.clear(__CARTID_ISSET_ID);
48 ashish 26135
    }
26136
 
553 chandransh 26137
    /** Returns true if field cartId is set (has been asigned a value) and false otherwise */
26138
    public boolean isSetCartId() {
26139
      return __isset_bit_vector.get(__CARTID_ISSET_ID);
48 ashish 26140
    }
26141
 
553 chandransh 26142
    public void setCartIdIsSet(boolean value) {
26143
      __isset_bit_vector.set(__CARTID_ISSET_ID, value);
48 ashish 26144
    }
26145
 
26146
    public void setFieldValue(_Fields field, Object value) {
26147
      switch (field) {
553 chandransh 26148
      case CART_ID:
48 ashish 26149
        if (value == null) {
553 chandransh 26150
          unsetCartId();
48 ashish 26151
        } else {
553 chandransh 26152
          setCartId((Long)value);
48 ashish 26153
        }
26154
        break;
26155
 
26156
      }
26157
    }
26158
 
26159
    public void setFieldValue(int fieldID, Object value) {
26160
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26161
    }
26162
 
26163
    public Object getFieldValue(_Fields field) {
26164
      switch (field) {
553 chandransh 26165
      case CART_ID:
26166
        return new Long(getCartId());
48 ashish 26167
 
26168
      }
26169
      throw new IllegalStateException();
26170
    }
26171
 
26172
    public Object getFieldValue(int fieldId) {
26173
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26174
    }
26175
 
26176
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26177
    public boolean isSet(_Fields field) {
26178
      switch (field) {
553 chandransh 26179
      case CART_ID:
26180
        return isSetCartId();
48 ashish 26181
      }
26182
      throw new IllegalStateException();
26183
    }
26184
 
26185
    public boolean isSet(int fieldID) {
26186
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26187
    }
26188
 
26189
    @Override
26190
    public boolean equals(Object that) {
26191
      if (that == null)
26192
        return false;
553 chandransh 26193
      if (that instanceof validateCart_args)
26194
        return this.equals((validateCart_args)that);
48 ashish 26195
      return false;
26196
    }
26197
 
553 chandransh 26198
    public boolean equals(validateCart_args that) {
48 ashish 26199
      if (that == null)
26200
        return false;
26201
 
553 chandransh 26202
      boolean this_present_cartId = true;
26203
      boolean that_present_cartId = true;
26204
      if (this_present_cartId || that_present_cartId) {
26205
        if (!(this_present_cartId && that_present_cartId))
48 ashish 26206
          return false;
553 chandransh 26207
        if (this.cartId != that.cartId)
48 ashish 26208
          return false;
26209
      }
26210
 
26211
      return true;
26212
    }
26213
 
26214
    @Override
26215
    public int hashCode() {
26216
      return 0;
26217
    }
26218
 
553 chandransh 26219
    public int compareTo(validateCart_args other) {
48 ashish 26220
      if (!getClass().equals(other.getClass())) {
26221
        return getClass().getName().compareTo(other.getClass().getName());
26222
      }
26223
 
26224
      int lastComparison = 0;
553 chandransh 26225
      validateCart_args typedOther = (validateCart_args)other;
48 ashish 26226
 
553 chandransh 26227
      lastComparison = Boolean.valueOf(isSetCartId()).compareTo(isSetCartId());
48 ashish 26228
      if (lastComparison != 0) {
26229
        return lastComparison;
26230
      }
553 chandransh 26231
      lastComparison = TBaseHelper.compareTo(cartId, typedOther.cartId);
48 ashish 26232
      if (lastComparison != 0) {
26233
        return lastComparison;
26234
      }
26235
      return 0;
26236
    }
26237
 
26238
    public void read(TProtocol iprot) throws TException {
26239
      TField field;
26240
      iprot.readStructBegin();
26241
      while (true)
26242
      {
26243
        field = iprot.readFieldBegin();
26244
        if (field.type == TType.STOP) { 
26245
          break;
26246
        }
26247
        _Fields fieldId = _Fields.findByThriftId(field.id);
26248
        if (fieldId == null) {
26249
          TProtocolUtil.skip(iprot, field.type);
26250
        } else {
26251
          switch (fieldId) {
553 chandransh 26252
            case CART_ID:
48 ashish 26253
              if (field.type == TType.I64) {
553 chandransh 26254
                this.cartId = iprot.readI64();
26255
                setCartIdIsSet(true);
48 ashish 26256
              } else { 
26257
                TProtocolUtil.skip(iprot, field.type);
26258
              }
26259
              break;
26260
          }
26261
          iprot.readFieldEnd();
26262
        }
26263
      }
26264
      iprot.readStructEnd();
26265
      validate();
26266
    }
26267
 
26268
    public void write(TProtocol oprot) throws TException {
26269
      validate();
26270
 
26271
      oprot.writeStructBegin(STRUCT_DESC);
553 chandransh 26272
      oprot.writeFieldBegin(CART_ID_FIELD_DESC);
26273
      oprot.writeI64(this.cartId);
48 ashish 26274
      oprot.writeFieldEnd();
26275
      oprot.writeFieldStop();
26276
      oprot.writeStructEnd();
26277
    }
26278
 
26279
    @Override
26280
    public String toString() {
553 chandransh 26281
      StringBuilder sb = new StringBuilder("validateCart_args(");
48 ashish 26282
      boolean first = true;
26283
 
553 chandransh 26284
      sb.append("cartId:");
26285
      sb.append(this.cartId);
48 ashish 26286
      first = false;
26287
      sb.append(")");
26288
      return sb.toString();
26289
    }
26290
 
26291
    public void validate() throws TException {
26292
      // check for required fields
26293
    }
26294
 
26295
  }
26296
 
553 chandransh 26297
  public static class validateCart_result implements TBase<validateCart_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateCart_result>   {
26298
    private static final TStruct STRUCT_DESC = new TStruct("validateCart_result");
48 ashish 26299
 
1466 ankur.sing 26300
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRING, (short)0);
578 chandransh 26301
    private static final TField SCEX_FIELD_DESC = new TField("scex", TType.STRUCT, (short)1);
48 ashish 26302
 
1466 ankur.sing 26303
    private String success;
578 chandransh 26304
    private ShoppingCartException scex;
48 ashish 26305
 
26306
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26307
    public enum _Fields implements TFieldIdEnum {
578 chandransh 26308
      SUCCESS((short)0, "success"),
26309
      SCEX((short)1, "scex");
48 ashish 26310
 
26311
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26312
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26313
 
26314
      static {
26315
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26316
          byId.put((int)field._thriftId, field);
26317
          byName.put(field.getFieldName(), field);
26318
        }
26319
      }
26320
 
26321
      /**
26322
       * Find the _Fields constant that matches fieldId, or null if its not found.
26323
       */
26324
      public static _Fields findByThriftId(int fieldId) {
26325
        return byId.get(fieldId);
26326
      }
26327
 
26328
      /**
26329
       * Find the _Fields constant that matches fieldId, throwing an exception
26330
       * if it is not found.
26331
       */
26332
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26333
        _Fields fields = findByThriftId(fieldId);
26334
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26335
        return fields;
26336
      }
26337
 
26338
      /**
26339
       * Find the _Fields constant that matches name, or null if its not found.
26340
       */
26341
      public static _Fields findByName(String name) {
26342
        return byName.get(name);
26343
      }
26344
 
26345
      private final short _thriftId;
26346
      private final String _fieldName;
26347
 
26348
      _Fields(short thriftId, String fieldName) {
26349
        _thriftId = thriftId;
26350
        _fieldName = fieldName;
26351
      }
26352
 
26353
      public short getThriftFieldId() {
26354
        return _thriftId;
26355
      }
26356
 
26357
      public String getFieldName() {
26358
        return _fieldName;
26359
      }
26360
    }
26361
 
26362
    // isset id assignments
26363
 
26364
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26365
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1466 ankur.sing 26366
          new FieldValueMetaData(TType.STRING)));
578 chandransh 26367
      put(_Fields.SCEX, new FieldMetaData("scex", TFieldRequirementType.DEFAULT, 
26368
          new FieldValueMetaData(TType.STRUCT)));
48 ashish 26369
    }});
26370
 
26371
    static {
553 chandransh 26372
      FieldMetaData.addStructMetaDataMap(validateCart_result.class, metaDataMap);
48 ashish 26373
    }
26374
 
553 chandransh 26375
    public validateCart_result() {
48 ashish 26376
    }
26377
 
553 chandransh 26378
    public validateCart_result(
1466 ankur.sing 26379
      String success,
578 chandransh 26380
      ShoppingCartException scex)
48 ashish 26381
    {
26382
      this();
26383
      this.success = success;
578 chandransh 26384
      this.scex = scex;
48 ashish 26385
    }
26386
 
26387
    /**
26388
     * Performs a deep copy on <i>other</i>.
26389
     */
553 chandransh 26390
    public validateCart_result(validateCart_result other) {
1466 ankur.sing 26391
      if (other.isSetSuccess()) {
26392
        this.success = other.success;
26393
      }
578 chandransh 26394
      if (other.isSetScex()) {
26395
        this.scex = new ShoppingCartException(other.scex);
26396
      }
48 ashish 26397
    }
26398
 
553 chandransh 26399
    public validateCart_result deepCopy() {
26400
      return new validateCart_result(this);
48 ashish 26401
    }
26402
 
26403
    @Deprecated
553 chandransh 26404
    public validateCart_result clone() {
26405
      return new validateCart_result(this);
48 ashish 26406
    }
26407
 
1466 ankur.sing 26408
    public String getSuccess() {
48 ashish 26409
      return this.success;
26410
    }
26411
 
1466 ankur.sing 26412
    public validateCart_result setSuccess(String success) {
48 ashish 26413
      this.success = success;
26414
      return this;
26415
    }
26416
 
26417
    public void unsetSuccess() {
1466 ankur.sing 26418
      this.success = null;
48 ashish 26419
    }
26420
 
26421
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26422
    public boolean isSetSuccess() {
1466 ankur.sing 26423
      return this.success != null;
48 ashish 26424
    }
26425
 
26426
    public void setSuccessIsSet(boolean value) {
1466 ankur.sing 26427
      if (!value) {
26428
        this.success = null;
26429
      }
48 ashish 26430
    }
26431
 
578 chandransh 26432
    public ShoppingCartException getScex() {
26433
      return this.scex;
26434
    }
26435
 
26436
    public validateCart_result setScex(ShoppingCartException scex) {
26437
      this.scex = scex;
26438
      return this;
26439
    }
26440
 
26441
    public void unsetScex() {
26442
      this.scex = null;
26443
    }
26444
 
26445
    /** Returns true if field scex is set (has been asigned a value) and false otherwise */
26446
    public boolean isSetScex() {
26447
      return this.scex != null;
26448
    }
26449
 
26450
    public void setScexIsSet(boolean value) {
26451
      if (!value) {
26452
        this.scex = null;
26453
      }
26454
    }
26455
 
553 chandransh 26456
    public void setFieldValue(_Fields field, Object value) {
26457
      switch (field) {
26458
      case SUCCESS:
26459
        if (value == null) {
26460
          unsetSuccess();
26461
        } else {
1466 ankur.sing 26462
          setSuccess((String)value);
553 chandransh 26463
        }
26464
        break;
26465
 
578 chandransh 26466
      case SCEX:
26467
        if (value == null) {
26468
          unsetScex();
26469
        } else {
26470
          setScex((ShoppingCartException)value);
26471
        }
26472
        break;
26473
 
553 chandransh 26474
      }
48 ashish 26475
    }
26476
 
553 chandransh 26477
    public void setFieldValue(int fieldID, Object value) {
26478
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26479
    }
26480
 
26481
    public Object getFieldValue(_Fields field) {
26482
      switch (field) {
26483
      case SUCCESS:
1466 ankur.sing 26484
        return getSuccess();
553 chandransh 26485
 
578 chandransh 26486
      case SCEX:
26487
        return getScex();
26488
 
553 chandransh 26489
      }
26490
      throw new IllegalStateException();
26491
    }
26492
 
26493
    public Object getFieldValue(int fieldId) {
26494
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26495
    }
26496
 
26497
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26498
    public boolean isSet(_Fields field) {
26499
      switch (field) {
26500
      case SUCCESS:
26501
        return isSetSuccess();
578 chandransh 26502
      case SCEX:
26503
        return isSetScex();
553 chandransh 26504
      }
26505
      throw new IllegalStateException();
26506
    }
26507
 
26508
    public boolean isSet(int fieldID) {
26509
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26510
    }
26511
 
26512
    @Override
26513
    public boolean equals(Object that) {
26514
      if (that == null)
26515
        return false;
26516
      if (that instanceof validateCart_result)
26517
        return this.equals((validateCart_result)that);
26518
      return false;
26519
    }
26520
 
26521
    public boolean equals(validateCart_result that) {
26522
      if (that == null)
26523
        return false;
26524
 
1466 ankur.sing 26525
      boolean this_present_success = true && this.isSetSuccess();
26526
      boolean that_present_success = true && that.isSetSuccess();
553 chandransh 26527
      if (this_present_success || that_present_success) {
26528
        if (!(this_present_success && that_present_success))
26529
          return false;
1466 ankur.sing 26530
        if (!this.success.equals(that.success))
553 chandransh 26531
          return false;
26532
      }
26533
 
578 chandransh 26534
      boolean this_present_scex = true && this.isSetScex();
26535
      boolean that_present_scex = true && that.isSetScex();
26536
      if (this_present_scex || that_present_scex) {
26537
        if (!(this_present_scex && that_present_scex))
26538
          return false;
26539
        if (!this.scex.equals(that.scex))
26540
          return false;
26541
      }
26542
 
553 chandransh 26543
      return true;
26544
    }
26545
 
26546
    @Override
26547
    public int hashCode() {
26548
      return 0;
26549
    }
26550
 
26551
    public int compareTo(validateCart_result other) {
26552
      if (!getClass().equals(other.getClass())) {
26553
        return getClass().getName().compareTo(other.getClass().getName());
26554
      }
26555
 
26556
      int lastComparison = 0;
26557
      validateCart_result typedOther = (validateCart_result)other;
26558
 
26559
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26560
      if (lastComparison != 0) {
26561
        return lastComparison;
26562
      }
26563
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26564
      if (lastComparison != 0) {
26565
        return lastComparison;
26566
      }
578 chandransh 26567
      lastComparison = Boolean.valueOf(isSetScex()).compareTo(isSetScex());
26568
      if (lastComparison != 0) {
26569
        return lastComparison;
26570
      }
26571
      lastComparison = TBaseHelper.compareTo(scex, typedOther.scex);
26572
      if (lastComparison != 0) {
26573
        return lastComparison;
26574
      }
553 chandransh 26575
      return 0;
26576
    }
26577
 
26578
    public void read(TProtocol iprot) throws TException {
26579
      TField field;
26580
      iprot.readStructBegin();
26581
      while (true)
26582
      {
26583
        field = iprot.readFieldBegin();
26584
        if (field.type == TType.STOP) { 
26585
          break;
26586
        }
26587
        _Fields fieldId = _Fields.findByThriftId(field.id);
26588
        if (fieldId == null) {
26589
          TProtocolUtil.skip(iprot, field.type);
26590
        } else {
26591
          switch (fieldId) {
26592
            case SUCCESS:
1466 ankur.sing 26593
              if (field.type == TType.STRING) {
26594
                this.success = iprot.readString();
553 chandransh 26595
              } else { 
26596
                TProtocolUtil.skip(iprot, field.type);
26597
              }
26598
              break;
578 chandransh 26599
            case SCEX:
26600
              if (field.type == TType.STRUCT) {
26601
                this.scex = new ShoppingCartException();
26602
                this.scex.read(iprot);
26603
              } else { 
26604
                TProtocolUtil.skip(iprot, field.type);
26605
              }
26606
              break;
553 chandransh 26607
          }
26608
          iprot.readFieldEnd();
26609
        }
26610
      }
26611
      iprot.readStructEnd();
26612
      validate();
26613
    }
26614
 
26615
    public void write(TProtocol oprot) throws TException {
26616
      oprot.writeStructBegin(STRUCT_DESC);
26617
 
26618
      if (this.isSetSuccess()) {
26619
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1466 ankur.sing 26620
        oprot.writeString(this.success);
553 chandransh 26621
        oprot.writeFieldEnd();
578 chandransh 26622
      } else if (this.isSetScex()) {
26623
        oprot.writeFieldBegin(SCEX_FIELD_DESC);
26624
        this.scex.write(oprot);
26625
        oprot.writeFieldEnd();
553 chandransh 26626
      }
26627
      oprot.writeFieldStop();
26628
      oprot.writeStructEnd();
26629
    }
26630
 
26631
    @Override
26632
    public String toString() {
26633
      StringBuilder sb = new StringBuilder("validateCart_result(");
26634
      boolean first = true;
26635
 
26636
      sb.append("success:");
1466 ankur.sing 26637
      if (this.success == null) {
26638
        sb.append("null");
26639
      } else {
26640
        sb.append(this.success);
26641
      }
553 chandransh 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
}